diff options
| author | EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> | 2021-07-02 04:15:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-01 23:15:26 -0400 |
| commit | e57fb5780d488786895e6cb0c6e872255986d045 (patch) | |
| tree | 470e56275967f777dcdfdf1512cfc18ac33dd1c8 /src/code | |
| parent | abef65a6dba505cf07dbc59360af644092877a1a (diff) | |
z64player.h and Player struct work (#195)
* Rename Player, name some of its struct vars,
add collision flag macros to actors missing them
* Name Player_GetMask/RemoveMask, add a few macros
* Format
* Update include/functions.h
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
* Fix unk_14B in a non-matching
Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/code_0x800CAAD0.c | 2 | ||||
| -rw-r--r-- | src/code/code_0x800E8EA0.c | 9 | ||||
| -rw-r--r-- | src/code/z_effect_soft_sprite_old_init.c | 4 | ||||
| -rw-r--r-- | src/code/z_en_item00.c | 8 | ||||
| -rw-r--r-- | src/code/z_snap.c | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/code/code_0x800CAAD0.c b/src/code/code_0x800CAAD0.c index 0db62aca0..9c28f81f0 100644 --- a/src/code/code_0x800CAAD0.c +++ b/src/code/code_0x800CAAD0.c @@ -50,7 +50,7 @@ void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* a angleChange = colCtx->dyna.bgActors[index].curTransform.rot.y - colCtx->dyna.bgActors[index].prevTransform.rot.y; if (actor->id == 0) { - ((ActorPlayer*)actor)->unkAD4 += angleChange; + ((Player*)actor)->currentYaw += angleChange; } actor->shape.rot.y += angleChange; diff --git a/src/code/code_0x800E8EA0.c b/src/code/code_0x800E8EA0.c index 9f6e86c3a..145701240 100644 --- a/src/code/code_0x800E8EA0.c +++ b/src/code/code_0x800E8EA0.c @@ -55,7 +55,7 @@ s32 func_800E8FA4(Actor* actor, Vec3f* param_2, Vec3s* param_3, Vec3s* param_4) } s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, f32 param_5) { - ActorPlayer* player = PLAYER; + Player* player = PLAYER; s16 sVar3; Vec3f local_14; @@ -74,15 +74,16 @@ s32 func_800E9138(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) { local_14 = globalCtx->view.eye; } else { - local_14 = player->base.focus.pos; + local_14 = player->actor.focus.pos; } func_800E8FA4(actor, &local_14, param_3, param_4); return 1; } + s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* param_4, Vec3f param_5) { - ActorPlayer* player = PLAYER; + Player* player = PLAYER; s16 sVar3; Vec3f local_14; @@ -100,7 +101,7 @@ s32 func_800E9250(GlobalContext* globalCtx, Actor* actor, Vec3s* param_3, Vec3s* if (((globalCtx->csCtx).state != 0) || (D_801D0D50 != 0)) { local_14 = globalCtx->view.eye; } else { - local_14 = player->base.focus.pos; + local_14 = player->actor.focus.pos; } func_800E8FA4(actor, &local_14, param_3, param_4); diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index 69e9fd9ec..9c64de42e 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -875,9 +875,9 @@ void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, Actor* actor, Vec3f* #endif void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity) { - ActorPlayer* player = PLAYER; + Player* player = PLAYER; - EffectSsFireTail_SpawnFlame(globalCtx, &player->base, &player->bodyPartsPos[bodyPart], scale, bodyPart, + EffectSsFireTail_SpawnFlame(globalCtx, &player->actor, &player->bodyPartsPos[bodyPart], scale, bodyPart, colorIntensity); } diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index b0c0eda13..8d67625a9 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -404,7 +404,7 @@ void func_800A6780(EnItem00* this, GlobalContext* globalCtx) { } void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) { - ActorPlayer* player = PLAYER; + Player* player = PLAYER; if (this->unk14A != 0) { if (Actor_HasParent(&this->actor, globalCtx) == 0) { @@ -420,7 +420,7 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) { return; } - this->actor.world.pos = player->base.world.pos; + this->actor.world.pos = player->actor.world.pos; if (this->actor.params <= ITEM00_RUPEE_RED) { this->actor.shape.rot.y = this->actor.shape.rot.y + 960; @@ -440,8 +440,8 @@ void func_800A6A40(EnItem00* this, GlobalContext* globalCtx) { void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { EnItem00* this = THIS; s32 pad; - ActorPlayer* player = PLAYER; - s32 sp38 = player->unkA74 & 0x1000; + Player* player = PLAYER; + s32 sp38 = player->stateFlags3 & 0x1000; s32 getItemId = GI_NONE; s32 pad2; diff --git a/src/code/z_snap.c b/src/code/z_snap.c index cae6f3e16..aea74db3e 100644 --- a/src/code/z_snap.c +++ b/src/code/z_snap.c @@ -149,7 +149,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, } actors[0] = actor; - actors[1] = &PLAYER->base; + actors[1] = &PLAYER->actor; if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colCheckCtx, pos, &camera->eye, actors, 2) != 0) { func_8013A41C(0x3b); ret |= 0x3b; |
