fix configure.py to find correct split.py (#1048)

* fix configure.py to find correct split.py

* name func_802667F0 to DisplayActionRating and use enum

* use enum in DisplayActionRating

* Change DisplayActionRating to show_action_rating
This commit is contained in:
Rainchus 2023-05-08 22:48:11 -05:00 committed by GitHub
parent ee0bd3c304
commit ec6f2ef428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 20 deletions

View File

@ -138,7 +138,7 @@ void func_800E4AD8(s32 arg0);
f32 player_check_collision_below(f32, s32* colliderID);
s32 can_trigger_loading_zone(void);
void func_80266684(void);
void func_802667F0(s32, Actor*, f32, f32, f32);
void show_action_rating(s32, Actor*, f32, f32, f32);
s32 func_802591EC(s32, ActorPart*, s32, Matrix4f, s32);
HeapNode* general_heap_create(void);

View File

@ -413,9 +413,9 @@ HitResult calc_item_damage_enemy(void) {
if (battleStatus->lastAttackDamage > 0 || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) && sp1C) {
if (gBattleStatus.flags1 & BS_FLAGS1_40) {
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
func_802667F0(3, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_SUPER, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}

View File

@ -73,7 +73,7 @@ API_CALLABLE(ActivateDefend) {
API_CALLABLE(DoesMarioStatusPreventHappyAnimation) {
Actor* player = gBattleStatus.playerActor;
func_802667F0(2, player, player->currentPos.x, player->currentPos.y + 20.0f, player->currentPos.z);
show_action_rating(ACTION_RATING_LUCKY, player, player->currentPos.x, player->currentPos.y + 20.0f, player->currentPos.z);
sfx_play_sound(SOUND_3FC);
script->varTable[0] = FALSE;
if (player->debuff == STATUS_FEAR || player->debuff == STATUS_DIZZY || player->debuff == STATUS_PARALYZE ||

View File

@ -2342,7 +2342,7 @@ void func_802666E4(Actor* actor, f32 x, f32 y, f32 z, s32 damage) {
}
// grossness
void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) {
void show_action_rating(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) {
BattleStatus* battleStatus = &gBattleStatus;
Actor* player;
s32 new_var; // TODO required to match
@ -2390,25 +2390,25 @@ void func_802667F0(s32 arg0, Actor* actor, f32 x, f32 y, f32 z) {
type = actor->unk_204;
new_var = arg0; // TODO required to match
switch (new_var) { // TODO required to match
case 0:
case ACTION_RATING_NICE:
actor->unk_204++;
if (actor->unk_204 > 2) {
actor->unk_204 = 2;
}
break;
case 1:
case ACTION_RATING_MISS:
type = 4;
break;
case 2:
case ACTION_RATING_LUCKY:
type = 3;
break;
case 3:
case ACTION_RATING_SUPER:
type = 2;
break;
case 4:
case ACTION_RATING_NICE_NO_COMBO:
type = 0;
break;
case 5:
case ACTION_RATING_NICE_SUPER_COMBO:
type = player->unk_204;
player->unk_204++;
if (player->unk_204 > 2) {

View File

@ -897,16 +897,16 @@ HitResult calc_player_damage_enemy(void) {
if (battleStatus->lastAttackDamage > 0 && (sfx_play_sound(SOUND_231), battleStatus->lastAttackDamage > 0) || // TODO remove sfx_play_sound from conditional
battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary) {
if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_MULTI_BOUNCE)) {
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
func_802667F0(5, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE_SUPER_COMBO, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}
}
if (sp24) {
func_802667F0(1, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_MISS, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {

View File

@ -440,7 +440,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
damage--;
damage -= player_team_is_ability_active(target, ABILITY_DAMAGE_DODGE);
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
}
@ -453,7 +453,7 @@ HitResult calc_enemy_damage_target(Actor* attacker) {
if (check_block_input(BUTTON_A)) {
damage = 0;
sfx_play_sound_at_position(SOUND_231, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
}

View File

@ -766,9 +766,9 @@ HitResult calc_partner_damage_enemy(void) {
state->goalPos.z), //TODO remove sfx_play from conditional
battleStatus->lastAttackDamage > 0))) || (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary)) {
if (gBattleStatus.flags1 & BS_FLAGS1_40) {
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
} else {
func_802667F0(3, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
show_action_rating(ACTION_RATING_SUPER, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}
}
}

View File

@ -843,7 +843,7 @@ if __name__ == "__main__":
extra_cflags += " -Wmissing-braces -Wimplicit -Wredundant-decls -Wstrict-prototypes"
# add splat to python import path
sys.path.append(str((ROOT / args.splat).resolve()))
sys.path.insert(0, str((ROOT / args.splat).resolve()))
ninja = ninja_syntax.Writer(open(str(ROOT / "build.ninja"), "w"), width=9999)

View File

@ -6864,7 +6864,7 @@ func_802664DC = 0x802664DC; // type:func rom:0x194DBC
show_damage_popup = 0x802665AC; // type:func rom:0x194E8C
func_80266684 = 0x80266684; // type:func rom:0x194F64
func_802666E4 = 0x802666E4; // type:func rom:0x194FC4
func_802667F0 = 0x802667F0; // type:func rom:0x1950D0
show_action_rating = 0x802667F0; // type:func rom:0x1950D0
func_80266970 = 0x80266970; // type:func rom:0x195250
func_80266978 = 0x80266978; // type:func rom:0x195258
func_80266ADC = 0x80266ADC; // type:func rom:0x1953BC