mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
Rename 'camsprite' to 'g_curViewscreen', other related cleanup.
git-svn-id: https://svn.eduke32.com/eduke32@4220 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d3665719d9
commit
d26ae58627
7 changed files with 23 additions and 17 deletions
|
@ -2244,11 +2244,11 @@ DETONATE:
|
||||||
if (x < 2048)
|
if (x < 2048)
|
||||||
{
|
{
|
||||||
if (SP == 1)
|
if (SP == 1)
|
||||||
camsprite = i;
|
g_curViewscreen = i;
|
||||||
}
|
}
|
||||||
else if (camsprite != -1 && T1 == 1)
|
else if (g_curViewscreen != -1 && T1 == 1)
|
||||||
{
|
{
|
||||||
camsprite = -1;
|
g_curViewscreen = -1;
|
||||||
T1 = 0;
|
T1 = 0;
|
||||||
//loadtile(s->picnum);
|
//loadtile(s->picnum);
|
||||||
//invalidatetile(s->picnum,-1,255);
|
//invalidatetile(s->picnum,-1,255);
|
||||||
|
|
|
@ -7339,14 +7339,14 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
||||||
continue;
|
continue;
|
||||||
case VIEWSCREEN__STATIC:
|
case VIEWSCREEN__STATIC:
|
||||||
case VIEWSCREEN2__STATIC:
|
case VIEWSCREEN2__STATIC:
|
||||||
if (camsprite >= 0 && actor[OW].t_data[0] == 1)
|
if (g_curViewscreen >= 0 && actor[OW].t_data[0] == 1)
|
||||||
{
|
{
|
||||||
t->picnum = STATIC;
|
t->picnum = STATIC;
|
||||||
t->cstat |= (rand()&12);
|
t->cstat |= (rand()&12);
|
||||||
t->xrepeat += 8;
|
t->xrepeat += 8;
|
||||||
t->yrepeat += 8;
|
t->yrepeat += 8;
|
||||||
}
|
}
|
||||||
else if (camsprite >= 0 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200)
|
else if (g_curViewscreen >= 0 && waloff[TILE_VIEWSCR] && walock[TILE_VIEWSCR] > 200)
|
||||||
{
|
{
|
||||||
t->picnum = TILE_VIEWSCR;
|
t->picnum = TILE_VIEWSCR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ G_EXTERN input_t loc;
|
||||||
G_EXTERN input_t recsync[RECSYNCBUFSIZ];
|
G_EXTERN input_t recsync[RECSYNCBUFSIZ];
|
||||||
G_EXTERN int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos;
|
G_EXTERN int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos;
|
||||||
G_EXTERN int16_t animatesect[MAXANIMATES];
|
G_EXTERN int16_t animatesect[MAXANIMATES];
|
||||||
G_EXTERN int16_t camsprite;
|
G_EXTERN int16_t g_curViewscreen;
|
||||||
G_EXTERN int16_t cyclers[MAXCYCLERS][6],g_numCyclers;
|
G_EXTERN int16_t cyclers[MAXCYCLERS][6],g_numCyclers;
|
||||||
G_EXTERN int16_t g_globalRandom;
|
G_EXTERN int16_t g_globalRandom;
|
||||||
G_EXTERN int16_t g_mirrorWall[64],g_mirrorSector[64],g_mirrorCount;
|
G_EXTERN int16_t g_mirrorWall[64],g_mirrorSector[64],g_mirrorCount;
|
||||||
|
|
|
@ -606,11 +606,14 @@ gameevent
|
||||||
{
|
{
|
||||||
"DISPLAYROOMS",
|
"DISPLAYROOMS",
|
||||||
|
|
||||||
function()
|
function(aci, pli)
|
||||||
|
local ps = player[pli]
|
||||||
local cam = gv.cam
|
local cam = gv.cam
|
||||||
cam.pos.z = cam.pos.z + 64*16*math.sin(gv.totalclock/30)
|
|
||||||
|
|
||||||
local ps = player[0]
|
if (ps.newowner < 0) then
|
||||||
|
cam.pos.z = cam.pos.z + 64*16*math.sin(gv.totalclock/30)
|
||||||
|
end
|
||||||
|
|
||||||
if (ps.cursectnum >= 0) then
|
if (ps.cursectnum >= 0) then
|
||||||
local hit = sector[ps.cursectnum]:zrangeat(cam.pos)
|
local hit = sector[ps.cursectnum]:zrangeat(cam.pos)
|
||||||
if (gv.totalclock%200==0) then
|
if (gv.totalclock%200==0) then
|
||||||
|
|
|
@ -936,7 +936,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
||||||
ud.camerasprite =-1;
|
ud.camerasprite =-1;
|
||||||
ud.eog = 0;
|
ud.eog = 0;
|
||||||
tempwallptr = 0;
|
tempwallptr = 0;
|
||||||
camsprite =-1;
|
g_curViewscreen =-1;
|
||||||
g_earthquakeTime = 0;
|
g_earthquakeTime = 0;
|
||||||
|
|
||||||
g_numInterpolations = 0;
|
g_numInterpolations = 0;
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ static const dataspec_t svgm_anmisc[] =
|
||||||
{ DS_SAVEFN, (void *)&sv_preanimateptrsave, 0, 1 },
|
{ DS_SAVEFN, (void *)&sv_preanimateptrsave, 0, 1 },
|
||||||
{ 0, &animateptr[0], sizeof(animateptr[0]), MAXANIMATES },
|
{ 0, &animateptr[0], sizeof(animateptr[0]), MAXANIMATES },
|
||||||
{ DS_SAVEFN|DS_LOADFN , (void *)&sv_postanimateptr, 0, 1 },
|
{ DS_SAVEFN|DS_LOADFN , (void *)&sv_postanimateptr, 0, 1 },
|
||||||
{ 0, &camsprite, sizeof(camsprite), 1 },
|
{ 0, &g_curViewscreen, sizeof(g_curViewscreen), 1 },
|
||||||
{ 0, &msx[0], sizeof(msx[0]), sizeof(msx)/sizeof(msx[0]) },
|
{ 0, &msx[0], sizeof(msx[0]), sizeof(msx)/sizeof(msx[0]) },
|
||||||
{ 0, &msy[0], sizeof(msy[0]), sizeof(msy)/sizeof(msy[0]) },
|
{ 0, &msy[0], sizeof(msy[0]), sizeof(msy)/sizeof(msy[0]) },
|
||||||
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
||||||
|
|
|
@ -345,25 +345,28 @@ int32_t SetAnimation(int32_t animsect,int32_t *animptr, int32_t thegoal, int32_t
|
||||||
|
|
||||||
void G_AnimateCamSprite(void)
|
void G_AnimateCamSprite(void)
|
||||||
{
|
{
|
||||||
int32_t i = camsprite;
|
int32_t i = g_curViewscreen;
|
||||||
|
|
||||||
#ifdef DEBUG_VALGRIND_NO_SMC
|
#ifdef DEBUG_VALGRIND_NO_SMC
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if (camsprite < 0)
|
if (g_curViewscreen < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (T1 >= 4)
|
if (T1 >= 4)
|
||||||
{
|
{
|
||||||
|
const DukePlayer_t *ps = g_player[screenpeek].ps;
|
||||||
T1 = 0;
|
T1 = 0;
|
||||||
|
|
||||||
if (g_player[screenpeek].ps->newowner >= 0)
|
if (ps->newowner >= 0)
|
||||||
OW = g_player[screenpeek].ps->newowner;
|
OW = ps->newowner;
|
||||||
else if (OW >= 0 && dist(&sprite[g_player[screenpeek].ps->i],&sprite[i]) < 8192)
|
else if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < 8192)
|
||||||
{
|
{
|
||||||
if (waloff[TILE_VIEWSCR] == 0)
|
if (waloff[TILE_VIEWSCR] == 0)
|
||||||
allocatepermanenttile(TILE_VIEWSCR,tilesizx[PN],tilesizy[PN]);
|
allocatepermanenttile(TILE_VIEWSCR,tilesizx[PN],tilesizy[PN]);
|
||||||
else walock[TILE_VIEWSCR] = 255;
|
else
|
||||||
|
walock[TILE_VIEWSCR] = 255;
|
||||||
|
|
||||||
G_SetupCamTile(OW, TILE_VIEWSCR);
|
G_SetupCamTile(OW, TILE_VIEWSCR);
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
// HACK: force texture update on viewscreen sprite in Polymer!
|
// HACK: force texture update on viewscreen sprite in Polymer!
|
||||||
|
|
Loading…
Reference in a new issue