mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
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:
parent
a0d27ee702
commit
3095b09773
6 changed files with 21 additions and 53 deletions
|
@ -773,7 +773,6 @@ extern char **g_defModules;
|
||||||
extern int g_defModulesNum;
|
extern int g_defModulesNum;
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
// maps build tiles to particular animation frames of a model
|
// maps build tiles to particular animation frames of a model
|
||||||
|
@ -785,7 +784,7 @@ typedef struct
|
||||||
char pal;
|
char pal;
|
||||||
} tile2model_t;
|
} tile2model_t;
|
||||||
|
|
||||||
#define EXTRATILES MAXTILES
|
# define EXTRATILES MAXTILES
|
||||||
|
|
||||||
EXTERN int32_t mdinited;
|
EXTERN int32_t mdinited;
|
||||||
EXTERN tile2model_t tile2model[MAXTILES+EXTRATILES];
|
EXTERN tile2model_t tile2model[MAXTILES+EXTRATILES];
|
||||||
|
@ -795,7 +794,7 @@ static inline int32_t md_tilehasmodel(int32_t tilenume,int32_t pal)
|
||||||
if (!mdinited) return -1;
|
if (!mdinited) return -1;
|
||||||
return tile2model[Ptile2tile(tilenume,pal)].modelid;
|
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_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);
|
int32_t md_defineanimation(int32_t modelid, const char *framestart, const char *frameend, int32_t fps, int32_t flags);
|
||||||
|
|
|
@ -3,11 +3,7 @@
|
||||||
|
|
||||||
#include "hightile.h"
|
#include "hightile.h"
|
||||||
|
|
||||||
//#ifdef __POWERPC__
|
|
||||||
#define SHIFTMOD32(a) ((a)&31)
|
#define SHIFTMOD32(a) ((a)&31)
|
||||||
//#else
|
|
||||||
//#define SHIFTMOD32(a) (a)
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -206,22 +202,6 @@ typedef struct
|
||||||
int32_t is8bit;
|
int32_t is8bit;
|
||||||
} voxmodel_t;
|
} 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;
|
EXTERN mdmodel_t **models;
|
||||||
|
|
||||||
void updateanimation(md2model_t *m, spritetype *tspr);
|
void updateanimation(md2model_t *m, spritetype *tspr);
|
||||||
|
|
|
@ -4534,6 +4534,12 @@ static void drawalls(int32_t bunch)
|
||||||
#endif
|
#endif
|
||||||
if (nextsectnum >= 0)
|
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,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)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]);
|
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]))
|
if ((cz[2] < cz[0]) || (cz[3] < cz[1]) || (globalposz < cz[4]))
|
||||||
{
|
{
|
||||||
i = x2-x1+1;
|
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]))
|
if ((fz[2] > fz[0]) || (fz[3] > fz[1]) || (globalposz > fz[4]))
|
||||||
{
|
{
|
||||||
i = x2-x1+1;
|
i = x2-x1+1;
|
||||||
|
@ -7249,8 +7257,6 @@ static void initfastcolorlookup(int32_t rscale, int32_t gscale, int32_t bscale)
|
||||||
j += 129-(i<<1);
|
j += 129-(i<<1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//clearbufbyte(colhere,sizeof(colhere),0L);
|
|
||||||
//clearbufbyte(colhead,sizeof(colhead),0L);
|
|
||||||
Bmemset(colhere,0,sizeof(colhere));
|
Bmemset(colhere,0,sizeof(colhere));
|
||||||
Bmemset(colhead,0,sizeof(colhead));
|
Bmemset(colhead,0,sizeof(colhead));
|
||||||
|
|
||||||
|
@ -7855,13 +7861,9 @@ void uninitengine(void)
|
||||||
polymost_glreset();
|
polymost_glreset();
|
||||||
hicinit();
|
hicinit();
|
||||||
freeallmodels();
|
freeallmodels();
|
||||||
#ifdef POLYMER
|
# ifdef POLYMER
|
||||||
polymer_uninit();
|
polymer_uninit();
|
||||||
#endif
|
# endif
|
||||||
/* if (cachefilehandle > -1)
|
|
||||||
Bclose(cachefilehandle);
|
|
||||||
if (cacheindexptr != NULL)
|
|
||||||
Bfclose(cacheindexptr); */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (artfil != -1)
|
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
|
// 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!
|
// 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)
|
if (numbunches==0)
|
||||||
{
|
{
|
||||||
enddrawing(); //!!!
|
enddrawing(); //!!!
|
||||||
|
@ -13686,7 +13688,7 @@ void completemirror(void)
|
||||||
if (mirrorsx2 < mirrorsx1) return;
|
if (mirrorsx2 < mirrorsx1) return;
|
||||||
|
|
||||||
begindrawing();
|
begindrawing();
|
||||||
p = frameplace+ylookup[windowy1+mirrorsy1]+windowx1+mirrorsx1;
|
p = frameplace + ylookup[windowy1+mirrorsy1] + windowx1+mirrorsx1;
|
||||||
i = windowx2-windowx1-mirrorsx2-mirrorsx1; mirrorsx2 -= mirrorsx1;
|
i = windowx2-windowx1-mirrorsx2-mirrorsx1; mirrorsx2 -= mirrorsx1;
|
||||||
for (dy=mirrorsy2-mirrorsy1-1; dy>=0; dy--)
|
for (dy=mirrorsy2-mirrorsy1-1; dy>=0; dy--)
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,14 +227,6 @@ int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, i
|
||||||
return 0;
|
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)
|
static int32_t framename2index(mdmodel_t *vm, const char *nam)
|
||||||
{
|
{
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
|
@ -522,9 +514,6 @@ int32_t md_undefinemodel(int32_t modelid)
|
||||||
return 0;
|
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)
|
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;
|
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;
|
int32_t startticks, willprint=0;
|
||||||
|
|
||||||
modelhead=m; // for palmaps
|
|
||||||
|
|
||||||
if (m->mdnum == 2) surf = 0;
|
if (m->mdnum == 2) surf = 0;
|
||||||
|
|
||||||
if ((unsigned)pal >= (unsigned)MAXPALOOKUPS) return 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);
|
//OSD_Printf("Using MD2/MD3 skin (%d) %s, pal=%d\n",number,skinfile,pal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
skhead=sk; // for palmaps
|
|
||||||
if (!skinfile[0]) return 0;
|
if (!skinfile[0]) return 0;
|
||||||
|
|
||||||
if (*texidx) return *texidx;
|
if (*texidx) return *texidx;
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ static int32_t LoadCacheOffsets(void)
|
||||||
|
|
||||||
while (!scriptfile_eof(script))
|
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, &foffset)) break; // offset in cache
|
||||||
if (scriptfile_getnumber(script, &fsize)) break; // size
|
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 (pic) Bfree(pic);
|
||||||
|
|
||||||
if (tsizx>>r_downsize <= tilesizx[dapic] || tsizy>>r_downsize <= tilesizy[dapic])
|
if (tsizx>>r_downsize <= tilesizx[dapic] || tsizy>>r_downsize <= tilesizy[dapic])
|
||||||
hicr->flags |= 17;
|
hicr->flags |= (16+1);
|
||||||
|
|
||||||
pth->picnum = dapic;
|
pth->picnum = dapic;
|
||||||
pth->effects = effect;
|
pth->effects = effect;
|
||||||
|
@ -1908,7 +1908,7 @@ static int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicre
|
||||||
if (xsiz == pow2long[j]) { x |= 1; }
|
if (xsiz == pow2long[j]) { x |= 1; }
|
||||||
if (ysiz == pow2long[j]) { x |= 2; }
|
if (ysiz == pow2long[j]) { x |= 2; }
|
||||||
}
|
}
|
||||||
cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags & 16?8:0); // handle nocompress
|
cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags&16 ? 8 : 0); // handle nocompress
|
||||||
/// OSD_Printf("Caching \"%s\"\n", fn);
|
/// OSD_Printf("Caching \"%s\"\n", fn);
|
||||||
writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead);
|
writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead);
|
||||||
|
|
||||||
|
|
|
@ -8116,7 +8116,7 @@ static int32_t S_DefineSound(int32_t ID,char *name)
|
||||||
{
|
{
|
||||||
if (ID >= MAXSOUNDS)
|
if (ID >= MAXSOUNDS)
|
||||||
return 1;
|
return 1;
|
||||||
g_sounds[ID].filename1 =S_OggifyFilename(g_sounds[ID].filename1,name,g_sounds[ID].filename);
|
g_sounds[ID].filename1 = S_OggifyFilename(g_sounds[ID].filename1,name,g_sounds[ID].filename);
|
||||||
// initprintf("(%s)(%s)(%s)\n",g_sounds[ID].filename1,name,g_sounds[ID].filename);
|
// initprintf("(%s)(%s)(%s)\n",g_sounds[ID].filename1,name,g_sounds[ID].filename);
|
||||||
// S_LoadSound(ID);
|
// S_LoadSound(ID);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -8163,7 +8163,7 @@ static int32_t S_DefineMusic(char *ID,char *name)
|
||||||
return 0;
|
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)
|
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;
|
int32_t tokn;
|
||||||
char *cmdtokptr;
|
char *cmdtokptr;
|
||||||
|
|
Loading…
Reference in a new issue