Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 8475 → Rev 8474

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