Merge branch 'master' into overlay_22

This commit is contained in:
cbt6 2023-05-18 01:27:09 +08:00 committed by GitHub
commit e765be205a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 189 additions and 185 deletions

View File

@ -60,7 +60,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -109,7 +109,7 @@
.public DestroySysTask
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -63,7 +63,7 @@
.public sub_0200E640
.public DrawFrameAndWindow2
.public sub_0200EB80
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public SetMasterBrightnessNeutral
.public sub_0200FBF4

View File

@ -52,7 +52,7 @@
.public sub_0200E11C
.public CreateSysTask
.public DestroySysTask
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_02014540
.public sub_0201649C

View File

@ -17,7 +17,7 @@
.public BufferPlayersName
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_0201660C
.public sub_02016624

View File

@ -34,7 +34,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -82,7 +82,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_0200F478
.public BeginNormalPaletteFade

View File

@ -29,7 +29,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -49,7 +49,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -84,7 +84,7 @@
.public ClearFrameAndWindow2
.public sub_0200EC0C
.public DrawFrameAndWindow3
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_0200F478
.public BeginNormalPaletteFade

View File

@ -60,7 +60,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -74,7 +74,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -51,7 +51,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -58,7 +58,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -69,7 +69,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_0200F478
.public BeginNormalPaletteFade

View File

@ -45,7 +45,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -66,7 +66,7 @@
.public sub_0200E5D4
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -92,7 +92,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -57,7 +57,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F478
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -140,7 +140,7 @@
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public ClearFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -31,7 +31,7 @@
.public sub_0200EB80
.public sub_0200EC0C
.public DrawFrameAndWindow3
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public sub_0200F478
.public sub_0200F4A0

View File

@ -16,7 +16,7 @@
.public LoadUserFrameGfx1
.public LoadUserFrameGfx2
.public DrawFrameAndWindow2
.public sub_0200F0AC
.public WaitingIcon_new
.public sub_0200F450
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished

View File

@ -6002,7 +6002,7 @@ ov05_0221EA18: ; 0x0221EA18
sub r0, #0x3c
add r0, r4, r0
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _0221EA34 ; =0x00000BC4
str r0, [r4, r1]
_0221EA32:

View File

@ -8742,7 +8742,7 @@ ov112_021EA17C: ; 0x021EA17C
ldr r0, _021EA190 ; =0x0001EA88
ldr r1, _021EA194 ; =0x000003E2
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _021EA198 ; =0x0001EC4C
str r0, [r4, r1]
pop {r4, pc}

View File

@ -4169,7 +4169,7 @@ _02239A46:
bl sub_02003370
ldr r0, [r5, #8]
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02239C24 ; =0x00001024
str r0, [r5, r1]
bl ov12_0223A7A0

View File

@ -5439,7 +5439,7 @@ ov12_0225B1A8: ; 0x0225B1A8
mov r1, #0
bl ov12_0223A7D8
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
add r1, r0, #0
add r0, r5, #0
bl ov12_0223BB80

View File

@ -779,7 +779,7 @@ ov30_0225DB48: ; 0x0225DB48
add r4, r0, #0
add r0, #0x4c
mov r1, #0xec
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x64]
mov r0, #0xc
str r0, [r4, #0xc]

View File

@ -3487,7 +3487,7 @@ ov39_02228A8C: ; 0x02228A8C
add r0, r4, #0
add r0, #0x44
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
add r4, #0x88
str r0, [r4]
_02228AA6:

View File

@ -2740,7 +2740,7 @@ _0222B3EC:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -2967,7 +2967,7 @@ _0222B5CE:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -3083,7 +3083,7 @@ _0222B6CE:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -3994,7 +3994,7 @@ _0222BE08:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -4051,7 +4051,7 @@ _0222BE80:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -8598,7 +8598,7 @@ _0222E386:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -10188,7 +10188,7 @@ _0222EFB8:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -10243,7 +10243,7 @@ _0222F030:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -10645,7 +10645,7 @@ _0222F37A:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -10747,7 +10747,7 @@ _0222F460:
lsl r1, r1, #4
add r0, r5, r1
sub r1, #0xee
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x63
lsl r1, r1, #2
str r0, [r5, r1]
@ -20842,7 +20842,7 @@ _022342CA:
lsl r0, r0, #2
add r0, r4, r0
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
mov r1, #0x86
lsl r1, r1, #2
str r0, [r4, r1]

View File

@ -1519,7 +1519,7 @@ _02259464:
add r0, r4, #0
add r0, #8
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x24]
_02259470:
pop {r4, pc}

View File

@ -1460,7 +1460,7 @@ _02259392:
add r0, r4, #0
add r0, #8
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x1c]
pop {r4, pc}
thumb_func_end ov47_02259384

View File

@ -4933,7 +4933,7 @@ ov49_0225AC08: ; 0x0225AC08
_0225AC16:
add r0, r4, #0
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x1c]
pop {r4, pc}
.balign 4, 0

View File

@ -6918,7 +6918,7 @@ ov65_0221F760: ; 0x0221F760
ldr r0, _0221F774 ; =0x000005B4
ldr r1, _0221F778 ; =0x000003D9
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _0221F77C ; =0x000036B4
str r0, [r4, r1]
pop {r4, pc}

View File

@ -2927,7 +2927,7 @@ ov70_02238F64: ; 0x02238F64
ldr r0, _02238F78 ; =0x00000F18
mov r1, #1
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02238F7C ; =0x000011BC
str r0, [r4, r1]
pop {r4, pc}

View File

@ -5532,7 +5532,7 @@ ov72_0223A420: ; 0x0223A420
ldr r0, _0223A440 ; =0x00000E18
mov r1, #1
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _0223A43C ; =0x00000F4C
str r0, [r4, r1]
_0223A43A:

View File

@ -9248,7 +9248,7 @@ ov73_021EA15C: ; 0x021EA15C
ldr r0, _021EA17C ; =0x00000DD8
mov r1, #1
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _021EA178 ; =0x00000F0C
str r0, [r4, r1]
_021EA176:

View File

@ -4822,7 +4822,7 @@ _022296E0:
add r0, r4, #0
add r0, #0x28
mov r1, #0xa
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02229A00 ; =0x000034D8
str r0, [r4, r1]
mov r0, #3
@ -5063,7 +5063,7 @@ _022298C6:
add r0, r4, #0
add r0, #0x28
mov r1, #0xa
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02229A00 ; =0x000034D8
str r0, [r4, r1]
add r0, r4, #0
@ -5777,7 +5777,7 @@ ov74_02229E28: ; 0x02229E28
add r0, r4, #0
add r0, #0x18
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02229E5C ; =0x000029F0
str r0, [r4, r1]
pop {r4, pc}
@ -12370,7 +12370,7 @@ ov74_0222D358: ; 0x0222D358
ldr r0, _0222D400 ; =0x00002BD0
mov r1, #0x13
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _0222D404 ; =0x00003D50
str r0, [r4, r1]
ldr r1, _0222D408 ; =0x00002BA0
@ -14185,7 +14185,7 @@ _0222E17A:
ldr r0, _0222E1EC ; =0x00002BD0
mov r1, #0x13
add r0, r5, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _0222E1F0 ; =0x00003D50
str r0, [r5, r1]
_0222E1B2:
@ -24882,7 +24882,7 @@ _02233510:
ldr r1, _0223363C ; =0x00000498
add r0, r4, r1
sub r1, #0xc6
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _02233640 ; =0x0000E898
str r0, [r4, r1]
mov r0, #0xa
@ -25202,7 +25202,7 @@ _022337B4:
ldr r1, _022338AC ; =0x00000498
add r0, r4, r1
sub r1, #0xc6
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _022338C0 ; =0x0000E898
str r0, [r4, r1]
mov r0, #0x15

View File

@ -1874,7 +1874,7 @@ ov75_0224785C: ; 0x0224785C
add r0, r4, #0
add r0, #0x48
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
add r4, #0x8c
str r0, [r4]
_02247876:

View File

@ -2328,7 +2328,7 @@ ov80_0222CEF0: ; 0x0222CEF0
ldr r1, _0222CF04 ; =0x000003E2
add r0, r4, #0
add r0, #0x64
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x7c]
mov r0, #0
pop {r4, pc}

View File

@ -1784,7 +1784,7 @@ ov85_021E65D4: ; 0x021E65D4
ldr r0, _021E6608 ; =0x00000CA8
mov r1, #0xa
add r0, r4, r0
bl sub_0200F0AC
bl WaitingIcon_new
ldr r1, _021E660C ; =0x00000DC8
str r0, [r4, r1]
mov r0, #0x2d

View File

@ -1865,7 +1865,7 @@ ov90_02259554: ; 0x02259554
lsl r1, r1, #4
add r0, r0, r1
mov r1, #1
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r5, r4]
_0225956E:
pop {r3, r4, r5, pc}

View File

@ -19285,7 +19285,7 @@ _021EE9A8:
add r0, r4, #0
ldr r1, _021EE9B8 ; =0x000003D2
add r0, #0x18
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x30]
pop {r4, pc}
nop

View File

@ -1,5 +1,5 @@
.include "asm/macros.inc"
.include "unk_0200E398.inc"
.include "render_window.inc"
.include "global.inc"
.rodata
@ -1674,8 +1674,8 @@ _0200F0A0:
.balign 4, 0
thumb_func_end DrawFrameAndWindow3
thumb_func_start sub_0200F0AC
sub_0200F0AC: ; 0x0200F0AC
thumb_func_start WaitingIcon_new
WaitingIcon_new: ; 0x0200F0AC
push {r4, r5, r6, r7, lr}
sub sp, #0x34
str r0, [sp, #0x20]
@ -1804,7 +1804,7 @@ _0200F1C4: .word 0x0000048C
_0200F1C8: .word 0x00000404
_0200F1CC: .word 0x00000484
_0200F1D0: .word sub_0200F3D0
thumb_func_end sub_0200F0AC
thumb_func_end WaitingIcon_new
thumb_func_start sub_0200F1D4
sub_0200F1D4: ; 0x0200F1D4

View File

@ -469,7 +469,7 @@ _02092090:
add r0, r4, #0
ldr r1, _020920DC ; =0x000001E2
add r0, #0x1c
bl sub_0200F0AC
bl WaitingIcon_new
str r0, [r4, #0x34]
mov r0, #5
str r0, [r4, #4]

View File

@ -1,9 +1,9 @@
#ifndef POKEHEARTGOLD_UNK_0200E398_H
#define POKEHEARTGOLD_UNK_0200E398_H
#ifndef POKEHEARTGOLD_RENDER_WINDOW_H
#define POKEHEARTGOLD_RENDER_WINDOW_H
#include "window.h"
struct WaitingIconManager;
typedef struct WaitingIcon WaitingIcon; //todo: copy from pokediamond
struct PokepicManager;
void LoadUserFrameGfx1(BGCONFIG* bg_config, enum GFBgLayer layer, u16 baseTile, u8 palette_num, u8 frame, HeapID heap_id);
@ -12,9 +12,9 @@ void LoadUserFrameGfx2(BGCONFIG *bgConfig, enum GFBgLayer layer, u16 baseTile, u
void DrawFrameAndWindow2(WINDOW *window, BOOL dont_copy_to_vram, u16 baseTile, u8 palette_num);
void ClearFrameAndWindow2(WINDOW *window, BOOL dont_copy_to_vram);
void sub_0200E5D4(WINDOW *window, BOOL dont_copy_to_vram);
struct WaitingIconManager *sub_0200F0AC(WINDOW *window, u16 tileNum);
void sub_0200F450(struct WaitingIconManager *mgr);
WaitingIcon *WaitingIcon_new(WINDOW *window, u16 tileNum);
void sub_0200F450(WaitingIcon *waitingIcon);
struct PokepicManager *sub_0200F4A0(BGCONFIG *bgConfig, enum GFBgLayer layer, int x, int y, u8 paletteNum, u16 baseTile, u16 species, u8 gender, HeapID heapId);
struct PokepicManager *sub_0200F4F8(BGCONFIG *bgConfig, enum GFBgLayer layer, int x, int y, u8 paletteNum, u16 baseTile, POKEMON *pokemon, HeapID heapId);
#endif //POKEHEARTGOLD_UNK_0200E398_H
#endif //POKEHEARTGOLD_RENDER_WINDOW_H

View File

@ -12,9 +12,10 @@
#include "overlay_manager.h"
#include "unk_0200E320.h"
#include "list_menu_2d.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_02022D74.h"
#include "field_system.h"
#include "render_window.h"
#define SCRIPT_MODE_STOPPED 0
#define SCRIPT_MODE_BYTECODE 1
@ -61,9 +62,9 @@ typedef struct ScriptEnvironment {
LocalMapObject *unk_34;
SCRIPTCONTEXT *scriptContexts[3];
MessageFormat *msgfmt;
STRING *strbuf1;
STRING *strbuf2;
struct WaitingIconManager *unk_50;
STRING *stringBuffer0;
STRING *stringBuffer1;
WaitingIcon *waitingIcon;
EngagedTrainer engagedTrainers[2];
u16 specialVars[NUM_SPECIAL_VARS];
void (*scrctx_end_cb)(FieldSystem *fsys);
@ -93,9 +94,9 @@ typedef enum ScriptEnvField {
SCRIPTENV_SCRIPT_CONTEXT_0,
SCRIPTENV_SCRIPT_CONTEXT_1,
SCRIPTENV_SCRIPT_CONTEXT_2,
SCRIPTENV_MSGFMT = 16,
SCRIPTENV_STRBUF1 = 17,
SCRIPTENV_STRBUF2 = 18,
SCRIPTENV_MESSAGE_FORMAT,
SCRIPTENV_STRING_BUFFER_0,
SCRIPTENV_STRING_BUFFER_1,
SCRIPTENV_WAITING_ICON = 19,
SCRIPTENV_AC = 20,
SCRIPTENV_GENERIC_WORK_PTR = 21,

View File

@ -39,7 +39,7 @@ Static main
Object asm/unk_0200CE7C.o
Object asm/unk_0200CF18.o
Object asm/unk_0200E320.o
Object asm/unk_0200E398.o
Object asm/render_window.o
Object asm/unk_0200FA24.o
Object asm/unk_0201010C.o
Object asm/unk_02012DD8.o

View File

@ -19,7 +19,7 @@
#include "unk_02026E30.h"
#include "unk_0201F4C4.h"
#include "unk_02009D48.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_02025154.h"
#include "unk_02020B8C.h"
#include "unk_02013FDC.h"

View File

@ -9,7 +9,7 @@
#include "window.h"
#include "font.h"
#include "text.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200B380.h"
#include "unk_02037C94.h"
#include "overlay_00_thumb.h"

View File

@ -12,7 +12,7 @@
#include "unk_0200FA24.h"
#include "unk_02035900.h"
#include "unk_02037C94.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200B380.h"
#include "text.h"
#include "font.h"

View File

@ -3,7 +3,7 @@
#include "unk_0200FA24.h"
#include "field_black_out.h"
#include "system.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "font.h"
#include "text.h"
#include "save_flypoints.h"

View File

@ -15,7 +15,7 @@
#include "unk_02054E00.h"
#include "metatile_behavior.h"
#include "unk_0203E348.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200FA24.h"
#include "text.h"
#include "field_alph_checks.h"

View File

@ -103,8 +103,8 @@ BOOL Task_RunScripts(TaskManager *taskman) {
env->scriptContexts[0] = CreateScriptContext(fsys, env->activeScriptNumber);
env->activeScriptContextCount = 1;
env->msgfmt = MessageFormat_new_custom(8, 64, HEAP_ID_FIELDMAP);
env->strbuf1 = String_ctor(1024, HEAP_ID_FIELDMAP);
env->strbuf2 = String_ctor(1024, HEAP_ID_FIELDMAP);
env->stringBuffer0 = String_ctor(1024, HEAP_ID_FIELDMAP);
env->stringBuffer1 = String_ctor(1024, HEAP_ID_FIELDMAP);
env->state++;
// fallthrough
case 1:
@ -124,8 +124,8 @@ BOOL Task_RunScripts(TaskManager *taskman) {
if (env->activeScriptContextCount == 0) {
void (*callback)(FieldSystem *a0) = env->scrctx_end_cb;
MessageFormat_delete(env->msgfmt);
String_dtor(env->strbuf1);
String_dtor(env->strbuf2);
String_dtor(env->stringBuffer0);
String_dtor(env->stringBuffer1);
env->check = 0;
FreeToHeap(env);
if (callback != NULL) {
@ -247,14 +247,14 @@ void *FieldSysGetAttrAddrInternal(ScriptEnvironment *environment, enum ScriptEnv
case SCRIPTENV_SCRIPT_CONTEXT_1:
case SCRIPTENV_SCRIPT_CONTEXT_2:
return &environment->scriptContexts[field - SCRIPTENV_SCRIPT_CONTEXT_0];
case SCRIPTENV_MSGFMT:
case SCRIPTENV_MESSAGE_FORMAT:
return &environment->msgfmt;
case SCRIPTENV_STRBUF1:
return &environment->strbuf1;
case SCRIPTENV_STRBUF2:
return &environment->strbuf2;
case SCRIPTENV_STRING_BUFFER_0:
return &environment->stringBuffer0;
case SCRIPTENV_STRING_BUFFER_1:
return &environment->stringBuffer1;
case SCRIPTENV_WAITING_ICON:
return &environment->unk_50;
return &environment->waitingIcon;
case SCRIPTENV_AC:
return &environment->unk_AC;
case SCRIPTENV_GENERIC_WORK_PTR:

View File

@ -1,3 +1,4 @@
#include "global.h"
#include "event_data.h"
#include "game_stats.h"
#include "party.h"
@ -25,6 +26,7 @@
#include "constants/sndseq.h"
#include "credits/credits.h"
#include "msgdata/msg/msg_0040.h"
#include "render_window.h"
#define WAIT_SE_SAVE_FRAMES 32
#define SCREEN_FADEOUT_FRAMES 32
@ -36,7 +38,7 @@ typedef struct {
BGCONFIG *bgConfig;
WINDOW window;
STRING *windowText;
struct WaitingIconManager *waitIconMgr;
WaitingIcon *waitingIcon;
int printerId;
int timer;
BOOL vsTrainerRed;
@ -296,7 +298,7 @@ void Task_GameClear(TaskManager *taskman, u16 vsTrainerRed) {
static void GameClearSave_InitGraphics(FieldSystem *fsys, GameClearWork *env) {
env->bgConfig = BgConfig_Alloc(11);
env->windowText = NULL;
env->waitIconMgr = NULL;
env->waitingIcon = NULL;
InitWindow(&env->window);
GX_SetBanks(&sGameClearSaveBanksConfig);
GX_SetDispSelect(GX_DISP_SELECT_MAIN_SUB);
@ -314,7 +316,7 @@ static void GameClearSave_PrintSaving(FieldSystem *fsys, GameClearWork *env) {
sub_0205B514(env->bgConfig, &env->window, 3);
sub_0205B564(&env->window, options);
env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1);
env->waitIconMgr = sub_0200F0AC(&env->window, 0x000003e2);
env->waitingIcon = WaitingIcon_new(&env->window, 0x000003e2);
}
static BOOL GameClearSave_IsPrintFinished(GameClearWork *env) {
@ -323,7 +325,7 @@ static BOOL GameClearSave_IsPrintFinished(GameClearWork *env) {
static void sub_02052E70(GameClearWork *env) {
String_dtor(env->windowText);
sub_0200F450(env->waitIconMgr);
sub_0200F450(env->waitingIcon);
sub_0205B5A8(&env->window);
}

View File

@ -3,7 +3,7 @@
#include "system.h"
#include "text.h"
#include "unk_02005D10.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "constants/sndseq.h"
#include "msgdata/msg/msg_0191.h"

View File

@ -12,7 +12,7 @@
#include "window.h"
#include "text.h"
#include "font.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200B380.h"
static const GF_GXBanksConfig sDataReadErrorBanksConfig = {

View File

@ -11,7 +11,7 @@
#include "unk_0200FA24.h"
#include "window.h"
#include "font.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200B380.h"
#include "text.h"

View File

@ -13,7 +13,7 @@ BOOL ScrCmd_GetStaticEncounterOutcomeFlag(SCRIPTCONTEXT *ctx) {
}
BOOL ScrCmd_465(SCRIPTCONTEXT *ctx) {
MessageFormat **msg = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **msg = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
SAV_FRIEND_GRP *group = Save_FriendGroup_get(ctx->fsys->savedata);
SAVEDATA *save = ctx->fsys->savedata;

View File

@ -9,7 +9,7 @@
#include "system.h"
#include "task.h"
#include "text.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_02035900.h"
#include "unk_0205A44C.h"
#include "unk_020658D4.h"
@ -91,6 +91,7 @@
#include "constants/accessories.h"
#include "constants/phone_contacts.h"
#include "constants/trainers.h"
#include "render_window.h"
FS_EXTERN_OVERLAY(OVY_26);
FS_EXTERN_OVERLAY(npc_trade);
@ -766,9 +767,9 @@ BOOL ScrCmd_DirectionSignpost(SCRIPTCONTEXT* ctx) {
u8 unk2;
FieldSystem* fsys = ctx->fsys;
STRING** tmp_str = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRBUF2);
STRING** unk1 = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRBUF1);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
STRING** tmp_str = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRING_BUFFER_1);
STRING** unk1 = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRING_BUFFER_0);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 msg_no = ScriptReadByte(ctx);
unk2 = ScriptReadByte(ctx);
u16 arrow = ScriptReadHalfword(ctx);
@ -827,9 +828,9 @@ static BOOL sub_02041520(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_TrainerTips(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
u8* printer_id_ptr = FieldSysGetAttrAddr(fsys, SCRIPTENV_TEXT_PRINTER_NUMBER);
STRING** tmp_str = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRBUF2);
STRING** unk = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRBUF1);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
STRING** tmp_str = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRING_BUFFER_1);
STRING** unk = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRING_BUFFER_0);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 msg_no = ScriptReadByte(ctx);
u16 result_var_id = ScriptReadHalfword(ctx);
@ -959,20 +960,20 @@ BOOL sub_020416E4(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_AddWaitingIcon(SCRIPTCONTEXT *ctx) {
WINDOW *window = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_WINDOW);
struct WaitingIconManager **mgr_p = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_WAITING_ICON);
*mgr_p = sub_0200F0AC(window, 0x3E2);
WaitingIcon **waitingIcon = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_WAITING_ICON);
*waitingIcon = WaitingIcon_new(window, 0x3E2);
return FALSE;
}
BOOL ScrCmd_RemoveWaitingIcon(SCRIPTCONTEXT *ctx) {
struct WaitingIconManager **mgr_p = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_WAITING_ICON);
sub_0200F450(*mgr_p);
WaitingIcon **waitingIcon = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_WAITING_ICON);
sub_0200F450(*waitingIcon);
return FALSE;
}
void sub_02041770(SCRIPTCONTEXT *ctx, struct UnkStruct_ov01_021EDC28 **a1, MSGDATA *msgData) {
FieldSystem *fsys = ctx->fsys;
MessageFormat **msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat **msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 x = ScriptReadByte(ctx);
u8 y = ScriptReadByte(ctx);
u8 initCursorPos = ScriptReadByte(ctx);
@ -2159,7 +2160,7 @@ BOOL ScrCmd_PromptEasyChat(SCRIPTCONTEXT *ctx) {
}
BOOL ScrCmd_494(SCRIPTCONTEXT *ctx) {
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16 idx = ScriptGetVar(ctx);
u16 word = ScriptGetVar(ctx);
BufferECWord(*p_msgFmt, idx, word);
@ -2383,7 +2384,7 @@ BOOL ScrCmd_TrainerMessage(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;
u16 *p_scripno = FieldSysGetAttrAddr(fsys, SCRIPTENV_ACTIVE_SCRIPT_NUMBER);
STRING **p_strbuf1 = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRBUF1);
STRING **p_strbuf1 = FieldSysGetAttrAddr(fsys, SCRIPTENV_STRING_BUFFER_0);
u8 *p_printerno = FieldSysGetAttrAddr(fsys, SCRIPTENV_TEXT_PRINTER_NUMBER);
u16 trainerno = ScriptGetVar(ctx);
u16 msgno = ScriptGetVar(ctx);
@ -2499,7 +2500,7 @@ BOOL ScrCmd_GetDynamicWarpFloorNo(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_ElevatorCurFloorBox(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 x = ScriptReadByte(ctx);
u8 y = ScriptReadByte(ctx);
u16 *p_ret = ScriptGetVarPointer(ctx);
@ -2658,7 +2659,7 @@ BOOL ScrCmd_258(SCRIPTCONTEXT *ctx) {
}
BOOL ScrCmd_259(SCRIPTCONTEXT *ctx) {
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16 *p_ret = ScriptGetVarPointer(ctx);
*p_ret = sub_0205A6AC(*p_msgFmt);
@ -2667,7 +2668,7 @@ BOOL ScrCmd_259(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_260(SCRIPTCONTEXT *ctx) {
u16 *p_ret = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
*p_ret = sub_0205A9A0(ctx->fsys->unk80, *p_msgFmt);
return FALSE;
@ -2688,7 +2689,7 @@ BOOL ScrCmd_261(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_264(SCRIPTCONTEXT *ctx) {
LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_LAST_INTERACTED);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16 r4 = ScriptReadHalfword(ctx);
PLAYERPROFILE *profile = Sav2_PlayerData_GetProfileAddr(FieldSys_GetSaveDataPtr(ctx->fsys));
SAVE_EASY_CHAT_T *easyChat = SaveData_EasyChat_get(FieldSys_GetSaveDataPtr(ctx->fsys));
@ -2725,7 +2726,7 @@ BOOL ScrCmd_267(SCRIPTCONTEXT *ctx) {
LocalMapObject **p_lastInteracted = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_LAST_INTERACTED);
u16 sp0 = ScriptReadHalfword(ctx);
u16 *p_ret = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
*p_ret = sub_0205A750(ctx->fsys->unk80, MapObject_GetID(*p_lastInteracted), sp0, *p_msgFmt);
return FALSE;
}
@ -2856,7 +2857,7 @@ BOOL ScrCmd_286(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_287(SCRIPTCONTEXT *ctx) {
PLAYERPROFILE *profile = Sav2_PlayerData_GetProfileAddr(FieldSys_GetSaveDataPtr(ctx->fsys));
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
sub_0205B3DC(
PlayerProfile_GetTrainerID(profile),
PlayerProfile_GetTrainerGender(profile),
@ -3840,7 +3841,7 @@ BOOL ScrCmd_530(SCRIPTCONTEXT *ctx) {
}
BOOL ScrCmd_BufferBackgroundName(SCRIPTCONTEXT *ctx) {
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 bufferId = ScriptReadByte(ctx);
u16 backgroundId = ScriptGetVar(ctx);
BufferContestBackgroundName(*p_msgFmt, bufferId, backgroundId);
@ -3868,7 +3869,7 @@ BOOL ScrCmd_537(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_538(SCRIPTCONTEXT *ctx) {
u16 *p_ret = ScriptGetVarPointer(ctx);
u16 wordIdx = ScriptGetVar(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
int trendy = SaveEasyChat_RandomTrendySayingSet(SaveData_EasyChat_get(ctx->fsys->savedata));
if (trendy == 32) {
*p_ret = 0xFFFF;
@ -4066,7 +4067,7 @@ BOOL ScrCmd_573(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_576(SCRIPTCONTEXT *ctx) {
FieldSystem *fsys = ctx->fsys;
u16 *p_ret = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
*p_ret = sub_0205A6AC(*p_msgFmt);
return FALSE;
}
@ -5283,14 +5284,14 @@ BOOL ScrCmd_CheckBankBalance(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_BufferRulesetName(SCRIPTCONTEXT *ctx) {
u16 ruleset = ScriptReadHalfword(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
ov03_022566D0(ctx->fsys, *p_msgFmt, ruleset);
return FALSE;
}
BOOL ScrCmd_799(SCRIPTCONTEXT *ctx) {
u16 *p_var = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
ov03_022566D0(ctx->fsys, *p_msgFmt, *p_var);
return FALSE;
}
@ -5317,7 +5318,7 @@ BOOL ScrCmd_802(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_803(SCRIPTCONTEXT *ctx) {
u16 *r4 = ScriptGetVarPointer(ctx);
u16 *r6 = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
*r6 = ov03_02256A2C(ctx->fsys, *p_msgFmt, *r4);
return FALSE;
}
@ -5374,7 +5375,7 @@ BOOL ScrCmd_822(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_823(SCRIPTCONTEXT *ctx) {
u16 *p_var = ScriptGetVarPointer(ctx);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **p_msgFmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
PLAYERPROFILE *profile = PlayerProfile_new(4);
SafariZone_GetLinkLeaderToProfile(Save_SafariZone_get(ctx->fsys->savedata), profile);
BufferPlayersName(*p_msgFmt, *p_var, profile);

View File

@ -14,7 +14,7 @@ static LocalMapObject* CreateDayCareMonSpriteInternal(MapObjectMan* object_man,
BOOL ScrCmd_BufferDayCareMonNicks(SCRIPTCONTEXT* ctx) {
SAVEDATA* savedata = ctx->fsys->savedata;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
DAYCARE* daycare = Sav2_DayCare_get(savedata);
Sav2_DayCare_BufferStoredMonNicks(daycare, *msg_fmt);
@ -54,7 +54,7 @@ BOOL ScrCmd_GiveDayCareEgg(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_RetrieveDayCareMon(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
SAVEDATA* savedata = fsys->savedata;
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 daycare_mon_idx = ScriptGetVar(ctx);
@ -68,7 +68,7 @@ BOOL ScrCmd_RetrieveDayCareMon(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferDayCareWithdrawCost(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
SAVEDATA* savedata = fsys->savedata;
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 daycare_mon_idx = ScriptGetVar(ctx);
@ -81,7 +81,7 @@ BOOL ScrCmd_BufferDayCareWithdrawCost(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferDayCareMonGrowth(SCRIPTCONTEXT* ctx) {
SAVEDATA* savedata = ctx->fsys->savedata;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 daycare_mon_idx = ScriptGetVar(ctx);
DAYCARE* daycare = SavArray_get(savedata, SAVE_DAYCARE);
@ -93,7 +93,7 @@ BOOL ScrCmd_BufferDayCareMonGrowth(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_GetTailDayCareMonSpeciesAndNick(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16* ret_ptr = ScriptGetVarPointer(ctx);
DAYCARE* daycare = Sav2_DayCare_get(fsys->savedata);
@ -116,7 +116,7 @@ BOOL ScrCmd_PutMonInDayCare(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferDayCareMonStats(SCRIPTCONTEXT* ctx) {
SAVEDATA* savedata = ctx->fsys->savedata;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u16 nickname_idx = ScriptGetVar(ctx);
u16 level_idx = ScriptGetVar(ctx);
u16 gender_idx = ScriptGetVar(ctx);

View File

@ -6,7 +6,7 @@
u8 LotoId_CountDigitsMatched(u16 lotoId, u16 otid);
BOOL ScrCmd_BufferDeptStoreFloorNo(SCRIPTCONTEXT *ctx) {
MessageFormat **msg = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat **msg = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 fieldno = ScriptReadByte(ctx);
u8 floor = ScriptReadByte(ctx);
BufferDeptStoreFloorNo(*msg, fieldno, floor);

View File

@ -103,7 +103,7 @@ BOOL ScrCmd_648(SCRIPTCONTEXT *ctx) {
MSGDATA *msgdata;
FieldSystem *fsys = ctx->fsys;
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u32 unkA = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
u32 fileIndex = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
u16 unkC = ScriptReadHalfword(ctx);
@ -874,7 +874,7 @@ BOOL ScrCmd_741(SCRIPTCONTEXT *ctx) {
STRING *str;
apricornBox = Save_ApricornBox_get(ctx->fsys->savedata);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
unkVar = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
unkPtrA = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
price = GetVarPointer(ctx->fsys, ScriptReadHalfword(ctx));
@ -1198,7 +1198,7 @@ BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT *ctx) {
BOOL ScrCmd_BufferPokeathlonCourseName(SCRIPTCONTEXT *ctx) {
u8 fieldNo = *(ctx->script_ptr++);
u32 courseId = VarGet(ctx->fsys, ScriptReadHalfword(ctx));
BufferPokeathlonCourseName(*(MessageFormat**)FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT), fieldNo, (u8) courseId);
BufferPokeathlonCourseName(*(MessageFormat**)FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT), fieldNo, (u8) courseId);
return FALSE;
}
@ -1442,7 +1442,7 @@ BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT *ctx) {
MessageFormat **msgfmt;
BUGCONTEST *bugContest;
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
bugContest = FieldSys_BugContest_get(ctx->fsys);
BugContest_BufferContestWinnerNames(bugContest, ctx->msgdata, *msgfmt, *ctx->script_ptr++);
@ -1480,7 +1480,7 @@ BOOL ScrCmd_BufferBugContestMonNick(SCRIPTCONTEXT *ctx) {
BUGCONTEST *bugContest;
u32 script_index;
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
bugContest = FieldSys_BugContest_get(ctx->fsys);
script_index = *(ctx->script_ptr++);
@ -1496,7 +1496,7 @@ BOOL ScrCmd_BugContestGetTimeLeft(SCRIPTCONTEXT *ctx) {
u32 script_index;
u32 timeLeft;
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
msgfmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
script_index = *(ctx->script_ptr++);
timeLeft = 1;

View File

@ -70,7 +70,7 @@ static void FormatSizeRecord(FieldSystem *fsys, u8 idx0, u8 idx1, u16 species, u
u32 score;
u32 r4;
msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
msgFmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
score = GetMonSize(species, rand);
r4 = LengthConvertToImperial(score);
BufferIntegerAsString(*msgFmt, idx0, r4 / 10, 3, STRCONVMODE_LEFT_ALIGN, TRUE);

View File

@ -16,7 +16,7 @@
static STRING* _get_species_name(u16 species, HeapID heap_id);
BOOL ScrCmd_BufferStatName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u8 stat_id = ScriptGetVar(ctx);
@ -27,7 +27,7 @@ BOOL ScrCmd_BufferStatName(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferPlayersName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
PLAYERPROFILE* profile = Sav2_PlayerData_GetProfileAddr(FieldSys_GetSaveDataPtr(fsys));
@ -38,7 +38,7 @@ BOOL ScrCmd_BufferPlayersName(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferRivalsName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
BufferRivalsName(*msg_fmt, idx, fsys->savedata);
@ -48,7 +48,7 @@ BOOL ScrCmd_BufferRivalsName(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferFriendsName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
BufferFriendsName(*msg_fmt, idx, fsys->savedata);
@ -58,7 +58,7 @@ BOOL ScrCmd_BufferFriendsName(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferMonSpeciesName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 party_mon_idx = ScriptGetVar(ctx);
@ -70,7 +70,7 @@ BOOL ScrCmd_BufferMonSpeciesName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferTypeName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 type_id = ScriptGetVar(ctx);
@ -80,7 +80,7 @@ BOOL ScrCmd_BufferTypeName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferItemName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 item_id = ScriptGetVar(ctx);
@ -90,7 +90,7 @@ BOOL ScrCmd_BufferItemName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferPocketName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 pocket_id = ScriptGetVar(ctx);
@ -100,7 +100,7 @@ BOOL ScrCmd_BufferPocketName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferTMHMMoveName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 move_id = ScriptGetVar(ctx);
@ -110,7 +110,7 @@ BOOL ScrCmd_BufferTMHMMoveName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferMoveName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 move_id = ScriptGetVar(ctx);
@ -120,7 +120,7 @@ BOOL ScrCmd_BufferMoveName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferInt(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 number = ScriptGetVar(ctx);
@ -130,7 +130,7 @@ BOOL ScrCmd_BufferInt(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferIntEx(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 number = ScriptGetVar(ctx);
u8 str_conv_mode = ScriptReadByte(ctx);
@ -147,7 +147,7 @@ BOOL ScrCmd_BufferIntEx(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_661(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u32 number = ScriptReadWord(ctx);
u8 str_conv_mode = ScriptReadByte(ctx);
@ -165,7 +165,7 @@ BOOL ScrCmd_661(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferPartyMonNick(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 party_mon_idx = ScriptGetVar(ctx);
@ -179,7 +179,7 @@ BOOL ScrCmd_BufferPartyMonNick(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferBoxMonNick(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
PC_STORAGE* pc = GetStoragePCPointer(fsys->savedata);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 box_mon_slot = ScriptGetVar(ctx);
@ -190,7 +190,7 @@ BOOL ScrCmd_BufferBoxMonNick(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferTrainerClassName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 trainer_class_id = ScriptGetVar(ctx);
@ -203,7 +203,7 @@ BOOL ScrCmd_BufferPlayerUnionAvatarClassName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
SAVEDATA* savedata = FieldSys_GetSaveDataPtr(fsys);
PLAYERPROFILE* profile = Sav2_PlayerData_GetProfileAddr(savedata);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u32 gender = PlayerProfile_GetTrainerGender(profile);
u8 avatar = PlayerProfile_GetAvatar(profile);
@ -214,7 +214,7 @@ BOOL ScrCmd_BufferPlayerUnionAvatarClassName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferSpeciesName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 species = ScriptGetVar(ctx);
u16 unk2 = ScriptReadHalfword(ctx);
@ -235,7 +235,7 @@ STRING* _get_species_name(u16 species, HeapID heap_id) {
}
BOOL ScrCmd_BufferStarterSpeciesName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 species = GetStarterFromScriptState(SavArray_Flags_get(ctx->fsys->savedata));
@ -247,7 +247,7 @@ BOOL ScrCmd_BufferStarterSpeciesName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferDPPtRivalStarterSpeciesName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 species = DPPtLeftover_GetRivalSpecies(SavArray_Flags_get(ctx->fsys->savedata));
@ -259,7 +259,7 @@ BOOL ScrCmd_BufferDPPtRivalStarterSpeciesName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferDPPtFriendStarterSpeciesName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 species = DPPtLeftover_GetFriendStarterSpecies(SavArray_Flags_get(ctx->fsys->savedata));
@ -271,7 +271,7 @@ BOOL ScrCmd_BufferDPPtFriendStarterSpeciesName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferDecorationName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 decoration_id = ScriptGetVar(ctx);
@ -282,7 +282,7 @@ BOOL ScrCmd_BufferDecorationName(SCRIPTCONTEXT* ctx) {
// This may be what's left of ScrCmd_GetUndergroundTrapName from D/P/Pt.
BOOL ScrCmd_208(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 unused_id = ScriptGetVar(ctx);
@ -291,7 +291,7 @@ BOOL ScrCmd_208(SCRIPTCONTEXT* ctx) {
// This may be what's left of ScrCmd_GetUndergroundItemName from D/P/Pt.
BOOL ScrCmd_209(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 unused_id = ScriptGetVar(ctx);
@ -300,7 +300,7 @@ BOOL ScrCmd_209(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferMapSecName(SCRIPTCONTEXT* ctx) {
STRING* str = String_ctor(22, 4);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 mapno = ScriptGetVar(ctx);
@ -312,7 +312,7 @@ BOOL ScrCmd_BufferMapSecName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferBerryName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 berry_id = ScriptGetVar(ctx);
u16 unk = ScriptGetVar(ctx);
@ -325,7 +325,7 @@ BOOL ScrCmd_BufferBerryName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferNatureName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 nature_id = ScriptGetVar(ctx);
@ -335,7 +335,7 @@ BOOL ScrCmd_BufferNatureName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferFashionName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 fashion_id = ScriptGetVar(ctx);
@ -346,7 +346,7 @@ BOOL ScrCmd_BufferFashionName(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferPartyMonMoveName(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 party_slot = ScriptGetVar(ctx);
u16 move_slot = ScriptGetVar(ctx);
@ -360,7 +360,7 @@ BOOL ScrCmd_BufferPartyMonMoveName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferRibbonName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u8 unk = ScriptGetVar(ctx);
@ -371,7 +371,7 @@ BOOL ScrCmd_BufferRibbonName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferSealName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 seal_id = ScriptGetVar(ctx);
@ -381,7 +381,7 @@ BOOL ScrCmd_BufferSealName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferTrainerName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 trainer_id = ScriptGetVar(ctx);
@ -391,7 +391,7 @@ BOOL ScrCmd_BufferTrainerName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferApricornName(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u8 apricorn_id = ScriptGetVar(ctx);
@ -401,7 +401,7 @@ BOOL ScrCmd_BufferApricornName(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferItemNameIndef(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 item_id = ScriptGetVar(ctx);
@ -411,7 +411,7 @@ BOOL ScrCmd_BufferItemNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferItemNamePlural(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 item_id = ScriptGetVar(ctx);
@ -422,7 +422,7 @@ BOOL ScrCmd_BufferItemNamePlural(SCRIPTCONTEXT* ctx) {
BOOL ScrCmd_BufferPartyMonSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
FieldSystem* fsys = ctx->fsys;
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 party_mon_slot = ScriptGetVar(ctx);
@ -434,7 +434,7 @@ BOOL ScrCmd_BufferPartyMonSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 item_id = ScriptGetVar(ctx);
u16 unused1 = ScriptReadHalfword(ctx);
@ -446,7 +446,7 @@ BOOL ScrCmd_BufferSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferDPPtFriendStarterSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 species = DPPtLeftover_GetFriendStarterSpecies(SavArray_Flags_get(ctx->fsys->savedata));
@ -456,7 +456,7 @@ BOOL ScrCmd_BufferDPPtFriendStarterSpeciesNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferFashionNameIndef(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 fashion_id = ScriptGetVar(ctx);
@ -466,7 +466,7 @@ BOOL ScrCmd_BufferFashionNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferTrainerClassNameIndef(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 trainer_class_id = ScriptGetVar(ctx);
@ -476,7 +476,7 @@ BOOL ScrCmd_BufferTrainerClassNameIndef(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_BufferSealNamePlural(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
u16 seal_id = ScriptGetVar(ctx);
@ -486,7 +486,7 @@ BOOL ScrCmd_BufferSealNamePlural(SCRIPTCONTEXT* ctx) {
}
BOOL ScrCmd_Capitalize(SCRIPTCONTEXT* ctx) {
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MSGFMT);
MessageFormat** msg_fmt = FieldSysGetAttrAddr(ctx->fsys, SCRIPTENV_MESSAGE_FORMAT);
u8 idx = ScriptReadByte(ctx);
MessageFormat_UpperFirstChar(*msg_fmt, idx);

View File

@ -17,7 +17,7 @@
#include "unk_02009D48.h"
#include "unk_0200B380.h"
#include "unk_0200CF18.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200FA24.h"
#include "unk_0201660C.h"
#include "unk_020183F0.h"

View File

@ -8,7 +8,7 @@
#include "unk_0200FA24.h"
#include "wfc_user_info_warning.h"
#include "window.h"
#include "unk_0200E398.h"
#include "render_window.h"
#include "unk_0200B380.h"
#include "text.h"
#include "font.h"