trivial formatting / removing of old cruft / adding comments

git-svn-id: https://svn.eduke32.com/eduke32@2244 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-01-10 23:44:35 +00:00
parent a0d27ee702
commit 3095b09773
6 changed files with 21 additions and 53 deletions

View file

@ -773,7 +773,6 @@ extern char **g_defModules;
extern int g_defModulesNum;
#ifdef USE_OPENGL
typedef struct
{
// maps build tiles to particular animation frames of a model
@ -795,7 +794,7 @@ static inline int32_t md_tilehasmodel(int32_t tilenume,int32_t pal)
if (!mdinited) return -1;
return tile2model[Ptile2tile(tilenume,pal)].modelid;
}
#endif
#endif // defined USE_OPENGL
int32_t md_defineframe(int32_t modelid, const char *framename, int32_t tilenume, int32_t skinnum, float smoothduration, int32_t pal);
int32_t md_defineanimation(int32_t modelid, const char *framestart, const char *frameend, int32_t fps, int32_t flags);

View file

@ -3,11 +3,7 @@
#include "hightile.h"
//#ifdef __POWERPC__
#define SHIFTMOD32(a) ((a)&31)
//#else
//#define SHIFTMOD32(a) (a)
//#endif
typedef struct
{
@ -206,22 +202,6 @@ typedef struct
int32_t is8bit;
} voxmodel_t;
/*
typedef struct
{
// maps build tiles to particular animation frames of a model
int32_t modelid;
int32_t skinnum;
int32_t framenum; // calculate the number from the name when declaring
float smoothduration;
int32_t next;
char pal;
} tile2model_t;
#define EXTRATILES MAXTILES
EXTERN tile2model_t tile2model[MAXTILES+EXTRATILES];
*/
EXTERN mdmodel_t **models;
void updateanimation(md2model_t *m, spritetype *tspr);

View file

@ -4534,6 +4534,12 @@ static void drawalls(int32_t bunch)
#endif
if (nextsectnum >= 0)
{
// 2 <--- 3
// x------------------x
// 0 ---> 1
//
// 4 (our pos)
getzsofslope((int16_t)sectnum,wal->x,wal->y,&cz[0],&fz[0]);
getzsofslope((int16_t)sectnum,wall[wal->point2].x,wall[wal->point2].y,&cz[1],&fz[1]);
getzsofslope((int16_t)nextsectnum,wal->x,wal->y,&cz[2],&fz[2]);
@ -4622,6 +4628,7 @@ static void drawalls(int32_t bunch)
}
}
}
if ((cz[2] < cz[0]) || (cz[3] < cz[1]) || (globalposz < cz[4]))
{
i = x2-x1+1;
@ -4734,6 +4741,7 @@ static void drawalls(int32_t bunch)
}
}
}
if ((fz[2] > fz[0]) || (fz[3] > fz[1]) || (globalposz > fz[4]))
{
i = x2-x1+1;
@ -7249,8 +7257,6 @@ static void initfastcolorlookup(int32_t rscale, int32_t gscale, int32_t bscale)
j += 129-(i<<1);
}
//clearbufbyte(colhere,sizeof(colhere),0L);
//clearbufbyte(colhead,sizeof(colhead),0L);
Bmemset(colhere,0,sizeof(colhere));
Bmemset(colhead,0,sizeof(colhead));
@ -7858,10 +7864,6 @@ void uninitengine(void)
# ifdef POLYMER
polymer_uninit();
# endif
/* if (cachefilehandle > -1)
Bclose(cachefilehandle);
if (cacheindexptr != NULL)
Bfclose(cacheindexptr); */
#endif
if (artfil != -1)
@ -8110,7 +8112,7 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
{
// numbunches==0 can happen if the mirror is far away... the game code decides
// to draw it, but scansector gets zero bunches. Result: big screwup!
// Leave inpreparesector as is, it's restored by completemirror.
// Leave inpreparemirror as is, it's restored by completemirror.
if (numbunches==0)
{
enddrawing(); //!!!

View file

@ -227,14 +227,6 @@ int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, i
return 0;
}
/*
int32_t md_tilehasmodel(int32_t tilenume,int32_t pal)
{
if (!mdinited) return -1;
return tile2model[Ptile2tile(tilenume,pal)].modelid;
}
*/
static int32_t framename2index(mdmodel_t *vm, const char *nam)
{
int32_t i = 0;
@ -522,9 +514,6 @@ int32_t md_undefinemodel(int32_t modelid)
return 0;
}
static md2model_t *modelhead;
static mdskinmap_t *skhead;
static int32_t daskinloader(int32_t filh, intptr_t *fptr, int32_t *bpl, int32_t *sizx, int32_t *sizy, int32_t *osizx, int32_t *osizy, char *hasalpha, int32_t pal, char effect)
{
int32_t picfillen, j,y,x;
@ -801,8 +790,6 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
int32_t startticks, willprint=0;
modelhead=m; // for palmaps
if (m->mdnum == 2) surf = 0;
if ((unsigned)pal >= (unsigned)MAXPALOOKUPS) return 0;
@ -847,7 +834,7 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
//OSD_Printf("Using MD2/MD3 skin (%d) %s, pal=%d\n",number,skinfile,pal);
}
}
skhead=sk; // for palmaps
if (!skinfile[0]) return 0;
if (*texidx) return *texidx;

View file

@ -1280,7 +1280,7 @@ static int32_t LoadCacheOffsets(void)
while (!scriptfile_eof(script))
{
if (scriptfile_getstring(script, &fname)) break; // filename
if (scriptfile_getstring(script, &fname)) break; // hashed filename
if (scriptfile_getnumber(script, &foffset)) break; // offset in cache
if (scriptfile_getnumber(script, &fsize)) break; // size
@ -1886,7 +1886,7 @@ static int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicre
if (pic) Bfree(pic);
if (tsizx>>r_downsize <= tilesizx[dapic] || tsizy>>r_downsize <= tilesizy[dapic])
hicr->flags |= 17;
hicr->flags |= (16+1);
pth->picnum = dapic;
pth->effects = effect;

View file

@ -8163,7 +8163,7 @@ static int32_t S_DefineMusic(char *ID,char *name)
return 0;
}
static int32_t parsedefinitions_game(scriptfile *script, const int32_t preload);
static int32_t parsedefinitions_game(scriptfile *script, int32_t preload);
static void parsedefinitions_game_include(const char *fn, scriptfile *script, char *cmdtokptr, const int32_t preload)
{
@ -8190,7 +8190,7 @@ static void parsedefinitions_game_include(const char *fn, scriptfile *script, ch
}
}
static int32_t parsedefinitions_game(scriptfile *script, const int32_t preload)
static int32_t parsedefinitions_game(scriptfile *script, int32_t preload)
{
int32_t tokn;
char *cmdtokptr;