mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-04-26 00:32:20 -05:00
Update Game Corner Prizes
This commit is contained in:
parent
0497e60823
commit
a591615cb5
|
|
@ -3749,7 +3749,7 @@
|
|||
.short 677
|
||||
.endm
|
||||
|
||||
.macro ScrCmd_2A6 arg0, arg1, arg2
|
||||
.macro ScrCmd_GetGameCornerPrizeData arg0, arg1, arg2
|
||||
.short 678
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
|
|
|
|||
8
include/game_corner_prize.h
Normal file
8
include/game_corner_prize.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef POKEPLATINUM_GAME_CORNER_PRIZE_H
|
||||
#define POKEPLATINUM_GAME_CORNER_PRIZE_H
|
||||
|
||||
#include "field_script_context.h"
|
||||
|
||||
BOOL ScrCmd_GetGameCornerPrizeData(ScriptContext *param0);
|
||||
|
||||
#endif // POKEPLATINUM_GAME_CORNER_PRIZE_H
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef POKEPLATINUM_UNK_0204E378_H
|
||||
#define POKEPLATINUM_UNK_0204E378_H
|
||||
|
||||
#include "field_script_context.h"
|
||||
|
||||
BOOL ScrCmd_2A6(ScriptContext *param0);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_0204E378_H
|
||||
|
|
@ -203,7 +203,7 @@ Static main
|
|||
Object main.nef.p/src_unk_0204CDDC.c.o
|
||||
Object main.nef.p/src_unk_0204CFFC.c.o
|
||||
Object main.nef.p/src_unk_0204E240.c.o
|
||||
Object main.nef.p/src_unk_0204E378.c.o
|
||||
Object main.nef.p/src_game_corner_prize.c.o
|
||||
Object main.nef.p/src_scrcmd_system_flags.c.o
|
||||
Object main.nef.p/src_unk_0204E75C.c.o
|
||||
Object main.nef.p/src_unk_0204E974.c.o
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ _0039:
|
|||
Call _0119
|
||||
GoToIfEq 0x800C, -2, _00D8
|
||||
GoToIfEq 0x800C, 0x4001, _00D8
|
||||
ScrCmd_2A6 0x800C, 0x8000, 0x8001
|
||||
ScrCmd_GetGameCornerPrizeData 0x800C, 0x8000, 0x8001
|
||||
CallIfLt 0x8000, 0x148, _0100
|
||||
CallIfGe 0x8000, 0x148, _010A
|
||||
ShowYesNoMenu 0x800C
|
||||
|
|
@ -81,7 +81,7 @@ _0119:
|
|||
End
|
||||
|
||||
_0135:
|
||||
ScrCmd_2A6 0x8008, 0x8000, 0x8001
|
||||
ScrCmd_GetGameCornerPrizeData 0x8008, 0x8000, 0x8001
|
||||
BufferItemName 0, 0x8000
|
||||
ScrCmd_280 1, 0x8001, 1, 5
|
||||
ScrCmd_046 168, 0xFF, 0x8008
|
||||
|
|
|
|||
42
src/game_corner_prize.c
Normal file
42
src/game_corner_prize.c
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#include "game_corner_prize.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "generated/items.h"
|
||||
|
||||
#include "field_script_context.h"
|
||||
#include "inlines.h"
|
||||
|
||||
BOOL ScrCmd_GetGameCornerPrizeData(ScriptContext *param0)
|
||||
{
|
||||
u16 index = ScriptContext_GetVar(param0);
|
||||
u16 *item = ScriptContext_GetVarPointer(param0);
|
||||
u16 *price = ScriptContext_GetVarPointer(param0);
|
||||
static const u16 GameCornerPrizeData[][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 }
|
||||
};
|
||||
|
||||
*item = GameCornerPrizeData[index][0];
|
||||
*price = GameCornerPrizeData[index][1];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ pokeplatinum_c = files(
|
|||
'unk_0204CDDC.c',
|
||||
'unk_0204CFFC.c',
|
||||
'unk_0204E240.c',
|
||||
'unk_0204E378.c',
|
||||
'game_corner_prize.c',
|
||||
'scrcmd_system_flags.c',
|
||||
'unk_0204E75C.c',
|
||||
'unk_0204E974.c',
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@
|
|||
#include "unk_0204CDDC.h"
|
||||
#include "unk_0204CFFC.h"
|
||||
#include "unk_0204E240.h"
|
||||
#include "unk_0204E378.h"
|
||||
#include "game_corner_prize.h"
|
||||
#include "unk_0204E75C.h"
|
||||
#include "unk_0204E974.h"
|
||||
#include "unk_0204EDA4.h"
|
||||
|
|
@ -1443,7 +1443,7 @@ const ScrCmdFunc Unk_020EAC58[] = {
|
|||
ScrCmd_2A3,
|
||||
ScrCmd_2A4,
|
||||
ScrCmd_2A5,
|
||||
ScrCmd_2A6,
|
||||
ScrCmd_GetGameCornerPrizeData,
|
||||
ScrCmd_2A7,
|
||||
ScrCmd_2A8,
|
||||
ScrCmd_2A9,
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
#include "unk_0204E378.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "field_script_context.h"
|
||||
#include "inlines.h"
|
||||
|
||||
BOOL ScrCmd_2A6(ScriptContext *param0)
|
||||
{
|
||||
u16 v0 = ScriptContext_GetVar(param0);
|
||||
u16 *v1 = ScriptContext_GetVarPointer(param0);
|
||||
u16 *v2 = ScriptContext_GetVarPointer(param0);
|
||||
static const u16 v3[][2] = {
|
||||
{ 0xFB, 0x3E8 },
|
||||
{ 0x109, 0x3E8 },
|
||||
{ 0x114, 0x3E8 },
|
||||
{ 0x115, 0x3E8 },
|
||||
{ 0x1A1, 0x7D0 },
|
||||
{ 0x181, 0x7D0 },
|
||||
{ 0x192, 0xFA0 },
|
||||
{ 0x167, 0xFA0 },
|
||||
{ 0x173, 0x1770 },
|
||||
{ 0x1A0, 0x1770 },
|
||||
{ 0x151, 0x1770 },
|
||||
{ 0x162, 0x1F40 },
|
||||
{ 0x15C, 0x1F40 },
|
||||
{ 0x16A, 0x2710 },
|
||||
{ 0x15F, 0x2710 },
|
||||
{ 0x154, 0x2710 },
|
||||
{ 0x164, 0x2710 },
|
||||
{ 0x191, 0x3A98 },
|
||||
{ 0x18B, 0x4E20 }
|
||||
};
|
||||
|
||||
*v1 = v3[v0][0];
|
||||
*v2 = v3[v0][1];
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user