mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-23 13:20:02 +00:00
Decompile scrcmd_16 -> scrcmd_dppl_prizes
This seems to be unused in HGSS.
This commit is contained in:
parent
794110052d
commit
23b4cb0b5a
@ -3222,7 +3222,7 @@
|
||||
.short 566
|
||||
.endm
|
||||
|
||||
.macro scrcmd_567 arg0, arg1, arg2
|
||||
.macro getdpplprizeitemidandcost arg0, arg1, arg2
|
||||
.short 567
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
|
@ -600,7 +600,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_564 ; 564
|
||||
.word ScrCmd_565 ; 565
|
||||
.word ScrCmd_566 ; 566
|
||||
.word ScrCmd_567 ; 567
|
||||
.word ScrCmd_GetDPPlPrizeItemIdAndCost ; 567
|
||||
.word ScrCmd_568 ; 568
|
||||
.word ScrCmd_569 ; 569
|
||||
.word ScrCmd_CheckCoinsVar ; 570
|
||||
|
@ -1,66 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "global.inc"
|
||||
|
||||
.rodata
|
||||
|
||||
_020FC1D8:
|
||||
.short 0x00FB, 0x03E8
|
||||
.short 0x0109, 0x03E8
|
||||
.short 0x0114, 0x03E8
|
||||
.short 0x0115, 0x03E8
|
||||
.short 0x01A1, 0x07D0
|
||||
.short 0x0181, 0x07D0
|
||||
.short 0x0192, 0x0FA0
|
||||
.short 0x0167, 0x0FA0
|
||||
.short 0x0173, 0x1770
|
||||
.short 0x01A0, 0x1770
|
||||
.short 0x0151, 0x1770
|
||||
.short 0x0162, 0x1F40
|
||||
.short 0x015C, 0x1F40
|
||||
.short 0x016A, 0x2710
|
||||
.short 0x015F, 0x2710
|
||||
.short 0x0154, 0x2710
|
||||
.short 0x0164, 0x2710
|
||||
.short 0x0191, 0x3A98
|
||||
.short 0x018B, 0x4E20
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start ScrCmd_567
|
||||
ScrCmd_567: ; 0x0204E5BC
|
||||
push {r4, r5, r6, lr}
|
||||
add r5, r0, #0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0
|
||||
add r0, r5, #0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0]
|
||||
bl VarGet
|
||||
add r4, r0, #0
|
||||
add r0, r5, #0
|
||||
bl ScriptReadHalfword
|
||||
add r1, r0, #0
|
||||
add r0, r5, #0
|
||||
add r0, #0x80
|
||||
ldr r0, [r0]
|
||||
bl GetVarPointer
|
||||
add r6, r0, #0
|
||||
add r0, r5, #0
|
||||
bl ScriptReadHalfword
|
||||
add r5, #0x80
|
||||
add r1, r0, #0
|
||||
ldr r0, [r5]
|
||||
bl GetVarPointer
|
||||
ldr r1, _0204E608 ; =_020FC1D8
|
||||
lsl r2, r4, #2
|
||||
ldrh r1, [r1, r2]
|
||||
strh r1, [r6]
|
||||
ldr r1, _0204E60C ; =_020FC1D8 + 2
|
||||
ldrh r1, [r1, r2]
|
||||
strh r1, [r0]
|
||||
mov r0, #0
|
||||
pop {r4, r5, r6, pc}
|
||||
.balign 4, 0
|
||||
_0204E608: .word _020FC1D8
|
||||
_0204E60C: .word _020FC1D8 + 2
|
||||
thumb_func_end ScrCmd_567
|
@ -2247,7 +2247,7 @@
|
||||
.public ScrCmd_564
|
||||
.public ScrCmd_565
|
||||
.public ScrCmd_566
|
||||
.public ScrCmd_567
|
||||
.public ScrCmd_GetDPPlPrizeItemIdAndCost
|
||||
.public ScrCmd_568
|
||||
.public ScrCmd_569
|
||||
.public ScrCmd_CheckCoinsVar
|
||||
|
@ -603,7 +603,7 @@ BOOL ScrCmd_563(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_564(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_565(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_566(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_567(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetDPPlPrizeItemIdAndCost(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_568(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_569(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CheckCoinsVar(SCRIPTCONTEXT* ctx);
|
||||
|
2
main.lsf
2
main.lsf
@ -171,7 +171,7 @@ Static main
|
||||
Object src/scrcmd_money.o
|
||||
Object src/scrcmd_daycare.o
|
||||
Object asm/scrcmd_15.o
|
||||
Object asm/scrcmd_16.o
|
||||
Object src/scrcmd_dppl_prizes.o
|
||||
Object asm/scrcmd_17.o
|
||||
Object src/scrcmd_items.o
|
||||
Object asm/scrcmd_19.o
|
||||
|
@ -567,7 +567,7 @@ extern BOOL ScrCmd_563(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_564(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_565(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_566(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_567(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetDPPlPrizeItemIdAndCost(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_568(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_569(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CheckCoinsVar(SCRIPTCONTEXT *ctx);
|
||||
@ -1422,7 +1422,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_564,
|
||||
ScrCmd_565,
|
||||
ScrCmd_566,
|
||||
ScrCmd_567,
|
||||
ScrCmd_GetDPPlPrizeItemIdAndCost,
|
||||
ScrCmd_568,
|
||||
ScrCmd_569,
|
||||
ScrCmd_CheckCoinsVar,
|
||||
|
34
src/scrcmd_dppl_prizes.c
Normal file
34
src/scrcmd_dppl_prizes.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include "scrcmd.h"
|
||||
|
||||
static const u16 sDPPlGameCornerPrizeMap[][2] = {
|
||||
{ ITEM_SILK_SCARF, 1000 },
|
||||
{ ITEM_WIDE_LENS, 1000 },
|
||||
{ ITEM_ZOOM_LENS, 1000 },
|
||||
{ ITEM_METRONOME, 1000 },
|
||||
{ ITEM_TM90, 2000 },
|
||||
{ ITEM_TM58, 2000 },
|
||||
{ ITEM_TM75, 4000 },
|
||||
{ ITEM_TM32, 4000 },
|
||||
{ ITEM_TM44, 6000 },
|
||||
{ ITEM_TM89, 6000 },
|
||||
{ ITEM_TM10, 6000 },
|
||||
{ ITEM_TM27, 8000 },
|
||||
{ ITEM_TM21, 8000 },
|
||||
{ ITEM_TM35, 10000 },
|
||||
{ ITEM_TM24, 10000 },
|
||||
{ ITEM_TM13, 10000 },
|
||||
{ ITEM_TM29, 10000 },
|
||||
{ ITEM_TM74, 15000 },
|
||||
{ ITEM_TM68, 20000 },
|
||||
};
|
||||
|
||||
BOOL ScrCmd_GetDPPlPrizeItemIdAndCost(SCRIPTCONTEXT* ctx) {
|
||||
u16 prize_id = ScriptGetVar(ctx);
|
||||
u16* prize_item_id = ScriptGetVarPointer(ctx);
|
||||
u16* prize_cost = ScriptGetVarPointer(ctx);
|
||||
|
||||
*prize_item_id = sDPPlGameCornerPrizeMap[prize_id][0];
|
||||
*prize_cost = sDPPlGameCornerPrizeMap[prize_id][1];
|
||||
|
||||
return FALSE;
|
||||
}
|
@ -3584,7 +3584,7 @@
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_567",
|
||||
"name": "getdpplprizeitemidandcost",
|
||||
"args": [
|
||||
2,
|
||||
2,
|
||||
|
Loading…
Reference in New Issue
Block a user