Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 8474 → Rev 8475

/source/kenbuild/src/bstub.cpp
260,8 → 260,6
#endif
}
 
#define MAXVOXMIPS 5
extern intptr_t voxoff[][MAXVOXMIPS];
void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura, int32_t smoothr)
{
int i, *longptr;
275,19 → 273,28
 
for (i=0,tspr=&tsprite[0]; i<spritesortcnt; i++,tspr++)
{
if (usevoxels && tiletovox[tspr->picnum] >= 0)
if (usevoxels)
{
switch (tspr->picnum)
{
case PLAYER:
//tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
longptr = (int *)voxoff[tiletovox[PLAYER]][0];
if (voxid_PLAYER == -1)
break;
 
tspr->cstat |= 48;
tspr->picnum = voxid_PLAYER;
 
longptr = (int32_t *)voxoff[voxid_PLAYER][0];
tspr->xrepeat = scale(tspr->xrepeat,56,longptr[2]);
tspr->yrepeat = scale(tspr->yrepeat,56,longptr[2]);
tspr->shade -= 6;
break;
case BROWNMONSTER:
//tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
if (voxid_BROWNMONSTER == -1)
break;
 
tspr->cstat |= 48;
tspr->picnum = voxid_BROWNMONSTER;
break;
}
}
/source/kenbuild/src/common.cpp
79,10 → 79,12
paletteMakeLookupTable(18,tempbuf,32,32,192,1);
}
 
int32_t voxid_PLAYER = -1, voxid_BROWNMONSTER = -1;
 
void Ken_LoadVoxels()
{
if (!qloadkvx(nextvoxid,"voxel000.kvx"))
tiletovox[PLAYER] = nextvoxid++;
voxid_PLAYER = nextvoxid++;
if (!qloadkvx(nextvoxid,"voxel001.kvx"))
tiletovox[BROWNMONSTER] = nextvoxid++;
voxid_BROWNMONSTER = nextvoxid++;
}
/source/kenbuild/src/common_game.h
6,4 → 6,5
 
void Ken_PostStartupWindow(void);
 
extern int32_t voxid_PLAYER, voxid_BROWNMONSTER;
void Ken_LoadVoxels(void);
/source/kenbuild/src/game.cpp
1966,8 → 1966,6
}
}
 
#define MAXVOXMIPS 5
extern intptr_t voxoff[][MAXVOXMIPS];
void analyzesprites(int dax, int day)
{
int i, j=0, k, *intptr;
1979,7 → 1977,7
 
for (i=0,tspr=&tsprite[0]; i<spritesortcnt; i++,tspr++)
{
if (usevoxels && tiletovox[tspr->picnum] >= 0)
if (usevoxels)
switch (tspr->picnum)
{
case PLAYER:
2001,8 → 1999,13
 
if ((tspr->cstat&2) == 0)
{
//tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
intptr = (int *)voxoff[tiletovox[PLAYER]][0];
if (voxid_PLAYER == -1)
break;
 
tspr->cstat |= 48;
tspr->picnum = voxid_PLAYER;
 
intptr = (int32_t *)voxoff[voxid_PLAYER][0];
tspr->xrepeat = scale(tspr->xrepeat,56,intptr[2]);
tspr->yrepeat = scale(tspr->yrepeat,56,intptr[2]);
tspr->shade -= 6;
2009,7 → 2012,11
}
break;
case BROWNMONSTER:
//tspr->cstat |= 48; tspr->picnum = tiletovox[tspr->picnum];
if (voxid_BROWNMONSTER == -1)
break;
 
tspr->cstat |= 48;
tspr->picnum = voxid_BROWNMONSTER;
break;
}