- Duke: Replace player_struct loogiex[64] with loogie[64].X calls.

This commit is contained in:
Mitchell Richters 2021-12-30 22:45:53 +11:00
parent 2d6bc783c4
commit e196a4daa3
8 changed files with 10 additions and 10 deletions

View file

@ -1527,7 +1527,7 @@ static bool weaponhitsprite(DDukeActor* proj, DDukeActor *targ, bool fireball)
ps[p].loogcnt = 24 * 4; ps[p].loogcnt = 24 * 4;
for (int x = 0; x < j; x++) for (int x = 0; x < j; x++)
{ {
ps[p].loogiex[x] = krand() % 320; ps[p].loogie[x].X = krand() % 320;
ps[p].loogiey[x] = krand() % 200; ps[p].loogiey[x] = krand() % 200;
} }
} }

View file

@ -1172,7 +1172,7 @@ static bool weaponhitsprite(DDukeActor *proj, DDukeActor *targ, const vec3_t &ol
ps[p].loogcnt = 24 * 4; ps[p].loogcnt = 24 * 4;
for (int x = 0; x < j; x++) for (int x = 0; x < j; x++)
{ {
ps[p].loogiex[x] = krand() % 320; ps[p].loogie[x].X = krand() % 320;
ps[p].loogiey[x] = krand() % 200; ps[p].loogiey[x] = krand() % 200;
} }
} }

View file

@ -306,8 +306,8 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
break; break;
case PLAYER_LOOGIEX: case PLAYER_LOOGIEX:
if (bSet) ps[iPlayer].loogiex[lParm2] = lValue; if (bSet) ps[iPlayer].loogie[lParm2].X = lValue;
else SetGameVarID(lVar2, ps[iPlayer].loogiex[lParm2], sActor, sPlayer); else SetGameVarID(lVar2, ps[iPlayer].loogie[lParm2].X, sActor, sPlayer);
break; break;
case PLAYER_LOOGIEY: case PLAYER_LOOGIEY:

View file

@ -76,7 +76,7 @@ void displayloogie(player_struct* p)
z = 4096 + ((p->loogcnt + i) << 9); z = 4096 + ((p->loogcnt + i) << 9);
x = -getavel(p->GetPlayerNum()) + bsinf((p->loogcnt + i) << 6, -10); x = -getavel(p->GetPlayerNum()) + bsinf((p->loogcnt + i) << 6, -10);
hud_drawsprite((p->loogiex[i] + x), (200 + p->loogiey[i] - y), z - (i << 8), 256 - a, LOOGIE, 0, 0, 2); hud_drawsprite((p->loogie[i].X + x), (200 + p->loogiey[i] - y), z - (i << 8), 256 - a, LOOGIE, 0, 0, 2);
} }
} }

View file

@ -1074,7 +1074,7 @@ DEFINE_FIELD_X(DukePlayer, player_struct, ohard_landing)
DEFINE_FIELD_X(DukePlayer, player_struct, psectlotag) DEFINE_FIELD_X(DukePlayer, player_struct, psectlotag)
//DEFINE_FIELD_X(DukePlayer, player_struct, exitx) //DEFINE_FIELD_X(DukePlayer, player_struct, exitx)
//DEFINE_FIELD_X(DukePlayer, player_struct, exity) //DEFINE_FIELD_X(DukePlayer, player_struct, exity)
DEFINE_FIELD_X(DukePlayer, player_struct, loogiex) //DEFINE_FIELD_X(DukePlayer, player_struct, loogiex)
DEFINE_FIELD_X(DukePlayer, player_struct, loogiey) DEFINE_FIELD_X(DukePlayer, player_struct, loogiey)
DEFINE_FIELD_X(DukePlayer, player_struct, numloogs) DEFINE_FIELD_X(DukePlayer, player_struct, numloogs)
DEFINE_FIELD_X(DukePlayer, player_struct, loogcnt) DEFINE_FIELD_X(DukePlayer, player_struct, loogcnt)

View file

@ -120,7 +120,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
("exity", w.exit.Y) ("exity", w.exit.Y)
("numloogs", w.numloogs) ("numloogs", w.numloogs)
("loogcnt", w.loogcnt) ("loogcnt", w.loogcnt)
.Array("loogiex", w.loogiex, w.numloogs) .Array("loogie", w.loogie, w.numloogs)
.Array("loogiey", w.loogiey, w.numloogs) .Array("loogiey", w.loogiey, w.numloogs)
("bobposx", w.bobposx) ("bobposx", w.bobposx)
("bobposy", w.bobposy) ("bobposy", w.bobposy)

View file

@ -187,7 +187,7 @@ struct player_struct
PalEntry pals; PalEntry pals;
// this was a global variable originally. // this was a global variable originally.
vec2_t fric, exit; vec2_t fric, exit, loogie[64];
// weapon drawer variables and their interpolation counterparts. // weapon drawer variables and their interpolation counterparts.
int weapon_sway; int weapon_sway;
@ -201,7 +201,7 @@ struct player_struct
short psectlotag; short psectlotag;
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed. // From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
int loogiex[64], loogiey[64], numloogs, loogcnt; int loogiey[64], numloogs, loogcnt;
int invdisptime; int invdisptime;
int bobposx, bobposy, pyoff, opyoff; int bobposx, bobposy, pyoff, opyoff;
int last_pissed_time, truefz, truecz; int last_pissed_time, truefz, truecz;

View file

@ -150,7 +150,7 @@ struct DukePlayer
native int16 psectlotag; native int16 psectlotag;
// From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed. // From here on it is unaltered from JFDuke with the exception of a few fields that are no longer needed and were removed.
native int loogiex[64], loogiey[64], numloogs, loogcnt; native int loogiey[64], numloogs, loogcnt;
native int invdisptime; native int invdisptime;
native int bobposx, bobposy, pyoff, opyoff; native int bobposx, bobposy, pyoff, opyoff;
native int last_pissed_time, truefz, truecz; native int last_pissed_time, truefz, truecz;