start chest inc + misc cleanup (#711)

* start chest inc + misc cleanup

* popups

* 5b320 OK

* finish HudScript retyping

* item hud scripts

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2022-05-18 03:53:28 -04:00 committed by GitHub
parent 52b9d1b11c
commit 5b7f18a2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 14633 additions and 3983 deletions

View File

@ -1065,14 +1065,14 @@ typedef struct TextureHeader {
} TextureHeader; // size = 0x30 } TextureHeader; // size = 0x30
typedef struct MoveData { typedef struct MoveData {
/* 0x00 */ s32 moveNameID; /* 0x00 */ s32 nameMsg;
/* 0x04 */ s32 flags; /* 0x04 */ s32 flags;
/* 0x08 */ s32 worldDescID; /* 0x08 */ s32 shortDescMsg;
/* 0x0C */ s32 menuDescID; /* 0x0C */ s32 fullDescMsg;
/* 0x10 */ s8 battleSubmenu; ///< @see enum BattleSubmenu /* 0x10 */ s8 category; ///< @see enum MoveType
/* 0x11 */ s8 costFP; /* 0x11 */ s8 costFP;
/* 0x12 */ s8 costBP; /* 0x12 */ s8 costBP;
/* 0x13 */ u8 actionCommandID; /* 0x13 */ u8 actionTip;
} MoveData; // size = 0x14 } MoveData; // size = 0x14
typedef struct Collider { typedef struct Collider {
@ -1188,13 +1188,13 @@ typedef struct ColliderBoundingBox {
typedef struct ItemData { typedef struct ItemData {
/* 0x00 */ s32 nameMsg; /* 0x00 */ s32 nameMsg;
/* 0x04 */ s16 iconID; /* 0x04 */ s16 hudElemID;
/* 0x06 */ s16 badgeSortPriority; /* 0x06 */ s16 sortValue;
/* 0x08 */ s32 targetFlags; /* 0x08 */ s32 targetFlags;
/* 0x0C */ s16 sellValue; /* 0x0C */ s16 sellValue;
/* 0x0E */ char unk_0E[2]; /* 0x0E */ char unk_0E[2];
/* 0x10 */ s32 menuMsg; /* 0x10 */ s32 fullDescMsg;
/* 0x14 */ s32 itemMsg; /* 0x14 */ s32 shortDescMsg;
/* 0x18 */ s16 typeFlags; /* 0x18 */ s16 typeFlags;
/* 0x1A */ u8 moveID; /* 0x1A */ u8 moveID;
/* 0x1B */ s8 potencyA; /* 0x1B */ s8 potencyA;

View File

@ -487,6 +487,8 @@ enum Easings {
enum SoundIDs { enum SoundIDs {
SOUND_0 = 0x00000000, SOUND_0 = 0x00000000,
SOUND_3 = 0x00000003,
SOUND_4 = 0x00000004,
SOUND_MENU_BADGE_EQUIP = 0x00000005, SOUND_MENU_BADGE_EQUIP = 0x00000005,
SOUND_MENU_BADGE_UNEQUIP = 0x00000006, SOUND_MENU_BADGE_UNEQUIP = 0x00000006,
SOUND_MENU_START_TUTORIAL = 0x00000009, SOUND_MENU_START_TUTORIAL = 0x00000009,
@ -1114,6 +1116,13 @@ enum ItemTypeFlags {
ITEM_TYPE_FLAG_ENTITY_FULLSIZE = 0x1000, ITEM_TYPE_FLAG_ENTITY_FULLSIZE = 0x1000,
}; };
enum ItemTargetFlags {
ITEM_TARGET_FLAG_ENEMY = 0x0001,
ITEM_TARGET_FLAG_2 = 0x0002,
ITEM_TARGET_FLAG_PLAYER = 0x0008,
ITEM_TARGET_FLAG_8000 = 0x8000
};
// TODO: use NPC_ANIM-like macro for player animations // TODO: use NPC_ANIM-like macro for player animations
enum PlayerAnims { enum PlayerAnims {
ANIM_1 = 0x00000001, ANIM_1 = 0x00000001,
@ -1889,7 +1898,7 @@ enum AttackEventFlags {
}; };
enum PartnerActions { enum PartnerActions {
PARTNER_ACTION_NONE = 0, // genetic state PARTNER_ACTION_NONE = 0, // generic state
PARTNER_ACTION_USE = 1, // generic state PARTNER_ACTION_USE = 1, // generic state
PARTNER_ACTION_KOOPER_1 = 1, PARTNER_ACTION_KOOPER_1 = 1,
PARTNER_ACTION_KOOPER_2 = 2, PARTNER_ACTION_KOOPER_2 = 2,
@ -3129,38 +3138,63 @@ enum BtlCameraPreset {
}; };
enum MoveDataFlags { enum MoveDataFlags {
STATIC_MOVE_FLAGS_1 = 0x00000001, MOVE_DATA_FLAG_SINGLE_TARGET = 0x00000001,
STATIC_MOVE_FLAGS_2 = 0x00000002, MOVE_DATA_FLAG_2 = 0x00000002,
STATIC_MOVE_FLAGS_4 = 0x00000004, MOVE_DATA_FLAG_4 = 0x00000004,
STATIC_MOVE_FLAGS_8 = 0x00000008, MOVE_DATA_FLAG_TARGET_PLAYER = 0x00000008,
STATIC_MOVE_FLAGS_10 = 0x00000010, MOVE_DATA_FLAG_10 = 0x00000010,
STATIC_MOVE_FLAGS_20 = 0x00000020, MOVE_DATA_FLAG_20 = 0x00000020,
STATIC_MOVE_FLAGS_40 = 0x00000040, MOVE_DATA_FLAG_40 = 0x00000040,
STATIC_MOVE_FLAGS_80 = 0x00000080, MOVE_DATA_FLAG_80 = 0x00000080,
STATIC_MOVE_FLAGS_100 = 0x00000100, MOVE_DATA_FLAG_100 = 0x00000100,
STATIC_MOVE_FLAGS_200 = 0x00000200, MOVE_DATA_FLAG_200 = 0x00000200,
STATIC_MOVE_FLAGS_400 = 0x00000400, MOVE_DATA_FLAG_400 = 0x00000400,
STATIC_MOVE_FLAGS_800 = 0x00000800, MOVE_DATA_FLAG_800 = 0x00000800,
STATIC_MOVE_FLAGS_1000 = 0x00001000, MOVE_DATA_FLAG_1000 = 0x00001000,
STATIC_MOVE_FLAGS_2000 = 0x00002000, MOVE_DATA_FLAG_2000 = 0x00002000,
STATIC_MOVE_FLAGS_4000 = 0x00004000, MOVE_DATA_FLAG_4000 = 0x00004000,
STATIC_MOVE_FLAGS_8000 = 0x00008000, MOVE_DATA_FLAG_8000 = 0x00008000,
STATIC_MOVE_FLAGS_10000 = 0x00010000, MOVE_DATA_FLAG_10000 = 0x00010000,
STATIC_MOVE_FLAGS_20000 = 0x00020000, MOVE_DATA_FLAG_20000 = 0x00020000,
STATIC_MOVE_FLAGS_40000 = 0x00040000, MOVE_DATA_FLAG_40000 = 0x00040000,
STATIC_MOVE_FLAGS_80000 = 0x00080000, MOVE_DATA_FLAG_80000 = 0x00080000,
STATIC_MOVE_FLAGS_100000 = 0x00100000, MOVE_DATA_FLAG_100000 = 0x00100000,
STATIC_MOVE_FLAGS_200000 = 0x00200000, MOVE_DATA_FLAG_200000 = 0x00200000,
STATIC_MOVE_FLAGS_400000 = 0x00400000, MOVE_DATA_FLAG_400000 = 0x00400000,
STATIC_MOVE_FLAGS_800000 = 0x00800000, MOVE_DATA_FLAG_800000 = 0x00800000,
STATIC_MOVE_FLAGS_1000000 = 0x01000000, MOVE_DATA_FLAG_1000000 = 0x01000000,
STATIC_MOVE_FLAGS_2000000 = 0x02000000, MOVE_DATA_FLAG_2000000 = 0x02000000,
STATIC_MOVE_FLAGS_4000000 = 0x04000000, MOVE_DATA_FLAG_4000000 = 0x04000000,
STATIC_MOVE_FLAGS_8000000 = 0x08000000, MOVE_DATA_FLAG_8000000 = 0x08000000,
STATIC_MOVE_FLAGS_10000000 = 0x10000000, MOVE_DATA_FLAG_10000000 = 0x10000000,
STATIC_MOVE_FLAGS_20000000 = 0x20000000, MOVE_DATA_FLAG_20000000 = 0x20000000,
STATIC_MOVE_FLAGS_40000000 = 0x40000000, MOVE_DATA_FLAG_40000000 = 0x40000000,
STATIC_MOVE_FLAGS_80000000 = 0x80000000, MOVE_DATA_FLAG_80000000 = 0x80000000,
};
enum MoveActionTips {
MOVE_ACTION_TIP_NONE = -1,
MOVE_ACTION_TIP_0 = 0,
MOVE_ACTION_TIP_1 = 1,
MOVE_ACTION_TIP_2 = 2,
MOVE_ACTION_TIP_3 = 3,
MOVE_ACTION_TIP_4 = 4,
MOVE_ACTION_TIP_5 = 5,
MOVE_ACTION_TIP_6 = 6,
MOVE_ACTION_TIP_7 = 7,
MOVE_ACTION_TIP_8 = 8,
MOVE_ACTION_TIP_9 = 9,
MOVE_ACTION_TIP_10 = 10,
MOVE_ACTION_TIP_11 = 11,
MOVE_ACTION_TIP_12 = 12,
MOVE_ACTION_TIP_13 = 13,
MOVE_ACTION_TIP_14 = 14,
MOVE_ACTION_TIP_15 = 15,
MOVE_ACTION_TIP_16 = 16,
MOVE_ACTION_TIP_17 = 17,
MOVE_ACTION_TIP_18 = 18,
MOVE_ACTION_TIP_19 = 19,
MOVE_ACTION_TIP_20 = 20
}; };
enum AnimatorNodeFlags { enum AnimatorNodeFlags {
@ -3567,12 +3601,22 @@ enum FoldStateFlags {
FOLD_STATE_FLAG_100000 = 0x00100000, FOLD_STATE_FLAG_100000 = 0x00100000,
}; };
enum BattleSubmenu { enum MoveType {
BATTLE_SUBMENU_HAMMER = 1, MOVE_TYPE_NONE = 0,
BATTLE_SUBMENU_JUMP = 2, MOVE_TYPE_HAMMER = 1,
MOVE_TYPE_JUMP = 2,
MOVE_TYPE_3 = 3,
MOVE_TYPE_ITEMS = 4,
MOVE_TYPE_TACTICS = 5,
MOVE_TYPE_6 = 6,
MOVE_TYPE_ATTACK_UP = 7,
MOVE_TYPE_DEFENSE_UP = 8,
MOVE_TYPE_9 = 9,
MOVE_TYPE_STAR_POWER = 10,
MOVE_TYPE_PARTNER = 11
}; };
enum BattleSubmenuStatus { enum BattleMenuStatus {
BATTLE_SUBMENU_STATUS_ENABLED = 1, BATTLE_SUBMENU_STATUS_ENABLED = 1,
BATTLE_SUBMENU_STATUS_NOT_ENOUGH_FP = 0, BATTLE_SUBMENU_STATUS_NOT_ENOUGH_FP = 0,
BATTLE_SUBMENU_STATUS_NO_TARGETS = -1, BATTLE_SUBMENU_STATUS_NO_TARGETS = -1,

View File

@ -17,7 +17,7 @@ extern CollisionStatus gCollisionStatus;
extern GameStatus gGameStatus; extern GameStatus gGameStatus;
extern GameStatus* gGameStatusPtr; extern GameStatus* gGameStatusPtr;
extern s32 gRandSeed; extern s32 gRandSeed;
extern ItemData gItemTable[364]; extern ItemData gItemTable[365];
extern UNK_FUN_PTR(gCurrentUpdateFunction); extern UNK_FUN_PTR(gCurrentUpdateFunction);
extern MoveData gMoveTable[185]; extern MoveData gMoveTable[185];

View File

@ -93,10 +93,10 @@ extern s32 D_8029EFBC;
extern s32 D_8029EFC0[10]; extern s32 D_8029EFC0[10];
extern s32 D_8029EFE8[10]; extern s32 D_8029EFE8[10];
extern s32 D_8029F010[10]; extern s32 D_8029F010[10];
extern HudScript HudScript_HPBar[]; extern HudScript HudScript_HPBar;
extern HudScript HudScript_Item_SmallStarPoint[]; extern HudScript HudScript_Item_SmallStarPoint;
extern HudScript HudScript_Item_StarPoint[]; extern HudScript HudScript_Item_StarPoint;
extern HudScript HudScript_StatusSPShine[]; extern HudScript HudScript_StatusSPShine;
void func_8023ED5C(void); void func_8023ED5C(void);
void func_8023F088(Camera*); void func_8023F088(Camera*);
@ -198,23 +198,23 @@ void initialize_battle(void) {
func_8024EDC0(); func_8024EDC0();
func_80268E88(); func_80268E88();
set_windows_visible(WINDOW_GROUP_1); set_windows_visible(WINDOW_GROUP_1);
D_8029EFBC = hud_element_create(HudScript_HPBar); D_8029EFBC = hud_element_create(&HudScript_HPBar);
hud_element_set_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80);
for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) { for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) {
hudElemID = D_8029EFC0[i] = hud_element_create(HudScript_Item_StarPoint); hudElemID = D_8029EFC0[i] = hud_element_create(&HudScript_Item_StarPoint);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_depth(hudElemID, 20); hud_element_set_render_depth(hudElemID, 20);
} }
for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) { for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) {
hudElemID = D_8029EFE8[i] = hud_element_create(HudScript_StatusSPShine); hudElemID = D_8029EFE8[i] = hud_element_create(&HudScript_StatusSPShine);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_depth(hudElemID, 20); hud_element_set_render_depth(hudElemID, 20);
} }
for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) { for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) {
hudElemID = D_8029F010[i] = hud_element_create(HudScript_Item_SmallStarPoint); hudElemID = D_8029F010[i] = hud_element_create(&HudScript_Item_SmallStarPoint);
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_depth(hudElemID, 20); hud_element_set_render_depth(hudElemID, 20);
} }
@ -884,7 +884,7 @@ void btl_update_starpoints_display(void) {
for (i = 0; i < tens; i++) { for (i = 0; i < tens; i++) {
id = D_8029EFC0[i]; id = D_8029EFC0[i];
if (hud_element_get_script(id) != HudScript_Item_StarPoint) { if (hud_element_get_script(id) != HudScript_Item_StarPoint) {
hud_element_set_script(id, HudScript_Item_StarPoint); hud_element_set_script(id, &HudScript_Item_StarPoint);
} }
hud_element_clear_flags(id, 2); hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY); hud_element_set_render_pos(id, posX, posY);
@ -892,7 +892,7 @@ void btl_update_starpoints_display(void) {
id = D_8029EFE8[i]; id = D_8029EFE8[i];
if (hud_element_get_script(id) != HudScript_StatusSPShine) { if (hud_element_get_script(id) != HudScript_StatusSPShine) {
hud_element_set_script(id, HudScript_StatusSPShine); hud_element_set_script(id, &HudScript_StatusSPShine);
} }
hud_element_clear_flags(id, 2); hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY - 5); hud_element_set_render_pos(id, posX, posY - 5);
@ -917,7 +917,7 @@ void btl_update_starpoints_display(void) {
for (i = 0; i < ones; i++) { for (i = 0; i < ones; i++) {
id = D_8029F010[i]; id = D_8029F010[i];
if (hud_element_get_script(id) != HudScript_Item_SmallStarPoint) { if (hud_element_get_script(id) != HudScript_Item_SmallStarPoint) {
hud_element_set_script(id, HudScript_Item_SmallStarPoint); hud_element_set_script(id, &HudScript_Item_SmallStarPoint);
} }
hud_element_clear_flags(id, 2); hud_element_clear_flags(id, 2);
hud_element_set_render_pos(id, posX, posY); hud_element_set_render_pos(id, posX, posY);

View File

@ -422,7 +422,7 @@ void btl_state_update_celebration(void) {
if (is_ability_active(ABILITY_FP_PLUS)) { if (is_ability_active(ABILITY_FP_PLUS)) {
id = D_8029FAA8; id = D_8029FAA8;
hud_element_set_script(id, gItemHudScripts[gItemTable[248].iconID].enabled); hud_element_set_script(id, gItemHudScripts[gItemTable[248].hudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED); hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_scale(id, 0.5f); hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y); hud_element_get_render_pos(id, &x, &y);
@ -491,7 +491,7 @@ void btl_state_update_celebration(void) {
if (is_ability_active(ABILITY_HP_PLUS)) { if (is_ability_active(ABILITY_HP_PLUS)) {
id = D_8029FAC4; id = D_8029FAC4;
hud_element_set_script(id, gItemHudScripts[gItemTable[231].iconID].enabled); hud_element_set_script(id, gItemHudScripts[gItemTable[231].hudElemID].enabled);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED); hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_scale(id, 0.5f); hud_element_set_scale(id, 0.5f);
hud_element_get_render_pos(id, &x, &y); hud_element_get_render_pos(id, &x, &y);

View File

@ -2,8 +2,8 @@
#include "effects.h" #include "effects.h"
#include "hud_element.h" #include "hud_element.h"
extern HudScript HudScript_Happy[]; extern HudScript HudScript_Happy;
extern HudScript HudScript_HPDrain[]; extern HudScript HudScript_HPDrain;
extern s32 D_8029FB90; extern s32 D_8029FB90;
extern f32 D_8029FB94; extern f32 D_8029FB94;
@ -135,7 +135,7 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_8029FBA0 = hud_element_create(HudScript_Refund); D_8029FBA0 = hud_element_create(&HudScript_Refund);
hud_element_set_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63); hud_element_set_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63);
} }
@ -407,13 +407,13 @@ ApiStatus func_802619E8(Evt* script, s32 isInitialCall) {
screenY -= 19; screenY -= 19;
if (script->varTable[10] > 0) { if (script->varTable[10] > 0) {
D_8029FBAC = hud_element_create(HudScript_HPDrain); D_8029FBAC = hud_element_create(&HudScript_HPDrain);
hud_element_set_render_pos(D_8029FBAC, screenX, screenY); hud_element_set_render_pos(D_8029FBAC, screenX, screenY);
screenY += 9; screenY += 9;
} }
if (script->varTable[11] > 0 || script->varTable[12] > 0) { if (script->varTable[11] > 0 || script->varTable[12] > 0) {
D_8029FBA8 = hud_element_create(HudScript_Happy); D_8029FBA8 = hud_element_create(&HudScript_Happy);
hud_element_set_render_pos(D_8029FBA8, screenX, screenY); hud_element_set_render_pos(D_8029FBA8, screenX, screenY);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;

View File

@ -1312,7 +1312,6 @@ s32 btl_check_player_defeated(void) {
return TRUE; return TRUE;
} }
void btl_init_menu_boots(void) { void btl_init_menu_boots(void) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
@ -1348,7 +1347,7 @@ void btl_init_menu_boots(void) {
u8 moveID = gItemTable[badge].moveID; u8 moveID = gItemTable[badge].moveID;
move = &moveTable[moveID]; move = &moveTable[moveID];
if (move->battleSubmenu == BATTLE_SUBMENU_JUMP) { if (move->category == MOVE_TYPE_JUMP) {
battleStatus->submenuMoves[moveCount] = moveID; battleStatus->submenuMoves[moveCount] = moveID;
battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i]; battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i];
moveCount++; moveCount++;
@ -1409,7 +1408,6 @@ void btl_init_menu_boots(void) {
} }
} }
void btl_init_menu_hammer(void) { void btl_init_menu_hammer(void) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
@ -1443,7 +1441,7 @@ void btl_init_menu_hammer(void) {
MoveData* moveTable = gMoveTable; MoveData* moveTable = gMoveTable;
u8 moveID = gItemTable[badge].moveID; u8 moveID = gItemTable[badge].moveID;
move = &moveTable[moveID]; move = &moveTable[moveID];
if (move->battleSubmenu == BATTLE_SUBMENU_HAMMER) { if (move->category == MOVE_TYPE_HAMMER) {
battleStatus->submenuMoves[moveCount] = moveID; battleStatus->submenuMoves[moveCount] = moveID;
battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i]; battleStatus->submenuIcons[moveCount] = playerData->equippedBadges[i];
moveCount++; moveCount++;
@ -1598,7 +1596,7 @@ s32 count_power_plus(s32 damageType) {
for (i = 0; i < ARRAY_COUNT(gPlayerData.equippedBadges); i++) { for (i = 0; i < ARRAY_COUNT(gPlayerData.equippedBadges); i++) {
u8 moveID = gItemTable[gPlayerData.equippedBadges[i]].moveID; u8 moveID = gItemTable[gPlayerData.equippedBadges[i]].moveID;
if (gMoveTable[moveID].battleSubmenu == 7 && moveID == MOVE_POWER_PLUS) { if (gMoveTable[moveID].category == MOVE_TYPE_ATTACK_UP && moveID == MOVE_POWER_PLUS) {
if (gBattleStatus.flags1 & BS_FLAGS1_10 || damageType & DAMAGE_TYPE_JUMP) { if (gBattleStatus.flags1 & BS_FLAGS1_10 || damageType & DAMAGE_TYPE_JUMP) {
count++; count++;
} }

View File

@ -16,19 +16,6 @@ typedef struct StarPowerEntry {
/* 0x10 */ Bytecode* init; /* 0x10 */ Bytecode* init;
} StarPowerEntry; // size = 0x14 } StarPowerEntry; // size = 0x14
typedef struct StarPowerDesc {
/* 0x00 */ s8 starPoints;
/* 0x01 */ s8 unk_01;
/* 0x02 */ s8 unk_02;
/* 0x03 */ s8 unk_03;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
} StarPowerDesc; // size = 0x14
extern StarPowerDesc D_8008F071[];
extern EvtScript battle_star_focus_usePower; extern EvtScript battle_star_focus_usePower;
extern EvtScript battle_star_refresh_usePower; extern EvtScript battle_star_refresh_usePower;
extern EvtScript battle_star_lullaby_usePower; extern EvtScript battle_star_lullaby_usePower;
@ -75,7 +62,7 @@ ApiStatus LoadStarPowerScript(Evt* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s16 selectedItemID; s16 selectedItemID;
playerData->specialBarsFilled -= D_8008F071[battleStatus->selectedMoveID].starPoints * 256; playerData->specialBarsFilled -= gMoveTable[battleStatus->selectedMoveID].costFP * 256;
selectedItemID = battleStatus->selectedItemID; selectedItemID = battleStatus->selectedItemID;
dma_copy((&D_8029C7D0[selectedItemID])->dmaStart, (&D_8029C7D0[selectedItemID])->dmaEnd, dma_copy((&D_8029C7D0[selectedItemID])->dmaStart, (&D_8029C7D0[selectedItemID])->dmaEnd,
(&D_8029C7D0[selectedItemID])->dmaDest); (&D_8029C7D0[selectedItemID])->dmaDest);

View File

@ -58,7 +58,7 @@ void func_80048E34(Enemy* enemy, s32 arg1, s32 arg2) {
enemy->aiScript = NULL; enemy->aiScript = NULL;
} }
if (enemy->unk_BC != 0) { if (enemy->unk_BC != NULL) {
kill_script_by_ID(enemy->unk_C0); kill_script_by_ID(enemy->unk_C0);
enemy->unk_BC = NULL; enemy->unk_BC = NULL;
} }
@ -277,7 +277,7 @@ void basic_ai_wander_init(Evt* script, NpcAISettings* npcAISettings, EnemyDetect
enemy->aiFlags &= ~ENEMY_AI_FLAGS_40; enemy->aiFlags &= ~ENEMY_AI_FLAGS_40;
enemy->aiFlags &= ~ENEMY_AI_FLAGS_20; enemy->aiFlags &= ~ENEMY_AI_FLAGS_20;
script->functionTemp[0] = AI_STATE_WANDER; script->AI_TEMP_STATE = AI_STATE_WANDER;
} }
void basic_ai_wander(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* territory) { void basic_ai_wander(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* territory) {
@ -361,7 +361,7 @@ void basic_ai_wander(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume*
if (aiSettings->moveTime > 0) { if (aiSettings->moveTime > 0) {
npc->duration--; npc->duration--;
if (npc->duration <= 0) { if (npc->duration <= 0) {
script->functionTemp[0] = AI_STATE_LOITER_INIT; script->AI_TEMP_STATE = AI_STATE_LOITER_INIT;
script->functionTemp[1] = rand_int(1000) % 3 + 2; script->functionTemp[1] = rand_int(1000) % 3 + 2;
if (aiSettings->unk_AI_2C <= 0 || aiSettings->waitTime <= 0) { if (aiSettings->unk_AI_2C <= 0 || aiSettings->waitTime <= 0) {
script->AI_TEMP_STATE = AI_STATE_WANDER_INIT; script->AI_TEMP_STATE = AI_STATE_WANDER_INIT;
@ -432,7 +432,7 @@ void basic_ai_found_player_jump_init(Evt* script, NpcAISettings* npcAISettings,
npc->jumpScale = 2.5f; npc->jumpScale = 2.5f;
npc->moveToPos.y = npc->pos.y; npc->moveToPos.y = npc->pos.y;
npc->flags |= NPC_FLAG_JUMPING; npc->flags |= NPC_FLAG_JUMPING;
script->functionTemp[0] = AI_STATE_ALERT; script->AI_TEMP_STATE = AI_STATE_ALERT;
} }
void basic_ai_found_player_jump(Evt* script, NpcAISettings* npcAISettings, EnemyDetectVolume* territory) { void basic_ai_found_player_jump(Evt* script, NpcAISettings* npcAISettings, EnemyDetectVolume* territory) {
@ -452,7 +452,7 @@ void basic_ai_found_player_jump(Evt* script, NpcAISettings* npcAISettings, Enemy
} else { } else {
npc->jumpVelocity = 0.0f; npc->jumpVelocity = 0.0f;
npc->flags &= ~NPC_FLAG_JUMPING; npc->flags &= ~NPC_FLAG_JUMPING;
script->functionTemp[0] = AI_STATE_CHASE_INIT; script->AI_TEMP_STATE = AI_STATE_CHASE_INIT;
} }
} }
@ -488,7 +488,7 @@ void basic_ai_chase_init(Evt* script, NpcAISettings* npcAISettings, EnemyDetectV
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_CHASE]; npc->currentAnim.w = enemy->animList[ENEMY_ANIM_CHASE];
npc->moveSpeed = npcAISettings->chaseSpeed; npc->moveSpeed = npcAISettings->chaseSpeed;
script->functionTemp[0] = AI_STATE_CHASE; script->AI_TEMP_STATE = AI_STATE_CHASE;
} }
void basic_ai_chase(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* territory) { void basic_ai_chase(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* territory) {
@ -501,7 +501,7 @@ void basic_ai_chase(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* t
fx_emote(EMOTE_QUESTION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp28); fx_emote(EMOTE_QUESTION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &sp28);
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE]; npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE];
npc->duration = 20; npc->duration = 20;
script->functionTemp[0] = AI_STATE_LOSE_PLAYER; script->AI_TEMP_STATE = AI_STATE_LOSE_PLAYER;
return; return;
} }
@ -514,7 +514,7 @@ void basic_ai_chase(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* t
fx_emote(EMOTE_QUESTION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xC, &sp28); fx_emote(EMOTE_QUESTION, npc, 0, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xC, &sp28);
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE]; npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE];
npc->duration = 15; npc->duration = 15;
script->functionTemp[0] = AI_STATE_LOSE_PLAYER; script->AI_TEMP_STATE = AI_STATE_LOSE_PLAYER;
return; return;
} }
} }
@ -530,7 +530,7 @@ void basic_ai_chase(Evt* script, NpcAISettings* aiSettings, EnemyDetectVolume* t
if (npc->duration > 0) { if (npc->duration > 0) {
npc->duration--; npc->duration--;
} else { } else {
script->functionTemp[0] = AI_STATE_CHASE_INIT; script->AI_TEMP_STATE = AI_STATE_CHASE_INIT;
} }
} }
@ -542,7 +542,7 @@ void basic_ai_lose_player(Evt* script, NpcAISettings* npcAISettings, EnemyDetect
if (npc->duration == 0) { if (npc->duration == 0) {
// turn to face home position // turn to face home position
npc->yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z)); npc->yaw = clamp_angle(atan2(npc->pos.x, npc->pos.z, enemy->territory->wander.point.x, enemy->territory->wander.point.z));
script->functionTemp[0] = AI_STATE_WANDER_INIT; script->AI_TEMP_STATE = AI_STATE_WANDER_INIT;
} }
} }
@ -564,7 +564,7 @@ ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) {
territory.detectFlags = 0; territory.detectFlags = 0;
if (isInitialCall || enemy->aiFlags & ENEMY_AI_FLAGS_4) { if (isInitialCall || enemy->aiFlags & ENEMY_AI_FLAGS_4) {
script->functionTemp[0] = AI_STATE_WANDER_INIT; script->AI_TEMP_STATE = AI_STATE_WANDER_INIT;
npc->duration = 0; npc->duration = 0;
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE]; npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE];
@ -579,44 +579,43 @@ ApiStatus BasicAI_Main(Evt* script, s32 isInitialCall) {
} }
if (enemy->aiFlags & ENEMY_AI_FLAGS_4) { if (enemy->aiFlags & ENEMY_AI_FLAGS_4) {
script->functionTemp[0] = AI_STATE_SUSPEND; script->AI_TEMP_STATE = AI_STATE_SUSPEND;
script->functionTemp[1] = AI_STATE_WANDER_INIT; script->functionTemp[1] = AI_STATE_WANDER_INIT;
} else if (enemy->flags & ENEMY_FLAGS_40000000) { } else if (enemy->flags & ENEMY_FLAGS_40000000) {
script->functionTemp[0] = AI_STATE_CHASE_INIT; script->AI_TEMP_STATE = AI_STATE_CHASE_INIT;
} }
enemy->aiFlags &= ~ENEMY_AI_FLAGS_4; enemy->aiFlags &= ~ENEMY_AI_FLAGS_4;
enemy->flags &= ~ENEMY_FLAGS_40000000; enemy->flags &= ~ENEMY_FLAGS_40000000;
} }
switch (script->functionTemp[0]) { switch (script->AI_TEMP_STATE) {
case AI_STATE_WANDER_INIT: case AI_STATE_WANDER_INIT:
basic_ai_wander_init(script, aiSettings, pTerritory); basic_ai_wander_init(script, aiSettings, pTerritory);
// fallthrough
case AI_STATE_WANDER: case AI_STATE_WANDER:
basic_ai_wander(script, aiSettings, pTerritory); basic_ai_wander(script, aiSettings, pTerritory);
break; break;
case AI_STATE_LOITER_INIT: case AI_STATE_LOITER_INIT:
basic_ai_loiter_init(script, aiSettings, pTerritory); basic_ai_loiter_init(script, aiSettings, pTerritory);
// fallthrough
case AI_STATE_LOITER: case AI_STATE_LOITER:
basic_ai_loiter(script, aiSettings, pTerritory); basic_ai_loiter(script, aiSettings, pTerritory);
break; break;
case AI_STATE_ALERT_INIT: case AI_STATE_ALERT_INIT:
basic_ai_found_player_jump_init(script, aiSettings, pTerritory); basic_ai_found_player_jump_init(script, aiSettings, pTerritory);
// fallthrough
case AI_STATE_ALERT: case AI_STATE_ALERT:
basic_ai_found_player_jump(script, aiSettings, pTerritory); basic_ai_found_player_jump(script, aiSettings, pTerritory);
break; break;
case AI_STATE_CHASE_INIT: case AI_STATE_CHASE_INIT:
basic_ai_chase_init(script, aiSettings, pTerritory); basic_ai_chase_init(script, aiSettings, pTerritory);
// fallthrough
case AI_STATE_CHASE: case AI_STATE_CHASE:
basic_ai_chase(script, aiSettings, pTerritory); basic_ai_chase(script, aiSettings, pTerritory);
if (script->functionTemp[0] != AI_STATE_LOSE_PLAYER) { if (script->AI_TEMP_STATE != AI_STATE_LOSE_PLAYER) {
break; break;
} }
// fallthrough
case AI_STATE_LOSE_PLAYER: case AI_STATE_LOSE_PLAYER:
basic_ai_lose_player(script, aiSettings, pTerritory); basic_ai_lose_player(script, aiSettings, pTerritory);
break; break;

View File

@ -1,89 +1,87 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
extern s32 D_8008FA78; extern HudScript HudScript_YellowArrow;
extern HudScript HudScript_YellowArrow[]; extern HudScript HudScript_MenuFlee;
extern HudScript HudScript_MenuFleeDisabled;
extern HudScript HudScript_MenuDefend;
extern HudScript HudScript_MenuDefendDisabled;
extern HudScript HudScript_MenuStrategies;
extern HudScript HudScript_MenuStrategiesDisabled;
extern HudScript HudScript_MenuPouch;
extern HudScript HudScript_MenuPouchDisabled;
extern HudScript HudScript_MenuDoNothing;
extern HudScript HudScript_MenuDoNothingDisabled;
extern HudScript HudScript_MenuFlee[]; extern HudScript HudScript_Kooper;
extern HudScript HudScript_MenuFleeDisabled[]; extern HudScript HudScript_Bombette;
extern HudScript HudScript_MenuDefend[]; extern HudScript HudScript_Partner0;
extern HudScript HudScript_MenuDefendDisabled[]; extern HudScript HudScript_Partner0Disabled;
extern HudScript HudScript_MenuStrategies[]; extern HudScript HudScript_Goombario;
extern HudScript HudScript_MenuStrategiesDisabled[]; extern HudScript HudScript_GoombarioDisabled;
extern HudScript HudScript_MenuPouch[]; extern HudScript HudScript_KooperDisabled;
extern HudScript HudScript_MenuPouchDisabled[]; extern HudScript HudScript_BombetteDisabled;
extern HudScript HudScript_MenuDoNothing[]; extern HudScript HudScript_Parakarry;
extern HudScript HudScript_MenuDoNothingDisabled[]; extern HudScript HudScript_ParakarryDisabled;
extern HudScript HudScript_Bow;
extern HudScript HudScript_BowDisabled;
extern HudScript HudScript_Watt;
extern HudScript HudScript_WattDisabled;
extern HudScript HudScript_Sushie;
extern HudScript HudScript_SushieDisabled;
extern HudScript HudScript_Lakilester;
extern HudScript HudScript_LakilesterDisabled;
extern HudScript HudScript_PartnerA;
extern HudScript HudScript_PartnerADisabled;
extern HudScript HudScript_Kooper[]; extern HudScript HudScript_MenuBoots1;
extern HudScript HudScript_Bombette[]; extern HudScript HudScript_MenuBoots1Disabled;
extern HudScript HudScript_Partner0[]; extern HudScript HudScript_MenuBoots2;
extern HudScript HudScript_Partner0Disabled[]; extern HudScript HudScript_MenuBoots2Disabled;
extern HudScript HudScript_Goombario[]; extern HudScript HudScript_MenuBoots3;
extern HudScript HudScript_GoombarioDisabled[]; extern HudScript HudScript_MenuBoots3Disabled;
extern HudScript HudScript_KooperDisabled[];
extern HudScript HudScript_BombetteDisabled[];
extern HudScript HudScript_Parakarry[];
extern HudScript HudScript_ParakarryDisabled[];
extern HudScript HudScript_Bow[];
extern HudScript HudScript_BowDisabled[];
extern HudScript HudScript_Watt[];
extern HudScript HudScript_WattDisabled[];
extern HudScript HudScript_Sushie[];
extern HudScript HudScript_SushieDisabled[];
extern HudScript HudScript_Lakilester[];
extern HudScript HudScript_LakilesterDisabled[];
extern HudScript HudScript_PartnerA[];
extern HudScript HudScript_PartnerADisabled[];
extern HudScript HudScript_MenuBoots1[]; extern HudScript HudScript_MenuHammer1;
extern HudScript HudScript_MenuBoots1Disabled[]; extern HudScript HudScript_MenuHammer1Disabled;
extern HudScript HudScript_MenuBoots2[]; extern HudScript HudScript_MenuHammer2;
extern HudScript HudScript_MenuBoots2Disabled[]; extern HudScript HudScript_MenuHammer2Disabled;
extern HudScript HudScript_MenuBoots3[]; extern HudScript HudScript_MenuHammer3;
extern HudScript HudScript_MenuBoots3Disabled[]; extern HudScript HudScript_MenuHammer3Disabled;
extern HudScript HudScript_MenuHammer1[]; extern HudScript HudScript_MenuItem;
extern HudScript HudScript_MenuHammer1Disabled[]; extern HudScript HudScript_MenuItemDisabled;
extern HudScript HudScript_MenuHammer2[];
extern HudScript HudScript_MenuHammer2Disabled[];
extern HudScript HudScript_MenuHammer3[];
extern HudScript HudScript_MenuHammer3Disabled[];
extern HudScript HudScript_MenuItem[]; extern HudScript HudScript_MenuStarPower;
extern HudScript HudScript_MenuItemDisabled[]; extern HudScript HudScript_MenuStarPowerDisabled;
extern HudScript HudScript_MenuStarPower[]; extern HudScript HudScript_Eldstar;
extern HudScript HudScript_MenuStarPowerDisabled[]; extern HudScript HudScript_EldstarDisabled;
extern HudScript HudScript_Mamar;
extern HudScript HudScript_MamarDisabled;
extern HudScript HudScript_Skolar;
extern HudScript HudScript_SkolarDisabled;
extern HudScript HudScript_Muskular;
extern HudScript HudScript_MuskularDisabled;
extern HudScript HudScript_Misstar;
extern HudScript HudScript_MisstarDisabled;
extern HudScript HudScript_Klevar;
extern HudScript HudScript_KlevarDisabled;
extern HudScript HudScript_Kalmar;
extern HudScript HudScript_KalmarDisabled;
extern HudScript HudScript_StarBeam;
extern HudScript HudScript_StarBeamDisabled;
extern HudScript HudScript_PeachBeam;
extern HudScript HudScript_PeachBeamDisabled;
extern HudScript HudScript_Eldstar[]; extern HudScript HudScript_MoveDiamond;
extern HudScript HudScript_EldstarDisabled[]; extern HudScript HudScript_MoveBlueOrb;
extern HudScript HudScript_Mamar[]; extern HudScript HudScript_MoveGreenOrb;
extern HudScript HudScript_MamarDisabled[]; extern HudScript HudScript_MoveRedOrb;
extern HudScript HudScript_Skolar[]; extern HudScript HudScript_MoveDiamondDisabled;
extern HudScript HudScript_SkolarDisabled[]; extern HudScript HudScript_MoveBlueOrbDisabled;
extern HudScript HudScript_Muskular[]; extern HudScript HudScript_MoveGreenOrbDisabled;
extern HudScript HudScript_MuskularDisabled[]; extern HudScript HudScript_MoveRedOrbDisabled;
extern HudScript HudScript_Misstar[];
extern HudScript HudScript_MisstarDisabled[];
extern HudScript HudScript_Klevar[];
extern HudScript HudScript_KlevarDisabled[];
extern HudScript HudScript_Kalmar[];
extern HudScript HudScript_KalmarDisabled[];
extern HudScript HudScript_StarBeam[];
extern HudScript HudScript_StarBeamDisabled[];
extern HudScript HudScript_PeachBeam[];
extern HudScript HudScript_PeachBeamDisabled[];
extern HudScript HudScript_MoveDiamond[];
extern HudScript HudScript_MoveBlueOrb[];
extern HudScript HudScript_MoveGreenOrb[];
extern HudScript HudScript_MoveRedOrb[];
extern HudScript HudScript_MoveDiamondDisabled[];
extern HudScript HudScript_MoveBlueOrbDisabled[];
extern HudScript HudScript_MoveGreenOrbDisabled[];
extern HudScript HudScript_MoveRedOrbDisabled[];
extern s32 D_802ACC60; extern s32 D_802ACC60;
extern s32 D_802ACC6C; extern s32 D_802ACC6C;
@ -168,51 +166,51 @@ s16 D_802AB340[] = { 28, 40 };
s16 D_802AB344[] = { 0, -2 }; s16 D_802AB344[] = { 0, -2 };
HudScript* battle_menu_JumpHudScripts[] = { HudScript* battle_menu_JumpHudScripts[] = {
HudScript_MenuBoots1Disabled, HudScript_MenuBoots1Disabled, &HudScript_MenuBoots1Disabled, &HudScript_MenuBoots1Disabled,
HudScript_MenuBoots1,HudScript_MenuBoots1Disabled, &HudScript_MenuBoots1,&HudScript_MenuBoots1Disabled,
HudScript_MenuBoots2, HudScript_MenuBoots2Disabled, &HudScript_MenuBoots2, &HudScript_MenuBoots2Disabled,
HudScript_MenuBoots3, HudScript_MenuBoots3Disabled }; &HudScript_MenuBoots3, &HudScript_MenuBoots3Disabled };
HudScript* battle_menu_HammerHudScripts[] = { HudScript* battle_menu_HammerHudScripts[] = {
HudScript_MenuHammer1Disabled, HudScript_MenuHammer1Disabled, &HudScript_MenuHammer1Disabled, &HudScript_MenuHammer1Disabled,
HudScript_MenuHammer1, HudScript_MenuHammer1Disabled, &HudScript_MenuHammer1, &HudScript_MenuHammer1Disabled,
HudScript_MenuHammer2, HudScript_MenuHammer2Disabled, &HudScript_MenuHammer2, &HudScript_MenuHammer2Disabled,
HudScript_MenuHammer3, HudScript_MenuHammer3Disabled }; &HudScript_MenuHammer3, &HudScript_MenuHammer3Disabled };
HudScript* battle_menu_ItemHudScripts[] = { HudScript_MenuItem, HudScript_MenuItemDisabled }; HudScript* battle_menu_ItemHudScripts[] = { &HudScript_MenuItem, &HudScript_MenuItemDisabled };
HudScript* battle_menu_StarPowerHudScripts[] = { HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled }; HudScript* battle_menu_StarPowerHudScripts[] = { &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled };
HudScript* battle_menu_StarPowerMovesHudScripts[] = { HudScript* battle_menu_StarPowerMovesHudScripts[] = {
HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled, HudScript_Eldstar, HudScript_EldstarDisabled, &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled, &HudScript_Eldstar, &HudScript_EldstarDisabled,
HudScript_Mamar, HudScript_MamarDisabled, HudScript_Skolar, HudScript_SkolarDisabled, &HudScript_Mamar, &HudScript_MamarDisabled, &HudScript_Skolar, &HudScript_SkolarDisabled,
HudScript_Muskular, HudScript_MuskularDisabled, HudScript_Misstar, HudScript_MisstarDisabled, &HudScript_Muskular, &HudScript_MuskularDisabled, &HudScript_Misstar, &HudScript_MisstarDisabled,
HudScript_Klevar, HudScript_KlevarDisabled, HudScript_Kalmar, HudScript_KalmarDisabled, &HudScript_Klevar, &HudScript_KlevarDisabled, &HudScript_Kalmar, &HudScript_KalmarDisabled,
HudScript_StarBeam, HudScript_StarBeamDisabled, HudScript_PeachBeam, HudScript_PeachBeamDisabled, &HudScript_StarBeam, &HudScript_StarBeamDisabled, &HudScript_PeachBeam, &HudScript_PeachBeamDisabled,
HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled, HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled, &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled
}; };
HudScript* battle_menu_PartnerHudScripts[] = { HudScript* battle_menu_PartnerHudScripts[] = {
HudScript_Partner0, HudScript_Goombario, HudScript_Kooper, HudScript_Bombette, &HudScript_Partner0, &HudScript_Goombario, &HudScript_Kooper, &HudScript_Bombette,
HudScript_Parakarry, HudScript_Partner0, HudScript_Watt, HudScript_Sushie, &HudScript_Parakarry, &HudScript_Partner0, &HudScript_Watt, &HudScript_Sushie,
HudScript_Lakilester, HudScript_Bow, HudScript_PartnerA, HudScript_PartnerA, &HudScript_Lakilester, &HudScript_Bow, &HudScript_PartnerA, &HudScript_PartnerA,
HudScript_PartnerA, HudScript_PartnerA, HudScript_PartnerA, HudScript_PartnerA &HudScript_PartnerA, &HudScript_PartnerA, &HudScript_PartnerA, &HudScript_PartnerA
}; };
HudScript* battle_menu_DisabledPartnerHudScripts[] = { HudScript* battle_menu_DisabledPartnerHudScripts[] = {
HudScript_Partner0Disabled, HudScript_GoombarioDisabled, HudScript_KooperDisabled, HudScript_BombetteDisabled, &HudScript_Partner0Disabled, &HudScript_GoombarioDisabled, &HudScript_KooperDisabled, &HudScript_BombetteDisabled,
HudScript_ParakarryDisabled, HudScript_Partner0Disabled, HudScript_WattDisabled, HudScript_SushieDisabled, &HudScript_ParakarryDisabled, &HudScript_Partner0Disabled, &HudScript_WattDisabled, &HudScript_SushieDisabled,
HudScript_LakilesterDisabled, HudScript_BowDisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled, &HudScript_LakilesterDisabled, &HudScript_BowDisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled,
HudScript_PartnerADisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled &HudScript_PartnerADisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled
}; };
HudScript* battle_menu_StrategiesHudScript[] = { HudScript_MenuStrategies }; HudScript* battle_menu_StrategiesHudScript[] = { &HudScript_MenuStrategies };
HudScript* battle_menu_DisabledStrategiesHudScript[] = { HudScript_MenuStrategiesDisabled }; HudScript* battle_menu_DisabledStrategiesHudScript[] = { &HudScript_MenuStrategiesDisabled };
HudScript* battle_menu_DoNothingHudScripts[] = { HudScript_MenuDoNothing, HudScript_MenuDoNothingDisabled }; HudScript* battle_menu_DoNothingHudScripts[] = { &HudScript_MenuDoNothing, &HudScript_MenuDoNothingDisabled };
HudScript* battle_menu_FleeHudScripts[] = { HudScript_MenuFlee, HudScript_MenuFleeDisabled }; HudScript* battle_menu_FleeHudScripts[] = { &HudScript_MenuFlee, &HudScript_MenuFleeDisabled };
// Jump, Hammer, Items, RunAway, Defense // Jump, Hammer, Items, RunAway, Defense
s32 battle_menu_leftJustfiedMessagesA[] = { 0x001D0039, 0x001D0038, 0x001D003F, 0x001D003B, 0x001D0044 }; s32 battle_menu_leftJustfiedMessagesA[] = { 0x001D0039, 0x001D0038, 0x001D003F, 0x001D003B, 0x001D0044 };
@ -251,22 +249,22 @@ s32 D_802AB558[] = {
HudScript* battle_menu_PartnerMoveHudScripts[] = { HudScript* battle_menu_PartnerMoveHudScripts[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
HudScript_Goombario, HudScript_GoombarioDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Goombario, &HudScript_GoombarioDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Kooper, HudScript_KooperDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Kooper, &HudScript_KooperDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Bombette, HudScript_BombetteDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Bombette, &HudScript_BombetteDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Parakarry, HudScript_ParakarryDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Parakarry, &HudScript_ParakarryDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Partner0, HudScript_Partner0Disabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Partner0, &HudScript_Partner0Disabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Watt, HudScript_WattDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Watt, &HudScript_WattDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Sushie, HudScript_SushieDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Sushie, &HudScript_SushieDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Lakilester, HudScript_LakilesterDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled, &HudScript_Lakilester, &HudScript_LakilesterDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled,
HudScript_Bow, HudScript_BowDisabled, HudScript_MoveDiamond, HudScript_MoveDiamondDisabled, HudScript_MoveBlueOrb, HudScript_MoveBlueOrbDisabled, HudScript_MoveGreenOrb, HudScript_MoveGreenOrbDisabled, HudScript_MoveRedOrb, HudScript_MoveRedOrbDisabled }; &HudScript_Bow, &HudScript_BowDisabled, &HudScript_MoveDiamond, &HudScript_MoveDiamondDisabled, &HudScript_MoveBlueOrb, &HudScript_MoveBlueOrbDisabled, &HudScript_MoveGreenOrb, &HudScript_MoveGreenOrbDisabled, &HudScript_MoveRedOrb, &HudScript_MoveRedOrbDisabled };
HudScript* battle_menu_PeachStarPowerHudScripts[] = { HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled }; HudScript* battle_menu_PeachStarPowerHudScripts[] = { &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled };
// Focus // Focus
s32 D_802AB728[] = { 0x001D0055 }; s32 D_802AB728[] = { 0x001D0055 };
HudScript* battle_menu_TwinkStarPowerHudScripts[] = { HudScript_MenuStarPower, HudScript_MenuStarPowerDisabled }; HudScript* battle_menu_TwinkStarPowerHudScripts[] = { &HudScript_MenuStarPower, &HudScript_MenuStarPowerDisabled };
// Dash // Dash
s32 D_802AB734[] = { 0x001D0057 }; s32 D_802AB734[] = { 0x001D0057 };
@ -628,7 +626,7 @@ void func_802A2910(void) {
hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
hud_element_set_script(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer); hud_element_set_script(battle_menu_moveCursorIcon, &HudScript_AnimatedHandPointer);
set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT);
if (!battle_menu_hasSpiritsMenu) { if (!battle_menu_hasSpiritsMenu) {
@ -679,7 +677,7 @@ void func_802A2AB8(void) {
hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
hud_element_set_script(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer); hud_element_set_script(battle_menu_moveCursorIcon, &HudScript_AnimatedHandPointer);
battle_menu_moveTextColor = 10; battle_menu_moveTextColor = 10;
D_802AD10F = 1; D_802AD10F = 1;
battle_menu_moveState = 20; battle_menu_moveState = 20;
@ -830,7 +828,7 @@ void func_802A47E0(void) {
hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
hud_element_set_script(D_802AD618, HudScript_AnimatedHandPointer); hud_element_set_script(D_802AD618, &HudScript_AnimatedHandPointer);
set_window_update(WINDOW_ID_6, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_6, WINDOW_UPDATE_TRANSPARENT);
set_window_update(WINDOW_ID_7, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_7, WINDOW_UPDATE_TRANSPARENT);
set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW);
@ -854,7 +852,7 @@ void func_802A48FC(void) {
hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF); hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
hud_element_set_script(D_802AD618, HudScript_AnimatedHandPointer); hud_element_set_script(D_802AD618, &HudScript_AnimatedHandPointer);
D_802AD614 = 10; D_802AD614 = 10;
D_802AD60B = 1; D_802AD60B = 1;
D_802AD604 = 20; D_802AD604 = 20;
@ -1320,9 +1318,9 @@ void btl_state_update_peach_menu(void) {
battleStatus->unk_6C = 4; battleStatus->unk_6C = 4;
battleStatus->unk_6E = 5; battleStatus->unk_6E = 5;
battleStatus->moveCategory = 8; battleStatus->moveCategory = 8;
battleStatus->selectedMoveID = 0x81; battleStatus->selectedMoveID = MOVE_PEACH_FOCUS;
battleStatus->selectedItemID = 0xA; battleStatus->selectedItemID = 0xA;
battleStatus->currentTargetListFlags = D_8008FA78; battleStatus->currentTargetListFlags = gMoveTable[MOVE_PEACH_FOCUS].flags;
btl_set_state(0x11); btl_set_state(0x11);
} }
break; break;

13749
src/5B320.c Normal file

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ extern s16 D_8010CCFE;
void func_800E6860(void) { void func_800E6860(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (gPartnerActionStatus.partnerActionState != 0 && gPartnerActionStatus.actingPartner == PARTNER_BOW) { if (gPartnerActionStatus.partnerActionState != PARTNER_ACTION_NONE && gPartnerActionStatus.actingPartner == PARTNER_BOW) {
Npc* partner = get_npc_unsafe(NPC_PARTNER); Npc* partner = get_npc_unsafe(NPC_PARTNER);
func_802DDEE4(0, -1, 7, 0, 0, 0, playerStatus->alpha1, 0); func_802DDEE4(0, -1, 7, 0, 0, 0, playerStatus->alpha1, 0);
@ -112,36 +112,33 @@ void func_800E6B68(void) {
s32 setup_partner_popup(PopupMenu* menu) { s32 setup_partner_popup(PopupMenu* menu) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 temp_a1; s32 optionCount = 0;
s32* phi_t0;
s32 ret;
s32 i; s32 i;
ret = 0;
for (i = 1; i < ARRAY_COUNT(D_8008EEC0); i++) { for (i = 1; i < ARRAY_COUNT(D_8008EEC0); i++) {
temp_a1 = D_8008EEC0[i]; s32 partnerID = D_8008EEC0[i];
if (playerData->partners[temp_a1].enabled && temp_a1 != 5) { if (playerData->partners[partnerID].enabled && partnerID != PARTNER_GOOMPA) {
s32* properties = gPartnerPopupProperties[temp_a1]; s32* properties = gPartnerPopupProperties[partnerID];
menu->ptrIcon[ret] = wPartnerHudScripts[temp_a1]; menu->ptrIcon[optionCount] = wPartnerHudScripts[partnerID];
menu->userIndex[ret] = temp_a1; menu->userIndex[optionCount] = partnerID;
menu->enabled[ret] = TRUE; menu->enabled[optionCount] = TRUE;
menu->nameMsg[ret] = properties[0]; menu->nameMsg[optionCount] = properties[0];
menu->descMsg[ret] = properties[2]; menu->descMsg[optionCount] = properties[2];
menu->value[ret] = playerData->partners[temp_a1].level; menu->value[optionCount] = playerData->partners[partnerID].level;
if (playerData->currentPartner == temp_a1) { if (playerData->currentPartner == partnerID) {
menu->enabled[ret] = FALSE; menu->enabled[optionCount] = FALSE;
menu->ptrIcon[ret] = wDisabledPartnerHudScripts[temp_a1]; menu->ptrIcon[optionCount] = wDisabledPartnerHudScripts[partnerID];
} }
ret++; optionCount++;
} }
} }
return ret; return optionCount;
} }
s32 setup_item_popup(PopupMenu* menu) { s32 setup_item_popup(PopupMenu* menu) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 ret = 0; s32 optionCount = 0;
s32 i; s32 i;
for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) { for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
@ -149,23 +146,23 @@ s32 setup_item_popup(PopupMenu* menu) {
if (itemIdx != 0) { if (itemIdx != 0) {
ItemData* item = &gItemTable[itemIdx]; ItemData* item = &gItemTable[itemIdx];
HudScriptPair* itemScripts = &gItemHudScripts[item->iconID]; IconHudScriptPair* itemScripts = &gItemHudScripts[item->hudElemID];
if (item->typeFlags & 1) { if (item->typeFlags & 1) {
menu->ptrIcon[ret] = itemScripts->enabled; menu->ptrIcon[optionCount] = itemScripts->enabled;
menu->userIndex[ret] = i; menu->userIndex[optionCount] = i;
menu->enabled[ret] = 1; menu->enabled[optionCount] = 1;
} else { } else {
menu->ptrIcon[ret] = itemScripts->disabled; menu->ptrIcon[optionCount] = itemScripts->disabled;
menu->userIndex[ret] = i; menu->userIndex[optionCount] = i;
menu->enabled[ret] = FALSE; menu->enabled[optionCount] = FALSE;
} }
menu->nameMsg[ret] = item->nameMsg; menu->nameMsg[optionCount] = item->nameMsg;
menu->descMsg[ret] = item->itemMsg; menu->descMsg[optionCount] = item->shortDescMsg;
ret++; optionCount++;
} }
} }
return ret; return optionCount;
} }
INCLUDE_ASM(s32, "7fd10_len_b40", check_input_open_menus); INCLUDE_ASM(s32, "7fd10_len_b40", check_input_open_menus);
@ -182,18 +179,18 @@ void check_input_status_menu(void) {
} }
if (!is_status_menu_visible()) { if (!is_status_menu_visible()) {
if (!(playerStatus->currentButtons & Z_TRIG + R_TRIG) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) { if (!(playerStatus->currentButtons & (Z_TRIG | R_TRIG)) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) {
open_status_menu_long(); open_status_menu_long();
if (!is_picking_up_item()) { if (!is_picking_up_item()) {
sfx_play_sound(3); sfx_play_sound(SOUND_3);
} }
} }
} else if (!(playerStatus->currentButtons & Z_TRIG + R_TRIG) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) { } else if (!(playerStatus->currentButtons & (Z_TRIG | R_TRIG)) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) {
close_status_menu(); close_status_menu();
if (!is_picking_up_item()) { if (!is_picking_up_item()) {
sfx_play_sound(4); sfx_play_sound(SOUND_4);
} }
} }
} }

View File

@ -4,15 +4,15 @@
extern s32 TimesHudScript; extern s32 TimesHudScript;
extern s32 DigitHudScripts[10]; extern s32 DigitHudScripts[10];
extern HudScript HudScript_StatusHP[]; extern HudScript HudScript_StatusHP;
extern HudScript HudScript_StatusHeart[]; extern HudScript HudScript_StatusHeart;
extern HudScript HudScript_StatusFP[]; extern HudScript HudScript_StatusFP;
extern HudScript HudScript_StatusFlower[]; extern HudScript HudScript_StatusFlower;
extern HudScript HudScript_Item_CoinSparkleRandom[]; extern HudScript HudScript_Item_CoinSparkleRandom;
extern HudScript HudScript_StatusStarPoint[]; extern HudScript HudScript_StatusStarPoint;
extern HudScript HudScript_StatusStar1[]; extern HudScript HudScript_StatusStar1;
extern HudScript HudScript_StatusTimes[]; extern HudScript HudScript_StatusTimes;
extern HudScript HudScript_StatusSPShine[]; extern HudScript HudScript_StatusSPShine;
void clear_player_data(void) { void clear_player_data(void) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
@ -330,68 +330,68 @@ void initialize_status_menu(void) {
close_status_menu(); close_status_menu();
iconIndex = hud_element_create(HudScript_StatusHP); iconIndex = hud_element_create(&HudScript_StatusHP);
uiStatus->hpIconIndices[0] = iconIndex; uiStatus->hpIconIndices[0] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusHeart); iconIndex = hud_element_create(&HudScript_StatusHeart);
uiStatus->hpIconIndices[1] = iconIndex; uiStatus->hpIconIndices[1] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusFP); iconIndex = hud_element_create(&HudScript_StatusFP);
uiStatus->fpIconIndices[0] = iconIndex; uiStatus->fpIconIndices[0] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusFlower); iconIndex = hud_element_create(&HudScript_StatusFlower);
uiStatus->fpIconIndices[1] = iconIndex; uiStatus->fpIconIndices[1] = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusCoin); iconIndex = hud_element_create(&HudScript_StatusCoin);
uiStatus->coinIconIndex = iconIndex; uiStatus->coinIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_Item_CoinSparkleRandom); iconIndex = hud_element_create(&HudScript_Item_CoinSparkleRandom);
uiStatus->coinSparkleIconIndex = iconIndex; uiStatus->coinSparkleIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusStarPoint); iconIndex = hud_element_create(&HudScript_StatusStarPoint);
uiStatus->starpointsIconIndex = iconIndex; uiStatus->starpointsIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusSPShine); iconIndex = hud_element_create(&HudScript_StatusSPShine);
uiStatus->starpointsShineIconIndex = iconIndex; uiStatus->starpointsShineIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
newVar = hud_element_create(HudScript_StatusTimes); newVar = hud_element_create(&HudScript_StatusTimes);
iconIndex = newVar; iconIndex = newVar;
uiStatus->iconIndex8 = iconIndex; uiStatus->iconIndex8 = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusTimes); iconIndex = hud_element_create(&HudScript_StatusTimes);
uiStatus->iconIndex9 = iconIndex; uiStatus->iconIndex9 = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusTimes); iconIndex = hud_element_create(&HudScript_StatusTimes);
uiStatus->iconIndexA = iconIndex; uiStatus->iconIndexA = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusTimes); iconIndex = hud_element_create(&HudScript_StatusTimes);
uiStatus->iconIndexB = iconIndex; uiStatus->iconIndexB = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
iconIndex = hud_element_create(HudScript_StatusStar1); iconIndex = hud_element_create(&HudScript_StatusStar1);
uiStatus->starIconIndex = iconIndex; uiStatus->starIconIndex = iconIndex;
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX); hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
@ -528,11 +528,11 @@ void show_coin_counter(void) {
if (uiStatus->unk_6C[0] == 0) { if (uiStatus->unk_6C[0] == 0) {
set_window_properties(0x14, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1); set_window_properties(0x14, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1);
set_window_update(WINDOW_ID_20, (s32)basic_window_update); set_window_update(WINDOW_ID_20, (s32)basic_window_update);
index = hud_element_create(HudScript_MenuTimes); index = hud_element_create(&HudScript_MenuTimes);
uiStatus->iconIndex10 = index; uiStatus->iconIndex10 = index;
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(index, 255, 255, 255); hud_element_set_tint(index, 255, 255, 255);
index = hud_element_create(HudScript_StatusCoin); index = hud_element_create(&HudScript_StatusCoin);
uiStatus->iconIndex11 = index; uiStatus->iconIndex11 = index;
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(index, 255, 255, 255); hud_element_set_tint(index, 255, 255, 255);

View File

@ -1,11 +1,11 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
extern HudScript HudScript_HandPointer[0]; extern HudScript HudScript_HandPointer;
extern HudScript HudScript_StatusStarPiece[0]; extern HudScript HudScript_StatusStarPiece;
extern HudScript HudScript_GreenArrowDown[0]; extern HudScript HudScript_GreenArrowDown;
extern HudScript HudScript_GreenArrowUp[0]; extern HudScript HudScript_GreenArrowUp;
extern HudScript HudScript_EmptyBar[0]; extern HudScript HudScript_EmptyBar;
extern HudScript HudScript_PartnerRank1A; extern HudScript HudScript_PartnerRank1A;
extern HudScript HudScript_PartnerRank1B; extern HudScript HudScript_PartnerRank1B;
extern HudScript HudScript_PartnerRank2A; extern HudScript HudScript_PartnerRank2A;
@ -161,7 +161,7 @@ s32 popup_menu_update(void) {
D_8010D67E = 62; D_8010D67E = 62;
} }
D_8010D68C = 0; D_8010D68C = 0;
elementID = hud_element_create(HudScript_EmptyBar); elementID = hud_element_create(&HudScript_EmptyBar);
D_8010D65C = elementID; D_8010D65C = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(elementID, 255, 255, 255); hud_element_set_tint(elementID, 255, 255, 255);
@ -175,38 +175,38 @@ s32 popup_menu_update(void) {
hud_element_set_scale(elementID, 0.45f); hud_element_set_scale(elementID, 0.45f);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
elementID = hud_element_create(HudScript_AnimatedHandPointer); elementID = hud_element_create(&HudScript_AnimatedHandPointer);
D_8010D66C = elementID; D_8010D66C = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
elementID = hud_element_create(HudScript_GreenArrowUp); elementID = hud_element_create(&HudScript_GreenArrowUp);
D_8010D670 = elementID; D_8010D670 = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
elementID = hud_element_create(HudScript_GreenArrowDown); elementID = hud_element_create(&HudScript_GreenArrowDown);
D_8010D674 = elementID; D_8010D674 = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
if (gPopupMenu->popupType == 3) { if (gPopupMenu->popupType == 3) {
D_8010D660 = hud_element_create(HudScript_StatusStarPiece); D_8010D660 = hud_element_create(&HudScript_StatusStarPiece);
elementID = D_8010D660; elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(elementID, 255, 255, 255); hud_element_set_tint(elementID, 255, 255, 255);
} }
if (gPopupMenu->popupType == 4) { if (gPopupMenu->popupType == 4) {
D_8010D660 = hud_element_create(HudScript_StatusStarPiece); D_8010D660 = hud_element_create(&HudScript_StatusStarPiece);
elementID = D_8010D660; elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(elementID, 255, 255, 255); hud_element_set_tint(elementID, 255, 255, 255);
} }
if (gPopupMenu->popupType == 5) { if (gPopupMenu->popupType == 5) {
D_8010D660 = hud_element_create(HudScript_StatusCoin); D_8010D660 = hud_element_create(&HudScript_StatusCoin);
elementID = D_8010D660; elementID = D_8010D660;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(elementID, 255, 255, 255); hud_element_set_tint(elementID, 255, 255, 255);
} }
if (gPopupMenu->popupType == 3 || gPopupMenu->popupType == 4) { if (gPopupMenu->popupType == 3 || gPopupMenu->popupType == 4) {
D_8010D664 = hud_element_create(HudScript_MenuTimes); D_8010D664 = hud_element_create(&HudScript_MenuTimes);
elementID = D_8010D664; elementID = D_8010D664;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(elementID, 255, 255, 255); hud_element_set_tint(elementID, 255, 255, 255);
@ -603,7 +603,7 @@ s32 popup_menu_update(void) {
hud_element_set_tint(D_8010D66C, 160, 160, 160); hud_element_set_tint(D_8010D66C, 160, 160, 160);
hud_element_set_tint(D_8010D670, 160, 160, 160); hud_element_set_tint(D_8010D670, 160, 160, 160);
hud_element_set_tint(D_8010D674, 160, 160, 160); hud_element_set_tint(D_8010D674, 160, 160, 160);
hud_element_set_script(D_8010D66C, HudScript_HandPointer); hud_element_set_script(D_8010D66C, &HudScript_HandPointer);
if (gPopupMenu->popupType == 3) { if (gPopupMenu->popupType == 3) {
hud_element_set_tint(D_8010D660, 160, 160, 160); hud_element_set_tint(D_8010D660, 160, 160, 160);
hud_element_set_tint(D_8010D664, 160, 160, 160); hud_element_set_tint(D_8010D664, 160, 160, 160);
@ -722,7 +722,7 @@ s32 popup_menu_update(void) {
hud_element_set_tint(D_8010D66C, 160, 160, 160); hud_element_set_tint(D_8010D66C, 160, 160, 160);
hud_element_set_tint(D_8010D670, 160, 160, 160); hud_element_set_tint(D_8010D670, 160, 160, 160);
hud_element_set_tint(D_8010D674, 160, 160, 160); hud_element_set_tint(D_8010D674, 160, 160, 160);
hud_element_set_script(D_8010D66C, HudScript_HandPointer); hud_element_set_script(D_8010D66C, &HudScript_HandPointer);
if (gPopupMenu->popupType == 3) { if (gPopupMenu->popupType == 3) {
hud_element_set_tint(D_8010D660, 160, 160, 160); hud_element_set_tint(D_8010D660, 160, 160, 160);
@ -813,7 +813,7 @@ s32 popup_menu_update(void) {
if (gPopupMenu->popupType == 5) { if (gPopupMenu->popupType == 5) {
hud_element_set_tint(D_8010D660, 160, 160, 160); hud_element_set_tint(D_8010D660, 160, 160, 160);
} }
hud_element_set_script(D_8010D66C, HudScript_HandPointer); hud_element_set_script(D_8010D66C, &HudScript_HandPointer);
switch (gPopupMenu->popupType) { switch (gPopupMenu->popupType) {
case 0: case 0:

View File

@ -569,7 +569,7 @@ void func_80136A08(ItemEntity* itemEntity, s32 posX, s32 posY) {
case 3: case 3:
case 10: case 10:
case 11: case 11:
itemMsg = itemData->itemMsg; itemMsg = itemData->shortDescMsg;
draw_msg(itemMsg, posX + 8, posY, 255, 0xA, 0); draw_msg(itemMsg, posX + 8, posY, 255, 0xA, 0);
break; break;
} }

View File

@ -3519,13 +3519,13 @@ void get_model_env_color_parameters(u8* primR, u8* primG, u8* primB, u8* envR, u
void mdl_get_vertex_count(Gfx* gfx, s32* numVertices, s32* baseVtx, s32* gfxCount, Vtx* baseAddr) { void mdl_get_vertex_count(Gfx* gfx, s32* numVertices, s32* baseVtx, s32* gfxCount, Vtx* baseAddr) {
s8 stuff[2]; s8 stuff[2];
s32 temp_t0_2; s32 vtxCount;
u32 w0, w1; u32 w0, w1;
u32 cmd; u32 cmd;
u32 temp_v1; u32 vtxEndAddr;
s32 minVtx; s32 minVtx;
s32 maxVtx; s32 maxVtx;
u32 phi_v1; u32 vtxStartAddr;
minVtx = 0; minVtx = 0;
maxVtx = 0; maxVtx = 0;
@ -3539,25 +3539,24 @@ void mdl_get_vertex_count(Gfx* gfx, s32* numVertices, s32* baseVtx, s32* gfxCoun
do { do {
w0 = gfx->words.w0; w0 = gfx->words.w0;
w1 = gfx->words.w1; w1 = gfx->words.w1;
cmd = w0 >> 0x18; cmd = _SHIFTR(w0,24,8);
if (cmd == G_DL_NOPUSH) { if (cmd == G_VTX) {
phi_v1 = w1; vtxStartAddr = w1;
if (baseAddr != NULL) { if (baseAddr != NULL) {
phi_v1 = (phi_v1 & 0xFFFF) + (s32)baseAddr; vtxStartAddr = (vtxStartAddr & 0xFFFF) + (s32)baseAddr;
} }
vtxCount = _SHIFTR(w0,12,8);
temp_t0_2 = (w0 >> 0xC) & 0xFF;
if (minVtx == 0) { if (minVtx == 0) {
minVtx = phi_v1; minVtx = vtxStartAddr;
maxVtx = phi_v1 + (temp_t0_2 * 0x10); maxVtx = vtxStartAddr + (vtxCount * sizeof(Vtx));
} }
temp_v1 = phi_v1 + (temp_t0_2 * 0x10); vtxEndAddr = vtxStartAddr + (vtxCount * sizeof(Vtx));
if (maxVtx < temp_v1) { if (maxVtx < vtxEndAddr) {
maxVtx = temp_v1; maxVtx = vtxEndAddr;
} }
if (minVtx > temp_v1) { if (minVtx > vtxEndAddr) {
minVtx = temp_v1; minVtx = vtxEndAddr;
} }
} }
gfx++; gfx++;

View File

@ -5,10 +5,10 @@
extern s32 D_80294280; extern s32 D_80294280;
extern s32 D_802A9620; extern s32 D_802A9620;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern HudScript HudScript_RunAwayOK[]; extern HudScript HudScript_RunAwayOK;
s32 func_8024FAFC(s32); s32 func_8024FAFC(s32);
@ -32,7 +32,7 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
D_802A9620 = 0; D_802A9620 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
@ -40,7 +40,7 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
// Weird use of an extra temp settles regalloc here. // Weird use of an extra temp settles regalloc here.
hudElementTemp = hud_element_create(HudScript_BlueMeter); hudElementTemp = hud_element_create(&HudScript_BlueMeter);
hudElement = hudElementTemp; hudElement = hudElementTemp;
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
@ -48,7 +48,7 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunAwayOK); hudElement = hud_element_create(&HudScript_RunAwayOK);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28); actionCommandStatus->hudElementY + 28);
@ -132,7 +132,7 @@ void func_802A9228_425D78(void) {
return; return;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
battleStatus->actionSuccess = 0; battleStatus->actionSuccess = 0;
D_802A9620 = 1; D_802A9620 = 1;
actionCommandStatus->unk_5D = 0; actionCommandStatus->unk_5D = 0;

View File

@ -4,10 +4,10 @@
#define NAMESPACE action_command_0A #define NAMESPACE action_command_0A
extern s32 D_802942E0; extern s32 D_802942E0;
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -36,19 +36,19 @@ ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -102,7 +102,7 @@ void func_802A928C_42763C(void) {
return; return;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
actionCommandStatus->barFillLevel = 0; actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 0xB; actionCommandStatus->state = 0xB;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;

View File

@ -7,10 +7,10 @@
void func_80268834(s32, s32, s16, s32); void func_80268834(s32, s32, s16, s32);
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_80294340; extern s32 D_80294340;
s32 D_802A9852_4292C0[] = { 0, 25, 50, 75, 75, 0, 0, 0 }; s32 D_802A9852_4292C0[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
@ -43,19 +43,19 @@ ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) {
air_lift_bss_0 = 0; air_lift_bss_0 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -141,7 +141,7 @@ void func_802A9278_428CE8(void) {
return; return;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
air_lift_bss_0 = 1; air_lift_bss_0 = 1;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
sfx_play_sound_with_params(0x80000041, 0, 0, 0); sfx_play_sound_with_params(0x80000041, 0, 0, 0);

View File

@ -4,10 +4,10 @@
#define NAMESPACE action_command_air_raid #define NAMESPACE action_command_air_raid
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_StickNeutral[]; extern HudScript HudScript_StickNeutral;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern HudScript HudScript_StickMashLeft[]; extern HudScript HudScript_StickMashLeft;
extern s32 D_80294360; extern s32 D_80294360;
@ -44,19 +44,19 @@ ApiStatus func_802A9000_429320(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_StickNeutral); hudElement = hud_element_create(&HudScript_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -116,7 +116,7 @@ void func_802A9294_4295B4(void) {
return; return;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_StickMashLeft); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft);
actionCommandStatus->barFillLevel = 0; actionCommandStatus->barFillLevel = 0;
battleStatus->unk_85 = 0; battleStatus->unk_85 = 0;
actionCommandStatus->unk_5C = 0; actionCommandStatus->unk_5C = 0;

View File

@ -3,10 +3,10 @@
#define NAMESPACE action_command_body_slam #define NAMESPACE action_command_body_slam
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_TimingWait[]; extern HudScript HudScript_TimingWait;
extern HudScript HudScript_FillGaugeResult[]; extern HudScript HudScript_FillGaugeResult;
extern s32 D_80294320; extern s32 D_80294320;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
@ -34,25 +34,25 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_FillGaugeResult); hudElement = hud_element_create(&HudScript_FillGaugeResult);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_TimingWait); hudElement = hud_element_create(&HudScript_TimingWait);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -3,9 +3,9 @@
#define NAMESPACE action_command_bomb #define NAMESPACE action_command_bomb
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_80294300; extern s32 D_80294300;
extern HudScript HudScript_MashAButton; extern HudScript HudScript_MashAButton;
@ -53,19 +53,19 @@ ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -4,10 +4,10 @@
#define NAMESPACE action_command_break_free #define NAMESPACE action_command_break_free
extern s32 D_80294220; extern s32 D_80294220;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_RunningAway[]; extern HudScript HudScript_RunningAway;
extern HudScript HudScript_RunAwayOK[]; extern HudScript HudScript_RunAwayOK;
ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -35,25 +35,25 @@ ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunningAway); hudElement = hud_element_create(&HudScript_RunningAway);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunAwayOK); hudElement = hud_element_create(&HudScript_RunAwayOK);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -4,9 +4,9 @@
#define NAMESPACE action_command_dizzy_shell #define NAMESPACE action_command_dizzy_shell
extern s32 D_802942A0; extern s32 D_802942A0;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
ApiStatus func_802A9000_426170(void) { ApiStatus func_802A9000_426170(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -34,19 +34,19 @@ ApiStatus func_802A9000_426170(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -4,9 +4,9 @@
#define NAMESPACE action_command_fire_shell #define NAMESPACE action_command_fire_shell
extern s32 D_802942C0; extern s32 D_802942C0;
extern HudScript HudScript_StickNeutral[]; extern HudScript HudScript_StickNeutral;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
ApiStatus func_802A9000_4269D0(void) { ApiStatus func_802A9000_4269D0(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -35,19 +35,19 @@ ApiStatus func_802A9000_4269D0(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_StickNeutral); hudElement = hud_element_create(&HudScript_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -3,14 +3,14 @@
#define NAMESPACE action_command_flee #define NAMESPACE action_command_flee
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_RunAwayOK[]; extern HudScript HudScript_RunAwayOK;
extern HudScript HudScript_RunningAway[]; extern HudScript HudScript_RunningAway;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_80294200; extern s32 D_80294200;
extern s32 D_802A9920; extern s32 D_802A9920;
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -38,25 +38,25 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
D_802A9920 = 0; D_802A9920 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunningAway); hudElement = hud_element_create(&HudScript_RunningAway);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunAwayOK); hudElement = hud_element_create(&HudScript_RunAwayOK);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -66,7 +66,7 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17); hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1); hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -142,7 +142,7 @@ void func_802A9378_422E48(void) {
break; break;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
D_802A9920 = 1; D_802A9920 = 1;
actionCommandStatus->state = 11; actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;

View File

@ -4,13 +4,13 @@
#define NAMESPACE action_command_hammer #define NAMESPACE action_command_hammer
// icon indexes for hud elements // icon indexes for hud elements
extern HudScript HudScript_TimingBar1Chance[]; extern HudScript HudScript_TimingBar1Chance;
extern HudScript HudScript_TimingWait[]; extern HudScript HudScript_TimingWait;
extern HudScript HudScript_TimingCharge4a[]; extern HudScript HudScript_TimingCharge4a;
extern HudScript HudScript_TimingCharge4b[]; extern HudScript HudScript_TimingCharge4b;
extern HudScript HudScript_TimingCharge4c[]; extern HudScript HudScript_TimingCharge4c;
extern HudScript HudScript_StickHoldLeft[]; extern HudScript HudScript_StickHoldLeft;
extern HudScript HudScript_RightOn[]; extern HudScript HudScript_RightOn;
extern s32 D_802941E0; extern s32 D_802941E0;
@ -36,43 +36,43 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_60 = 0; actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 96; actionCommandStatus->hudElementY = 96;
hudElement = hud_element_create(HudScript_TimingBar1Chance); hudElement = hud_element_create(&HudScript_TimingBar1Chance);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 10); hud_element_set_render_depth(hudElement, 10);
hudElement = hud_element_create(HudScript_TimingWait); hudElement = hud_element_create(&HudScript_TimingWait);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_TimingCharge4a); hudElement = hud_element_create(&HudScript_TimingCharge4a);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_TimingCharge4b); hudElement = hud_element_create(&HudScript_TimingCharge4b);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_TimingCharge4c); hudElement = hud_element_create(&HudScript_TimingCharge4c);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_StickHoldLeft); hudElement = hud_element_create(&HudScript_StickHoldLeft);
actionCommandStatus->hudElements[5] = hudElement; actionCommandStatus->hudElements[5] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_RightOn); hudElement = hud_element_create(&HudScript_RightOn);
actionCommandStatus->hudElements[6] = hudElement; actionCommandStatus->hudElements[6] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);

View File

@ -4,10 +4,10 @@
#define NAMESPACE action_command_hurricane #define NAMESPACE action_command_hurricane
extern s32 D_80294420; extern s32 D_80294420;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_BButton[]; extern HudScript HudScript_BButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
ApiStatus func_802A9000_42F6E0(void) { ApiStatus func_802A9000_42F6E0(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -33,25 +33,25 @@ ApiStatus func_802A9000_42F6E0(void) {
actionCommandStatus->unk_68 = 0; actionCommandStatus->unk_68 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BButton); hudElement = hud_element_create(&HudScript_BButton);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -6,9 +6,9 @@
extern s32 D_802941C0; extern s32 D_802941C0;
// icon IDs for hud elements // icon IDs for hud elements
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_RightOn[]; extern HudScript HudScript_RightOn;
extern HudScript HudScript_AButtonDown[]; extern HudScript HudScript_AButtonDown;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) { ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
s32 hudElement; s32 hudElement;
@ -30,14 +30,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_60 = 0; actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_alpha(hudElement, 0xFF); hud_element_set_alpha(hudElement, 0xFF);
hudElement = hud_element_create(HudScript_RightOn); hudElement = hud_element_create(&HudScript_RightOn);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
@ -126,7 +126,7 @@ void N(update)(void) {
temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50]; temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50];
if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) { if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) {
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_AButtonDown); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
} }
if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) { if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) {
actionCommandStatus->unk_60 = 1; actionCommandStatus->unk_60 = 1;

View File

@ -3,10 +3,10 @@
#define NAMESPACE action_command_mega_shock #define NAMESPACE action_command_mega_shock
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_BButton[]; extern HudScript HudScript_BButton;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_802943C0; extern s32 D_802943C0;
extern HudScript HudScript_MashAButton; extern HudScript HudScript_MashAButton;
@ -49,25 +49,25 @@ ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -0x30; actionCommandStatus->hudElementX = -0x30;
actionCommandStatus->hudElementY = 0x50; actionCommandStatus->hudElementY = 0x50;
elementID = hud_element_create(HudScript_AButton); elementID = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = elementID; actionCommandStatus->hudElements[0] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(elementID, 0); hud_element_set_render_depth(elementID, 0);
elementID = hud_element_create(HudScript_BButton); elementID = hud_element_create(&HudScript_BButton);
actionCommandStatus->hudElements[2] = elementID; actionCommandStatus->hudElements[2] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(elementID, 0); hud_element_set_render_depth(elementID, 0);
elementID = hud_element_create(HudScript_BlueMeter); elementID = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = elementID; actionCommandStatus->hudElements[1] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C); hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
hud_element_set_render_depth(elementID, 0); hud_element_set_render_depth(elementID, 0);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
elementID = hud_element_create(HudScript_100pct); elementID = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[4] = elementID; actionCommandStatus->hudElements[4] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C); hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
hud_element_set_render_depth(elementID, 0); hud_element_set_render_depth(elementID, 0);

View File

@ -3,11 +3,11 @@
#define NAMESPACE action_command_power_shock #define NAMESPACE action_command_power_shock
extern const HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern const HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern const HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern const HudScript HudScript_RunAwayOK[]; extern HudScript HudScript_RunAwayOK;
extern const HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_802943A0[]; extern s32 D_802943A0[];
extern s16 D_802A9AA2_42D9B2[]; extern s16 D_802A9AA2_42D9B2[];
extern s32 D_802A9B00; extern s32 D_802A9B00;
@ -42,25 +42,25 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
D_802A9B00 = 0; D_802A9B00 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[3] = hudElement; actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_RunAwayOK); hudElement = hud_element_create(&HudScript_RunAwayOK);
actionCommandStatus->hudElements[4] = hudElement; actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -162,7 +162,7 @@ void func_802A9310_42D220(void) {
actionCommandStatus->unk_4E--; actionCommandStatus->unk_4E--;
break; break;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
actionCommandStatus->unk_44 = 0; actionCommandStatus->unk_44 = 0;
actionCommandStatus->unk_5C = 0; actionCommandStatus->unk_5C = 0;
D_802A9B00 = 1; D_802A9B00 = 1;

View File

@ -4,10 +4,10 @@
#define NAMESPACE action_command_smack #define NAMESPACE action_command_smack
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_StickNeutral[]; extern HudScript HudScript_StickNeutral;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern HudScript HudScript_StickMashLeft[]; extern HudScript HudScript_StickMashLeft;
extern s32 D_802943E0; extern s32 D_802943E0;
typedef struct UnkVec2s { typedef struct UnkVec2s {
@ -65,19 +65,19 @@ ApiStatus func_802A9000_42E3A0(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_StickNeutral); hudElement = hud_element_create(&HudScript_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -134,7 +134,7 @@ void func_802A9298_42E638(void) {
actionCommandStatus->unk_4E--; actionCommandStatus->unk_4E--;
break; break;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_StickMashLeft); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft);
actionCommandStatus->barFillLevel = 0; actionCommandStatus->barFillLevel = 0;
battleStatus->unk_85 = 0; battleStatus->unk_85 = 0;
actionCommandStatus->unk_5C = 0; actionCommandStatus->unk_5C = 0;

View File

@ -4,9 +4,9 @@
#define NAMESPACE action_command_spiny_surge #define NAMESPACE action_command_spiny_surge
extern s32 D_80294400; extern s32 D_80294400;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_StickNeutral[]; extern HudScript HudScript_StickNeutral;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
ApiStatus func_802A9000_42EE20(void) { ApiStatus func_802A9000_42EE20(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -35,19 +35,19 @@ ApiStatus func_802A9000_42EE20(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_StickNeutral); hudElement = hud_element_create(&HudScript_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -3,9 +3,9 @@
#define NAMESPACE action_command_spook #define NAMESPACE action_command_spook
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_StickNeutral[]; extern HudScript HudScript_StickNeutral;
extern HudScript HudScript_100pct[]; extern HudScript HudScript_100pct;
extern s32 D_80294440; extern s32 D_80294440;
ApiStatus func_802A9000_430020(void) { ApiStatus func_802A9000_430020(void) {
@ -34,19 +34,19 @@ ApiStatus func_802A9000_430020(void) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_StickNeutral); hudElement = hud_element_create(&HudScript_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(HudScript_100pct); hudElement = hud_element_create(&HudScript_100pct);
actionCommandStatus->hudElements[2] = hudElement; actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -3,8 +3,8 @@
#define NAMESPACE action_command_squirt #define NAMESPACE action_command_squirt
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern s32 D_80294380; extern s32 D_80294380;
ApiStatus func_802A9000_429D20(void) { ApiStatus func_802A9000_429D20(void) {
@ -30,13 +30,13 @@ ApiStatus func_802A9000_429D20(void) {
actionCommandStatus->unk_5C = 0; actionCommandStatus->unk_5C = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -3,9 +3,9 @@
#define NAMESPACE action_command_stop_leech #define NAMESPACE action_command_stop_leech
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern s32 D_80294260; extern s32 D_80294260;
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) { ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) {
@ -29,13 +29,13 @@ ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) {
actionCommandStatus->unk_48 = 0; actionCommandStatus->unk_48 = 0;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
@ -106,7 +106,7 @@ void func_802A91F8_425788(void) {
actionCommandStatus->unk_4E -= 1; actionCommandStatus->unk_4E -= 1;
break; break;
} }
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton); hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
actionCommandStatus->barFillLevel = 0; actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 11; actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52; actionCommandStatus->unk_54 = actionCommandStatus->unk_52;

View File

@ -3,8 +3,8 @@
#define NAMESPACE action_command_tidal_wave #define NAMESPACE action_command_tidal_wave
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern s32 D_802944A0; extern s32 D_802944A0;
extern HudScript* D_802A97C0_42CEB0[]; extern HudScript* D_802A97C0_42CEB0[];
@ -33,14 +33,14 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) { for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) {
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[i] = hudElement; actionCommandStatus->hudElements[i] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -35,13 +35,13 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
actionCommandStatus->hudElementX = -48; actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80; actionCommandStatus->hudElementY = 80;
hudElement = hud_element_create(HudScript_AButton); hudElement = hud_element_create(&HudScript_AButton);
actionCommandStatus->hudElements[0] = hudElement; actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED); hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(HudScript_BlueMeter); hudElement = hud_element_create(&HudScript_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement; actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28); hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_depth(hudElement, 0); hud_element_set_render_depth(hudElement, 0);

View File

@ -4,17 +4,15 @@
#include "common/Set80218630_Var0.inc.c" #include "common/Set80218630_Var0.inc.c"
extern s32 D_8008F0A0;
ApiStatus func_80218644_6DE404(Evt* script, s32 isInitialCall) { ApiStatus func_80218644_6DE404(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
SelectableTarget* selectableTarget; SelectableTarget* selectableTarget;
battleStatus->moveCategory = 1; battleStatus->moveCategory = 1;
battleStatus->selectedMoveID = 3; battleStatus->selectedMoveID = MOVE_HAMMER1;
battleStatus->selectedItemID = gCurrentEncounter.hitTier; battleStatus->selectedItemID = gCurrentEncounter.hitTier;
battleStatus->currentTargetListFlags = D_8008F0A0; battleStatus->currentTargetListFlags = gMoveTable[MOVE_HAMMER1].flags;
player_create_target_list(player); player_create_target_list(player);
player->selectedTargetIndex = 0; player->selectedTargetIndex = 0;

View File

@ -2,18 +2,15 @@
#define NAMESPACE b_area_dig #define NAMESPACE b_area_dig
extern s32 D_8008F2E4;
extern s32 D_8008FC44;
ApiStatus func_802186E0_6DE4A0(Evt* script, s32 isInitialCall) { ApiStatus func_802186E0_6DE4A0(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
SelectableTarget* selectableTarget; SelectableTarget* selectableTarget;
battleStatus->moveCategory = 0; battleStatus->moveCategory = 0;
battleStatus->selectedMoveID = 0x20; battleStatus->selectedMoveID = MOVE_POWER_BOUNCE;
battleStatus->selectedItemID = gCurrentEncounter.hitTier; battleStatus->selectedItemID = gCurrentEncounter.hitTier;
battleStatus->currentTargetListFlags = D_8008F2E4; battleStatus->currentTargetListFlags = gMoveTable[MOVE_POWER_BOUNCE].flags;
player_create_target_list(player); player_create_target_list(player);
player->selectedTargetIndex = 1; player->selectedTargetIndex = 1;
@ -32,8 +29,8 @@ ApiStatus func_80218770_6DE530(Evt* script, s32 isInitialCall) {
battleStatus->moveCategory = 6; battleStatus->moveCategory = 6;
do {} while (0); do {} while (0);
battleStatus->selectedItemID = 0; battleStatus->selectedItemID = 0;
battleStatus->selectedMoveID = 0x98; battleStatus->selectedMoveID = MOVE_SHELL_SHOT;
battleStatus->currentTargetListFlags = D_8008FC44; battleStatus->currentTargetListFlags = gMoveTable[MOVE_SHELL_SHOT].flags;
player_create_target_list(partner); player_create_target_list(partner);
partner->selectedTargetIndex = 0; partner->selectedTargetIndex = 0;

View File

@ -545,7 +545,7 @@ ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 posX = evt_get_float_variable(script, *args++); f32 posX = evt_get_float_variable(script, *args++);
f32 posY = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++);
s32 icon = hud_element_create(HudScript_AnimatedHandPointer); s32 icon = hud_element_create(&HudScript_AnimatedHandPointer);
hud_element_set_render_pos(icon, posX, posY); hud_element_set_render_pos(icon, posX, posY);
hud_element_set_scale(icon, 1.5f); hud_element_set_scale(icon, 1.5f);

View File

@ -40,7 +40,7 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ);
itemIcon = hud_element_create(HudScript_Refund); itemIcon = hud_element_create(&HudScript_Refund);
hud_element_set_render_pos(itemIcon, iconX + 36, iconY - 63); hud_element_set_render_pos(itemIcon, iconX + 36, iconY - 63);
} }

View File

@ -11,22 +11,22 @@ extern s32 D_8023BDBC;
extern s32 D_8023BDC0; extern s32 D_8023BDC0;
extern s32 D_8023BDC4; extern s32 D_8023BDC4;
extern s32 D_8023BDC8; extern s32 D_8023BDC8;
extern HudScript HudScript_AimMarkerA[0]; extern HudScript HudScript_AimMarkerA;
extern HudScript HudScript_AimMarkerB[0]; extern HudScript HudScript_AimMarkerB;
extern HudScript HudScript_AimMarkerC[0]; extern HudScript HudScript_AimMarkerC;
extern HudScript HudScript_AimMarkerD[0]; extern HudScript HudScript_AimMarkerD;
extern HudScript HudScript_AimMarkerE[0]; extern HudScript HudScript_AimMarkerE;
extern HudScript HudScript_AimMarkerF[0]; extern HudScript HudScript_AimMarkerF;
extern HudScript HudScript_AimReticle[0]; extern HudScript HudScript_AimReticle;
extern HudScript HudScript_AimShimmerA[0]; extern HudScript HudScript_AimShimmerA;
extern HudScript HudScript_AimShimmerB[0]; extern HudScript HudScript_AimShimmerB;
extern HudScript HudScript_AimShimmerC[0]; extern HudScript HudScript_AimShimmerC;
extern HudScript HudScript_AimShimmerD[0]; extern HudScript HudScript_AimShimmerD;
extern HudScript HudScript_AimShimmerE[0]; extern HudScript HudScript_AimShimmerE;
extern HudScript HudScript_AimShimmerF[0]; extern HudScript HudScript_AimShimmerF;
extern HudScript HudScript_AimTarget[0]; extern HudScript HudScript_AimTarget;
extern HudScript HudScript_StickHoldLeft[0]; extern HudScript HudScript_StickHoldLeft;
extern HudScript HudScript_StickNeutral[0]; extern HudScript HudScript_StickNeutral;
extern f64 D_8023BD60_703AE0; extern f64 D_8023BD60_703AE0;
@ -49,66 +49,66 @@ ApiStatus func_80238000_6FFD80(Evt* evt, s32 isInitialCall) {
switch (evt->functionTemp[0]) { switch (evt->functionTemp[0]) {
case 0: case 0:
D_8023BD78[0] = hudID = hud_element_create(HudScript_AimMarkerF); D_8023BD78[0] = hudID = hud_element_create(&HudScript_AimMarkerF);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[1] = hudID = hud_element_create(HudScript_AimMarkerE); D_8023BD78[1] = hudID = hud_element_create(&HudScript_AimMarkerE);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[2] = hudID = hud_element_create(HudScript_AimMarkerD); D_8023BD78[2] = hudID = hud_element_create(&HudScript_AimMarkerD);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[3] = hudID = hud_element_create(HudScript_AimMarkerC); D_8023BD78[3] = hudID = hud_element_create(&HudScript_AimMarkerC);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[4] = hudID = hud_element_create(HudScript_AimMarkerB); D_8023BD78[4] = hudID = hud_element_create(&HudScript_AimMarkerB);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[5] = hudID = hud_element_create(HudScript_AimMarkerA); D_8023BD78[5] = hudID = hud_element_create(&HudScript_AimMarkerA);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD78[6] = hudID = hud_element_create(HudScript_AimReticle); D_8023BD78[6] = hudID = hud_element_create(&HudScript_AimReticle);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[0] = hudID = hud_element_create(HudScript_AimShimmerF); D_8023BD98[0] = hudID = hud_element_create(&HudScript_AimShimmerF);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[1] = hudID = hud_element_create(HudScript_AimShimmerE); D_8023BD98[1] = hudID = hud_element_create(&HudScript_AimShimmerE);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[2] = hudID = hud_element_create(HudScript_AimShimmerD); D_8023BD98[2] = hudID = hud_element_create(&HudScript_AimShimmerD);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[3] = hudID = hud_element_create(HudScript_AimShimmerC); D_8023BD98[3] = hudID = hud_element_create(&HudScript_AimShimmerC);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[4] = hudID = hud_element_create(HudScript_AimShimmerB); D_8023BD98[4] = hudID = hud_element_create(&HudScript_AimShimmerB);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BD98[5] = hudID = hud_element_create(HudScript_AimShimmerA); D_8023BD98[5] = hudID = hud_element_create(&HudScript_AimShimmerA);
hud_element_set_render_depth(hudID, 9); hud_element_set_render_depth(hudID, 9);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BDB4 = hudID = hud_element_create(HudScript_AimTarget); D_8023BDB4 = hudID = hud_element_create(&HudScript_AimTarget);
hud_element_set_render_depth(hudID, 10); hud_element_set_render_depth(hudID, 10);
hud_element_create_transform_A(D_8023BDB4); hud_element_create_transform_A(D_8023BDB4);
hud_element_set_render_pos(hudID, -100, -100); hud_element_set_render_pos(hudID, -100, -100);
D_8023BDC4 = -48; D_8023BDC4 = -48;
D_8023BDC8 = 80; D_8023BDC8 = 80;
D_8023BDC0 = hudID = hud_element_create(HudScript_StickHoldLeft); D_8023BDC0 = hudID = hud_element_create(&HudScript_StickHoldLeft);
hud_element_set_render_pos(hudID, D_8023BDC4, D_8023BDC8); hud_element_set_render_pos(hudID, D_8023BDC4, D_8023BDC8);
hud_element_set_render_depth(hudID, 0); hud_element_set_render_depth(hudID, 0);
@ -272,9 +272,9 @@ ApiStatus func_80238000_6FFD80(Evt* evt, s32 isInitialCall) {
tempAngle = fabsf(clampedAngleDiff) / state->unk_24 * targetActor->scalingFactor; tempAngle = fabsf(clampedAngleDiff) / state->unk_24 * targetActor->scalingFactor;
if (tempAngle < 7.0f) { if (tempAngle < 7.0f) {
hud_element_set_script(hudID, HudScript_StickNeutral); hud_element_set_script(hudID, &HudScript_StickNeutral);
} else { } else {
hud_element_set_script(hudID, HudScript_StickHoldLeft); hud_element_set_script(hudID, &HudScript_StickHoldLeft);
} }
D_8023BDC4 += 20; D_8023BDC4 += 20;

View File

@ -20,7 +20,7 @@ u8* gHudElementAuxCache = NULL;
s32 gHudElementCacheCapacity = 0x11000; s32 gHudElementCacheCapacity = 0x11000;
HudScript hud_element_defaultAnim = { HudScript hud_element_defaultAnim = {
he_End, he_End
}; };
HudElementSize gHudElementSizes[] = { HudElementSize gHudElementSizes[] = {
@ -126,7 +126,7 @@ extern u8* gHudElementCacheBuffer;
s32 fold_appendGfx_component(s32 idx, FoldImageRecPart* image, u32 flagBits, Matrix4f mtx); s32 fold_appendGfx_component(s32 idx, FoldImageRecPart* image, u32 flagBits, Matrix4f mtx);
void func_801413F8(void); void func_801413F8(void);
void hud_element_load_script(HudElement* hudElement, const HudScript* anim) { void hud_element_load_script(HudElement* hudElement, HudScript* anim) {
s32* pos = (s32*)anim; s32* pos = (s32*)anim;
s32 raster; s32 raster;
s32 palette; s32 palette;
@ -707,7 +707,7 @@ void func_801413F8(void) {
gCameras[CAM_3].flags &= ~0x6; gCameras[CAM_3].flags &= ~0x6;
} }
s32 hud_element_create(const HudScript* anim) { s32 hud_element_create(HudScript* anim) {
HudElement* hudElement; HudElement* hudElement;
s32 id; s32 id;
@ -1929,7 +1929,7 @@ void hud_element_draw_without_clipping(s32 id) {
draw_hud_element_internal(id, HUD_ELEMENT_DRAW_FIRST_WITHOUT_CLIPPING); draw_hud_element_internal(id, HUD_ELEMENT_DRAW_FIRST_WITHOUT_CLIPPING);
} }
void hud_element_set_script(s32 id, const HudScript* anim) { void hud_element_set_script(s32 id, HudScript* anim) {
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]; HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
if (anim == NULL) { if (anim == NULL) {

View File

@ -5,7 +5,9 @@
#define HUD_ELEMENT_BATTLE_ID_MASK 0x800 #define HUD_ELEMENT_BATTLE_ID_MASK 0x800
typedef enum { typedef s32 HudScript[0];
enum {
HUD_ELEMENT_OP_End, HUD_ELEMENT_OP_End,
HUD_ELEMENT_OP_SetRGBA, HUD_ELEMENT_OP_SetRGBA,
HUD_ELEMENT_OP_SetCI, HUD_ELEMENT_OP_SetCI,
@ -34,7 +36,7 @@ typedef enum {
HUD_ELEMENT_OP_ClearFlags, HUD_ELEMENT_OP_ClearFlags,
HUD_ELEMENT_OP_PlaySound, HUD_ELEMENT_OP_PlaySound,
HUD_ELEMENT_OP_SetPivot, HUD_ELEMENT_OP_SetPivot,
} HudScript[0]; };
enum { enum {
HUD_ELEMENT_SIZE_8x8, HUD_ELEMENT_SIZE_8x8,
@ -144,10 +146,10 @@ typedef struct Shop {
/* 0x358 */ s32 unk_358; /* 0x358 */ s32 unk_358;
} Shop; // size = 0x35C } Shop; // size = 0x35C
typedef struct HudScriptPair { typedef struct IconHudScriptPair {
/* 0x00 */ HudScript* enabled; /* 0x00 */ HudScript* enabled;
/* 0x04 */ HudScript* disabled; /* 0x04 */ HudScript* disabled;
} HudScriptPair; // size = 0x08 } IconHudScriptPair; // size = 0x08
typedef struct VtxRect { typedef struct VtxRect {
Vtx vtx[4]; Vtx vtx[4];
@ -164,8 +166,8 @@ typedef struct HudTransform {
typedef struct HudElement { typedef struct HudElement {
/* 0x00 */ u32 flags; /* 0x00 */ u32 flags;
/* 0x04 */ const HudScript* readPos; /* 0x04 */ HudScript* readPos;
/* 0x08 */ const HudScript* anim; /* 0x08 */ HudScript* anim;
/* 0x0C */ HudScript* loopStartPos; /* 0x0C */ HudScript* loopStartPos;
/* 0x10 */ u8* imageAddr; /* 0x10 */ u8* imageAddr;
/* 0x14 */ u8* paletteAddr; /* 0x14 */ u8* paletteAddr;
@ -194,12 +196,12 @@ typedef struct HudElement {
typedef HudElement* HudElementList[320]; typedef HudElement* HudElementList[320];
extern HudScript HudScript_AnimatedHandPointer[]; extern HudScript HudScript_AnimatedHandPointer;
extern HudScript HudScript_StatusCoin[]; extern HudScript HudScript_StatusCoin;
extern HudScript HudScript_Refund[]; extern HudScript HudScript_Refund;
extern HudScript HudScript_MenuTimes[]; extern HudScript HudScript_MenuTimes;
extern s32 gPartnerPopupProperties[11][4]; extern s32 gPartnerPopupProperties[13][4];
extern HudScript* wDisabledPartnerHudScripts[]; extern HudScript* wDisabledPartnerHudScripts[];
extern HudScript* wPartnerHudScripts[]; extern HudScript* wPartnerHudScripts[];
@ -216,7 +218,7 @@ extern HudScript* wPartnerHudScripts[];
#define he_AddTexelOffsetX(x) HUD_ELEMENT_OP_AddTexelOffsetX, x #define he_AddTexelOffsetX(x) HUD_ELEMENT_OP_AddTexelOffsetX, x
#define he_AddTexelOffsetY(y) HUD_ELEMENT_OP_AddTexelOffsetY, y #define he_AddTexelOffsetY(y) HUD_ELEMENT_OP_AddTexelOffsetY, y
#define he_SetTexelOffset(x, y) HUD_ELEMENT_OP_SetTexelOffset, x, y #define he_SetTexelOffset(x, y) HUD_ELEMENT_OP_SetTexelOffset, x, y
#define he_SetImage(arg0, raster, palette, arg2, arg3) HUD_ELEMENT_OP_SetImage, arg0, raster, palette, arg2, arg3 #define he_SetImage(arg0, raster, palette) HUD_ELEMENT_OP_SetImage, arg0, raster, palette, 0, 0
#define he_SetScale(scale) HUD_ELEMENT_OP_SetScale, (s32)(scale * 65536.0f) #define he_SetScale(scale) HUD_ELEMENT_OP_SetScale, (s32)(scale * 65536.0f)
#define he_SetAlpha(alpha) HUD_ELEMENT_OP_SetAlpha, alpha #define he_SetAlpha(alpha) HUD_ELEMENT_OP_SetAlpha, alpha
#define he_RandomDelay(arg0, arg1) HUD_ELEMENT_OP_RandomDelay, arg0, arg1 #define he_RandomDelay(arg0, arg1) HUD_ELEMENT_OP_RandomDelay, arg0, arg1
@ -234,7 +236,7 @@ extern HudScript* wPartnerHudScripts[];
#define he_PlaySound(arg0) HUD_ELEMENT_OP_PlaySound, arg0 #define he_PlaySound(arg0) HUD_ELEMENT_OP_PlaySound, arg0
#define he_SetPivot(arg0, arg1) HUD_ELEMENT_OP_SetPivot, arg0, arg1 #define he_SetPivot(arg0, arg1) HUD_ELEMENT_OP_SetPivot, arg0, arg1
void hud_element_load_script(HudElement* hudElement, const HudScript* anim); void hud_element_load_script(HudElement* hudElement, HudScript* anim);
/// @param clamp 0 = repeat; 1 = clamp /// @param clamp 0 = repeat; 1 = clamp
/// @param dropShadow Whether to render a drop shadow or not /// @param dropShadow Whether to render a drop shadow or not
@ -245,7 +247,7 @@ void hud_element_clear_cache(void);
void init_hud_element_list(void); void init_hud_element_list(void);
/// Creates a new HUD element and returns its ID. /// Creates a new HUD element and returns its ID.
s32 hud_element_create(const HudScript* anim); s32 hud_element_create(HudScript* anim);
void update_hud_elements(void); void update_hud_elements(void);
@ -271,7 +273,7 @@ void hud_element_draw_clipped(s32 id);
void hud_element_draw_next(s32 id); void hud_element_draw_next(s32 id);
void hud_element_draw_without_clipping(s32 id); void hud_element_draw_without_clipping(s32 id);
void hud_element_set_script(s32 id, const HudScript* anim); void hud_element_set_script(s32 id, HudScript* anim);
HudScript* hud_element_get_script(s32 id); HudScript* hud_element_get_script(s32 id);

View File

@ -32,12 +32,12 @@ static s32 gPauseBadgesIconIDs[22];
#define BADGE_INVALID 0x7FFF #define BADGE_INVALID 0x7FFF
HudScript* gPauseBadgesElements[] = { HudScript* gPauseBadgesElements[] = {
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_ListPrevPage, HudScript_ListNextPage, &HudScript_StatBp, &HudScript_ListPrevPage, &HudScript_ListNextPage,
HudScript_Dash, HudScript_LabelBpNeeded, HudScript_StatusStar1 &HudScript_Dash, &HudScript_LabelBpNeeded, &HudScript_StatusStar1
}; };
MenuWindowBP gPauseBadgesWindowBPs[] = { MenuWindowBP gPauseBadgesWindowBPs[] = {
{ {
@ -78,13 +78,13 @@ s32 pause_badges_comparator(s16* a, s16* b) {
if (*a == 0) { if (*a == 0) {
aVal = BADGE_INVALID; aVal = BADGE_INVALID;
} else { } else {
aVal = gItemTable[*a].badgeSortPriority; aVal = gItemTable[*a].sortValue;
} }
if (*b == 0) { if (*b == 0) {
bVal = BADGE_INVALID; bVal = BADGE_INVALID;
} else { } else {
bVal = gItemTable[*b].badgeSortPriority; bVal = gItemTable[*b].sortValue;
} }
if (aVal == bVal) { if (aVal == bVal) {
@ -443,13 +443,13 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
} else { } else {
if (isSelected) { if (isSelected) {
hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAGS_DROP_SHADOW); hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAGS_DROP_SHADOW);
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].iconID].enabled; gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].hudElemID].enabled;
} }
if (!isEquipped && cannotBeEquipped) { if (!isEquipped && cannotBeEquipped) {
hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].disabled); hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].hudElemID].disabled);
} else { } else {
hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].enabled); hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].hudElemID].enabled);
} }
hud_element_set_scale(badgeIconElement, 0.670816f); hud_element_set_scale(badgeIconElement, 0.670816f);
@ -939,7 +939,7 @@ void pause_badges_handle_input(MenuPanel* panel) {
s32 itemID = gPauseBadgesSelectedItem; s32 itemID = gPauseBadgesSelectedItem;
if (((itemID != BADGE_NONE_STANDIN) && (itemID != BADGE_INVALID) && (itemID != 0))) { if (((itemID != BADGE_NONE_STANDIN) && (itemID != BADGE_INVALID) && (itemID != 0))) {
gPauseCurrentDescMsg = gItemTable[itemID].menuMsg; gPauseCurrentDescMsg = gItemTable[itemID].fullDescMsg;
} else { } else {
gPauseCurrentDescMsg = 0; gPauseCurrentDescMsg = 0;
gPauseCurrentDescIconScript = NULL; gPauseCurrentDescIconScript = NULL;

View File

@ -4,64 +4,64 @@
#include "common.h" #include "common.h"
#include "hud_element.h" #include "hud_element.h"
extern HudScript HudScript_PressAButton[]; extern HudScript HudScript_PressAButton;
extern HudScript HudScript_PressStartButton[]; extern HudScript HudScript_PressStartButton;
extern HudScript HudScript_StartButtonText[]; extern HudScript HudScript_StartButtonText;
extern HudScript HudScript_StickTapRight[]; extern HudScript HudScript_StickTapRight;
extern HudScript HudScript_UnusedBadge[]; extern HudScript HudScript_UnusedBadge;
extern HudScript HudScript_AnimatedCursorHand[]; extern HudScript HudScript_AnimatedCursorHand;
extern HudScript HudScript_DescMsgPrev[]; extern HudScript HudScript_DescMsgPrev;
extern HudScript HudScript_DescMsgNext[]; extern HudScript HudScript_DescMsgNext;
extern HudScript HudScript_HeaderStats[]; extern HudScript HudScript_HeaderStats;
extern HudScript HudScript_HeaderBadges[]; extern HudScript HudScript_HeaderBadges;
extern HudScript HudScript_HeaderItems[]; extern HudScript HudScript_HeaderItems;
extern HudScript HudScript_HeaderParty[]; extern HudScript HudScript_HeaderParty;
extern HudScript HudScript_HeaderSpirits[]; extern HudScript HudScript_HeaderSpirits;
extern HudScript HudScript_HeaderMap[]; extern HudScript HudScript_HeaderMap;
extern HudScript HudScript_MarioHeadSmall[]; extern HudScript HudScript_MarioHeadSmall;
extern HudScript HudScript_StatBoots0[]; extern HudScript HudScript_StatBoots0;
extern HudScript HudScript_StatBoots1[]; extern HudScript HudScript_StatBoots1;
extern HudScript HudScript_StatBoots2[]; extern HudScript HudScript_StatBoots2;
extern HudScript HudScript_StatBoots3[]; extern HudScript HudScript_StatBoots3;
extern HudScript HudScript_StatHammer0[]; extern HudScript HudScript_StatHammer0;
extern HudScript HudScript_StatHammer1[]; extern HudScript HudScript_StatHammer1;
extern HudScript HudScript_StatHammer2[]; extern HudScript HudScript_StatHammer2;
extern HudScript HudScript_StatHammer3[]; extern HudScript HudScript_StatHammer3;
extern HudScript HudScript_StatusStarPoint[]; extern HudScript HudScript_StatusStarPoint;
extern HudScript HudScript_StatStarPiece_1[]; extern HudScript HudScript_StatStarPiece_1;
extern HudScript HudScript_Clock[]; extern HudScript HudScript_Clock;
extern HudScript HudScript_StatusHeart[]; extern HudScript HudScript_StatusHeart;
extern HudScript HudScript_StatFp_1[]; extern HudScript HudScript_StatFp_1;
extern HudScript HudScript_StatBp[]; extern HudScript HudScript_StatBp;
extern HudScript HudScript_StatusStar1[]; extern HudScript HudScript_StatusStar1;
extern HudScript HudScript_StatusStar2[]; extern HudScript HudScript_StatusStar2;
extern HudScript HudScript_StatusStar3[]; extern HudScript HudScript_StatusStar3;
extern HudScript HudScript_StatusStar4[]; extern HudScript HudScript_StatusStar4;
extern HudScript HudScript_StatusStar5[]; extern HudScript HudScript_StatusStar5;
extern HudScript HudScript_StatusStar6[]; extern HudScript HudScript_StatusStar6;
extern HudScript HudScript_StatusStar7[]; extern HudScript HudScript_StatusStar7;
extern HudScript HudScript_StatusStarEmpty[]; extern HudScript HudScript_StatusStarEmpty;
extern HudScript HudScript_StatTimes[]; extern HudScript HudScript_StatTimes;
extern HudScript HudScript_ListPrevPage[]; extern HudScript HudScript_ListPrevPage;
extern HudScript HudScript_ListNextPage[]; extern HudScript HudScript_ListNextPage;
extern HudScript HudScript_Dash[]; extern HudScript HudScript_Dash;
extern HudScript HudScript_LabelBpNeeded[]; extern HudScript HudScript_LabelBpNeeded;
extern HudScript HudScript_FPCost[]; extern HudScript HudScript_FPCost;
extern HudScript HudScript_PartnerRank[]; extern HudScript HudScript_PartnerRank;
extern HudScript HudScript_MoveDiamond[]; extern HudScript HudScript_MoveDiamond;
extern HudScript HudScript_MoveBlueOrb[]; extern HudScript HudScript_MoveBlueOrb;
extern HudScript HudScript_MoveGreenOrb[]; extern HudScript HudScript_MoveGreenOrb;
extern HudScript HudScript_MoveRedOrb[]; extern HudScript HudScript_MoveRedOrb;
extern HudScript HudScript_MapWalk0[]; extern HudScript HudScript_MapWalk0;
extern HudScript HudScript_StatusSPIncrement1[]; extern HudScript HudScript_StatusSPIncrement1;
extern HudScript HudScript_StatusSPIncrement2[]; extern HudScript HudScript_StatusSPIncrement2;
extern HudScript HudScript_StatusSPIncrement3[]; extern HudScript HudScript_StatusSPIncrement3;
extern HudScript HudScript_StatusSPIncrement4[]; extern HudScript HudScript_StatusSPIncrement4;
extern HudScript HudScript_StatusSPIncrement5[]; extern HudScript HudScript_StatusSPIncrement5;
extern HudScript HudScript_StatusSPIncrement6[]; extern HudScript HudScript_StatusSPIncrement6;
extern HudScript HudScript_StatusSPIncrement7[]; extern HudScript HudScript_StatusSPIncrement7;
extern HudScript HudScript_StatusSPEmptyIncrement[]; extern HudScript HudScript_StatusSPEmptyIncrement;
extern HudScriptPair gItemHudScripts[]; extern IconHudScriptPair gItemHudScripts[];
extern WindowStyleCustom gPauseWS_0; extern WindowStyleCustom gPauseWS_0;
extern WindowStyleCustom gPauseWS_1; extern WindowStyleCustom gPauseWS_1;

View File

@ -26,11 +26,11 @@ static s32 gPauseItemsIconIDs[20];
#define ITEM_INVALID 0x7FFF #define ITEM_INVALID 0x7FFF
HudScript* gPauseItemsElements[] = { HudScript* gPauseItemsElements[] = {
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp, &HudScript_StatBp,
HudScript_StatBp, HudScript_ListPrevPage, HudScript_ListNextPage, HudScript_Dash, &HudScript_StatBp, &HudScript_ListPrevPage, &HudScript_ListNextPage, &HudScript_Dash,
HudScript_StatusStar1 &HudScript_StatusStar1
}; };
MenuWindowBP gPauseItemsWindowBPs[] = { MenuWindowBP gPauseItemsWindowBPs[] = {
{ {
@ -233,10 +233,10 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
} else { } else {
if (isSelected) { if (isSelected) {
hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAGS_DROP_SHADOW); hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAGS_DROP_SHADOW);
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].iconID].enabled; gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].hudElemID].enabled;
} }
hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].iconID].enabled); hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].hudElemID].enabled);
hud_element_set_scale(itemIcon, 0.670816f); hud_element_set_scale(itemIcon, 0.670816f);
} }
@ -539,7 +539,7 @@ void pause_items_handle_input(MenuPanel* panel) {
if (gPauseItemsLevel == 1) { if (gPauseItemsLevel == 1) {
if (gPauseItemsSelectedItem != ITEM_NONE_STANDIN && gPauseItemsSelectedItem != ITEM_INVALID && gPauseItemsSelectedItem != 0) { if (gPauseItemsSelectedItem != ITEM_NONE_STANDIN && gPauseItemsSelectedItem != ITEM_INVALID && gPauseItemsSelectedItem != 0) {
gPauseCurrentDescMsg = gItemTable[gPauseItemsSelectedItem].menuMsg; gPauseCurrentDescMsg = gItemTable[gPauseItemsSelectedItem].fullDescMsg;
} else { } else {
gPauseCurrentDescMsg = 0; gPauseCurrentDescMsg = 0;
gPauseCurrentDescIconScript = NULL; gPauseCurrentDescIconScript = NULL;

View File

@ -37,8 +37,8 @@ static HudScript* gPauseShownDescIconScript;
static s32 gPauseTutorialSprites[3]; static s32 gPauseTutorialSprites[3];
static HudScript* gPauseIconScripts[] = { static HudScript* gPauseIconScripts[] = {
HudScript_AnimatedCursorHand, HudScript_DescMsgPrev, HudScript_DescMsgNext, HudScript_UnusedBadge, &HudScript_AnimatedCursorHand, &HudScript_DescMsgPrev, &HudScript_DescMsgNext, &HudScript_UnusedBadge,
HudScript_StickTapRight, HudScript_PressAButton, HudScript_PressStartButton, HudScript_StartButtonText &HudScript_StickTapRight, &HudScript_PressAButton, &HudScript_PressStartButton, &HudScript_StartButtonText
}; };
MenuPanel* gPausePanels[] = { MenuPanel* gPausePanels[] = {
&gPausePanelTabs, &gPausePanelStats, &gPausePanelBadges, &gPausePanelItems, &gPausePanelPartners, &gPausePanelTabs, &gPausePanelStats, &gPausePanelBadges, &gPausePanelItems, &gPausePanelPartners,
@ -582,7 +582,7 @@ void pause_init(void) {
for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) { for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) {
gPauseCommonIconIDs[i] = hud_element_create(gPauseIconScripts[i]); gPauseCommonIconIDs[i] = hud_element_create(gPauseIconScripts[i]);
if (gPauseIconScripts[i] == HudScript_AnimatedCursorHand) { if (gPauseIconScripts[i] == &HudScript_AnimatedCursorHand) {
hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80); hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
} else { } else {
hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_80); hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_80);

View File

@ -24,7 +24,7 @@ static s32 gPauseMapCursorCurrentOption;
static s32 gPauseMapCursorCurrentOptionCopy; static s32 gPauseMapCursorCurrentOptionCopy;
static s32 gPauseMapSpacesInSnapRange; static s32 gPauseMapSpacesInSnapRange;
HudScript* gPauseMapIconScripts[] = { HudScript_MapWalk0 }; HudScript* gPauseMapIconScripts[] = { &HudScript_MapWalk0 };
s32 D_8024FA34 = -1; s32 D_8024FA34 = -1;
Vec2b gPauseMapPaths[][32] = { Vec2b gPauseMapPaths[][32] = {
{ { 1, -10 }, { 1, -8 }, { -9, -2 }, { -8, 0 }, { -8, 0 }, { -7, -3 }, { -5, -3 }, }, { { 1, -10 }, { 1, -8 }, { -9, -2 }, { -8, 0 }, { -8, 0 }, { -7, -3 }, { -5, -3 }, },

View File

@ -9,7 +9,7 @@
#include "sprite/npc/world_sushie.h" #include "sprite/npc/world_sushie.h"
#include "sprite/npc/world_lakilester.h" #include "sprite/npc/world_lakilester.h"
extern s32 gPartnerPopupProperties[11][4]; extern s32 gPartnerPopupProperties[13][4];
extern s8 gPauseBufferPal1[512]; extern s8 gPauseBufferPal1[512];
extern s8 gPauseBufferImg1[15752]; extern s8 gPauseBufferImg1[15752];
extern s8 gPauseBufferPal2[512]; extern s8 gPauseBufferPal2[512];
@ -35,8 +35,8 @@ static s32 gPausePartnersLevel;
static s32 gPausePartnersNumPartners; static s32 gPausePartnersNumPartners;
HudScript* gPausePartnersIconScripts[] = { HudScript* gPausePartnersIconScripts[] = {
HudScript_FPCost, HudScript_StatFp_1, HudScript_PartnerRank, HudScript_PartnerRank, &HudScript_FPCost, &HudScript_StatFp_1, &HudScript_PartnerRank, &HudScript_PartnerRank,
HudScript_MoveDiamond, HudScript_MoveBlueOrb, HudScript_MoveGreenOrb, HudScript_MoveRedOrb &HudScript_MoveDiamond, &HudScript_MoveBlueOrb, &HudScript_MoveGreenOrb, &HudScript_MoveRedOrb
}; };
Vp gPausePartnersViewport = { Vp gPausePartnersViewport = {
.vp = { .vp = {
@ -455,9 +455,9 @@ void pause_partners_draw_movelist(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid
style = 1; style = 1;
if (i == 0) { if (i == 0) {
moveNameID = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]]].moveNameID; moveNameID = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]]].nameMsg;
} else { } else {
moveNameID = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]] + 2 + i].moveNameID; moveNameID = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]] + 2 + i].nameMsg;
} }
if (i > 0) { if (i > 0) {
@ -652,9 +652,9 @@ void pause_partners_handle_input(MenuPanel* panel) {
if (gPausePartnersLevel == 0) { if (gPausePartnersLevel == 0) {
gPauseCurrentDescMsg = gPausePartnersMessages[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]]; gPauseCurrentDescMsg = gPausePartnersMessages[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]];
} else if (gPausePartnersSelectedMove == 0) { } else if (gPausePartnersSelectedMove == 0) {
gPauseCurrentDescMsg = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]]].menuDescID; gPauseCurrentDescMsg = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]]].fullDescMsg;
} else { } else {
gPauseCurrentDescMsg = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]] + 2 + gPausePartnersSelectedMove].menuDescID; gPauseCurrentDescMsg = gMoveTable[gPausePartnersMoveBase[gPausePartnersPartnerIdx[gPausePartnersCurrentPartnerIdx]] + 2 + gPausePartnersSelectedMove].fullDescMsg;
} }
} }

View File

@ -14,12 +14,12 @@ typedef struct {
s32 baseMsgID; s32 baseMsgID;
} StatsEntryData; // size = 0xC } StatsEntryData; // size = 0xC
HudScript* gStatsMenuElements[] = { HudScript_MarioHeadSmall, HudScript_StatBoots0, HudScript_StatHammer0, HudScript* gStatsMenuElements[] = { &HudScript_MarioHeadSmall, &HudScript_StatBoots0, &HudScript_StatHammer0,
HudScript_StatusCoin, HudScript_StatusStarPoint, HudScript_StatStarPiece_1, &HudScript_StatusCoin, &HudScript_StatusStarPoint, &HudScript_StatStarPiece_1,
HudScript_Clock, HudScript_StatusHeart, HudScript_StatFp_1, HudScript_StatBp, &HudScript_Clock, &HudScript_StatusHeart, &HudScript_StatFp_1, &HudScript_StatBp,
HudScript_StatusStar1, HudScript_StatTimes}; &HudScript_StatusStar1, &HudScript_StatTimes};
HudScript* gStatsBootsElements[] = { HudScript_StatBoots0, HudScript_StatBoots1, HudScript_StatBoots2, HudScript_StatBoots3 }; HudScript* gStatsBootsElements[] = { &HudScript_StatBoots0, &HudScript_StatBoots1, &HudScript_StatBoots2, &HudScript_StatBoots3 };
HudScript* gStatsHammerElements[] = { HudScript_StatHammer0, HudScript_StatHammer1, HudScript_StatHammer2, HudScript_StatHammer3 }; HudScript* gStatsHammerElements[] = { &HudScript_StatHammer0, &HudScript_StatHammer1, &HudScript_StatHammer2, &HudScript_StatHammer3 };
s32 gPauseStatsBootsMessages[] = { 59, 60, 61, 62 }; s32 gPauseStatsBootsMessages[] = { 59, 60, 61, 62 };
s32 gPauseStatsHammerMessages[] = { 63, 64, 65, 66 }; s32 gPauseStatsHammerMessages[] = { 63, 64, 65, 66 };
s8 gPauseStatsGridData[] = { s8 gPauseStatsGridData[] = {
@ -44,13 +44,13 @@ StatsEntryData gStatsMenuEntries[] = {
{.cursorX = 125, .cursorY = 121, .baseMsgID = 47}, {.cursorX = 125, .cursorY = 121, .baseMsgID = 47},
{.cursorX = 125, .cursorY = 138, .baseMsgID = 49} {.cursorX = 125, .cursorY = 138, .baseMsgID = 49}
}; };
HudScript* gPauseStatsSPIncElements[] = { HudScript_StatusSPIncrement1, HudScript_StatusSPIncrement3, HudScript* gPauseStatsSPIncElements[] = { &HudScript_StatusSPIncrement1, &HudScript_StatusSPIncrement3,
HudScript_StatusSPIncrement2, HudScript_StatusSPIncrement4, &HudScript_StatusSPIncrement2, &HudScript_StatusSPIncrement4,
HudScript_StatusSPIncrement5, HudScript_StatusSPIncrement6, &HudScript_StatusSPIncrement5, &HudScript_StatusSPIncrement6,
HudScript_StatusSPIncrement7 }; &HudScript_StatusSPIncrement7 };
HudScript* gPauseStatsStarElements[] = { HudScript_StatusStar1, HudScript_StatusStar3, HudScript_StatusStar2, HudScript* gPauseStatsStarElements[] = { &HudScript_StatusStar1, &HudScript_StatusStar3, &HudScript_StatusStar2,
HudScript_StatusStar4, HudScript_StatusStar5, HudScript_StatusStar6, &HudScript_StatusStar4, &HudScript_StatusStar5, &HudScript_StatusStar6,
HudScript_StatusStar7 }; &HudScript_StatusStar7 };
//s32 D_8024F46C[] = { -1, 1, 2, 4, 5, 7, 8 }; //s32 D_8024F46C[] = { -1, 1, 2, 4, 5, 7, 8 };
s32 D_8024F46C = -1; s32 D_8024F46C = -1;
s32 D_8024F470 = 1; s32 D_8024F470 = 1;

View File

@ -17,8 +17,8 @@ static s32 gPauseTabsIconIDs[6];
static s32 gPauseTabsPreviousTab; static s32 gPauseTabsPreviousTab;
static s32 gPauseTabsHorizScrollPos; static s32 gPauseTabsHorizScrollPos;
HudScript* gPauseTabsHudScripts[] = { HudScript_HeaderStats, HudScript_HeaderBadges, HudScript_HeaderItems, HudScript* gPauseTabsHudScripts[] = { &HudScript_HeaderStats, &HudScript_HeaderBadges, &HudScript_HeaderItems,
HudScript_HeaderParty, HudScript_HeaderSpirits, HudScript_HeaderMap }; &HudScript_HeaderParty, &HudScript_HeaderSpirits, &HudScript_HeaderMap };
s8 gPauseTabsGridData[] = { 0, 1, 2, 3, 4, 5 }; s8 gPauseTabsGridData[] = { 0, 1, 2, 3, 4, 5 };
u8 gPauseTabsPanelIDs[] = { 1, 2, 3, 4, 5, 6 }; u8 gPauseTabsPanelIDs[] = { 1, 2, 3, 4, 5, 6 };
u8 gPauseTabsWindowIDs[] = { WINDOW_ID_PAUSE_TAB_STATS, WINDOW_ID_PAUSE_TAB_BADGES, WINDOW_ID_PAUSE_TAB_ITEMS, WINDOW_ID_PAUSE_TAB_PARTY, WINDOW_ID_PAUSE_TAB_SPIRITS, WINDOW_ID_PAUSE_TAB_MAP }; u8 gPauseTabsWindowIDs[] = { WINDOW_ID_PAUSE_TAB_STATS, WINDOW_ID_PAUSE_TAB_BADGES, WINDOW_ID_PAUSE_TAB_ITEMS, WINDOW_ID_PAUSE_TAB_PARTY, WINDOW_ID_PAUSE_TAB_SPIRITS, WINDOW_ID_PAUSE_TAB_MAP };

View File

@ -85,53 +85,14 @@ EvtScript N(main) = {
EVT_END EVT_END
}; };
static s32** N(varStash) = NULL; #define CHEST_ITEM 19
#include "world/common/StashVars.inc.c" #define CHEST_FLAG 1048
#include "world/common/atomic/Chest.inc.c"
EvtScript N(80240624) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)
EVT_CALL(SetTimeFreezeMode, 0)
EVT_RETURN
EVT_RETURN
EVT_END
};
EvtScript N(8024068C) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_IF_NE(EVT_VAR(10), 0)
EVT_EXEC_WAIT(N(80240624))
EVT_END_IF
EVT_SWITCH(EVT_VAR(11))
EVT_CASE_EQ(0)
EVT_CALL(AddItem, EVT_VAR(10), EVT_VAR(0))
EVT_CASE_EQ(1)
EVT_CALL(AddKeyItem, EVT_VAR(10))
EVT_CASE_EQ(2)
EVT_CALL(AddBadge, EVT_VAR(10), EVT_VAR(0))
EVT_END_SWITCH
EVT_WAIT_FRAMES(15)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(8024076C) = {
EVT_SET(EVT_VAR(10), 19)
EVT_SET(EVT_VAR(11), 1)
EVT_SET(EVT_SAVE_FLAG(1048), 1)
EVT_EXEC_WAIT(N(8024068C))
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = { EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, 0x802EAE30, -300, 50, -200, 0, 0, MAKE_ENTITY_END) EVT_CALL(MakeEntity, 0x802EAE30, -300, 50, -200, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignChestFlag, EVT_SAVE_FLAG(1048)) EVT_CALL(AssignChestFlag, EVT_SAVE_FLAG(CHEST_FLAG))
EVT_CALL(AssignScript, EVT_PTR(N(8024076C))) EVT_CALL(AssignScript, EVT_PTR(N(EVS_Chest_Interact)))
EVT_CALL(MakeEntity, 0x802EA7E0, -125, 60, 175, 0, MAKE_ENTITY_END) EVT_CALL(MakeEntity, 0x802EA7E0, -125, 60, 175, 0, MAKE_ENTITY_END)
EVT_RETURN EVT_RETURN
EVT_END EVT_END
@ -203,9 +164,3 @@ NpcGroupList N(npcGroupList_80240B44) = {
NPC_GROUP(N(npcGroup_80240954), BATTLE_ID(0, 0, 0, 0)), NPC_GROUP(N(npcGroup_80240954), BATTLE_ID(0, 0, 0, 0)),
{}, {},
}; };
#include "world/common/GetItemName.inc.c"
#include "world/common/SomeItemEntityFunc.inc.c"
#include "world/common/CheckItemFlags40.inc.c"

View File

@ -130,59 +130,14 @@ static s32 N(pad_868)[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
}; };
static s32** N(varStash) = NULL; #define CHEST_ITEM 19
#include "world/common/StashVars.inc.c" #define CHEST_FLAG 1057
#include "world/common/atomic/Chest.inc.c"
EvtScript N(80240874) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)
EVT_CALL(SetTimeFreezeMode, 0)
EVT_RETURN
EVT_RETURN
EVT_END
};
EvtScript N(802408DC) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_IF_NE(EVT_VAR(10), 0)
EVT_EXEC_WAIT(N(80240874))
EVT_END_IF
EVT_SWITCH(EVT_VAR(11))
EVT_CASE_EQ(0)
EVT_CALL(AddItem, EVT_VAR(10), EVT_VAR(0))
EVT_CASE_EQ(1)
EVT_CALL(AddKeyItem, EVT_VAR(10))
EVT_CASE_EQ(2)
EVT_CALL(AddBadge, EVT_VAR(10), EVT_VAR(0))
EVT_END_SWITCH
EVT_WAIT_FRAMES(15)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(802409BC) = {
EVT_SET(EVT_VAR(10), 19)
EVT_SET(EVT_VAR(11), 1)
EVT_SET(EVT_SAVE_FLAG(1057), 1)
EVT_EXEC_WAIT(N(802408DC))
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = { EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, 0x802EAE30, -225, 0, -245, 0, 0, MAKE_ENTITY_END) EVT_CALL(MakeEntity, 0x802EAE30, -225, 0, -245, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignChestFlag, EVT_SAVE_FLAG(1057)) EVT_CALL(AssignChestFlag, EVT_SAVE_FLAG(1057))
EVT_CALL(AssignScript, EVT_PTR(N(802409BC))) EVT_CALL(AssignScript, EVT_PTR(N(EVS_Chest_Interact)))
EVT_RETURN EVT_RETURN
EVT_END EVT_END
}; };
#include "world/common/GetItemName.inc.c"
#include "world/common/SomeItemEntityFunc.inc.c"
#include "world/common/CheckItemFlags40.inc.c"

View File

@ -1,5 +1,9 @@
#include "dgb_18.h" #include "dgb_18.h"
// replace below with:
// #include "world/common/atomic/Chest.inc.c"
// after data is done
#include "world/common/StashVars.inc.c" #include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c" #include "world/common/GetItemName.inc.c"

View File

@ -68,7 +68,7 @@ static EffectInstance* N(Quizmo_StageEffect);
static EffectInstance* N(Quizmo_AudienceEffect); static EffectInstance* N(Quizmo_AudienceEffect);
static EffectInstance* N(Quizmo_VannaTEffect); static EffectInstance* N(Quizmo_VannaTEffect);
static s8 N(pad_D_8024DFEC)[0x4]; static s8 N(pad_D_8024DFEC)[0x4];
static s32 N(bigArray)[112]; static s32 N(KeyItemChoiceList)[112];
static s8 N(pad_D_8024E1B0)[0x4]; // Probably part of the above static s8 N(pad_D_8024E1B0)[0x4]; // Probably part of the above
static s32 N(LetterDelivery_SavedNpcAnim); static s32 N(LetterDelivery_SavedNpcAnim);
@ -340,8 +340,8 @@ EvtScript N(802477E8) = {
}; };
EvtScript N(8024792C) = { EvtScript N(8024792C) = {
EVT_CALL(N(BigArrayFunc), EVT_VAR(0)) EVT_CALL(N(BuildKeyItemChoiceList), EVT_VAR(0))
EVT_BIND_PADLOCK(N(802477E8), 0x10, 0, EVT_PTR(N(bigArray)), 0, 1) EVT_BIND_PADLOCK(N(802477E8), 0x10, 0, EVT_PTR(N(KeyItemChoiceList)), 0, 1)
EVT_CALL(N(func_80242730_95D930), EVT_VAR(0)) EVT_CALL(N(func_80242730_95D930), EVT_VAR(0))
EVT_RETURN EVT_RETURN
EVT_END EVT_END
@ -411,8 +411,8 @@ EvtScript N(802479FC) = {
EvtScript N(80247D20) = { EvtScript N(80247D20) = {
EVT_SET(EVT_VAR(0), EVT_VAR(11)) EVT_SET(EVT_VAR(0), EVT_VAR(11))
EVT_SET(EVT_VAR(1), EVT_VAR(2)) EVT_SET(EVT_VAR(1), EVT_VAR(2))
EVT_CALL(N(BigArrayFunc), EVT_VAR(0)) EVT_CALL(N(BuildKeyItemChoiceList), EVT_VAR(0))
EVT_BIND_PADLOCK(N(802479FC), 0x10, 0, EVT_PTR(N(bigArray)), 0, 1) EVT_BIND_PADLOCK(N(802479FC), 0x10, 0, EVT_PTR(N(KeyItemChoiceList)), 0, 1)
EVT_CALL(N(func_80242730_95D930), EVT_VAR(0)) EVT_CALL(N(func_80242730_95D930), EVT_VAR(0))
EVT_RETURN EVT_RETURN
EVT_END EVT_END
@ -2034,7 +2034,7 @@ ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
#include "world/common/BigArrayFunc.inc.c" #include "world/common/atomic/MakeKeyChoice.inc.c"
ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall) { ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;

View File

@ -50,7 +50,7 @@ ApiStatus N(Quizmo_SetVannaAnim_Wave)(Evt* script, s32 isInitialCall);
ApiStatus N(Quizmo_CreateWorker)(Evt* script, s32 isInitialCall); ApiStatus N(Quizmo_CreateWorker)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242730_95D930)(Evt* script, s32 isInitialCall); ApiStatus N(func_80242730_95D930)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall); ApiStatus N(func_80242784_95D984)(Evt* script, s32 isInitialCall);
ApiStatus N(BigArrayFunc)(Evt* script, s32 isInitialCall); ApiStatus N(BuildKeyItemChoiceList)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall); ApiStatus N(func_80242858_95DA58)(Evt* script, s32 isInitialCall);
ApiStatus N(LetterDelivery_SaveNpcAnim)(Evt* script, s32 isInitialCall); ApiStatus N(LetterDelivery_SaveNpcAnim)(Evt* script, s32 isInitialCall);
ApiStatus N(LetterDelivery_RestoreNpcAnim)(Evt* script, s32 isInitialCall); ApiStatus N(LetterDelivery_RestoreNpcAnim)(Evt* script, s32 isInitialCall);

View File

@ -28,7 +28,7 @@ MapConfig N(config) = {
EvtScript N(802403E0) = { EvtScript N(802403E0) = {
EVT_SWITCH(EVT_SAVE_VAR(0)) EVT_SWITCH(EVT_SAVE_VAR(0))
EVT_CASE_LT(53) EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8) EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8) EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)

View File

@ -643,7 +643,7 @@ ApiStatus N(CreateMinigame)(Evt* script, s32 isInitialCall) {
scorekeeper->varTablePtr[JUMP_DATA_VAR_IDX] = data; scorekeeper->varTablePtr[JUMP_DATA_VAR_IDX] = data;
data->workerID = create_generic_entity_world(NULL, &mgm_01_work_draw_score); data->workerID = create_generic_entity_world(NULL, &mgm_01_work_draw_score);
hudElemID = hud_element_create(HudScript_StatusCoin); hudElemID = hud_element_create(&HudScript_StatusCoin);
data->hudElemID = hudElemID; data->hudElemID = hudElemID;
hud_element_set_flags(data->hudElemID, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(data->hudElemID, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(data->hudElemID, 255, 255, 255); hud_element_set_tint(data->hudElemID, 255, 255, 255);

View File

@ -24,9 +24,9 @@ void partner_enable_input(void);
#define BOBOMB_NPC_ID_BASE 0x1E #define BOBOMB_NPC_ID_BASE 0x1E
#define LUIGI_NPC_ID_BASE 0x64 #define LUIGI_NPC_ID_BASE 0x64
extern HudScript HudScript_BlueMeter[]; extern HudScript HudScript_BlueMeter;
extern HudScript HudScript_AButton[]; extern HudScript HudScript_AButton;
extern HudScript HudScript_MashAButton[]; extern HudScript HudScript_MashAButton;
extern s32 mgm_02_InitialConfigurations[3][NUM_BOXES]; extern s32 mgm_02_InitialConfigurations[3][NUM_BOXES];
extern s32 mgm_02_BoxModelIDs[NUM_BOXES]; extern s32 mgm_02_BoxModelIDs[NUM_BOXES];
@ -199,14 +199,14 @@ ApiStatus N(CreateScoreDisplay)(Evt* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
data->workerID = create_generic_entity_world(NULL, &mgm_02_work_draw_score); data->workerID = create_generic_entity_world(NULL, &mgm_02_work_draw_score);
hudElemA = hud_element_create(HudScript_AButton); hudElemA = hud_element_create(&HudScript_AButton);
data->hudElemID_AButton = hudElemA; data->hudElemID_AButton = hudElemA;
hud_element_set_render_depth(hudElemA, 0); hud_element_set_render_depth(hudElemA, 0);
hud_element_set_flags(hudElemA, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(hudElemA, HUD_ELEMENT_FLAGS_80);
hud_element_set_tint(hudElemA, 255, 255, 255); hud_element_set_tint(hudElemA, 255, 255, 255);
hud_element_set_script(hudElemA, HudScript_AButton); hud_element_set_script(hudElemA, &HudScript_AButton);
hudElemMeter = hud_element_create(HudScript_BlueMeter); hudElemMeter = hud_element_create(&HudScript_BlueMeter);
data->hudElemID_Meter = hudElemMeter; data->hudElemID_Meter = hudElemMeter;
hud_element_set_render_depth(hudElemMeter, 0); hud_element_set_render_depth(hudElemMeter, 0);
hud_element_set_flags(hudElemMeter, HUD_ELEMENT_FLAGS_80); hud_element_set_flags(hudElemMeter, HUD_ELEMENT_FLAGS_80);
@ -471,7 +471,7 @@ ApiStatus N(RunMinigame)(Evt* script, s32 isInitialCall) {
} }
break; break;
case BOX_STATE_FUZZY_HIT: case BOX_STATE_FUZZY_HIT:
hud_element_set_script(data->hudElemID_AButton, HudScript_AButton); hud_element_set_script(data->hudElemID_AButton, &HudScript_AButton);
hud_element_set_alpha(data->hudElemID_AButton, 160); hud_element_set_alpha(data->hudElemID_AButton, 160);
hud_element_set_alpha(data->hudElemID_Meter, 160); hud_element_set_alpha(data->hudElemID_Meter, 160);
data->mashProgress = 0; data->mashProgress = 0;
@ -515,7 +515,7 @@ ApiStatus N(RunMinigame)(Evt* script, s32 isInitialCall) {
npc->pos.x = gPlayerStatusPtr->position.x; npc->pos.x = gPlayerStatusPtr->position.x;
npc->pos.y = gPlayerStatusPtr->position.y + 28.0; npc->pos.y = gPlayerStatusPtr->position.y + 28.0;
npc->pos.z = gPlayerStatusPtr->position.z + 2.0; npc->pos.z = gPlayerStatusPtr->position.z + 2.0;
hud_element_set_script(data->hudElemID_AButton, HudScript_MashAButton); hud_element_set_script(data->hudElemID_AButton, &HudScript_MashAButton);
hud_element_set_alpha(data->hudElemID_AButton, 255); hud_element_set_alpha(data->hudElemID_AButton, 255);
hud_element_set_alpha(data->hudElemID_Meter, 255); hud_element_set_alpha(data->hudElemID_Meter, 255);
data->box[i].state = BOX_STATE_FUZZY_GRAB; data->box[i].state = BOX_STATE_FUZZY_GRAB;
@ -532,7 +532,7 @@ ApiStatus N(RunMinigame)(Evt* script, s32 isInitialCall) {
data->stunFlags |= STUN_FLAGS_CHANGED; data->stunFlags |= STUN_FLAGS_CHANGED;
data->box[i].state = BOX_STATE_FUZZY_DETACH; data->box[i].state = BOX_STATE_FUZZY_DETACH;
npc->duration = 10; npc->duration = 10;
hud_element_set_script(data->hudElemID_AButton, HudScript_AButton); hud_element_set_script(data->hudElemID_AButton, &HudScript_AButton);
hud_element_set_alpha(data->hudElemID_AButton, 160); hud_element_set_alpha(data->hudElemID_AButton, 160);
hud_element_set_alpha(data->hudElemID_Meter, 160); hud_element_set_alpha(data->hudElemID_Meter, 160);
npc->currentAnim.w = NPC_ANIM_fuzzy_Palette_00_Anim_8; npc->currentAnim.w = NPC_ANIM_fuzzy_Palette_00_Anim_8;

View File

@ -1,21 +0,0 @@
#include "common.h"
#include "npc.h"
ApiStatus N(BigArrayFunc)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32* ptr = (s32*) evt_get_variable(script, *args++);
s32 i;
if (ptr != NULL) {
for (i = 0; ptr[i] != 0; i++) {
N(bigArray)[i] = ptr[i];
}
N(bigArray)[i] = 0;
} else {
for (i = 0; i < 0x70; i++) {
N(bigArray)[i] = i + 16;
N(bigArray)[112] = 0;
}
}
return ApiStatus_DONE2;
}

View File

@ -1,228 +0,0 @@
#include "dead.h"
#include "common.h"
#include "npc.h"
#include "effects.h"
#include "sprite/npc/bony_beetle.h"
#ifdef _DEAD_H_
#include "dead_structs.h"
#endif
ApiStatus N(UnkNpcAIMainFunc6)(Evt* script, s32 isInitialCall) {
DeadEnemy* enemy = (DeadEnemy*)script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos;
EnemyDetectVolume territory;
EnemyDetectVolume* territoryPtr = &territory;
NpcAISettings* aiSettings = (NpcAISettings*)evt_get_variable(script, *args);
u32 x, y, z;
f32 x2, y2, z2, w2;
Npc* npc2;
territory.unk_00 = 0;
territory.shape = enemy->territory->wander.detectShape;
territory.pointX = enemy->territory->wander.detect.x;
territory.pointZ = enemy->territory->wander.detect.z;
territory.sizeX = enemy->territory->wander.detectSizeX;
territory.sizeZ = enemy->territory->wander.detectSizeZ;
territory.unk_18 = 65.0f;
territory.detectFlags = 0;
enemy->unk_108.x = npc->pos.x;
enemy->unk_108.y = npc->pos.y;
enemy->unk_108.z = npc->pos.z;
enemy->unk_114 = 0.0001f;
enemy->unk_118 = 0.0001f;
if (isInitialCall) {
enemy->varTable[6] = npc->collisionHeight;
enemy->unk_B0 |= ENEMY_AI_FLAGS_8;
}
if (isInitialCall || (enemy->varTable[10] == 100)) {
script->functionTemp[0] = 100;
npc->duration = 0;
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE];
npc->flags &= ~NPC_FLAG_NO_Y_MOVEMENT;
enemy->flags |= ENEMY_FLAGS_200000;
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
enemy->varTable[10] = 0;
enemy->varTable[11] = -1;
npc->pos.x = 0.0f;
npc->pos.y = -1000.0f;
npc->pos.z = 0.0f;
}
if (enemy->unk_B0 & ENEMY_AI_FLAGS_4) {
npc->duration = 0;
npc->collisionHeight = enemy->varTable[6];
enemy->unk_B0 &= ~ENEMY_AI_FLAGS_4;
if (npc->flags & NPC_FLAG_NO_Y_MOVEMENT) {
npc->currentAnim.w = 0x4A0018;
npc->moveSpeed = 0.0f;
npc->jumpVelocity = 0.0f;
npc->jumpScale = 1.0f;
script->functionTemp[0] = 102;
} else {
s32 emoteTemp;
fx_emote(EMOTE_QUESTION, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0x28, &emoteTemp);
npc->currentAnim.w = enemy->animList[ENEMY_ANIM_IDLE];
script->functionTemp[1] = 0;
script->functionTemp[0] = 200;
}
}
get_screen_coords(0, npc->pos.x, npc->pos.y, npc->pos.z, &x, &y, &z);
if (script->functionTemp[0] < 100 && x + 50 >= 421) {
script->functionTemp[0] = 110;
}
switch (script->functionTemp[0]) {
case 0:
func_800495A0(script, aiSettings, territoryPtr);
npc->collisionHeight = enemy->varTable[6];
if (enemy->varTable[13] != 0) {
if (npc->pos.y <= 0.0) {
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
} else {
npc->flags |= NPC_FLAG_GRAVITY;
npc->flags &= ~NPC_FLAG_ENABLE_HIT_SCRIPT;
}
}
func_800496B8(script, aiSettings, territoryPtr);
break;
case 1:
func_800496B8(script, aiSettings, territoryPtr);
break;
case 2:
base_PatrolAI_LoiterInit(script, aiSettings, territoryPtr);
case 3:
func_80049C04(script, aiSettings, territoryPtr);
break;
case 12:
N(set_script_owner_npc_anim)(script, aiSettings, territoryPtr);
case 13:
N(UnkDistFunc)(script, aiSettings, territoryPtr);
npc->collisionHeight = enemy->varTable[6];
break;
case 14:
N(UnkNpcAIFunc12)(script, aiSettings, territoryPtr);
break;
case 15:
N(set_script_owner_npc_col_height)(script, aiSettings, territoryPtr);
break;
case 100:
if (enemy->varTable[10] != 2) {
break;
}
npc2 = get_npc_unsafe(get_enemy(enemy->varTable[11])->npcID);
if (npc2->yaw < 180.0) {
npc->pos.x = npc2->pos.x + 12.0;
} else {
npc->pos.x = npc2->pos.x - 12.0;
}
npc->pos.y = npc2->pos.y + 25.0;
npc->pos.z = npc2->pos.z + 1.0;
npc->rotation.y = 0.0f;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
npc->flags &= ~NPC_FLAG_2;
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->renderYaw = 0.0f;
npc->currentAnim.w = 0x4A0018;
script->functionTemp[0] = 101;
case 101:
if (enemy->varTable[10] != 3) {
break;
}
enemy->varTable[10] = 4;
npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
npc->moveSpeed = 2.5f;
npc->jumpVelocity = 8.0f;
npc->jumpScale = 0.8f;
npc->flags |= NPC_FLAG_NO_Y_MOVEMENT;
script->functionTemp[0] = 102;
case 102:
if (npc->moveSpeed > 0.0) {
x2 = npc->pos.x;
y2 = npc->pos.y;
z2 = npc->pos.z;
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 {
npc->moveSpeed = 0.0f;
}
}
if (npc->jumpVelocity < 0.0) {
x2 = npc->pos.x;
y2 = npc->pos.y + 13.0;
z2 = npc->pos.z;
w2 = fabsf(npc->jumpVelocity) + 16.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;
enemy->territory->wander.point.z = npc->pos.z;
enemy->territory->wander.detect.x = npc->pos.x;
enemy->territory->wander.detect.y = npc->pos.y;
enemy->territory->wander.detect.z = npc->pos.z;
enemy->varTable[10] = 5;
if (enemy->varTable[13] != 0) {
if (npc->pos.y <= 0.0) {
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
} else {
npc->flags |= NPC_FLAG_GRAVITY;
npc->flags &= ~NPC_FLAG_ENABLE_HIT_SCRIPT;
}
} else if (!enemy->territory->wander.isFlying) {
npc->flags |= NPC_FLAG_GRAVITY;
npc->flags &= ~NPC_FLAG_ENABLE_HIT_SCRIPT;
} else {
npc->flags &= ~NPC_FLAG_GRAVITY;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT;
}
npc->flags |= NPC_FLAG_40000;
npc->flags &= ~NPC_FLAG_NO_Y_MOVEMENT;
npc->jumpVelocity = 0.0f;
npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
npc->currentAnim.w = 0x4A001A;
npc->duration = 3;
script->functionTemp[0] = 103;
break;
}
}
npc->pos.y += npc->jumpVelocity;
npc->jumpVelocity -= npc->jumpScale;
break;
case 103:
npc->duration--;
if (npc->duration <= 0) {
npc->flags &= ~NPC_FLAG_40000;
npc->currentAnim.w = 0x4A0001;
script->functionTemp[0] = 0;
}
break;
case 110:
npc->duration = 30;
npc->pos.x = 0.0f;
npc->pos.z = 0.0f;
npc->pos.y = -1000.0f;
npc->flags |= NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_2;
npc->flags &= ~NPC_FLAG_GRAVITY;
script->functionTemp[0] = 111;
case 111:
npc->duration--;
if (npc->duration <= 0) {
enemy->varTable[10] = 0;
script->functionTemp[0] = 100;
}
break;
case 200:
func_8004A73C(script);
break;
}
return ApiStatus_BLOCK;
}

View File

@ -0,0 +1,75 @@
#include "common.h"
// see dgb_12
//#define CHEST_ITEM 19
//#define CHEST_FLAG 1048
// temporarily copied from StashVars to allow static varStash
ApiStatus N(StashVars)(Evt* script, s32 isInitialCall) {
static s32** varStash = NULL;
s32 i;
if (varStash == NULL) {
varStash = heap_malloc(sizeof(script->varTable));
for (i = 0; i < ARRAY_COUNT(script->varTable); i++) {
varStash[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < ARRAY_COUNT(script->varTable); i++) {
script->varTable[i] = (s32) varStash[i];
}
heap_free(varStash);
varStash = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/GetItemName.inc.c"
#include "world/common/SomeItemEntityFunc.inc.c"
#include "world/common/CheckItemFlags40.inc.c"
EvtScript N(EVS_Chest_ShowGotItem) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, 2)
EVT_WAIT_FRAMES(40)
EVT_CALL(ShowGotItem, EVT_VAR(0), 0, 0)
EVT_CALL(SetTimeFreezeMode, 0)
EVT_RETURN
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Chest_GetItem) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(EVT_VAR(0), EVT_VAR(10))
EVT_IF_NE(EVT_VAR(10), 0)
EVT_EXEC_WAIT(N(EVS_Chest_ShowGotItem))
EVT_END_IF
EVT_SWITCH(EVT_VAR(11))
EVT_CASE_EQ(0)
EVT_CALL(AddItem, EVT_VAR(10), EVT_VAR(0))
EVT_CASE_EQ(1)
EVT_CALL(AddKeyItem, EVT_VAR(10))
EVT_CASE_EQ(2)
EVT_CALL(AddBadge, EVT_VAR(10), EVT_VAR(0))
EVT_END_SWITCH
EVT_WAIT_FRAMES(15)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Chest_Interact) = {
EVT_SET(EVT_VAR(10), CHEST_ITEM)
EVT_SET(EVT_VAR(11), 1)
EVT_SET(EVT_SAVE_FLAG(CHEST_FLAG), 1)
EVT_EXEC_WAIT(N(EVS_Chest_GetItem))
EVT_RETURN
EVT_END
};

View File

@ -37,55 +37,55 @@
#include "partner/twink.h" #include "partner/twink.h"
#include "sprite/npc/twink.h" #include "sprite/npc/twink.h"
extern HudScript HudScript_Partner0[]; extern HudScript HudScript_Partner0;
extern HudScript HudScript_Goombario[]; extern HudScript HudScript_Goombario;
extern HudScript HudScript_Kooper[]; extern HudScript HudScript_Kooper;
extern HudScript HudScript_Bombette[]; extern HudScript HudScript_Bombette;
extern HudScript HudScript_Parakarry[]; extern HudScript HudScript_Parakarry;
extern HudScript HudScript_Watt[]; extern HudScript HudScript_Watt;
extern HudScript HudScript_Sushie[]; extern HudScript HudScript_Sushie;
extern HudScript HudScript_Lakilester[]; extern HudScript HudScript_Lakilester;
extern HudScript HudScript_Bow[]; extern HudScript HudScript_Bow;
extern HudScript HudScript_PartnerA[]; extern HudScript HudScript_PartnerA;
extern HudScript HudScript_Partner0Disabled[]; extern HudScript HudScript_Partner0Disabled;
extern HudScript HudScript_GoombarioDisabled[]; extern HudScript HudScript_GoombarioDisabled;
extern HudScript HudScript_KooperDisabled[]; extern HudScript HudScript_KooperDisabled;
extern HudScript HudScript_BombetteDisabled[]; extern HudScript HudScript_BombetteDisabled;
extern HudScript HudScript_ParakarryDisabled[]; extern HudScript HudScript_ParakarryDisabled;
extern HudScript HudScript_WattDisabled[]; extern HudScript HudScript_WattDisabled;
extern HudScript HudScript_SushieDisabled[]; extern HudScript HudScript_SushieDisabled;
extern HudScript HudScript_LakilesterDisabled[]; extern HudScript HudScript_LakilesterDisabled;
extern HudScript HudScript_BowDisabled[]; extern HudScript HudScript_BowDisabled;
extern HudScript HudScript_PartnerADisabled[]; extern HudScript HudScript_PartnerADisabled;
extern HudScript HudScript_StatusDigit0[]; extern HudScript HudScript_StatusDigit0;
extern HudScript HudScript_StatusDigit1[]; extern HudScript HudScript_StatusDigit1;
extern HudScript HudScript_StatusDigit2[]; extern HudScript HudScript_StatusDigit2;
extern HudScript HudScript_StatusDigit3[]; extern HudScript HudScript_StatusDigit3;
extern HudScript HudScript_StatusDigit4[]; extern HudScript HudScript_StatusDigit4;
extern HudScript HudScript_StatusDigit5[]; extern HudScript HudScript_StatusDigit5;
extern HudScript HudScript_StatusDigit6[]; extern HudScript HudScript_StatusDigit6;
extern HudScript HudScript_StatusDigit7[]; extern HudScript HudScript_StatusDigit7;
extern HudScript HudScript_StatusDigit8[]; extern HudScript HudScript_StatusDigit8;
extern HudScript HudScript_StatusDigit9[]; extern HudScript HudScript_StatusDigit9;
extern HudScript HudScript_StatusTimes[]; extern HudScript HudScript_StatusTimes;
extern HudScript HudScript_StatusSlash[]; extern HudScript HudScript_StatusSlash;
extern HudScript HudScript_StatusStar1[]; extern HudScript HudScript_StatusStar1;
extern HudScript HudScript_StatusStar2[]; extern HudScript HudScript_StatusStar2;
extern HudScript HudScript_StatusStar3[]; extern HudScript HudScript_StatusStar3;
extern HudScript HudScript_StatusStar4[]; extern HudScript HudScript_StatusStar4;
extern HudScript HudScript_StatusStar5[]; extern HudScript HudScript_StatusStar5;
extern HudScript HudScript_StatusStar6[]; extern HudScript HudScript_StatusStar6;
extern HudScript HudScript_StatusStar7[]; extern HudScript HudScript_StatusStar7;
extern HudScript HudScript_StatusSPIncrement1[]; extern HudScript HudScript_StatusSPIncrement1;
extern HudScript HudScript_StatusSPIncrement2[]; extern HudScript HudScript_StatusSPIncrement2;
extern HudScript HudScript_StatusSPIncrement3[]; extern HudScript HudScript_StatusSPIncrement3;
extern HudScript HudScript_StatusSPIncrement4[]; extern HudScript HudScript_StatusSPIncrement4;
extern HudScript HudScript_StatusSPIncrement5[]; extern HudScript HudScript_StatusSPIncrement5;
extern HudScript HudScript_StatusSPIncrement6[]; extern HudScript HudScript_StatusSPIncrement6;
extern HudScript HudScript_StatusSPIncrement7[]; extern HudScript HudScript_StatusSPIncrement7;
extern f32 wPartnerTetherDistance; extern f32 wPartnerTetherDistance;
extern s16 D_8010CFC8; extern s16 D_8010CFC8;
@ -105,27 +105,27 @@ void _use_partner_ability(void);
// Partner icons // Partner icons
HudScript* wPartnerHudScripts[] = { HudScript* wPartnerHudScripts[] = {
HudScript_Partner0, HudScript_Goombario, HudScript_Kooper, HudScript_Bombette, &HudScript_Partner0, &HudScript_Goombario, &HudScript_Kooper, &HudScript_Bombette,
HudScript_Parakarry, HudScript_Partner0, HudScript_Watt, HudScript_Sushie, &HudScript_Parakarry, &HudScript_Partner0, &HudScript_Watt, &HudScript_Sushie,
HudScript_Lakilester, HudScript_Bow, HudScript_PartnerA, HudScript_PartnerA, &HudScript_Lakilester, &HudScript_Bow, &HudScript_PartnerA, &HudScript_PartnerA,
HudScript_PartnerA, HudScript_PartnerA, HudScript_PartnerA, HudScript_PartnerA, &HudScript_PartnerA, &HudScript_PartnerA, &HudScript_PartnerA, &HudScript_PartnerA,
}; };
HudScript* wDisabledPartnerHudScripts[] = { HudScript* wDisabledPartnerHudScripts[] = {
HudScript_Partner0Disabled, HudScript_GoombarioDisabled, HudScript_KooperDisabled, HudScript_BombetteDisabled, &HudScript_Partner0Disabled, &HudScript_GoombarioDisabled, &HudScript_KooperDisabled, &HudScript_BombetteDisabled,
HudScript_ParakarryDisabled, HudScript_Partner0Disabled, HudScript_WattDisabled, HudScript_SushieDisabled, &HudScript_ParakarryDisabled, &HudScript_Partner0Disabled, &HudScript_WattDisabled, &HudScript_SushieDisabled,
HudScript_LakilesterDisabled, HudScript_BowDisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled, &HudScript_LakilesterDisabled, &HudScript_BowDisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled,
HudScript_PartnerADisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled, HudScript_PartnerADisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled, &HudScript_PartnerADisabled,
}; };
HudScript* DigitHudScripts[] = { HudScript* DigitHudScripts[] = {
HudScript_StatusDigit0, HudScript_StatusDigit1, HudScript_StatusDigit2, HudScript_StatusDigit3, HudScript_StatusDigit4, &HudScript_StatusDigit0, &HudScript_StatusDigit1, &HudScript_StatusDigit2, &HudScript_StatusDigit3, &HudScript_StatusDigit4,
HudScript_StatusDigit5, HudScript_StatusDigit6, HudScript_StatusDigit7, HudScript_StatusDigit8, HudScript_StatusDigit9, &HudScript_StatusDigit5, &HudScript_StatusDigit6, &HudScript_StatusDigit7, &HudScript_StatusDigit8, &HudScript_StatusDigit9,
}; };
HudScript* TimesHudScript = HudScript_StatusTimes; HudScript* TimesHudScript = &HudScript_StatusTimes;
HudScript* SlashHudScript = HudScript_StatusSlash; HudScript* SlashHudScript = &HudScript_StatusSlash;
HudScript* SPIncrementHudScripts[] = { HudScript_StatusSPIncrement1, HudScript_StatusSPIncrement3, HudScript_StatusSPIncrement2, HudScript* SPIncrementHudScripts[] = { &HudScript_StatusSPIncrement1, &HudScript_StatusSPIncrement3, &HudScript_StatusSPIncrement2,
HudScript_StatusSPIncrement4, HudScript_StatusSPIncrement5, HudScript_StatusSPIncrement6, HudScript_StatusSPIncrement7 }; &HudScript_StatusSPIncrement4, &HudScript_StatusSPIncrement5, &HudScript_StatusSPIncrement6, &HudScript_StatusSPIncrement7 };
HudScript* SPStarHudScripts[] = { HudScript_StatusStar1, HudScript_StatusStar3, HudScript_StatusStar2, HudScript_StatusStar4, HudScript* SPStarHudScripts[] = { &HudScript_StatusStar1, &HudScript_StatusStar3, &HudScript_StatusStar2, &HudScript_StatusStar4,
HudScript_StatusStar5, HudScript_StatusStar6, HudScript_StatusStar7 }; &HudScript_StatusStar5, &HudScript_StatusStar6, &HudScript_StatusStar7 };
s32 D_800F7FE8 = -1; s32 D_800F7FE8 = -1;
s32 D_800F7FEC = 1; s32 D_800F7FEC = 1;

File diff suppressed because one or more lines are too long

View File

@ -113,8 +113,8 @@ glabel btl_state_update_first_strike
/* 176578 80247C98 92620006 */ lbu $v0, 6($s3) /* 176578 80247C98 92620006 */ lbu $v0, 6($s3)
/* 17657C 80247C9C 2403001D */ addiu $v1, $zero, 0x1d /* 17657C 80247C9C 2403001D */ addiu $v1, $zero, 0x1d
/* 176580 80247CA0 A683017C */ sh $v1, 0x17c($s4) /* 176580 80247CA0 A683017C */ sh $v1, 0x17c($s4)
/* 176584 80247CA4 3C038009 */ lui $v1, %hi(D_8008F2A8) /* 176584 80247CA4 3C038009 */ lui $v1, %hi(gMoveTable+0x248)
/* 176588 80247CA8 8C63F2A8 */ lw $v1, %lo(D_8008F2A8)($v1) /* 176588 80247CA8 8C63F2A8 */ lw $v1, %lo(gMoveTable+0x248)($v1)
/* 17658C 80247CAC 08091F35 */ j .L80247CD4 /* 17658C 80247CAC 08091F35 */ j .L80247CD4
/* 176590 80247CB0 00021600 */ sll $v0, $v0, 0x18 /* 176590 80247CB0 00021600 */ sll $v0, $v0, 0x18
.L80247CB4: .L80247CB4:
@ -123,8 +123,8 @@ glabel btl_state_update_first_strike
/* 17659C 80247CBC 92620006 */ lbu $v0, 6($s3) /* 17659C 80247CBC 92620006 */ lbu $v0, 6($s3)
/* 1765A0 80247CC0 24030006 */ addiu $v1, $zero, 6 /* 1765A0 80247CC0 24030006 */ addiu $v1, $zero, 6
/* 1765A4 80247CC4 A683017C */ sh $v1, 0x17c($s4) /* 1765A4 80247CC4 A683017C */ sh $v1, 0x17c($s4)
/* 1765A8 80247CC8 3C038009 */ lui $v1, %hi(D_8008F0DC) /* 1765A8 80247CC8 3C038009 */ lui $v1, %hi(gMoveTable+0x7C)
/* 1765AC 80247CCC 8C63F0DC */ lw $v1, %lo(D_8008F0DC)($v1) /* 1765AC 80247CCC 8C63F0DC */ lw $v1, %lo(gMoveTable+0x7C)($v1)
/* 1765B0 80247CD0 00021600 */ sll $v0, $v0, 0x18 /* 1765B0 80247CD0 00021600 */ sll $v0, $v0, 0x18
.L80247CD4: .L80247CD4:
/* 1765B4 80247CD4 00021603 */ sra $v0, $v0, 0x18 /* 1765B4 80247CD4 00021603 */ sra $v0, $v0, 0x18

View File

@ -60,9 +60,9 @@ glabel btl_state_update_partner_striking_first
/* 176B38 80248258 00021080 */ sll $v0, $v0, 2 /* 176B38 80248258 00021080 */ sll $v0, $v0, 2
/* 176B3C 8024825C A6A0017A */ sh $zero, 0x17a($s5) /* 176B3C 8024825C A6A0017A */ sh $zero, 0x17a($s5)
/* 176B40 80248260 A6A3017C */ sh $v1, 0x17c($s5) /* 176B40 80248260 A6A3017C */ sh $v1, 0x17c($s5)
/* 176B44 80248264 3C018009 */ lui $at, %hi(D_8008F064) /* 176B44 80248264 3C018009 */ lui $at, %hi(gMoveTable + 0x4)
/* 176B48 80248268 00220821 */ addu $at, $at, $v0 /* 176B48 80248268 00220821 */ addu $at, $at, $v0
/* 176B4C 8024826C 8C22F064 */ lw $v0, %lo(D_8008F064)($at) /* 176B4C 8024826C 8C22F064 */ lw $v0, %lo(gMoveTable + 0x4)($at)
/* 176B50 80248270 AEA20184 */ sw $v0, 0x184($s5) /* 176B50 80248270 AEA20184 */ sw $v0, 0x184($s5)
.L80248274: .L80248274:
/* 176B54 80248274 0C09A75B */ jal get_actor /* 176B54 80248274 0C09A75B */ jal get_actor

View File

@ -169,9 +169,9 @@ glabel btl_state_update_player_move
/* 1745F0 80245D10 00031080 */ sll $v0, $v1, 2 /* 1745F0 80245D10 00031080 */ sll $v0, $v1, 2
/* 1745F4 80245D14 00431021 */ addu $v0, $v0, $v1 /* 1745F4 80245D14 00431021 */ addu $v0, $v0, $v1
/* 1745F8 80245D18 00021080 */ sll $v0, $v0, 2 /* 1745F8 80245D18 00021080 */ sll $v0, $v0, 2
/* 1745FC 80245D1C 3C048009 */ lui $a0, %hi(D_8008F073) /* 1745FC 80245D1C 3C048009 */ lui $a0, %hi(gMoveTable+0x13)
/* 174600 80245D20 00822021 */ addu $a0, $a0, $v0 /* 174600 80245D20 00822021 */ addu $a0, $a0, $v0
/* 174604 80245D24 8084F073 */ lb $a0, %lo(D_8008F073)($a0) /* 174604 80245D24 8084F073 */ lb $a0, %lo(gMoveTable+0x13)($a0)
/* 174608 80245D28 04800003 */ bltz $a0, .L80245D38 /* 174608 80245D28 04800003 */ bltz $a0, .L80245D38
/* 17460C 80245D2C 2484002E */ addiu $a0, $a0, 0x2e /* 17460C 80245D2C 2484002E */ addiu $a0, $a0, 0x2e
/* 174610 80245D30 0C093E58 */ jal btl_show_battle_message /* 174610 80245D30 0C093E58 */ jal btl_show_battle_message

View File

@ -518,8 +518,8 @@ glabel btl_state_update_partner_menu
.L802A8930: .L802A8930:
/* 41D6C0 802A8930 24020008 */ addiu $v0, $zero, 8 /* 41D6C0 802A8930 24020008 */ addiu $v0, $zero, 8
/* 41D6C4 802A8934 A2820178 */ sb $v0, 0x178($s4) /* 41D6C4 802A8934 A2820178 */ sb $v0, 0x178($s4)
/* 41D6C8 802A8938 3C038009 */ lui $v1, %hi(D_8008F9B0) /* 41D6C8 802A8938 3C038009 */ lui $v1, %hi(gMoveTable+0x950)
/* 41D6CC 802A893C 8C63F9B0 */ lw $v1, %lo(D_8008F9B0)($v1) /* 41D6CC 802A893C 8C63F9B0 */ lw $v1, %lo(gMoveTable+0x950)($v1)
/* 41D6D0 802A8940 24020077 */ addiu $v0, $zero, 0x77 /* 41D6D0 802A8940 24020077 */ addiu $v0, $zero, 0x77
/* 41D6D4 802A8944 A682017C */ sh $v0, 0x17c($s4) /* 41D6D4 802A8944 A682017C */ sh $v0, 0x17c($s4)
/* 41D6D8 802A8948 080AA34A */ j .L802A8D28 /* 41D6D8 802A8948 080AA34A */ j .L802A8D28
@ -778,9 +778,9 @@ glabel btl_state_update_partner_menu
/* 41DA80 802A8CF0 00021880 */ sll $v1, $v0, 2 /* 41DA80 802A8CF0 00021880 */ sll $v1, $v0, 2
/* 41DA84 802A8CF4 00621821 */ addu $v1, $v1, $v0 /* 41DA84 802A8CF4 00621821 */ addu $v1, $v1, $v0
/* 41DA88 802A8CF8 00031880 */ sll $v1, $v1, 2 /* 41DA88 802A8CF8 00031880 */ sll $v1, $v1, 2
/* 41DA8C 802A8CFC 3C018009 */ lui $at, %hi(D_8008F064) /* 41DA8C 802A8CFC 3C018009 */ lui $at, %hi(gMoveTable + 0x4)
/* 41DA90 802A8D00 00230821 */ addu $at, $at, $v1 /* 41DA90 802A8D00 00230821 */ addu $at, $at, $v1
/* 41DA94 802A8D04 8C23F064 */ lw $v1, %lo(D_8008F064)($at) /* 41DA94 802A8D04 8C23F064 */ lw $v1, %lo(gMoveTable + 0x4)($at)
/* 41DA98 802A8D08 3C02802B */ lui $v0, %hi(D_802AD603) /* 41DA98 802A8D08 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41DA9C 802A8D0C 9042D603 */ lbu $v0, %lo(D_802AD603)($v0) /* 41DA9C 802A8D0C 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41DAA0 802A8D10 24040011 */ addiu $a0, $zero, 0x11 /* 41DAA0 802A8D10 24040011 */ addiu $a0, $zero, 0x11
@ -1285,9 +1285,9 @@ glabel btl_state_update_partner_menu
/* 41E1D8 802A9448 00431021 */ addu $v0, $v0, $v1 /* 41E1D8 802A9448 00431021 */ addu $v0, $v0, $v1
/* 41E1DC 802A944C 00021080 */ sll $v0, $v0, 2 /* 41E1DC 802A944C 00021080 */ sll $v0, $v0, 2
/* 41E1E0 802A9450 9283004B */ lbu $v1, 0x4b($s4) /* 41E1E0 802A9450 9283004B */ lbu $v1, 0x4b($s4)
/* 41E1E4 802A9454 3C058009 */ lui $a1, %hi(D_8008F064) /* 41E1E4 802A9454 3C058009 */ lui $a1, %hi(gMoveTable + 0x4)
/* 41E1E8 802A9458 00A22821 */ addu $a1, $a1, $v0 /* 41E1E8 802A9458 00A22821 */ addu $a1, $a1, $v0
/* 41E1EC 802A945C 8CA5F064 */ lw $a1, %lo(D_8008F064)($a1) /* 41E1EC 802A945C 8CA5F064 */ lw $a1, %lo(gMoveTable + 0x4)($a1)
/* 41E1F0 802A9460 3C02802B */ lui $v0, %hi(D_802AD603) /* 41E1F0 802A9460 3C02802B */ lui $v0, %hi(D_802AD603)
/* 41E1F4 802A9464 9042D603 */ lbu $v0, %lo(D_802AD603)($v0) /* 41E1F4 802A9464 9042D603 */ lbu $v0, %lo(D_802AD603)($v0)
/* 41E1F8 802A9468 00031E00 */ sll $v1, $v1, 0x18 /* 41E1F8 802A9468 00031E00 */ sll $v1, $v1, 0x18

View File

@ -297,8 +297,8 @@ glabel btl_state_update_peach_menu
/* 41ED14 802A9F84 A2420178 */ sb $v0, 0x178($s2) /* 41ED14 802A9F84 A2420178 */ sb $v0, 0x178($s2)
/* 41ED18 802A9F88 24020081 */ addiu $v0, $zero, 0x81 /* 41ED18 802A9F88 24020081 */ addiu $v0, $zero, 0x81
/* 41ED1C 802A9F8C A642017C */ sh $v0, 0x17c($s2) /* 41ED1C 802A9F8C A642017C */ sh $v0, 0x17c($s2)
/* 41ED20 802A9F90 3C038009 */ lui $v1, %hi(D_8008FA78) /* 41ED20 802A9F90 3C038009 */ lui $v1, %hi(gMoveTable+0xA18)
/* 41ED24 802A9F94 8C63FA78 */ lw $v1, %lo(D_8008FA78)($v1) /* 41ED24 802A9F94 8C63FA78 */ lw $v1, %lo(gMoveTable+0xA18)($v1)
/* 41ED28 802A9F98 2402000A */ addiu $v0, $zero, 0xa /* 41ED28 802A9F98 2402000A */ addiu $v0, $zero, 0xa
/* 41ED2C 802A9F9C A642017A */ sh $v0, 0x17a($s2) /* 41ED2C 802A9F9C A642017A */ sh $v0, 0x17a($s2)
/* 41ED30 802A9FA0 0C090464 */ jal btl_set_state /* 41ED30 802A9FA0 0C090464 */ jal btl_set_state

View File

@ -780,8 +780,8 @@ glabel btl_state_update_player_menu
/* 41B24C 802A64BC 1860002B */ blez $v1, .L802A656C /* 41B24C 802A64BC 1860002B */ blez $v1, .L802A656C
/* 41B250 802A64C0 A2D001F6 */ sb $s0, 0x1f6($s6) /* 41B250 802A64C0 A2D001F6 */ sb $s0, 0x1f6($s6)
/* 41B254 802A64C4 241E0008 */ addiu $fp, $zero, 8 /* 41B254 802A64C4 241E0008 */ addiu $fp, $zero, 8
/* 41B258 802A64C8 3C038009 */ lui $v1, %hi(D_8008F9C0) /* 41B258 802A64C8 3C038009 */ lui $v1, %hi(gMoveTable+0x960)
/* 41B25C 802A64CC 2463F9C0 */ addiu $v1, $v1, %lo(D_8008F9C0) /* 41B25C 802A64CC 2463F9C0 */ addiu $v1, $v1, %lo(gMoveTable+0x960)
/* 41B260 802A64D0 26D10002 */ addiu $s1, $s6, 2 /* 41B260 802A64D0 26D10002 */ addiu $s1, $s6, 2
.L802A64D4: .L802A64D4:
/* 41B264 802A64D4 0060902D */ daddu $s2, $v1, $zero /* 41B264 802A64D4 0060902D */ daddu $s2, $v1, $zero
@ -831,8 +831,8 @@ glabel btl_state_update_player_menu
/* 41B300 802A6570 24020001 */ addiu $v0, $zero, 1 /* 41B300 802A6570 24020001 */ addiu $v0, $zero, 1
/* 41B304 802A6574 16220024 */ bne $s1, $v0, .L802A6608 /* 41B304 802A6574 16220024 */ bne $s1, $v0, .L802A6608
/* 41B308 802A6578 02D48021 */ addu $s0, $s6, $s4 /* 41B308 802A6578 02D48021 */ addu $s0, $s6, $s4
/* 41B30C 802A657C 3C128009 */ lui $s2, %hi(D_8008FA4C) /* 41B30C 802A657C 3C128009 */ lui $s2, %hi(gMoveTable+0x9EC)
/* 41B310 802A6580 2652FA4C */ addiu $s2, $s2, %lo(D_8008FA4C) /* 41B310 802A6580 2652FA4C */ addiu $s2, $s2, %lo(gMoveTable+0x9EC)
/* 41B314 802A6584 2402007F */ addiu $v0, $zero, 0x7f /* 41B314 802A6584 2402007F */ addiu $v0, $zero, 0x7f
/* 41B318 802A6588 A20201DE */ sb $v0, 0x1de($s0) /* 41B318 802A6588 A20201DE */ sb $v0, 0x1de($s0)
/* 41B31C 802A658C 00141040 */ sll $v0, $s4, 1 /* 41B31C 802A658C 00141040 */ sll $v0, $s4, 1
@ -875,8 +875,8 @@ glabel btl_state_update_player_menu
/* 41B39C 802A660C 24020002 */ addiu $v0, $zero, 2 /* 41B39C 802A660C 24020002 */ addiu $v0, $zero, 2
/* 41B3A0 802A6610 54620027 */ bnel $v1, $v0, .L802A66B0 /* 41B3A0 802A6610 54620027 */ bnel $v1, $v0, .L802A66B0
/* 41B3A4 802A6614 A2D4020E */ sb $s4, 0x20e($s6) /* 41B3A4 802A6614 A2D4020E */ sb $s4, 0x20e($s6)
/* 41B3A8 802A6618 3C128009 */ lui $s2, %hi(D_8008FA60) /* 41B3A8 802A6618 3C128009 */ lui $s2, %hi(gMoveTable+0xA00)
/* 41B3AC 802A661C 2652FA60 */ addiu $s2, $s2, %lo(D_8008FA60) /* 41B3AC 802A661C 2652FA60 */ addiu $s2, $s2, %lo(gMoveTable+0xA00)
/* 41B3B0 802A6620 02D48021 */ addu $s0, $s6, $s4 /* 41B3B0 802A6620 02D48021 */ addu $s0, $s6, $s4
/* 41B3B4 802A6624 24020080 */ addiu $v0, $zero, 0x80 /* 41B3B4 802A6624 24020080 */ addiu $v0, $zero, 0x80
/* 41B3B8 802A6628 A20201DE */ sb $v0, 0x1de($s0) /* 41B3B8 802A6628 A20201DE */ sb $v0, 0x1de($s0)
@ -1222,9 +1222,9 @@ glabel btl_state_update_player_menu
/* 41B88C 802A6AFC 00031080 */ sll $v0, $v1, 2 /* 41B88C 802A6AFC 00031080 */ sll $v0, $v1, 2
/* 41B890 802A6B00 00431021 */ addu $v0, $v0, $v1 /* 41B890 802A6B00 00431021 */ addu $v0, $v0, $v1
/* 41B894 802A6B04 00021080 */ sll $v0, $v0, 2 /* 41B894 802A6B04 00021080 */ sll $v0, $v0, 2
/* 41B898 802A6B08 3C018009 */ lui $at, %hi(D_8008F064) /* 41B898 802A6B08 3C018009 */ lui $at, %hi(gMoveTable + 0x4)
/* 41B89C 802A6B0C 00220821 */ addu $at, $at, $v0 /* 41B89C 802A6B0C 00220821 */ addu $at, $at, $v0
/* 41B8A0 802A6B10 8C22F064 */ lw $v0, %lo(D_8008F064)($at) /* 41B8A0 802A6B10 8C22F064 */ lw $v0, %lo(gMoveTable + 0x4)($at)
/* 41B8A4 802A6B14 AEC20184 */ sw $v0, 0x184($s6) /* 41B8A4 802A6B14 AEC20184 */ sw $v0, 0x184($s6)
/* 41B8A8 802A6B18 24020001 */ addiu $v0, $zero, 1 /* 41B8A8 802A6B18 24020001 */ addiu $v0, $zero, 1
/* 41B8AC 802A6B1C 1202000E */ beq $s0, $v0, .L802A6B58 /* 41B8AC 802A6B1C 1202000E */ beq $s0, $v0, .L802A6B58
@ -1381,9 +1381,9 @@ glabel btl_state_update_player_menu
/* 41BABC 802A6D2C 00021880 */ sll $v1, $v0, 2 /* 41BABC 802A6D2C 00021880 */ sll $v1, $v0, 2
/* 41BAC0 802A6D30 00621821 */ addu $v1, $v1, $v0 /* 41BAC0 802A6D30 00621821 */ addu $v1, $v1, $v0
/* 41BAC4 802A6D34 00031880 */ sll $v1, $v1, 2 /* 41BAC4 802A6D34 00031880 */ sll $v1, $v1, 2
/* 41BAC8 802A6D38 3C028009 */ lui $v0, %hi(D_8008F064) /* 41BAC8 802A6D38 3C028009 */ lui $v0, %hi(gMoveTable + 0x4)
/* 41BACC 802A6D3C 00431021 */ addu $v0, $v0, $v1 /* 41BACC 802A6D3C 00431021 */ addu $v0, $v0, $v1
/* 41BAD0 802A6D40 8C42F064 */ lw $v0, %lo(D_8008F064)($v0) /* 41BAD0 802A6D40 8C42F064 */ lw $v0, %lo(gMoveTable + 0x4)($v0)
/* 41BAD4 802A6D44 24040011 */ addiu $a0, $zero, 0x11 /* 41BAD4 802A6D44 24040011 */ addiu $a0, $zero, 0x11
/* 41BAD8 802A6D48 0C090464 */ jal btl_set_state /* 41BAD8 802A6D48 0C090464 */ jal btl_set_state
/* 41BADC 802A6D4C AEC20184 */ sw $v0, 0x184($s6) /* 41BADC 802A6D4C AEC20184 */ sw $v0, 0x184($s6)
@ -1969,9 +1969,9 @@ glabel btl_state_update_player_menu
/* 41C334 802A75A4 00431021 */ addu $v0, $v0, $v1 /* 41C334 802A75A4 00431021 */ addu $v0, $v0, $v1
/* 41C338 802A75A8 00021080 */ sll $v0, $v0, 2 /* 41C338 802A75A8 00021080 */ sll $v0, $v0, 2
/* 41C33C 802A75AC 92C30049 */ lbu $v1, 0x49($s6) /* 41C33C 802A75AC 92C30049 */ lbu $v1, 0x49($s6)
/* 41C340 802A75B0 3C018009 */ lui $at, %hi(D_8008F064) /* 41C340 802A75B0 3C018009 */ lui $at, %hi(gMoveTable + 0x4)
/* 41C344 802A75B4 00220821 */ addu $at, $at, $v0 /* 41C344 802A75B4 00220821 */ addu $at, $at, $v0
/* 41C348 802A75B8 8C22F064 */ lw $v0, %lo(D_8008F064)($at) /* 41C348 802A75B8 8C22F064 */ lw $v0, %lo(gMoveTable + 0x4)($at)
/* 41C34C 802A75BC 00031E00 */ sll $v1, $v1, 0x18 /* 41C34C 802A75BC 00031E00 */ sll $v1, $v1, 0x18
/* 41C350 802A75C0 00032603 */ sra $a0, $v1, 0x18 /* 41C350 802A75C0 00032603 */ sra $a0, $v1, 0x18
/* 41C354 802A75C4 A6C4017A */ sh $a0, 0x17a($s6) /* 41C354 802A75C4 A6C4017A */ sh $a0, 0x17a($s6)
@ -2211,8 +2211,8 @@ glabel btl_state_update_player_menu
/* 41C69C 802A790C 82A20000 */ lb $v0, ($s5) /* 41C69C 802A790C 82A20000 */ lb $v0, ($s5)
/* 41C6A0 802A7910 04400008 */ bltz $v0, .L802A7934 /* 41C6A0 802A7910 04400008 */ bltz $v0, .L802A7934
/* 41C6A4 802A7914 02E0202D */ daddu $a0, $s7, $zero /* 41C6A4 802A7914 02E0202D */ daddu $a0, $s7, $zero
/* 41C6A8 802A7918 3C028009 */ lui $v0, %hi(D_8008F2BC) /* 41C6A8 802A7918 3C028009 */ lui $v0, %hi(gMoveTable+0x25C)
/* 41C6AC 802A791C 8C42F2BC */ lw $v0, %lo(D_8008F2BC)($v0) /* 41C6AC 802A791C 8C42F2BC */ lw $v0, %lo(gMoveTable+0x25C)($v0)
/* 41C6B0 802A7920 0C098C0B */ jal player_create_target_list /* 41C6B0 802A7920 0C098C0B */ jal player_create_target_list
/* 41C6B4 802A7924 AEC20184 */ sw $v0, 0x184($s6) /* 41C6B4 802A7924 AEC20184 */ sw $v0, 0x184($s6)
/* 41C6B8 802A7928 82F1040C */ lb $s1, 0x40c($s7) /* 41C6B8 802A7928 82F1040C */ lb $s1, 0x40c($s7)
@ -2224,8 +2224,8 @@ glabel btl_state_update_player_menu
/* 41C6C8 802A7938 82A20001 */ lb $v0, 1($s5) /* 41C6C8 802A7938 82A20001 */ lb $v0, 1($s5)
/* 41C6CC 802A793C 04400008 */ bltz $v0, .L802A7960 /* 41C6CC 802A793C 04400008 */ bltz $v0, .L802A7960
/* 41C6D0 802A7940 02E0202D */ daddu $a0, $s7, $zero /* 41C6D0 802A7940 02E0202D */ daddu $a0, $s7, $zero
/* 41C6D4 802A7944 3C028009 */ lui $v0, %hi(D_8008F0F0) /* 41C6D4 802A7944 3C028009 */ lui $v0, %hi(gMoveTable+0x90)
/* 41C6D8 802A7948 8C42F0F0 */ lw $v0, %lo(D_8008F0F0)($v0) /* 41C6D8 802A7948 8C42F0F0 */ lw $v0, %lo(gMoveTable+0x90)($v0)
/* 41C6DC 802A794C 0C098C0B */ jal player_create_target_list /* 41C6DC 802A794C 0C098C0B */ jal player_create_target_list
/* 41C6E0 802A7950 AEC20184 */ sw $v0, 0x184($s6) /* 41C6E0 802A7950 AEC20184 */ sw $v0, 0x184($s6)
/* 41C6E4 802A7954 82E2040C */ lb $v0, 0x40c($s7) /* 41C6E4 802A7954 82E2040C */ lb $v0, 0x40c($s7)
@ -2261,8 +2261,8 @@ glabel btl_state_update_player_menu
/* 41C748 802A79B8 2403001E */ addiu $v1, $zero, 0x1e /* 41C748 802A79B8 2403001E */ addiu $v1, $zero, 0x1e
/* 41C74C 802A79BC A6C3017C */ sh $v1, 0x17c($s6) /* 41C74C 802A79BC A6C3017C */ sh $v1, 0x17c($s6)
/* 41C750 802A79C0 A2C00178 */ sb $zero, 0x178($s6) /* 41C750 802A79C0 A2C00178 */ sb $zero, 0x178($s6)
/* 41C754 802A79C4 3C038009 */ lui $v1, %hi(D_8008F2BC) /* 41C754 802A79C4 3C038009 */ lui $v1, %hi(gMoveTable+0x25C)
/* 41C758 802A79C8 8C63F2BC */ lw $v1, %lo(D_8008F2BC)($v1) /* 41C758 802A79C8 8C63F2BC */ lw $v1, %lo(gMoveTable+0x25C)($v1)
/* 41C75C 802A79CC 00021600 */ sll $v0, $v0, 0x18 /* 41C75C 802A79CC 00021600 */ sll $v0, $v0, 0x18
/* 41C760 802A79D0 00021603 */ sra $v0, $v0, 0x18 /* 41C760 802A79D0 00021603 */ sra $v0, $v0, 0x18
/* 41C764 802A79D4 AEC30184 */ sw $v1, 0x184($s6) /* 41C764 802A79D4 AEC30184 */ sw $v1, 0x184($s6)
@ -2274,8 +2274,8 @@ glabel btl_state_update_player_menu
/* 41C778 802A79E8 92A30001 */ lbu $v1, 1($s5) /* 41C778 802A79E8 92A30001 */ lbu $v1, 1($s5)
/* 41C77C 802A79EC 24020001 */ addiu $v0, $zero, 1 /* 41C77C 802A79EC 24020001 */ addiu $v0, $zero, 1
/* 41C780 802A79F0 A2C20178 */ sb $v0, 0x178($s6) /* 41C780 802A79F0 A2C20178 */ sb $v0, 0x178($s6)
/* 41C784 802A79F4 3C028009 */ lui $v0, %hi(D_8008F0F0) /* 41C784 802A79F4 3C028009 */ lui $v0, %hi(gMoveTable+0x90)
/* 41C788 802A79F8 8C42F0F0 */ lw $v0, %lo(D_8008F0F0)($v0) /* 41C788 802A79F8 8C42F0F0 */ lw $v0, %lo(gMoveTable+0x90)($v0)
/* 41C78C 802A79FC 00031E00 */ sll $v1, $v1, 0x18 /* 41C78C 802A79FC 00031E00 */ sll $v1, $v1, 0x18
/* 41C790 802A7A00 00031E03 */ sra $v1, $v1, 0x18 /* 41C790 802A7A00 00031E03 */ sra $v1, $v1, 0x18
/* 41C794 802A7A04 AEC20184 */ sw $v0, 0x184($s6) /* 41C794 802A7A04 AEC20184 */ sw $v0, 0x184($s6)

View File

@ -74,9 +74,9 @@ glabel btl_state_update_select_target
/* 41F518 802AA788 00031080 */ sll $v0, $v1, 2 /* 41F518 802AA788 00031080 */ sll $v0, $v1, 2
/* 41F51C 802AA78C 00431021 */ addu $v0, $v0, $v1 /* 41F51C 802AA78C 00431021 */ addu $v0, $v0, $v1
/* 41F520 802AA790 00021080 */ sll $v0, $v0, 2 /* 41F520 802AA790 00021080 */ sll $v0, $v0, 2
/* 41F524 802AA794 3C048009 */ lui $a0, %hi(D_8008F073) /* 41F524 802AA794 3C048009 */ lui $a0, %hi(gMoveTable+0x13)
/* 41F528 802AA798 00822021 */ addu $a0, $a0, $v0 /* 41F528 802AA798 00822021 */ addu $a0, $a0, $v0
/* 41F52C 802AA79C 8084F073 */ lb $a0, %lo(D_8008F073)($a0) /* 41F52C 802AA79C 8084F073 */ lb $a0, %lo(gMoveTable+0x13)($a0)
/* 41F530 802AA7A0 04800003 */ bltz $a0, .L802AA7B0 /* 41F530 802AA7A0 04800003 */ bltz $a0, .L802AA7B0
/* 41F534 802AA7A4 2484002E */ addiu $a0, $a0, 0x2e /* 41F534 802AA7A4 2484002E */ addiu $a0, $a0, 0x2e
/* 41F538 802AA7A8 0C093E58 */ jal btl_show_battle_message /* 41F538 802AA7A8 0C093E58 */ jal btl_show_battle_message

View File

@ -331,8 +331,8 @@ glabel btl_state_update_twink_menu
/* 41F2F4 802AA564 A642006E */ sh $v0, 0x6e($s2) /* 41F2F4 802AA564 A642006E */ sh $v0, 0x6e($s2)
/* 41F2F8 802AA568 24020008 */ addiu $v0, $zero, 8 /* 41F2F8 802AA568 24020008 */ addiu $v0, $zero, 8
/* 41F2FC 802AA56C A2420178 */ sb $v0, 0x178($s2) /* 41F2FC 802AA56C A2420178 */ sb $v0, 0x178($s2)
/* 41F300 802AA570 3C038009 */ lui $v1, %hi(D_8008FA8C) /* 41F300 802AA570 3C038009 */ lui $v1, %hi(gMoveTable+0xA2C)
/* 41F304 802AA574 8C63FA8C */ lw $v1, %lo(D_8008FA8C)($v1) /* 41F304 802AA574 8C63FA8C */ lw $v1, %lo(gMoveTable+0xA2C)($v1)
/* 41F308 802AA578 24020082 */ addiu $v0, $zero, 0x82 /* 41F308 802AA578 24020082 */ addiu $v0, $zero, 0x82
/* 41F30C 802AA57C A642017C */ sh $v0, 0x17c($s2) /* 41F30C 802AA57C A642017C */ sh $v0, 0x17c($s2)
/* 41F310 802AA580 A640017A */ sh $zero, 0x17a($s2) /* 41F310 802AA580 A640017A */ sh $zero, 0x17a($s2)

View File

@ -136,9 +136,9 @@ glabel func_80240AD0_A39FB0
/* A3A1A0 80240CC0 00031080 */ sll $v0, $v1, 2 /* A3A1A0 80240CC0 00031080 */ sll $v0, $v1, 2
/* A3A1A4 80240CC4 00431021 */ addu $v0, $v0, $v1 /* A3A1A4 80240CC4 00431021 */ addu $v0, $v0, $v1
/* A3A1A8 80240CC8 00021080 */ sll $v0, $v0, 2 /* A3A1A8 80240CC8 00021080 */ sll $v0, $v0, 2
/* A3A1AC 80240CCC 3C018009 */ lui $at, %hi(D_8008F072) /* A3A1AC 80240CCC 3C018009 */ lui $at, %hi(gMoveTable+0x12)
/* A3A1B0 80240CD0 00220821 */ addu $at, $at, $v0 /* A3A1B0 80240CD0 00220821 */ addu $at, $at, $v0
/* A3A1B4 80240CD4 8022F072 */ lb $v0, %lo(D_8008F072)($at) /* A3A1B4 80240CD4 8022F072 */ lb $v0, %lo(gMoveTable+0x12)($at)
/* A3A1B8 80240CD8 0809033A */ j .L80240CE8 /* A3A1B8 80240CD8 0809033A */ j .L80240CE8
/* A3A1BC 80240CDC AE620098 */ sw $v0, 0x98($s3) /* A3A1BC 80240CDC AE620098 */ sw $v0, 0x98($s3)
.L80240CE0: .L80240CE0:

View File

@ -320,7 +320,7 @@ segments:
- [0x542E0, data] - [0x542E0, data]
- [0x5A3E0, .data, 341d0] - [0x5A3E0, .data, 341d0]
- [0x5A610, .data, effects] - [0x5A610, .data, effects]
- [0x5B320, data] - [0x5B320, .data, 5B320]
- [0x6B360, .data, world/world] - [0x6B360, .data, world/world]
- [0x6EAC0, data] # has scripts - [0x6EAC0, data] # has scripts
- [0x6F0E0, .data, os/nusys/nuContRmbMgr] - [0x6F0E0, .data, os/nusys/nuContRmbMgr]

View File

@ -14178,7 +14178,7 @@ dro_01_GetNpcCollisionHeight = 0x80242504; // type:func rom:0x95D704
dro_01_AddPlayerHandsOffset = 0x80242560; // type:func rom:0x95D760 dro_01_AddPlayerHandsOffset = 0x80242560; // type:func rom:0x95D760
dro_01_func_80242730_95D930 = 0x80242730; // type:func rom:0x95D930 dro_01_func_80242730_95D930 = 0x80242730; // type:func rom:0x95D930
dro_01_func_80242784_95D984 = 0x80242784; // type:func rom:0x95D984 dro_01_func_80242784_95D984 = 0x80242784; // type:func rom:0x95D984
dro_01_BigArrayFunc = 0x802427BC; // type:func rom:0x95D9BC dro_01_BuildKeyItemChoiceList = 0x802427BC; // type:func rom:0x95D9BC
dro_01_func_80242858_95DA58 = 0x80242858; // type:func rom:0x95DA58 dro_01_func_80242858_95DA58 = 0x80242858; // type:func rom:0x95DA58
dro_01_LetterDelivery_Init = 0x80242D98; // type:func rom:0x95DF98 dro_01_LetterDelivery_Init = 0x80242D98; // type:func rom:0x95DF98
dro_01_LetterDelivery_CalcLetterPos = 0x80242E88; // type:func rom:0x95E088 dro_01_LetterDelivery_CalcLetterPos = 0x80242E88; // type:func rom:0x95E088
@ -18827,9 +18827,9 @@ dgb_06_exitSingleDoor_802403C0 = 0x802403C0; // type:data rom:0xC3D440
dgb_06_enterSingleDoor_80240474 = 0x80240474; // type:data rom:0xC3D4F4 dgb_06_enterSingleDoor_80240474 = 0x80240474; // type:data rom:0xC3D4F4
dgb_06_main = 0x802404F0; // type:data rom:0xC3D570 dgb_06_main = 0x802404F0; // type:data rom:0xC3D570
dgb_06_D_80240620_C3D6A0 = 0x80240620; // type:data rom:0xC3D6A0 dgb_06_D_80240620_C3D6A0 = 0x80240620; // type:data rom:0xC3D6A0
dgb_06_80240624 = 0x80240624; // type:data rom:0xC3D6A4 dgb_06_EVS_Chest_ShowGotItem = 0x80240624; // type:data rom:0xC3D6A4
dgb_06_8024068C = 0x8024068C; // type:data rom:0xC3D70C dgb_06_EVS_Chest_GetItem = 0x8024068C; // type:data rom:0xC3D70C
dgb_06_8024076C = 0x8024076C; // type:data rom:0xC3D7EC dgb_06_EVS_Chest_Interact = 0x8024076C; // type:data rom:0xC3D7EC
dgb_06_makeEntities = 0x802407B8; // type:data rom:0xC3D838 dgb_06_makeEntities = 0x802407B8; // type:data rom:0xC3D838
dgb_06_npcSettings_80240840 = 0x80240840; // type:data rom:0xC3D8C0 dgb_06_npcSettings_80240840 = 0x80240840; // type:data rom:0xC3D8C0
dgb_06_interact_8024086C = 0x8024086C; // type:data rom:0xC3D8EC dgb_06_interact_8024086C = 0x8024086C; // type:data rom:0xC3D8EC
@ -19105,9 +19105,9 @@ dgb_12_main = 0x802404E0; // type:data rom:0xC4E3D0
dgb_12_lavaResetList_802405C0 = 0x802405C0; // type:data rom:0xC4E4B0 dgb_12_lavaResetList_802405C0 = 0x802405C0; // type:data rom:0xC4E4B0
dgb_12_802405E0 = 0x802405E0; // type:data rom:0xC4E4D0 dgb_12_802405E0 = 0x802405E0; // type:data rom:0xC4E4D0
dgb_12_D_80240870_C4E760 = 0x80240870; // type:data rom:0xC4E760 dgb_12_D_80240870_C4E760 = 0x80240870; // type:data rom:0xC4E760
dgb_12_80240874 = 0x80240874; // type:data rom:0xC4E764 dgb_06_EVS_ShowGotItem = 0x80240874; // type:data rom:0xC4E764
dgb_12_802408DC = 0x802408DC; // type:data rom:0xC4E7CC dgb_06_EVS_GetItem = 0x802408DC; // type:data rom:0xC4E7CC
dgb_12_802409BC = 0x802409BC; // type:data rom:0xC4E8AC dgb_06_EVS_Chest_Interact = 0x802409BC; // type:data rom:0xC4E8AC
dgb_12_makeEntities = 0x80240A08; // type:data rom:0xC4E8F8 dgb_12_makeEntities = 0x80240A08; // type:data rom:0xC4E8F8
dgb_13_entryList = 0x80240000; // type:data rom:0xC4E960 dgb_13_entryList = 0x80240000; // type:data rom:0xC4E960
dgb_13_config = 0x80240010; // type:data rom:0xC4E970 dgb_13_config = 0x80240010; // type:data rom:0xC4E970
@ -23328,24 +23328,6 @@ D_8008EEF0 = 0x8008EEF0; // type:data
gPartnerPopupProperties = 0x8008EF20; // type:data gPartnerPopupProperties = 0x8008EF20; // type:data
gPartnerIconHudScripts = 0x8008EFF8; // type:data gPartnerIconHudScripts = 0x8008EFF8; // type:data
gMoveTable = 0x8008F060; // type:data gMoveTable = 0x8008F060; // type:data
D_8008F064 = 0x8008F064; // type:data
D_8008F06C = 0x8008F06C; // type:data
D_8008F071 = 0x8008F071; // type:data
D_8008F072 = 0x8008F072; // type:data
D_8008F073 = 0x8008F073; // type:data
D_8008F0A0 = 0x8008F0A0; // type:data
D_8008F0DC = 0x8008F0DC; // type:data
D_8008F0F0 = 0x8008F0F0; // type:data
D_8008F2A8 = 0x8008F2A8; // type:data
D_8008F2BC = 0x8008F2BC; // type:data
D_8008F2E4 = 0x8008F2E4; // type:data
D_8008F9B0 = 0x8008F9B0; // type:data
D_8008F9C0 = 0x8008F9C0; // type:data
D_8008FA4C = 0x8008FA4C; // type:data
D_8008FA60 = 0x8008FA60; // type:data
D_8008FA78 = 0x8008FA78; // type:data
D_8008FA8C = 0x8008FA8C; // type:data
D_8008FC44 = 0x8008FC44; // type:data
gMessageBoxFrameParts = 0x8008FEE0; // type:data gMessageBoxFrameParts = 0x8008FEE0; // type:data
rdpstateinit_dl = 0x80093BB8; // type:data rdpstateinit_dl = 0x80093BB8; // type:data
hdwrBugFlag.2 = 0x80093DA0; // type:data hdwrBugFlag.2 = 0x80093DA0; // type:data
@ -23749,7 +23731,7 @@ arn_09_pad_4CC = 0x802404CC; // type:data
flo_22_pad_518 = 0x80240518; // type:data flo_22_pad_518 = 0x80240518; // type:data
dgb_11_pad_56C = 0x8024056C; // type:data dgb_11_pad_56C = 0x8024056C; // type:data
arn_09_pad_5A8 = 0x802405A8; // type:data arn_09_pad_5A8 = 0x802405A8; // type:data
dgb_06_varStash = 0x80240620; // type:data dgb_06_Chest_VarStash = 0x80240620; // type:data
varTable.2 = 0x80240620; // type:data varTable.2 = 0x80240620; // type:data
dgb_10_pad_66C = 0x8024066C; // type:data dgb_10_pad_66C = 0x8024066C; // type:data
arn_11_pad_674 = 0x80240674; // type:data arn_11_pad_674 = 0x80240674; // type:data
@ -24125,8 +24107,7 @@ dro_01_Quizmo_AudienceEffect = 0x8024DFE4; // type:data
D_8024DFE8 = 0x8024DFE8; // type:data D_8024DFE8 = 0x8024DFE8; // type:data
dro_01_Quizmo_VannaTEffect = 0x8024DFE8; // type:data dro_01_Quizmo_VannaTEffect = 0x8024DFE8; // type:data
dro_01_pad_D_8024DFEC = 0x8024DFEC; // type:data dro_01_pad_D_8024DFEC = 0x8024DFEC; // type:data
bigArray = 0x8024DFF0; // type:data dro_01_KeyItemChoiceList = 0x8024DFF0; // type:data
dro_01_bigArray = 0x8024DFF0; // type:data
dro_01_pad_D_8024E1B0 = 0x8024E1B0; // type:data dro_01_pad_D_8024E1B0 = 0x8024E1B0; // type:data
D_8024E1B4 = 0x8024E1B4; // type:data D_8024E1B4 = 0x8024E1B4; // type:data
dro_01_LetterDelivery_SavedNpcAnim = 0x8024E1B4; // type:data dro_01_LetterDelivery_SavedNpcAnim = 0x8024E1B4; // type:data

View File

@ -665,7 +665,6 @@ D_8024DFD8 = 0x8024DFD8;
D_8024DFE0 = 0x8024DFE0; D_8024DFE0 = 0x8024DFE0;
D_8024DFE4 = 0x8024DFE4; D_8024DFE4 = 0x8024DFE4;
D_8024DFE8 = 0x8024DFE8; D_8024DFE8 = 0x8024DFE8;
dro_01_bigArray = 0x8024DFF0;
D_8024E1B4 = 0x8024E1B4; D_8024E1B4 = 0x8024E1B4;
mac_02_Quizmo_Worker = 0x8024E540; mac_02_Quizmo_Worker = 0x8024E540;
mac_02_Quizmo_AnswerResult = 0x8024E558; mac_02_Quizmo_AnswerResult = 0x8024E558;