mirror of https://github.com/pmret/papermario.git
PR comments
This commit is contained in:
parent
c5fda39fce
commit
bfe3694532
|
|
@ -1198,11 +1198,17 @@ typedef struct Zone {
|
|||
/* 0x28 */ s32 flag;
|
||||
} Zone; // size = 0x2C
|
||||
|
||||
typedef struct ActorMovePos {
|
||||
/* 0x00 */ Vec3f current;
|
||||
/* 0x0C */ Vec3f goal;
|
||||
/* 0x18 */ Vec3f end;
|
||||
} ActorMovePos; // size = 0x20;
|
||||
|
||||
typedef struct Actor {
|
||||
/* 0x000 */ s32 flags;
|
||||
/* 0x004 */ char unk_04[4];
|
||||
/* 0x008 */ struct StaticActorData* staticActorData;
|
||||
/* 0x00C */ Vec3f movePos[3]; // current, goal, end
|
||||
/* 0x00C */ ActorMovePos movePos;
|
||||
/* 0x030 */ char unk_30[24];
|
||||
/* 0x048 */ f32 jumpAccel;
|
||||
/* 0x04C */ f32 moveSpeed;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ void get_dpad_input_radial(f32* angle, f32* magnitude) {
|
|||
f32 stickX;
|
||||
f32 stickY;
|
||||
f32 mag;
|
||||
f32 sixty = 60.0f;
|
||||
f32 maxMagnitude = 60.0f;
|
||||
|
||||
stickX = battleStatus->stickX;
|
||||
stickY = battleStatus->stickY;
|
||||
|
|
@ -16,22 +16,22 @@ void get_dpad_input_radial(f32* angle, f32* magnitude) {
|
|||
stickY = 0.0f;
|
||||
stickX = 0.0f;
|
||||
if (currentButtonsDown & 0x800) {
|
||||
stickY = sixty;
|
||||
stickY = maxMagnitude;
|
||||
}
|
||||
if (currentButtonsDown & 0x400) {
|
||||
stickY = -sixty;
|
||||
stickY = -maxMagnitude;
|
||||
}
|
||||
if (currentButtonsDown & 0x200) {
|
||||
stickX = -sixty;
|
||||
stickX = -maxMagnitude;
|
||||
}
|
||||
if (currentButtonsDown & 0x100) {
|
||||
stickX = sixty;
|
||||
stickX = maxMagnitude;
|
||||
}
|
||||
}
|
||||
|
||||
mag = dist2D(0.0f, 0.0f, stickX, -stickY);
|
||||
if (mag >= sixty) {
|
||||
mag = sixty;
|
||||
if (mag >= maxMagnitude) {
|
||||
mag = maxMagnitude;
|
||||
}
|
||||
|
||||
*angle = atan2(0.0f, 0.0f, stickX, -stickY);
|
||||
|
|
@ -79,10 +79,10 @@ INCLUDE_ASM(s32, "code_16c8e0", func_80240AA8);
|
|||
INCLUDE_ASM(s32, "code_16c8e0", delete_actor);
|
||||
|
||||
void delete_player_actor(Actor* player) {
|
||||
s32 i;
|
||||
struct ActorPart* partsTable;
|
||||
struct ActorPartMovement* movement;
|
||||
struct DecorationTable* decorationTable;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
remove_actor_decoration(player, i);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
HitResult calc_item_check_hit(void) {
|
||||
BattleStatus* battleStatus = BATTLE_STATUS;
|
||||
f32* pos = &battleStatus->playerActor->movePos;
|
||||
ActorMovePos* movePos = &battleStatus->playerActor->movePos;
|
||||
s32 actorID = battleStatus->currentTargetID;
|
||||
s8 currentTargetPartS8;
|
||||
u32 currentTargetPart;
|
||||
|
|
@ -23,11 +23,11 @@ HitResult calc_item_check_hit(void) {
|
|||
return HitResult_MISS;
|
||||
}
|
||||
if (actor->stoneStatus == 0xC) {
|
||||
play_sound_at_position(0x10C, 0, pos[3], pos[4], pos[5]);
|
||||
play_sound_at_position(0x10C, 0, movePos->goal.x, movePos->goal.y, movePos->goal.z);
|
||||
return HitResult_IMMUNE;
|
||||
}
|
||||
if ((battleStatus->currentAttackElement & 0x80) && (actorPart->eventFlags & 0x10)) {
|
||||
play_sound_at_position(0xE9, 0, pos[3], pos[4], pos[5]);
|
||||
play_sound_at_position(0xE9, 0, movePos->goal.x, movePos->goal.y, movePos->goal.z);
|
||||
return HitResult_LANDED_ON_SPIKE;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ s32 get_nearest_home_index(f32 x, f32 y, f32 z) {
|
|||
}
|
||||
}
|
||||
|
||||
return yVal | (xVal * 4);
|
||||
return yVal | (xVal << 2);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(void, "code_197F40", set_goal_pos_to_part, f32* goalPos, ActorId target, s32 partIndex);
|
||||
|
|
@ -87,9 +87,9 @@ ApiStatus SetGoalToHome(ScriptInstance* script, s32 isInitialCall) {
|
|||
}
|
||||
|
||||
actor = get_actor(actorID);
|
||||
actor->movePos[1].x = actor->homePos.x;
|
||||
actor->movePos[1].y = actor->homePos.y;
|
||||
actor->movePos[1].z = actor->homePos.z;
|
||||
actor->movePos.goal.x = actor->homePos.x;
|
||||
actor->movePos.goal.y = actor->homePos.y;
|
||||
actor->movePos.goal.z = actor->homePos.z;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ s32 func_80276F50(Actor* actor) {
|
|||
partIt = partIt->nextPart;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue