int read_vrs(global_game_variables_t *gvar, char *filename, struct vrs_container *vrs_cont){\r
int fd;\r
dword size;\r
-#ifdef __WATCOMC__\r
- __segment seg;\r
- void __based(seg)* bigbuffer;\r
-#endif\r
-#ifdef __BORLANDC__\r
- memptr bigbuffer;\r
-#endif\r
byte huge *buffer;\r
vrl1_vgax_offset_t **vrl_line_offsets;\r
uint32_t huge *vrl_headers_offsets;\r
uint16_t huge *vrl_id_iter;\r
uint32_t vrl_size;\r
- int num_of_vrl, i;\r
+ int num_of_vrl=0, i;\r
struct vrl1_vgax_header huge *curr_vrl;\r
- int success;\r
+ int success=1;\r
\r
// Open filename, get size of file,\r
// populate the vrs_container if all tests pass\r
vrs_cont->buffer = buffer;\r
\r
// Calculate vrl offsets\r
- \r
+\r
// Count sprites\r
vrl_id_iter = (uint16_t huge *)(buffer + vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]);\r
while(vrl_id_iter[num_of_vrl]){\r
}\r
\r
// Get id list from .vrs blob (base + offset)\r
- ids = (uint16_t huge*)(vrs_cont->buffer + \r
+ ids = (uint16_t huge*)(vrs_cont->buffer +\r
vrs_cont->vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]);\r
\r
// Loop through the id list until we found the right one or hit the end of the list\r