From: sparky4 Date: Sat, 13 May 2017 20:03:05 +0000 (-0500) Subject: 16_ca needs huge amounts of work and I should remember what needs to be done soon... X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=019b46d3efe3bfcd1353a4b7afb6b792b2baa2b1 16_ca needs huge amounts of work and I should remember what needs to be done soon[going to port rest of code to borland c some time so we can use the core components of id engine here ][going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] added 1st scroll back [i work on CA] palette debug show values added wwww and i need to know how to see vrs/vrl imaage data palette index numbers [i am trying to find out how the hell you get the index number values of VRL/VRS] boom has been fixed ^^[CA_CacheMap added seems to be used in start a new game] what is mapsegs? --- diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index b3fc892d..a1a29392 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -84,6 +84,8 @@ typedef struct vrs_container{ }; // Array of corresponding vrl line offsets vrl1_vgax_offset_t **vrl_line_offsets; + //sprite buffer + byte far _seg *spribuff; } vrs_container_t; typedef struct vrl_container{ @@ -96,6 +98,8 @@ typedef struct vrl_container{ }; // Pointer to a corresponding vrl line offsets struct vrl1_vgax_offset_t *line_offsets; + //sprite buffer + byte far _seg *spribuff; } vrl_container_t; typedef struct sprite @@ -765,7 +769,6 @@ typedef struct //TODO: USE THIS!!!! sd_t sd; //TODO: extend! and learn from keen/wolf/catacomb's code wwww - memptr spribuff; } ca_t; //========================================================================== diff --git a/src/lib/16_vrs.c b/src/lib/16_vrs.c index 056366af..fa1d96de 100755 --- a/src/lib/16_vrs.c +++ b/src/lib/16_vrs.c @@ -39,15 +39,15 @@ void VRS_OpenVRS(char *filename, entity_t *enti, boolean rlsw, global_game_varia switch(rlsw) { case 1: - CA_ReadFile(filename, &gvar->ca.spribuff, gvar); + CA_ReadFile(filename, MEMPTRCONV enti->spri.spritesheet.spribuff, gvar); break; case 0: - CA_LoadFile(filename, &gvar->ca.spribuff, gvar); + CA_LoadFile(filename, MEMPTRCONV enti->spri.spritesheet.spribuff, gvar); break; } // Insert sanity cheks later - enti->spri.spritesheet.buffer = gvar->ca.spribuff; + enti->spri.spritesheet.buffer = enti->spri.spritesheet.spribuff; //TODO: merge these 2 vars into 1 enti->spri.spritesheet.data_size = sizeof(enti->spri.spritesheet.buffer) - sizeof(struct vrl1_vgax_header); num_of_vrl = 0; vrl_id_iter = (uint16_t far *)(enti->spri.spritesheet.buffer + enti->spri.spritesheet.vrs_hdr->offset_table[VRS_HEADER_OFFSET_SPRITE_ID_LIST]); @@ -112,15 +112,15 @@ void VRS_OpenVRL(char *filename, entity_t *enti, boolean rlsw, global_game_varia switch(rlsw) { case 1: - CA_ReadFile(filename, &gvar->ca.spribuff, gvar); + CA_ReadFile(filename, &enti->spri.spritesheet.spribuff, gvar); break; case 0: - CA_LoadFile(filename, &gvar->ca.spribuff, gvar); + CA_LoadFile(filename, &enti->spri.spritesheet.spribuff, gvar); break; } // Insert sanity cheks later - enti->spri.sprite_vrl_cont.buffer = gvar->ca.spribuff; + enti->spri.sprite_vrl_cont.buffer = enti->spri.spritesheet.spribuff; enti->spri.sprite_vrl_cont.data_size = sizeof(enti->spri.spritesheet.buffer) - sizeof(struct vrl1_vgax_header); // Allocate memory for vrl line offsets table