mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
CON structure member access readability cleanup
git-svn-id: https://svn.eduke32.com/eduke32@7169 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
17c63da906
commit
86496a8126
11 changed files with 951 additions and 890 deletions
|
@ -476,7 +476,7 @@ int32_t A_MoveSpriteClipdist(int32_t spriteNum, vec3_t const * const change, uin
|
|||
{
|
||||
// Handle potential stayput condition (map-provided or hard-coded).
|
||||
if (newSectnum < 0
|
||||
|| ((actor[spriteNum].actorstayput >= 0 && actor[spriteNum].actorstayput != newSectnum)
|
||||
|| ((actor[spriteNum].stayput >= 0 && actor[spriteNum].stayput != newSectnum)
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
|| (pSprite->picnum == BOSS2 && pSprite->pal == 0 && sector[newSectnum].lotag != ST_3)
|
||||
|| ((pSprite->picnum == BOSS1 || pSprite->picnum == BOSS2) && sector[newSectnum].lotag == ST_1_ABOVE_WATER)
|
||||
|
@ -6822,10 +6822,10 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
pSector->floorshade = pSprite->shade;
|
||||
|
||||
if (g_player[0].ps->one_parallax_sectnum >= 0)
|
||||
if (g_player[0].ps->parallax_sectnum >= 0)
|
||||
{
|
||||
pSector->ceilingpicnum = sector[g_player[0].ps->one_parallax_sectnum].ceilingpicnum;
|
||||
pSector->ceilingshade = sector[g_player[0].ps->one_parallax_sectnum].ceilingshade;
|
||||
pSector->ceilingpicnum = sector[g_player[0].ps->parallax_sectnum].ceilingpicnum;
|
||||
pSector->ceilingshade = sector[g_player[0].ps->parallax_sectnum].ceilingshade;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ typedef struct
|
|||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t actorstayput; // 2b
|
||||
int16_t stayput; // 2b
|
||||
|
||||
uint8_t cgg, lasttransport; // 2b
|
||||
// NOTE: 'dispicnum' is updated every frame, not in sync with game tics!
|
||||
|
@ -202,7 +202,7 @@ typedef struct
|
|||
vec2_t lastv; // 8b
|
||||
int16_t picnum, ang, extra, owner; // 8b
|
||||
int16_t movflag, tempang, timetosleep; // 6b
|
||||
int16_t actorstayput;
|
||||
int16_t stayput;
|
||||
|
||||
uint8_t cgg, lasttransport;
|
||||
|
||||
|
|
|
@ -1299,7 +1299,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1
|
|||
actor[i].ceilingz = actor[s_ow].ceilingz;
|
||||
}
|
||||
|
||||
actor[i].actorstayput = actor[i].extra = -1;
|
||||
actor[i].stayput = actor[i].extra = -1;
|
||||
#ifdef POLYMER
|
||||
actor[i].lightId = -1;
|
||||
#endif
|
||||
|
@ -1399,7 +1399,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
pActor->floorz = sector[pSprite->sectnum].floorz;
|
||||
pActor->ceilingz = sector[pSprite->sectnum].ceilingz;
|
||||
|
||||
pActor->actorstayput = pActor->extra = -1;
|
||||
pActor->stayput = pActor->extra = -1;
|
||||
|
||||
#ifdef POLYMER
|
||||
pActor->lightId = -1;
|
||||
|
@ -1501,7 +1501,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
A_Fall(newSprite);
|
||||
|
||||
if (A_CheckSpriteFlags(newSprite, SFLAG_BADGUYSTAYPUT))
|
||||
pActor->actorstayput = pSprite->sectnum;
|
||||
pActor->stayput = pSprite->sectnum;
|
||||
|
||||
g_player[myconnectindex].ps->max_actors_killed++;
|
||||
pSprite->clipdist = 80;
|
||||
|
@ -1973,7 +1973,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
|||
case PIGCOPDIVE__STATIC:
|
||||
case COMMANDERSTAYPUT__STATIC:
|
||||
case BOSS4STAYPUT__STATIC:
|
||||
pActor->actorstayput = pSprite->sectnum;
|
||||
pActor->stayput = pSprite->sectnum;
|
||||
fallthrough__;
|
||||
case BOSS1__STATIC:
|
||||
case BOSS2__STATIC:
|
||||
|
|
|
@ -873,7 +873,7 @@ const memberlabel_t ActorLabels[]=
|
|||
{ "htowner", ACTOR_HTOWNER, 0, 0 },
|
||||
{ "htmovflag", ACTOR_HTMOVFLAG, 0, 0 },
|
||||
{ "httempang", ACTOR_HTTEMPANG, 0, 0 },
|
||||
{ "htactorstayput", ACTOR_HTACTORSTAYPUT, 0, 0 },
|
||||
{ "htactorstayput", ACTOR_HTSTAYPUT, 0, 0 },
|
||||
{ "htdispicnum", ACTOR_HTDISPICNUM, 0, 0 },
|
||||
{ "httimetosleep", ACTOR_HTTIMETOSLEEP, 0, 0 },
|
||||
{ "htfloorz", ACTOR_HTFLOORZ, 0, 0 },
|
||||
|
@ -1020,7 +1020,7 @@ const memberlabel_t PlayerLabels[]=
|
|||
{ "somethingonplayer", PLAYER_SOMETHINGONPLAYER, 0, 0 },
|
||||
{ "on_crane", PLAYER_ON_CRANE, 0, 0 },
|
||||
{ "i", PLAYER_I, 0, 0 },
|
||||
{ "one_parallax_sectnum", PLAYER_ONE_PARALLAX_SECTNUM, 0, 0 },
|
||||
{ "one_parallax_sectnum", PLAYER_PARALLAX_SECTNUM, 0, 0 },
|
||||
{ "over_shoulder_on", PLAYER_OVER_SHOULDER_ON, 0, 0 },
|
||||
{ "random_club_frame", PLAYER_RANDOM_CLUB_FRAME, 0, 0 },
|
||||
{ "fist_incs", PLAYER_FIST_INCS, 0, 0 },
|
||||
|
@ -1035,7 +1035,7 @@ const memberlabel_t PlayerLabels[]=
|
|||
{ "customexitsound", PLAYER_CUSTOMEXITSOUND, 0, 0 },
|
||||
{ "weaprecs", PLAYER_WEAPRECS, LABEL_HASPARM2, MAX_WEAPONS },
|
||||
{ "weapreccnt", PLAYER_WEAPRECCNT, 0, 0 },
|
||||
{ "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE_FLAG, 0, 0 },
|
||||
{ "interface_toggle_flag", PLAYER_INTERFACE_TOGGLE, 0, 0 },
|
||||
{ "rotscrnang", PLAYER_ROTSCRNANG, 0, 0 },
|
||||
{ "dead_flag", PLAYER_DEAD_FLAG, 0, 0 },
|
||||
{ "show_empty_weapon", PLAYER_SHOW_EMPTY_WEAPON, 0, 0 },
|
||||
|
|
|
@ -335,7 +335,7 @@ enum PlayerLabel_t
|
|||
PLAYER_SOMETHINGONPLAYER,
|
||||
PLAYER_ON_CRANE,
|
||||
PLAYER_I,
|
||||
PLAYER_ONE_PARALLAX_SECTNUM,
|
||||
PLAYER_PARALLAX_SECTNUM,
|
||||
PLAYER_OVER_SHOULDER_ON,
|
||||
PLAYER_RANDOM_CLUB_FRAME,
|
||||
PLAYER_FIST_INCS,
|
||||
|
@ -350,7 +350,7 @@ enum PlayerLabel_t
|
|||
PLAYER_CUSTOMEXITSOUND,
|
||||
PLAYER_WEAPRECS,
|
||||
PLAYER_WEAPRECCNT,
|
||||
PLAYER_INTERFACE_TOGGLE_FLAG,
|
||||
PLAYER_INTERFACE_TOGGLE,
|
||||
PLAYER_ROTSCRNANG,
|
||||
PLAYER_DEAD_FLAG,
|
||||
PLAYER_SHOW_EMPTY_WEAPON,
|
||||
|
@ -697,7 +697,7 @@ enum ActorLabel_t
|
|||
ACTOR_HTOWNER,
|
||||
ACTOR_HTMOVFLAG,
|
||||
ACTOR_HTTEMPANG,
|
||||
ACTOR_HTACTORSTAYPUT,
|
||||
ACTOR_HTSTAYPUT,
|
||||
ACTOR_HTDISPICNUM,
|
||||
ACTOR_HTTIMETOSLEEP,
|
||||
ACTOR_HTFLOORZ,
|
||||
|
|
|
@ -1807,7 +1807,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
vm.pActor->timetosleep = SLEEPTIME;
|
||||
continue;
|
||||
|
||||
case CON_IFACTORNOTSTAYPUT: VM_CONDITIONAL(vm.pActor->actorstayput == -1); continue;
|
||||
case CON_IFACTORNOTSTAYPUT: VM_CONDITIONAL(vm.pActor->stayput == -1); continue;
|
||||
|
||||
case CON_IFCANSEE:
|
||||
{
|
||||
|
@ -2187,7 +2187,7 @@ GAMEEXEC_STATIC void VM_Execute(native_t loop)
|
|||
case CON_ADDKILLS:
|
||||
insptr++;
|
||||
P_AddKills(pPlayer, *insptr++);
|
||||
vm.pActor->actorstayput = -1;
|
||||
vm.pActor->stayput = -1;
|
||||
continue;
|
||||
|
||||
case CON_LOTSOFGLASS:
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1271,7 +1271,7 @@ void Net_CopyToNet(int32_t i, netactor_t *netactor)
|
|||
netactor->lastv.x = actor[i].lastv.x;
|
||||
netactor->lastv.y = actor[i].lastv.y;
|
||||
netactor->lasttransport = actor[i].lasttransport;
|
||||
netactor->actorstayput = actor[i].actorstayput;
|
||||
netactor->stayput = actor[i].stayput;
|
||||
netactor->cgg = actor[i].cgg;
|
||||
netactor->owner = actor[i].owner;
|
||||
|
||||
|
@ -1311,7 +1311,7 @@ void Net_CopyFromNet(int32_t i, netactor_t *netactor)
|
|||
actor[i].lastv.x = netactor->lastv.x;
|
||||
actor[i].lastv.y = netactor->lastv.y;
|
||||
actor[i].lasttransport = netactor->lasttransport;
|
||||
actor[i].actorstayput = netactor->actorstayput;
|
||||
actor[i].stayput = netactor->stayput;
|
||||
actor[i].cgg = netactor->cgg;
|
||||
actor[i].owner = netactor->owner;
|
||||
|
||||
|
@ -1339,7 +1339,7 @@ int32_t Net_ActorsAreDifferent(netactor_t *actor1, netactor_t *actor2)
|
|||
actor1->lastv.x != actor2->lastv.x ||
|
||||
actor1->lastv.y != actor2->lastv.y ||
|
||||
actor1->lasttransport != actor2->lasttransport ||
|
||||
actor1->actorstayput != actor2->actorstayput ||
|
||||
actor1->stayput != actor2->stayput ||
|
||||
//actor1->cgg != actor2->cgg ||
|
||||
|
||||
actor1->sprite.owner != actor2->sprite.owner ||
|
||||
|
|
|
@ -144,7 +144,7 @@ typedef struct {
|
|||
int32_t runspeed, max_player_health, max_shield_amount;
|
||||
int32_t autostep, autostep_sbw;
|
||||
|
||||
uint32_t interface_toggle_flag;
|
||||
uint32_t interface_toggle;
|
||||
#ifdef LUNATIC
|
||||
int32_t pipebombControl, pipebombLifetime, pipebombLifetimeVar;
|
||||
int32_t tripbombControl, tripbombLifetime, tripbombLifetimeVar;
|
||||
|
@ -164,7 +164,7 @@ typedef struct {
|
|||
int16_t newowner, jumping_counter, airleft;
|
||||
int16_t fta, ftq, access_wallnum, access_spritenum;
|
||||
int16_t got_access, weapon_ang, visibility;
|
||||
int16_t somethingonplayer, on_crane, i, one_parallax_sectnum;
|
||||
int16_t somethingonplayer, on_crane, i, parallax_sectnum;
|
||||
int16_t random_club_frame, one_eighty_count;
|
||||
int16_t dummyplayersprite, extra_extra8;
|
||||
int16_t actorsqu, timebeforeexit, customexitsound, last_pissed_time;
|
||||
|
|
|
@ -676,7 +676,7 @@ void P_ResetPlayer(int playerNum)
|
|||
actor[pPlayer->i].cgg = 0;
|
||||
actor[pPlayer->i].movflag = 0;
|
||||
actor[pPlayer->i].tempang = 0;
|
||||
actor[pPlayer->i].actorstayput = -1;
|
||||
actor[pPlayer->i].stayput = -1;
|
||||
actor[pPlayer->i].dispicnum = 0;
|
||||
actor[pPlayer->i].owner = pPlayer->i;
|
||||
actor[pPlayer->i].t_data[4] = 0;
|
||||
|
@ -854,14 +854,14 @@ static void resetprestat(int playerNum, int gameMode)
|
|||
? PWEAPON(playerNum, pPlayer->curr_weapon, TotalTime)
|
||||
: 0;
|
||||
|
||||
pPlayer->last_weapon = -1;
|
||||
pPlayer->weapreccnt = 0;
|
||||
pPlayer->interface_toggle_flag = 0;
|
||||
pPlayer->show_empty_weapon = 0;
|
||||
pPlayer->holster_weapon = 0;
|
||||
pPlayer->last_pissed_time = 0;
|
||||
pPlayer->one_parallax_sectnum = -1;
|
||||
pPlayer->visibility = ud.const_visibility;
|
||||
pPlayer->last_weapon = -1;
|
||||
pPlayer->weapreccnt = 0;
|
||||
pPlayer->interface_toggle = 0;
|
||||
pPlayer->show_empty_weapon = 0;
|
||||
pPlayer->holster_weapon = 0;
|
||||
pPlayer->last_pissed_time = 0;
|
||||
pPlayer->parallax_sectnum = -1;
|
||||
pPlayer->visibility = ud.const_visibility;
|
||||
|
||||
screenpeek = myconnectindex;
|
||||
g_animWallCnt = 0;
|
||||
|
@ -1002,8 +1002,8 @@ static void prelevel(char g)
|
|||
missedCloudSectors++;
|
||||
}
|
||||
|
||||
if (g_player[0].ps->one_parallax_sectnum == -1)
|
||||
g_player[0].ps->one_parallax_sectnum = i;
|
||||
if (g_player[0].ps->parallax_sectnum == -1)
|
||||
g_player[0].ps->parallax_sectnum = i;
|
||||
}
|
||||
|
||||
if (sector[i].lotag == 32767) //Found a secret room
|
||||
|
|
|
@ -2486,9 +2486,9 @@ void P_HandleSharedKeys(int playerNum)
|
|||
weaponNum = playerBits & ((15u<<SK_WEAPON_BITS)|BIT(SK_STEROIDS)|BIT(SK_NIGHTVISION)|BIT(SK_MEDKIT)|BIT(SK_QUICK_KICK)| \
|
||||
BIT(SK_HOLSTER)|BIT(SK_INV_LEFT)|BIT(SK_PAUSE)|BIT(SK_HOLODUKE)|BIT(SK_JETPACK)|BIT(SK_INV_RIGHT)| \
|
||||
BIT(SK_TURNAROUND)|BIT(SK_OPEN)|BIT(SK_INVENTORY)|BIT(SK_ESCAPE));
|
||||
playerBits = weaponNum & ~pPlayer->interface_toggle_flag;
|
||||
pPlayer->interface_toggle_flag |= playerBits | ((playerBits&0xf00)?0xf00:0);
|
||||
pPlayer->interface_toggle_flag &= weaponNum | ((weaponNum&0xf00)?0xf00:0);
|
||||
playerBits = weaponNum & ~pPlayer->interface_toggle;
|
||||
pPlayer->interface_toggle |= playerBits | ((playerBits&0xf00)?0xf00:0);
|
||||
pPlayer->interface_toggle &= weaponNum | ((weaponNum&0xf00)?0xf00:0);
|
||||
|
||||
if (playerBits && TEST_SYNC_KEY(playerBits, SK_MULTIFLAG) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue