mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
more fields and name consistency (#603)
* npc fields * npc and actor naming * missing hit sounds + naming consistenct * added partner syms and player spin struct * requested changes * organized Vec structs Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
parent
4657f3621b
commit
acf6b92313
@ -31,29 +31,12 @@ typedef struct Vec2bu {
|
||||
/* 0x01 */ u8 y;
|
||||
} Vec2bu; // size = 0x02
|
||||
|
||||
typedef struct Vec2f {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
} Vec2f; // size = 0x08
|
||||
|
||||
typedef struct Vec3b {
|
||||
/* 0x00 */ s8 x;
|
||||
/* 0x01 */ s8 y;
|
||||
/* 0x02 */ s8 z;
|
||||
} Vec3b; // size = 0x03
|
||||
|
||||
typedef struct Vec3f {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
/* 0x08 */ f32 z;
|
||||
} Vec3f; // size = 0x0C
|
||||
|
||||
typedef struct Vec3i {
|
||||
/* 0x00 */ s32 x;
|
||||
/* 0x04 */ s32 y;
|
||||
/* 0x08 */ s32 z;
|
||||
} Vec3i; // size = 0x0C
|
||||
|
||||
typedef struct Vec2s {
|
||||
/* 0x00 */ s16 x;
|
||||
/* 0x02 */ s16 y;
|
||||
@ -70,6 +53,28 @@ typedef struct Vec3s {
|
||||
/* 0x04 */ s16 z;
|
||||
} Vec3s; // size = 0x06
|
||||
|
||||
typedef struct Vec2i {
|
||||
/* 0x00 */ s32 x;
|
||||
/* 0x04 */ s32 y;
|
||||
} Vec2i; // size = 0x08
|
||||
|
||||
typedef struct Vec3i {
|
||||
/* 0x00 */ s32 x;
|
||||
/* 0x04 */ s32 y;
|
||||
/* 0x08 */ s32 z;
|
||||
} Vec3i; // size = 0x0C
|
||||
|
||||
typedef struct Vec2f {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
} Vec2f; // size = 0x08
|
||||
|
||||
typedef struct Vec3f {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
/* 0x08 */ f32 z;
|
||||
} Vec3f; // size = 0x0C
|
||||
|
||||
typedef struct Vec4f {
|
||||
/* 0x00 */ f32 x;
|
||||
/* 0x04 */ f32 y;
|
||||
@ -150,9 +155,9 @@ typedef struct Npc {
|
||||
/* 0x06C */ Vec3f colliderPos; /* used during collision with player */
|
||||
/* 0x078 */ s32 shadowIndex;
|
||||
/* 0x07C */ f32 shadowScale;
|
||||
/* 0x080 */ s32 unk_80;
|
||||
/* 0x084 */ s16 unk_84;
|
||||
/* 0x086 */ s16 unk_86;
|
||||
/* 0x080 */ s32 collisionChannel; /* flags used with collision tracing */
|
||||
/* 0x084 */ s16 currentFloor; /* colliderID */
|
||||
/* 0x086 */ s16 currentWall; /* colliderID */
|
||||
/* 0x088 */ s16 isFacingAway;
|
||||
/* 0x08A */ s16 yawCamOffset;
|
||||
/* 0x08C */ s16 turnAroundYawAdjustment;
|
||||
@ -175,11 +180,13 @@ typedef struct Npc {
|
||||
/* 0x0AD */ u8 alpha2; ///< Multiplied with Npc::alpha
|
||||
/* 0x0AE */ char unk_AE[2];
|
||||
/* 0x0B0 */ s32** extraAnimList;
|
||||
/* 0x0B4 */ s8 unk_B4; // some kind of rendering type, 0..4 inclusive
|
||||
/* 0x0B5 */ s8 unk_B5;
|
||||
/* 0x0B6 */ s8 unk_B6;
|
||||
/* 0x0B7 */ s8 unk_B7;
|
||||
/* 0x0B8 */ char unk_B8[8];
|
||||
/* 0x0B4 */ s8 palSwapType; // 0..4 inclusive
|
||||
/* 0x0B5 */ s8 palSwapPrevType;
|
||||
/* 0x0B6 */ s8 dirtyPalettes;
|
||||
/* 0x0B7 */ s8 palSwapState;
|
||||
/* 0x0B8 */ char unk_B8[4];
|
||||
/* 0x0BC */ s16 palSwapTimer;
|
||||
/* 0x0BE */ s16 palSwapLerpAlpha;
|
||||
/* 0x0C0 */ s8 unk_C0;
|
||||
/* 0x0C1 */ s8 paletteCount;
|
||||
/* 0x0C2 */ char unk_C2[2];
|
||||
@ -2118,16 +2125,23 @@ typedef struct {
|
||||
/* 0x11630 */ Mtx matrixStack[0x200];
|
||||
} DisplayContext; // size = 0x19630
|
||||
|
||||
typedef struct Temp8010F250 {
|
||||
/* 0x00 */ s8 unk_00;
|
||||
/* 0x01 */ s8 unk_01;
|
||||
/* 0x02 */ char unk_02[5];
|
||||
/* 0x07 */ s8 unk_07;
|
||||
/* 0x08 */ s32 unk_08;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ char unk_10[0x20];
|
||||
/* 0x30 */ s32 unk_30;
|
||||
} Temp8010F250; // size = 0x34
|
||||
typedef struct PlayerSpinState {
|
||||
/* 0x00 */ s8 stopSoundTimer;
|
||||
/* 0x01 */ s8 hasBufferedSpin;
|
||||
/* 0x02 */ s8 hitWallTime; // incremented while blocked by a wall
|
||||
/* 0x03 */ s8 spinCountdown;
|
||||
/* 0x04 */ s32 prevActionState;
|
||||
/* 0x08 */ Vec2i bufferedStickAxis;
|
||||
/* 0x10 */ f32 spinDirectionMagnitude;
|
||||
/* 0x14 */ Vec2f spinDirection;
|
||||
/* 0x1C */ f32 inputMagnitude;
|
||||
/* 0x20 */ f32 spinRate;
|
||||
/* 0x24 */ f32 speedScale;
|
||||
/* 0x28 */ f32 frictionScale;
|
||||
/* 0x2C */ s16 initialSpinTime;
|
||||
/* 0x2E */ s16 fullSpeedSpinTime;
|
||||
/* 0x30 */ s32 spinSoundID;
|
||||
} PlayerSpinState; // size = 0x34
|
||||
|
||||
typedef struct PartnerActionStatus {
|
||||
/* 0x000 */ union {
|
||||
|
@ -505,15 +505,15 @@ enum SoundIDs {
|
||||
SOUND_MENU_CHANGE_TAB = 0x000000C8,
|
||||
SOUND_MENU_NEXT = 0x000000C9,
|
||||
SOUND_MENU_BACK = 0x000000CA,
|
||||
SOUND_E1 = 0x000000E1,
|
||||
SOUND_E2 = 0x000000E2,
|
||||
SOUND_E3 = 0x000000E3,
|
||||
SOUND_E7 = 0x000000E7,
|
||||
SOUND_E9 = 0x000000E9,
|
||||
SOUND_FIRE_DAMAGE = 0x000000EA,
|
||||
SOUND_FREEZE_DAMAGE = 0x000000EB,
|
||||
SOUND_10C = 0x0000010C,
|
||||
SOUND_10D = 0x0000010D,
|
||||
SOUND_HIT_PLAYER_NORMAL = 0x000000E1,
|
||||
SOUND_HIT_PLAYER_FIRE = 0x000000E2,
|
||||
SOUND_HIT_PLAYER_ICE = 0x000000E3,
|
||||
SOUND_FROZEN_SHATTER = 0x000000E7,
|
||||
SOUND_HIT_NORMAL = 0x000000E9,
|
||||
SOUND_HIT_FIRE = 0x000000EA,
|
||||
SOUND_HIT_ICE = 0x000000EB,
|
||||
SOUND_IMMUNE = 0x0000010C,
|
||||
SOUND_HIT_BONES = 0x0000010D,
|
||||
SOUND_STEP1 = 0x00000141,
|
||||
SOUND_STEP2 = 0x00000142,
|
||||
SOUND_TORNADO_JUMP = 0x00000147,
|
||||
@ -583,8 +583,8 @@ enum SoundIDs {
|
||||
SOUND_376 = 0x00000376,
|
||||
SOUND_377 = 0x00000377,
|
||||
SOUND_379 = 0x00000379,
|
||||
SOUND_37A = 0x0000037A,
|
||||
SOUND_ELECTRIC_DAMAGE = 0x0000037B,
|
||||
SOUND_HIT_PLAYER_SHOCK = 0x0000037A,
|
||||
SOUND_HIT_SHOCK = 0x0000037B,
|
||||
SOUND_GENERAL_WHISTLE = 0x00000395,
|
||||
SOUND_OPEN_SHELL = 0x000003D4,
|
||||
SOUND_JUMP_3E2 = 0x000003E2,
|
||||
@ -1159,6 +1159,13 @@ enum Phases {
|
||||
PHASE_PLAYER_HAPPY = 30,
|
||||
};
|
||||
|
||||
enum ActorClasses {
|
||||
ACTOR_CLASS_PLAYER = 0x000,
|
||||
ACTOR_CLASS_PARTNER = 0x100,
|
||||
ACTOR_CLASS_ENEMY = 0x200,
|
||||
ACTOR_CLASS_MASK = 0x700,
|
||||
};
|
||||
|
||||
enum ActorIDs {
|
||||
ACTOR_SELF = 0xFFFFFF81,
|
||||
ACTOR_PLAYER = 0x00000000,
|
||||
@ -1399,6 +1406,7 @@ enum ActionStates {
|
||||
ACTION_STATE_IDLE = 0x00000000,
|
||||
ACTION_STATE_WALK = 0x00000001,
|
||||
ACTION_STATE_RUN = 0x00000002,
|
||||
// all states above are considered locomotion states
|
||||
ACTION_STATE_JUMP = 0x00000003,
|
||||
ACTION_STATE_BOUNCE = 0x00000004, ///< Used with Kooper
|
||||
ACTION_STATE_HOP = 0x00000005, ///< Released A before apex of jump
|
||||
@ -1596,6 +1604,13 @@ enum Areas {
|
||||
AREA_TST,
|
||||
};
|
||||
|
||||
enum NpcPalSwapState {
|
||||
NPC_PALSWAP_HOLDING_A = 0,
|
||||
NPC_PALSWAP_FROM_A_TO_B = 1,
|
||||
NPC_PALSWAP_HOLDING_B = 2,
|
||||
NPC_PALSWAP_FROM_B_TO_A = 3
|
||||
};
|
||||
|
||||
enum NpcFlags {
|
||||
NPC_FLAG_0 = 0x00000000,
|
||||
NPC_FLAG_PASSIVE = 0x00000001, ///< Collision does not trigger battle
|
||||
|
@ -283,7 +283,7 @@ extern s32 D_8010C978;
|
||||
extern Vec3s btl_actorHomePositions[];
|
||||
|
||||
extern PartnerActionStatus gPartnerActionStatus; // something with partners
|
||||
extern Temp8010F250 D_8010F250; // sfx_play_sound state struct?
|
||||
extern PlayerSpinState gPlayerSpinState; // sfx_play_sound state struct?
|
||||
|
||||
extern SaveData gCurrentSaveFile;
|
||||
|
||||
|
@ -487,7 +487,7 @@ void btl_state_update_defeat(void) {
|
||||
|
||||
if (player->debuff != 0) {
|
||||
if (player->debuff == 7) {
|
||||
sfx_play_sound(SOUND_E7);
|
||||
sfx_play_sound(SOUND_FROZEN_SHATTER);
|
||||
player->unk_228->flags |= EFFECT_INSTANCE_FLAGS_10;
|
||||
player->unk_228 = NULL;
|
||||
}
|
||||
|
22
src/1776B0.c
22
src/1776B0.c
@ -432,7 +432,7 @@ ApiStatus func_8024C944(Evt* script, s32 isInitialCall) {
|
||||
f32 deltaY;
|
||||
f32 y;
|
||||
s32 actorID;
|
||||
s32 actorType;
|
||||
s32 actorClass;
|
||||
|
||||
if (isInitialCall) {
|
||||
D_8029F270 = camera->unk_54;
|
||||
@ -444,23 +444,23 @@ ApiStatus func_8024C944(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
y = 0.0f;
|
||||
actorType = D_8029F27C & 0x700;
|
||||
actorClass = D_8029F27C & ACTOR_CLASS_MASK;
|
||||
actorID = D_8029F27C & 0xFF;
|
||||
|
||||
switch (actorType) {
|
||||
case 0:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
if (battleStatus->playerActor == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
y = battleStatus->playerActor->currentPos.y + (playerStatus->colliderHeight / 2);
|
||||
break;
|
||||
case 0x100:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (battleStatus->partnerActor == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
y = battleStatus->partnerActor->currentPos.y;
|
||||
break;
|
||||
case 0x200:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
if (battleStatus->enemyActors[actorID] == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
@ -494,14 +494,14 @@ ApiStatus func_8024CB68(Evt* script, s32 isInitialCall) {
|
||||
Camera* camera = &gCameras[1];
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
s32 actorType = D_8029F27C & 0x700;
|
||||
s32 actorClass = D_8029F27C & ACTOR_CLASS_MASK;
|
||||
s32 actorID = D_8029F27C & 0xFF;
|
||||
f32 x, y, z;
|
||||
s32 screenX, screenY, screenZ;
|
||||
f32 temp;
|
||||
|
||||
switch (actorType) {
|
||||
case 0:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
if (battleStatus->playerActor == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
@ -509,7 +509,7 @@ ApiStatus func_8024CB68(Evt* script, s32 isInitialCall) {
|
||||
y = battleStatus->playerActor->currentPos.y + (playerStatus->colliderHeight / 2);
|
||||
z = battleStatus->playerActor->currentPos.z;
|
||||
break;
|
||||
case 0x100:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (battleStatus->partnerActor == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
@ -517,7 +517,7 @@ ApiStatus func_8024CB68(Evt* script, s32 isInitialCall) {
|
||||
y = battleStatus->partnerActor->currentPos.y;
|
||||
z = battleStatus->partnerActor->currentPos.z;
|
||||
break;
|
||||
case 0x200:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
default:
|
||||
if (battleStatus->enemyActors[actorID] == NULL) {
|
||||
return ApiStatus_BLOCK;
|
||||
|
18
src/17FEB0.c
18
src/17FEB0.c
@ -78,7 +78,7 @@ s32 calc_item_damage_enemy(void) {
|
||||
}
|
||||
|
||||
targetActorPart = get_actor_part(targetActor, currentTargetPartID);
|
||||
currentTargetID &= 0x700;
|
||||
currentTargetID &= ACTOR_CLASS_MASK;
|
||||
if (targetActorPart == NULL) {
|
||||
PANIC();
|
||||
}
|
||||
@ -114,7 +114,7 @@ s32 calc_item_damage_enemy(void) {
|
||||
}
|
||||
}
|
||||
if (targetActor->stoneStatus == STATUS_STONE) {
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 1);
|
||||
show_damage_popup(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 0);
|
||||
|
||||
@ -147,7 +147,7 @@ s32 calc_item_damage_enemy(void) {
|
||||
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
|
||||
phi_fp = 2;
|
||||
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
} else {
|
||||
battleStatus->lastAttackDamage = 0;
|
||||
dispatchEvent = EVENT_UNKNOWN_TRIGGER;
|
||||
@ -172,7 +172,7 @@ s32 calc_item_damage_enemy(void) {
|
||||
if (targetActorPart->flags & ACTOR_PART_FLAG_2000) {
|
||||
dispatch_event_actor(targetActor, dispatchEvent);
|
||||
func_8024EFE0(actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z, 0, 1, 3);
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
return 2;
|
||||
}
|
||||
if (battleStatus->currentAttackElement & DAMAGE_TYPE_2000) {
|
||||
@ -400,18 +400,18 @@ block_80:
|
||||
if (sp18 == 0) {
|
||||
func_80267018(targetActor, 1);
|
||||
if (isFireDamage) {
|
||||
sfx_play_sound_at_position(SOUND_FIRE_DAMAGE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
} else if (isElectricDamage) {
|
||||
sfx_play_sound_at_position(SOUND_ELECTRIC_DAMAGE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
} else if (isIceDamage) {
|
||||
sfx_play_sound_at_position(SOUND_FREEZE_DAMAGE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
} else {
|
||||
sfx_play_sound_at_position(SOUND_E9, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (battleStatus->lastAttackDamage <= 0 && wasStatusInflicted && targetActorPart->flags & ACTOR_FLAG_2000) {
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, actorState->goalPos.x, actorState->goalPos.y, actorState->goalPos.z);
|
||||
}
|
||||
if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
|
||||
attackScript = start_script(DoSleepHit, 10, 0);
|
||||
|
54
src/190B20.c
54
src/190B20.c
@ -1594,15 +1594,15 @@ void set_animation(s32 actorID, s32 partIdx, s32 animationIndex) {
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
part = &actor->partsTable[0];
|
||||
if (part->currentAnimation != animationIndex) {
|
||||
part->currentAnimation = animationIndex;
|
||||
spr_update_player_sprite(0, animationIndex, part->animationRate);
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (partIdx != 0) {
|
||||
part = get_actor_part(actor, partIdx);
|
||||
|
||||
@ -1619,7 +1619,7 @@ void set_animation(s32 actorID, s32 partIdx, s32 animationIndex) {
|
||||
part->unk_8C = func_802DE5C8(part->unk_84);
|
||||
}
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
part = get_actor_part(actor, partIdx);
|
||||
if (part->currentAnimation != animationIndex) {
|
||||
part->currentAnimation = animationIndex;
|
||||
@ -1633,15 +1633,15 @@ void set_animation(s32 actorID, s32 partIdx, s32 animationIndex) {
|
||||
|
||||
void func_80263E08(Actor* actor, ActorPart* part, s32 anim) {
|
||||
if (anim >= 0) {
|
||||
switch (actor->actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actor->actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
if (part->currentAnimation != anim) {
|
||||
part->currentAnimation = anim;
|
||||
spr_update_player_sprite(0, anim, part->animationRate);
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
if (part->currentAnimation != anim) {
|
||||
part->currentAnimation = anim;
|
||||
spr_update_sprite(part->unk_84, anim, part->animationRate);
|
||||
@ -1656,8 +1656,8 @@ void set_animation_rate(s32 actorID, s32 partIndex, f32 rate) {
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PARTNER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (partIndex != 0) {
|
||||
part = get_actor_part(actor, partIndex);
|
||||
if (part != NULL) {
|
||||
@ -1667,8 +1667,8 @@ void set_animation_rate(s32 actorID, s32 partIndex, f32 rate) {
|
||||
}
|
||||
actor->partsTable[0].animationRate = rate;
|
||||
break;
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
part = get_actor_part(actor, partIndex);
|
||||
part->animationRate = rate;
|
||||
break;
|
||||
@ -1683,16 +1683,16 @@ void set_part_yaw(s32 actorID, s32 partIndex, s32 value) {
|
||||
get_actor_part(get_actor(actorID), partIndex)->yaw = value;
|
||||
}
|
||||
|
||||
void func_80263FE8(s32 actorID, s32 partIndex, s32 flags) {
|
||||
void set_part_flag_bits(s32 actorID, s32 partIndex, s32 flags) {
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
actor->flags |= flags;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
if (partIndex == 0) {
|
||||
actor->flags |= flags;
|
||||
} else {
|
||||
@ -1703,16 +1703,16 @@ void func_80263FE8(s32 actorID, s32 partIndex, s32 flags) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80264084(s32 actorID, s32 partIndex, s32 flags) {
|
||||
void clear_part_flag_bits(s32 actorID, s32 partIndex, s32 flags) {
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
actor->flags &= ~flags;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
if (partIndex == 0) {
|
||||
actor->flags &= ~flags;
|
||||
} else {
|
||||
@ -2953,19 +2953,19 @@ void remove_actor_decoration(Actor* actor, s32 decorationIndex) {
|
||||
}
|
||||
|
||||
s32 player_team_is_ability_active(Actor* actor, s32 ability) {
|
||||
s32 actorGenus = actor->actorID & 0x700;
|
||||
s32 actorClass = actor->actorID & ACTOR_CLASS_MASK;
|
||||
s32 hasAbility = FALSE;
|
||||
|
||||
switch (actorGenus) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
if (!(gBattleStatus.flags2 & BS_FLAGS2_40)) {
|
||||
hasAbility = is_ability_active(ability);
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
hasAbility = is_partner_ability_active(ability);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
|
158
src/1A5830.c
158
src/1A5830.c
@ -27,78 +27,78 @@ s32 has_enchanted_part(Actor* actor) {
|
||||
}
|
||||
|
||||
void dispatch_event_general(Actor* actor, s32 event) {
|
||||
switch (actor->actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actor->actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
dispatch_event_player(event);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
dispatch_event_partner(event);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
dispatch_event_actor(actor, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void play_hit_sound(Actor* actor, f32 x, f32 y, f32 z, u32 hitSound) {
|
||||
s32 actorKind = actor->actorID & 0x700;
|
||||
s32 actorClass = actor->actorID & ACTOR_CLASS_MASK;
|
||||
|
||||
switch (hitSound) {
|
||||
case HIT_SOUND_MISS:
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, x, y, z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, x, y, z);
|
||||
break;
|
||||
case HIT_SOUND_BONES:
|
||||
sfx_play_sound_at_position(SOUND_10D, 0, x, y, z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_BONES, 0, x, y, z);
|
||||
break;
|
||||
case HIT_SOUND_NORMAL:
|
||||
switch (actorKind) {
|
||||
case ACTOR_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_E1, 0, x, y, z);
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_E9, 0, x, y, z);
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
sfx_play_sound_at_position(SOUND_E9, 0, x, y, z);
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
sfx_play_sound_at_position(SOUND_HIT_NORMAL, 0, x, y, z);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HIT_SOUND_FIRE:
|
||||
switch (actorKind) {
|
||||
case ACTOR_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_E2, 0, x, y, z);
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_FIRE_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
sfx_play_sound_at_position(SOUND_FIRE_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
sfx_play_sound_at_position(SOUND_HIT_FIRE, 0, x, y, z);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HIT_SOUND_ICE:
|
||||
switch (actorKind) {
|
||||
case ACTOR_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_E3, 0, x, y, z);
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_FREEZE_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
sfx_play_sound_at_position(SOUND_FREEZE_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, x, y, z);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HIT_SOUND_SHOCK:
|
||||
switch (actorKind) {
|
||||
case ACTOR_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_37A, 0, x, y, z);
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_ELECTRIC_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, x, y, z);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
sfx_play_sound_at_position(SOUND_ELECTRIC_DAMAGE, 0, x, y, z);
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, x, y, z);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -138,7 +138,7 @@ s32 calc_enemy_test_target(Actor* actor) {
|
||||
Actor* target;
|
||||
Actor* target2;
|
||||
ActorPart* targetPart;
|
||||
s32 actorMasked;
|
||||
s32 actorClass;
|
||||
s32 hitResult;
|
||||
|
||||
battleStatus->currentTargetID2 = battleStatus->currentTargetID;
|
||||
@ -152,15 +152,15 @@ s32 calc_enemy_test_target(Actor* actor) {
|
||||
targetPart = get_actor_part(target, targetPartIdx);
|
||||
ASSERT(targetPart != NULL);
|
||||
|
||||
actorMasked = targetID & 0x700;
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
actorClass = targetID & ACTOR_CLASS_MASK;
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
target->currentHP = playerData->curHP;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
target->currentHP = 127;
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -181,8 +181,8 @@ s32 calc_enemy_test_target(Actor* actor) {
|
||||
return HIT_RESULT_MISS;
|
||||
}
|
||||
hitResult = HIT_RESULT_HIT;
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
if (battleStatus->cloudNineTurnsLeft) {
|
||||
if (rand_int(100) < (s8) battleStatus->cloudNineDodgeChance) {
|
||||
hitResult = 6;
|
||||
@ -209,9 +209,9 @@ s32 calc_enemy_test_target(Actor* actor) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
ActorState* state = &attacker->state;
|
||||
s32 targetID = battleStatus->currentTargetID;
|
||||
s32 targetPartIdx = battleStatus->currentTargetPart;
|
||||
s32 actorMasked;
|
||||
s32 actorClass;
|
||||
Actor* target;
|
||||
ActorPart* targetPart;
|
||||
s32 hitResult;
|
||||
@ -249,7 +249,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
s32 isFire = FALSE;
|
||||
s32 isElectric = FALSE;
|
||||
s32 isEnchanted = FALSE;
|
||||
s32 maskedIsPlayer;
|
||||
s32 isPlayer;
|
||||
s32 defense;
|
||||
s32 event;
|
||||
s32 damage;
|
||||
@ -270,17 +270,17 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
targetPart = get_actor_part(target, targetPartIdx);
|
||||
ASSERT(targetPart != NULL);
|
||||
|
||||
actorMasked = targetID & 0x700;
|
||||
actorClass = targetID & ACTOR_CLASS_MASK;
|
||||
target->lastDamageTaken = 0;
|
||||
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
target->currentHP = gPlayerData.curHP;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
target->currentHP = 127;
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
|
||||
defense += target->defenseBoost;
|
||||
|
||||
if (actorMasked == ACTOR_PLAYER) {
|
||||
if (actorClass == ACTOR_CLASS_PLAYER) {
|
||||
if (battleStatus->waterBlockTurnsLeft > 0) {
|
||||
if ((battleStatus->currentAttackElement & (DAMAGE_TYPE_BLAST | DAMAGE_TYPE_FIRE))) {
|
||||
defense += 2;
|
||||
@ -363,12 +363,12 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
|
||||
damage = battleStatus->currentAttackDamage;
|
||||
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
damage -= battleStatus->merleeDefenseBoost;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -394,8 +394,8 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
target->hpChangeCounter = 0;
|
||||
damage -= defense;
|
||||
|
||||
maskedIsPlayer = actorMasked == ACTOR_PLAYER;
|
||||
if (maskedIsPlayer) {
|
||||
isPlayer = actorClass == ACTOR_CLASS_PLAYER;
|
||||
if (isPlayer) {
|
||||
if (player_team_is_ability_active(target, ABILITY_FIRE_SHIELD)) {
|
||||
if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
|
||||
damage--;
|
||||
@ -413,8 +413,8 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
}
|
||||
}
|
||||
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
// TODO figure out how to better write target->debuff >= STATUS_POISON
|
||||
if ((target->debuff == 0 || target->debuff >= STATUS_POISON) && (target->stoneStatus == STATUS_END) && !(battleStatus->currentAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
|
||||
s32 blocked;
|
||||
@ -436,7 +436,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
func_80266970(target);
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (target->stoneStatus == STATUS_END) {
|
||||
if (target->koStatus == STATUS_END && !(battleStatus->currentAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
|
||||
if (check_block_input(BUTTON_A)) {
|
||||
@ -491,7 +491,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
target->lastDamageTaken = battleStatus->lastAttackDamage;
|
||||
target->hpChangeCounter = 0;
|
||||
|
||||
if (actorMasked == ACTOR_PLAYER) {
|
||||
if (actorClass == ACTOR_CLASS_PLAYER) {
|
||||
battleStatus->damageTaken += damage;
|
||||
gPlayerData.curHP = target->currentHP;
|
||||
}
|
||||
@ -576,7 +576,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
if (event != EVENT_EXPLODE_TRIGGER) {
|
||||
if (!(gBattleStatus.flags1 & BS_FLAGS1_ATK_BLOCKED)) {
|
||||
if (!(gBattleStatus.flags2 & BS_FLAGS2_1000000)) {
|
||||
if (actorMasked != ACTOR_PLAYER || !is_ability_active(ABILITY_HEALTHY_HEALTHY) || !(rand_int(100) < 50)) {
|
||||
if (actorClass != ACTOR_PLAYER || !is_ability_active(ABILITY_HEALTHY_HEALTHY) || !(rand_int(100) < 50)) {
|
||||
if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && try_inflict_status(target, STATUS_SHRINK, STATUS_SHRINK_TURN_MOD)) {
|
||||
statusInflicted = t;
|
||||
statusInflicted2 = t;
|
||||
@ -646,27 +646,27 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
|
||||
battleStatus->wasStatusInflicted = statusInflicted;
|
||||
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
dispatch_event_player(event);
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
dispatch_event_partner(event);
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
dispatch_event_actor(target, event);
|
||||
break;
|
||||
}
|
||||
|
||||
if (actorMasked == ACTOR_PARTNER) {
|
||||
if (actorClass == ACTOR_CLASS_PARTNER) {
|
||||
if (battleStatus->lastAttackDamage > 0 && gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE && !(target->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
|
||||
inflict_partner_ko(target, STATUS_DAZE, battleStatus->lastAttackDamage);
|
||||
}
|
||||
}
|
||||
if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
|
||||
switch (actorMasked) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_PARTNER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (battleStatus->lastAttackDamage == 0) {
|
||||
if (!statusInflicted2 && !statusInflicted) {
|
||||
// immune star fx?
|
||||
@ -681,7 +681,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
if (battleStatus->lastAttackDamage == 0) {
|
||||
if (!statusInflicted2 && !statusInflicted) {
|
||||
func_8024EFE0(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
|
||||
@ -718,7 +718,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
}
|
||||
|
||||
if ((battleStatus->lastAttackDamage <= 0 && !statusInflicted2 && !isEnchanted) || targetPart->flags & ACTOR_PART_FLAG_2000) {
|
||||
sfx_play_sound_at_position(SOUND_10C, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
}
|
||||
|
||||
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP) && statusInflicted) {
|
||||
@ -762,7 +762,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
script->varTable[1] = state->goalPos.y;
|
||||
script->varTable[2] = state->goalPos.z;
|
||||
script->varTable[3] = (s32) target;
|
||||
sfx_play_sound_at_position(SOUND_FREEZE_DAMAGE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_ICE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
}
|
||||
if ((battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK) && statusInflicted) {
|
||||
script = start_script(&DoShrinkHit, 10, 0);
|
||||
@ -788,7 +788,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
|
||||
&& !has_enchanted_part(attacker)
|
||||
) {
|
||||
// enum mismatch? shock vs explode :raised_eyebrow:
|
||||
sfx_play_sound_at_position(SOUND_ELECTRIC_DAMAGE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
sfx_play_sound_at_position(SOUND_HIT_SHOCK, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||
func_80251474(attacker);
|
||||
dispatch_damage_event_actor_1(attacker, 1, EVENT_SHOCK_HIT);
|
||||
return HIT_RESULT_TRIGGERED_EXPLODE;
|
||||
@ -1147,11 +1147,11 @@ ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
||||
|
||||
actor = get_actor(actorID);
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
outVal = playerData->curHP;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
outVal = 99;
|
||||
break;
|
||||
default:
|
||||
|
@ -34,7 +34,7 @@ s32 func_8004A784(Npc* npc, f32 arg1, f32* outYaw, f32* outDist1, f32* outDist2,
|
||||
z1 = npc->pos.z;
|
||||
yaw = *outYaw;
|
||||
|
||||
ret = npc_test_move_simple_with_slipping(npc->unk_80, &x1, &y1, &z1, npc->moveSpeed * arg1,
|
||||
ret = npc_test_move_simple_with_slipping(npc->collisionChannel, &x1, &y1, &z1, npc->moveSpeed * arg1,
|
||||
yaw, npc->collisionHeight, npc->collisionRadius);
|
||||
if (ret != 0) {
|
||||
dist1 = dist2D(npc->pos.x, npc->pos.z, x1, z1);
|
||||
@ -42,7 +42,7 @@ s32 func_8004A784(Npc* npc, f32 arg1, f32* outYaw, f32* outDist1, f32* outDist2,
|
||||
x2 = npc->pos.x;
|
||||
y2 = npc->pos.y;
|
||||
z2 = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &x2, &y2, &z2, npc->moveSpeed * arg1,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x2, &y2, &z2, npc->moveSpeed * arg1,
|
||||
clamp_angle(yaw + 35.0f), npc->collisionHeight,
|
||||
npc->collisionRadius) != 0) {
|
||||
dist2 = dist2D(npc->pos.x, npc->pos.z, x2, z2);
|
||||
@ -51,7 +51,7 @@ s32 func_8004A784(Npc* npc, f32 arg1, f32* outYaw, f32* outDist1, f32* outDist2,
|
||||
x3 = npc->pos.x;
|
||||
y3 = npc->pos.y;
|
||||
z3 = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &x3, &y3, &z3, npc->moveSpeed * arg1,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x3, &y3, &z3, npc->moveSpeed * arg1,
|
||||
clamp_angle(yaw - 35.0f), npc->collisionHeight, npc->collisionRadius)
|
||||
!= 0) {
|
||||
dist3 = dist2D(npc->pos.x, npc->pos.z, x3, z3);
|
||||
|
@ -120,7 +120,7 @@ void reset_player_status(void) {
|
||||
gCameras->targetPos.z = playerStatus->position.z;
|
||||
|
||||
phys_reset_spin_history(mapConfig);
|
||||
mem_clear(&D_8010F250, sizeof(Temp8010F250));
|
||||
mem_clear(&gPlayerSpinState, sizeof(PlayerSpinState));
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "7B440", reset_player_status);
|
||||
|
26
src/7E9D0.c
26
src/7E9D0.c
@ -50,7 +50,7 @@ f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z) {
|
||||
void phys_reset_spin_history(void) {
|
||||
s32 i;
|
||||
|
||||
mem_clear(&D_8010F250, sizeof(Temp8010F250));
|
||||
mem_clear(&gPlayerSpinState, sizeof(PlayerSpinState));
|
||||
gSpinHistoryBufferPos = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSpinHistoryPosAngle); i++) {
|
||||
@ -71,7 +71,7 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", phys_peach_update);
|
||||
void set_action_state(s32 actionState) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
Temp8010F250* unknownStruct = &D_8010F250;
|
||||
PlayerSpinState* spinState = &gPlayerSpinState;
|
||||
|
||||
if (playerStatus->flags & 0x200) {
|
||||
playerStatus->flags &= ~0x200;
|
||||
@ -143,8 +143,8 @@ void set_action_state(s32 actionState) {
|
||||
playerStatus->flags &= ~0x20000;
|
||||
playerStatus->animFlags &= ~0x10000;
|
||||
|
||||
if (unknownStruct->unk_30 != 0) {
|
||||
sfx_stop_sound(unknownStruct->unk_30);
|
||||
if (spinState->spinSoundID != 0) {
|
||||
sfx_stop_sound(spinState->spinSoundID);
|
||||
}
|
||||
|
||||
if (playerStatus->unk_D8) {
|
||||
@ -214,8 +214,8 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", check_input_jump, void);
|
||||
|
||||
void check_input_spin(void) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Temp8010F250* temp_8010F250 = &D_8010F250;
|
||||
Temp8010F250* temp2 = temp_8010F250;
|
||||
PlayerSpinState* spinState = &gPlayerSpinState;
|
||||
PlayerSpinState* temp2 = spinState;
|
||||
|
||||
if (!(playerStatus->flags & (PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO | PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS)) &&
|
||||
!(playerStatus->animFlags & 1) &&
|
||||
@ -226,15 +226,15 @@ void check_input_spin(void) {
|
||||
s32 btnPressed = playerStatus->pressedButtons & Z_TRIG;
|
||||
|
||||
// TODO
|
||||
if (actionState != 0x21) {
|
||||
if (actionState < 0x22) {
|
||||
if (actionState < 3) {
|
||||
if (actionState != ACTION_STATE_RIDE) {
|
||||
if (actionState < ACTION_STATE_STEP_UP) {
|
||||
if (actionState < ACTION_STATE_JUMP) {
|
||||
if (actionState >= 0 && !(playerStatus->animFlags & 0x10000)) {
|
||||
if (btnPressed || temp_8010F250->unk_01) {
|
||||
if (btnPressed || spinState->hasBufferedSpin) {
|
||||
set_action_state(ACTION_STATE_SPIN);
|
||||
if (temp_8010F250->unk_01 != 0) {
|
||||
if (temp_8010F250->unk_08 != 0 || temp_8010F250->unk_0C != 0) {
|
||||
playerStatus->prevActionState = temp2->unk_07;
|
||||
if (spinState->hasBufferedSpin != FALSE) {
|
||||
if (spinState->bufferedStickAxis.x != 0 || spinState->bufferedStickAxis.y != 0) {
|
||||
playerStatus->prevActionState = temp2->prevActionState;
|
||||
} else {
|
||||
playerStatus->prevActionState = ACTION_STATE_IDLE;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void func_80240D80_ECAA80(Evt* script, NpcAISettings* npcAISettings, EnemyTerrit
|
||||
phi_f24 = 0.0f;
|
||||
phi_f26 = 0.0f;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_arg8, &subroutine_arg9, &subroutine_argA, npc->moveSpeed * 4.5, temp_f20,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_arg8, &subroutine_arg9, &subroutine_argA, npc->moveSpeed * 4.5, temp_f20,
|
||||
npc->collisionHeight, npc->collisionRadius)) {
|
||||
phi_f22 = dist2D(npc->pos.x, npc->pos.z, subroutine_arg8, subroutine_argA);
|
||||
|
||||
@ -68,7 +68,7 @@ void func_80240D80_ECAA80(Evt* script, NpcAISettings* npcAISettings, EnemyTerrit
|
||||
subroutine_argC = npc->pos.y;
|
||||
subroutine_argD = npc->pos.z;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argB, &subroutine_argC, &subroutine_argD, npc->moveSpeed * 4.5,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_argB, &subroutine_argC, &subroutine_argD, npc->moveSpeed * 4.5,
|
||||
clamp_angle(temp_f20 + 35.0f), npc->collisionHeight, npc->collisionRadius)) {
|
||||
phi_f24 = dist2D(npc->pos.x, npc->pos.z, subroutine_argB, subroutine_argD);
|
||||
}
|
||||
@ -77,7 +77,7 @@ void func_80240D80_ECAA80(Evt* script, NpcAISettings* npcAISettings, EnemyTerrit
|
||||
subroutine_argF = npc->pos.y;
|
||||
subroutine_arg10 = npc->pos.z;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argE, &subroutine_argF, &subroutine_arg10, npc->moveSpeed * 4.5,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_argE, &subroutine_argF, &subroutine_arg10, npc->moveSpeed * 4.5,
|
||||
clamp_angle(temp_f20 - 35.0f), npc->collisionHeight, npc->collisionRadius)) {
|
||||
phi_f26 = dist2D(npc->pos.x, npc->pos.z, subroutine_argE, subroutine_arg10);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ void func_80241730_EE00F0(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f24 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
|
||||
@ -90,7 +90,7 @@ void func_80241730_EE00F0(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->moveToPos.y = y + temp_f24;
|
||||
script->functionTemp[0] = 12;
|
||||
return;
|
||||
@ -113,7 +113,7 @@ void func_80241730_EE00F0(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
y = temp_f22;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
y += temp_f24;
|
||||
w = y - temp_f22;
|
||||
if (w > 2.0) {
|
||||
@ -159,7 +159,7 @@ void func_80241B94_EE0554(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f22 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
if (func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 1) != 0) {
|
||||
|
@ -74,7 +74,7 @@ void func_802415DC_EF3BEC(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f24 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
|
||||
@ -88,7 +88,7 @@ void func_802415DC_EF3BEC(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->moveToPos.y = y + temp_f24;
|
||||
script->functionTemp[0] = 12;
|
||||
return;
|
||||
@ -111,7 +111,7 @@ void func_802415DC_EF3BEC(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
y = temp_f22;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
y += temp_f24;
|
||||
w = y - temp_f22;
|
||||
if (w > 2.0) {
|
||||
@ -157,7 +157,7 @@ void func_80241A40_EF4050(Evt* script, NpcAISettings* aiSettings, EnemyTerritory
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f22 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
if (func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 1) != 0) {
|
||||
|
@ -41,12 +41,12 @@ s32 get_nearest_home_index(f32 x, f32 y, f32 z) {
|
||||
}
|
||||
|
||||
void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partIndex) {
|
||||
s32 actorClass = actorID & 0x700;
|
||||
s32 actorClass = actorID & ACTOR_CLASS_MASK;
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorClass) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
part = get_actor_part(actor, 0);
|
||||
state->goalPos.x = actor->currentPos.x + part->partOffset.x * actor->scalingFactor;
|
||||
state->goalPos.y = actor->currentPos.y + part->partOffset.y * actor->scalingFactor;
|
||||
@ -55,8 +55,8 @@ void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partIndex) {
|
||||
state->goalPos.y -= actor->scalingFactor * 5.0f;
|
||||
}
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
part = get_actor_part(actor, partIndex);
|
||||
if (!(part->flags & ACTOR_PART_FLAG_100000)) {
|
||||
state->goalPos.x = actor->currentPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor;
|
||||
@ -80,19 +80,19 @@ void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partIndex) {
|
||||
}
|
||||
|
||||
void set_part_goal_to_actor_part(ActorPartMovement* movement, s32 actorID, s32 partIndex) {
|
||||
s32 actorClass = actorID & 0x700;
|
||||
s32 actorClass = actorID & ACTOR_CLASS_MASK;
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* part;
|
||||
|
||||
switch (actorClass) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
part = get_actor_part(actor, 0);
|
||||
part->movement->goalPos.x = actor->currentPos.x + part->partOffset.x * actor->scalingFactor;
|
||||
part->movement->goalPos.y = actor->currentPos.y + part->partOffset.y * actor->scalingFactor;
|
||||
part->movement->goalPos.z = actor->currentPos.z;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
part = get_actor_part(actor, partIndex);
|
||||
if (!(part->flags & ACTOR_PART_FLAG_100000)) {
|
||||
part->movement->goalPos.x = actor->currentPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor;
|
||||
@ -127,14 +127,14 @@ void set_part_absolute_position(s32 actorID, s32 partIndex, f32 x, f32 y, f32 z)
|
||||
Actor* actor = get_actor(actorID);
|
||||
ActorPart* actorPart;
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
actor->currentPos.x = x;
|
||||
actor->currentPos.y = y;
|
||||
actor->currentPos.z = z;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
actorPart = get_actor_part(actor, partIndex);
|
||||
actorPart->absolutePosition.x = x;
|
||||
actorPart->absolutePosition.y = y;
|
||||
@ -154,17 +154,17 @@ void set_actor_home_position(s32 actorID, f32 x, f32 y, f32 z) {
|
||||
Actor* get_actor(s32 actorID) {
|
||||
Actor* ret = NULL;
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
s32 actorClass = actorID & 0x700;
|
||||
s32 actorClass = actorID & ACTOR_CLASS_MASK;
|
||||
u32 idIdx = (u8)actorID;
|
||||
|
||||
switch (actorClass) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
ret = battleStatus->playerActor;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
ret = battleStatus->partnerActor;
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
ret = battleStatus->enemyActors[idIdx];
|
||||
break;
|
||||
}
|
||||
@ -748,14 +748,14 @@ ApiStatus SetPartPos(Evt* script, s32 isInitialCall) {
|
||||
|
||||
actor = get_actor(actorID);
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
actor->currentPos.x = x;
|
||||
actor->currentPos.y = y;
|
||||
actor->currentPos.z = z;
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
actorPart = get_actor_part(actor, partIndex);
|
||||
|
||||
if (!(actorPart->flags & ACTOR_PART_FLAG_100000)) {
|
||||
@ -791,11 +791,11 @@ ApiStatus SetEnemyTargetOffset(Evt* script, s32 isInitialCall) {
|
||||
|
||||
actor = get_actor(actorID);
|
||||
|
||||
switch (actorID & 0x700) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorID & ACTOR_CLASS_MASK) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
actorPart = get_actor_part(actor, partIndex);
|
||||
actorPart->targetOffset.x = x;
|
||||
actorPart->targetOffset.y = y;
|
||||
@ -822,20 +822,20 @@ ApiStatus SetAnimation(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus GetAnimation(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 actorID = evt_get_variable(script, *args++);
|
||||
s32 var1;
|
||||
s32 partID;
|
||||
ActorPart* actorPart;
|
||||
s32 a1;
|
||||
s32 outVar;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
var1 = evt_get_variable(script, *args++);
|
||||
a1 = *args++;
|
||||
partID = evt_get_variable(script, *args++);
|
||||
outVar = *args++;
|
||||
|
||||
actorPart = get_actor_part(get_actor(actorID), var1);
|
||||
actorPart = get_actor_part(get_actor(actorID), partID);
|
||||
|
||||
if (actorPart != NULL) {
|
||||
evt_set_variable(script, a1, actorPart->currentAnimation);
|
||||
evt_set_variable(script, outVar, actorPart->currentAnimation);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -2764,7 +2764,7 @@ ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
actor = get_actor(actorID);
|
||||
debuff = actor->debuff;
|
||||
actorClass = actor->actorID & 0x700;
|
||||
actorClass = actor->actorID & ACTOR_CLASS_MASK;
|
||||
flags = 0;
|
||||
|
||||
if (debuff != STATUS_END) {
|
||||
@ -2836,13 +2836,13 @@ ApiStatus GetStatusFlags(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
switch (actorClass) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
if (battleStatus->outtaSightActive) {
|
||||
flags |= STATUS_FLAG_TRANSPARENT;
|
||||
}
|
||||
break;
|
||||
case ACTOR_ENEMY0:
|
||||
case ACTOR_CLASS_ENEMY:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
||||
s32 actorId = evt_get_variable(script, *script->ptrReadPos);
|
||||
Actor* actor = get_actor(actorId);
|
||||
s32 id = actor->actorID & 0x700;
|
||||
s32 actorClass = actor->actorID & ACTOR_CLASS_MASK;
|
||||
|
||||
if (actor->debuff != STATUS_END) {
|
||||
actor->debuffDuration = 0;
|
||||
@ -56,10 +56,10 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
||||
actor->koDuration = 0;
|
||||
actor->koStatus = 0;
|
||||
|
||||
switch (id) {
|
||||
case ACTOR_PLAYER:
|
||||
switch (actorClass) {
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
dispatch_event_partner(0x31);
|
||||
break;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
|
||||
s32 actorId = evt_get_variable(script, *script->ptrReadPos);
|
||||
Actor* actor = get_actor(actorId);
|
||||
s32 id = actor->actorID & 0x700;
|
||||
s32 id = actor->actorID & ACTOR_CLASS_MASK;
|
||||
|
||||
if (actor->debuff != STATUS_END) {
|
||||
actor->debuffDuration = 0;
|
||||
@ -18,9 +18,9 @@ ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
|
||||
actor->koStatus = 0;
|
||||
|
||||
switch (id) {
|
||||
case ACTOR_PLAYER:
|
||||
case ACTOR_CLASS_PLAYER:
|
||||
break;
|
||||
case ACTOR_PARTNER:
|
||||
case ACTOR_CLASS_PARTNER:
|
||||
dispatch_event_partner(0x31);
|
||||
}
|
||||
actor->ptrDefuffIcon->ptrPropertyList[15] = 0;
|
||||
|
@ -825,7 +825,7 @@ ApiStatus func_80045900(Evt* script, s32 isInitialCall) {
|
||||
f32 z = npc->pos.z;
|
||||
f32 a = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &a) != 0) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &a) != 0) {
|
||||
npc->pos.y = y;
|
||||
}
|
||||
npc->flags &= ~0x800;
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "common.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern s32 D_802DAE40;
|
||||
extern s32 D_802DAE44;
|
||||
extern s32 wExtraPartnerID;
|
||||
extern s32 wExtraPartnerNpcID;
|
||||
|
||||
Npc* resolve_npc(Evt* script, s32 npcIdOrPtr) {
|
||||
if (npcIdOrPtr == NPC_SELF) {
|
||||
@ -14,15 +14,15 @@ Npc* resolve_npc(Evt* script, s32 npcIdOrPtr) {
|
||||
}
|
||||
}
|
||||
|
||||
void set_npc_animation(Npc* npc, u32 arg1) {
|
||||
void set_npc_animation(Npc* npc, u32 animID) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
|
||||
if (arg1 - 0x101 < 9) {
|
||||
npc->currentAnim.w = gPartnerAnimations[playerData->currentPartner].anims[arg1 - 0x101];
|
||||
} else if ((arg1 - 0x201) < 0x10) {
|
||||
npc->currentAnim.w = get_enemy(npc->npcID)->animList[arg1 - 0x201];
|
||||
if (animID - 0x101 < 9) {
|
||||
npc->currentAnim.w = gPartnerAnimations[playerData->currentPartner].anims[animID - 0x101];
|
||||
} else if ((animID - 0x201) < 0x10) {
|
||||
npc->currentAnim.w = get_enemy(npc->npcID)->animList[animID - 0x201];
|
||||
} else {
|
||||
npc->currentAnim.w = arg1;
|
||||
npc->currentAnim.w = animID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ ApiStatus SetNpcRotation(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus func_802CDE68(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = evt_get_variable(script, *args++);
|
||||
f32 var1 = evt_get_float_variable(script, *args++);
|
||||
f32 value = evt_get_float_variable(script, *args++);
|
||||
Npc* npc;
|
||||
|
||||
npc = resolve_npc(script, npcId);
|
||||
@ -117,25 +117,25 @@ ApiStatus func_802CDE68(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
npc->rotationVerticalPivotOffset = var1;
|
||||
npc->rotationVerticalPivotOffset = value;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcScale(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
f32 sizeX = evt_get_float_variable(script, *ptrReadPos++);
|
||||
f32 sizeY = evt_get_float_variable(script, *ptrReadPos++);
|
||||
f32 sizeZ = evt_get_float_variable(script, *ptrReadPos++);
|
||||
f32 scaleX = evt_get_float_variable(script, *ptrReadPos++);
|
||||
f32 scaleY = evt_get_float_variable(script, *ptrReadPos++);
|
||||
f32 scaleZ = evt_get_float_variable(script, *ptrReadPos++);
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
|
||||
if (npc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
npc->scale.x = sizeX;
|
||||
npc->scale.y = sizeY;
|
||||
npc->scale.z = sizeZ;
|
||||
npc->scale.x = scaleX;
|
||||
npc->scale.y = scaleY;
|
||||
npc->scale.z = scaleZ;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -237,8 +237,8 @@ ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
f32 targetX = evt_get_variable(script, *args++);
|
||||
f32 targetZ = evt_get_variable(script, *args++);
|
||||
f32 goalX = evt_get_variable(script, *args++);
|
||||
f32 goalZ = evt_get_variable(script, *args++);
|
||||
s32 duration = evt_get_variable(script, *args++);
|
||||
|
||||
npc = resolve_npc(script, npcID);
|
||||
@ -247,8 +247,8 @@ ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
script->functionTemp[1] = (s32)npc;
|
||||
npc->moveToPos.x = targetX;
|
||||
npc->moveToPos.z = targetZ;
|
||||
npc->moveToPos.x = goalX;
|
||||
npc->moveToPos.z = goalZ;
|
||||
npc->duration = duration;
|
||||
dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
|
||||
|
||||
@ -297,9 +297,9 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
|
||||
|
||||
if (script->functionTemp[0] == 0) {
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
f32 xTemp = evt_get_variable(script, *args++);
|
||||
f32 yTemp = evt_get_variable(script, *args++);
|
||||
f32 zTemp = evt_get_variable(script, *args++);
|
||||
f32 goalX = evt_get_variable(script, *args++);
|
||||
f32 goalY = evt_get_variable(script, *args++);
|
||||
f32 goalZ = evt_get_variable(script, *args++);
|
||||
s32 duration = evt_get_variable(script, *args++);
|
||||
f32 dist;
|
||||
|
||||
@ -310,9 +310,9 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
|
||||
}
|
||||
|
||||
script->functionTemp[1] = (s32)npc;
|
||||
npc->moveToPos.x = xTemp;
|
||||
npc->moveToPos.y = yTemp;
|
||||
npc->moveToPos.z = zTemp;
|
||||
npc->moveToPos.x = goalX;
|
||||
npc->moveToPos.y = goalY;
|
||||
npc->moveToPos.z = goalZ;
|
||||
|
||||
npc->duration = duration;
|
||||
dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
|
||||
@ -324,7 +324,7 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
|
||||
}
|
||||
}
|
||||
|
||||
yTemp = npc->moveToPos.y - npc->pos.y;
|
||||
goalY = npc->moveToPos.y - npc->pos.y;
|
||||
|
||||
if (npc->duration == 0) {
|
||||
npc->duration = dist / npc->moveSpeed;
|
||||
@ -333,7 +333,7 @@ ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
|
||||
}
|
||||
|
||||
npc->flags |= 0x800;
|
||||
npc->jumpVelocity = (npc->jumpScale * npc->duration * 0.5f) + (yTemp / npc->duration);
|
||||
npc->jumpVelocity = (npc->jumpScale * npc->duration * 0.5f) + (goalY / npc->duration);
|
||||
script->functionTemp[0] =1;
|
||||
}
|
||||
|
||||
@ -466,9 +466,9 @@ ApiStatus SetNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* t1 = (f32*) &script->functionTemp[1];
|
||||
f32* t2 = (f32*) &script->functionTemp[2];
|
||||
s32* t3 = &script->functionTemp[3];
|
||||
f32* initialYaw = (f32*) &script->functionTemp[1];
|
||||
f32* deltaYaw = (f32*) &script->functionTemp[2];
|
||||
s32* turnTime = &script->functionTemp[3];
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -479,44 +479,44 @@ ApiStatus InterpNpcYaw(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
*t1 = npc->yaw;
|
||||
*t2 = evt_get_variable(script, *args++) - *t1;
|
||||
*initialYaw = npc->yaw;
|
||||
*deltaYaw = evt_get_variable(script, *args++) - *initialYaw;
|
||||
script->functionTemp[0] = (s32)npc;
|
||||
*t3 = evt_get_variable(script, *args++);
|
||||
*turnTime = evt_get_variable(script, *args++);
|
||||
|
||||
if (*t3 == 0) {
|
||||
npc->yaw += *t2;
|
||||
if (*turnTime == 0) {
|
||||
npc->yaw += *deltaYaw;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
npc->duration = 0;
|
||||
|
||||
if (*t2 < -180.0f) {
|
||||
*t2 += 360.0f;
|
||||
if (*deltaYaw < -180.0f) {
|
||||
*deltaYaw += 360.0f;
|
||||
}
|
||||
if (*t2 > 180.0f) {
|
||||
*t2 -= 360.0f;
|
||||
if (*deltaYaw > 180.0f) {
|
||||
*deltaYaw -= 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
npc = (Npc*)script->functionTemp[0];
|
||||
if (*t3 > 0) {
|
||||
if (*turnTime > 0) {
|
||||
npc->duration++;
|
||||
npc->yaw = *t1 + ((*t2 * npc->duration) / *t3);
|
||||
npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime);
|
||||
npc->yaw = clamp_angle(npc->yaw);
|
||||
return !(npc->duration < *t3) * ApiStatus_DONE1;
|
||||
return !(npc->duration < *turnTime) * ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
npc->yaw += *t2;
|
||||
npc->yaw += *deltaYaw;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* t1 = (f32*) &script->functionTemp[1];
|
||||
f32* t2 = (f32*) &script->functionTemp[2];
|
||||
s32* t3 = &script->functionTemp[3];
|
||||
f32* initialYaw = (f32*) &script->functionTemp[1];
|
||||
f32* deltaYaw = (f32*) &script->functionTemp[2];
|
||||
s32* turnTime = &script->functionTemp[3];
|
||||
Npc* npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -527,77 +527,77 @@ ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
*t1 = npc->yaw;
|
||||
*t2 = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *t1;
|
||||
*initialYaw = npc->yaw;
|
||||
*deltaYaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *initialYaw;
|
||||
script->functionTemp[0] = (s32)npc;
|
||||
*t3 = evt_get_variable(script, *args++);
|
||||
*turnTime = evt_get_variable(script, *args++);
|
||||
npc->duration = 0;
|
||||
|
||||
if (*t2 < -180.0f) {
|
||||
*t2 += 360.0f;
|
||||
if (*deltaYaw < -180.0f) {
|
||||
*deltaYaw += 360.0f;
|
||||
}
|
||||
if (*t2 > 180.0f) {
|
||||
*t2 -= 360.0f;
|
||||
if (*deltaYaw > 180.0f) {
|
||||
*deltaYaw -= 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
npc = (Npc*)script->functionTemp[0];
|
||||
if (*t3 > 0) {
|
||||
if (*turnTime > 0) {
|
||||
npc->duration++;
|
||||
npc->yaw = *t1 + ((*t2 * npc->duration) / *t3);
|
||||
npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime);
|
||||
npc->yaw = clamp_angle(npc->yaw);
|
||||
return !(npc->duration < *t3) * ApiStatus_DONE1;
|
||||
return !(npc->duration < *turnTime) * ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
npc->yaw += *t2;
|
||||
npc->yaw += *deltaYaw;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus NpcFaceNpc(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
f32* t1 = (f32*) &script->functionTemp[1];
|
||||
f32* t2 = (f32*) &script->functionTemp[2];
|
||||
s32* t3 = &script->functionTemp[3];
|
||||
Npc* npc;
|
||||
Npc* npc2;
|
||||
f32* initialYaw = (f32*) &script->functionTemp[1];
|
||||
f32* deltaYaw = (f32*) &script->functionTemp[2];
|
||||
s32* turnTime = &script->functionTemp[3];
|
||||
Npc* targetNpc;
|
||||
Npc* turningNpc;
|
||||
|
||||
if (isInitialCall) {
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
s32 npcID2 = evt_get_variable(script, *args++);
|
||||
s32 turningNpcID = evt_get_variable(script, *args++);
|
||||
s32 targetNpcID = evt_get_variable(script, *args++);
|
||||
|
||||
npc = resolve_npc(script, npcID2);
|
||||
if (npc == NULL) {
|
||||
targetNpc = resolve_npc(script, targetNpcID);
|
||||
if (targetNpc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
npc2 = resolve_npc(script, npcID);
|
||||
if (npc2 == NULL) {
|
||||
turningNpc = resolve_npc(script, turningNpcID);
|
||||
if (turningNpc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
*t1 = npc2->yaw;
|
||||
*t2 = atan2(npc2->pos.x, npc2->pos.z, npc->pos.x, npc->pos.z) - *t1;
|
||||
script->functionTemp[0] = (s32)npc2;
|
||||
*t3 = evt_get_variable(script, *args++);
|
||||
npc2->duration = 0;
|
||||
*initialYaw = turningNpc->yaw;
|
||||
*deltaYaw = atan2(turningNpc->pos.x, turningNpc->pos.z, targetNpc->pos.x, targetNpc->pos.z) - *initialYaw;
|
||||
script->functionTemp[0] = (s32)turningNpc;
|
||||
*turnTime = evt_get_variable(script, *args++);
|
||||
turningNpc->duration = 0;
|
||||
|
||||
if (*t2 < -180.0f) {
|
||||
*t2 += 360.0f;
|
||||
if (*deltaYaw < -180.0f) {
|
||||
*deltaYaw += 360.0f;
|
||||
}
|
||||
if (*t2 > 180.0f) {
|
||||
*t2 -= 360.0f;
|
||||
if (*deltaYaw > 180.0f) {
|
||||
*deltaYaw -= 360.0f;
|
||||
}
|
||||
}
|
||||
|
||||
npc2 = (Npc*)script->functionTemp[0];
|
||||
if (*t3 > 0) {
|
||||
npc2->duration++;
|
||||
npc2->yaw = *t1 + ((*t2 * npc2->duration) / *t3);
|
||||
npc2->yaw = clamp_angle(npc2->yaw);
|
||||
return !(npc2->duration < *t3) * ApiStatus_DONE1;
|
||||
turningNpc = (Npc*)script->functionTemp[0];
|
||||
if (*turnTime > 0) {
|
||||
turningNpc->duration++;
|
||||
turningNpc->yaw = *initialYaw + ((*deltaYaw * turningNpc->duration) / *turnTime);
|
||||
turningNpc->yaw = clamp_angle(turningNpc->yaw);
|
||||
return !(turningNpc->duration < *turnTime) * ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
npc2->yaw += *t2;
|
||||
turningNpc->yaw += *deltaYaw;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -624,46 +624,46 @@ ApiStatus SetNpcFlagBits(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus GetNpcPos(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
s32 a1 = *args++;
|
||||
s32 a2 = *args++;
|
||||
s32 a3 = *args++;
|
||||
s32 outX = *args++;
|
||||
s32 outY = *args++;
|
||||
s32 outZ = *args++;
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
|
||||
if (npc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
evt_set_variable(script, a1, npc->pos.x);
|
||||
evt_set_variable(script, a2, npc->pos.y);
|
||||
evt_set_variable(script, a3, npc->pos.z);
|
||||
evt_set_variable(script, outX, npc->pos.x);
|
||||
evt_set_variable(script, outY, npc->pos.y);
|
||||
evt_set_variable(script, outZ, npc->pos.z);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802CF1B4(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus SetNpcCollisionChannel(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = evt_get_variable(script, *args++);
|
||||
Bytecode arg1 = *args;
|
||||
Npc* npc = resolve_npc(script, npcId);
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Bytecode channel = *args;
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
|
||||
if (npc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
npc->unk_80 = arg1;
|
||||
npc->collisionChannel = channel;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus SetNpcSprite(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 npcId = evt_get_variable(script, *args++);
|
||||
Bytecode arg1 = *args;
|
||||
Npc* npc = resolve_npc(script, npcId);
|
||||
s32 npcID = evt_get_variable(script, *args++);
|
||||
Bytecode animID = *args;
|
||||
Npc* npc = resolve_npc(script, npcID);
|
||||
|
||||
if (npc == NULL) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
set_npc_sprite(npc, arg1, NULL);
|
||||
set_npc_sprite(npc, animID, NULL);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -796,9 +796,9 @@ s32 BringPartnerOut(Evt *script, s32 isInitialCall) {
|
||||
f32 playerY;
|
||||
|
||||
if (isInitialCall) {
|
||||
D_802DAE40 = evt_get_variable(script, *args++);
|
||||
if (playerData->currentPartner == D_802DAE40) {
|
||||
D_802DAE40 = 0;
|
||||
wExtraPartnerID = evt_get_variable(script, *args++);
|
||||
if (playerData->currentPartner == wExtraPartnerID) {
|
||||
wExtraPartnerID = 0;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -806,12 +806,12 @@ s32 BringPartnerOut(Evt *script, s32 isInitialCall) {
|
||||
partner->npcID = -5;
|
||||
|
||||
bpPointer->flags = NPC_FLAG_100;
|
||||
bpPointer->initialAnim = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_FLY];
|
||||
bpPointer->initialAnim = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_FLY];
|
||||
bpPointer->onUpdate = NULL;
|
||||
bpPointer->onRender = NULL;
|
||||
|
||||
D_802DAE44 = _create_npc_basic(bpPointer);
|
||||
npc = get_npc_by_index(D_802DAE44);
|
||||
wExtraPartnerNpcID = _create_npc_basic(bpPointer);
|
||||
npc = get_npc_by_index(wExtraPartnerNpcID);
|
||||
npc->collisionRadius = 10;
|
||||
npc->collisionHeight = 10;
|
||||
npc->npcID = NPC_PARTNER;
|
||||
@ -840,15 +840,15 @@ s32 BringPartnerOut(Evt *script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
npc->jumpVelocity = ((playerY - targetY) + (npc->jumpScale * npc->duration * npc->duration * 0.5f)) / npc->duration;
|
||||
npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_WALK];
|
||||
npc->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_WALK];
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
npc = get_npc_by_index(D_802DAE44);
|
||||
npc = get_npc_by_index(wExtraPartnerNpcID);
|
||||
npc->jumpVelocity -= npc->jumpScale;
|
||||
npc->pos.y += npc->jumpVelocity;
|
||||
if (npc->jumpVelocity <= 0.0f) {
|
||||
npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_JUMP];
|
||||
npc->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_JUMP];
|
||||
}
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
duration = npc->duration;
|
||||
@ -861,7 +861,7 @@ s32 BringPartnerOut(Evt *script, s32 isInitialCall) {
|
||||
|
||||
npc->duration--;
|
||||
if (npc->duration < 0) {
|
||||
npc->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_IDLE];
|
||||
npc->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_IDLE];
|
||||
npc->jumpVelocity = 0.0f;
|
||||
npc->pos.y = npc->moveToPos.y;
|
||||
npc->scale.x = 1.0f;
|
||||
@ -885,7 +885,7 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
f32 partnerZ;
|
||||
|
||||
if (isInitialCall) {
|
||||
if (D_802DAE40 != 0) {
|
||||
if (wExtraPartnerID != 0) {
|
||||
partner->flags &= ~0x200;
|
||||
partner->flags &= ~8;
|
||||
targetX = playerStatus->position.x;
|
||||
@ -910,7 +910,7 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
|
||||
partnerY = targetY - partnerY;
|
||||
partner->jumpVelocity = (partnerY + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) / partner->duration;
|
||||
partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_WALK];
|
||||
partner->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_WALK];
|
||||
return ApiStatus_BLOCK;
|
||||
} else {
|
||||
return ApiStatus_DONE2;
|
||||
@ -920,7 +920,7 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
partner->jumpVelocity -= partner->jumpScale;
|
||||
partner->pos.y += partner->jumpVelocity;
|
||||
if (partner->jumpVelocity <= 0.0f) {
|
||||
partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_JUMP];
|
||||
partner->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_JUMP];
|
||||
}
|
||||
npc_move_heading(partner, partner->moveSpeed, partner->yaw);
|
||||
|
||||
@ -935,10 +935,10 @@ ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
|
||||
|
||||
partner->duration--;
|
||||
if (partner->duration < 0) {
|
||||
partner->currentAnim.w = gPartnerAnimations[D_802DAE40].anims[PARTNER_ANIM_FALL];
|
||||
partner->currentAnim.w = gPartnerAnimations[wExtraPartnerID].anims[PARTNER_ANIM_FALL];
|
||||
partner->jumpVelocity = 0.0f;
|
||||
partner->pos.y = partner->moveToPos.y;
|
||||
free_npc_by_index(D_802DAE44);
|
||||
free_npc_by_index(wExtraPartnerNpcID);
|
||||
get_npc_unsafe(-5)->npcID = NPC_PARTNER;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -1079,7 +1079,7 @@ ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802D0244(Evt* script, s32 isInitialCall) {
|
||||
ApiStatus SetNpcRenderMode(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||
s32 npcID = evt_get_variable(script, *ptrReadPos++);
|
||||
u8 renderMode = evt_get_variable(script, *ptrReadPos++);
|
||||
|
84
src/npc.c
84
src/npc.c
@ -120,14 +120,14 @@ s32 _create_npc(NpcBlueprint* blueprint, s32** animList, s32 skipLoadingAnims) {
|
||||
npc->renderYaw = 0.0f;
|
||||
npc->unk_98 = 0;
|
||||
npc->unk_A2 = 0;
|
||||
npc->unk_80 = 0x20000;
|
||||
npc->collisionChannel = 0x20000;
|
||||
npc->isFacingAway = 0;
|
||||
npc->yawCamOffset = 0;
|
||||
npc->turnAroundYawAdjustment = 0;
|
||||
npc->unk_84 = -1;
|
||||
npc->unk_86 = -1;
|
||||
npc->unk_B4 = 0;
|
||||
npc->unk_B5 = 0;
|
||||
npc->currentFloor = -1;
|
||||
npc->currentWall = -1;
|
||||
npc->palSwapType = 0;
|
||||
npc->palSwapPrevType = 0;
|
||||
npc->screenSpaceOffset2D[0] = 0.0f;
|
||||
npc->screenSpaceOffset2D[1] = 0.0f;
|
||||
npc->verticalStretch = 1.0f;
|
||||
@ -271,14 +271,14 @@ void npc_do_world_collision(Npc* npc) {
|
||||
temp_z = npc->pos.z;
|
||||
|
||||
if (!(npc->flags & NPC_FLAG_PARTICLE)) {
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
} else {
|
||||
phi_v0 = npc_test_move_complex_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_complex_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
}
|
||||
|
||||
if (phi_v0) {
|
||||
npc->flags |= (NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_4000);
|
||||
npc->unk_86 = D_8010C97A;
|
||||
npc->currentWall = D_8010C97A;
|
||||
npc->pos.x = temp_x;
|
||||
npc->pos.z = temp_z;
|
||||
} else {
|
||||
@ -291,9 +291,9 @@ void npc_do_world_collision(Npc* npc) {
|
||||
temp_z = npc->pos.z;
|
||||
|
||||
if (!(npc->flags & NPC_FLAG_PARTICLE)) {
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
} else {
|
||||
phi_v0 = npc_test_move_taller_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_taller_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
}
|
||||
|
||||
if (phi_v0) {
|
||||
@ -309,9 +309,9 @@ void npc_do_world_collision(Npc* npc) {
|
||||
temp_y = npc->pos.y;
|
||||
temp_z = npc->pos.z;
|
||||
if (!(npc->flags & NPC_FLAG_PARTICLE)) {
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_simple_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
} else {
|
||||
phi_v0 = npc_test_move_taller_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
phi_v0 = npc_test_move_taller_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight, npc->collisionRadius);
|
||||
}
|
||||
|
||||
if (phi_v0 != 0) {
|
||||
@ -327,7 +327,7 @@ void npc_do_world_collision(Npc* npc) {
|
||||
temp_x = npc->pos.x;
|
||||
temp_y = npc->pos.y;
|
||||
temp_z = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight,
|
||||
npc->collisionRadius) != 0) {
|
||||
npc->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
npc->pos.x = temp_x;
|
||||
@ -340,7 +340,7 @@ void npc_do_world_collision(Npc* npc) {
|
||||
temp_x = npc->pos.x;
|
||||
temp_y = npc->pos.y;
|
||||
temp_z = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &temp_x, &temp_y, &temp_z, 0, temp_f0, npc->collisionHeight,
|
||||
npc->collisionRadius) != 0) {
|
||||
npc->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
npc->pos.x = temp_x;
|
||||
@ -378,9 +378,9 @@ void npc_do_gravity(Npc* npc) {
|
||||
yTemp = npc->pos.y + 13.0f;
|
||||
|
||||
if (!(npc->flags & NPC_FLAG_PARTICLE)) {
|
||||
hit = npc_raycast_down_sides(npc->unk_80, &xTemp, &yTemp, &zTemp, &length);
|
||||
hit = npc_raycast_down_sides(npc->collisionChannel, &xTemp, &yTemp, &zTemp, &length);
|
||||
} else {
|
||||
hit = npc_raycast_down_ahead(npc->unk_80, &xTemp, &yTemp, &zTemp, &length, npc->yaw,
|
||||
hit = npc_raycast_down_ahead(npc->collisionChannel, &xTemp, &yTemp, &zTemp, &length, npc->yaw,
|
||||
npc->collisionRadius);
|
||||
}
|
||||
|
||||
@ -388,7 +388,7 @@ void npc_do_gravity(Npc* npc) {
|
||||
npc->jumpVelocity = 0.0f;
|
||||
npc->flags |= NPC_FLAG_1000;
|
||||
npc->pos.y = yTemp;
|
||||
npc->unk_84 = D_8010C97A;
|
||||
npc->currentFloor = D_8010C97A;
|
||||
} else {
|
||||
npc->flags &= ~NPC_FLAG_1000;
|
||||
}
|
||||
@ -416,14 +416,14 @@ s32 func_800397E8(Npc* npc, f32 arg1) {
|
||||
z = npc->pos.z;
|
||||
|
||||
if (!(npc->flags & NPC_FLAG_PARTICLE)) {
|
||||
phi_v0 = npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &length);
|
||||
phi_v0 = npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &length);
|
||||
} else {
|
||||
phi_v0 = npc_raycast_down_ahead(npc->unk_80, &x, &y, &z, &length, npc->yaw, npc->collisionRadius);
|
||||
phi_v0 = npc_raycast_down_ahead(npc->collisionChannel, &x, &y, &z, &length, npc->yaw, npc->collisionRadius);
|
||||
}
|
||||
|
||||
if (phi_v0 != 0 && length <= oldLength) {
|
||||
npc->pos.y = y;
|
||||
npc->unk_84 = D_8010C97A;
|
||||
npc->currentFloor = D_8010C97A;
|
||||
npc->flags |= NPC_FLAG_1000;
|
||||
return 1;
|
||||
}
|
||||
@ -771,7 +771,7 @@ void npc_reload_all(void) {
|
||||
}
|
||||
}
|
||||
if (!(npc->flags & NPC_FLAG_NO_ANIMS_LOADED)) {
|
||||
if (!(npc->flags & NPC_FLAG_1000000) && (npc->unk_B4 != 0)) {
|
||||
if (!(npc->flags & NPC_FLAG_1000000) && (npc->palSwapType != 0)) {
|
||||
npc->spritePaletteList = spr_get_npc_palettes(npc->currentAnim.h);
|
||||
npc->paletteCount = 0;
|
||||
while (npc->spritePaletteList[npc->paletteCount] != -1) {
|
||||
@ -805,33 +805,33 @@ void set_npc_yaw(Npc* npc, f32 yaw) {
|
||||
}
|
||||
}
|
||||
|
||||
void npc_set_palswap_mode_A(Npc* npc, s32 arg1) {
|
||||
if (npc->unk_B4 != arg1) {
|
||||
npc->unk_B5 = npc->unk_B4;
|
||||
npc->unk_B4 = arg1;
|
||||
npc->unk_B7 = 0;
|
||||
npc->unk_B6 = 1;
|
||||
void npc_set_palswap_mode_A(Npc* npc, s32 mode) {
|
||||
if (npc->palSwapType != mode) {
|
||||
npc->palSwapPrevType = npc->palSwapType;
|
||||
npc->palSwapType = mode;
|
||||
npc->palSwapState = 0;
|
||||
npc->dirtyPalettes = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void npc_set_palswap_mode_B(Npc* npc, s32 arg1) {
|
||||
if (npc->unk_B4 != arg1) {
|
||||
npc->unk_B5 = npc->unk_B4;
|
||||
npc->unk_B4 = arg1;
|
||||
npc->unk_B7 = 0;
|
||||
npc->unk_B6 = -1;
|
||||
void npc_set_palswap_mode_B(Npc* npc, s32 mode) {
|
||||
if (npc->palSwapType != mode) {
|
||||
npc->palSwapPrevType = npc->palSwapType;
|
||||
npc->palSwapType = mode;
|
||||
npc->palSwapState = 0;
|
||||
npc->dirtyPalettes = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8003B420(Npc* npc) {
|
||||
if (npc->unk_B5 == 0) {
|
||||
npc->unk_B4 = 0;
|
||||
if (npc->palSwapPrevType == 0) {
|
||||
npc->palSwapType = 0;
|
||||
return;
|
||||
}
|
||||
npc->unk_B4 = npc->unk_B5;
|
||||
npc->unk_B5 = 0;
|
||||
npc->unk_B7 = 0;
|
||||
npc->unk_B6 = 1;
|
||||
npc->palSwapType = npc->palSwapPrevType;
|
||||
npc->palSwapPrevType = 0;
|
||||
npc->palSwapState = 0;
|
||||
npc->dirtyPalettes = 1;
|
||||
}
|
||||
|
||||
void npc_set_palswap_1(Npc* npc, s32 palIndexA, s32 palIndexB, s32 timeHoldA, s32 timeAB) {
|
||||
@ -849,7 +849,7 @@ void npc_set_palswap_2(Npc* npc, s32 timeHoldB, s32 timeBA, s32 palIndexC, s32 p
|
||||
}
|
||||
|
||||
void npc_draw_with_palswap(Npc* npc, s32 arg1, s32 arg2) {
|
||||
switch (npc->unk_B4) {
|
||||
switch (npc->palSwapType) {
|
||||
case 0:
|
||||
npc_draw_palswap_mode_0(npc, arg1, arg2);
|
||||
break;
|
||||
@ -869,10 +869,10 @@ void npc_draw_with_palswap(Npc* npc, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
void npc_draw_palswap_mode_0(Npc* npc, s32 arg1, s32 arg2) {
|
||||
if (npc->unk_B6 != 0) {
|
||||
if (npc->dirtyPalettes != 0) {
|
||||
npc->screenSpaceOffset2D[0] = 0.0f;
|
||||
npc->screenSpaceOffset2D[1] = 0.0f;
|
||||
npc->unk_B6 = 0;
|
||||
npc->dirtyPalettes = 0;
|
||||
npc->verticalStretch = 1.0f;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ void N(func_80240E90_BDFC20)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y + (*(enemy->territory->patrol.points + script->functionTemp[2])).y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
posY += (*(enemy->territory->patrol.points + script->functionTemp[2])).y;
|
||||
posW = posY - npc->pos.y;
|
||||
if (posW > 2.0) {
|
||||
|
@ -1058,7 +1058,7 @@ void N(func_80240E90_BE8A70)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y + script->functionTemp[2][enemy->territory->patrol.points].y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
posY += script->functionTemp[2][enemy->territory->patrol.points].y;
|
||||
posW = posY - npc->pos.y;
|
||||
if (posW > 2.0) {
|
||||
|
@ -689,7 +689,7 @@ void N(func_80241954_BFF1D4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = gPlayerStatusPtr->position.y;
|
||||
posZ = gPlayerStatusPtr->position.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (fabsf(npc->pos.y - posY) > 24.0) {
|
||||
npc->pos.y -= 1.8;
|
||||
} else {
|
||||
@ -735,7 +735,7 @@ void N(func_80241CA8_BFF528)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (!(npc->pos.y < (posY + temp_f20))) {
|
||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z);
|
||||
npc->pos.y = posY + temp_f20;
|
||||
@ -798,7 +798,7 @@ void N(func_80241F98_BFF818)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
s32 var;
|
||||
s32 var2;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY + temp_f26 + (temp_f20 * temp_f22);
|
||||
} else {
|
||||
npc->pos.y = temp_f24 + (temp_f20 * temp_f22);
|
||||
@ -1183,7 +1183,7 @@ ApiStatus N(func_802430C0_C00940)(Evt* script, s32 isInitialCall) {
|
||||
posZ = npc->pos.z;
|
||||
posW = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY;
|
||||
}
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ void N(func_802417F8_C37D28)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = gPlayerStatusPtr->position.y;
|
||||
posZ = gPlayerStatusPtr->position.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (fabsf(npc->pos.y - posY) > 24.0) {
|
||||
npc->pos.y -= 1.8;
|
||||
} else {
|
||||
@ -640,7 +640,7 @@ void N(func_80241B4C_C3807C)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (!(npc->pos.y < (posY + temp_f20))) {
|
||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z);
|
||||
npc->pos.y = posY + temp_f20;
|
||||
@ -703,7 +703,7 @@ void N(func_80241E3C_C3836C)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
s32 var;
|
||||
s32 var2;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY + temp_f26 + (temp_f20 * temp_f22);
|
||||
} else {
|
||||
npc->pos.y = temp_f24 + (temp_f20 * temp_f22);
|
||||
|
@ -1053,7 +1053,7 @@ ApiStatus N(func_80240B94_C40944)(Evt* script, s32 isInitialCall) {
|
||||
posZ = npc->pos.z;
|
||||
posW = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY;
|
||||
}
|
||||
}
|
||||
@ -1380,7 +1380,7 @@ void N(func_80242F94_C42D44)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = gPlayerStatusPtr->position.y;
|
||||
posZ = gPlayerStatusPtr->position.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (fabsf(npc->pos.y - posY) > 24.0) {
|
||||
npc->pos.y -= 1.8;
|
||||
} else {
|
||||
@ -1426,7 +1426,7 @@ void N(func_802432E8_C43098)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (!(npc->pos.y < (posY + temp_f20))) {
|
||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z);
|
||||
npc->pos.y = posY + temp_f20;
|
||||
@ -1489,7 +1489,7 @@ void N(func_802435D8_C43388)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
s32 var;
|
||||
s32 var2;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY + temp_f26 + (temp_f20 * temp_f22);
|
||||
} else {
|
||||
npc->pos.y = temp_f24 + (temp_f20 * temp_f22);
|
||||
|
@ -1181,7 +1181,7 @@ void N(func_80242C1C_C497FC)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = gPlayerStatusPtr->position.y;
|
||||
posZ = gPlayerStatusPtr->position.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (fabsf(npc->pos.y - posY) > 24.0) {
|
||||
npc->pos.y -= 1.8;
|
||||
} else {
|
||||
@ -1227,7 +1227,7 @@ void N(func_80242F70_C49B50)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (!(npc->pos.y < (posY + temp_f20))) {
|
||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z);
|
||||
npc->pos.y = posY + temp_f20;
|
||||
@ -1290,7 +1290,7 @@ void N(func_80243260_C49E40)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
s32 var;
|
||||
s32 var2;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY + temp_f26 + (temp_f20 * temp_f22);
|
||||
} else {
|
||||
npc->pos.y = temp_f24 + (temp_f20 * temp_f22);
|
||||
|
@ -626,7 +626,7 @@ ApiStatus N(func_80241464_C50974)(Evt* script, s32 isInitialCall) {
|
||||
posZ = npc->pos.z;
|
||||
posW = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY;
|
||||
}
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ ApiStatus N(func_80240B94_C56AD4)(Evt* script, s32 isInitialCall) {
|
||||
posZ = npc->pos.z;
|
||||
posW = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY;
|
||||
}
|
||||
}
|
||||
|
@ -1009,7 +1009,7 @@ void N(func_80240D80_CAFAC0)(Evt* script, NpcAISettings* npcAISettings, EnemyTer
|
||||
phi_f24 = 0.0f;
|
||||
phi_f26 = 0.0f;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_arg8, &subroutine_arg9, &subroutine_argA, npc->moveSpeed * 4.5, temp_f20,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_arg8, &subroutine_arg9, &subroutine_argA, npc->moveSpeed * 4.5, temp_f20,
|
||||
npc->collisionHeight, npc->collisionRadius) != 0) {
|
||||
phi_f22 = dist2D(npc->pos.x, npc->pos.z, subroutine_arg8, subroutine_argA);
|
||||
|
||||
@ -1017,7 +1017,7 @@ void N(func_80240D80_CAFAC0)(Evt* script, NpcAISettings* npcAISettings, EnemyTer
|
||||
subroutine_argC = npc->pos.y;
|
||||
subroutine_argD = npc->pos.z;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argB, &subroutine_argC, &subroutine_argD, npc->moveSpeed * 4.5,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_argB, &subroutine_argC, &subroutine_argD, npc->moveSpeed * 4.5,
|
||||
clamp_angle(temp_f20 + 35.0f), npc->collisionHeight, npc->collisionRadius) != 0) {
|
||||
phi_f24 = dist2D(npc->pos.x, npc->pos.z, subroutine_argB, subroutine_argD);
|
||||
}
|
||||
@ -1026,7 +1026,7 @@ void N(func_80240D80_CAFAC0)(Evt* script, NpcAISettings* npcAISettings, EnemyTer
|
||||
subroutine_argF = npc->pos.y;
|
||||
subroutine_arg10 = npc->pos.z;
|
||||
|
||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argE, &subroutine_argF, &subroutine_arg10, npc->moveSpeed * 4.5,
|
||||
if (npc_test_move_simple_without_slipping(npc->collisionChannel, &subroutine_argE, &subroutine_argF, &subroutine_arg10, npc->moveSpeed * 4.5,
|
||||
clamp_angle(temp_f20 - 35.0f), npc->collisionHeight, npc->collisionRadius) != 0) {
|
||||
phi_f26 = dist2D(npc->pos.x, npc->pos.z, subroutine_argE, subroutine_arg10);
|
||||
}
|
||||
|
@ -1346,7 +1346,7 @@ void N(func_80241704_CC4F14)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f24 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
|
||||
@ -1360,7 +1360,7 @@ void N(func_80241704_CC4F14)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->moveToPos.y = y + temp_f24;
|
||||
script->functionTemp[0] = 12;
|
||||
return;
|
||||
@ -1383,7 +1383,7 @@ void N(func_80241704_CC4F14)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
y = temp_f22;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
y += temp_f24;
|
||||
w = y - temp_f22;
|
||||
if (w > 2.0) {
|
||||
@ -1429,7 +1429,7 @@ void N(func_80241B68_CC5378)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f22 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
if (func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 1) != 0) {
|
||||
@ -1870,7 +1870,7 @@ ApiStatus N(func_80242A6C_CC627C)(Evt* script, s32 isInitialCall) {
|
||||
x2 = npc->pos.x;
|
||||
y2 = npc->pos.y;
|
||||
z2 = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &x2, &y2, &z2, npc->moveSpeed, npc->yaw, npc->collisionHeight,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x2, &y2, &z2, npc->moveSpeed, npc->yaw, npc->collisionHeight,
|
||||
npc->collisionRadius) == 0) {
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
} else {
|
||||
@ -1884,7 +1884,7 @@ ApiStatus N(func_80242A6C_CC627C)(Evt* script, s32 isInitialCall) {
|
||||
y2 = npc->pos.y + 13.0;
|
||||
z2 = npc->pos.z;
|
||||
w2 = fabsf(npc->jumpVelocity) + 16.0;
|
||||
if ((npc_raycast_down_sides(npc->unk_80, &x2, &y2, &z2, &w2) != 0) && (w2 <= (fabsf(npc->jumpVelocity) + 13.0))) {
|
||||
if ((npc_raycast_down_sides(npc->collisionChannel, &x2, &y2, &z2, &w2) != 0) && (w2 <= (fabsf(npc->jumpVelocity) + 13.0))) {
|
||||
npc->pos.y = y2;
|
||||
enemy->territory->wander.point.x = npc->pos.x;
|
||||
enemy->territory->wander.point.y = npc->pos.y;
|
||||
|
@ -750,7 +750,7 @@ void N(func_802415B0_CD8890)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f24 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
|
||||
@ -764,7 +764,7 @@ void N(func_802415B0_CD8890)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
y = npc->pos.y;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->moveToPos.y = y + temp_f24;
|
||||
script->functionTemp[0] = 12;
|
||||
return;
|
||||
@ -787,7 +787,7 @@ void N(func_802415B0_CD8890)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
y = temp_f22;
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
y += temp_f24;
|
||||
w = y - temp_f22;
|
||||
if (w > 2.0) {
|
||||
@ -833,7 +833,7 @@ void N(func_80241A14_CD8CF4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
||||
z = npc->pos.z;
|
||||
w = 1000.0f;
|
||||
|
||||
npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w);
|
||||
npc->pos.y = y + temp_f22 + (sin_deg(enemy->varTable[2]) * temp_f20);
|
||||
enemy->varTable[2] = clamp_angle(enemy->varTable[2] + 0xC);
|
||||
if (func_800490B4(territory, enemy, aiSettings->chaseRadius, aiSettings->unk_28.f, 1) != 0) {
|
||||
@ -1274,7 +1274,7 @@ ApiStatus N(func_80242918_CD9BF8)(Evt* script, s32 isInitialCall) {
|
||||
x2 = npc->pos.x;
|
||||
y2 = npc->pos.y;
|
||||
z2 = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &x2, &y2, &z2, npc->moveSpeed, npc->yaw, npc->collisionHeight,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x2, &y2, &z2, npc->moveSpeed, npc->yaw, npc->collisionHeight,
|
||||
npc->collisionRadius) == 0) {
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
} else {
|
||||
@ -1288,7 +1288,7 @@ ApiStatus N(func_80242918_CD9BF8)(Evt* script, s32 isInitialCall) {
|
||||
y2 = npc->pos.y + 13.0;
|
||||
z2 = npc->pos.z;
|
||||
w2 = fabsf(npc->jumpVelocity) + 16.0;
|
||||
if ((npc_raycast_down_sides(npc->unk_80, &x2, &y2, &z2, &w2) != 0) && (w2 <= (fabsf(npc->jumpVelocity) + 13.0))) {
|
||||
if ((npc_raycast_down_sides(npc->collisionChannel, &x2, &y2, &z2, &w2) != 0) && (w2 <= (fabsf(npc->jumpVelocity) + 13.0))) {
|
||||
npc->pos.y = y2;
|
||||
enemy->territory->wander.point.x = npc->pos.x;
|
||||
enemy->territory->wander.point.y = npc->pos.y;
|
||||
|
@ -14,7 +14,7 @@ static s32 B_80240FD0_tst_04;
|
||||
ApiStatus func_80240000_B1B570(Evt* script, s32 isInitialCall) {
|
||||
Npc* npc = get_npc_safe(0);
|
||||
|
||||
if (npc != NULL && npc->unk_84 == 5) {
|
||||
if (npc != NULL && npc->currentFloor == 5) {
|
||||
f32 sinTheta;
|
||||
f32 cosTheta;
|
||||
f32 xTemp;
|
||||
|
@ -22,7 +22,7 @@ void N(UnkFunc10)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* t
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &posX, &posY, &posZ,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &posX, &posY, &posZ,
|
||||
1.0f, npc->yaw, npc->collisionHeight, npc->collisionRadius)) {
|
||||
phi_s1 = 1;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ void N(UnkFunc4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* te
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
phi_v0 = npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
phi_v0 = npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
}
|
||||
|
||||
if (phi_v0) {
|
||||
|
@ -21,7 +21,7 @@ void N(UnkFunc5)(Npc* npc, Enemy* enemy, Evt* script, NpcAISettings* aiSettings)
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
enemy->varTable[2] = 0;
|
||||
enemy->varTable[9] = 0;
|
||||
enemy->varTable[3] = ((posW * 100.0) + 0.5);
|
||||
|
@ -28,7 +28,7 @@ void N(UnkFunc6)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* te
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
phi_v0 = npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
phi_v0 = npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
} else {
|
||||
phi_v0 = FALSE;
|
||||
}
|
||||
@ -72,7 +72,7 @@ void N(UnkFunc6)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* te
|
||||
posY = npc->pos.y + npc->collisionHeight;
|
||||
posZ = npc->pos.z;
|
||||
posW = (fabsf(npc->jumpVelocity) + npc->collisionHeight) + 10.0;
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
if (posW <= (npc->collisionHeight + fabsf(npc->jumpVelocity))) {
|
||||
npc->jumpVelocity = 0.0f;
|
||||
npc->pos.y = posY;
|
||||
|
@ -20,7 +20,7 @@ void N(UnkNpcAIFunc12)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
f2 = npc->pos.y;
|
||||
f3 = npc->pos.z;
|
||||
|
||||
temp = npc_test_move_simple_with_slipping(npc->unk_80, &f1, &f2, &f3, npc->moveSpeed, npc->yaw, npc->collisionHeight, npc->collisionRadius);
|
||||
temp = npc_test_move_simple_with_slipping(npc->collisionChannel, &f1, &f2, &f3, npc->moveSpeed, npc->yaw, npc->collisionHeight, npc->collisionRadius);
|
||||
if (temp == 0) {
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ void N(UnkNpcAIFunc34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
y = npc->pos.y + npc->collisionHeight;
|
||||
z = npc->pos.z;
|
||||
w = npc->collisionHeight + 3.0;
|
||||
if ((npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &w) != 0) && (w < npc->collisionHeight)) {
|
||||
if ((npc_raycast_down_sides(npc->collisionChannel, &x, &y, &z, &w) != 0) && (w < npc->collisionHeight)) {
|
||||
flag = 1;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ void N(UnkNpcAIFunc35)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
if (vt1 < (vt3 - posW)) {
|
||||
enemy->varTable[0] |= 0x10;
|
||||
}
|
||||
@ -48,7 +48,7 @@ void N(UnkNpcAIFunc35)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
posY = vt4;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
|
||||
yTemp = posY;
|
||||
yTemp += vt3;
|
||||
@ -75,7 +75,7 @@ void N(UnkNpcAIFunc35)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
hit = npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW);
|
||||
hit = npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW);
|
||||
}
|
||||
|
||||
if (hit) {
|
||||
|
@ -27,7 +27,7 @@ void N(UnkNpcAIFunc36)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
z = npc->pos.z;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &x, &y, &z, 25.0f,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &x, &y, &z, 25.0f,
|
||||
npc->yaw, npc->collisionHeight, npc->collisionRadius))
|
||||
{
|
||||
npc->yaw += 30.0;
|
||||
|
@ -37,7 +37,7 @@ void N(UnkNpcAIFunc37)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
collHeight = npc->collisionHeight;
|
||||
collRadius = npc->collisionRadius;
|
||||
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &posX, &posY, &posZ, moveSpeed, npc->yaw, collHeight,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &posX, &posY, &posZ, moveSpeed, npc->yaw, collHeight,
|
||||
collRadius * 1.2) == 0)
|
||||
{
|
||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||
@ -52,7 +52,7 @@ void N(UnkNpcAIFunc37)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
posZ = npc->pos.z;
|
||||
posW = fabsf(npc->jumpVelocity) + 16.0;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW) != 0 &&
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW) != 0 &&
|
||||
posW <= fabsf(npc->jumpVelocity) + 13.0)
|
||||
{
|
||||
npc->jumpVelocity = 0.0f;
|
||||
|
@ -12,7 +12,7 @@ void N(UnkNpcAIFunc39)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
posX = npc->pos.x;
|
||||
posY = npc->pos.y;
|
||||
posZ = npc->pos.z;
|
||||
if (npc_test_move_simple_with_slipping(npc->unk_80, &posX, &posY, &posZ, npc->moveSpeed, npc->yaw,
|
||||
if (npc_test_move_simple_with_slipping(npc->collisionChannel, &posX, &posY, &posZ, npc->moveSpeed, npc->yaw,
|
||||
npc->collisionHeight, npc->collisionRadius))
|
||||
{
|
||||
npc->moveSpeed = 0.0f;
|
||||
@ -26,13 +26,13 @@ void N(UnkNpcAIFunc39)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThi
|
||||
sp34 = 100.0f;
|
||||
posZ = npc->pos.z;
|
||||
posW = 1000.0f;
|
||||
npc_raycast_down_sides(npc->unk_80, &posX, &sp34, &posZ, &posW);
|
||||
npc_raycast_down_sides(npc->collisionChannel, &posX, &sp34, &posZ, &posW);
|
||||
|
||||
posX = npc->pos.x;
|
||||
posY = npc->pos.y + 13.0;
|
||||
posZ = npc->pos.z;
|
||||
posW = fabsf(npc->jumpVelocity) + 16.0;
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW) && posW <= fabsf(npc->jumpVelocity) + 13.0) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW) && posW <= fabsf(npc->jumpVelocity) + 13.0) {
|
||||
npc->jumpVelocity = 0.0f;
|
||||
npc->pos.y = posY;
|
||||
npc->flags &= ~NPC_FLAG_NO_Y_MOVEMENT;
|
||||
|
@ -44,7 +44,7 @@ ApiStatus N(UnkNpcAIMainFunc)(Evt* script, s32 isInitialCall) {
|
||||
posZ = npc->pos.z;
|
||||
posW = 100.0f;
|
||||
|
||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
||||
if (npc_raycast_down_sides(npc->collisionChannel, &posX, &posY, &posZ, &posW)) {
|
||||
npc->pos.y = posY;
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ s32 func_802BD17C_31B19C(Npc* kooper) {
|
||||
void world_kooper_init(Npc* kooper) {
|
||||
kooper->collisionHeight = 37;
|
||||
kooper->collisionRadius = 24;
|
||||
kooper->unk_80 = 0x00010000;
|
||||
kooper->collisionChannel = 0x00010000;
|
||||
D_802BEC54 = 0;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ void func_802BD100_320C50(void) {
|
||||
void world_lakilester_init(Npc* npc) {
|
||||
npc->collisionHeight = 38;
|
||||
npc->collisionRadius = 36;
|
||||
npc->unk_80 = 0x10000;
|
||||
npc->collisionChannel = 0x10000;
|
||||
D_802BFF18 = 0;
|
||||
D_802BFF04 = 0;
|
||||
D_802BFF08 = 0;
|
||||
@ -284,9 +284,9 @@ void func_802BDA90_3215E0(Npc* lakilester) {
|
||||
f32 y = lakilester->moveToPos.y;
|
||||
f32 z = lakilester->pos.z;
|
||||
|
||||
if (npc_test_move_complex_with_slipping(lakilester->unk_80, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
if (npc_test_move_complex_with_slipping(lakilester->collisionChannel, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
lakilester->flags |= (NPC_FLAG_4000 | NPC_FLAG_NO_PROJECT_SHADOW);
|
||||
lakilester->unk_86 = D_8010C97A;
|
||||
lakilester->currentWall = D_8010C97A;
|
||||
lakilester->pos.x = x;
|
||||
lakilester->pos.z = z;
|
||||
} else {
|
||||
@ -298,7 +298,7 @@ void func_802BDA90_3215E0(Npc* lakilester) {
|
||||
y = lakilester->moveToPos.y;
|
||||
z = lakilester->pos.z;
|
||||
|
||||
if (npc_test_move_taller_with_slipping(lakilester->unk_80, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
if (npc_test_move_taller_with_slipping(lakilester->collisionChannel, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
lakilester->pos.x = x;
|
||||
lakilester->pos.z = z;
|
||||
lakilester->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
@ -311,7 +311,7 @@ void func_802BDA90_3215E0(Npc* lakilester) {
|
||||
y = lakilester->moveToPos.y;
|
||||
z = lakilester->pos.z;
|
||||
|
||||
if (npc_test_move_taller_with_slipping(lakilester->unk_80, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
if (npc_test_move_taller_with_slipping(lakilester->collisionChannel, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
lakilester->pos.x = x;
|
||||
lakilester->pos.z = z;
|
||||
lakilester->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
@ -324,7 +324,7 @@ void func_802BDA90_3215E0(Npc* lakilester) {
|
||||
y = lakilester->moveToPos.y;
|
||||
z = lakilester->pos.z;
|
||||
|
||||
if (npc_test_move_simple_with_slipping(lakilester->unk_80, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
if (npc_test_move_simple_with_slipping(lakilester->collisionChannel, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
lakilester->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
lakilester->pos.x = x;
|
||||
lakilester->pos.z = z;
|
||||
@ -337,7 +337,7 @@ void func_802BDA90_3215E0(Npc* lakilester) {
|
||||
y = lakilester->moveToPos.y;
|
||||
z = lakilester->pos.z;
|
||||
|
||||
if (npc_test_move_simple_with_slipping(lakilester->unk_80, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
if (npc_test_move_simple_with_slipping(lakilester->collisionChannel, &x, &y, &z, 0.0f, temp_f0, lakilester->collisionHeight, temp_f20)) {
|
||||
lakilester->flags |= NPC_FLAG_NO_PROJECT_SHADOW;
|
||||
lakilester->pos.x = x;
|
||||
lakilester->pos.z = z;
|
||||
|
@ -121,7 +121,7 @@ EvtSource world_sushie_use_ability = {
|
||||
void world_sushie_init(Npc* sushie) {
|
||||
sushie->collisionHeight = 24;
|
||||
sushie->collisionRadius = 36;
|
||||
sushie->unk_80 = 0x10000;
|
||||
sushie->collisionChannel = 0x10000;
|
||||
D_802BFEEC = 0;
|
||||
bss_802BFEE4 = 0;
|
||||
bss_802BFEE8 = 0;
|
||||
@ -305,7 +305,7 @@ s32 func_802BFAB8_320828(Evt* script, s32 isInitialCall) {
|
||||
partnerNPC->pos.x = playerStatus->position.x;
|
||||
partnerNPC->pos.z = playerStatus->position.z;
|
||||
partnerNPC->pos.y = playerStatus->position.y;
|
||||
func_802BD368_31E0D8(partnerNPC->unk_80, partnerNPC->pos.x, partnerNPC->pos.y, partnerNPC->pos.z,
|
||||
func_802BD368_31E0D8(partnerNPC->collisionChannel, partnerNPC->pos.x, partnerNPC->pos.y, partnerNPC->pos.z,
|
||||
partnerNPC->yaw, partnerNPC->collisionRadius * 0.5f);
|
||||
partnerNPC->pos.y = D_802BFEE0 - (partnerNPC->collisionHeight * 0.5f);
|
||||
temp_f0 = atan2(partnerNPC->pos.x, partnerNPC->pos.z, script->varTable[1], script->varTable[3]);
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
extern s32 D_80108068[];
|
||||
extern s32 D_801083D8[];
|
||||
extern f32 D_8010CFC0;
|
||||
extern f32 wPartnerTetherDistance;
|
||||
extern s16 D_8010CFC8;
|
||||
extern s16 D_8010CFCA;
|
||||
extern s16 D_8010CFCE;
|
||||
@ -83,10 +83,10 @@ s32 D_800F7FFC = 7;
|
||||
s32 D_800F8000[] = { 8, 0, 0, 0 };
|
||||
s32 D_800F8010[] = { _3251D0_ROM_START, _3251D0_ROM_END, (s32) &D_802C05CC, 0x00000000 };
|
||||
s32 D_800F8020 = 0;
|
||||
s32 D_800F8024 = 0;
|
||||
s32 D_800F8028 = 0;
|
||||
s32 D_800F802C = 0;
|
||||
f32 D_800F8030 = 0.0f;
|
||||
s32 wPartnerMoveGoalX = 0;
|
||||
s32 wPartnerMoveGoalZ = 0;
|
||||
s32 wPartnerMoveTime = 0;
|
||||
f32 wPartnerMoveSpeed = 0.0f;
|
||||
s8 D_800F8034[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
s16 D_800F803A = 0;
|
||||
|
||||
@ -753,7 +753,7 @@ INCLUDE_ASM(void, "world/partners", partner_flying_update_motion, Npc* partner);
|
||||
INCLUDE_ASM(s32, "world/partners", partner_flying_follow_player);
|
||||
|
||||
s32 partner_init_put_away(Npc* arg0) {
|
||||
arg0->unk_80 = 0x10000;
|
||||
arg0->collisionChannel = 0x10000;
|
||||
D_8010CFC8 = 0;
|
||||
arg0->flags |= 0x100;
|
||||
return D_8010CFC8;
|
||||
@ -829,7 +829,7 @@ s32 partner_put_away(Npc* partner) {
|
||||
}
|
||||
|
||||
s32 partner_init_get_out(Npc* arg0) {
|
||||
arg0->unk_80 = 0x10000;
|
||||
arg0->collisionChannel = 0x10000;
|
||||
D_8010CFC8 = 0;
|
||||
arg0->flags |= 0x100;
|
||||
return D_8010CFC8;
|
||||
@ -856,17 +856,17 @@ void enable_partner_ai(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void partner_set_tether_distance(f32 arg0) {
|
||||
D_8010CFC0 = arg0;
|
||||
void partner_set_tether_distance(f32 dist) {
|
||||
wPartnerTetherDistance = dist;
|
||||
}
|
||||
|
||||
void repartner_set_tether_distance(void) {
|
||||
D_8010CFC0 = 40.0f;
|
||||
wPartnerTetherDistance = 40.0f;
|
||||
}
|
||||
|
||||
void partner_set_goal_pos(s32 arg0, s32 arg1) {
|
||||
D_800F8024 = arg0;
|
||||
D_800F8028 = arg1;
|
||||
void partner_set_goal_pos(s32 x, s32 z) {
|
||||
wPartnerMoveGoalX = x;
|
||||
wPartnerMoveGoalZ = z;
|
||||
}
|
||||
|
||||
void func_800EF3D4(s16 arg0) {
|
||||
@ -876,7 +876,7 @@ void func_800EF3D4(s16 arg0) {
|
||||
void func_800EF3E4(void) {
|
||||
D_8010CFC8 = 15;
|
||||
D_8010CFCA = 0;
|
||||
D_800F802C = 10;
|
||||
wPartnerMoveTime = 10;
|
||||
D_8010CFCE = 0;
|
||||
}
|
||||
|
||||
@ -935,20 +935,20 @@ void partner_disable_input(void) {
|
||||
|
||||
void partner_do_player_collision(Npc* partner) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
f32 sp28;
|
||||
f32 sp2C;
|
||||
f32 sp30;
|
||||
f32 sp34;
|
||||
f32 sp38;
|
||||
f32 sp3C;
|
||||
f32 sp40;
|
||||
f32 playerScreenX;
|
||||
f32 playerScreenY;
|
||||
f32 playerScreenZ;
|
||||
f32 partnerScreenX;
|
||||
f32 partnerScreenY;
|
||||
f32 partnerScreenZ;
|
||||
f32 W;
|
||||
|
||||
transform_point(gCameras->perspectiveMatrix, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 1.0f, &sp28, &sp2C, &sp30, &sp34);
|
||||
transform_point(gCameras->perspectiveMatrix, partner->pos.x, partner->pos.y, partner->pos.z, 1.0f, &sp38, &sp3C, &sp40, &sp34);
|
||||
sp28 = fabsf(sp28 - sp38);
|
||||
sp2C = fabsf(sp2C - sp3C);
|
||||
sp30 = fabsf(sp30 - sp40);
|
||||
if (sp28 <= (partner->collisionRadius + playerStatus->colliderDiameter) * 0.9f && sp2C <= partner->collisionHeight + playerStatus->colliderHeight && sp30 <= 4.0) {
|
||||
transform_point(gCameras->perspectiveMatrix, playerStatus->position.x, playerStatus->position.y, playerStatus->position.z, 1.0f, &playerScreenX, &playerScreenY, &playerScreenZ, &W);
|
||||
transform_point(gCameras->perspectiveMatrix, partner->pos.x, partner->pos.y, partner->pos.z, 1.0f, &partnerScreenX, &partnerScreenY, &partnerScreenZ, &W);
|
||||
playerScreenX = fabsf(playerScreenX - partnerScreenX);
|
||||
playerScreenY = fabsf(playerScreenY - partnerScreenY);
|
||||
playerScreenZ = fabsf(playerScreenZ - partnerScreenZ);
|
||||
if (playerScreenX <= (partner->collisionRadius + playerStatus->colliderDiameter) * 0.9f && playerScreenY <= partner->collisionHeight + playerStatus->colliderHeight && playerScreenZ <= 4.0) {
|
||||
npc_move_heading(partner, 1.0f, atan2(playerStatus->position.x, playerStatus->position.z, partner->pos.x, partner->pos.z));
|
||||
add_vec2D_polar(&partner->pos.x, &partner->pos.z, 2.0f, gCameras[gCurrentCameraID].currentYaw);
|
||||
}
|
||||
|
@ -216,13 +216,13 @@ dlabel MerleeRunOut
|
||||
.word 0x00000043, 0x00000001, HasMerleeCastsLeft, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000001, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000003, ShowMessageBox, 0x00000003, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel MerleeAttackBonus
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000043, 0x00000003, ShowMessageBox, 0x00000000, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000043, 0x00000003, ShowMessageBox, 0x00000000, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel MerleeDefenseBonus
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000003, GetStatusFlags, 0x00000000, 0xFE363C80, 0x00000010, 0x00000002, 0xFE363C80, 0x0035D000, 0x00000008, 0x00000001, 0x00000016, 0x00000012, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000013, 0x00000000, 0x00000043, 0x00000003, ShowMessageBox, 0x00000001, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000003, GetStatusFlags, 0x00000000, 0xFE363C80, 0x00000010, 0x00000002, 0xFE363C80, 0x0035D000, 0x00000008, 0x00000001, 0x00000016, 0x00000012, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000013, 0x00000000, 0x00000043, 0x00000003, ShowMessageBox, 0x00000001, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel MerleeExpBonus
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000043, 0x00000003, ShowMessageBox, 0x00000002, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000001, func_80261530, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000013, 0x00000043, 0x00000004, SetBattleCamTarget, 0x00000000, 0x00000050, 0x00000000, 0x00000043, 0x00000002, SetBattleCamOffsetZ, 0x00000000, 0x00000043, 0x00000002, SetBattleCamZoom, 0x000000F6, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000014, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00040000, 0x00000001, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFF6, 0x00000022, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0x00000000, 0x00000041, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616F4, 0x00000059, 0x00000000, 0x00000043, 0x00000001, func_80261648, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, func_802619B4, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000002, 0x00000043, 0x00000002, MoveBattleCamOver, 0x00000004, 0x00000043, 0x00000001, func_802615C8, 0x00000008, 0x00000001, 0x00000014, 0x00000058, 0x00000000, 0x00000043, 0x00000001, func_802616B4, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00002075, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802613BC, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80261478, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, SetActorJumpGravity, 0xFFFFFF81, 0xF24A81B4, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00010009, 0x00000043, 0x00000005, SetGoalPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_80273444, 0x00000012, 0x00000000, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010009, 0x00000008, 0x00000001, 0x00000004, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000043, 0x00000003, ShowMessageBox, 0x00000002, 0x0000003C, 0x00000043, 0x00000001, WaitForMessageBoxDone, 0x00000046, 0x00000001, MerleeRunOut, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel PlayerHappy
|
||||
.word 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000000, 0x00000043, 0x00000002, func_8024E6B4, 0x00000002, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010032, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802619E8, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0x00000000, 0x00000027, 0x00000002, 0xFE363C81, 0x00000023, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C83, 0xFE363C8B, 0x0000000D, 0x00000002, 0xFE363C83, 0x00000000, 0x00000043, 0x00000005, FXRecoverHP, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000013, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C80, 0x00000014, 0x00000027, 0x00000002, 0xFE363C81, 0x00000019, 0x0000000D, 0x00000002, 0xFE363C8C, 0x00000000, 0x00000043, 0x00000005, FXRecoverFP, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0xFE363C8C, 0x00000013, 0x00000000, 0x00000024, 0x00000002, 0xFE363C83, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C83, 0xFE363C8B, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000027, 0x00000002, 0xFE363C81, 0x00000019, 0x00000043, 0x00000005, func_802D7520, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0xFE363C83, 0x00000008, 0x00000001, 0x0000000A, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8A, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000005, 0x00000001, 0xFE363C80, 0x00000043, 0x00000001, IncrementPlayerHP, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8B, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000005, 0x00000001, 0xFE363C80, 0x00000043, 0x00000001, IncrementPlayerHP, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000024, 0x00000002, 0xFE363C80, 0xFE363C8C, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000005, 0x00000001, 0xFE363C80, 0x00000043, 0x00000001, IncrementPlayerFP, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000004, SetAnimation, 0xFFFFFF81, 0x00000000, 0x00010002, 0x00000043, 0x00000001, func_80261B40, 0x00000043, 0x00000003, UseIdleAnimation, 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
@ -9,7 +9,7 @@ dlabel D_80240CBC_BC374C
|
||||
.short 0x0032, 0x003C, 0x00C8, 0x00F0
|
||||
|
||||
dlabel D_80240CC4_BC3754
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_80240000_BC2A90, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_8024000C_BC2A9C, 0x00000043, 0x00000001, func_80240194_BC2C24, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_80240000_BC2A90, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_8024000C_BC2A9C, 0x00000043, 0x00000001, func_80240194_BC2C24, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel D_80240D70_BC3800
|
||||
.word 0x00000043, 0x00000003, BindNpcIdle, 0xFFFFFFFF, D_80240CC4_BC3754, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
@ -9,7 +9,7 @@ dlabel D_8024100C_BCE06C
|
||||
.short 0x0032, 0x003C, 0x00C8, 0x00F0
|
||||
|
||||
dlabel D_80241014_BCE074
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_802407A0_BCD800, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_802407AC_BCD80C, 0x00000043, 0x00000001, func_80240934_BCD994, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_802407A0_BCD800, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_802407AC_BCD80C, 0x00000043, 0x00000001, func_80240934_BCD994, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel D_802410C0_BCE120
|
||||
.word 0x00000043, 0x00000003, BindNpcIdle, 0xFFFFFFFF, D_80241014_BCE074, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
@ -9,7 +9,7 @@ dlabel D_8024292C_BD151C
|
||||
.short 0x0032, 0x003C, 0x00C8, 0x00F0
|
||||
|
||||
dlabel D_80242934_BD1524
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_802402C0_BCEEB0, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_802402CC_BCEEBC, 0x00000043, 0x00000001, func_80240454_BCF044, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_802402C0_BCEEB0, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_802402CC_BCEEBC, 0x00000043, 0x00000001, func_80240454_BCF044, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel D_802429E0_BD15D0
|
||||
.word 0x00000043, 0x00000003, BindNpcIdle, 0xFFFFFFFF, D_80242934_BD1524, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
@ -96,7 +96,7 @@ dlabel D_80244FEC_BD885C
|
||||
.short 0x0032, 0x003C, 0x00C8, 0x00F0
|
||||
|
||||
dlabel D_80244FF4_BD8864
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_80240FD8_BD4848, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_80240FE4_BD4854, 0x00000043, 0x00000001, func_8024116C_BD49DC, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, func_802D0244, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
.word 0x00000024, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C81, 0x00000000, 0x00000043, 0x00000001, func_80240FD8_BD4848, 0x00000005, 0x00000001, 0x00000000, 0x00000043, 0x00000001, func_80240FE4_BD4854, 0x00000043, 0x00000001, func_8024116C_BD49DC, 0x00000043, 0x00000007, func_802CFD30, 0xFFFFFFFF, 0x00000007, 0xFE363C80, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000003, SetNpcRenderMode, 0xFFFFFFFF, 0x00000011, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
||||
dlabel D_802450A0_BD8910
|
||||
.word 0x00000043, 0x00000003, BindNpcIdle, 0xFFFFFFFF, D_80244FF4_BD8864, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
||||
|
@ -159,8 +159,8 @@ glabel reset_player_status
|
||||
/* 7B768 800E22B8 E4420064 */ swc1 $f2, 0x64($v0)
|
||||
/* 7B76C 800E22BC 0C039668 */ jal phys_reset_spin_history
|
||||
/* 7B770 800E22C0 E4440068 */ swc1 $f4, 0x68($v0)
|
||||
/* 7B774 800E22C4 3C048011 */ lui $a0, %hi(D_8010F250)
|
||||
/* 7B778 800E22C8 2484F250 */ addiu $a0, $a0, %lo(D_8010F250)
|
||||
/* 7B774 800E22C4 3C048011 */ lui $a0, %hi(gPlayerSpinState)
|
||||
/* 7B778 800E22C8 2484F250 */ addiu $a0, $a0, %lo(gPlayerSpinState)
|
||||
/* 7B77C 800E22CC 0C00A580 */ jal mem_clear
|
||||
/* 7B780 800E22D0 24050034 */ addiu $a1, $zero, 0x34
|
||||
/* 7B784 800E22D4 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
|
@ -12,8 +12,8 @@ glabel phys_update_action_state
|
||||
/* 7EEF8 800E5A48 3C108011 */ lui $s0, %hi(gPlayerStatus)
|
||||
/* 7EEFC 800E5A4C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus)
|
||||
/* 7EF00 800E5A50 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 7EF04 800E5A54 3C118011 */ lui $s1, %hi(D_8010F250)
|
||||
/* 7EF08 800E5A58 2631F250 */ addiu $s1, $s1, %lo(D_8010F250)
|
||||
/* 7EF04 800E5A54 3C118011 */ lui $s1, %hi(gPlayerSpinState)
|
||||
/* 7EF08 800E5A58 2631F250 */ addiu $s1, $s1, %lo(gPlayerSpinState)
|
||||
/* 7EF0C 800E5A5C AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 7EF10 800E5A60 AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 7EF14 800E5A64 AFB20018 */ sw $s2, 0x18($sp)
|
||||
|
@ -26,8 +26,8 @@ glabel func_802B6000_E25D60
|
||||
/* E25D8C 802B602C F7B60040 */ sdc1 $f22, 0x40($sp)
|
||||
/* E25D90 802B6030 F7B40038 */ sdc1 $f20, 0x38($sp)
|
||||
/* E25D94 802B6034 8E220000 */ lw $v0, ($s1)
|
||||
/* E25D98 802B6038 3C108011 */ lui $s0, %hi(D_8010F250)
|
||||
/* E25D9C 802B603C 2610F250 */ addiu $s0, $s0, %lo(D_8010F250)
|
||||
/* E25D98 802B6038 3C108011 */ lui $s0, %hi(gPlayerSpinState)
|
||||
/* E25D9C 802B603C 2610F250 */ addiu $s0, $s0, %lo(gPlayerSpinState)
|
||||
/* E25DA0 802B6040 0441009D */ bgez $v0, .L802B62B8
|
||||
/* E25DA4 802B6044 0000A82D */ daddu $s5, $zero, $zero
|
||||
/* E25DA8 802B6048 3C037FF7 */ lui $v1, 0x7ff7
|
||||
|
@ -98,10 +98,10 @@ glabel partner_flying_enable
|
||||
/* 86918 800ED468 00621821 */ addu $v1, $v1, $v0
|
||||
/* 8691C 800ED46C 8C63835C */ lw $v1, %lo(gPartnerAnimations+0x14)($v1)
|
||||
/* 86920 800ED470 24020010 */ addiu $v0, $zero, 0x10
|
||||
/* 86924 800ED474 3C018010 */ lui $at, %hi(D_800F802C)
|
||||
/* 86928 800ED478 AC22802C */ sw $v0, %lo(D_800F802C)($at)
|
||||
/* 8692C 800ED47C 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 86930 800ED480 E420CFC0 */ swc1 $f0, %lo(D_8010CFC0)($at)
|
||||
/* 86924 800ED474 3C018010 */ lui $at, %hi(wPartnerMoveTime)
|
||||
/* 86928 800ED478 AC22802C */ sw $v0, %lo(wPartnerMoveTime)($at)
|
||||
/* 8692C 800ED47C 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 86930 800ED480 E420CFC0 */ swc1 $f0, %lo(wPartnerTetherDistance)($at)
|
||||
/* 86934 800ED484 0C03A96E */ jal func_800EA5B8
|
||||
/* 86938 800ED488 AE030028 */ sw $v1, 0x28($s0)
|
||||
/* 8693C 800ED48C 8E020000 */ lw $v0, ($s0)
|
||||
|
@ -42,8 +42,8 @@ glabel partner_flying_follow_player
|
||||
/* 86F1C 800EDA6C 8C42CFBC */ lw $v0, %lo(D_8010CFBC)($v0)
|
||||
/* 86F20 800EDA70 C6220038 */ lwc1 $f2, 0x38($s1)
|
||||
/* 86F24 800EDA74 C624003C */ lwc1 $f4, 0x3c($s1)
|
||||
/* 86F28 800EDA78 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 86F2C 800EDA7C C42ACFC0 */ lwc1 $f10, %lo(D_8010CFC0)($at)
|
||||
/* 86F28 800EDA78 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 86F2C 800EDA7C C42ACFC0 */ lwc1 $f10, %lo(wPartnerTetherDistance)($at)
|
||||
/* 86F30 800EDA80 3C0141A0 */ lui $at, 0x41a0
|
||||
/* 86F34 800EDA84 44814000 */ mtc1 $at, $f8
|
||||
/* 86F38 800EDA88 C6200040 */ lwc1 $f0, 0x40($s1)
|
||||
@ -156,8 +156,8 @@ glabel partner_flying_follow_player
|
||||
/* 870CC 800EDC1C 00000000 */ nop
|
||||
/* 870D0 800EDC20 E6200018 */ swc1 $f0, 0x18($s1)
|
||||
.L800EDC24:
|
||||
/* 870D4 800EDC24 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 870D8 800EDC28 C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 870D4 800EDC24 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 870D8 800EDC28 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 870DC 800EDC2C 3C0141A0 */ lui $at, 0x41a0
|
||||
/* 870E0 800EDC30 44810000 */ mtc1 $at, $f0
|
||||
/* 870E4 800EDC34 00000000 */ nop
|
||||
@ -243,8 +243,8 @@ glabel partner_flying_follow_player
|
||||
/* 87214 800EDD64 8E660028 */ lw $a2, 0x28($s3)
|
||||
/* 87218 800EDD68 0C00A7B5 */ jal dist2D
|
||||
/* 8721C 800EDD6C 8E670030 */ lw $a3, 0x30($s3)
|
||||
/* 87220 800EDD70 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 87224 800EDD74 C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 87220 800EDD70 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 87224 800EDD74 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 87228 800EDD78 4602003E */ c.le.s $f0, $f2
|
||||
/* 8722C 800EDD7C 00000000 */ nop
|
||||
/* 87230 800EDD80 4501FF94 */ bc1t .L800EDBD4
|
||||
@ -357,8 +357,8 @@ glabel partner_flying_follow_player
|
||||
/* 873C0 800EDF10 86020000 */ lh $v0, ($s0)
|
||||
/* 873C4 800EDF14 14520026 */ bne $v0, $s2, .L800EDFB0
|
||||
/* 873C8 800EDF18 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 873CC 800EDF1C 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 873D0 800EDF20 C420CFC0 */ lwc1 $f0, %lo(D_8010CFC0)($at)
|
||||
/* 873CC 800EDF1C 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 873D0 800EDF20 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
|
||||
/* 873D4 800EDF24 C7A2002C */ lwc1 $f2, 0x2c($sp)
|
||||
/* 873D8 800EDF28 4600103C */ c.lt.s $f2, $f0
|
||||
/* 873DC 800EDF2C 00000000 */ nop
|
||||
@ -511,8 +511,8 @@ glabel partner_flying_follow_player
|
||||
/* 8760C 800EE15C E620000C */ swc1 $f0, 0xc($s1)
|
||||
/* 87610 800EE160 0C00A7B5 */ jal dist2D
|
||||
/* 87614 800EE164 A6000000 */ sh $zero, ($s0)
|
||||
/* 87618 800EE168 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 8761C 800EE16C C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 87618 800EE168 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 8761C 800EE16C C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 87620 800EE170 4602003C */ c.lt.s $f0, $f2
|
||||
/* 87624 800EE174 00000000 */ nop
|
||||
/* 87628 800EE178 450001FB */ bc1f .L800EE968_87E18
|
||||
@ -540,8 +540,8 @@ glabel partner_flying_follow_player
|
||||
/* 8767C 800EE1CC E7A20024 */ swc1 $f2, 0x24($sp)
|
||||
/* 87680 800EE1D0 0C00A7B5 */ jal dist2D
|
||||
/* 87684 800EE1D4 E7A40028 */ swc1 $f4, 0x28($sp)
|
||||
/* 87688 800EE1D8 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 8768C 800EE1DC C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 87688 800EE1D8 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 8768C 800EE1DC C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 87690 800EE1E0 4602003E */ c.le.s $f0, $f2
|
||||
/* 87694 800EE1E4 00000000 */ nop
|
||||
/* 87698 800EE1E8 450000A5 */ bc1f .L800EE480
|
||||
@ -612,8 +612,8 @@ glabel partner_flying_follow_player
|
||||
/* 87794 800EE2E4 46006300 */ add.s $f12, $f12, $f0
|
||||
/* 87798 800EE2E8 44070000 */ mfc1 $a3, $f0
|
||||
/* 8779C 800EE2EC C6600028 */ lwc1 $f0, 0x28($s3)
|
||||
/* 877A0 800EE2F0 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 877A4 800EE2F4 C424CFC0 */ lwc1 $f4, %lo(D_8010CFC0)($at)
|
||||
/* 877A0 800EE2F0 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 877A4 800EE2F4 C424CFC0 */ lwc1 $f4, %lo(wPartnerTetherDistance)($at)
|
||||
/* 877A8 800EE2F8 26240060 */ addiu $a0, $s1, 0x60
|
||||
/* 877AC 800EE2FC E6200060 */ swc1 $f0, 0x60($s1)
|
||||
/* 877B0 800EE300 3C014120 */ lui $at, 0x4120
|
||||
@ -723,8 +723,8 @@ glabel partner_flying_follow_player
|
||||
/* 87938 800EE488 8E660028 */ lw $a2, 0x28($s3)
|
||||
/* 8793C 800EE48C 0C00A7B5 */ jal dist2D
|
||||
/* 87940 800EE490 8E670030 */ lw $a3, 0x30($s3)
|
||||
/* 87944 800EE494 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 87948 800EE498 C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 87944 800EE494 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 87948 800EE498 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 8794C 800EE49C 4602003E */ c.le.s $f0, $f2
|
||||
/* 87950 800EE4A0 00000000 */ nop
|
||||
/* 87954 800EE4A4 45010130 */ bc1t .L800EE968_87E18
|
||||
@ -822,13 +822,13 @@ glabel partner_flying_follow_player
|
||||
/* 87AB0 800EE600 8E260060 */ lw $a2, 0x60($s1)
|
||||
/* 87AB4 800EE604 0C00A7B5 */ jal dist2D
|
||||
/* 87AB8 800EE608 8E270068 */ lw $a3, 0x68($s1)
|
||||
/* 87ABC 800EE60C 3C018010 */ lui $at, %hi(D_800F802C)
|
||||
/* 87AC0 800EE610 C422802C */ lwc1 $f2, %lo(D_800F802C)($at)
|
||||
/* 87ABC 800EE60C 3C018010 */ lui $at, %hi(wPartnerMoveTime)
|
||||
/* 87AC0 800EE610 C422802C */ lwc1 $f2, %lo(wPartnerMoveTime)($at)
|
||||
/* 87AC4 800EE614 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 87AC8 800EE618 E7A0002C */ swc1 $f0, 0x2c($sp)
|
||||
/* 87ACC 800EE61C 46020003 */ div.s $f0, $f0, $f2
|
||||
/* 87AD0 800EE620 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 87AD4 800EE624 E4208030 */ swc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 87AD0 800EE620 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 87AD4 800EE624 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 87AD8 800EE628 E6200018 */ swc1 $f0, 0x18($s1)
|
||||
/* 87ADC 800EE62C 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 87AE0 800EE630 26240028 */ addiu $a0, $s1, 0x28
|
||||
@ -868,8 +868,8 @@ glabel partner_flying_follow_player
|
||||
/* 87B60 800EE6B0 24420001 */ addiu $v0, $v0, 1
|
||||
/* 87B64 800EE6B4 A4620000 */ sh $v0, ($v1)
|
||||
.L800EE6B8:
|
||||
/* 87B68 800EE6B8 3C098010 */ lui $t1, %hi(D_800F802C)
|
||||
/* 87B6C 800EE6BC 2529802C */ addiu $t1, $t1, %lo(D_800F802C)
|
||||
/* 87B68 800EE6B8 3C098010 */ lui $t1, %hi(wPartnerMoveTime)
|
||||
/* 87B6C 800EE6BC 2529802C */ addiu $t1, $t1, %lo(wPartnerMoveTime)
|
||||
/* 87B70 800EE6C0 8D280000 */ lw $t0, ($t1)
|
||||
/* 87B74 800EE6C4 1100007E */ beqz $t0, .L800EE8C0
|
||||
/* 87B78 800EE6C8 3C040001 */ lui $a0, 1
|
||||
@ -946,8 +946,8 @@ glabel partner_flying_follow_player
|
||||
/* 87C90 800EE7E0 46001080 */ add.s $f2, $f2, $f0
|
||||
/* 87C94 800EE7E4 E622003C */ swc1 $f2, 0x3c($s1)
|
||||
.L800EE7E8:
|
||||
/* 87C98 800EE7E8 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 87C9C 800EE7EC C4208030 */ lwc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 87C98 800EE7E8 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 87C9C 800EE7EC C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 87CA0 800EE7F0 C6220038 */ lwc1 $f2, 0x38($s1)
|
||||
/* 87CA4 800EE7F4 C624003C */ lwc1 $f4, 0x3c($s1)
|
||||
/* 87CA8 800EE7F8 C6260040 */ lwc1 $f6, 0x40($s1)
|
||||
|
@ -25,13 +25,13 @@ glabel partner_move_to_goal
|
||||
/* 88D2C 800EF87C 14600116 */ bnez $v1, .L800EFCD8
|
||||
/* 88D30 800EF880 24820001 */ addiu $v0, $a0, 1
|
||||
/* 88D34 800EF884 C662002C */ lwc1 $f2, 0x2c($s3)
|
||||
/* 88D38 800EF888 3C018010 */ lui $at, %hi(D_800F8024)
|
||||
/* 88D3C 800EF88C C4208024 */ lwc1 $f0, %lo(D_800F8024)($at)
|
||||
/* 88D38 800EF888 3C018010 */ lui $at, %hi(wPartnerMoveGoalX)
|
||||
/* 88D3C 800EF88C C4208024 */ lwc1 $f0, %lo(wPartnerMoveGoalX)($at)
|
||||
/* 88D40 800EF890 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 88D44 800EF894 E6400060 */ swc1 $f0, 0x60($s2)
|
||||
/* 88D48 800EF898 44060000 */ mfc1 $a2, $f0
|
||||
/* 88D4C 800EF89C 3C018010 */ lui $at, %hi(D_800F8028)
|
||||
/* 88D50 800EF8A0 C4208028 */ lwc1 $f0, %lo(D_800F8028)($at)
|
||||
/* 88D4C 800EF89C 3C018010 */ lui $at, %hi(wPartnerMoveGoalZ)
|
||||
/* 88D50 800EF8A0 C4208028 */ lwc1 $f0, %lo(wPartnerMoveGoalZ)($at)
|
||||
/* 88D54 800EF8A4 46800020 */ cvt.s.w $f0, $f0
|
||||
/* 88D58 800EF8A8 26500060 */ addiu $s0, $s2, 0x60
|
||||
/* 88D5C 800EF8AC C64C0038 */ lwc1 $f12, 0x38($s2)
|
||||
@ -50,8 +50,8 @@ glabel partner_move_to_goal
|
||||
/* 88D90 800EF8E0 AC278034 */ sw $a3, %lo(D_800F8034)($at)
|
||||
/* 88D94 800EF8E4 0C00A7E7 */ jal add_vec2D_polar
|
||||
/* 88D98 800EF8E8 AE47000C */ sw $a3, 0xc($s2)
|
||||
/* 88D9C 800EF8EC 3C108010 */ lui $s0, %hi(D_800F802C)
|
||||
/* 88DA0 800EF8F0 2610802C */ addiu $s0, $s0, %lo(D_800F802C)
|
||||
/* 88D9C 800EF8EC 3C108010 */ lui $s0, %hi(wPartnerMoveTime)
|
||||
/* 88DA0 800EF8F0 2610802C */ addiu $s0, $s0, %lo(wPartnerMoveTime)
|
||||
/* 88DA4 800EF8F4 C64C0038 */ lwc1 $f12, 0x38($s2)
|
||||
/* 88DA8 800EF8F8 C64E0040 */ lwc1 $f14, 0x40($s2)
|
||||
/* 88DAC 800EF8FC 8E460060 */ lw $a2, 0x60($s2)
|
||||
@ -63,8 +63,8 @@ glabel partner_move_to_goal
|
||||
/* 88DC4 800EF914 C6020000 */ lwc1 $f2, ($s0)
|
||||
/* 88DC8 800EF918 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 88DCC 800EF91C 46020003 */ div.s $f0, $f0, $f2
|
||||
/* 88DD0 800EF920 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 88DD4 800EF924 E4208030 */ swc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 88DD0 800EF920 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 88DD4 800EF924 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 88DD8 800EF928 E6400018 */ swc1 $f0, 0x18($s2)
|
||||
/* 88DDC 800EF92C 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 88DE0 800EF930 26440028 */ addiu $a0, $s2, 0x28
|
||||
@ -90,8 +90,8 @@ glabel partner_move_to_goal
|
||||
/* 88E28 800EF978 8C420000 */ lw $v0, ($v0)
|
||||
/* 88E2C 800EF97C AC820000 */ sw $v0, ($a0)
|
||||
.L800EF980:
|
||||
/* 88E30 800EF980 3C038010 */ lui $v1, %hi(D_800F802C)
|
||||
/* 88E34 800EF984 2463802C */ addiu $v1, $v1, %lo(D_800F802C)
|
||||
/* 88E30 800EF980 3C038010 */ lui $v1, %hi(wPartnerMoveTime)
|
||||
/* 88E34 800EF984 2463802C */ addiu $v1, $v1, %lo(wPartnerMoveTime)
|
||||
/* 88E38 800EF988 8C620000 */ lw $v0, ($v1)
|
||||
/* 88E3C 800EF98C 104000C0 */ beqz $v0, .L800EFC90
|
||||
/* 88E40 800EF990 2442FFFF */ addiu $v0, $v0, -1
|
||||
@ -210,8 +210,8 @@ glabel partner_move_to_goal
|
||||
/* 88FF4 800EFB44 00431024 */ and $v0, $v0, $v1
|
||||
/* 88FF8 800EFB48 AE420000 */ sw $v0, ($s2)
|
||||
.L800EFB4C:
|
||||
/* 88FFC 800EFB4C 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 89000 800EFB50 C4208030 */ lwc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 88FFC 800EFB4C 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 89000 800EFB50 C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 89004 800EFB54 E6400018 */ swc1 $f0, 0x18($s2)
|
||||
/* 89008 800EFB58 3C018010 */ lui $at, %hi(D_800F8034)
|
||||
/* 8900C 800EFB5C C4208034 */ lwc1 $f0, %lo(D_800F8034)($at)
|
||||
@ -271,8 +271,8 @@ glabel partner_move_to_goal
|
||||
/* 890D8 800EFC28 46002000 */ add.s $f0, $f4, $f0
|
||||
/* 890DC 800EFC2C E640003C */ swc1 $f0, 0x3c($s2)
|
||||
.L800EFC30:
|
||||
/* 890E0 800EFC30 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 890E4 800EFC34 C4208030 */ lwc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 890E0 800EFC30 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 890E4 800EFC34 C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 890E8 800EFC38 E6400018 */ swc1 $f0, 0x18($s2)
|
||||
/* 890EC 800EFC3C 3C018010 */ lui $at, %hi(D_800F8034)
|
||||
/* 890F0 800EFC40 C4208034 */ lwc1 $f0, %lo(D_800F8034)($at)
|
||||
|
@ -87,10 +87,10 @@ glabel partner_walking_enable
|
||||
/* 84E88 800EB9D8 00621821 */ addu $v1, $v1, $v0
|
||||
/* 84E8C 800EB9DC 8C63835C */ lw $v1, %lo(gPartnerAnimations+0x14)($v1)
|
||||
/* 84E90 800EB9E0 24020010 */ addiu $v0, $zero, 0x10
|
||||
/* 84E94 800EB9E4 3C018010 */ lui $at, %hi(D_800F802C)
|
||||
/* 84E98 800EB9E8 AC22802C */ sw $v0, %lo(D_800F802C)($at)
|
||||
/* 84E9C 800EB9EC 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 84EA0 800EB9F0 E420CFC0 */ swc1 $f0, %lo(D_8010CFC0)($at)
|
||||
/* 84E94 800EB9E4 3C018010 */ lui $at, %hi(wPartnerMoveTime)
|
||||
/* 84E98 800EB9E8 AC22802C */ sw $v0, %lo(wPartnerMoveTime)($at)
|
||||
/* 84E9C 800EB9EC 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 84EA0 800EB9F0 E420CFC0 */ swc1 $f0, %lo(wPartnerTetherDistance)($at)
|
||||
/* 84EA4 800EB9F4 0C03A96E */ jal func_800EA5B8
|
||||
/* 84EA8 800EB9F8 AE030028 */ sw $v1, 0x28($s0)
|
||||
/* 84EAC 800EB9FC 3C030040 */ lui $v1, 0x40
|
||||
|
@ -96,8 +96,8 @@ glabel partner_walking_follow_player
|
||||
/* 8526C 800EBDBC 00000000 */ nop
|
||||
/* 85270 800EBDC0 E6200018 */ swc1 $f0, 0x18($s1)
|
||||
.L800EBDC4:
|
||||
/* 85274 800EBDC4 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 85278 800EBDC8 C420CFC0 */ lwc1 $f0, %lo(D_8010CFC0)($at)
|
||||
/* 85274 800EBDC4 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 85278 800EBDC8 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
|
||||
/* 8527C 800EBDCC 3C014034 */ lui $at, 0x4034
|
||||
/* 85280 800EBDD0 44811800 */ mtc1 $at, $f3
|
||||
/* 85284 800EBDD4 44801000 */ mtc1 $zero, $f2
|
||||
@ -164,8 +164,8 @@ glabel partner_walking_follow_player
|
||||
/* 8536C 800EBEBC 00000000 */ nop
|
||||
/* 85370 800EBEC0 45010054 */ bc1t .L800EC014
|
||||
/* 85374 800EBEC4 00000000 */ nop
|
||||
/* 85378 800EBEC8 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 8537C 800EBECC C426CFC0 */ lwc1 $f6, %lo(D_8010CFC0)($at)
|
||||
/* 85378 800EBEC8 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 8537C 800EBECC C426CFC0 */ lwc1 $f6, %lo(wPartnerTetherDistance)($at)
|
||||
/* 85380 800EBED0 4604303C */ c.lt.s $f6, $f4
|
||||
/* 85384 800EBED4 00000000 */ nop
|
||||
/* 85388 800EBED8 4500001F */ bc1f .L800EBF58
|
||||
@ -425,8 +425,8 @@ glabel partner_walking_follow_player
|
||||
/* 85744 800EC294 C620003C */ lwc1 $f0, 0x3c($s1)
|
||||
/* 85748 800EC298 C6240010 */ lwc1 $f4, 0x10($s1)
|
||||
/* 8574C 800EC29C 46001081 */ sub.s $f2, $f2, $f0
|
||||
/* 85750 800EC2A0 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 85754 800EC2A4 C420CFC0 */ lwc1 $f0, %lo(D_8010CFC0)($at)
|
||||
/* 85750 800EC2A0 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 85754 800EC2A4 C420CFC0 */ lwc1 $f0, %lo(wPartnerTetherDistance)($at)
|
||||
/* 85758 800EC2A8 E7A40034 */ swc1 $f4, 0x34($sp)
|
||||
/* 8575C 800EC2AC 4600203C */ c.lt.s $f4, $f0
|
||||
/* 85760 800EC2B0 00000000 */ nop
|
||||
@ -737,8 +737,8 @@ glabel partner_walking_follow_player
|
||||
/* 85BF4 800EC744 E7A60020 */ swc1 $f6, 0x20($sp)
|
||||
/* 85BF8 800EC748 0C00A7B5 */ jal dist2D
|
||||
/* 85BFC 800EC74C E7A80024 */ swc1 $f8, 0x24($sp)
|
||||
/* 85C00 800EC750 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 85C04 800EC754 C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 85C00 800EC750 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 85C04 800EC754 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 85C08 800EC758 4602003E */ c.le.s $f0, $f2
|
||||
/* 85C0C 800EC75C 00000000 */ nop
|
||||
/* 85C10 800EC760 450000E3 */ bc1f .L800ECAF0
|
||||
@ -790,8 +790,8 @@ glabel partner_walking_follow_player
|
||||
/* 85CBC 800EC80C 46006300 */ add.s $f12, $f12, $f0
|
||||
/* 85CC0 800EC810 44070000 */ mfc1 $a3, $f0
|
||||
/* 85CC4 800EC814 C6600028 */ lwc1 $f0, 0x28($s3)
|
||||
/* 85CC8 800EC818 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 85CCC 800EC81C C424CFC0 */ lwc1 $f4, %lo(D_8010CFC0)($at)
|
||||
/* 85CC8 800EC818 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 85CCC 800EC81C C424CFC0 */ lwc1 $f4, %lo(wPartnerTetherDistance)($at)
|
||||
/* 85CD0 800EC820 26240060 */ addiu $a0, $s1, 0x60
|
||||
/* 85CD4 800EC824 E6200060 */ swc1 $f0, 0x60($s1)
|
||||
/* 85CD8 800EC828 3C014120 */ lui $at, 0x4120
|
||||
@ -985,8 +985,8 @@ glabel partner_walking_follow_player
|
||||
/* 85FA8 800ECAF8 8E660028 */ lw $a2, 0x28($s3)
|
||||
/* 85FAC 800ECAFC 0C00A7B5 */ jal dist2D
|
||||
/* 85FB0 800ECB00 8E670030 */ lw $a3, 0x30($s3)
|
||||
/* 85FB4 800ECB04 3C018011 */ lui $at, %hi(D_8010CFC0)
|
||||
/* 85FB8 800ECB08 C422CFC0 */ lwc1 $f2, %lo(D_8010CFC0)($at)
|
||||
/* 85FB4 800ECB04 3C018011 */ lui $at, %hi(wPartnerTetherDistance)
|
||||
/* 85FB8 800ECB08 C422CFC0 */ lwc1 $f2, %lo(wPartnerTetherDistance)($at)
|
||||
/* 85FBC 800ECB0C 4602003E */ c.le.s $f0, $f2
|
||||
/* 85FC0 800ECB10 00000000 */ nop
|
||||
/* 85FC4 800ECB14 4500000B */ bc1f .L800ECB44
|
||||
@ -1150,13 +1150,13 @@ glabel partner_walking_follow_player
|
||||
/* 8620C 800ECD5C 8E260060 */ lw $a2, 0x60($s1)
|
||||
/* 86210 800ECD60 0C00A7B5 */ jal dist2D
|
||||
/* 86214 800ECD64 8E270068 */ lw $a3, 0x68($s1)
|
||||
/* 86218 800ECD68 3C018010 */ lui $at, %hi(D_800F802C)
|
||||
/* 8621C 800ECD6C C422802C */ lwc1 $f2, %lo(D_800F802C)($at)
|
||||
/* 86218 800ECD68 3C018010 */ lui $at, %hi(wPartnerMoveTime)
|
||||
/* 8621C 800ECD6C C422802C */ lwc1 $f2, %lo(wPartnerMoveTime)($at)
|
||||
/* 86220 800ECD70 468010A0 */ cvt.s.w $f2, $f2
|
||||
/* 86224 800ECD74 E7A00034 */ swc1 $f0, 0x34($sp)
|
||||
/* 86228 800ECD78 46020003 */ div.s $f0, $f0, $f2
|
||||
/* 8622C 800ECD7C 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 86230 800ECD80 E4208030 */ swc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 8622C 800ECD7C 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 86230 800ECD80 E4208030 */ swc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 86234 800ECD84 E6200018 */ swc1 $f0, 0x18($s1)
|
||||
/* 86238 800ECD88 46000021 */ cvt.d.s $f0, $f0
|
||||
/* 8623C 800ECD8C 26240028 */ addiu $a0, $s1, 0x28
|
||||
@ -1196,8 +1196,8 @@ glabel partner_walking_follow_player
|
||||
/* 862BC 800ECE0C 24420001 */ addiu $v0, $v0, 1
|
||||
/* 862C0 800ECE10 A4620000 */ sh $v0, ($v1)
|
||||
.L800ECE14:
|
||||
/* 862C4 800ECE14 3C108010 */ lui $s0, %hi(D_800F802C)
|
||||
/* 862C8 800ECE18 2610802C */ addiu $s0, $s0, %lo(D_800F802C)
|
||||
/* 862C4 800ECE14 3C108010 */ lui $s0, %hi(wPartnerMoveTime)
|
||||
/* 862C8 800ECE18 2610802C */ addiu $s0, $s0, %lo(wPartnerMoveTime)
|
||||
/* 862CC 800ECE1C 8E020000 */ lw $v0, ($s0)
|
||||
/* 862D0 800ECE20 10400079 */ beqz $v0, .L800ED008
|
||||
/* 862D4 800ECE24 2442FFFF */ addiu $v0, $v0, -1
|
||||
@ -1301,8 +1301,8 @@ glabel partner_walking_follow_player
|
||||
/* 86450 800ECFA0 00431024 */ and $v0, $v0, $v1
|
||||
/* 86454 800ECFA4 AE220000 */ sw $v0, ($s1)
|
||||
.L800ECFA8:
|
||||
/* 86458 800ECFA8 3C018010 */ lui $at, %hi(D_800F8030)
|
||||
/* 8645C 800ECFAC C4208030 */ lwc1 $f0, %lo(D_800F8030)($at)
|
||||
/* 86458 800ECFA8 3C018010 */ lui $at, %hi(wPartnerMoveSpeed)
|
||||
/* 8645C 800ECFAC C4208030 */ lwc1 $f0, %lo(wPartnerMoveSpeed)($at)
|
||||
/* 86460 800ECFB0 E6200018 */ swc1 $f0, 0x18($s1)
|
||||
/* 86464 800ECFB4 3C018010 */ lui $at, %hi(D_800F8034)
|
||||
/* 86468 800ECFB8 C4208034 */ lwc1 $f0, %lo(D_800F8034)($at)
|
||||
@ -1357,8 +1357,8 @@ glabel partner_walking_follow_player
|
||||
/* 86524 800ED074 0803B4B9 */ j .L800ED2E4_86794
|
||||
/* 86528 800ED078 A4820000 */ sh $v0, ($a0)
|
||||
.L800ED07C:
|
||||
/* 8652C 800ED07C 3C038010 */ lui $v1, %hi(D_800F802C)
|
||||
/* 86530 800ED080 2463802C */ addiu $v1, $v1, %lo(D_800F802C)
|
||||
/* 8652C 800ED07C 3C038010 */ lui $v1, %hi(wPartnerMoveTime)
|
||||
/* 86530 800ED080 2463802C */ addiu $v1, $v1, %lo(wPartnerMoveTime)
|
||||
/* 86534 800ED084 8C620000 */ lw $v0, ($v1)
|
||||
/* 86538 800ED088 10400003 */ beqz $v0, .L800ED098
|
||||
/* 8653C 800ED08C 2442FFFF */ addiu $v0, $v0, -1
|
||||
|
@ -2238,10 +2238,10 @@ D_800F7FFC = 0x800F7FFC; // type:data rom:0x914AC
|
||||
D_800F8000 = 0x800F8000; // type:data rom:0x914B0
|
||||
D_800F8010 = 0x800F8010; // type:data rom:0x914C0
|
||||
D_800F8020 = 0x800F8020; // type:data rom:0x914D0
|
||||
D_800F8024 = 0x800F8024; // type:data rom:0x914D4
|
||||
D_800F8028 = 0x800F8028; // type:data rom:0x914D8
|
||||
D_800F802C = 0x800F802C; // type:data rom:0x914DC
|
||||
D_800F8030 = 0x800F8030; // type:data rom:0x914E0
|
||||
wPartnerMoveGoalX = 0x800F8024; // type:data rom:0x914D4
|
||||
wPartnerMoveGoalZ = 0x800F8028; // type:data rom:0x914D8
|
||||
wPartnerMoveTime = 0x800F802C; // type:data rom:0x914DC
|
||||
wPartnerMoveSpeed = 0x800F8030; // type:data rom:0x914E0
|
||||
D_800F8034 = 0x800F8034; // type:data rom:0x914E4
|
||||
D_800F803A = 0x800F803A; // type:data rom:0x914EA
|
||||
wPartners = 0x800F803C; // type:data rom:0x914EC size:0x300
|
||||
@ -3439,7 +3439,7 @@ NpcFacePlayer = 0x802CECC8; // type:func rom:0xF3678
|
||||
NpcFaceNpc = 0x802CEE80; // type:func rom:0xF3830
|
||||
SetNpcFlagBits = 0x802CF060; // type:func rom:0xF3A10
|
||||
GetNpcPos = 0x802CF0F4; // type:func rom:0xF3AA4
|
||||
func_802CF1B4 = 0x802CF1B4; // type:func rom:0xF3B64
|
||||
SetNpcCollisionChannel = 0x802CF1B4; // type:func rom:0xF3B64
|
||||
SetNpcSprite = 0x802CF208; // type:func rom:0xF3BB8
|
||||
EnableNpcShadow = 0x802CF268; // type:func rom:0xF3C18
|
||||
EnableNpcBlur = 0x802CF2EC; // type:func rom:0xF3C9C
|
||||
@ -3462,7 +3462,7 @@ SetNpcPaletteSwapLower = 0x802CFEEC; // type:func rom:0xF489C
|
||||
SetNpcPaletteSwapping = 0x802CFFC0; // type:func rom:0xF4970
|
||||
SetNpcDecoration = 0x802D0118; // type:func rom:0xF4AC8
|
||||
PlaySoundAtNpc = 0x802D01AC; // type:func rom:0xF4B5C
|
||||
func_802D0244 = 0x802D0244; // type:func rom:0xF4BF4
|
||||
SetNpcRenderMode = 0x802D0244; // type:func rom:0xF4BF4
|
||||
SpeakToPlayer = 0x802D02B0; // type:func rom:0xF4C60
|
||||
EndSpeech = 0x802D02CC; // type:func rom:0xF4C7C
|
||||
ContinueSpeech = 0x802D02E8; // type:func rom:0xF4C98
|
||||
@ -4596,8 +4596,8 @@ func_80263E08 = 0x80263E08; // type:func rom:0x1926E8
|
||||
set_animation_rate = 0x80263EB8; // type:func rom:0x192798
|
||||
set_actor_yaw = 0x80263F68; // type:func rom:0x192848
|
||||
set_part_yaw = 0x80263F9C; // type:func rom:0x19287C
|
||||
func_80263FE8 = 0x80263FE8; // type:func rom:0x1928C8
|
||||
func_80264084 = 0x80264084; // type:func rom:0x192964
|
||||
set_part_flag_bits = 0x80263FE8; // type:func rom:0x1928C8
|
||||
clear_part_flag_bits = 0x80264084; // type:func rom:0x192964
|
||||
add_xz_vec3f = 0x80264128; // type:func rom:0x192A08
|
||||
add_xz_vec3f_copy1 = 0x802641C0; // type:func rom:0x192AA0
|
||||
add_xz_vec3f_copy2 = 0x80264258; // type:func rom:0x192B38
|
||||
@ -19527,7 +19527,7 @@ D_8010CD34 = 0x8010CD34; // type:data
|
||||
D_8010CD38 = 0x8010CD38; // type:data
|
||||
D_8010CFB8 = 0x8010CFB8; // type:data
|
||||
D_8010CFBC = 0x8010CFBC; // type:data
|
||||
D_8010CFC0 = 0x8010CFC0; // type:data
|
||||
wPartnerTetherDistance = 0x8010CFC0; // type:data
|
||||
D_8010CFC4 = 0x8010CFC4; // type:data
|
||||
D_8010CFC8 = 0x8010CFC8; // type:data
|
||||
D_8010CFCA = 0x8010CFCA; // type:data
|
||||
@ -19597,7 +19597,7 @@ D_8010EF9E = 0x8010EF9E; // type:data
|
||||
gPlayerStatus = 0x8010EFC8; // size:0x288
|
||||
gPlayerActionState = 0x8010F07C; //
|
||||
gPlayerAnimation = 0x8010F080; //
|
||||
D_8010F250 = 0x8010F250; // type:data
|
||||
gPlayerSpinState = 0x8010F250; // type:data
|
||||
gPlayerData = 0x8010F290; // size:0x340
|
||||
gSpinHistoryPosAngle = 0x8010F6B8; // type:data
|
||||
dead_gPartnerActionStatus2 = 0x80117160; // type:data
|
||||
@ -21135,8 +21135,8 @@ D_802DADA4 = 0x802DADA4; // type:data
|
||||
gBattleMeshAnimationList = 0x802DADB0; // size:0x40
|
||||
gWorldMeshAnimationList = 0x802DADF0; // size:0x40
|
||||
gCurrentMeshAnimationListPtr = 0x802DAE30; //
|
||||
D_802DAE40 = 0x802DAE40; // type:data
|
||||
D_802DAE44 = 0x802DAE44; // type:data
|
||||
wExtraPartnerID = 0x802DAE40; // type:data
|
||||
wExtraPartnerNpcID = 0x802DAE44; // type:data
|
||||
D_802DAE50 = 0x802DAE50; // type:data
|
||||
D_802DAE54 = 0x802DAE54; // type:data
|
||||
gCurrentPrintContext = 0x802DB260; //
|
||||
|
@ -1138,8 +1138,8 @@ D_802DADA4 = 0x802DADA4;
|
||||
gBattleMeshAnimationList = 0x802DADB0;
|
||||
gWorldMeshAnimationList = 0x802DADF0;
|
||||
gCurrentMeshAnimationListPtr = 0x802DAE30;
|
||||
D_802DAE40 = 0x802DAE40;
|
||||
D_802DAE44 = 0x802DAE44;
|
||||
wExtraPartnerID = 0x802DAE40;
|
||||
wExtraPartnerNpcID = 0x802DAE44;
|
||||
D_802DAE50 = 0x802DAE50;
|
||||
D_802DAE54 = 0x802DAE54;
|
||||
gCurrentPrintContext = 0x802DB260;
|
||||
@ -1334,7 +1334,7 @@ D_8010CD34 = 0x8010CD34;
|
||||
D_8010CD38 = 0x8010CD38;
|
||||
D_8010CFB8 = 0x8010CFB8;
|
||||
D_8010CFBC = 0x8010CFBC;
|
||||
D_8010CFC0 = 0x8010CFC0;
|
||||
wPartnerTetherDistance = 0x8010CFC0;
|
||||
D_8010CFC4 = 0x8010CFC4;
|
||||
D_8010CFC8 = 0x8010CFC8;
|
||||
D_8010CFCA = 0x8010CFCA;
|
||||
@ -1404,7 +1404,7 @@ D_8010EF9E = 0x8010EF9E;
|
||||
gPlayerStatus = 0x8010EFC8;
|
||||
gPlayerActionState = 0x8010F07C;
|
||||
gPlayerAnimation = 0x8010F080;
|
||||
D_8010F250 = 0x8010F250;
|
||||
gPlayerSpinState = 0x8010F250;
|
||||
gPlayerData = 0x8010F290;
|
||||
gSpinHistoryPosAngle = 0x8010F6B8;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user