mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-24 15:07:47 -05:00
shop_menu/script: unk_02046AD4 -> scrcmd_shop
This commit is contained in:
parent
ba5cdc14ed
commit
918ca37f31
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef POKEPLATINUM_UNK_02046AD4_H
|
||||
#define POKEPLATINUM_UNK_02046AD4_H
|
||||
#ifndef POKEPLATINUM_SCRCMD_SHOP_H
|
||||
#define POKEPLATINUM_SCRCMD_SHOP_H
|
||||
|
||||
#include "field_script_context.h"
|
||||
|
||||
|
|
@ -9,4 +9,4 @@ BOOL ScrCmd_PokeMartDecor(ScriptContext *ctx);
|
|||
BOOL ScrCmd_PokeMartSeal(ScriptContext *ctx);
|
||||
BOOL ScrCmd_257(ScriptContext *param0);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_02046AD4_H
|
||||
#endif // POKEPLATINUM_SCRCMD_SHOP_H
|
||||
|
|
@ -183,7 +183,7 @@ Static main
|
|||
Object main.nef.p/src_field_script_context.c.o
|
||||
Object main.nef.p/src_script_manager.c.o
|
||||
Object main.nef.p/src_scrcmd.c.o
|
||||
Object main.nef.p/src_unk_02046AD4.c.o
|
||||
Object main.nef.p/src_scrcmd_shop.c.o
|
||||
Object main.nef.p/src_unk_02046C7C.c.o
|
||||
Object main.nef.p/src_unk_020474B8.c.o
|
||||
Object main.nef.p/src_scrcmd_jubilife_lottery.c.o
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ pokeplatinum_c = files(
|
|||
'field_script_context.c',
|
||||
'script_manager.c',
|
||||
'scrcmd.c',
|
||||
'unk_02046AD4.c',
|
||||
'scrcmd_shop.c',
|
||||
'unk_02046C7C.c',
|
||||
'unk_020474B8.c',
|
||||
'scrcmd_jubilife_lottery.c',
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@
|
|||
#include "savedata.h"
|
||||
#include "scrcmd_dummy_23F_242.h"
|
||||
#include "scrcmd_jubilife_lottery.h"
|
||||
#include "scrcmd_shop.h"
|
||||
#include "scrcmd_system_flags.h"
|
||||
#include "script_manager.h"
|
||||
#include "special_encounter.h"
|
||||
|
|
@ -162,7 +163,6 @@
|
|||
#include "unk_02038FFC.h"
|
||||
#include "unk_020393C8.h"
|
||||
#include "unk_0203D1B8.h"
|
||||
#include "unk_02046AD4.h"
|
||||
#include "unk_02046C7C.h"
|
||||
#include "unk_020474B8.h"
|
||||
#include "unk_020482D4.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "unk_02046AD4.h"
|
||||
#include "scrcmd_shop.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
|
@ -73,15 +73,15 @@ BOOL ScrCmd_PokeMartCommon(ScriptContext *ctx)
|
|||
BOOL ScrCmd_PokeMartSpecialties(ScriptContext *ctx)
|
||||
{
|
||||
u16 martID = ScriptContext_GetVar(ctx);
|
||||
BOOL incDeptStoreBuyCount;
|
||||
BOOL incBuyCount;
|
||||
|
||||
if ((martID == 8) || (martID == 9) || (martID == 10) || (martID == 11) || (martID == 12) || (martID == 13) || (martID == 19)) {
|
||||
incDeptStoreBuyCount = TRUE;
|
||||
incBuyCount = TRUE;
|
||||
} else {
|
||||
incDeptStoreBuyCount = FALSE;
|
||||
incBuyCount = FALSE;
|
||||
}
|
||||
|
||||
Shop_Start(ctx->task, ctx->fieldSystem, (u16 *)PokeMartSpecialties[martID], MART_TYPE_NORMAL, incDeptStoreBuyCount);
|
||||
Shop_Start(ctx->task, ctx->fieldSystem, (u16 *)PokeMartSpecialties[martID], MART_TYPE_NORMAL, incBuyCount);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -89,18 +89,18 @@ BOOL ScrCmd_PokeMartSpecialties(ScriptContext *ctx)
|
|||
BOOL ScrCmd_PokeMartDecor(ScriptContext *ctx)
|
||||
{
|
||||
u16 martID = ScriptContext_GetVar(ctx);
|
||||
BOOL incDeptStoreBuyCount;
|
||||
BOOL incBuyCount;
|
||||
|
||||
if ((martID == 0) || (martID == 1)) {
|
||||
incDeptStoreBuyCount = TRUE;
|
||||
incBuyCount = TRUE;
|
||||
} else {
|
||||
// never reached as the only two instances of
|
||||
// this command only sets martID to 0 and 1
|
||||
// respectively.
|
||||
incDeptStoreBuyCount = FALSE;
|
||||
incBuyCount = FALSE;
|
||||
}
|
||||
|
||||
Shop_Start(ctx->task, ctx->fieldSystem, (u16 *)VeilstoneDeptStoreDecorationStocks[martID], MART_TYPE_DECOR, incDeptStoreBuyCount);
|
||||
Shop_Start(ctx->task, ctx->fieldSystem, (u16 *)VeilstoneDeptStoreDecorationStocks[martID], MART_TYPE_DECOR, incBuyCount);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ BOOL ScrCmd_PokeMartSeal(ScriptContext *ctx)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// does NOT use shop_menu
|
||||
// does NOT use shop_menu, but it is a shop of sort
|
||||
BOOL ScrCmd_257(ScriptContext *param0)
|
||||
{
|
||||
sub_0203E518(param0->fieldSystem->task);
|
||||
Loading…
Reference in New Issue
Block a user