mirror of https://github.com/pmret/papermario.git
Compare commits
3 Commits
91545154da
...
9139927870
Author | SHA1 | Date |
---|---|---|
![]() |
9139927870 | |
![]() |
fbee9d1461 | |
![]() |
09ed9135aa |
|
@ -435,6 +435,7 @@ typedef struct Evt {
|
|||
/* */ s32 functionTemp[4];
|
||||
/* */ f32 functionTempF[4];
|
||||
/* */ void* functionTempPtr[4];
|
||||
/* */ bool functionTempBool[4];
|
||||
/* */ };
|
||||
/* 0x080 */ ApiFunc callFunction;
|
||||
/* 0x084 */ union {
|
||||
|
@ -1263,7 +1264,7 @@ typedef struct MessagePrintState {
|
|||
/* 0x4FC */ s32 stateFlags;
|
||||
/* 0x500 */ s16 delayFlags; // ?
|
||||
/* 0x502 */ char unk_502[0x2];
|
||||
/* 0x504 */ s32* closedWritebackBool; // if not null, writes 1 here when message closes
|
||||
/* 0x504 */ bool* closedWritebackBool; // if not null, writes 1 here when message closes
|
||||
/* 0x508 */ u8 style;
|
||||
/* 0x509 */ u8 fadeInCounter;
|
||||
/* 0x50A */ Vec2s initOpenPos; // where the message originates from, in screen-space coords
|
||||
|
|
|
@ -49,7 +49,7 @@ Shadow* get_shadow_by_index(s32 index);
|
|||
s32 get_time_freeze_mode(void);
|
||||
void render_player_model(void);
|
||||
s16 get_game_mode(void);
|
||||
s32 is_picking_up_item(void);
|
||||
bool is_picking_up_item(void);
|
||||
|
||||
f32 integrate_gravity(void);
|
||||
void gravity_use_fall_parms(void);
|
||||
|
@ -145,7 +145,7 @@ f32 player_check_collision_below(f32, s32* colliderID);
|
|||
bool can_trigger_loading_zone(void);
|
||||
void update_damage_popups(void);
|
||||
void show_action_rating(s32, Actor*, f32, f32, f32);
|
||||
s32 render_with_adjusted_palettes(s32, ActorPart*, s32, Matrix4f, s32);
|
||||
s32 render_with_adjusted_palettes(bool isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation);
|
||||
|
||||
HeapNode* general_heap_create(void);
|
||||
void* general_heap_malloc(s32 size);
|
||||
|
@ -188,7 +188,7 @@ void entity_HugeBlueSwitch_init(Entity* entity);
|
|||
s32 dispatch_damage_event_actor_0(Actor* actor, s32 damageAmount, s32 event);
|
||||
|
||||
// Text
|
||||
MessagePrintState* msg_get_printer_for_msg(s32 msgID, s32* a1);
|
||||
MessagePrintState* msg_get_printer_for_msg(s32 msgID, bool* donePrintingWriteback);
|
||||
s32 msg_printer_load_msg(s32 msgID, MessagePrintState* printer);
|
||||
void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s32 x, s32 y);
|
||||
|
||||
|
@ -629,7 +629,7 @@ void exec_entity_commandlist(Entity* entity);
|
|||
void show_start_recovery_shimmer(f32 x, f32 y, f32 z, s32 arg3);
|
||||
void show_recovery_shimmer(f32 x, f32 y, f32 z, s32 arg3);
|
||||
|
||||
void show_next_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32);
|
||||
void show_next_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32 angle);
|
||||
void add_xz_vec3f(Vec3f* vector, f32 speed, f32 angleDeg);
|
||||
void add_xz_vec3f_copy1(Vec3f* vector, f32 speed, f32 angleDeg);
|
||||
void add_xz_vec3f_copy2(Vec3f* vector, f32 speed, f32 angleDeg);
|
||||
|
@ -831,7 +831,7 @@ void partner_init_after_battle(s32 arg0);
|
|||
void load_map_script_lib(void);
|
||||
void remove_item_entity_by_index(s32 index);
|
||||
void set_entity_commandlist(Entity* entity, s32* entityScript);
|
||||
s32 is_player_dismounted(void);
|
||||
bool is_player_dismounted(void);
|
||||
void func_800EF300(void);
|
||||
void func_800EF314(void);
|
||||
void func_800EF43C(void);
|
||||
|
@ -947,13 +947,13 @@ void set_message_int_var(s32 value, s32 index);
|
|||
s32 store_item(s32 itemID);
|
||||
void open_status_bar_quickly(void);
|
||||
void show_immune_bonk(f32 x, f32 y, f32 z, s32, s32, s32);
|
||||
void show_primary_damage_popup(f32 x, f32 y, f32 z, s32 attack, s32 a);
|
||||
void show_primary_damage_popup(f32 x, f32 y, f32 z, s32 attack, s32 angle);
|
||||
s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion);
|
||||
void disable_actor_blur(Actor*);
|
||||
void reset_actor_blur(Actor*);
|
||||
void enable_actor_blur(Actor*);
|
||||
void apply_shock_effect(Actor*);
|
||||
void part_glow_off(s32, ActorPart*, s32 yaw, bool arg3);
|
||||
void part_glow_off(bool isNpcSprite, ActorPart* part, s32 yaw, bool isReflection);
|
||||
void part_flash_off(bool isNpcSprite, ActorPart* part, s32 yaw, bool isReflection);
|
||||
void part_flash_on(bool isNpcSprite, ActorPart* part, s32 yaw, bool isReflection);
|
||||
void _add_part_decoration(ActorPart*);
|
||||
|
|
|
@ -538,13 +538,11 @@ typedef s32 Difficulty2D[AC_DIFFICULTY_LEN][2];
|
|||
|
||||
#define DMA_COPY_SEGMENT(segment) dma_copy(segment##_ROM_START, segment##_ROM_END, segment##_VRAM)
|
||||
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 202311L
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
#if __STDC_VERSION__ < 202311L
|
||||
typedef enum {
|
||||
false,
|
||||
true
|
||||
} bool;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -518,7 +518,7 @@ s32 npc_render_with_watt_idle_palettes(Npc*, s32, Matrix4f mtx);
|
|||
|
||||
u16 npc_blend_palette_colors(u16 colorA, u16 colorB, s32 lerpAlpha);
|
||||
|
||||
s32 npc_render_with_single_pal_blending(Npc*, s32, s32, Matrix4f mtx);
|
||||
s32 npc_render_with_single_pal_blending(Npc* npc, s32 yaw, bool hasDifferentIntervals, Matrix4f mtx);
|
||||
|
||||
s32 npc_render_with_double_pal_blending(Npc*, s32, Matrix4f mtx);
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ BSS s8 PopupDipMode;
|
|||
BSS s8 PopupMenu_WasStatusBarIgnoringChanges;
|
||||
BSS PopupMenu* gPopupMenu;
|
||||
BSS MessagePrintState* D_8010D6A0;
|
||||
BSS s32 D_8010D6A4;
|
||||
BSS bool D_8010D6A4;
|
||||
|
||||
s8 status_bar_is_ignoring_changes(void);
|
||||
|
||||
|
@ -1317,7 +1317,7 @@ s32 popup_menu_update(void) {
|
|||
gPopupState = POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE;
|
||||
break;
|
||||
case POPUP_STATE_CANCEL_DIP_AWAIT_CHOICE:
|
||||
if (D_8010D6A4 == 1) {
|
||||
if (D_8010D6A4 == true) {
|
||||
set_window_update(WIN_POPUP_PROMPT, WINDOW_UPDATE_HIDE);
|
||||
switch (D_8010D6A0->curOption) {
|
||||
case 0:
|
||||
|
|
|
@ -4,7 +4,7 @@ BSS char D_8029F660[0x400]; // unused?
|
|||
|
||||
BSS MessagePrintState* gSpeakingActorPrintCtx;
|
||||
BSS MessagePrintState* D_8029FA64;
|
||||
BSS s32 gSpeakingActorPrintIsDone; // unk_08
|
||||
BSS bool gSpeakingActorPrintIsDone; // unk_08
|
||||
BSS s32 gSpeakingActorTalkAnim;
|
||||
BSS s32 gSpeakingActorIdleAnim;
|
||||
BSS Actor* gSpeakingActor;
|
||||
|
@ -277,11 +277,11 @@ API_CALLABLE(ShowBattleChoice) {
|
|||
if (isInitialCall) {
|
||||
s32 msgID = evt_get_variable(script, *args);
|
||||
|
||||
script->functionTemp[1] = 0;
|
||||
D_8029FA64 = msg_get_printer_for_msg(msgID, &script->functionTemp[1]);
|
||||
script->functionTempBool[1] = false;
|
||||
D_8029FA64 = msg_get_printer_for_msg(msgID, &script->functionTempBool[1]);
|
||||
}
|
||||
|
||||
if (script->functionTemp[1] == 1) {
|
||||
if (script->functionTempBool[1] == true) {
|
||||
u8 currentOption = D_8029FA64->curOption;
|
||||
|
||||
gSpeakingActorPrintCtx->curOption = D_8029FA64->curOption;
|
||||
|
|
|
@ -2340,7 +2340,8 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
|
|||
}
|
||||
|
||||
// refresh the first (primary) damage popup
|
||||
void show_primary_damage_popup(f32 posX, f32 posY, f32 posZ, s32 damageAmt, bool angle) {
|
||||
// TODO: make last parameter an enum
|
||||
void show_primary_damage_popup(f32 posX, f32 posY, f32 posZ, s32 damageAmt, s32 angle) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 1; i++) {
|
||||
|
@ -2366,7 +2367,8 @@ void show_primary_damage_popup(f32 posX, f32 posY, f32 posZ, s32 damageAmt, bool
|
|||
}
|
||||
|
||||
// show another damage popup, if any are available
|
||||
void show_next_damage_popup(f32 posX, f32 posY, f32 posZ, s32 damageAmt, bool angle) {
|
||||
// TODO: make last parameter an enum
|
||||
void show_next_damage_popup(f32 posX, f32 posY, f32 posZ, s32 damageAmt, s32 angle) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gDamageCountEffects); i++) {
|
||||
|
|
|
@ -104,7 +104,7 @@ u8 WattAttackPalettesAnim[] = {
|
|||
s16 SparkleSpawnIntervals[] = { -1, 15, 10, 7, 5, 3, 2, 1 };
|
||||
|
||||
void update_player_actor_shadow(void);
|
||||
void appendGfx_npc_actor(s32 isPartner, s32 actorIndex);
|
||||
void appendGfx_npc_actor(bool isPartner, s32 actorIndex);
|
||||
|
||||
void create_status_chill_out(s32 iconID);
|
||||
void enable_status_static(s32 iconID);
|
||||
|
@ -153,8 +153,8 @@ void render_with_paralyze_palettes(bool arg0, ActorPart* part, s32 yaw, Matrix4f
|
|||
void render_with_berserk_palettes(bool arg0, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation);
|
||||
void render_with_watt_idle_palettes(bool arg0, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation);
|
||||
void render_with_watt_attack_palettes(bool arg0, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation);
|
||||
void render_with_player_debuff_palettes(bool arg0, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation, s32 isPoison);
|
||||
void render_with_pal_blending(bool arg0, ActorPart* part, s32 yaw, s32 arg3, Matrix4f mtx, s32 skipAnimation);
|
||||
void render_with_player_debuff_palettes(bool isNpcSprite, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation, bool isPoison);
|
||||
void render_with_pal_blending(bool isNpcSprite, ActorPart* part, s32 yaw, bool hasDifferentIntervals, Matrix4f mtx, bool skipAnimation);
|
||||
void render_with_palset_blending(bool arg0, ActorPart* part, s32 yaw, Matrix4f mtx, bool skipAnimation);
|
||||
s32 update_part_glow(bool isNpcSprite, ActorPart* part, s32 yaw, bool isReflection);
|
||||
s32 update_part_flash(bool isNpcSprite, ActorPart* part, s32 yaw, bool isReflection);
|
||||
|
|
|
@ -271,7 +271,7 @@ ActorBlueprint NAMESPACE = {
|
|||
#define CHOMP_CHAIN_FIRST_PART_IDX PRT_CHAIN_1
|
||||
#define CHOMP_CHAIN_LAST_PART_IDX PRT_CHAIN_8
|
||||
#define CHOMP_CHAIN_AVAR_SOUNDS AVAR_EnableChainSounds
|
||||
#define CHOMP_CHAIN_UPDATE_Z true
|
||||
#define CHOMP_CHAIN_UPDATE_Z TRUE
|
||||
#include "common/battle/ChompChainSupport.inc.c"
|
||||
|
||||
API_CALLABLE(func_8021866C_4EFB0C) {
|
||||
|
|
|
@ -1121,7 +1121,7 @@ bool dispatch_damage_event_player(s32 damageAmount, s32 event, bool noHitSound)
|
|||
}
|
||||
|
||||
// damage received from "damage over time" effects (only used for poison)
|
||||
bool dispatch_damage_tick_event_player(s32 damageAmount, s32 event) {
|
||||
s32 dispatch_damage_tick_event_player(s32 damageAmount, s32 event) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
|
||||
battleStatus->curAttackElement = ELEMENT_END;
|
||||
|
|
|
@ -97,7 +97,7 @@ API_CALLABLE(N(ChompChainUpdate)) {
|
|||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
#if CHOMP_CHAIN_UPDATE_Z == true
|
||||
#if CHOMP_CHAIN_UPDATE_Z == TRUE
|
||||
posZ = evt_get_variable(script, *args++);
|
||||
#endif
|
||||
|
||||
|
@ -180,7 +180,7 @@ API_CALLABLE(N(ChompChainUpdate)) {
|
|||
chain->settleAmt = 4.0f;
|
||||
}
|
||||
|
||||
#if CHOMP_CHAIN_UPDATE_Z == true
|
||||
#if CHOMP_CHAIN_UPDATE_Z == TRUE
|
||||
chain->curPos.z = posZ;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ extern Gfx Entity_HeartBlockContent_RenderHeartSleeping[];
|
|||
extern Gfx Entity_HeartBlockContent_RenderHeartAwake[];
|
||||
extern Gfx Entity_HeartBlockContent_RenderHeartHappy[];
|
||||
|
||||
BSS u32 HeartBlockPrinterClosed;
|
||||
BSS bool HeartBlockPrinterClosed;
|
||||
|
||||
f32 entity_HeartBlockContent_get_previous_yaw(HeartBlockContentData* data, s32 lagTime) {
|
||||
s32 bufIdx = data->yawBufferPos - lagTime;
|
||||
|
|
|
@ -11,8 +11,8 @@ extern Gfx Entity_SaveBlock_RenderNone[];
|
|||
|
||||
extern s32 Entity_SaveBlock_ScriptResume[];
|
||||
|
||||
BSS s32 SaveBlockTutorialPrinterClosed;
|
||||
BSS s32 SaveBlockResultPrinterClosed;
|
||||
BSS bool SaveBlockTutorialPrinterClosed;
|
||||
BSS bool SaveBlockResultPrinterClosed;
|
||||
BSS MessagePrintState* SaveBlockTutorialPrinter;
|
||||
BSS MessagePrintState* SaveBlockResultPrinter;
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ API_CALLABLE(SetModelFlags) {
|
|||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, s32), Evt* script) {
|
||||
void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, bool), Evt* script) {
|
||||
Evt localEvt;
|
||||
ModelTreeInfo* parentModelInfo;
|
||||
ModelTreeInfo* childModelInfo;
|
||||
|
|
|
@ -5,7 +5,7 @@ extern s32 ShowMessageScreenOffsetY;
|
|||
extern s32 D_802DAE58[2]; // unused?
|
||||
extern char D_802DAE60[0x400]; // unused?
|
||||
extern MessagePrintState* gCurrentPrintContext;
|
||||
extern s32 D_802DB264;
|
||||
extern bool D_802DB264;
|
||||
extern MessagePrintState* D_802DB268;
|
||||
|
||||
ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 mode);
|
||||
|
@ -51,7 +51,7 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 mode) {
|
|||
targetNpc = NULL;
|
||||
|
||||
if (isInitialCall) {
|
||||
D_802DB264 = 0;
|
||||
D_802DB264 = false;
|
||||
speakerNpcID = evt_get_variable(script, *args++);
|
||||
script->varTable[13] = evt_get_variable(script, *args++);
|
||||
script->varTable[14] = evt_get_variable(script, *args++);
|
||||
|
@ -169,7 +169,7 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 mode) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (D_802DB264 != 1) {
|
||||
if (D_802DB264 != true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -193,9 +193,9 @@ API_CALLABLE(ShowMessageAtScreenPos) {
|
|||
s32 msgID = evt_get_variable(script, *args++);
|
||||
s32 x = evt_get_variable(script, *args++);
|
||||
s32 y = evt_get_variable(script, *args++);
|
||||
s32* temp802DB264 = &D_802DB264;
|
||||
bool* temp802DB264 = &D_802DB264;
|
||||
|
||||
*temp802DB264 = 0;
|
||||
*temp802DB264 = false;
|
||||
gCurrentPrintContext = msg_get_printer_for_msg(msgID, temp802DB264);
|
||||
msg_printer_set_origin_pos(gCurrentPrintContext, x, y);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ API_CALLABLE(ShowMessageAtScreenPos) {
|
|||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
if (D_802DB264 != 1) {
|
||||
if (D_802DB264 != true) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -225,9 +225,9 @@ API_CALLABLE(ShowMessageAtWorldPos) {
|
|||
s32 x2;
|
||||
s32 y2;
|
||||
s32 z2;
|
||||
s32* temp802DB264 = &D_802DB264;
|
||||
bool* temp802DB264 = &D_802DB264;
|
||||
|
||||
*temp802DB264 = 0;
|
||||
*temp802DB264 = false;
|
||||
currentPrintContext = &gCurrentPrintContext;
|
||||
*currentPrintContext = msg_get_printer_for_msg(msgID, temp802DB264);
|
||||
get_screen_coords(*currentCameraID, x, y, z, &x2, &y2, &z2);
|
||||
|
@ -238,7 +238,7 @@ API_CALLABLE(ShowMessageAtWorldPos) {
|
|||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
if (D_802DB264 != 1) {
|
||||
if (D_802DB264 != true) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ API_CALLABLE(CloseMessage) {
|
|||
|
||||
if (gCurrentPrintContext->stateFlags & MSG_STATE_FLAG_40) {
|
||||
return ApiStatus_DONE1;
|
||||
} else if (D_802DB264 != 1) {
|
||||
} else if (D_802DB264 != true) {
|
||||
return ApiStatus_BLOCK;
|
||||
} else {
|
||||
script->varTable[0] = gCurrentPrintContext->curOption;
|
||||
|
@ -270,7 +270,7 @@ API_CALLABLE(SwitchMessage) {
|
|||
|
||||
if (gCurrentPrintContext->stateFlags & MSG_STATE_FLAG_40) {
|
||||
return ApiStatus_DONE1;
|
||||
} else if (D_802DB264 != 1) {
|
||||
} else if (D_802DB264 != true) {
|
||||
return ApiStatus_BLOCK;
|
||||
} else {
|
||||
script->varTable[0] = gCurrentPrintContext->curOption;
|
||||
|
@ -285,8 +285,8 @@ API_CALLABLE(ShowChoice) {
|
|||
if (isInitialCall) {
|
||||
s32 msgID = evt_get_variable(script, *args++);
|
||||
|
||||
script->functionTemp[1] = 0;
|
||||
D_802DB268 = msg_get_printer_for_msg(msgID, &script->functionTemp[1]);
|
||||
script->functionTempBool[1] = false;
|
||||
D_802DB268 = msg_get_printer_for_msg(msgID, &script->functionTempBool[1]);
|
||||
}
|
||||
|
||||
temp802DB268 = &D_802DB268;
|
||||
|
@ -296,7 +296,7 @@ API_CALLABLE(ShowChoice) {
|
|||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
return script->functionTemp[1] == 1;
|
||||
return script->functionTempBool[1] == true;
|
||||
}
|
||||
|
||||
API_CALLABLE(CloseChoice) {
|
||||
|
|
|
@ -44,7 +44,7 @@ BSS s32 ShowMessageScreenOffsetY;
|
|||
BSS s32 D_802DAE58[2]; // unused?
|
||||
BSS char D_802DAE60[0x400]; // unused?
|
||||
BSS MessagePrintState* gCurrentPrintContext;
|
||||
BSS s32 D_802DB264;
|
||||
BSS bool D_802DB264;
|
||||
BSS MessagePrintState* D_802DB268;
|
||||
BSS s32 D_802DB26C; // unused?
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ void item_entity_update(ItemEntity*);
|
|||
void appendGfx_item_entity(void*);
|
||||
void draw_item_entities(void);
|
||||
void draw_ui_item_entities(void);
|
||||
s32 test_item_player_collision(ItemEntity*);
|
||||
bool test_item_player_collision(ItemEntity*);
|
||||
void update_item_entity_collectable(ItemEntity*);
|
||||
void draw_ui_item_entity_collectable(ItemEntity*);
|
||||
void update_item_entity_stationary(ItemEntity*);
|
||||
|
|
|
@ -182,7 +182,7 @@ s32 draw_image_with_clipping(IMG_PTR raster, s32 width, s32 height, s32 fmt, s32
|
|||
s32 _update_message(MessagePrintState* printer);
|
||||
void msg_copy_to_print_buffer(MessagePrintState* printer, s32 arg1, s32 arg2);
|
||||
void initialize_printer(MessagePrintState* printer, s32 arg1, s32 arg2);
|
||||
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback, s32 arg2);
|
||||
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, bool* donePrintingWriteback, s32 arg2);
|
||||
void msg_update_rewind_arrow(s32);
|
||||
void msg_draw_rewind_arrow(s32);
|
||||
void msg_draw_choice_pointer(MessagePrintState* printer);
|
||||
|
@ -1428,11 +1428,11 @@ s8* load_message_to_buffer(s32 msgID) {
|
|||
return prevBufferPos;
|
||||
}
|
||||
|
||||
MessagePrintState* msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback) {
|
||||
MessagePrintState* msg_get_printer_for_msg(s32 msgID, bool* donePrintingWriteback) {
|
||||
return _msg_get_printer_for_msg(msgID, donePrintingWriteback, 0);
|
||||
}
|
||||
|
||||
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, s32* donePrintingWriteback, s32 arg2) {
|
||||
MessagePrintState* _msg_get_printer_for_msg(s32 msgID, bool* donePrintingWriteback, s32 arg2) {
|
||||
MessagePrintState* printer;
|
||||
s8* srcBuffer;
|
||||
s32 height;
|
||||
|
|
|
@ -281,7 +281,7 @@ API_CALLABLE(ShowShopPurchaseDialog) {
|
|||
|
||||
// functionTemp[0] is PurchaseDialogState
|
||||
// functionTemp[1] is speech script ID
|
||||
// functionTemp[2] is speech printer isClosed writeback
|
||||
// functionTempBool[2] is speech printer isClosed writeback
|
||||
|
||||
shop->flags &= ~SHOP_FLAG_SHOWING_ITEM_INFO;
|
||||
status_bar_always_show_off();
|
||||
|
@ -304,12 +304,12 @@ API_CALLABLE(ShowShopPurchaseDialog) {
|
|||
case PURCHASE_DIALOG_STATE_INIT:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH;
|
||||
script->functionTemp[2] = false;
|
||||
D_80286528 = msg_get_printer_for_msg(MSG_Choice_0001, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
D_80286528 = msg_get_printer_for_msg(MSG_Choice_0001, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH:
|
||||
if (script->functionTemp[2] == true) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
if (D_80286528->curOption == 0) {
|
||||
if (playerData->coins < shopInventory->price) {
|
||||
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_NOT_ENOUGH_COINS);
|
||||
|
@ -542,12 +542,12 @@ API_CALLABLE(ShowShopOwnerDialog) {
|
|||
case DIALOG_STATE_AWAIT_GREETING:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = DIALOG_STATE_AWAIT_MAIN_MENU;
|
||||
script->functionTemp[2] = 0;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0003, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0003, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case DIALOG_STATE_AWAIT_MAIN_MENU:
|
||||
if (script->functionTemp[2] == 1) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
switch (ShopOwnerPrintState->curOption) {
|
||||
case 0:
|
||||
script->functionTemp[1] = shop_owner_continue_speech(SHOP_MSG_INSTRUCTIONS);
|
||||
|
@ -628,12 +628,12 @@ API_CALLABLE(ShowShopOwnerDialog) {
|
|||
case DIALOG_STATE_AWAIT_SELL_CONFIRM:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = DIALOG_STATE_HANDLE_SELL_CHOICE;
|
||||
script->functionTemp[2] = 0;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0002, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0002, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case DIALOG_STATE_HANDLE_SELL_CHOICE:
|
||||
if (script->functionTemp[2] == 1) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
if (ShopOwnerPrintState->curOption == 0) {
|
||||
add_coins(shop_get_sell_price(playerData->invItems[shop->selectedStoreItemSlot]));
|
||||
playerData->invItems[shop->selectedStoreItemSlot] = ITEM_NONE;
|
||||
|
@ -655,12 +655,12 @@ API_CALLABLE(ShowShopOwnerDialog) {
|
|||
case DIALOG_STATE_INIT_SELL_MORE_CHOICE:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = DIALOG_STATE_AWAIT_SELL_MORE_CHOICE;
|
||||
script->functionTemp[2] = 0;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0004, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0004, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case DIALOG_STATE_AWAIT_SELL_MORE_CHOICE:
|
||||
if (script->functionTemp[2] == 1) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
if (ShopOwnerPrintState->curOption == 0) {
|
||||
script->functionTemp[1] = shop_owner_end_speech();
|
||||
script->functionTemp[0] = DIALOG_STATE_INIT_SELL_CHOICE;
|
||||
|
@ -710,12 +710,12 @@ API_CALLABLE(ShowShopOwnerDialog) {
|
|||
case DIALOG_STATE_INIT_CHECK_MORE_CHOICE:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = DIALOG_STATE_AWAIT_CHECK_MORE_CHOICE;
|
||||
script->functionTemp[2] = 0;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case DIALOG_STATE_AWAIT_CHECK_MORE_CHOICE:
|
||||
if (script->functionTemp[2] == 1) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
if (ShopOwnerPrintState->curOption == 0) {
|
||||
script->functionTemp[1] = shop_owner_end_speech();
|
||||
script->functionTemp[0] = DIALOG_STATE_INIT_CHECK_CHOICE;
|
||||
|
@ -763,12 +763,12 @@ API_CALLABLE(ShowShopOwnerDialog) {
|
|||
case DIALOG_STATE_INIT_CLAIM_MORE_CHOICE:
|
||||
if (!does_script_exist(script->functionTemp[1])) {
|
||||
script->functionTemp[0] = DIALOG_STATE_AWAIT_CLAIM_MORE_CHOICE;
|
||||
script->functionTemp[2] = 0;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTemp[2]);
|
||||
script->functionTempBool[2] = false;
|
||||
ShopOwnerPrintState = msg_get_printer_for_msg(MSG_Choice_0005, &script->functionTempBool[2]);
|
||||
}
|
||||
break;
|
||||
case DIALOG_STATE_AWAIT_CLAIM_MORE_CHOICE:
|
||||
if (script->functionTemp[2] == 1) {
|
||||
if (script->functionTempBool[2] == true) {
|
||||
if (ShopOwnerPrintState->curOption == 0) {
|
||||
script->functionTemp[1] = shop_owner_end_speech();
|
||||
script->functionTemp[0] = DIALOG_STATE_INIT_CLAIM_CHOICE;
|
||||
|
|
Loading…
Reference in New Issue