mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
commit
f4af987c01
3520
asm/frontier_pass.s
3520
asm/frontier_pass.s
File diff suppressed because it is too large
Load Diff
@ -1,229 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.macro unk_trainer_card_struct text1, text2, short1, short2, short3, short4
|
||||
.4byte \text1
|
||||
.4byte \text2
|
||||
.2byte \short1
|
||||
.2byte \short2
|
||||
.2byte \short3
|
||||
.2byte \short4
|
||||
.endm
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB7C:: @ 856FB7C
|
||||
.incbin "graphics/frontier_pass/map_heads.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FB9C:: @ 856FB9C
|
||||
.incbin "graphics/frontier_pass/map_heads_female.gbapal"
|
||||
|
||||
.align 2
|
||||
gUnknown_0856FBBC:: @ 856FBBC
|
||||
.incbin "graphics/frontier_pass/map_screen.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gFrontierPassCursor_Gfx:: @ 8570BA8
|
||||
.incbin "graphics/frontier_pass/cursor.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_08570C44:: @ 8570C44
|
||||
.incbin "graphics/frontier_pass/map_heads.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gFrontierPassMapCursor_Gfx:: @ 8570D00
|
||||
.incbin "graphics/frontier_pass/map_cursor.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_08570E00:: @ 8570E00
|
||||
.incbin "graphics/frontier_pass/map_screen.bin.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_08571060:: @ 8571060
|
||||
.incbin "graphics/frontier_pass/small_map_and_card.bin.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_08571298:: @ 8571298
|
||||
.incbin "graphics/frontier_pass/unknown_571298.bin"
|
||||
|
||||
.align 2
|
||||
gUnknown_085712C0:: @ 85712C0
|
||||
.incbin "graphics/frontier_pass/record_frame.bin.lz"
|
||||
|
||||
.align 2
|
||||
gUnknown_085712F8:: @ 85712F8
|
||||
.incbin "graphics/frontier_pass/small_map_and_card_affine.bin.lz"
|
||||
|
||||
gUnknown_085713E0:: @ 85713E0
|
||||
.2byte 0x00d8, 0x0020, 0x00d8, 0x0080
|
||||
|
||||
.align 2
|
||||
gUnknown_085713E8:: @ 85713E8
|
||||
.4byte 0x000011f8, 0x000021e1, 0x00000bd6
|
||||
|
||||
.align 2
|
||||
gUnknown_085713F4:: @ 85713F4
|
||||
.4byte 0x000001f8, 0x000011e1, 0x000021d2
|
||||
|
||||
.align 2
|
||||
gUnknown_08571400:: @ 8571400
|
||||
window_template 0x00, 0x02, 0x03, 0x0c, 0x03, 0x0f, 0x0001
|
||||
window_template 0x00, 0x02, 0x0a, 0x0c, 0x03, 0x0f, 0x0026
|
||||
window_template 0x00, 0x02, 0x0d, 0x0c, 0x04, 0x0f, 0x004b
|
||||
window_template 0x00, 0x00, 0x12, 0x1e, 0x03, 0x0f, 0x007c
|
||||
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
|
||||
|
||||
.align 2
|
||||
gUnknown_08571428:: @ 8571428
|
||||
window_template 0x00, 0x00, 0x01, 0x0f, 0x05, 0x0f, 0x0001
|
||||
window_template 0x00, 0x14, 0x01, 0x0a, 0x0e, 0x0f, 0x004d
|
||||
window_template 0x00, 0x02, 0x10, 0x1a, 0x04, 0x0f, 0x00da
|
||||
window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000
|
||||
|
||||
gUnknown_08571448:: @ 8571448
|
||||
.byte 0x00, 0x02, 0x03
|
||||
|
||||
gUnknown_0857144B:: @ 857144B
|
||||
.byte 0x00, 0x01, 0x09
|
||||
|
||||
gUnknown_0857144E:: @ 857144E
|
||||
.byte 0x00, 0x04, 0x05
|
||||
|
||||
.align 2
|
||||
gUnknown_08571454:: @ 8571454
|
||||
.2byte 0x001c, 0x004c, 0x0084, 0x00dc, 0x0054, 0x0084, 0x0084, 0x00dc, 0x0050, 0x0066, 0x0014, 0x006c, 0x0000, 0x0010, 0x0098, 0x00f0
|
||||
.2byte 0x006c, 0x0086, 0x0014, 0x006c, 0x0018, 0x0030, 0x0014, 0x006c, 0x0032, 0x0042, 0x0014, 0x0024, 0x0042, 0x0052, 0x0020, 0x0030
|
||||
.2byte 0x0032, 0x0042, 0x002c, 0x003c, 0x0042, 0x0052, 0x0038, 0x0048, 0x0032, 0x0042, 0x0044, 0x0054, 0x0042, 0x0052, 0x0050, 0x0060
|
||||
.2byte 0x0032, 0x0042, 0x005c, 0x006c
|
||||
|
||||
.align 2
|
||||
gUnknown_085714BC:: @ 85714BC
|
||||
obj_tiles gFrontierPassCursor_Gfx, 0x100, 0
|
||||
obj_tiles gFrontierPassMapCursor_Gfx, 0x400, 1
|
||||
obj_tiles gFrontierPassMedals_Gfx, 0x380, 2
|
||||
|
||||
.align 2
|
||||
gUnknown_085714D4:: @ 85714D4
|
||||
obj_tiles gUnknown_08570C44, 0x100, 4
|
||||
null_obj_tiles
|
||||
|
||||
.align 2
|
||||
gUnknown_085714E4:: @ 85714E4
|
||||
obj_pal gFrontierPassCursor_Pal, 0
|
||||
obj_pal gFrontierPassMapCursor_Pal, 1
|
||||
obj_pal gFrontierPassMedalsSilver_Pal, 2
|
||||
obj_pal gFrontierPassMedalsGold_Pal, 3
|
||||
obj_pal gUnknown_0856FB7C, 4
|
||||
obj_pal gUnknown_0856FB9C, 5
|
||||
null_obj_pal
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_857151C:: @ 857151C
|
||||
.2byte 0x0000, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8571524:: @ 8571524
|
||||
.2byte 0x0000, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_857152C:: @ 857152C
|
||||
.2byte 0x0004, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8571534:: @ 8571534
|
||||
.2byte 0x0008, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_857153C:: @ 857153C
|
||||
.2byte 0x000c, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8571544:: @ 8571544
|
||||
.2byte 0x0010, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_857154C:: @ 857154C
|
||||
.2byte 0x0014, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8571554:: @ 8571554
|
||||
.2byte 0x0018, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_857155C:: @ 857155C
|
||||
.2byte 0x0000, 0x002d, 0x0008, 0x002d, 0xfffe, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8571568:: @ 8571568
|
||||
.2byte 0x0010, 0x002d, 0x0018, 0x002d, 0xfffe, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_08571574:: @ 8571574
|
||||
.4byte gSpriteAnim_8571524
|
||||
.4byte gSpriteAnim_857152C
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_0857157C:: @ 857157C
|
||||
.4byte gSpriteAnim_8571524
|
||||
.4byte gSpriteAnim_857152C
|
||||
.4byte gSpriteAnim_8571534
|
||||
.4byte gSpriteAnim_857153C
|
||||
.4byte gSpriteAnim_8571544
|
||||
.4byte gSpriteAnim_857154C
|
||||
.4byte gSpriteAnim_8571554
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_08571598:: @ 8571598
|
||||
.4byte gSpriteAnim_857155C
|
||||
.4byte gSpriteAnim_8571568
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_085715A0:: @ 85715A0
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_085715B0:: @ 85715B0
|
||||
.4byte gSpriteAffineAnim_085715A0
|
||||
|
||||
.align 2
|
||||
gUnknown_085715B4:: @ 85715B4
|
||||
spr_template 0, 0, gUnknown_0852490C, gSpriteAnimTable_08571574, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
spr_template 1, 1, gUnknown_08524934, gSpriteAnimTable_08571598, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_085715E4:: @ 85715E4
|
||||
spr_template 2, 2, gUnknown_0852490C, gSpriteAnimTable_0857157C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
.align 2
|
||||
gUnknown_085715FC:: @ 85715FC
|
||||
spr_template 4, 4, gUnknown_0852490C, gSpriteAnimTable_08571574, NULL, gDummySpriteAffineAnimTable, nullsub_39
|
||||
|
||||
.align 2
|
||||
gUnknown_08571614:: @ 8571614
|
||||
.4byte gUnknown_085EDA96
|
||||
.4byte gUnknown_085ED932
|
||||
.4byte gUnknown_085ED94D
|
||||
.4byte gUnknown_085ED961
|
||||
.4byte gUnknown_085ED977
|
||||
.4byte gUnknown_085ED993
|
||||
.4byte gUnknown_085ED9AF
|
||||
.4byte gUnknown_085ED9C7
|
||||
.4byte gUnknown_085ED9E5
|
||||
.4byte gUnknown_085EDA02
|
||||
.4byte gUnknown_085EDA21
|
||||
.4byte gUnknown_085EDA3C
|
||||
.4byte gUnknown_085EDA5E
|
||||
.4byte gUnknown_085EDA78
|
||||
.4byte gUnknown_085ED931
|
||||
|
||||
.align 2
|
||||
gUnknown_08571650:: @ 8571650
|
||||
unk_trainer_card_struct gUnknown_085EDAB1, gUnknown_085EDB0F, 0x59, 0x28, 1, 0
|
||||
unk_trainer_card_struct gUnknown_085EDABE, gUnknown_085EDB4E, 0x21, 0x2A, 1, 0
|
||||
unk_trainer_card_struct gUnknown_085EDACA, gUnknown_085EDB8B, 0x78, 0x56, 0, 0
|
||||
unk_trainer_card_struct gUnknown_085EDAD8, gUnknown_085EDBC2, 0x72, 0x3B, 0, 0
|
||||
unk_trainer_card_struct gUnknown_085EDAE5, gUnknown_085EDC00, 0x19, 0x43, 0, 0
|
||||
unk_trainer_card_struct gUnknown_085EDAF4, gUnknown_085EDC45, 0x39, 0x39, 1, 0
|
||||
unk_trainer_card_struct gUnknown_085EDB00, gUnknown_085EDC84, 0x86, 0x29, 1, 0
|
@ -61,7 +61,7 @@ s32 GetBgX(u8 bg);
|
||||
s32 ChangeBgY(u8 bg, s32 value, u8 op);
|
||||
s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
|
||||
s32 GetBgY(u8 bg);
|
||||
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
|
||||
void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
|
||||
u8 Unused_AdjustBgMosaic(u8 a1, u8 a2);
|
||||
void SetBgTilemapBuffer(u8 bg, void *tilemap);
|
||||
void UnsetBgTilemapBuffer(u8 bg);
|
||||
|
7
include/frontier_pass.h
Normal file
7
include/frontier_pass.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef GUARD_FRONTIER_PASS_H
|
||||
#define GUARD_FRONTIER_PASS_H
|
||||
|
||||
void ShowFrontierPass(void (*callback)(void));
|
||||
void CB2_ReshowFrontierPass(void);
|
||||
|
||||
#endif // GUARD_FRONTIER_PASS_H
|
@ -4860,4 +4860,18 @@ extern const u32 gUnknown_08DD228C[];
|
||||
extern const u32 gUnknown_08DD2E5C[];
|
||||
extern const u32 gUnknown_08DD1F78[];
|
||||
|
||||
// Frontier Pass
|
||||
extern const u32 gUnknown_08DE08C8[];
|
||||
extern const u32 gUnknown_08DE2084[];
|
||||
extern const u32 gUnknown_08DE3350[];
|
||||
extern const u32 gUnknown_08DE3374[];
|
||||
extern const u32 gUnknown_08DE3060[];
|
||||
extern const u32 gFrontierPassMedals_Gfx[];
|
||||
extern const u16 gUnknown_08DE07C8[][16];
|
||||
extern const u16 gFrontierPassCursor_Pal[];
|
||||
extern const u16 gFrontierPassMedalsGold_Pal[];
|
||||
extern const u16 gFrontierPassMedalsSilver_Pal[];
|
||||
extern const u16 gFrontierPassMapCursor_Pal[];
|
||||
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
@ -63,7 +63,7 @@ void TintPlttBuffer(u32, s8, s8, s8);
|
||||
void UnfadePlttBuffer(u32);
|
||||
void BeginFastPaletteFade(u8);
|
||||
void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
|
||||
void BlendPalettes(u32, u8, u16);
|
||||
void BlendPalettes(u32 selectedPalettes, u8 coeff, u16 color);
|
||||
void BlendPalettesUnfaded(u32, u8, u16);
|
||||
void sub_80A2C44(u32 a1, s8 a2, u8 a3, u8 a4, u16 a5, u8 a6, u8 a7);
|
||||
void TintPalette_GrayScale(u16 *palette, u16 count);
|
||||
|
@ -25,6 +25,7 @@ struct PokemonStorage
|
||||
|
||||
extern struct PokemonStorage *gPokemonStoragePtr;
|
||||
|
||||
void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4);
|
||||
u8 CountMonsInBox(u8 boxId);
|
||||
s16 GetFirstFreeBoxSpot(u8 boxId);
|
||||
u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore);
|
||||
|
@ -34,7 +34,7 @@ u8 *StringFill(u8 *dest, u8 c, u16 n);
|
||||
u8 *StringCopyPadded(u8 *dest, const u8 *src, u8 c, u16 n);
|
||||
u8 *StringFillWithTerminator(u8 *dest, u16 n);
|
||||
u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n);
|
||||
u32 StringLength_Multibyte(u8 *str);
|
||||
u32 StringLength_Multibyte(const u8 *str);
|
||||
u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color);
|
||||
bool32 IsStringJapanese(u8 *str);
|
||||
bool32 sub_800924C(u8 *str, s32 n);
|
||||
|
@ -2248,4 +2248,39 @@ extern const u8 gText_Var1DarkLightGreyBP[];
|
||||
extern const u8 gText_BattleTower[];
|
||||
extern const u8 gText_BattlePtsWon[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
// Frontier Pass
|
||||
extern const u8 gText_SymbolsEarned[];
|
||||
extern const u8 gText_BattleRecord[];
|
||||
extern const u8 gText_BattlePoints[];
|
||||
extern const u8 gUnknown_085EDA96[];
|
||||
extern const u8 gUnknown_085ED932[];
|
||||
extern const u8 gUnknown_085ED94D[];
|
||||
extern const u8 gUnknown_085ED961[];
|
||||
extern const u8 gUnknown_085ED977[];
|
||||
extern const u8 gUnknown_085ED993[];
|
||||
extern const u8 gUnknown_085ED9AF[];
|
||||
extern const u8 gUnknown_085ED9C7[];
|
||||
extern const u8 gUnknown_085ED9E5[];
|
||||
extern const u8 gUnknown_085EDA02[];
|
||||
extern const u8 gUnknown_085EDA21[];
|
||||
extern const u8 gUnknown_085EDA3C[];
|
||||
extern const u8 gUnknown_085EDA5E[];
|
||||
extern const u8 gUnknown_085EDA78[];
|
||||
extern const u8 gUnknown_085ED931[];
|
||||
extern const u8 gUnknown_085EDAB1[];
|
||||
extern const u8 gUnknown_085EDB0F[];
|
||||
extern const u8 gUnknown_085EDABE[];
|
||||
extern const u8 gUnknown_085EDB4E[];
|
||||
extern const u8 gUnknown_085EDACA[];
|
||||
extern const u8 gUnknown_085EDB8B[];
|
||||
extern const u8 gUnknown_085EDAD8[];
|
||||
extern const u8 gUnknown_085EDBC2[];
|
||||
extern const u8 gUnknown_085EDAE5[];
|
||||
extern const u8 gUnknown_085EDC00[];
|
||||
extern const u8 gUnknown_085EDAF4[];
|
||||
extern const u8 gUnknown_085EDC45[];
|
||||
extern const u8 gUnknown_085EDB00[];
|
||||
extern const u8 gUnknown_085EDC84[];
|
||||
|
||||
|
||||
#endif // GUARD_STRINGS_H
|
||||
|
@ -126,7 +126,6 @@ SECTIONS {
|
||||
src/pokedex.o(.text);
|
||||
src/trainer_card.o(.text);
|
||||
src/frontier_pass.o(.text);
|
||||
asm/frontier_pass.o(.text);
|
||||
src/pokemon_storage_system.o(.text);
|
||||
src/pokemon_icon.o(.text);
|
||||
src/script_movement.o(.text);
|
||||
@ -460,7 +459,7 @@ SECTIONS {
|
||||
src/option_menu.o(.rodata);
|
||||
src/pokedex.o(.rodata);
|
||||
src/trainer_card.o(.rodata);
|
||||
data/frontier_pass.o(.rodata);
|
||||
src/frontier_pass.o(.rodata);
|
||||
src/pokemon_storage_system.o(.rodata);
|
||||
src/pokemon_icon.o(.rodata);
|
||||
src/fldeff_cut.o(.rodata);
|
||||
|
4
src/bg.c
4
src/bg.c
@ -246,7 +246,7 @@ void SetTextModeAndHideBgs(void)
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, GetGpuReg(REG_OFFSET_DISPCNT) & ~DISPCNT_ALL_BG_AND_MODE_BITS);
|
||||
}
|
||||
|
||||
static void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
||||
static void SetBgAffineInternal(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
||||
{
|
||||
struct BgAffineSrcData src;
|
||||
struct BgAffineDstData dest;
|
||||
@ -777,7 +777,7 @@ s32 GetBgY(u8 bg)
|
||||
return sGpuBgConfigs2[bg].bg_y;
|
||||
}
|
||||
|
||||
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
||||
void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
||||
{
|
||||
SetBgAffineInternal(bg, srcCenterX, srcCenterY, dispCenterX, dispCenterY, scaleX, scaleY, rotationAngle);
|
||||
}
|
||||
|
1680
src/frontier_pass.c
1680
src/frontier_pass.c
File diff suppressed because it is too large
Load Diff
@ -1590,7 +1590,7 @@ const u32 gUnknown_08DE0644[] = INCBIN_U32("graphics/title_screen/title_screen2.
|
||||
|
||||
// more trainer card stuff
|
||||
|
||||
const u16 gUnknown_08DE07C8[] = INCBIN_U16("graphics/frontier_pass/tiles.gbapal");// size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well
|
||||
const u16 gUnknown_08DE07C8[][16] = INCBIN_U16("graphics/frontier_pass/tiles.gbapal");// size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but palette is only 0x100 bytes long so it loads garbage as well
|
||||
const u32 gUnknown_08DE08C8[] = INCBIN_U32("graphics/frontier_pass/tiles.4bpp.lz");
|
||||
const u32 gUnknown_08DE2084[] = INCBIN_U32("graphics/frontier_pass/tiles2.8bpp.lz");
|
||||
const u32 gUnknown_08DE3060[] = INCBIN_U32("graphics/frontier_pass/tiles.bin.lz");
|
||||
|
@ -463,8 +463,6 @@ EWRAM_DATA static u8 sMovingMonOrigBoxId = 0;
|
||||
EWRAM_DATA static u8 sMovingMonOrigBoxPos = 0;
|
||||
EWRAM_DATA static bool8 sCanOnlyMove = 0;
|
||||
|
||||
extern void sub_80C6D80(u8 *arg0, void *arg1, u8 arg2, u8 arg3, s32 arg4);
|
||||
|
||||
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
|
||||
|
||||
// This file's functions.
|
||||
@ -1543,6 +1541,76 @@ static const u8 gHandCursorTiles[] = INCBIN_U8("graphics/pokemon_storage/hand_cu
|
||||
static const u8 gHandCursorShadowTiles[] = INCBIN_U8("graphics/pokemon_storage/hand_cursor_shadow.4bpp");
|
||||
|
||||
// code
|
||||
void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4)
|
||||
{
|
||||
s32 i, val, val2;
|
||||
u16 windowId;
|
||||
u8 txtColor[3];
|
||||
u8 *tileData1, *tileData2;
|
||||
struct WindowTemplate winTemplate = {0};
|
||||
|
||||
winTemplate.width = 24;
|
||||
winTemplate.height = 2;
|
||||
windowId = AddWindow(&winTemplate);
|
||||
FillWindowPixelBuffer(windowId, (arg3 << 4) | arg3);
|
||||
tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||
tileData2 = (winTemplate.width * 32) + tileData1;
|
||||
|
||||
if (!arg2)
|
||||
txtColor[0] = 0;
|
||||
else
|
||||
txtColor[0] = arg3;
|
||||
txtColor[1] = 0xF;
|
||||
txtColor[2] = 0xE;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 1, 0, 0, txtColor, -1, string);
|
||||
|
||||
val = arg4;
|
||||
if (val > 6u)
|
||||
val = 6;
|
||||
val2 = arg4 - 6;
|
||||
if (val > 0)
|
||||
{
|
||||
for (i = val; i != 0; i--)
|
||||
{
|
||||
CpuCopy16(tileData1, dst, 0x80);
|
||||
CpuCopy16(tileData2, dst + 0x80, 0x80);
|
||||
tileData1 += 0x80;
|
||||
tileData2 += 0x80;
|
||||
dst += 0x100;
|
||||
}
|
||||
}
|
||||
|
||||
if (val2 > 0)
|
||||
CpuFill16((arg3 << 4) | arg3, dst, (u32)(val2) * 0x100);
|
||||
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
// Unused
|
||||
void sub_80C6EAC(const u8 *string, void *dst, u16 arg2, u8 arg3, u8 clr2, u8 clr3)
|
||||
{
|
||||
u32 var;
|
||||
u8 windowId;
|
||||
u8 txtColor[3];
|
||||
u8 *tileData1, *tileData2;
|
||||
struct WindowTemplate winTemplate = {0};
|
||||
|
||||
winTemplate.width = StringLength_Multibyte(string);
|
||||
winTemplate.height = 2;
|
||||
var = winTemplate.width * 32;
|
||||
windowId = AddWindow(&winTemplate);
|
||||
FillWindowPixelBuffer(windowId, (arg3 << 4) | arg3);
|
||||
tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||
tileData2 = (winTemplate.width * 32) + tileData1;
|
||||
txtColor[0] = arg3;
|
||||
txtColor[1] = clr2;
|
||||
txtColor[2] = clr3;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string);
|
||||
CpuCopy16(tileData1, dst, var);
|
||||
CpuCopy16(tileData2, dst + arg2, var);
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
u8 CountMonsInBox(u8 boxId)
|
||||
{
|
||||
u16 i, count;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "bg.h"
|
||||
#include "field_effect.h"
|
||||
#include "party_menu.h"
|
||||
#include "frontier_pass.h"
|
||||
#include "task.h"
|
||||
#include "overworld.h"
|
||||
#include "link.h"
|
||||
@ -92,8 +93,6 @@ extern void sub_808B864(void);
|
||||
extern void CB2_Pokedex(void);
|
||||
extern void PlayRainSoundEffect(void);
|
||||
extern void CB2_PokeNav(void);
|
||||
extern void ShowPlayerTrainerCard(void (*)(void));
|
||||
extern void sub_80C51C4(void (*)(void));
|
||||
extern void ScriptUnfreezeEventObjects(void);
|
||||
extern void sub_81A9EC8(void);
|
||||
extern void save_serialize_map(void);
|
||||
@ -678,7 +677,7 @@ static bool8 StartMenuPlayerNameCallback(void)
|
||||
if (is_c1_link_related_active() || InUnionRoom())
|
||||
ShowPlayerTrainerCard(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
else if (FlagGet(FLAG_SYS_FRONTIER_PASS))
|
||||
sub_80C51C4(CB2_ReturnToFieldWithOpenMenu); // Display frontier pass
|
||||
ShowFrontierPass(CB2_ReturnToFieldWithOpenMenu); // Display frontier pass
|
||||
else
|
||||
ShowPlayerTrainerCard(CB2_ReturnToFieldWithOpenMenu); // Display trainer card
|
||||
|
||||
|
@ -587,7 +587,7 @@ u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n)
|
||||
return dest;
|
||||
}
|
||||
|
||||
u32 StringLength_Multibyte(u8 *str)
|
||||
u32 StringLength_Multibyte(const u8 *str)
|
||||
{
|
||||
u32 length = 0;
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "pokedex.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "pokemon_summary_screen.h"
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "random.h"
|
||||
#include "rom_8011DC0.h"
|
||||
#include "save.h"
|
||||
@ -49,8 +50,6 @@
|
||||
|
||||
#define Trade_SendData(ptr) (SendBlock(bitmask_all_link_players_but_self(), ptr->linkData, 20))
|
||||
|
||||
extern void sub_80C6D80(const u8 *, u8 *, u8, u8, u8);
|
||||
|
||||
struct InGameTrade {
|
||||
/*0x00*/ u8 name[11];
|
||||
/*0x0C*/ u16 species;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "link.h"
|
||||
#include "bg.h"
|
||||
#include "sound.h"
|
||||
#include "frontier_pass.h"
|
||||
#include "overworld.h"
|
||||
#include "menu.h"
|
||||
#include "text.h"
|
||||
@ -90,7 +91,6 @@ struct TrainerCardData
|
||||
|
||||
//external functions
|
||||
extern u8 sub_80D30A0(u16);
|
||||
extern void sub_80C5868(void);
|
||||
|
||||
// EWRAM
|
||||
EWRAM_DATA static struct TrainerCardData *sData = NULL;
|
||||
@ -167,7 +167,6 @@ static bool8 sub_80C4C84(struct Task* task);
|
||||
static bool8 sub_80C4DB0(struct Task* task);
|
||||
static void sub_80C32EC(u16);
|
||||
static void sub_80C41D8(void);
|
||||
static void sub_80C6D80(const u8 *, u8 *, u8, u8, u8);
|
||||
|
||||
// const rom data
|
||||
static const u32 gUnknown_0856F018[] = INCBIN_U32("graphics/trainer_card/stickers_fr.4bpp.lz");
|
||||
@ -1754,7 +1753,7 @@ void ShowPlayerTrainerCard(void (*callback)(void))
|
||||
{
|
||||
sData = AllocZeroed(sizeof(*sData));
|
||||
sData->callback2 = callback;
|
||||
if (callback == sub_80C5868)
|
||||
if (callback == CB2_ReshowFrontierPass)
|
||||
sData->var_52C = 0x7FFF;
|
||||
else
|
||||
sData->var_52C = 0;
|
||||
|
@ -154,19 +154,7 @@ gUnknown_02039B88: @ 2039B88
|
||||
.space 0x160
|
||||
|
||||
.include "src/trainer_card.o"
|
||||
|
||||
gUnknown_02039CEC: @ 2039CEC
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02039CF0: @ 2039CF0
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02039CF4: @ 2039CF4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_02039CF8: @ 2039CF8
|
||||
.space 0x8
|
||||
|
||||
.include "src/frontier_pass.o"
|
||||
.include "src/pokemon_storage_system.o"
|
||||
.include "src/script_movement.o"
|
||||
.include "src/fldeff_cut.o"
|
||||
|
Loading…
Reference in New Issue
Block a user