};\r
// Array of corresponding vrl line offsets\r
vrl1_vgax_offset_t **vrl_line_offsets;\r
+ //sprite buffer\r
+ byte far _seg *spribuff;\r
} vrs_container_t;\r
\r
typedef struct vrl_container{\r
};\r
// Pointer to a corresponding vrl line offsets struct\r
vrl1_vgax_offset_t *line_offsets;\r
+ //sprite buffer\r
+ byte far _seg *spribuff;\r
} vrl_container_t;\r
\r
typedef struct sprite\r
\r
sd_t sd;\r
//TODO: extend! and learn from keen/wolf/catacomb's code wwww\r
- memptr spribuff;\r
} ca_t;\r
\r
//==========================================================================\r
switch(rlsw)\r
{\r
case 1:\r
- CA_ReadFile(filename, &gvar->ca.spribuff, gvar);\r
+ CA_ReadFile(filename, MEMPTRCONV enti->spri.spritesheet.spribuff, gvar);\r
break;\r
case 0:\r
- CA_LoadFile(filename, &gvar->ca.spribuff, gvar);\r
+ CA_LoadFile(filename, MEMPTRCONV enti->spri.spritesheet.spribuff, gvar);\r
break;\r
}\r
\r
// Insert sanity cheks later\r
- enti->spri.spritesheet.buffer = gvar->ca.spribuff;\r
+ enti->spri.spritesheet.buffer = enti->spri.spritesheet.spribuff; //TODO: merge these 2 vars into 1\r
enti->spri.spritesheet.data_size = sizeof(enti->spri.spritesheet.buffer) - sizeof(struct vrl1_vgax_header);\r
num_of_vrl = 0;\r
vrl_id_iter = (uint16_t far *)(enti->spri.spritesheet.buffer + enti->spri.spritesheet.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]);\r
switch(rlsw)\r
{\r
case 1:\r
- CA_ReadFile(filename, &gvar->ca.spribuff, gvar);\r
+ CA_ReadFile(filename, &enti->spri.spritesheet.spribuff, gvar);\r
break;\r
case 0:\r
- CA_LoadFile(filename, &gvar->ca.spribuff, gvar);\r
+ CA_LoadFile(filename, &enti->spri.spritesheet.spribuff, gvar);\r
break;\r
}\r
\r
// Insert sanity cheks later\r
- enti->spri.sprite_vrl_cont.buffer = gvar->ca.spribuff;\r
+ enti->spri.sprite_vrl_cont.buffer = enti->spri.spritesheet.spribuff;\r
enti->spri.sprite_vrl_cont.data_size = sizeof(enti->spri.spritesheet.buffer) - sizeof(struct vrl1_vgax_header);\r
\r
// Allocate memory for vrl line offsets table\r