mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-08 13:26:14 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user