65 long size = file.
Size();
122 file.
Read(&size,
sizeof(size));
128 file.
Read(&header,
sizeof(header));
129 size -= (
unsigned short)
sizeof(header);
139 file.
Read(reserved_data, header.
Skip);
152 sptr = (
char *)sptr + uncomp_buff.
Get_Size()-(size+
sizeof(header));
158 memmove(sptr, &header,
sizeof(header));
160 file.
Read((
char *)sptr +
sizeof(header), size);
206 static int _time = 0;
211 if (
id == -1 ||
id ==
TXT_NONE)
return(
"");
223 for (
int index = 0; index <
ARRAY_SIZE(_buffers); index++) {
224 if (_buffers[index].ID ==
id) {
226 return(_buffers[index].String);
236 for (
int text = 0; text <
ARRAY_SIZE(_buffers); text++) {
237 if (oldest == -1 || oldtime > _buffers[text].TimeStamp) {
240 if (oldtime == -1 || _buffers[text].ID == -1)
break;
248 char * stringptr = _buffers[oldest].
String;
249 _buffers[oldest].
ID = id;
251 if (LoadString(
ProgramInstance,
id, stringptr,
sizeof(_buffers[oldest].String)) == 0) {
254 stringptr[
sizeof(_buffers[oldest].
String)-1] =
'\0';
273 if (handle ==
NULL) {
278 if (rhandle ==
NULL) {
282 return(LockResource(rhandle));
315 length = file.
Size();
317 file.
Read(return_ptr, length);
unsigned long __cdecl Uncompress_Data(void const *src, void *dst)
long Get_Size(void) const
void * Get_Buffer(void) const
virtual int Seek(int pos, int dir=SEEK_CUR)=0
virtual bool Is_Available(int forced=false)=0
virtual bool Is_Open(void) const =0
virtual int Read(void *buffer, int size)=0
virtual void Close(void)=0
virtual int Open(char const *filename, int rights=READ)=0
char const * Fetch_String(int id)
void * Load_Alloc_Data(FileClass &file)
long Load_Uncompress(FileClass &file, Buffer &uncomp_buff, Buffer &dest_buff, void *reserved_data)
int Load_Picture(FileClass &file, Buffer &scratchbuf, Buffer &destbuf, unsigned char *palette, PicturePlaneType)
void * Hires_Load(FileClass &file)
void const * Fetch_Resource(LPCSTR resname, LPCSTR restype)
HINSTANCE ProgramInstance