mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Minor cleanup around security cameras / viewscreens. DONT_BUILD.
The only semantic change is that an out-of-sync instance of a distance to check (viewscreen sprite <-> player sprite) is changed in actors.c:G_MoveStandables(), from 2048 (as in Duke3D 1.5) to 8192, now represented by the define VIEWSCREEN_ACTIVE_DISTANCE. I have not yet observed any change in behavior regarding this change (but there ought to be one). Also, in DNCOORDS display, print 'totalclock' count, too. git-svn-id: https://svn.eduke32.com/eduke32@4831 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b4472f60d1
commit
8b7c10892c
7 changed files with 13 additions and 13 deletions
|
@ -2234,7 +2234,7 @@ DETONATE:
|
||||||
|
|
||||||
A_FindPlayer(s, &x);
|
A_FindPlayer(s, &x);
|
||||||
|
|
||||||
if (x < 2048)
|
if (x < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||||
{
|
{
|
||||||
if (SP == 1)
|
if (SP == 1)
|
||||||
g_curViewscreen = i;
|
g_curViewscreen = i;
|
||||||
|
|
|
@ -959,10 +959,7 @@ nextdemo_nomenu:
|
||||||
G_PrintGameQuotes(screenpeek);
|
G_PrintGameQuotes(screenpeek);
|
||||||
|
|
||||||
if (ud.last_camsprite != ud.camerasprite)
|
if (ud.last_camsprite != ud.camerasprite)
|
||||||
{
|
|
||||||
ud.last_camsprite = ud.camerasprite;
|
ud.last_camsprite = ud.camerasprite;
|
||||||
// ud.camera_time = totalclock+(TICRATE*2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VOLUMEONE)
|
if (VOLUMEONE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2526,7 +2526,7 @@ static void G_PrintCoords(int32_t snum)
|
||||||
y += 7;
|
y += 7;
|
||||||
Bsprintf(tempbuf,"THOLD= %d", ps->transporter_hold);
|
Bsprintf(tempbuf,"THOLD= %d", ps->transporter_hold);
|
||||||
printext256(x,y+54,31,-1,tempbuf,0);
|
printext256(x,y+54,31,-1,tempbuf,0);
|
||||||
Bsprintf(tempbuf,"GAMETIC= %d",g_moveThingsCount);
|
Bsprintf(tempbuf,"GAMETIC= %d, TOTALCLOCK=%d", g_moveThingsCount, totalclock);
|
||||||
printext256(x,y+63,31,-1,tempbuf,0);
|
printext256(x,y+63,31,-1,tempbuf,0);
|
||||||
#ifdef DEBUGGINGAIDS
|
#ifdef DEBUGGINGAIDS
|
||||||
Bsprintf(tempbuf,"NUMSPRITES= %d", Numsprites);
|
Bsprintf(tempbuf,"NUMSPRITES= %d", Numsprites);
|
||||||
|
@ -7435,7 +7435,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
||||||
t->xrepeat += 8;
|
t->xrepeat += 8;
|
||||||
t->yrepeat += 8;
|
t->yrepeat += 8;
|
||||||
}
|
}
|
||||||
else if (g_curViewscreen >= 0 && OW != i && display_mirror != 3 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200 )
|
else if (g_curViewscreen >= 0 && OW != i && display_mirror != 3 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200)
|
||||||
{
|
{
|
||||||
// this exposes a sprite sorting issue which needs to be debugged further...
|
// this exposes a sprite sorting issue which needs to be debugged further...
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -1626,8 +1626,10 @@ void G_ResetTimers(uint8_t keepgtics)
|
||||||
totalclock = cloudtotalclock = ototalclock = lockclock = 0;
|
totalclock = cloudtotalclock = ototalclock = lockclock = 0;
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
g_levelTextTime = 85;
|
g_levelTextTime = 85;
|
||||||
|
|
||||||
if (!keepgtics)
|
if (!keepgtics)
|
||||||
g_moveThingsCount = 0;
|
g_moveThingsCount = 0;
|
||||||
|
|
||||||
if (g_curViewscreen >= 0)
|
if (g_curViewscreen >= 0)
|
||||||
actor[g_curViewscreen].t_data[0] = 0;
|
actor[g_curViewscreen].t_data[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ void P_ResetPlayer(int32_t snum);
|
||||||
void P_ResetStatus(int32_t snum);
|
void P_ResetStatus(int32_t snum);
|
||||||
void P_ResetWeapons(int32_t snum);
|
void P_ResetWeapons(int32_t snum);
|
||||||
void G_ClearFIFO(void);
|
void G_ClearFIFO(void);
|
||||||
void G_SetupCamTile(int32_t i,int32_t wn);
|
|
||||||
void G_ResetInterpolations(void);
|
void G_ResetInterpolations(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -363,9 +363,9 @@ int32_t SetAnimation(int32_t animsect,int32_t *animptr, int32_t thegoal, int32_t
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
void G_SetupCamTile(int32_t i, int32_t wn)
|
static void G_SetupCamTile(int32_t i, int32_t wn)
|
||||||
{
|
{
|
||||||
int32_t const mir = display_mirror;
|
const int32_t mir = display_mirror;
|
||||||
//if (waloff[wn] == 0) loadtile(wn);
|
//if (waloff[wn] == 0) loadtile(wn);
|
||||||
setviewtotile(wn, tilesiz[wn].y, tilesiz[wn].x);
|
setviewtotile(wn, tilesiz[wn].y, tilesiz[wn].x);
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ void G_SetupCamTile(int32_t i, int32_t wn)
|
||||||
|
|
||||||
void G_AnimateCamSprite(void)
|
void G_AnimateCamSprite(void)
|
||||||
{
|
{
|
||||||
int32_t i = g_curViewscreen;
|
const int32_t i = g_curViewscreen;
|
||||||
|
|
||||||
#ifdef DEBUG_VALGRIND_NO_SMC
|
#ifdef DEBUG_VALGRIND_NO_SMC
|
||||||
return;
|
return;
|
||||||
|
@ -395,15 +395,15 @@ void G_AnimateCamSprite(void)
|
||||||
|
|
||||||
if (totalclock >= T1 + ud.camera_time)
|
if (totalclock >= T1 + ud.camera_time)
|
||||||
{
|
{
|
||||||
const DukePlayer_t *ps = g_player[screenpeek].ps;
|
const DukePlayer_t *const ps = g_player[screenpeek].ps;
|
||||||
|
|
||||||
if (ps->newowner >= 0)
|
if (ps->newowner >= 0)
|
||||||
OW = ps->newowner;
|
OW = ps->newowner;
|
||||||
|
|
||||||
if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < 8192)
|
if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||||
{
|
{
|
||||||
if (waloff[TILE_VIEWSCR] == 0)
|
if (waloff[TILE_VIEWSCR] == 0)
|
||||||
allocatepermanenttile(TILE_VIEWSCR,tilesiz[PN].x<<2,tilesiz[PN].y<<2);
|
allocatepermanenttile(TILE_VIEWSCR, tilesiz[PN].x<<2, tilesiz[PN].y<<2);
|
||||||
else
|
else
|
||||||
walock[TILE_VIEWSCR] = 255;
|
walock[TILE_VIEWSCR] = 255;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ extern "C" {
|
||||||
#define MAXANIMATES 256
|
#define MAXANIMATES 256
|
||||||
#define MAXANIMWALLS 512
|
#define MAXANIMWALLS 512
|
||||||
|
|
||||||
|
#define VIEWSCREEN_ACTIVE_DISTANCE 8192
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int16_t wallnum, tag;
|
int16_t wallnum, tag;
|
||||||
} animwalltype;
|
} animwalltype;
|
||||||
|
|
Loading…
Reference in a new issue