papermario
Decompilation of Paper Mario
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
shops.c File Reference

Enumerations

enum  PurchaseDialogState {
  PURCHASE_DIALOG_STATE_INIT = 0 , PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS = 1 , PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM = 4 , PURCHASE_DIALOG_STATE_ACCEPTED = 5 ,
  PURCHASE_DIALOG_STATE_CANCEL = 6 , PURCHASE_DIALOG_STATE_EXEC_CALLBACK = 10 , PURCHASE_DIALOG_STATE_AWAIT_CALLBACK = 11 , PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH = 100
}
 

Functions

s32 shop_get_sell_price (s32 itemID)
 
s32 shop_owner_begin_speech (s32 messageIndex)
 
s32 shop_owner_buy_dialog (s32 messageIndex, s32 itemName, s32 coinCost, s32 bpCost)
 
s32 shop_owner_continue_speech (s32 messageIndex)
 
s32 shop_owner_continue_speech_with_quantity (s32 messageIndex, s32 amount)
 
s32 shop_owner_reset_speech (s32 messageIndex)
 
s32 shop_owner_end_speech (void)
 
void create_shop_popup_menu (PopupMenu *popup)
 
void shop_open_item_select_popup (s32 mode)
 
s32 shop_update_item_select_popup (s32 *selectedIndex)
 
void shop_close_item_select_popup (void)
 
void shop_draw_item_name (s32 arg0, s32 posX, s32 posY)
 
void shop_draw_item_desc (s32 arg0, s32 posX, s32 posY)
 
void draw_shop_items (void)
 

Variables

u8 MessagePlural []
 
u8 MessageSingular []
 
HudScript HES_Item_Coin
 
EvtScript EVS_ShopBeginSpeech
 
EvtScript EVS_ShopContinueSpeech
 
EvtScript EVS_ShopResetSpeech
 
EvtScript EVS_ShopEndSpeech
 
EvtScript EVS_ShopItemInteract
 
EvtScript EVS_ShopPurchaseDialog
 
EvtScript EVS_ShopOwnerDialog
 

Enumeration Type Documentation

◆ PurchaseDialogState

Enumerator
PURCHASE_DIALOG_STATE_INIT 
PURCHASE_DIALOG_STATE_NOT_ENOUGH_COINS 
PURCHASE_DIALOG_STATE_NOT_ENOUGH_ROOM 
PURCHASE_DIALOG_STATE_ACCEPTED 
PURCHASE_DIALOG_STATE_CANCEL 
PURCHASE_DIALOG_STATE_EXEC_CALLBACK 
PURCHASE_DIALOG_STATE_AWAIT_CALLBACK 
PURCHASE_DIALOG_STATE_WAIT_FOR_SPEECH 

Function Documentation

◆ create_shop_popup_menu()

void create_shop_popup_menu ( PopupMenu * popup)

◆ draw_shop_items()

void draw_shop_items ( void )

◆ shop_close_item_select_popup()

void shop_close_item_select_popup ( void )

◆ shop_draw_item_desc()

void shop_draw_item_desc ( s32 arg0,
s32 posX,
s32 posY )

◆ shop_draw_item_name()

void shop_draw_item_name ( s32 arg0,
s32 posX,
s32 posY )

◆ shop_get_sell_price()

s32 shop_get_sell_price ( s32 itemID)

◆ shop_open_item_select_popup()

void shop_open_item_select_popup ( s32 mode)

◆ shop_owner_begin_speech()

s32 shop_owner_begin_speech ( s32 messageIndex)

◆ shop_owner_buy_dialog()

s32 shop_owner_buy_dialog ( s32 messageIndex,
s32 itemName,
s32 coinCost,
s32 bpCost )

◆ shop_owner_continue_speech()

s32 shop_owner_continue_speech ( s32 messageIndex)

◆ shop_owner_continue_speech_with_quantity()

s32 shop_owner_continue_speech_with_quantity ( s32 messageIndex,
s32 amount )

◆ shop_owner_end_speech()

s32 shop_owner_end_speech ( void )

◆ shop_owner_reset_speech()

s32 shop_owner_reset_speech ( s32 messageIndex)

◆ shop_update_item_select_popup()

s32 shop_update_item_select_popup ( s32 * selectedIndex)

Variable Documentation

◆ EVS_ShopBeginSpeech

EvtScript EVS_ShopBeginSpeech
Initial value:
= {
}
#define SpeakToPlayer(ARGS...)
Definition msg_api.h:6
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:225
#define LVar2
Definition macros.h:146
#define LVar1
Definition macros.h:145
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:588
#define LVar3
Definition macros.h:147
#define LVar0
Definition macros.h:144
#define Return
Kills the current EVT thread.
Definition macros.h:229

Referenced by shop_owner_begin_speech(), and shop_owner_buy_dialog().

◆ EVS_ShopContinueSpeech

EvtScript EVS_ShopContinueSpeech
Initial value:
= {
}
#define ContinueSpeech(ARGS...)
Definition msg_api.h:14

Referenced by shop_owner_continue_speech(), and shop_owner_continue_speech_with_quantity().

◆ EVS_ShopEndSpeech

EvtScript EVS_ShopEndSpeech
Initial value:
= {
}
#define EndSpeech(ARGS...)
Definition msg_api.h:10

Referenced by shop_owner_end_speech().

◆ EVS_ShopItemInteract

EvtScript EVS_ShopItemInteract
Initial value:
= {
Goto(10)
Goto(10)
Goto(10)
Label(10)
Call(CanInteractWithShopItem)
Call(BeginShopItemInteraction, LVar0)
}
@ PARTNER_NONE
Definition enums.h:2886
@ PARTNER_BOMBETTE
Definition enums.h:2889
@ PARTNER_KOOPER
Definition enums.h:2888
ApiStatus GetPartnerInUse(Evt *script, b32 isInitialCall)
#define IfFalse(b)
Definition macros.h:658
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:244
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:239
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:310
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:281

◆ EVS_ShopOwnerDialog

EvtScript EVS_ShopOwnerDialog
Initial value:
= {
Call(ShowShopOwnerDialog)
}

◆ EVS_ShopPurchaseDialog

EvtScript EVS_ShopPurchaseDialog
Initial value:
= {
Call(ShowShopPurchaseDialog, LVar0)
}

◆ EVS_ShopResetSpeech

EvtScript EVS_ShopResetSpeech

◆ HES_Item_Coin

HudScript HES_Item_Coin
extern

◆ MessagePlural

u8 MessagePlural[]
extern

◆ MessageSingular

u8 MessageSingular[]
extern