From: sparky4 Date: Fri, 21 Apr 2017 18:06: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=28b1be191222717943878f024cddac30b026318e 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] screaming horny cat ruins though processes --- diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 87db2377..8dd2da0a 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -205,13 +205,13 @@ void CA_CloseDebug(global_game_variables_t *gvar) = ============================ */ -/*++++ -void CAL_GetGrChunkLength (int chunk) + +void CAL_GetGrChunkLength (int chunk,global_game_variables_t *gvar) { lseek(gvar->ca.file.grhandle,GRFILEPOS(chunk),SEEK_SET); read(gvar->ca.file.grhandle,&gvar->ca.chunkexplen,sizeof(gvar->ca.chunkexplen)); gvar->ca.chunkcomplen = GRFILEPOS(chunk+1)-GRFILEPOS(chunk)-4; -}*/ +} /* @@ -1036,8 +1036,8 @@ dinorm: = ====================== */ -////++++TODO: enable! -/*void CAL_SetupGrFile (global_game_variables_t *gvar) + +void CAL_SetupGrFile (global_game_variables_t *gvar) { char fname[13]; int handle; @@ -1100,11 +1100,11 @@ dinorm: // load the pic and sprite headers into the arrays in the data segment // #if NUMPICS>0 - MM_GetPtr(MEMPTR pictable,NUMPICS*sizeof(pictabletype),gvar); - CAL_GetGrChunkLength(STRUCTPIC); // position file pointer + MM_GetPtr(MEMPTR gvar->video.pictable,NUMPICS*sizeof(pictabletype),gvar); + CAL_GetGrChunkLength(STRUCTPIC,gvar); // position file pointer MM_GetPtr(&compseg,gvar->ca.chunkcomplen, gvar); CA_FarRead (gvar->ca.file.grhandle,compseg,gvar->ca.chunkcomplen,gvar); - CAL_HuffExpand (compseg, (byte far *)pictable,NUMPICS*sizeof(pictabletype),gvar->ca.grhuffman); + CAL_HuffExpand (compseg, (byte far *)gvar->video.pictable,NUMPICS*sizeof(pictabletype),gvar->ca.grhuffman); MM_FreePtr(&compseg,gvar); #endif @@ -1126,7 +1126,7 @@ dinorm: MM_FreePtr(&compseg); #endif -}*/ +} //========================================================================== diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 6fe2c646..f45195d6 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -362,6 +362,11 @@ typedef struct #define NUMCHUNKS 416 //keen #define MAXSCANLINES 240 // size of ylookup table +typedef struct +{ + int width,height; +} pictabletype; + //video typedef struct { @@ -426,6 +431,7 @@ typedef struct word bordercolor; boolean fastpalette; byte far palette1[256][3],far palette2[256][3]; + pictabletype _seg *pictable; } video_t; //from scroll16 @@ -645,7 +651,7 @@ typedef struct //========================================================================== #define NOMAPS -#define NOGRAPHICS +//#define NOGRAPHICS #define NOAUDIO #define MAPHEADERLINKED @@ -654,14 +660,15 @@ typedef struct #define NUMMAPS 4//39 #define NUMSNDCHUNKS 4//3 -#define NUMPICS 132//wolf3d wl6 +//#define NUMPICS 132//wolf3d wl6 #define STRUCTPIC 0 -#define GDICTNAME "vgadict." -#define GHEADNAME "vgahead." -#define GFILENAME "vgagraph." +#define DATADIR "data/" +#define GDICTNAME DATADIR"vgadict." +#define GHEADNAME DATADIR"vgahead." +#define GFILENAME DATADIR"vgagraph." #define EXTENSION "hb1"