Merge pull request #302 from PikalaxALT/pokemon_storage_system
Pokemon storage system
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13235,7 +13235,7 @@ _0813B16C:
|
||||
ldrb r2, [r0]
|
||||
adds r3, r5, 0
|
||||
adds r0, r4, 0
|
||||
bl sub_808BDE8
|
||||
bl SeekToNextMonInBox
|
||||
b _0813B1CC
|
||||
.align 2, 0
|
||||
_0813B190: .4byte 0x000032f4
|
||||
|
||||
@@ -1,692 +0,0 @@
|
||||
#include "constants/maps.h"
|
||||
#include "constants/species.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2
|
||||
|
||||
gUnknown_83CDA20:: @ 83CDA20
|
||||
.4byte gUnknown_841856C, gUnknown_84185AD
|
||||
.4byte gUnknown_841857D, gUnknown_84185E2
|
||||
.4byte gUnknown_841858D, gUnknown_8418611
|
||||
.4byte gUnknown_841859A, gUnknown_8418642
|
||||
.4byte gUnknown_84185A5, gUnknown_8418681
|
||||
|
||||
gUnknown_83CDA48:: @ 83CDA48
|
||||
.byte 0, 1, 1, 17, 10, 15
|
||||
.2byte 0x0001
|
||||
|
||||
gUnknown_83CDA50::
|
||||
obj_image_anim_frame 0x0000, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CDA58::
|
||||
obj_image_anim_frame 0x0004, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CDA60::
|
||||
obj_image_anim_frame 0x0006, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CDA68::
|
||||
obj_image_anim_frame 0x000a, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CDA70:: @ 83CDA70
|
||||
.4byte gUnknown_83CDA50
|
||||
.4byte gUnknown_83CDA58
|
||||
.4byte gUnknown_83CDA60
|
||||
.4byte gUnknown_83CDA68
|
||||
|
||||
gUnknown_83CDA80::
|
||||
obj_rot_scal_anim_frame 224, 224, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83CDA90::
|
||||
.4byte gUnknown_83CDA80
|
||||
|
||||
gUnknown_83CDA94:: @ 83CDA94
|
||||
.string "/30$"
|
||||
|
||||
gUnknown_83CDA98:: @ 83CDA98 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CDA98.gbapal"
|
||||
|
||||
gUnknown_83CDAB8:: @ 83CDAB8 4bpp
|
||||
.incbin "graphics/interface/pss_unk_83CDAB8.4bpp"
|
||||
|
||||
gUnknown_83CE2B8:: @ 83CE2B8 4bpp
|
||||
.incbin "graphics/interface/pss_unk_83CE2B8.4bpp"
|
||||
|
||||
gUnknown_83CE438:: @ 83CE438 4bpp.lz
|
||||
.incbin "graphics/interface/pss_unk_83CE438.4bpp.lz"
|
||||
|
||||
gUnknown_83CE4D0:: @ 83CE4D0 bin.lz
|
||||
.incbin "graphics/interface/pss_unk_83CE4D0.bin.lz"
|
||||
.incbin "graphics/interface/pss_unk_83CE5DC.gbapal"
|
||||
|
||||
gUnknown_83CE5FC:: @ 83CE5FC bin.lz
|
||||
.incbin "graphics/interface/pss_unk_83CE5FC.bin.lz"
|
||||
|
||||
gUnknown_83CE6F8:: @ 83CE6F8 @ raw8
|
||||
.byte 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01, 0x05, 0x01, 0x06, 0x01, 0x07, 0x01, 0x08, 0x01, 0x11, 0x01, 0x12, 0x01, 0x13, 0x01, 0x14, 0x01, 0x15, 0x01, 0x16, 0x01, 0x17, 0x01, 0x18, 0x01
|
||||
.byte 0x01, 0x21, 0x02, 0x21, 0x03, 0x21, 0x04, 0x21, 0x05, 0x21, 0x06, 0x21, 0x07, 0x21, 0x08, 0x21, 0x11, 0x21, 0x12, 0x21, 0x13, 0x21, 0x14, 0x21, 0x15, 0x21, 0x16, 0x21, 0x17, 0x21, 0x18, 0x21
|
||||
|
||||
gUnknown_83CE738:: @ 83CE738 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CE738.gbapal"
|
||||
|
||||
gUnknown_83CE758:: @ 83CE758 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CE758.gbapal"
|
||||
|
||||
gUnknown_83CE778:: @ 83CE778 @ raw16
|
||||
.2byte 0x014c, 0x014d, 0x014e, 0x014f, 0x0170, 0x0171, 0x0172, 0x0173, 0x0174, 0x015c, 0x015d, 0x015e, 0x015f, 0x0180, 0x0181, 0x0182
|
||||
.2byte 0x0183, 0x0184, 0x0175, 0x0176, 0x0177, 0x0178, 0x0179, 0x017a, 0x017b, 0x017c, 0x017d, 0x0185, 0x0186, 0x0187, 0x0188, 0x0189
|
||||
.2byte 0x018a, 0x018b, 0x018c, 0x018d
|
||||
|
||||
gUnknown_83CE7C0:: @ 83CE7C0 @ raw8
|
||||
.byte 0x40, 0x11, 0x41, 0x11, 0x41, 0x11, 0x42, 0x11, 0x50, 0x11, 0x51, 0x11, 0x51, 0x11, 0x52, 0x11, 0x60, 0x11, 0x61, 0x11, 0x61, 0x11, 0x62, 0x11
|
||||
|
||||
gUnknown_83CE7D8:: @ 83CE7D8 @ raw8
|
||||
.byte 0x43, 0x11, 0x44, 0x11, 0x44, 0x11, 0x45, 0x11, 0x53, 0x11, 0x54, 0x11, 0x54, 0x11, 0x55, 0x11, 0x63, 0x11, 0x64, 0x11, 0x64, 0x11, 0x65, 0x11
|
||||
|
||||
gUnknown_83CE7F0:: @ 83CE7F0 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CE810.gbapal"
|
||||
|
||||
gUnknown_83CE810:: @ 83CE810 4bpp
|
||||
.incbin "graphics/interface/pss_unk_83CE810.4bpp"
|
||||
.incbin "graphics/interface/pss_unk_83CE9D0.gbapal"
|
||||
|
||||
gUnknown_83CEA10:: @ 83CEA10 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CEA10.gbapal"
|
||||
|
||||
gUnknown_83CEA30:: @ 83CEA30 gbapal
|
||||
.incbin "graphics/interface/pss_unk_83CEA30.gbapal"
|
||||
|
||||
gUnknown_83CEA50:: @ 83CEA50 bg_template
|
||||
.4byte 0x000001d0
|
||||
@ {
|
||||
@ .bg = 0,
|
||||
@ .charBaseIndex = 0,
|
||||
@ .mapBaseIndex = 29,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 0,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x004011e5
|
||||
@ {
|
||||
@ .bg = 1,
|
||||
@ .charBaseIndex = 1,
|
||||
@ .mapBaseIndex = 30,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 1,
|
||||
@ .baseTile = 0x0100
|
||||
@ }
|
||||
.4byte 0x000023ba
|
||||
@ {
|
||||
@ .bg = 2,
|
||||
@ .charBaseIndex = 2,
|
||||
@ .mapBaseIndex = 27,
|
||||
@ .screenSize = 1,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 2,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
.4byte 0x000031ff
|
||||
@ {
|
||||
@ .bg = 3,
|
||||
@ .charBaseIndex = 3,
|
||||
@ .mapBaseIndex = 31,
|
||||
@ .screenSize = 0,
|
||||
@ .paletteMode = 0,
|
||||
@ .priority = 3,
|
||||
@ .baseTile = 0x0000
|
||||
@ }
|
||||
|
||||
gUnknown_83CEA60:: @ 83CEA60 sprite_palette
|
||||
obj_pal gUnknown_83CE7F0, 56010
|
||||
|
||||
gUnknown_83CEA68:: @ 83CEA68 sprite_sheet
|
||||
obj_tiles gUnknown_83CE810, 0x01c0, 5
|
||||
|
||||
gUnknown_83CEA70:: @ 83CEA70 spr_template
|
||||
spr_template 2, 56006, gUnknown_83CEB88, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_83CEA88:: @ 83CEA88 struct {const u8 *; u8;}
|
||||
.4byte gUnknown_8418208
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841821B
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418233
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418248
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841825C
|
||||
.byte 1
|
||||
.align 2
|
||||
.4byte gUnknown_841826C
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841827F
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418295
|
||||
.byte 1
|
||||
.align 2
|
||||
.4byte gUnknown_84182A7
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84182B8
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84182CE
|
||||
.byte 4
|
||||
.align 2
|
||||
.4byte gUnknown_84182DF
|
||||
.byte 6
|
||||
.align 2
|
||||
.4byte gUnknown_84182EC
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84182FF
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418319
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841832C
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418346
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841835F
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418379
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418392
|
||||
.byte 1
|
||||
.align 2
|
||||
.4byte gUnknown_84183A0
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84183BA
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84183C5
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_841825C
|
||||
.byte 7
|
||||
.align 2
|
||||
.4byte gUnknown_84183DD
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_84183F0
|
||||
.byte 7
|
||||
.align 2
|
||||
.4byte gUnknown_8418408
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418419
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte gUnknown_8418433
|
||||
.byte 7
|
||||
.align 2
|
||||
.4byte gUnknown_8418443
|
||||
.byte 7
|
||||
.align 2
|
||||
.4byte gUnknown_8418452
|
||||
.byte 0
|
||||
.align 2
|
||||
|
||||
gUnknown_83CEB80:: @ 83CEB80 window_template
|
||||
.byte 0, 24, 11, 5, 4, 15
|
||||
.2byte 0x005c
|
||||
|
||||
gUnknown_83CEB88::
|
||||
.4byte 0xc0000000, 0x00000000
|
||||
|
||||
gUnknown_83CEB90::
|
||||
.4byte 0x00004000, 0x00000000
|
||||
|
||||
gUnknown_83CEB98::
|
||||
obj_image_anim_frame 0x0000, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CEBA0::
|
||||
obj_image_anim_frame 0x0002, 8
|
||||
obj_image_anim_frame 0x0004, 8
|
||||
obj_image_anim_frame 0x0006, 8
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_83CEBB0::
|
||||
obj_image_anim_frame 0x0008, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83CEBB8::
|
||||
obj_image_anim_frame 0x000a, 8
|
||||
obj_image_anim_frame 0x0004, 8
|
||||
obj_image_anim_frame 0x000c, 8
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_83CEBC8::
|
||||
.4byte gUnknown_83CEB98
|
||||
.4byte gUnknown_83CEBA0
|
||||
.4byte gUnknown_83CEBB0
|
||||
.4byte gUnknown_83CEBB8
|
||||
|
||||
gUnknown_83CEBD8:: @ 83CEBD8 spr_template
|
||||
spr_template 5, 56010, gUnknown_83CEB90, gUnknown_83CEBC8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_83CEBF0:: @ 83CEBF0 spr_template
|
||||
spr_template 18, 56000, gUnknown_83CEC08, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_83CEC08::
|
||||
.4byte 0x80000000, 0x00000000
|
||||
|
||||
gUnknown_83CEC10::
|
||||
obj_rot_scal_anim_frame -2, -2, 0, 120
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83CEC20::
|
||||
obj_rot_scal_anim_frame 16, 16, 0, 0
|
||||
obj_rot_scal_anim_frame 16, 16, 0, 15
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83CEC38:: @ 83CEC38 dataptr
|
||||
.4byte gUnknown_83CEC10
|
||||
.4byte gUnknown_83CEC20
|
||||
|
||||
gUnknown_83CEC40:: @ 83CEC40
|
||||
.incbin "graphics/interface/pss_unk_83CEC40.gbapal"
|
||||
|
||||
gUnknown_83CEC80:: @ 83CEC80
|
||||
.incbin "graphics/interface/pss_unk_83CEC80.4bpp.lz"
|
||||
|
||||
gUnknown_83CF050:: @ 83CF050
|
||||
.incbin "graphics/interface/pss_unk_83CF050.bin.lz"
|
||||
|
||||
gUnknown_83CF12C:: @ 83CF12C
|
||||
.incbin "graphics/interface/pss_unk_83CF12C.gbapal"
|
||||
|
||||
gUnknown_83CF16C:: @ 83CF16C
|
||||
.incbin "graphics/interface/pss_unk_83CF16C.4bpp.lz"
|
||||
|
||||
gUnknown_83CF374:: @ 83CF374
|
||||
.incbin "graphics/interface/pss_unk_83CF374.bin.lz"
|
||||
|
||||
gUnknown_83CF424:: @ 83CF424
|
||||
.incbin "graphics/interface/pss_unk_83CF424.gbapal"
|
||||
|
||||
gUnknown_83CF464:: @ 83CF464
|
||||
.incbin "graphics/interface/pss_unk_83CF464.4bpp.lz"
|
||||
|
||||
gUnknown_83CF750:: @ 83CF750
|
||||
.incbin "graphics/interface/pss_unk_83CF750.bin.lz"
|
||||
|
||||
gUnknown_83CF834:: @ 83CF834
|
||||
.incbin "graphics/interface/pss_unk_83CF834.gbapal"
|
||||
|
||||
gUnknown_83CF874:: @ 83CF874
|
||||
.incbin "graphics/interface/pss_unk_83CF874.4bpp.lz"
|
||||
|
||||
gUnknown_83CFA94:: @ 83CFA94
|
||||
.incbin "graphics/interface/pss_unk_83CFA94.bin.lz"
|
||||
|
||||
gUnknown_83CFB60:: @ 83CFB60
|
||||
.incbin "graphics/interface/pss_unk_83CFB60.gbapal"
|
||||
|
||||
gUnknown_83CFBA0:: @ 83CFBA0
|
||||
.incbin "graphics/interface/pss_unk_83CFBA0.4bpp.lz"
|
||||
|
||||
gUnknown_83CFEF0:: @ 83CFEF0
|
||||
.incbin "graphics/interface/pss_unk_83CFEF0.bin.lz"
|
||||
|
||||
gUnknown_83CFFC8:: @ 83CFFC8
|
||||
.incbin "graphics/interface/pss_unk_83CFFC8.gbapal"
|
||||
|
||||
gUnknown_83D0008:: @ 83D0008
|
||||
.incbin "graphics/interface/pss_unk_83D0008.4bpp.lz"
|
||||
.space 4
|
||||
|
||||
gUnknown_83D033C:: @ 83D033C
|
||||
.incbin "graphics/interface/pss_unk_83D033C.bin.lz"
|
||||
|
||||
gUnknown_83D0414:: @ 83D0414
|
||||
.incbin "graphics/interface/pss_unk_83D0414.gbapal"
|
||||
|
||||
gUnknown_83D0454:: @ 83D0454
|
||||
.incbin "graphics/interface/pss_unk_83D0454.4bpp.lz"
|
||||
|
||||
gUnknown_83D070C:: @ 83D070C
|
||||
.incbin "graphics/interface/pss_unk_83D070C.bin.lz"
|
||||
|
||||
gUnknown_83D07D8:: @ 83D07D8
|
||||
.incbin "graphics/interface/pss_unk_83D07D8.gbapal"
|
||||
|
||||
gUnknown_83D0818:: @ 83D0818
|
||||
.incbin "graphics/interface/pss_unk_83D0818.4bpp.lz"
|
||||
|
||||
gUnknown_83D0B5C:: @ 83D0B5C
|
||||
.incbin "graphics/interface/pss_unk_83D0B5C.bin.lz"
|
||||
|
||||
gUnknown_83D0C38:: @ 83D0C38
|
||||
.incbin "graphics/interface/pss_unk_83D0C38.gbapal"
|
||||
|
||||
gUnknown_83D0C78:: @ 83D0C78
|
||||
.incbin "graphics/interface/pss_unk_83D0C78.4bpp.lz"
|
||||
|
||||
gUnknown_83D0FFC:: @ 83D0FFC
|
||||
.incbin "graphics/interface/pss_unk_83D0FFC.bin.lz"
|
||||
|
||||
gUnknown_83D10E4:: @ 83D10E4
|
||||
.incbin "graphics/interface/pss_unk_83D10E4.gbapal"
|
||||
|
||||
gUnknown_83D1124:: @ 83D1124
|
||||
.incbin "graphics/interface/pss_unk_83D1124.4bpp.lz"
|
||||
|
||||
gUnknown_83D13D8:: @ 83D13D8
|
||||
.incbin "graphics/interface/pss_unk_83D13D8.bin.lz"
|
||||
|
||||
gUnknown_83D14B4:: @ 83D14B4
|
||||
.incbin "graphics/interface/pss_unk_83D14B4.gbapal"
|
||||
|
||||
gUnknown_83D14F4:: @ 83D14F4
|
||||
.incbin "graphics/interface/pss_unk_83D14F4.4bpp.lz"
|
||||
|
||||
gUnknown_83D1788:: @ 83D1788
|
||||
.incbin "graphics/interface/pss_unk_83D1788.bin.lz"
|
||||
|
||||
gUnknown_83D1874:: @ 83D1874
|
||||
.incbin "graphics/interface/pss_unk_83D1874.gbapal"
|
||||
|
||||
gUnknown_83D18B4:: @ 83D18B4
|
||||
.incbin "graphics/interface/pss_unk_83D18B4.4bpp.lz"
|
||||
|
||||
gUnknown_83D1B4C:: @ 83D1B4C
|
||||
.incbin "graphics/interface/pss_unk_83D1B4C.bin.lz"
|
||||
|
||||
gUnknown_83D1C2C:: @ 83D1C2C
|
||||
.incbin "graphics/interface/pss_unk_83D1C2C.gbapal"
|
||||
|
||||
.space 32
|
||||
|
||||
gUnknown_83D1C8C:: @ 83D1C8C
|
||||
.incbin "graphics/interface/pss_unk_83D1C8C.4bpp.lz"
|
||||
|
||||
gUnknown_83D1EC4:: @ 83D1EC4
|
||||
.incbin "graphics/interface/pss_unk_83D1EC4.bin.lz"
|
||||
|
||||
gUnknown_83D1F94:: @ 83D1F94
|
||||
.incbin "graphics/interface/pss_unk_83D1F94.gbapal"
|
||||
|
||||
gUnknown_83D1FD4:: @ 83D1FD4
|
||||
.incbin "graphics/interface/pss_unk_83D1FD4.4bpp.lz"
|
||||
|
||||
gUnknown_83D22B8:: @ 83D22B8
|
||||
.incbin "graphics/interface/pss_unk_83D22B8.bin.lz"
|
||||
|
||||
gUnknown_83D239C:: @ 83D239C
|
||||
.incbin "graphics/interface/pss_unk_83D239C.gbapal"
|
||||
|
||||
gUnknown_83D23DC:: @ 83D23DC
|
||||
.incbin "graphics/interface/pss_unk_83D23DC.4bpp.lz"
|
||||
|
||||
gUnknown_83D256C:: @ 83D256C
|
||||
.incbin "graphics/interface/pss_unk_83D256C.bin.lz"
|
||||
|
||||
gUnknown_83D2614:: @ 83D2614
|
||||
.incbin "graphics/interface/pss_unk_83D2614.gbapal"
|
||||
|
||||
gUnknown_83D2654:: @ 83D2654
|
||||
.incbin "graphics/interface/pss_unk_83D2654.4bpp.lz"
|
||||
|
||||
gUnknown_83D277C:: @ 83D277C
|
||||
.incbin "graphics/interface/pss_unk_83D277C.bin.lz"
|
||||
|
||||
.incbin "graphics/interface/pss_unk_83D2820.bin"
|
||||
|
||||
gUnknown_83D29D0:: @ 83D29D0
|
||||
.incbin "graphics/interface/pss_unk_83D29D0.gbapal"
|
||||
|
||||
gUnknown_83D2A10:: @ 83D2A10
|
||||
.4byte gUnknown_83CEC80, gUnknown_83CF050, gUnknown_83CEC40
|
||||
.4byte gUnknown_83CF16C, gUnknown_83CF374, gUnknown_83CF12C
|
||||
.4byte gUnknown_83CF464, gUnknown_83CF750, gUnknown_83CF424
|
||||
.4byte gUnknown_83CF874, gUnknown_83CFA94, gUnknown_83CF834
|
||||
.4byte gUnknown_83CFBA0, gUnknown_83CFEF0, gUnknown_83CFB60
|
||||
.4byte gUnknown_83D0008, gUnknown_83D033C, gUnknown_83CFFC8
|
||||
.4byte gUnknown_83D0454, gUnknown_83D070C, gUnknown_83D0414
|
||||
.4byte gUnknown_83D0818, gUnknown_83D0B5C, gUnknown_83D07D8
|
||||
.4byte gUnknown_83D0C78, gUnknown_83D0FFC, gUnknown_83D0C38
|
||||
.4byte gUnknown_83D1124, gUnknown_83D13D8, gUnknown_83D10E4
|
||||
.4byte gUnknown_83D14F4, gUnknown_83D1788, gUnknown_83D14B4
|
||||
.4byte gUnknown_83D18B4, gUnknown_83D1B4C, gUnknown_83D1874
|
||||
.4byte gUnknown_83D1C8C, gUnknown_83D1EC4, gUnknown_83D1C2C
|
||||
.4byte gUnknown_83D1FD4, gUnknown_83D22B8, gUnknown_83D1F94
|
||||
.4byte gUnknown_83D23DC, gUnknown_83D256C, gUnknown_83D239C
|
||||
.4byte gUnknown_83D2654, gUnknown_83D277C, gUnknown_83D2614
|
||||
|
||||
gUnknown_83D2AD0::
|
||||
.incbin "graphics/interface/pss_unk_83D2AD0.4bpp"
|
||||
.4byte 0x000023ba
|
||||
|
||||
gUnknown_83D2B54:: @ 83D2B54
|
||||
obj_tiles gUnknown_83D2AD0, 0x0080, 6
|
||||
|
||||
gUnknown_83D2B5C::
|
||||
.4byte 0x80004000, 0x00000800
|
||||
|
||||
gUnknown_83D2B64::
|
||||
obj_image_anim_frame 0x0000, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D2B6C::
|
||||
obj_image_anim_frame 0x0008, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D2B74::
|
||||
.4byte gUnknown_83D2B64
|
||||
.4byte gUnknown_83D2B6C
|
||||
|
||||
gUnknown_83D2B7C:: @ 83D2B7C
|
||||
spr_template 3, 56009, gUnknown_83D2B5C, gUnknown_83D2B74, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_83D2B94::
|
||||
.4byte 0x00008000, 0x00000800
|
||||
|
||||
gUnknown_83D2B9C::
|
||||
obj_image_anim_frame 0x0000, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D2BA4::
|
||||
obj_image_anim_frame 0x0002, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D2BAC::
|
||||
.4byte gUnknown_83D2B9C
|
||||
.4byte gUnknown_83D2BA4
|
||||
|
||||
gUnknown_83D2BB4:: @ 83D2BB4
|
||||
spr_template 6, 56010, gUnknown_83D2B94, gUnknown_83D2BAC, NULL, gDummySpriteAffineAnimTable, sub_8092164
|
||||
|
||||
gUnknown_83D2BCC::
|
||||
.incbin "graphics/interface/pss_unk_83D2BCC.gbapal"
|
||||
|
||||
gUnknown_83D2BEC::
|
||||
.incbin "graphics/interface/pss_unk_83D2BEC.4bpp"
|
||||
|
||||
gUnknown_83D33EC::
|
||||
.incbin "graphics/interface/pss_unk_83D33EC.4bpp"
|
||||
|
||||
gUnknown_83D346C:: @ 83D346C
|
||||
.4byte sub_8092C18
|
||||
.4byte sub_8092CA4
|
||||
.4byte sub_8092D20
|
||||
|
||||
gUnknown_83D3478:: @ 83D3478
|
||||
.4byte sub_8093F98
|
||||
.byte 0
|
||||
.align 2
|
||||
.4byte sub_809448C
|
||||
.byte 1
|
||||
.align 2
|
||||
.4byte sub_80946AC
|
||||
.byte 2
|
||||
.align 2
|
||||
.4byte sub_80947A0
|
||||
.byte 3
|
||||
.align 2
|
||||
.4byte NULL
|
||||
.byte 0
|
||||
.align 2
|
||||
|
||||
gUnknown_83D34A0:: @ 83D34A0
|
||||
obj_tiles gUnknown_83D2BEC, 0x0800, 0
|
||||
obj_tiles gUnknown_83D33EC, 0x0080, 1
|
||||
null_obj_tiles
|
||||
|
||||
gUnknown_83D34B8:: @ 83D34B8
|
||||
obj_pal gUnknown_83D2BCC, 56007
|
||||
null_obj_pal
|
||||
|
||||
gUnknown_83D34C8::
|
||||
.4byte 0x80000000, 0x00000400
|
||||
|
||||
gUnknown_83D34D0::
|
||||
.4byte 0x40000000, 0x00000400
|
||||
|
||||
gUnknown_83D34D8::
|
||||
obj_image_anim_frame 0x0000, 30
|
||||
obj_image_anim_frame 0x0010, 30
|
||||
obj_image_anim_jump 0
|
||||
|
||||
gUnknown_83D34E4::
|
||||
obj_image_anim_frame 0x0000, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D34EC::
|
||||
obj_image_anim_frame 0x0020, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D34F4::
|
||||
obj_image_anim_frame 0x0030, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_83D34FC::
|
||||
.4byte gUnknown_83D34D8
|
||||
.4byte gUnknown_83D34E4
|
||||
.4byte gUnknown_83D34EC
|
||||
.4byte gUnknown_83D34F4
|
||||
|
||||
gUnknown_83D350C:: @ 83D350C
|
||||
spr_template 0, 56010, gUnknown_83D34C8, gUnknown_83D34FC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
|
||||
gUnknown_83D3524:: @ 83D3524
|
||||
spr_template 1, 56010, gUnknown_83D34D0, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8094AB8
|
||||
|
||||
gUnknown_83D353C:: @ 83D353C
|
||||
.4byte gUnknown_8418468
|
||||
.4byte gUnknown_841846F
|
||||
.4byte gUnknown_8418475
|
||||
.4byte gUnknown_8418484
|
||||
.4byte gUnknown_841847E
|
||||
.4byte gUnknown_8418489
|
||||
.4byte gUnknown_841848F
|
||||
.4byte gUnknown_8418497
|
||||
.4byte gUnknown_841849F
|
||||
.4byte gUnknown_84184A9
|
||||
.4byte gUnknown_84184AE
|
||||
.4byte gUnknown_84184A4
|
||||
.4byte gUnknown_84184B8
|
||||
.4byte gUnknown_84184BD
|
||||
.4byte gUnknown_84184BD
|
||||
.4byte gUnknown_84184C2
|
||||
.4byte gUnknown_84184C9
|
||||
.4byte gUnknown_84184CD
|
||||
.4byte gUnknown_84184D2
|
||||
.4byte gUnknown_84184DC
|
||||
.4byte gUnknown_84184E6
|
||||
.4byte gUnknown_84184F0
|
||||
.4byte gUnknown_84184F9
|
||||
.4byte gUnknown_8418500
|
||||
.4byte gUnknown_8418505
|
||||
.4byte gUnknown_841850C
|
||||
.4byte gUnknown_8418514
|
||||
.4byte gUnknown_8418519
|
||||
.4byte gUnknown_8418521
|
||||
.4byte gUnknown_8418526
|
||||
.4byte gUnknown_841852B
|
||||
.4byte gUnknown_8418531
|
||||
.4byte gUnknown_841853A
|
||||
.4byte gUnknown_8418540
|
||||
.4byte gUnknown_8418544
|
||||
.4byte gUnknown_841854A
|
||||
.4byte gUnknown_8418555
|
||||
.4byte gUnknown_841855B
|
||||
|
||||
gUnknown_83D35D4:: @ 83D35D4
|
||||
.byte 0, 10, 3, 20, 18, 9
|
||||
.2byte 0x000a
|
||||
|
||||
gUnknown_83D35DC:: @ 83D35DC
|
||||
.incbin "graphics/interface/pss_unk_83D35DC.4bpp"
|
||||
|
||||
gUnknown_83D365C::
|
||||
.4byte 0x80000100, 0x00000400
|
||||
|
||||
gUnknown_83D3664::
|
||||
obj_rot_scal_anim_frame 128, 128, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D3674::
|
||||
obj_rot_scal_anim_frame 88, 88, 0, 0
|
||||
obj_rot_scal_anim_frame 5, 5, 0, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D368C::
|
||||
obj_rot_scal_anim_frame 128, 128, 0, 0
|
||||
obj_rot_scal_anim_frame -5, -5, 0, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D36A4::
|
||||
obj_rot_scal_anim_frame 128, 128, 0, 0
|
||||
obj_rot_scal_anim_frame 10, 10, 0, 12
|
||||
obj_rot_scal_anim_frame 256, 256, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D36C4::
|
||||
obj_rot_scal_anim_frame 256, 256, 0, 0
|
||||
obj_rot_scal_anim_frame -10, -10, 0, 12
|
||||
obj_rot_scal_anim_frame 128, 128, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D36E4::
|
||||
obj_rot_scal_anim_frame 256, 256, 0, 0
|
||||
obj_rot_scal_anim_frame -5, -5, 0, 16
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D36FC::
|
||||
obj_rot_scal_anim_frame 256, 256, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
gUnknown_83D370C::
|
||||
.4byte gUnknown_83D3664
|
||||
.4byte gUnknown_83D3674
|
||||
.4byte gUnknown_83D368C
|
||||
.4byte gUnknown_83D36A4
|
||||
.4byte gUnknown_83D36C4
|
||||
.4byte gUnknown_83D36E4
|
||||
.4byte gUnknown_83D36FC
|
||||
|
||||
gUnknown_83D3728:: @ 83D3728
|
||||
spr_template 7, 56011, gUnknown_83D365C, gDummySpriteAnimTable, NULL, gUnknown_83D370C, SpriteCallbackDummy
|
||||
+1
-1
@@ -48,7 +48,7 @@ EventScript_AccessPokemonStorage:: @ 81A6A05
|
||||
call_if_unset FLAG_SYS_NOT_SOMEONES_PC, EventScript_AccessSomeonesPC
|
||||
call_if_set FLAG_SYS_NOT_SOMEONES_PC, EventScript_AccessBillsPC
|
||||
msgbox Text_OpenedPkmnStorage
|
||||
special ShowPokemonStorageSystem
|
||||
special ShowPokemonStorageSystemPC
|
||||
waitstate
|
||||
setvar VAR_0x8004, HELPCONTEXT_PC
|
||||
special Script_SetHelpContext
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ gSpecials:: @ 815FD60
|
||||
def_special ShouldTryRematchBattle
|
||||
def_special IsTrainerReadyForRematch
|
||||
def_special StartRematchBattle
|
||||
def_special ShowPokemonStorageSystem
|
||||
def_special ShowPokemonStorageSystemPC
|
||||
def_special HasEnoughMonsForDoubleBattle
|
||||
def_special NullFieldSpecial @ Hoenn TV specials
|
||||
def_special NullFieldSpecial
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
8 0 0
|
||||
90 65 16
|
||||
57 197 0
|
||||
0 49 0
|
||||
0 197 16
|
||||
139 131 32
|
||||
16 65 24
|
||||
164 0 0
|
||||
0 0 0
|
||||
98 65 49
|
||||
65 197 24
|
||||
164 0 0
|
||||
255 57 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
@@ -1,14 +1,24 @@
|
||||
#ifndef GUARD_BOX_PARTY_POKEMON_DROPDOWN_H
|
||||
#define GUARD_BOX_PARTY_POKEMON_DROPDOWN_H
|
||||
|
||||
void sub_80F7AD8(u8 num);
|
||||
void sub_80F7B2C(void);
|
||||
void sub_80F7B40(void);
|
||||
void sub_80F7B80(u8 a0, u8 a1, const void * a2, u16 a3, u16 a4);
|
||||
void sub_80F7C7C(u8 a0, const void * a1);
|
||||
void sub_80F7CAC(u8 a0, u16 a1, u16 a2);
|
||||
void sub_80F7CE8(u8 a0, u16 a1, u16 a2, u16 a3, u16 a4);
|
||||
void sub_80F7D30(u8 a0, u8 a1, s8 a2);
|
||||
void sub_80F7E54(u8 a0);
|
||||
enum
|
||||
{
|
||||
BPPD_MOVE_INNER_LEFT = 0,
|
||||
BPPD_MOVE_OUTER_LEFT,
|
||||
BPPD_MOVE_INNER_TOP,
|
||||
BPPD_MOVE_OUTER_TOP,
|
||||
BPPD_MOVE_INNER_X,
|
||||
BPPD_MOVE_INNER_Y
|
||||
};
|
||||
|
||||
void AllocBoxPartyPokemonDropdowns(u8 num);
|
||||
void FreeBoxPartyPokemonDropdowns(void);
|
||||
void CopyAllBoxPartyPokemonDropdownsToVram(void);
|
||||
void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height);
|
||||
void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void * src);
|
||||
void SetBoxPartyPokemonDropdownMap2Pos(u8 idx, u16 x, u16 y);
|
||||
void SetBoxPartyPokemonDropdownMap2Rect(u8 idx, u16 x, u16 y, u16 width, u16 height);
|
||||
void AdjustBoxPartyPokemonDropdownPos(u8 a0, u8 a1, s8 a2);
|
||||
void CopyBoxPartyPokemonDropdownToBgTilemapBuffer(u8 idx);
|
||||
|
||||
#endif //GUARD_BOX_PARTY_POKEMON_DROPDOWN_H
|
||||
|
||||
@@ -1365,7 +1365,7 @@
|
||||
#define FLAG_SYS_NATIONAL_DEX (SYS_FLAGS + 0x40)
|
||||
#define FLAG_SYS_PC_STORAGE_DISABLED (SYS_FLAGS + 0x41)
|
||||
#define FLAG_SYS_INFORMED_OF_LOCAL_WIRELESS_PLAYER (SYS_FLAGS + 0x42)
|
||||
#define FLAG_SYS_CHANGED_BOX_TO_STORE_MON (SYS_FLAGS + 0x43)
|
||||
#define FLAG_SHOWN_BOX_WAS_FULL_MESSAGE (SYS_FLAGS + 0x43)
|
||||
#define FLAG_SYS_CAN_LINK_WITH_RS (SYS_FLAGS + 0x44)
|
||||
#define FLAG_SYS_SEVII_MAP_123 (SYS_FLAGS + 0x45)
|
||||
#define FLAG_SYS_SEVII_MAP_4567 (SYS_FLAGS + 0x46)
|
||||
|
||||
@@ -212,5 +212,6 @@
|
||||
#define MAX_TOTAL_EVS 510
|
||||
#define UNOWN_FORM_COUNT 28
|
||||
#define MAX_MON_LEVEL 100
|
||||
#define BOX_NAME_LENGTH 8
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||
|
||||
@@ -4917,4 +4917,11 @@ extern const u16 gUnknown_8E98F38[];
|
||||
extern const u16 gUnknown_8E990D8[];
|
||||
extern const u16 gUnknown_8E990F8[];
|
||||
|
||||
// pokemon_storage_system
|
||||
extern const u32 gPSSMenu_Gfx[];
|
||||
extern const u32 gUnknown_8E9CAEC[];
|
||||
extern const u16 gPSSMenu_Pal[];
|
||||
extern const u16 gUnknown_8E9C3F8[];
|
||||
extern const u16 gUnknown_8E9C418[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef GUARD_PC_SCREEN_EFFECT_H
|
||||
#define GUARD_PC_SCREEN_EFFECT_H
|
||||
|
||||
void sub_80A0A48(u16, u16, u8);
|
||||
void sub_80A0A70(u16, u16, u8);
|
||||
bool8 sub_80A0AAC(void);
|
||||
bool8 sub_80A0A98(void);
|
||||
void BeginPCScreenEffect_TurnOn(u16 xspeed, u16 yspeed, u8 priority);
|
||||
void BeginPCScreenEffect_TurnOff(u16 xspeed, u16 yspeed, u8 priority);
|
||||
bool8 IsPCScreenEffectRunning_TurnOff(void);
|
||||
bool8 IsPCScreenEffectRunning_TurnOn(void);
|
||||
|
||||
#endif //GUARD_PC_SCREEN_EFFECT_H
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ struct PokemonStorage
|
||||
{
|
||||
/*0x0000*/ u8 currentBox;
|
||||
/*0x0001*/ struct BoxPokemon boxes[14][30];
|
||||
/*0x8344*/ u8 boxNames[14][9];
|
||||
/*0x8344*/ u8 boxNames[14][BOX_NAME_LENGTH + 1];
|
||||
/*0x83C2*/ u8 boxWallpapers[14];
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "global.h"
|
||||
|
||||
extern const u16 gMonIconPalettes[][16];
|
||||
extern const u8 gMonIconPaletteIndices[];
|
||||
|
||||
const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo);
|
||||
const u8 *GetMonIconTiles(u16 iconSpecies, bool32 extra);
|
||||
@@ -26,5 +27,8 @@ void LoadMonIconPalette(u16 iconId);
|
||||
void FreeMonIconPalette(u16 iconId);
|
||||
void SetPartyHPBarSprite(struct Sprite * sprite, u8 animNum);
|
||||
u8 GetMonIconPaletteIndexFromSpecies(u16 species);
|
||||
u16 GetIconSpecies(u16 species, u32 personality);
|
||||
void LoadMonIconPalettesAt(u16 offset);
|
||||
u8 GetValidMonIconPalIndex(u16 species);
|
||||
|
||||
#endif // GUARD_POKEMON_ICON_H
|
||||
|
||||
@@ -6,15 +6,36 @@
|
||||
#define TOTAL_BOXES_COUNT 14
|
||||
#define IN_BOX_COUNT 30
|
||||
|
||||
enum
|
||||
{
|
||||
WALLPAPER_FOREST,
|
||||
WALLPAPER_CITY,
|
||||
WALLPAPER_DESERT,
|
||||
WALLPAPER_SAVANNA,
|
||||
WALLPAPER_CRAG,
|
||||
WALLPAPER_VOLCANO,
|
||||
WALLPAPER_SNOW,
|
||||
WALLPAPER_CAVE,
|
||||
WALLPAPER_BEACH,
|
||||
WALLPAPER_SEAFLOOR,
|
||||
WALLPAPER_RIVER,
|
||||
WALLPAPER_SKY,
|
||||
WALLPAPER_POLKADOT,
|
||||
WALLPAPER_POKECENTER,
|
||||
WALLPAPER_MACHINE,
|
||||
WALLPAPER_PLAIN,
|
||||
WALLPAPER_COUNT
|
||||
};
|
||||
|
||||
u8 *GetBoxNamePtr(u8 boxNumber);
|
||||
struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition);
|
||||
void SetBoxMonNickFromAnyBox(u8 boxId, u8 monPosition, u8 * newNick);
|
||||
void CompactPartySlots(void);
|
||||
u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request);
|
||||
void sub_808BCB4(u8 boxId, u8 monPosition);
|
||||
void sub_808CE60(void);
|
||||
void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick);
|
||||
s16 CompactPartySlots(void);
|
||||
u32 GetBoxMonDataAt(u8 boxId, u8 monPosition, s32 request);
|
||||
void ZeroBoxMonAt(u8 boxId, u8 monPosition);
|
||||
void Cb2_ReturnToPSS(void);
|
||||
void ResetPokemonStorageSystem(void);
|
||||
u8 StorageGetCurrentBox(void);
|
||||
void PSS_RenderTextToVramViaBuffer(const u8 *name, u8 *a1, u8 a2, u8 a3, u8 *buffer, u8 a5);
|
||||
void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero2, u8 *buffer, s32 bytesToBuffer);
|
||||
|
||||
#endif // GUARD_POKEMON_STORAGE_SYSTEM_H
|
||||
|
||||
@@ -0,0 +1,516 @@
|
||||
#ifndef GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H
|
||||
#define GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H
|
||||
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "mon_markings.h"
|
||||
|
||||
#define IN_BOX_COLUMNS 5
|
||||
#define IN_BOX_ROWS 6
|
||||
|
||||
#define MAX_MON_ICONS 40
|
||||
#define MAX_ITEM_ICONS 3
|
||||
#define MAX_MENU_ITEMS 7
|
||||
|
||||
enum
|
||||
{
|
||||
MODE_PARTY,
|
||||
MODE_BOX,
|
||||
MODE_2,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
BOX_OPTION_WITHDRAW,
|
||||
BOX_OPTION_DEPOSIT,
|
||||
BOX_OPTION_MOVE_MONS,
|
||||
BOX_OPTION_MOVE_ITEMS,
|
||||
BOX_OPTION_EXIT,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PC_TEXT_EXIT_BOX,
|
||||
PC_TEXT_WHAT_YOU_DO,
|
||||
PC_TEXT_PICK_A_THEME,
|
||||
PC_TEXT_PICK_A_WALLPAPER,
|
||||
PC_TEXT_IS_SELECTED,
|
||||
PC_TEXT_JUMP_TO_WHICH_BOX,
|
||||
PC_TEXT_DEPOSIT_IN_WHICH_BOX,
|
||||
PC_TEXT_WAS_DEPOSITED,
|
||||
PC_TEXT_BOX_IS_FULL,
|
||||
PC_TEXT_RELEASE_POKE,
|
||||
PC_TEXT_WAS_RELEASED,
|
||||
PC_TEXT_BYE_BYE,
|
||||
PC_TEXT_MARK_POKE,
|
||||
PC_TEXT_LAST_POKE,
|
||||
PC_TEXT_PARTY_FULL,
|
||||
PC_TEXT_HOLDING_POKE,
|
||||
PC_TEXT_WHICH_ONE_WILL_TAKE,
|
||||
PC_TEXT_CANT_RELEASE_EGG,
|
||||
PC_TEXT_CONTINUE_BOX,
|
||||
PC_TEXT_CAME_BACK,
|
||||
PC_TEXT_WORRIED,
|
||||
PC_TEXT_SURPRISE,
|
||||
PC_TEXT_PLEASE_REMOVE_MAIL,
|
||||
PC_TEXT_IS_SELECTED2,
|
||||
PC_TEXT_GIVE_TO_MON,
|
||||
PC_TEXT_PLACED_IN_BAG,
|
||||
PC_TEXT_BAG_FULL,
|
||||
PC_TEXT_PUT_IN_BAG,
|
||||
PC_TEXT_ITEM_IS_HELD,
|
||||
PC_TEXT_CHANGED_TO_ITEM,
|
||||
PC_TEXT_CANT_STORE_MAIL,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PC_TEXT_FMT_NORMAL,
|
||||
PC_TEXT_FMT_MON_NAME_1,
|
||||
PC_TEXT_FMT_MON_NAME_2,
|
||||
PC_TEXT_FMT_MON_NAME_3,
|
||||
PC_TEXT_FMT_MON_NAME_4,
|
||||
PC_TEXT_FMT_MON_NAME_5,
|
||||
PC_TEXT_FMT_MON_NAME_6,
|
||||
PC_TEXT_FMT_ITEM_NAME,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PC_TEXT_CANCEL,
|
||||
PC_TEXT_STORE,
|
||||
PC_TEXT_WITHDRAW,
|
||||
PC_TEXT_MOVE,
|
||||
PC_TEXT_SHIFT,
|
||||
PC_TEXT_PLACE,
|
||||
PC_TEXT_SUMMARY,
|
||||
PC_TEXT_RELEASE,
|
||||
PC_TEXT_MARK,
|
||||
PC_TEXT_JUMP,
|
||||
PC_TEXT_WALLPAPER,
|
||||
PC_TEXT_NAME,
|
||||
PC_TEXT_TAKE,
|
||||
PC_TEXT_GIVE,
|
||||
PC_TEXT_GIVE2,
|
||||
PC_TEXT_SWITCH,
|
||||
PC_TEXT_BAG,
|
||||
PC_TEXT_INFO,
|
||||
PC_TEXT_SCENERY1,
|
||||
PC_TEXT_SCENERY2,
|
||||
PC_TEXT_SCENERY3,
|
||||
PC_TEXT_ETCETERA,
|
||||
PC_TEXT_FOREST,
|
||||
PC_TEXT_CITY,
|
||||
PC_TEXT_DESERT,
|
||||
PC_TEXT_SAVANNA,
|
||||
PC_TEXT_CRAG,
|
||||
PC_TEXT_VOLCANO,
|
||||
PC_TEXT_SNOW,
|
||||
PC_TEXT_CAVE,
|
||||
PC_TEXT_BEACH,
|
||||
PC_TEXT_SEAFLOOR,
|
||||
PC_TEXT_RIVER,
|
||||
PC_TEXT_SKY,
|
||||
PC_TEXT_POLKADOT,
|
||||
PC_TEXT_POKECENTER,
|
||||
PC_TEXT_MACHINE,
|
||||
PC_TEXT_SIMPLE,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CURSOR_AREA_IN_BOX,
|
||||
CURSOR_AREA_IN_PARTY,
|
||||
CURSOR_AREA_BOX,
|
||||
CURSOR_AREA_BUTTONS, // Party Pokemon and Close Box
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SCREEN_CHANGE_EXIT_BOX,
|
||||
SCREEN_CHANGE_SUMMARY_SCREEN,
|
||||
SCREEN_CHANGE_NAME_BOX,
|
||||
SCREEN_CHANGE_ITEM_FROM_BAG,
|
||||
};
|
||||
|
||||
#define TAG_PAL_WAVEFORM 0xDACA
|
||||
#define TAG_PAL_DAC8 0xDAC8
|
||||
#define TAG_PAL_DAC6 0xDAC6
|
||||
#define TAG_PAL_DACE 0xDACE
|
||||
#define TAG_PAL_DAC7 0xDAC7
|
||||
#define TAG_PAL_DAC9 0xDAC9
|
||||
#define TAG_PAL_DAC0 0xDAC0
|
||||
#define TAG_PAL_DACB 0xDACB
|
||||
|
||||
#define TAG_TILE_WAVEFORM 0x5
|
||||
#define TAG_TILE_10 0x10
|
||||
#define TAG_TILE_2 0x2
|
||||
#define TAG_TILE_D 0xD
|
||||
#define TAG_TILE_A 0xA
|
||||
#define TAG_TILE_3 0x3
|
||||
#define TAG_TILE_4 0x4
|
||||
#define TAG_TILE_12 0x12
|
||||
#define TAG_TILE_7 0x7
|
||||
#define TAG_TILE_0 0x0
|
||||
#define TAG_TILE_1 0x1
|
||||
#define TAG_TILE_6 0x6
|
||||
|
||||
struct WallpaperTable
|
||||
{
|
||||
const u32 *tiles;
|
||||
const u32 *tileMap;
|
||||
const u16 *palettes;
|
||||
};
|
||||
|
||||
struct StorageAction
|
||||
{
|
||||
const u8 *text;
|
||||
u8 format;
|
||||
};
|
||||
|
||||
struct UnkPSSStruct_2002370
|
||||
{
|
||||
struct Sprite *unk_0000;
|
||||
struct Sprite *unk_0004[4];
|
||||
u32 unk_0014[3]; // unused
|
||||
struct Sprite *unk_0020[2];
|
||||
u8 buffer[0x200]; // passed but not used
|
||||
u8 strbuf[20];
|
||||
bool32 loadPal;
|
||||
u16 tilesTag;
|
||||
u16 paletteTag;
|
||||
u8 curBox;
|
||||
u8 unk_0245; // unused
|
||||
u8 subpriority;
|
||||
};
|
||||
|
||||
struct StorageMenu
|
||||
{
|
||||
const u8 *text;
|
||||
int textId;
|
||||
};
|
||||
|
||||
struct UnkStruct_2000028
|
||||
{
|
||||
const u8 *unk_00;
|
||||
u8 *unk_04;
|
||||
u16 unk_08;
|
||||
u16 unk_0a;
|
||||
u16 newField;
|
||||
void (*unk_0c)(struct UnkStruct_2000028 *data);
|
||||
};
|
||||
|
||||
struct UnkStruct_2000020
|
||||
{
|
||||
struct UnkStruct_2000028 *unk_00;
|
||||
u8 unk_04;
|
||||
u8 unk_05;
|
||||
};
|
||||
|
||||
struct PSS_ItemIconSprite
|
||||
{
|
||||
struct Sprite *sprite;
|
||||
u8 *tiles;
|
||||
u16 palIndex;
|
||||
u8 cursorArea;
|
||||
u8 cursorPos;
|
||||
u8 active;
|
||||
};
|
||||
|
||||
struct PssQuestLogBuffer
|
||||
{
|
||||
u16 species;
|
||||
u16 species2;
|
||||
u8 fromBox;
|
||||
u8 toBox;
|
||||
};
|
||||
|
||||
struct PokemonStorageSystemData
|
||||
{
|
||||
u8 state;
|
||||
u8 boxOption;
|
||||
u8 screenChangeType;
|
||||
bool8 isReshowingPSS;
|
||||
u8 taskId;
|
||||
struct UnkStruct_2000020 unk_0020;
|
||||
struct UnkStruct_2000028 unk_0028[8];
|
||||
u16 field_B0[528 / 2];
|
||||
u16 field_2C0;
|
||||
u16 field_2C2;
|
||||
u8 field_2C4;
|
||||
u8 field_2C5;
|
||||
u8 showPartyMenuState;
|
||||
bool8 unk_02C7;
|
||||
u8 unk_02C8;
|
||||
bool8 unk_02C9;
|
||||
s16 newCurrBoxId;
|
||||
u16 bg2_X;
|
||||
s16 field_2CE;
|
||||
u16 field_2D0;
|
||||
u8 field_2D2;
|
||||
u8 field_2D3;
|
||||
u8 field_2D4;
|
||||
u16 field_2D6;
|
||||
s16 field_2D8;
|
||||
u16 field_2DA;
|
||||
u16 field_2DC;
|
||||
u16 field_2DE;
|
||||
u16 field_2E0;
|
||||
u8 filler[22];
|
||||
u8 field_2F8[512];
|
||||
u8 field_4F8[512];
|
||||
u8 field_6F8;
|
||||
u8 field_6F9;
|
||||
u8 field_6FA;
|
||||
s8 field_6FB;
|
||||
u16 field_6FC[16];
|
||||
u16 field_71C;
|
||||
u16 field_71E;
|
||||
struct Sprite *field_720[2];
|
||||
struct Sprite *field_728[2];
|
||||
struct Sprite *field_730[2];
|
||||
u32 field_738;
|
||||
u8 field_73C[80];
|
||||
u16 field_78C;
|
||||
s16 wallpaperSetId;
|
||||
s16 wallpaperId;
|
||||
u16 field_792[360];
|
||||
u8 wallpaperChangeState;
|
||||
u8 field_A63;
|
||||
u8 field_A64;
|
||||
s8 field_A65;
|
||||
// u8 *wallpaperTiles; // used only in Emerald for Walda
|
||||
/* 0a68 */ struct Sprite *movingMonSprite;
|
||||
/* 0a6c */ struct Sprite *partySprites[PARTY_SIZE];
|
||||
/* 0a84 */ struct Sprite *boxMonsSprites[IN_BOX_COUNT];
|
||||
/* 0afc */ struct Sprite **field_B00;
|
||||
/* 0b00 */ struct Sprite **field_B04;
|
||||
/* 0b04 */ u16 field_B08[MAX_MON_ICONS];
|
||||
/* 0b54 */ u16 field_B58[MAX_MON_ICONS];
|
||||
/* 0ba4 */ u16 boxSpecies[IN_BOX_COUNT];
|
||||
/* 0be0 */ u32 boxPersonalities[IN_BOX_COUNT];
|
||||
/* 0c58 */ u8 field_C5C;
|
||||
/* 0c59 */ u8 field_C5D;
|
||||
/* 0c5a */ u8 field_C5E;
|
||||
/* 0c5c */ u16 field_C60;
|
||||
/* 0c5e */ s16 field_C62;
|
||||
/* 0c60 */ s16 field_C64;
|
||||
/* 0c62 */ u16 field_C66;
|
||||
/* 0c64 */ u8 field_C68;
|
||||
/* 0c65 */ s8 field_C69;
|
||||
/* 0c66 */ u8 field_C6A;
|
||||
/* 0c67 */ u8 field_C6B;
|
||||
/* 0c68 */ struct WindowTemplate menuWindow;
|
||||
/* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS];
|
||||
/* 0ca8 */ u8 menuItemsCount;
|
||||
/* 0ca9 */ u8 menuWidth;
|
||||
/* 0caa */ u8 field_CAE;
|
||||
/* 0cac */ u16 field_CB0;
|
||||
/* 0cb0 */ struct Sprite *field_CB4;
|
||||
/* 0cb4 */ struct Sprite *field_CB8;
|
||||
/* 0cb8 */ s32 field_CBC;
|
||||
/* 0cbc */ s32 field_CC0;
|
||||
/* 0cc0 */ u32 field_CC4;
|
||||
/* 0cc4 */ u32 field_CC8;
|
||||
/* 0cc8 */ s16 field_CCC;
|
||||
/* 0cca */ s16 field_CCE;
|
||||
/* 0ccc */ u16 field_CD0;
|
||||
/* 0cce */ s8 field_CD2;
|
||||
/* 0ccf */ s8 field_CD3;
|
||||
/* 0cd0 */ u8 field_CD4;
|
||||
/* 0cd1 */ u8 field_CD5;
|
||||
/* 0cd2 */ u8 field_CD6;
|
||||
/* 0cd3 */ u8 field_CD7;
|
||||
/* 0cd4 */ u8 field_CD8[2];
|
||||
/* 0cd8 */ const u32 *cursorMonPalette;
|
||||
/* 0cdc */ u32 cursorMonPersonality;
|
||||
/* 0ce0 */ u16 cursorMonSpecies;
|
||||
/* 0ce2 */ u16 cursorMonItem;
|
||||
/* 0ce4 */ u16 field_CE8;
|
||||
/* 0ce6 */ bool8 setMosaic;
|
||||
/* 0ce7 */ u8 cursorMonMarkings;
|
||||
/* 0ce8 */ u8 cursorMonLevel;
|
||||
/* 0ce9 */ bool8 cursorMonIsEgg;
|
||||
/* 0cea */ u8 cursorMonNick[POKEMON_NAME_LENGTH + 1];
|
||||
/* 0cf5 */ u8 cursorMonTexts[4][36];
|
||||
/* 0d88 */ bool8 (*monPlaceChangeFunc)(void);
|
||||
/* 0d8c */ u8 monPlaceChangeState;
|
||||
/* 0d8d */ u8 field_D91;
|
||||
/* 0d90 */ struct Sprite *field_D94;
|
||||
/* 0d94 */ struct Sprite *field_D98[2];
|
||||
/* 0d9c */ u16 *field_DA0;
|
||||
/* 0da0 */ struct PokemonMarkMenu field_DA4;
|
||||
/* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C;
|
||||
/* 20a0 */ struct Pokemon movingMon;
|
||||
/* 2104 */ struct Pokemon field_2108;
|
||||
/* 2168 */ u8 field_216C;
|
||||
/* 2169 */ u8 field_216D;
|
||||
/* 216c */ bool8 isSurfMon;
|
||||
/* 216d */ bool8 isDiveMon;
|
||||
/* 216a */ s8 field_216E;
|
||||
/* 216b */ s8 field_216F;
|
||||
/* 216e */ s8 field_2170;
|
||||
/* 216f */ s8 field_2171;
|
||||
/* 2170 */ u16 field_2172;
|
||||
/* 2172 */ u16 field_2176[3];
|
||||
/* 2178 */ u8 field_2186;
|
||||
/* 2179 */ u8 field_2187;
|
||||
/* 217a */ u8 field_2188;
|
||||
/* 217c */ union
|
||||
{
|
||||
struct Pokemon *mon;
|
||||
struct BoxPokemon *box;
|
||||
} field_218C;
|
||||
/* 2180 */ u8 field_2190[40];
|
||||
/* 21a8 */ u8 field_21B8[40];
|
||||
/* 21d0 */ u8 field_21E0[POKEMON_NAME_LENGTH + 1];
|
||||
/* 21db */ u8 itemName[20];
|
||||
/* 21ef */ u8 inBoxMovingMode;
|
||||
/* 21f0 */ u16 field_2200;
|
||||
/* 21f4 */ struct PSS_ItemIconSprite itemIconSprites[MAX_ITEM_ICONS];
|
||||
/* 2224 */ u16 movingItem;
|
||||
/* 2226 */ u16 field_2236;
|
||||
/* 2228 */ struct PssQuestLogBuffer qlogBuffer;
|
||||
/* 2230 */ u16 field_2238;
|
||||
/* 2232 */ u16 field_223A;
|
||||
/* 2234 */ u16 *field_223C;
|
||||
/* 2238 */ struct Sprite *cursorMonSprite;
|
||||
/* 223c */ u16 field_2244[0x40];
|
||||
/* 22bc */ u8 field_22C4[0x800];
|
||||
/* 2abc */ u8 field_2AC4[0x1800];
|
||||
/* 42bc */ u8 field_42C4[0x800];
|
||||
/* 4abc */ u8 field_4AC4[0x1000];
|
||||
/* 5abc */ u8 field_5AC4[0x800];
|
||||
}; // size=62bc
|
||||
|
||||
extern struct PokemonStorageSystemData *gPSSData;
|
||||
|
||||
void Cb2_EnterPSS(u8 a0);
|
||||
u8 GetCurrentBoxOption(void);
|
||||
struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority);
|
||||
void SetBoxWallpaper(u8 boxId, u8 wallpaperId);
|
||||
void SetCurrentBox(u8 boxId);
|
||||
void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst);
|
||||
void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * src);
|
||||
|
||||
void Cb2_ExitPSS(void);
|
||||
void FreeBoxSelectionPopupSpriteGfx(void);
|
||||
void sub_808C940(u8 curBox);
|
||||
void sub_808C950(void);
|
||||
u8 HandleBoxChooseSelectionInput(void);
|
||||
void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal);
|
||||
void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value);
|
||||
u32 GetCurrentBoxMonData(u8 boxPosition, s32 request);
|
||||
u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst);
|
||||
|
||||
void sub_80922C0(void);
|
||||
void sub_8092340(void);
|
||||
bool8 sub_80924A8(void);
|
||||
void sub_8092AE4(void);
|
||||
void sub_8092B3C(u8 a0);
|
||||
void sub_8092B50(void);
|
||||
void sub_8092B5C(void);
|
||||
u8 sub_8092B70(void);
|
||||
void sub_8092F54(void);
|
||||
void sub_8093174(void);
|
||||
void sub_8093194(void);
|
||||
bool8 sub_80931EC(void);
|
||||
void sub_8093264(void);
|
||||
void sub_8093630(void);
|
||||
void sub_8093660(void);
|
||||
void sub_80936B8(void);
|
||||
void sub_80937B4(void);
|
||||
void sub_8094D14(u8 a0);
|
||||
u8 sub_8094D34(void);
|
||||
void sub_8094D60(void);
|
||||
void sub_8094D84(void);
|
||||
bool8 sub_8094F90(void);
|
||||
s16 sub_8094F94(void);
|
||||
void sub_8095024(void);
|
||||
bool8 sub_8095050(void);
|
||||
void sub_80950A4(void);
|
||||
void sub_80950BC(u8 a0);
|
||||
bool8 sub_80950D0(void);
|
||||
void sub_8095B5C(void);
|
||||
void sub_8096088(void);
|
||||
void sub_80960C0(void);
|
||||
bool8 sub_809610C(void);
|
||||
const u8 *GetMovingItemName(void);
|
||||
void sub_80966F4(void);
|
||||
bool8 sub_8096728(void);
|
||||
bool8 sub_80967C0(void);
|
||||
void sub_8096BE4(struct UnkStruct_2000020 *arg0, struct UnkStruct_2000028 *arg1, u32 arg2);
|
||||
void sub_8096BF8(void);
|
||||
void AddMenu(void);
|
||||
bool8 CanMovePartyMon(void);
|
||||
bool8 CanShiftMon(void);
|
||||
bool8 DoMonPlaceChange(void);
|
||||
bool8 DoWallpaperGfxChange(void);
|
||||
u8 GetBoxCursorPosition(void);
|
||||
u16 GetMovingItem(void);
|
||||
u8 HandleInput(void);
|
||||
void InitCanReleaseMonVars(void);
|
||||
void InitMonPlaceChange(u8 a0);
|
||||
bool8 IsActiveItemMoving(void);
|
||||
bool8 IsCursorOnCloseBox(void);
|
||||
bool8 IsMonBeingMoved(void);
|
||||
void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos);
|
||||
void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos);
|
||||
void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos);
|
||||
void Item_TakeMons(u8 cursorArea, u8 cursorPos);
|
||||
void PrintItemDescription(void);
|
||||
void ReleaseMon(void);
|
||||
s8 RunCanReleaseMon(void);
|
||||
bool8 ScrollToBox(void);
|
||||
void SetMonMarkings(u8 markings);
|
||||
void SetMovingMonPriority(u8 priority);
|
||||
void SetUpScrollToBox(u8 targetBox);
|
||||
void SetWallpaperForCurrentBox(u8 wallpaper);
|
||||
bool8 TryStorePartyMonInBox(u8 boxId);
|
||||
void InitMenu(void);
|
||||
void SetMenuText(u8 textId);
|
||||
void sub_8095C84(u8 cursorArea, u8 cursorPos);
|
||||
void sub_8095E2C(u16 itemId);
|
||||
u8 GetBoxWallpaper(u8 boxId);
|
||||
bool8 IsCursorOnBox(void);
|
||||
bool8 IsCursorInBox(void);
|
||||
|
||||
void sub_808FFAC(void);
|
||||
struct Sprite * CreateMonIconSprite(u16 species, u32 pid, s16 x, s16 y, u8 priority, u8 subpriority);
|
||||
void CreatePartyMonsSprites(bool8 species);
|
||||
void sub_80909F4(void);
|
||||
bool8 sub_8090A60(void);
|
||||
void sub_8090B98(s16 yDelta);
|
||||
void DestroyAllPartyMonIcons(void);
|
||||
void sub_8091114(void);
|
||||
bool8 sub_8091150(void);
|
||||
void sub_80913DC(u8 box);
|
||||
bool8 sub_809140C(void);
|
||||
void sub_80920FC(bool8 species);
|
||||
void CreateMovingMonIcon(void);
|
||||
void sub_8090E08(u8 boxId, u8 cursorPos);
|
||||
bool8 sub_8090E74(void);
|
||||
void sub_8090CC0(u8 cursorArea, u8 cursorPos);
|
||||
void sub_8090D58(u8 cursorArea, u8 cursorPos);
|
||||
void DestroyPartyMonIcon(u8 partyId);
|
||||
void DestroyMovingMonIcon(void);
|
||||
s16 GetFirstFreeBoxSpot(u8 boxId);
|
||||
void sub_80901EC(u8 boxPosition);
|
||||
void sub_8090FC4(u8 mode, u8 position);
|
||||
bool8 sub_8091084(void);
|
||||
void sub_80910CC(void);
|
||||
u8 CountPartyMons(void);
|
||||
u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore);
|
||||
|
||||
s8 sub_8094E50(u8 a0);
|
||||
bool8 sub_8095474(u8 action);
|
||||
u8 sub_8095AA0(void);
|
||||
bool8 sub_8095ABC(void);
|
||||
void sub_8095D44(u8 cursorArea, u8 cursorPos);
|
||||
void sub_8094CD4(u8 *arg0, u8 *arg1);
|
||||
void sub_8094D40(void);
|
||||
void sub_8092BAC(bool8 arg0);
|
||||
void DestroyBoxMonIconAtPosition(u8 boxPosition);
|
||||
void SetBoxMonIconObjMode(u8 cursorPos, u8 objMode);
|
||||
void SetPartyMonIconObjMode(u8 cursorPos, u8 objMode);
|
||||
|
||||
#endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H
|
||||
@@ -254,6 +254,7 @@ extern const struct SpriteTemplate gDummySpriteTemplate;
|
||||
extern struct Sprite gSprites[];
|
||||
extern struct OamMatrix gOamMatrices[];
|
||||
extern bool8 gAffineAnimsDisabled;
|
||||
extern u16 gReservedSpriteTileCount;
|
||||
|
||||
void ResetSpriteData(void);
|
||||
void AnimateSprites(void);
|
||||
|
||||
@@ -30,8 +30,8 @@ u8 *GetExpandedPlaceholder(u32 id);
|
||||
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);
|
||||
u8 *StringCopyN_Multibyte(u8 *dest, const u8 *src, u32 n);
|
||||
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);
|
||||
|
||||
@@ -1358,4 +1358,87 @@ extern const u8 gText_BoxName[];
|
||||
extern const u8 gText_PkmnsNickname[];
|
||||
extern const u8 gText_RivalsName[];
|
||||
|
||||
// pokemon_storage_system
|
||||
extern const u8 gText_WithdrawPokemon[];
|
||||
extern const u8 gText_WithdrawMonDescription[];
|
||||
extern const u8 gText_DepositPokemon[];
|
||||
extern const u8 gText_DepositMonDescription[];
|
||||
extern const u8 gText_MovePokemon[];
|
||||
extern const u8 gText_MoveMonDescription[];
|
||||
extern const u8 gText_MoveItems[];
|
||||
extern const u8 gText_MoveItemsDescription[];
|
||||
extern const u8 gText_SeeYa[];
|
||||
extern const u8 gText_SeeYaDescription[];
|
||||
extern const u8 gText_PartyFull[];
|
||||
extern const u8 gText_JustOnePkmn[];
|
||||
extern const u8 gText_Box[];
|
||||
extern const u8 gText_ExitFromBox[];
|
||||
extern const u8 gText_WhatDoYouWantToDo[];
|
||||
extern const u8 gText_PleasePickATheme[];
|
||||
extern const u8 gText_PickTheWallpaper[];
|
||||
extern const u8 gText_PkmnIsSelected[];
|
||||
extern const u8 gText_JumpToWhichBox[];
|
||||
extern const u8 gText_DepositInWhichBox[];
|
||||
extern const u8 gText_PkmnWasDeposited[];
|
||||
extern const u8 gText_BoxIsFull2[];
|
||||
extern const u8 gText_ReleaseThisPokemon[];
|
||||
extern const u8 gText_PkmnWasReleased[];
|
||||
extern const u8 gText_ByeByePkmn[];
|
||||
extern const u8 gText_MarkYourPkmn[];
|
||||
extern const u8 gText_ThatsYourLastPkmn[];
|
||||
extern const u8 gText_YourPartysFull[];
|
||||
extern const u8 gText_YoureHoldingAPkmn[];
|
||||
extern const u8 gText_WhichOneWillYouTake[];
|
||||
extern const u8 gText_YouCantReleaseAnEgg[];
|
||||
extern const u8 gText_ContinueBoxOperations[];
|
||||
extern const u8 gText_PkmnCameBack[];
|
||||
extern const u8 gText_WasItWorriedAboutYou[];
|
||||
extern const u8 gText_FourEllipsesExclamation[];
|
||||
extern const u8 gText_PleaseRemoveTheMail[];
|
||||
extern const u8 gText_PkmnIsSelected[];
|
||||
extern const u8 gText_GiveToAPkmn[];
|
||||
extern const u8 gText_PlacedItemInBag[];
|
||||
extern const u8 gText_BagIsFull2[];
|
||||
extern const u8 gText_PutItemInBag[];
|
||||
extern const u8 gText_ItemIsNowHeld[];
|
||||
extern const u8 gText_ChangedToNewItem[];
|
||||
extern const u8 gText_MailCantBeStored[];
|
||||
extern const u8 gPCText_Cancel[];
|
||||
extern const u8 gPCText_Store[];
|
||||
extern const u8 gPCText_Withdraw[];
|
||||
extern const u8 gPCText_Move[];
|
||||
extern const u8 gPCText_Shift[];
|
||||
extern const u8 gPCText_Place[];
|
||||
extern const u8 gPCText_Summary[];
|
||||
extern const u8 gPCText_Release[];
|
||||
extern const u8 gPCText_Mark[];
|
||||
extern const u8 gPCText_Jump[];
|
||||
extern const u8 gPCText_Wallpaper[];
|
||||
extern const u8 gPCText_Name[];
|
||||
extern const u8 gPCText_Take[];
|
||||
extern const u8 gPCText_Give[];
|
||||
extern const u8 gPCText_Switch[];
|
||||
extern const u8 gPCText_Bag[];
|
||||
extern const u8 gPCText_Info[];
|
||||
extern const u8 gPCText_Scenery1[];
|
||||
extern const u8 gPCText_Scenery2[];
|
||||
extern const u8 gPCText_Scenery3[];
|
||||
extern const u8 gPCText_Etcetera[];
|
||||
extern const u8 gPCText_Forest[];
|
||||
extern const u8 gPCText_City[];
|
||||
extern const u8 gPCText_Desert[];
|
||||
extern const u8 gPCText_Savanna[];
|
||||
extern const u8 gPCText_Crag[];
|
||||
extern const u8 gPCText_Volcano[];
|
||||
extern const u8 gPCText_Snow[];
|
||||
extern const u8 gPCText_Cave[];
|
||||
extern const u8 gPCText_Beach[];
|
||||
extern const u8 gPCText_Seafloor[];
|
||||
extern const u8 gPCText_River[];
|
||||
extern const u8 gPCText_Sky[];
|
||||
extern const u8 gPCText_PolkaDot[];
|
||||
extern const u8 gPCText_Pokecenter[];
|
||||
extern const u8 gPCText_Machine[];
|
||||
extern const u8 gPCText_Simple[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
#define EXT_CTRL_CODE_COLOR 0x1
|
||||
#define EXT_CTRL_CODE_HIGHLIGHT 0x2
|
||||
#define EXT_CTRL_CODE_SHADOW 0x3
|
||||
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x4
|
||||
//
|
||||
#define EXT_CTRL_CODE_UNKNOWN_7 0x7
|
||||
//
|
||||
|
||||
+3
-3
@@ -69,10 +69,10 @@ void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue);
|
||||
void CallWindowFunction(u8 windowId, WindowFunc func);
|
||||
bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value);
|
||||
u32 GetWindowAttribute(u8 windowId, u8 attributeId);
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template);
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template);
|
||||
u16 AddWindow8Bit(const struct WindowTemplate *template);
|
||||
void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue);
|
||||
void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height);
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum);
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum);
|
||||
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
|
||||
|
||||
extern void *gWindowBgTilemapBuffers[];
|
||||
|
||||
+16
-2
@@ -127,7 +127,15 @@ SECTIONS {
|
||||
src/option_menu.o(.text);
|
||||
src/pokedex.o(.text);
|
||||
src/trainer_card.o(.text);
|
||||
asm/pokemon_storage_system.o(.text);
|
||||
src/pokemon_storage_system.o(.text);
|
||||
src/pokemon_storage_system_2.o(.text);
|
||||
src/pokemon_storage_system_3.o(.text);
|
||||
src/pokemon_storage_system_4.o(.text);
|
||||
src/pokemon_storage_system_5.o(.text);
|
||||
src/pokemon_storage_system_6.o(.text);
|
||||
src/pokemon_storage_system_7.o(.text);
|
||||
src/pokemon_storage_system_8.o(.text);
|
||||
src/pokemon_storage_system_9.o(.text);
|
||||
src/pokemon_icon.o(.text);
|
||||
src/script_movement.o(.text);
|
||||
src/fldeff_cut.o(.text);
|
||||
@@ -447,7 +455,13 @@ SECTIONS {
|
||||
src/field_effect.o(.rodata);
|
||||
src/option_menu.o(.rodata);
|
||||
src/trainer_card.o(.rodata);
|
||||
data/pokemon_storage_system.o(.rodata);
|
||||
src/pokemon_storage_system_2.o(.rodata);
|
||||
src/pokemon_storage_system_3.o(.rodata);
|
||||
src/pokemon_storage_system_4.o(.rodata);
|
||||
src/pokemon_storage_system_5.o(.rodata);
|
||||
src/pokemon_storage_system_6.o(.rodata);
|
||||
src/pokemon_storage_system_7.o(.rodata);
|
||||
src/pokemon_storage_system_8.o(.rodata);
|
||||
src/pokemon_icon.o(.rodata);
|
||||
src/fldeff_cut.o(.rodata);
|
||||
src/map_name_popup.o(.rodata);
|
||||
|
||||
+1
-1
@@ -1258,7 +1258,7 @@ static void Task_ContextMenu_FromPartyGiveMenu(u8 taskId)
|
||||
|
||||
static void Task_ContextMenu_FromPokemonPC(u8 taskId)
|
||||
{
|
||||
sResources->exitCallback = sub_808CE60;
|
||||
sResources->exitCallback = Cb2_ReturnToPSS;
|
||||
gTasks[taskId].func = BerryPouch_StartFadeToExitCallback;
|
||||
}
|
||||
|
||||
|
||||
@@ -553,21 +553,21 @@ u16 GetBgAttribute(u8 bg, u8 attributeId)
|
||||
{
|
||||
switch (attributeId)
|
||||
{
|
||||
case 1:
|
||||
case BG_ATTR_CHARBASEINDEX:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_CHARBASEINDEX);
|
||||
case 2:
|
||||
case BG_ATTR_MAPBASEINDEX:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_MAPBASEINDEX);
|
||||
case 3:
|
||||
case BG_ATTR_SCREENSIZE:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE);
|
||||
case 4:
|
||||
case BG_ATTR_PALETTEMODE:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE);
|
||||
case 7:
|
||||
case BG_ATTR_PRIORITY:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_PRIORITY);
|
||||
case 5:
|
||||
case BG_ATTR_MOSAIC:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_MOSAIC);
|
||||
case 6:
|
||||
case BG_ATTR_WRAPAROUND:
|
||||
return GetBgControlAttribute(bg, BG_CTRL_ATTR_WRAPAROUND);
|
||||
case 8:
|
||||
case BG_ATTR_TEXTORAFFINEMODE:
|
||||
switch (GetBgType(bg))
|
||||
{
|
||||
case 0:
|
||||
@@ -577,9 +577,9 @@ u16 GetBgAttribute(u8 bg, u8 attributeId)
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
case 9:
|
||||
case BG_ATTR_BGTYPE:
|
||||
return GetBgType(bg);
|
||||
case 10:
|
||||
case BG_ATTR_BASETILE:
|
||||
return sGpuBgConfigs2[bg].baseTile;
|
||||
default:
|
||||
return -1;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "box_party_pokemon_dropdown.h"
|
||||
#include "malloc.h"
|
||||
|
||||
struct UnkStruct_203ABE4_Sub
|
||||
struct BPPD_MapRect
|
||||
{
|
||||
s16 destX;
|
||||
s16 destY;
|
||||
@@ -13,27 +13,27 @@ struct UnkStruct_203ABE4_Sub
|
||||
s16 destY2;
|
||||
};
|
||||
|
||||
struct UnkStruct_203ABE4
|
||||
struct BPPD_Struct
|
||||
{
|
||||
struct UnkStruct_203ABE4_Sub map1Rect;
|
||||
struct UnkStruct_203ABE4_Sub map2Rect;
|
||||
struct BPPD_MapRect map1Rect;
|
||||
struct BPPD_MapRect map2Rect;
|
||||
const void * src1;
|
||||
const void * src2;
|
||||
u16 src1Height;
|
||||
u16 src1Width;
|
||||
u16 src2Width;
|
||||
u16 src2Height;
|
||||
u16 unk_26;
|
||||
u16 unk_28;
|
||||
u16 bytesPerRow;
|
||||
u8 mapSize;
|
||||
u8 bgId;
|
||||
bool8 bgUpdateScheduled;
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct UnkStruct_203ABE4 * sBoxPartyPokemonDropdownPtr = NULL;
|
||||
static EWRAM_DATA struct BPPD_Struct * sBoxPartyPokemonDropdownPtr = NULL;
|
||||
static EWRAM_DATA u16 sBoxPartyPokemonDropdownCount = 0;
|
||||
|
||||
static void PushMap1(u8 a0);
|
||||
static void PushMap2(u8 a0);
|
||||
static void PushMap1(u8 idx);
|
||||
static void PushMap2(u8 idx);
|
||||
|
||||
static const struct {
|
||||
u16 height;
|
||||
@@ -52,10 +52,10 @@ static const struct {
|
||||
}
|
||||
};
|
||||
|
||||
void sub_80F7AD8(u8 num)
|
||||
void AllocBoxPartyPokemonDropdowns(u8 num)
|
||||
{
|
||||
u16 i;
|
||||
sBoxPartyPokemonDropdownPtr = Alloc(num * sizeof(struct UnkStruct_203ABE4));
|
||||
sBoxPartyPokemonDropdownPtr = Alloc(num * sizeof(struct BPPD_Struct));
|
||||
sBoxPartyPokemonDropdownCount = sBoxPartyPokemonDropdownPtr == NULL ? 0 : num;
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownCount; i++)
|
||||
{
|
||||
@@ -64,149 +64,149 @@ void sub_80F7AD8(u8 num)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7B2C(void)
|
||||
void FreeBoxPartyPokemonDropdowns(void)
|
||||
{
|
||||
Free(sBoxPartyPokemonDropdownPtr);
|
||||
}
|
||||
|
||||
void sub_80F7B40(void)
|
||||
void CopyAllBoxPartyPokemonDropdownsToVram(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownCount; i++)
|
||||
{
|
||||
if (sBoxPartyPokemonDropdownPtr[i].bgUpdateScheduled == TRUE)
|
||||
sub_80F7E54(i);
|
||||
CopyBoxPartyPokemonDropdownToBgTilemapBuffer(i);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7B80(u8 a0, u8 a1, const void * a2, u16 a3, u16 a4)
|
||||
void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height)
|
||||
{
|
||||
u16 screenSize;
|
||||
u16 bgType;
|
||||
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
sBoxPartyPokemonDropdownPtr[a0].src1 = NULL;
|
||||
sBoxPartyPokemonDropdownPtr[a0].src2 = a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgId = a1;
|
||||
sBoxPartyPokemonDropdownPtr[a0].src2Height = a3;
|
||||
sBoxPartyPokemonDropdownPtr[a0].unk_26 = a4;
|
||||
screenSize = GetBgAttribute(a1, BG_ATTR_SCREENSIZE);
|
||||
bgType = GetBgAttribute(a1, BG_ATTR_BGTYPE);
|
||||
sBoxPartyPokemonDropdownPtr[a0].src1Height = sBGdims[bgType][screenSize].height;
|
||||
sBoxPartyPokemonDropdownPtr[a0].src1Width = sBGdims[bgType][screenSize].width;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src1 = NULL;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src2 = src;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgId = bgId;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src2Width = width;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src2Height = height;
|
||||
screenSize = GetBgAttribute(bgId, BG_ATTR_SCREENSIZE);
|
||||
bgType = GetBgAttribute(bgId, BG_ATTR_BGTYPE);
|
||||
sBoxPartyPokemonDropdownPtr[idx].src1Height = sBGdims[bgType][screenSize].height;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src1Width = sBGdims[bgType][screenSize].width;
|
||||
if (bgType != 0)
|
||||
sBoxPartyPokemonDropdownPtr[a0].mapSize = 1;
|
||||
sBoxPartyPokemonDropdownPtr[idx].mapSize = 1;
|
||||
else
|
||||
sBoxPartyPokemonDropdownPtr[a0].mapSize = 2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].unk_28 = a3 * sBoxPartyPokemonDropdownPtr[a0].mapSize;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.width = a3;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.height = a4;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX = 0;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY = 0;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX2 = 0;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY2 = 0;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map1Rect = sBoxPartyPokemonDropdownPtr[a0].map2Rect;
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgUpdateScheduled = TRUE;
|
||||
sBoxPartyPokemonDropdownPtr[idx].mapSize = 2;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bytesPerRow = width * sBoxPartyPokemonDropdownPtr[idx].mapSize;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.width = width;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.height = height;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX = 0;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY = 0;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2 = 0;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 = 0;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map1Rect = sBoxPartyPokemonDropdownPtr[idx].map2Rect;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgUpdateScheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7C7C(u8 a0, const void * a1)
|
||||
void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void * src)
|
||||
{
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
sBoxPartyPokemonDropdownPtr[a0].src1 = a1;
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgUpdateScheduled = TRUE;
|
||||
sBoxPartyPokemonDropdownPtr[idx].src1 = src;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgUpdateScheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7CAC(u8 a0, u16 a1, u16 a2)
|
||||
void SetBoxPartyPokemonDropdownMap2Pos(u8 idx, u16 x, u16 y)
|
||||
{
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX2 = a1;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY2 = a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgUpdateScheduled = TRUE;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2 = x;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 = y;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgUpdateScheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7CE8(u8 a0, u16 a1, u16 a2, u16 a3, u16 a4)
|
||||
void SetBoxPartyPokemonDropdownMap2Rect(u8 idx, u16 x, u16 y, u16 width, u16 height)
|
||||
{
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX = a1;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY = a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.width = a3;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.height = a4;
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgUpdateScheduled = TRUE;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX = x;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY = y;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.width = width;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.height = height;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgUpdateScheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7D30(u8 a0, u8 a1, s8 a2)
|
||||
void AdjustBoxPartyPokemonDropdownPos(u8 idx, u8 op, s8 param)
|
||||
{
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
switch (a1)
|
||||
switch (op)
|
||||
{
|
||||
case 0:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX2 += a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.width -= a2;
|
||||
case BPPD_MOVE_INNER_LEFT:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2 += param;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.width -= param;
|
||||
break;
|
||||
case 1:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX += a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.width += a2;
|
||||
case BPPD_MOVE_OUTER_LEFT:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX += param;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.width += param;
|
||||
break;
|
||||
case 2:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY2 += a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.height -= a2;
|
||||
case BPPD_MOVE_INNER_TOP:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 += param;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.height -= param;
|
||||
break;
|
||||
case 3:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY -= a2;
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.height += a2;
|
||||
case BPPD_MOVE_OUTER_TOP:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY -= param;
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.height += param;
|
||||
break;
|
||||
case 4:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX2 += a2;
|
||||
case BPPD_MOVE_INNER_X:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2 += param;
|
||||
break;
|
||||
case 5:
|
||||
sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY2 += a2;
|
||||
case BPPD_MOVE_INNER_Y:
|
||||
sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 += param;
|
||||
break;
|
||||
}
|
||||
sBoxPartyPokemonDropdownPtr[a0].bgUpdateScheduled = TRUE;
|
||||
sBoxPartyPokemonDropdownPtr[idx].bgUpdateScheduled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80F7E54(u8 a0)
|
||||
void CopyBoxPartyPokemonDropdownToBgTilemapBuffer(u8 idx)
|
||||
{
|
||||
if (a0 < sBoxPartyPokemonDropdownCount)
|
||||
if (idx < sBoxPartyPokemonDropdownCount)
|
||||
{
|
||||
if (sBoxPartyPokemonDropdownPtr[a0].src1 != NULL)
|
||||
PushMap1(a0);
|
||||
PushMap2(a0);
|
||||
sBoxPartyPokemonDropdownPtr[a0].map1Rect = sBoxPartyPokemonDropdownPtr[a0].map2Rect;
|
||||
if (sBoxPartyPokemonDropdownPtr[idx].src1 != NULL)
|
||||
PushMap1(idx);
|
||||
PushMap2(idx);
|
||||
sBoxPartyPokemonDropdownPtr[idx].map1Rect = sBoxPartyPokemonDropdownPtr[idx].map2Rect;
|
||||
}
|
||||
}
|
||||
|
||||
static void PushMap1(u8 a0)
|
||||
static void PushMap1(u8 idx)
|
||||
{
|
||||
int i;
|
||||
int r9 = sBoxPartyPokemonDropdownPtr[a0].mapSize * sBoxPartyPokemonDropdownPtr[a0].src1Height;
|
||||
const void * addr = sBoxPartyPokemonDropdownPtr[a0].src1 + r9 * sBoxPartyPokemonDropdownPtr[a0].map1Rect.destY2 + sBoxPartyPokemonDropdownPtr[a0].map1Rect.destX2 * sBoxPartyPokemonDropdownPtr[a0].mapSize;
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownPtr[a0].map1Rect.height; i++)
|
||||
int run = sBoxPartyPokemonDropdownPtr[idx].mapSize * sBoxPartyPokemonDropdownPtr[idx].src1Height;
|
||||
const void * addr = sBoxPartyPokemonDropdownPtr[idx].src1 + run * sBoxPartyPokemonDropdownPtr[idx].map1Rect.destY2 + sBoxPartyPokemonDropdownPtr[idx].map1Rect.destX2 * sBoxPartyPokemonDropdownPtr[idx].mapSize;
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownPtr[idx].map1Rect.height; i++)
|
||||
{
|
||||
CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[a0].bgId, addr, sBoxPartyPokemonDropdownPtr[a0].map1Rect.destX2, sBoxPartyPokemonDropdownPtr[a0].map1Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[a0].map1Rect.width, 1);
|
||||
addr += r9;
|
||||
CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[idx].bgId, addr, sBoxPartyPokemonDropdownPtr[idx].map1Rect.destX2, sBoxPartyPokemonDropdownPtr[idx].map1Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[idx].map1Rect.width, 1);
|
||||
addr += run;
|
||||
}
|
||||
}
|
||||
|
||||
static void PushMap2(u8 a0)
|
||||
static void PushMap2(u8 idx)
|
||||
{
|
||||
int i;
|
||||
int r9 = sBoxPartyPokemonDropdownPtr[a0].mapSize * sBoxPartyPokemonDropdownPtr[a0].src2Height;
|
||||
const void * addr = sBoxPartyPokemonDropdownPtr[a0].src2 + r9 * sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY + sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX * sBoxPartyPokemonDropdownPtr[a0].mapSize;
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownPtr[a0].map2Rect.height; i++)
|
||||
int run = sBoxPartyPokemonDropdownPtr[idx].mapSize * sBoxPartyPokemonDropdownPtr[idx].src2Width;
|
||||
const void * addr = sBoxPartyPokemonDropdownPtr[idx].src2 + run * sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY + sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX * sBoxPartyPokemonDropdownPtr[idx].mapSize;
|
||||
for (i = 0; i < sBoxPartyPokemonDropdownPtr[idx].map2Rect.height; i++)
|
||||
{
|
||||
CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[a0].bgId, addr, sBoxPartyPokemonDropdownPtr[a0].map2Rect.destX2, sBoxPartyPokemonDropdownPtr[a0].map2Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[a0].map2Rect.width, 1);
|
||||
addr += r9;
|
||||
CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[idx].bgId, addr, sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2, sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[idx].map2Rect.width, 1);
|
||||
addr += run;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ bool8 IsThereRoomInAnyBoxForMorePokemon(void)
|
||||
{
|
||||
for (j = 0; j < IN_BOX_COUNT; j++)
|
||||
{
|
||||
if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1642,7 +1642,7 @@ void ChangeBoxPokemonNickname(void)
|
||||
|
||||
static void ChangeBoxPokemonNickname_CB(void)
|
||||
{
|
||||
SetBoxMonNickFromAnyBox(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2);
|
||||
SetBoxMonNickAt(gSpecialVar_MonBoxId, gSpecialVar_MonBoxPos, gStringVar2);
|
||||
CB2_ReturnToFieldContinueScriptPlayMapMusic();
|
||||
}
|
||||
|
||||
@@ -1980,11 +1980,11 @@ u16 GetPCBoxToSendMon(void)
|
||||
|
||||
bool8 ShouldShowBoxWasFullMessage(void)
|
||||
{
|
||||
if (FlagGet(FLAG_SYS_CHANGED_BOX_TO_STORE_MON))
|
||||
if (FlagGet(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE))
|
||||
return FALSE;
|
||||
if (StorageGetCurrentBox() == VarGet(VAR_PC_BOX_TO_SEND_MON))
|
||||
return FALSE;
|
||||
FlagSet(FLAG_SYS_CHANGED_BOX_TO_STORE_MON);
|
||||
FlagSet(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2001,7 +2001,7 @@ bool8 IsDestinationBoxFull(void)
|
||||
if (GetBoxMonData(GetBoxedMonPtr(i, j), MON_DATA_SPECIES, NULL) == SPECIES_NONE)
|
||||
{
|
||||
if (GetPCBoxToSendMon() != i)
|
||||
FlagClear(FLAG_SYS_CHANGED_BOX_TO_STORE_MON);
|
||||
FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
|
||||
VarSet(VAR_PC_BOX_TO_SEND_MON, i);
|
||||
return ShouldShowBoxWasFullMessage();
|
||||
}
|
||||
|
||||
+2
-2
@@ -1247,10 +1247,10 @@ const u32 gUnknown_8E9BF48[] = INCBIN_U32("graphics/interface/link_rfu_status.4b
|
||||
const u16 gUnknown_8E9C14C[] = INCBIN_U16("graphics/interface/pokedex_abc.gbapal");
|
||||
const u32 gUnknown_8E9C16C[] = INCBIN_U32("graphics/interface/pokedex_abc.4bpp.lz");
|
||||
|
||||
const u16 gUnknown_8E9C3D8[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal");
|
||||
const u16 gPSSMenu_Pal[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal");
|
||||
const u16 gUnknown_8E9C3F8[] = INCBIN_U16("graphics/interface/box_tiles_pal2.gbapal");
|
||||
const u16 gUnknown_8E9C418[] = INCBIN_U16("graphics/interface/box_tiles_pal3.gbapal");
|
||||
const u32 gUnknown_8E9C438[] = INCBIN_U32("graphics/interface/box_tiles.4bpp.lz");
|
||||
const u32 gPSSMenu_Gfx[] = INCBIN_U32("graphics/interface/box_tiles.4bpp.lz");
|
||||
|
||||
const u32 gUnknown_8E9CAEC[] = INCBIN_U32("graphics/unknown/unknown_E9CAEC.bin.lz");
|
||||
|
||||
|
||||
+4
-4
@@ -738,7 +738,7 @@ void CB2_InitHofPC(void)
|
||||
case 3:
|
||||
if (!DrawHofBackground())
|
||||
{
|
||||
sub_80A0A48(0, 0, 0);
|
||||
BeginPCScreenEffect_TurnOn(0, 0, 0);
|
||||
SetVBlankCallback(VBlankCB_HofIdle);
|
||||
gMain.state++;
|
||||
}
|
||||
@@ -748,7 +748,7 @@ void CB2_InitHofPC(void)
|
||||
AnimateSprites();
|
||||
BuildOamBuffer();
|
||||
UpdatePaletteFade();
|
||||
if (!sub_80A0A98())
|
||||
if (!IsPCScreenEffectRunning_TurnOn())
|
||||
gMain.state++;
|
||||
break;
|
||||
case 5:
|
||||
@@ -946,13 +946,13 @@ static void Task_HofPC_HandlePaletteOnExit(u8 taskId)
|
||||
struct HallofFameTeam* fameTeam;
|
||||
|
||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
sub_80A0A70(0, 0, 0);
|
||||
BeginPCScreenEffect_TurnOff(0, 0, 0);
|
||||
gTasks[taskId].func = Task_HofPC_HandleExit;
|
||||
}
|
||||
|
||||
static void Task_HofPC_HandleExit(u8 taskId)
|
||||
{
|
||||
if (!sub_80A0AAC())
|
||||
if (!IsPCScreenEffectRunning_TurnOff())
|
||||
{
|
||||
HideBg(0);
|
||||
HideBg(1);
|
||||
|
||||
+1
-1
@@ -1784,7 +1784,7 @@ static void GoToBerryPouch_PCBox(void)
|
||||
|
||||
static void ReturnToBagMenuFromSubmenu_PCBox(void)
|
||||
{
|
||||
GoToBagMenu(ITEMMENULOCATION_PCBOX, OPEN_BAG_LAST, sub_808CE60);
|
||||
GoToBagMenu(ITEMMENULOCATION_PCBOX, OPEN_BAG_LAST, Cb2_ReturnToPSS);
|
||||
}
|
||||
|
||||
static void Task_ItemContext_Sell(u8 taskId)
|
||||
|
||||
+4
-4
@@ -378,7 +378,7 @@ static bool8 ItemPc_DoGfxSetup(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80A0A48(0, 0, 0);
|
||||
BeginPCScreenEffect_TurnOn(0, 0, 0);
|
||||
ItemPc_SetInitializedFlag(1);
|
||||
PlaySE(SE_PC_LOGIN);
|
||||
}
|
||||
@@ -642,7 +642,7 @@ static void Task_ItemPcTurnOff1(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_80A0A70(0, 0, 0);
|
||||
BeginPCScreenEffect_TurnOff(0, 0, 0);
|
||||
PlaySE(SE_PC_OFF);
|
||||
}
|
||||
gTasks[taskId].func = Task_ItemPcTurnOff2;
|
||||
@@ -652,7 +652,7 @@ static void Task_ItemPcTurnOff2(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
|
||||
if (!gPaletteFade.active && !sub_80A0AAC())
|
||||
if (!gPaletteFade.active && !IsPCScreenEffectRunning_TurnOff())
|
||||
{
|
||||
DestroyListMenuTask(data[0], &sListMenuState.scroll, &sListMenuState.row);
|
||||
if (sStateDataPtr->savedCallback != NULL)
|
||||
@@ -726,7 +726,7 @@ static void Task_ItemPcMain(u8 taskId)
|
||||
u16 row;
|
||||
s32 input;
|
||||
|
||||
if (!gPaletteFade.active && !sub_80A0A98())
|
||||
if (!gPaletteFade.active && !IsPCScreenEffectRunning_TurnOn())
|
||||
{
|
||||
if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
|
||||
+1
-1
@@ -1986,7 +1986,7 @@ static const struct NamingScreenTemplate sPlayerNamingScreenTemplate = {
|
||||
|
||||
static const struct NamingScreenTemplate sPcBoxNamingScreenTemplate = {
|
||||
.copyExistingString = FALSE,
|
||||
.maxChars = 8/*BOX_NAME_LENGTH*/,
|
||||
.maxChars = BOX_NAME_LENGTH,
|
||||
.iconFunction = 2,
|
||||
.addGenderIcon = 0,
|
||||
.initialPage = KBPAGE_LETTERS_UPPER,
|
||||
|
||||
+89
-65
@@ -3,146 +3,160 @@
|
||||
#include "gpu_regs.h"
|
||||
#include "palette.h"
|
||||
|
||||
static void sub_80A0AC0(TaskFunc func, u16 a2, UNUSED u16 a3, u8 priority);
|
||||
static void sub_80A0B0C(u8 taskId);
|
||||
static void sub_80A0C78(u8 taskId);
|
||||
/*
|
||||
* Animates the screen as though it was a CRT monitor turning on or off.
|
||||
*/
|
||||
|
||||
void sub_80A0A48(u16 a1, u16 a2, u8 a3)
|
||||
#define tState data[0]
|
||||
#define tXSpeed data[1]
|
||||
#define tYSpeed data[2]
|
||||
#define tWin0Left data[3]
|
||||
#define tWin0Right data[4]
|
||||
#define tWin0Top data[5]
|
||||
#define tWin0Bottom data[6]
|
||||
#define tBldCntBak data[7]
|
||||
#define tBldYBak data[8]
|
||||
|
||||
static void BeginPCScreenEffect(TaskFunc func, u16 a2, UNUSED u16 a3, u8 priority);
|
||||
static void Task_PCScreenEffect_TurnOn(u8 taskId);
|
||||
static void Task_PCScreenEffect_TurnOff(u8 taskId);
|
||||
|
||||
void BeginPCScreenEffect_TurnOn(u16 xspeed, u16 yspeed, u8 priority)
|
||||
{
|
||||
sub_80A0AC0(sub_80A0B0C, a1, a2, a3);
|
||||
BeginPCScreenEffect(Task_PCScreenEffect_TurnOn, xspeed, yspeed, priority);
|
||||
}
|
||||
|
||||
void sub_80A0A70(u16 a1, u16 a2, u8 a3)
|
||||
void BeginPCScreenEffect_TurnOff(u16 xspeed, u16 yspeed, u8 priority)
|
||||
{
|
||||
sub_80A0AC0(sub_80A0C78, a1, a2, a3);
|
||||
BeginPCScreenEffect(Task_PCScreenEffect_TurnOff, xspeed, yspeed, priority);
|
||||
}
|
||||
|
||||
bool8 sub_80A0A98(void)
|
||||
bool8 IsPCScreenEffectRunning_TurnOn(void)
|
||||
{
|
||||
return FuncIsActiveTask(sub_80A0B0C);
|
||||
return FuncIsActiveTask(Task_PCScreenEffect_TurnOn);
|
||||
}
|
||||
|
||||
bool8 sub_80A0AAC(void)
|
||||
bool8 IsPCScreenEffectRunning_TurnOff(void)
|
||||
{
|
||||
return FuncIsActiveTask(sub_80A0C78);
|
||||
return FuncIsActiveTask(Task_PCScreenEffect_TurnOff);
|
||||
}
|
||||
|
||||
static void sub_80A0AC0(TaskFunc func, u16 a2, UNUSED u16 a3, u8 priority)
|
||||
static void BeginPCScreenEffect(TaskFunc func, u16 speed, UNUSED u16 unused, u8 priority)
|
||||
{
|
||||
u8 taskId = CreateTask(func, priority);
|
||||
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = a2 == 0 ? 16 : a2;
|
||||
gTasks[taskId].data[2] = a2 == 0 ? 20 : a2;
|
||||
gTasks[taskId].tState = 0;
|
||||
gTasks[taskId].tXSpeed = speed == 0 ? 16 : speed;
|
||||
gTasks[taskId].tYSpeed = speed == 0 ? 20 : speed; // Bug? should be the unused param, not speed
|
||||
gTasks[taskId].func(taskId);
|
||||
}
|
||||
|
||||
static void sub_80A0B0C(u8 taskId)
|
||||
static void Task_PCScreenEffect_TurnOn(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
switch (task->tState)
|
||||
{
|
||||
case 0:
|
||||
task->data[3] = 120;
|
||||
task->data[4] = 120;
|
||||
task->data[5] = 80;
|
||||
task->data[6] = 81;
|
||||
task->tWin0Left = 120;
|
||||
task->tWin0Right = 120;
|
||||
task->tWin0Top = 80;
|
||||
task->tWin0Bottom = 81;
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6]));
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWin0Left, task->tWin0Right));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->tWin0Top, task->tWin0Bottom));
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
break;
|
||||
case 1:
|
||||
task->data[7] = GetGpuReg(REG_OFFSET_BLDCNT);
|
||||
task->data[8] = GetGpuReg(REG_OFFSET_BLDY);
|
||||
task->tBldCntBak = GetGpuReg(REG_OFFSET_BLDCNT);
|
||||
task->tBldYBak = GetGpuReg(REG_OFFSET_BLDY);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_LIGHTEN);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 16);
|
||||
break;
|
||||
case 2:
|
||||
task->data[3] -= task->data[1];
|
||||
task->data[4] += task->data[1];
|
||||
if (task->data[3] <= 0 || task->data[4] >= DISPLAY_WIDTH)
|
||||
task->tWin0Left -= task->tXSpeed;
|
||||
task->tWin0Right += task->tXSpeed;
|
||||
if (task->tWin0Left <= 0 || task->tWin0Right >= DISPLAY_WIDTH)
|
||||
{
|
||||
task->data[3] = 0;
|
||||
task->data[4] = DISPLAY_WIDTH;
|
||||
task->tWin0Left = 0;
|
||||
task->tWin0Right = DISPLAY_WIDTH;
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, task->data[7]);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, task->tBldCntBak);
|
||||
BlendPalettes(0xFFFFFFFF, 0, RGB_BLACK);
|
||||
gPlttBufferFaded[0] = 0;
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
|
||||
if (task->data[3])
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWin0Left, task->tWin0Right));
|
||||
if (task->tWin0Left)
|
||||
return;
|
||||
break;
|
||||
case 3:
|
||||
task->data[5] -= task->data[2];
|
||||
task->data[6] += task->data[2];
|
||||
if (task->data[5] <= 0 || task->data[6] >= DISPLAY_HEIGHT)
|
||||
task->tWin0Top -= task->tYSpeed;
|
||||
task->tWin0Bottom += task->tYSpeed;
|
||||
if (task->tWin0Top <= 0 || task->tWin0Bottom >= DISPLAY_HEIGHT)
|
||||
{
|
||||
task->data[5] = 0;
|
||||
task->data[6] = DISPLAY_HEIGHT;
|
||||
task->tWin0Top = 0;
|
||||
task->tWin0Bottom = DISPLAY_HEIGHT;
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6]));
|
||||
if (task->data[5])
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->tWin0Top, task->tWin0Bottom));
|
||||
if (task->tWin0Top)
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, task->data[7]);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, task->tBldCntBak);
|
||||
DestroyTask(taskId);
|
||||
return;
|
||||
}
|
||||
++task->data[0];
|
||||
++task->tState;
|
||||
}
|
||||
|
||||
static void sub_80A0C78(u8 taskId)
|
||||
static void Task_PCScreenEffect_TurnOff(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
switch (task->tState)
|
||||
{
|
||||
case 0:
|
||||
gPlttBufferFaded[0] = 0;
|
||||
break;
|
||||
case 1:
|
||||
task->data[3] = 0;
|
||||
task->data[4] = DISPLAY_WIDTH;
|
||||
task->data[5] = 0;
|
||||
task->data[6] = DISPLAY_HEIGHT;
|
||||
task->tWin0Left = 0;
|
||||
task->tWin0Right = DISPLAY_WIDTH;
|
||||
task->tWin0Top = 0;
|
||||
task->tWin0Bottom = DISPLAY_HEIGHT;
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6]));
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWin0Left, task->tWin0Right));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->tWin0Top, task->tWin0Bottom));
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
break;
|
||||
case 2:
|
||||
task->data[5] += task->data[2];
|
||||
task->data[6] -= task->data[2];
|
||||
if (task->data[5] >= 80 || task->data[6] <= 81)
|
||||
task->tWin0Top += task->tYSpeed;
|
||||
task->tWin0Bottom -= task->tYSpeed;
|
||||
if (task->tWin0Top >= 80 || task->tWin0Bottom <= 81)
|
||||
{
|
||||
task->data[5] = 80;
|
||||
task->data[6] = 81;
|
||||
task->tWin0Top = 80;
|
||||
task->tWin0Bottom = 81;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_LIGHTEN);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 16);
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6]));
|
||||
if (task->data[5] != 80)
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->tWin0Top, task->tWin0Bottom));
|
||||
if (task->tWin0Top != 80)
|
||||
return;
|
||||
break;
|
||||
case 3:
|
||||
task->data[3] += task->data[1];
|
||||
task->data[4] -= task->data[1];
|
||||
if (task->data[3] >= 120 || task->data[4] <= 120)
|
||||
task->tWin0Left += task->tXSpeed;
|
||||
task->tWin0Right -= task->tXSpeed;
|
||||
if (task->tWin0Left >= 120 || task->tWin0Right <= 120)
|
||||
{
|
||||
task->data[3] = 120;
|
||||
task->data[4] = 120;
|
||||
task->tWin0Left = 120;
|
||||
task->tWin0Right = 120;
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_BLACK);
|
||||
gPlttBufferFaded[0] = 0;
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
|
||||
if (task->data[3] != 120)
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWin0Left, task->tWin0Right));
|
||||
if (task->tWin0Left != 120)
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
@@ -152,5 +166,15 @@ static void sub_80A0C78(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
return;
|
||||
}
|
||||
++task->data[0];
|
||||
++task->tState;
|
||||
}
|
||||
|
||||
#undef tBldYBak
|
||||
#undef tBldCntBak
|
||||
#undef tWin0Bottom
|
||||
#undef tWin0Top
|
||||
#undef tWin0Right
|
||||
#undef tWin0Left
|
||||
#undef tYSpeed
|
||||
#undef tXSpeed
|
||||
#undef tState
|
||||
|
||||
+2
-2
@@ -3661,7 +3661,7 @@ static u8 SendMonToPC(struct Pokemon* mon)
|
||||
gSpecialVar_MonBoxId = boxNo;
|
||||
gSpecialVar_MonBoxPos = boxPos;
|
||||
if (GetPCBoxToSendMon() != boxNo)
|
||||
FlagClear(FLAG_SYS_CHANGED_BOX_TO_STORE_MON);
|
||||
FlagClear(FLAG_SHOWN_BOX_WAS_FULL_MESSAGE);
|
||||
VarSet(VAR_PC_BOX_TO_SEND_MON, boxNo);
|
||||
return MON_GIVEN_TO_PC;
|
||||
}
|
||||
@@ -3806,7 +3806,7 @@ static bool8 IsPokemonStorageFull(void)
|
||||
|
||||
for (i = 0; i < 14; i++)
|
||||
for (j = 0; j < 30; j++)
|
||||
if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
if (GetBoxMonDataAt(i, j, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
void BackupPokemonStorage(struct PokemonStorage * dest)
|
||||
{
|
||||
*dest = *gPokemonStoragePtr;
|
||||
}
|
||||
|
||||
void RestorePokemonStorage(struct PokemonStorage * src)
|
||||
{
|
||||
*gPokemonStoragePtr = *src;
|
||||
}
|
||||
|
||||
// Functions here are general utility functions.
|
||||
u8 StorageGetCurrentBox(void)
|
||||
{
|
||||
return gPokemonStoragePtr->currentBox;
|
||||
}
|
||||
|
||||
void SetCurrentBox(u8 boxId)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT)
|
||||
gPokemonStoragePtr->currentBox = boxId;
|
||||
}
|
||||
|
||||
u32 GetBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
return GetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], request);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, const void *value)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
SetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], request, value);
|
||||
}
|
||||
|
||||
u32 GetCurrentBoxMonData(u8 boxPosition, s32 request)
|
||||
{
|
||||
return GetBoxMonDataAt(gPokemonStoragePtr->currentBox, boxPosition, request);
|
||||
}
|
||||
|
||||
void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value)
|
||||
{
|
||||
SetBoxMonDataAt(gPokemonStoragePtr->currentBox, boxPosition, request, value);
|
||||
}
|
||||
|
||||
void GetBoxMonNickAt(u8 boxId, u8 boxPosition, u8 *dst)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
GetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], MON_DATA_NICKNAME, dst);
|
||||
else
|
||||
*dst = EOS;
|
||||
}
|
||||
|
||||
void SetBoxMonNickAt(u8 boxId, u8 boxPosition, const u8 *nick)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
SetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], MON_DATA_NICKNAME, nick);
|
||||
}
|
||||
|
||||
u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
return GetBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition], request, dst);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * src)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
gPokemonStoragePtr->boxes[boxId][boxPosition] = *src;
|
||||
}
|
||||
|
||||
void CopyBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * dst)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
*dst = gPokemonStoragePtr->boxes[boxId][boxPosition];
|
||||
}
|
||||
|
||||
void CreateBoxMonAt(u8 boxId, u8 boxPosition, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 personality, u8 otIDType, u32 otID)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
{
|
||||
CreateBoxMon(&gPokemonStoragePtr->boxes[boxId][boxPosition],
|
||||
species,
|
||||
level,
|
||||
fixedIV,
|
||||
hasFixedPersonality, personality,
|
||||
otIDType, otID);
|
||||
}
|
||||
}
|
||||
|
||||
void ZeroBoxMonAt(u8 boxId, u8 boxPosition)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
ZeroBoxMonData(&gPokemonStoragePtr->boxes[boxId][boxPosition]);
|
||||
}
|
||||
|
||||
void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
BoxMonToMon(&gPokemonStoragePtr->boxes[boxId][boxPosition], dst);
|
||||
}
|
||||
|
||||
struct BoxPokemon * GetBoxedMonPtr(u8 boxId, u8 boxPosition)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && boxPosition < IN_BOX_COUNT)
|
||||
return &gPokemonStoragePtr->boxes[boxId][boxPosition];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u8 *GetBoxNamePtr(u8 boxId)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT)
|
||||
return gPokemonStoragePtr->boxNames[boxId];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u8 GetBoxWallpaper(u8 boxId)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT)
|
||||
return gPokemonStoragePtr->boxWallpapers[boxId];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetBoxWallpaper(u8 boxId, u8 wallpaperId)
|
||||
{
|
||||
if (boxId < TOTAL_BOXES_COUNT && wallpaperId < WALLPAPER_COUNT)
|
||||
gPokemonStoragePtr->boxWallpapers[boxId] = wallpaperId;
|
||||
}
|
||||
|
||||
s16 SeekToNextMonInBox(struct BoxPokemon * boxMons, s8 currIndex, u8 maxIndex, u8 flags)
|
||||
{
|
||||
// flags:
|
||||
// bit 0: Allow eggs
|
||||
// bit 1: Search backwards
|
||||
s16 i;
|
||||
s16 adder;
|
||||
if (flags == 0 || flags == 1)
|
||||
adder = 1;
|
||||
else
|
||||
adder = -1;
|
||||
|
||||
if (flags == 1 || flags == 3)
|
||||
{
|
||||
for (i = currIndex + adder; i >= 0 && i <= maxIndex; i += adder)
|
||||
{
|
||||
if (GetBoxMonData(&boxMons[i], MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = currIndex + adder; i >= 0 && i <= maxIndex; i += adder)
|
||||
{
|
||||
if (GetBoxMonData(&boxMons[i], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& !GetBoxMonData(&boxMons[i], MON_DATA_IS_EGG))
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,653 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "event_data.h"
|
||||
#include "field_fadetransition.h"
|
||||
#include "field_weather.h"
|
||||
#include "help_system.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "overworld.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
#include "script.h"
|
||||
#include "strings.h"
|
||||
#include "task.h"
|
||||
#include "constants/species.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/field_weather.h"
|
||||
#include "constants/help_system.h"
|
||||
|
||||
struct PSS_MenuStringPtrs
|
||||
{
|
||||
const u8 *text;
|
||||
const u8 *desc;
|
||||
};
|
||||
|
||||
static EWRAM_DATA u8 sPreviousBoxOption = 0;
|
||||
static EWRAM_DATA struct UnkPSSStruct_2002370 *sBoxSelectionPopupSpriteManager = NULL;
|
||||
|
||||
static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr);
|
||||
static void sub_808C9C4(u8 curBox);
|
||||
static void sub_808CBA4(void);
|
||||
static void UpdateBoxNameAndCountSprite_WraparoundRight(void);
|
||||
static void UpdateBoxNameAndCountSprite_WraparoundLeft(void);
|
||||
static void PrintBoxNameAndCountToSprite(void);
|
||||
static void PrintToSpriteWithTagUnk0240(const u8 *a0, u16 x, u16 y);
|
||||
static void sub_808CD64(struct Sprite * sprite);
|
||||
|
||||
// Forward declarations
|
||||
|
||||
static const u16 sBoxSelectionPopupPalette[];
|
||||
static const u16 sBoxSelectionPopupCenterTiles[];
|
||||
static const u16 sBoxSelectionPopupSidesTiles[];
|
||||
|
||||
static const struct PSS_MenuStringPtrs sUnknown_83CDA20[] = {
|
||||
{gText_WithdrawPokemon, gText_WithdrawMonDescription},
|
||||
{gText_DepositPokemon, gText_DepositMonDescription },
|
||||
{gText_MovePokemon, gText_MoveMonDescription },
|
||||
{gText_MoveItems, gText_MoveItemsDescription },
|
||||
{gText_SeeYa, gText_SeeYaDescription }
|
||||
};
|
||||
|
||||
void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero2, u8 *buffer, s32 bytesToBuffer)
|
||||
{
|
||||
s32 i, tileBytesToBuffer, remainingBytes;
|
||||
u16 windowId;
|
||||
u8 txtColor[3];
|
||||
u8 *tileData1, *tileData2;
|
||||
struct WindowTemplate winTemplate = {0};
|
||||
|
||||
winTemplate.width = 24;
|
||||
winTemplate.height = 2;
|
||||
windowId = AddWindow(&winTemplate);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(zero2));
|
||||
tileData1 = (u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||
tileData2 = (winTemplate.width * 32) + tileData1;
|
||||
|
||||
if (!zero1)
|
||||
txtColor[0] = TEXT_COLOR_TRANSPARENT;
|
||||
else
|
||||
txtColor[0] = zero2;
|
||||
txtColor[1] = TEXT_DYNAMIC_COLOR_6;
|
||||
txtColor[2] = TEXT_DYNAMIC_COLOR_5;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string);
|
||||
|
||||
tileBytesToBuffer = bytesToBuffer;
|
||||
if (tileBytesToBuffer > 6)
|
||||
tileBytesToBuffer = 6;
|
||||
remainingBytes = bytesToBuffer - 6;
|
||||
if (tileBytesToBuffer > 0)
|
||||
{
|
||||
for (i = tileBytesToBuffer; i != 0; i--)
|
||||
{
|
||||
CpuCopy16(tileData1, dst, 0x80);
|
||||
CpuCopy16(tileData2, dst + 0x80, 0x80);
|
||||
tileData1 += 0x80;
|
||||
tileData2 += 0x80;
|
||||
dst += 0x100;
|
||||
}
|
||||
}
|
||||
|
||||
// Never used. bytesToBuffer is always passed <= 6, so remainingBytes is always <= 0 here
|
||||
if (remainingBytes > 0)
|
||||
CpuFill16((zero2 << 4) | zero2, dst, (u32)(remainingBytes) * 0x100);
|
||||
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
static void PrintStringToBufferCopyNow(const u8 *string, void *dst, u16 rise, u8 bgClr, u8 fgClr, u8 shClr, u8 *buffer)
|
||||
{
|
||||
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, PIXEL_FILL(bgClr));
|
||||
tileData1 = (u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA);
|
||||
tileData2 = (winTemplate.width * 32) + tileData1;
|
||||
txtColor[0] = bgClr;
|
||||
txtColor[1] = fgClr;
|
||||
txtColor[2] = shClr;
|
||||
AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string);
|
||||
CpuCopy16(tileData1, dst, var);
|
||||
CpuCopy16(tileData2, dst + rise, var);
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
static u8 CountMonsInBox(u8 boxId)
|
||||
{
|
||||
u16 i, count;
|
||||
|
||||
for (i = 0, count = 0; i < IN_BOX_COUNT; i++)
|
||||
{
|
||||
if (GetBoxMonDataAt(boxId, i, MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
s16 GetFirstFreeBoxSpot(u8 boxId)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < IN_BOX_COUNT; i++)
|
||||
{
|
||||
if (GetBoxMonDataAt(boxId, i, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1; // all spots are taken
|
||||
}
|
||||
|
||||
u8 CountPartyNonEggMons(void)
|
||||
{
|
||||
u16 i, count;
|
||||
|
||||
for (i = 0, count = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore)
|
||||
{
|
||||
u16 i, count;
|
||||
|
||||
for (i = 0, count = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (i != slotToIgnore
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
u16 CountPartyAliveNonEggMons_IgnoreVar0x8004Slot(void)
|
||||
{
|
||||
return CountPartyAliveNonEggMonsExcept(gSpecialVar_0x8004);
|
||||
}
|
||||
|
||||
u8 CountPartyMons(void)
|
||||
{
|
||||
u16 i, count;
|
||||
|
||||
for (i = 0, count = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static u8 *StringCopyAndFillWithSpaces(u8 *dst, const u8 *src, u16 n)
|
||||
{
|
||||
u8 *str;
|
||||
|
||||
for (str = StringCopy(dst, src); str < dst + n; str++)
|
||||
*str = CHAR_SPACE;
|
||||
|
||||
*str = EOS;
|
||||
return str;
|
||||
}
|
||||
|
||||
static void sub_808C25C(u16 *dest, u16 dest_left, u16 dest_top, const u16 *src, u16 src_left, u16 src_top, u16 dest_width, u16 dest_height, u16 src_width)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
dest_width *= 2;
|
||||
dest += dest_top * 0x20 + dest_left;
|
||||
src += src_top * src_width + src_left;
|
||||
for (i = 0; i < dest_height; i++)
|
||||
{
|
||||
CpuCopy16(src, dest, dest_width);
|
||||
dest += 0x20;
|
||||
src += src_width;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_808C2D8(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 height)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
dest += dest_top * 0x20 + dest_left;
|
||||
width *= 2;
|
||||
for (i = 0; i < height; dest += 0x20, i++)
|
||||
Dma3FillLarge16_(0, dest, width);
|
||||
}
|
||||
|
||||
static void Task_PokemonStorageSystemPC(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
case 0:
|
||||
SetHelpContext(HELPCONTEXT_BILLS_PC);
|
||||
PSS_CreatePCMenu(task->data[1], &task->data[15]);
|
||||
LoadStdWindowFrameGfx();
|
||||
DrawDialogueFrame(0, 0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, TEXT_SPEED_FF, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
CopyWindowToVram(0, 3);
|
||||
CopyWindowToVram(task->data[15], 3);
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
if (IsWeatherNotFadingIn())
|
||||
{
|
||||
task->data[0]++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
task->data[2] = Menu_ProcessInput();
|
||||
switch(task->data[2])
|
||||
{
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
task->data[3] = task->data[1];
|
||||
if (JOY_NEW(DPAD_UP) && --task->data[3] < 0)
|
||||
task->data[3] = 4;
|
||||
|
||||
if (JOY_NEW(DPAD_DOWN) && ++task->data[3] > 4)
|
||||
task->data[3] = 0;
|
||||
if (task->data[1] != task->data[3])
|
||||
{
|
||||
task->data[1] = task->data[3];
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
}
|
||||
break;
|
||||
case MENU_B_PRESSED:
|
||||
case 4:
|
||||
ClearStdWindowAndFrame(0, TRUE);
|
||||
ClearStdWindowAndFrame(task->data[15], TRUE);
|
||||
ScriptContext2_Disable();
|
||||
EnableBothScriptContexts();
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
default:
|
||||
if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, gText_PartyFull, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
task->data[0] = 3;
|
||||
}
|
||||
else if (task->data[2] == 1 && CountPartyMons() == 1)
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, gText_JustOnePkmn, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
task->data[0] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
FadeScreen(FADE_TO_BLACK, 0);
|
||||
task->data[0] = 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
task->data[0] = 2;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_UP))
|
||||
{
|
||||
if (--task->data[1] < 0)
|
||||
task->data[1] = 4;
|
||||
Menu_MoveCursor(-1);
|
||||
task->data[1] = Menu_GetCursorPos();
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
task->data[0] = 2;
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
if (++task->data[1] > 3)
|
||||
task->data[1] = 0;
|
||||
Menu_MoveCursor(1);
|
||||
task->data[1] = Menu_GetCursorPos();
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GREY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GREY);
|
||||
task->data[0] = 2;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
Cb2_EnterPSS(task->data[2]);
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ShowPokemonStorageSystemPC(void)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_PokemonStorageSystemPC, 80);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
static void FieldCb_ReturnToPcMenu(void)
|
||||
{
|
||||
u8 taskId;
|
||||
MainCallback vblankCb = gMain.vblankCallback;
|
||||
|
||||
SetVBlankCallback(NULL);
|
||||
taskId = CreateTask(Task_PokemonStorageSystemPC, 80);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = sPreviousBoxOption;
|
||||
Task_PokemonStorageSystemPC(taskId);
|
||||
SetVBlankCallback(vblankCb);
|
||||
FadeInFromBlack();
|
||||
}
|
||||
|
||||
static const struct WindowTemplate sUnknown_83CDA48 = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 17,
|
||||
.height = 10,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x001
|
||||
};
|
||||
|
||||
static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr)
|
||||
{
|
||||
s16 windowId;
|
||||
windowId = AddWindow(&sUnknown_83CDA48);
|
||||
|
||||
DrawStdWindowFrame(windowId, FALSE);
|
||||
PrintTextArray(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, NELEMS(sUnknown_83CDA20), (void *)sUnknown_83CDA20);
|
||||
Menu_InitCursor(windowId, 2, 0, 2, 16, NELEMS(sUnknown_83CDA20), whichMenu);
|
||||
*windowIdPtr = windowId;
|
||||
}
|
||||
|
||||
void Cb2_ExitPSS(void)
|
||||
{
|
||||
sPreviousBoxOption = GetCurrentBoxOption();
|
||||
gFieldCallback = FieldCb_ReturnToPcMenu;
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
|
||||
void ResetPokemonStorageSystem(void)
|
||||
{
|
||||
u16 boxId, boxPosition;
|
||||
|
||||
SetCurrentBox(0);
|
||||
for (boxId = 0; boxId < TOTAL_BOXES_COUNT; boxId++)
|
||||
{
|
||||
for (boxPosition = 0; boxPosition < IN_BOX_COUNT; boxPosition++)
|
||||
ZeroBoxMonAt(boxId, boxPosition);
|
||||
}
|
||||
for (boxId = 0; boxId < TOTAL_BOXES_COUNT; boxId++)
|
||||
{
|
||||
u8 *dest = StringCopy(GetBoxNamePtr(boxId), gText_Box);
|
||||
ConvertIntToDecimalStringN(dest, boxId + 1, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
}
|
||||
for (boxId = 0; boxId < TOTAL_BOXES_COUNT; boxId++)
|
||||
{
|
||||
SetBoxWallpaper(boxId, boxId % 4);
|
||||
}
|
||||
}
|
||||
|
||||
void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal)
|
||||
{
|
||||
struct SpritePalette palette = {
|
||||
sBoxSelectionPopupPalette, palTag
|
||||
};
|
||||
struct SpriteSheet sheets[] = {
|
||||
{sBoxSelectionPopupCenterTiles, 0x800, tileTag},
|
||||
{sBoxSelectionPopupSidesTiles, 0x180, tileTag + 1},
|
||||
{}
|
||||
};
|
||||
|
||||
if (loadPal)
|
||||
LoadSpritePalette(&palette);
|
||||
|
||||
LoadSpriteSheets(sheets);
|
||||
sBoxSelectionPopupSpriteManager = a0;
|
||||
a0->tilesTag = tileTag;
|
||||
a0->paletteTag = palTag;
|
||||
a0->subpriority = a3;
|
||||
a0->loadPal = loadPal;
|
||||
}
|
||||
|
||||
void FreeBoxSelectionPopupSpriteGfx(void)
|
||||
{
|
||||
if (sBoxSelectionPopupSpriteManager->loadPal)
|
||||
FreeSpritePaletteByTag(sBoxSelectionPopupSpriteManager->paletteTag);
|
||||
FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tilesTag);
|
||||
FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tilesTag + 1);
|
||||
}
|
||||
|
||||
void sub_808C940(u8 curBox)
|
||||
{
|
||||
sub_808C9C4(curBox);
|
||||
}
|
||||
|
||||
void sub_808C950(void)
|
||||
{
|
||||
sub_808CBA4();
|
||||
}
|
||||
|
||||
u8 HandleBoxChooseSelectionInput(void)
|
||||
{
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
return 201;
|
||||
}
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
return sBoxSelectionPopupSpriteManager->curBox;
|
||||
}
|
||||
if (JOY_NEW(DPAD_LEFT))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
UpdateBoxNameAndCountSprite_WraparoundLeft();
|
||||
}
|
||||
else if (JOY_NEW(DPAD_RIGHT))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
UpdateBoxNameAndCountSprite_WraparoundRight();
|
||||
}
|
||||
return 200;
|
||||
}
|
||||
|
||||
static const union AnimCmd gUnknown_83CDA50[] = {
|
||||
ANIMCMD_FRAME( 0, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83CDA58[] = {
|
||||
ANIMCMD_FRAME( 4, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83CDA60[] = {
|
||||
ANIMCMD_FRAME( 6, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83CDA68[] = {
|
||||
ANIMCMD_FRAME(10, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_83CDA70[] = {
|
||||
gUnknown_83CDA50,
|
||||
gUnknown_83CDA58,
|
||||
gUnknown_83CDA60,
|
||||
gUnknown_83CDA68
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83CDA80[] = {
|
||||
AFFINEANIMCMD_FRAME(224, 224, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const gUnknown_83CDA90[] = {
|
||||
gUnknown_83CDA80
|
||||
};
|
||||
|
||||
static void sub_808C9C4(u8 curBox)
|
||||
{
|
||||
u16 i;
|
||||
u8 spriteId;
|
||||
struct SpriteTemplate template;
|
||||
struct OamData oamData = {};
|
||||
oamData.size = SPRITE_SIZE(64x64);
|
||||
oamData.paletteNum = 1;
|
||||
template = (struct SpriteTemplate){
|
||||
0, 0, &oamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
{
|
||||
const u8 gUnknown_83CDA94[] = _("/30");
|
||||
|
||||
sBoxSelectionPopupSpriteManager->curBox = curBox;
|
||||
template.tileTag = sBoxSelectionPopupSpriteManager->tilesTag;
|
||||
template.paletteTag = sBoxSelectionPopupSpriteManager->paletteTag;
|
||||
|
||||
spriteId = CreateSprite(&template, 160, 96, 0);
|
||||
sBoxSelectionPopupSpriteManager->unk_0000 = gSprites + spriteId;
|
||||
|
||||
// Manual subsprites
|
||||
oamData.shape = SPRITE_SHAPE(8x32);
|
||||
oamData.size = SPRITE_SIZE(8x32);
|
||||
template.tileTag = sBoxSelectionPopupSpriteManager->tilesTag + 1;
|
||||
template.anims = gUnknown_83CDA70;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
u16 r5;
|
||||
spriteId = CreateSprite(&template, 124, 80, sBoxSelectionPopupSpriteManager->subpriority);
|
||||
sBoxSelectionPopupSpriteManager->unk_0004[i] = gSprites + spriteId;
|
||||
r5 = 0;
|
||||
if (i & 2)
|
||||
{
|
||||
sBoxSelectionPopupSpriteManager->unk_0004[i]->pos1.x = 196;
|
||||
r5 = 2;
|
||||
}
|
||||
if (i & 1)
|
||||
{
|
||||
sBoxSelectionPopupSpriteManager->unk_0004[i]->pos1.y = 112;
|
||||
sBoxSelectionPopupSpriteManager->unk_0004[i]->oam.size = SPRITE_SIZE(8x16);
|
||||
r5++;
|
||||
}
|
||||
StartSpriteAnim(sBoxSelectionPopupSpriteManager->unk_0004[i], r5);
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
sBoxSelectionPopupSpriteManager->unk_0020[i] = sub_809223C(72 * i + 0x7c, 0x58, i, 0, sBoxSelectionPopupSpriteManager->subpriority);
|
||||
if (sBoxSelectionPopupSpriteManager->unk_0020[i])
|
||||
{
|
||||
sBoxSelectionPopupSpriteManager->unk_0020[i]->data[0] = (i == 0 ? -1 : 1);
|
||||
sBoxSelectionPopupSpriteManager->unk_0020[i]->callback = sub_808CD64;
|
||||
}
|
||||
}
|
||||
PrintBoxNameAndCountToSprite();
|
||||
PrintToSpriteWithTagUnk0240(gUnknown_83CDA94, 5, 3);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_808CBA4(void)
|
||||
{
|
||||
u16 i;
|
||||
if (sBoxSelectionPopupSpriteManager->unk_0000)
|
||||
{
|
||||
DestroySprite(sBoxSelectionPopupSpriteManager->unk_0000);
|
||||
sBoxSelectionPopupSpriteManager->unk_0000 = NULL;
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (sBoxSelectionPopupSpriteManager->unk_0004[i])
|
||||
{
|
||||
DestroySprite(sBoxSelectionPopupSpriteManager->unk_0004[i]);
|
||||
sBoxSelectionPopupSpriteManager->unk_0004[i] = NULL;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (sBoxSelectionPopupSpriteManager->unk_0020[i])
|
||||
DestroySprite(sBoxSelectionPopupSpriteManager->unk_0020[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateBoxNameAndCountSprite_WraparoundRight(void)
|
||||
{
|
||||
if (++sBoxSelectionPopupSpriteManager->curBox >= TOTAL_BOXES_COUNT)
|
||||
sBoxSelectionPopupSpriteManager->curBox = 0;
|
||||
PrintBoxNameAndCountToSprite();
|
||||
}
|
||||
|
||||
static void UpdateBoxNameAndCountSprite_WraparoundLeft(void)
|
||||
{
|
||||
sBoxSelectionPopupSpriteManager->curBox = (sBoxSelectionPopupSpriteManager->curBox == 0 ? TOTAL_BOXES_COUNT - 1 : sBoxSelectionPopupSpriteManager->curBox - 1);
|
||||
PrintBoxNameAndCountToSprite();
|
||||
}
|
||||
|
||||
static void PrintBoxNameAndCountToSprite(void)
|
||||
{
|
||||
u8 nPokemonInBox = CountMonsInBox(sBoxSelectionPopupSpriteManager->curBox);
|
||||
u8 *boxName = StringCopy(sBoxSelectionPopupSpriteManager->strbuf, GetBoxNamePtr(sBoxSelectionPopupSpriteManager->curBox));
|
||||
|
||||
while (boxName < sBoxSelectionPopupSpriteManager->strbuf + BOX_NAME_LENGTH)
|
||||
*boxName++ = CHAR_SPACE;
|
||||
*boxName = EOS;
|
||||
|
||||
PrintToSpriteWithTagUnk0240(sBoxSelectionPopupSpriteManager->strbuf, 0, 1);
|
||||
|
||||
ConvertIntToDecimalStringN(sBoxSelectionPopupSpriteManager->strbuf, nPokemonInBox, STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
|
||||
PrintToSpriteWithTagUnk0240(sBoxSelectionPopupSpriteManager->strbuf, 3, 3);
|
||||
}
|
||||
|
||||
static void PrintToSpriteWithTagUnk0240(const u8 *str, u16 x, u16 y)
|
||||
{
|
||||
u16 tileStart = GetSpriteTileStartByTag(sBoxSelectionPopupSpriteManager->tilesTag);
|
||||
PrintStringToBufferCopyNow(str, (void *)(OBJ_VRAM0 + tileStart * 32 + 256 * y + 32 * x), 0x100, TEXT_COLOR_RED, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5, sBoxSelectionPopupSpriteManager->buffer);
|
||||
}
|
||||
|
||||
static void sub_808CD64(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->data[1] > 3)
|
||||
{
|
||||
sprite->data[1] = 0;
|
||||
sprite->pos2.x += sprite->data[0];
|
||||
if (++sprite->data[2] > 5)
|
||||
{
|
||||
sprite->data[2] = 0;
|
||||
sprite->pos2.x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Forward-declared rodata
|
||||
|
||||
static const u16 sBoxSelectionPopupPalette[] = INCBIN_U16("graphics/interface/pss_unk_83CDA98.gbapal");
|
||||
static const u16 sBoxSelectionPopupCenterTiles[] = INCBIN_U16("graphics/interface/pss_unk_83CDAB8.4bpp");
|
||||
static const u16 sBoxSelectionPopupSidesTiles[] = INCBIN_U16("graphics/interface/pss_unk_83CE2B8.4bpp");
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,147 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
#include "strings.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
void InitMenu(void)
|
||||
{
|
||||
gPSSData->menuItemsCount = 0;
|
||||
gPSSData->menuWidth = 0;
|
||||
gPSSData->menuWindow.bg = 0;
|
||||
gPSSData->menuWindow.paletteNum = 15;
|
||||
gPSSData->menuWindow.baseBlock = 92;
|
||||
}
|
||||
|
||||
static const u8 *const sMenuTexts[] = {
|
||||
[PC_TEXT_CANCEL] = gPCText_Cancel,
|
||||
[PC_TEXT_STORE] = gPCText_Store,
|
||||
[PC_TEXT_WITHDRAW] = gPCText_Withdraw,
|
||||
[PC_TEXT_MOVE] = gPCText_Move,
|
||||
[PC_TEXT_SHIFT] = gPCText_Shift,
|
||||
[PC_TEXT_PLACE] = gPCText_Place,
|
||||
[PC_TEXT_SUMMARY] = gPCText_Summary,
|
||||
[PC_TEXT_RELEASE] = gPCText_Release,
|
||||
[PC_TEXT_MARK] = gPCText_Mark,
|
||||
[PC_TEXT_JUMP] = gPCText_Jump,
|
||||
[PC_TEXT_WALLPAPER] = gPCText_Wallpaper,
|
||||
[PC_TEXT_NAME] = gPCText_Name,
|
||||
[PC_TEXT_TAKE] = gPCText_Take,
|
||||
[PC_TEXT_GIVE] = gPCText_Give,
|
||||
[PC_TEXT_GIVE2] = gPCText_Give,
|
||||
[PC_TEXT_SWITCH] = gPCText_Switch,
|
||||
[PC_TEXT_BAG] = gPCText_Bag,
|
||||
[PC_TEXT_INFO] = gPCText_Info,
|
||||
[PC_TEXT_SCENERY1] = gPCText_Scenery1,
|
||||
[PC_TEXT_SCENERY2] = gPCText_Scenery2,
|
||||
[PC_TEXT_SCENERY3] = gPCText_Scenery3,
|
||||
[PC_TEXT_ETCETERA] = gPCText_Etcetera,
|
||||
[PC_TEXT_FOREST] = gPCText_Forest,
|
||||
[PC_TEXT_CITY] = gPCText_City,
|
||||
[PC_TEXT_DESERT] = gPCText_Desert,
|
||||
[PC_TEXT_SAVANNA] = gPCText_Savanna,
|
||||
[PC_TEXT_CRAG] = gPCText_Crag,
|
||||
[PC_TEXT_VOLCANO] = gPCText_Volcano,
|
||||
[PC_TEXT_SNOW] = gPCText_Snow,
|
||||
[PC_TEXT_CAVE] = gPCText_Cave,
|
||||
[PC_TEXT_BEACH] = gPCText_Beach,
|
||||
[PC_TEXT_SEAFLOOR] = gPCText_Seafloor,
|
||||
[PC_TEXT_RIVER] = gPCText_River,
|
||||
[PC_TEXT_SKY] = gPCText_Sky,
|
||||
[PC_TEXT_POLKADOT] = gPCText_PolkaDot,
|
||||
[PC_TEXT_POKECENTER] = gPCText_Pokecenter,
|
||||
[PC_TEXT_MACHINE] = gPCText_Machine,
|
||||
[PC_TEXT_SIMPLE] = gPCText_Simple,
|
||||
};
|
||||
|
||||
void SetMenuText(u8 textId)
|
||||
{
|
||||
if (gPSSData->menuItemsCount < MAX_MENU_ITEMS)
|
||||
{
|
||||
u8 len;
|
||||
struct StorageMenu *menu = &gPSSData->menuItems[gPSSData->menuItemsCount];
|
||||
|
||||
menu->text = sMenuTexts[textId];
|
||||
menu->textId = textId;
|
||||
len = StringLength(menu->text);
|
||||
if (len > gPSSData->menuWidth)
|
||||
gPSSData->menuWidth = len;
|
||||
|
||||
gPSSData->menuItemsCount++;
|
||||
}
|
||||
}
|
||||
|
||||
s8 sub_8094E50(u8 arg0)
|
||||
{
|
||||
if (arg0 >= gPSSData->menuItemsCount)
|
||||
return -1;
|
||||
else
|
||||
return gPSSData->menuItems[arg0].textId;
|
||||
}
|
||||
|
||||
void AddMenu(void)
|
||||
{
|
||||
gPSSData->menuWindow.width = gPSSData->menuWidth + 2;
|
||||
gPSSData->menuWindow.height = 2 * gPSSData->menuItemsCount;
|
||||
gPSSData->menuWindow.tilemapLeft = 29 - gPSSData->menuWindow.width;
|
||||
gPSSData->menuWindow.tilemapTop = 15 - gPSSData->menuWindow.height;
|
||||
gPSSData->field_CB0 = AddWindow(&gPSSData->menuWindow);
|
||||
ClearWindowTilemap(gPSSData->field_CB0);
|
||||
DrawStdFrameWithCustomTileAndPalette(gPSSData->field_CB0, FALSE, 0x00b, 14);
|
||||
PrintTextArray(gPSSData->field_CB0, 1, 8, 2, 16, gPSSData->menuItemsCount, (void*)gPSSData->menuItems);
|
||||
Menu_InitCursor(gPSSData->field_CB0, 1, 0, 2, 16, gPSSData->menuItemsCount, 0);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gPSSData->field_CAE = 0;
|
||||
}
|
||||
|
||||
bool8 sub_8094F90(void)
|
||||
{
|
||||
// Some debug flag?
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s16 sub_8094F94(void)
|
||||
{
|
||||
s32 textId = -2;
|
||||
|
||||
do
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
textId = Menu_GetCursorPos();
|
||||
break;
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
textId = -1;
|
||||
}
|
||||
|
||||
if (JOY_NEW(DPAD_UP))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(-1);
|
||||
}
|
||||
else if (JOY_NEW(DPAD_DOWN))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
Menu_MoveCursor(1);
|
||||
}
|
||||
} while (0);
|
||||
|
||||
if (textId != -2)
|
||||
sub_8095024();
|
||||
|
||||
if (textId >= 0)
|
||||
textId = gPSSData->menuItems[textId].textId;
|
||||
|
||||
return textId;
|
||||
}
|
||||
|
||||
void sub_8095024(void)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(gPSSData->field_CB0, TRUE);
|
||||
RemoveWindow(gPSSData->field_CB0);
|
||||
}
|
||||
@@ -0,0 +1,582 @@
|
||||
#include <stdlib.h> // to declare abs
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
#include "text_window.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
struct MoveMons
|
||||
{
|
||||
u8 field_0;
|
||||
u8 state;
|
||||
u8 fromRow;
|
||||
u8 fromColumn;
|
||||
u8 toRow;
|
||||
u8 toColumn;
|
||||
u8 field_6;
|
||||
u8 field_7;
|
||||
u8 minRow;
|
||||
u8 minColumn;
|
||||
u8 rowsTotal;
|
||||
u8 columsTotal;
|
||||
u16 bgX;
|
||||
u16 bgY;
|
||||
u16 field_10;
|
||||
struct BoxPokemon boxMons[IN_BOX_COUNT];
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct MoveMons *sMoveMonsPtr = NULL;
|
||||
|
||||
static bool8 sub_8095138(void);
|
||||
static bool8 sub_8095234(void);
|
||||
static bool8 sub_80952A0(void);
|
||||
static bool8 sub_8095314(void);
|
||||
static bool8 sub_8095394(void);
|
||||
static bool8 sub_80953BC(void);
|
||||
static void sub_8095520(void);
|
||||
static void sub_80955C4(u8 arg0, u8 arg1, u8 arg2);
|
||||
static void sub_80955FC(u8 arg0, u8 arg1, u8 arg2);
|
||||
static void sub_8095634(u8 arg0, u8 arg1, u8 arg2);
|
||||
static void sub_809566C(u8 arg0, u8 arg1, u8 arg2);
|
||||
static void sub_80956A4(u8 x, u8 y);
|
||||
static void sub_809572C(u8 x, u8 y);
|
||||
static void sub_8095780(u16 bgX, u16 bgY, u16 duration);
|
||||
static u8 sub_8095790(void);
|
||||
static void sub_80957C8(void);
|
||||
static void sub_80958A0(void);
|
||||
static void sub_8095918(void);
|
||||
static void sub_80959A8(void);
|
||||
static void sub_8095A58(void);
|
||||
|
||||
static const struct WindowTemplate gUnknown_83D35D4 = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 10,
|
||||
.tilemapTop = 3,
|
||||
.width = 20,
|
||||
.height = 18,
|
||||
.paletteNum = 9,
|
||||
.baseBlock = 0x00a
|
||||
};
|
||||
|
||||
bool8 sub_8095050(void)
|
||||
{
|
||||
sMoveMonsPtr = Alloc(sizeof(*sMoveMonsPtr));
|
||||
if (sMoveMonsPtr != NULL)
|
||||
{
|
||||
gPSSData->field_2200 = AddWindow8Bit(&gUnknown_83D35D4);
|
||||
if (gPSSData->field_2200 != 0xFF)
|
||||
{
|
||||
FillWindowPixelBuffer(gPSSData->field_2200, PIXEL_FILL(0));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_80950A4(void)
|
||||
{
|
||||
if (sMoveMonsPtr != NULL)
|
||||
Free(sMoveMonsPtr);
|
||||
}
|
||||
|
||||
void sub_80950BC(u8 arg0)
|
||||
{
|
||||
sMoveMonsPtr->field_0 = arg0;
|
||||
sMoveMonsPtr->state = 0;
|
||||
}
|
||||
|
||||
bool8 sub_80950D0(void)
|
||||
{
|
||||
switch (sMoveMonsPtr->field_0)
|
||||
{
|
||||
case 0:
|
||||
return sub_8095138();
|
||||
case 1:
|
||||
return sub_8095234();
|
||||
case 2:
|
||||
return sub_80952A0();
|
||||
case 3:
|
||||
return sub_8095314();
|
||||
case 4:
|
||||
return sub_8095394();
|
||||
case 5:
|
||||
return sub_80953BC();
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 sub_8095138(void)
|
||||
{
|
||||
switch (sMoveMonsPtr->state)
|
||||
{
|
||||
case 0:
|
||||
HideBg(0);
|
||||
LoadMonIconPalettesAt(0x80);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 1:
|
||||
sub_8094CD4(&sMoveMonsPtr->fromRow, &sMoveMonsPtr->fromColumn);
|
||||
sMoveMonsPtr->toRow = sMoveMonsPtr->fromRow;
|
||||
sMoveMonsPtr->toColumn = sMoveMonsPtr->fromColumn;
|
||||
ChangeBgX(0, -1024, 0);
|
||||
ChangeBgY(0, -1024, 0);
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
|
||||
FillWindowPixelBuffer8Bit(gPSSData->field_2200, PIXEL_FILL(0));
|
||||
sub_80956A4(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn);
|
||||
SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1);
|
||||
PutWindowTilemap(gPSSData->field_2200);
|
||||
CopyWindowToVram8Bit(gPSSData->field_2200, 3);
|
||||
BlendPalettes(0x3F00, 8, RGB_WHITE);
|
||||
sub_8094D14(2);
|
||||
SetGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
ShowBg(0);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 sub_8095234(void)
|
||||
{
|
||||
switch (sMoveMonsPtr->state)
|
||||
{
|
||||
case 0:
|
||||
HideBg(0);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 1:
|
||||
sub_8095A58();
|
||||
sub_8094D14(0);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 2:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
sub_8094D40();
|
||||
LoadPalette(stdpal_get(3), 0xD0, 0x20);
|
||||
ShowBg(0);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 sub_80952A0(void)
|
||||
{
|
||||
switch (sMoveMonsPtr->state)
|
||||
{
|
||||
case 0:
|
||||
if (!sub_80924A8())
|
||||
{
|
||||
sub_8094CD4(&sMoveMonsPtr->field_6, &sMoveMonsPtr->field_7);
|
||||
sub_8095520();
|
||||
sMoveMonsPtr->toRow = sMoveMonsPtr->field_6;
|
||||
sMoveMonsPtr->toColumn = sMoveMonsPtr->field_7;
|
||||
CopyWindowToVram8Bit(gPSSData->field_2200, 2);
|
||||
sMoveMonsPtr->state++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
return IsDma3ManagerBusyWithBgCopy();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 sub_8095314(void)
|
||||
{
|
||||
u8 var1, var2;
|
||||
|
||||
switch (sMoveMonsPtr->state)
|
||||
{
|
||||
case 0:
|
||||
sub_80957C8();
|
||||
sub_80958A0();
|
||||
sub_8092BAC(FALSE);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!DoMonPlaceChange())
|
||||
{
|
||||
sub_8094D14(3);
|
||||
sub_8095780(0, 256, 8);
|
||||
sub_8092BAC(TRUE);
|
||||
sMoveMonsPtr->state++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
var1 = sub_8095790();
|
||||
var2 = DoMonPlaceChange();
|
||||
if (!var1 && !var2)
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 sub_8095394(void)
|
||||
{
|
||||
u8 var1 = sub_80924A8();
|
||||
u8 var2 = sub_8095790();
|
||||
|
||||
if (!var1 && !var2)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 sub_80953BC(void)
|
||||
{
|
||||
switch (sMoveMonsPtr->state)
|
||||
{
|
||||
case 0:
|
||||
sub_80959A8();
|
||||
sub_8095780(0, -256, 8);
|
||||
sub_8092BAC(FALSE);
|
||||
sMoveMonsPtr->state++;
|
||||
break;
|
||||
case 1:
|
||||
if (!DoMonPlaceChange() && !sub_8095790())
|
||||
{
|
||||
sub_8095918();
|
||||
sub_8094D14(2);
|
||||
sub_8092BAC(TRUE);
|
||||
HideBg(0);
|
||||
sMoveMonsPtr->state++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!DoMonPlaceChange())
|
||||
{
|
||||
sub_8094D14(0);
|
||||
sub_8095A58();
|
||||
sMoveMonsPtr->state++;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
LoadPalette(stdpal_get(3), 0xD0, 0x20);
|
||||
sub_8094D40();
|
||||
ShowBg(0);
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_8095474(u8 arg0)
|
||||
{
|
||||
switch (arg0)
|
||||
{
|
||||
case 0: // up
|
||||
if (sMoveMonsPtr->minColumn == 0)
|
||||
return FALSE;
|
||||
sMoveMonsPtr->minColumn--;
|
||||
sub_8095780(0, 1024, 6);
|
||||
break;
|
||||
case 1: // down
|
||||
if (sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal >= 5)
|
||||
return FALSE;
|
||||
sMoveMonsPtr->minColumn++;
|
||||
sub_8095780(0, -1024, 6);
|
||||
break;
|
||||
case 2: // left
|
||||
if (sMoveMonsPtr->minRow == 0)
|
||||
return FALSE;
|
||||
sMoveMonsPtr->minRow--;
|
||||
sub_8095780(1024, 0, 6);
|
||||
break;
|
||||
case 3: // right
|
||||
if (sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal > 5)
|
||||
return FALSE;
|
||||
sMoveMonsPtr->minRow++;
|
||||
sub_8095780(-1024, 0, 6);
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_8095520(void)
|
||||
{
|
||||
s16 var = (abs(sMoveMonsPtr->fromRow - sMoveMonsPtr->field_6)) - (abs(sMoveMonsPtr->fromRow - sMoveMonsPtr->toRow));
|
||||
s16 var2 = (abs(sMoveMonsPtr->fromColumn - sMoveMonsPtr->field_7)) - (abs(sMoveMonsPtr->fromColumn - sMoveMonsPtr->toColumn));
|
||||
|
||||
if (var > 0)
|
||||
sub_80955C4(sMoveMonsPtr->field_6, sMoveMonsPtr->fromColumn, sMoveMonsPtr->toColumn);
|
||||
|
||||
if (var < 0)
|
||||
{
|
||||
sub_8095634(sMoveMonsPtr->toRow, sMoveMonsPtr->fromColumn, sMoveMonsPtr->toColumn);
|
||||
sub_80955C4(sMoveMonsPtr->field_6, sMoveMonsPtr->fromColumn, sMoveMonsPtr->toColumn);
|
||||
}
|
||||
|
||||
if (var2 > 0)
|
||||
sub_80955FC(sMoveMonsPtr->field_7, sMoveMonsPtr->fromRow, sMoveMonsPtr->toRow);
|
||||
|
||||
if (var2 < 0)
|
||||
{
|
||||
sub_809566C(sMoveMonsPtr->toColumn, sMoveMonsPtr->fromRow, sMoveMonsPtr->toRow);
|
||||
sub_80955FC(sMoveMonsPtr->field_7, sMoveMonsPtr->fromRow, sMoveMonsPtr->toRow);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80955C4(u8 arg0, u8 arg1, u8 arg2)
|
||||
{
|
||||
u8 var1 = arg1;
|
||||
|
||||
if (arg1 > arg2)
|
||||
{
|
||||
arg1 = arg2;
|
||||
arg2 = var1;
|
||||
}
|
||||
|
||||
while (arg1 <= arg2)
|
||||
sub_80956A4(arg0, arg1++);
|
||||
}
|
||||
|
||||
static void sub_80955FC(u8 arg0, u8 arg1, u8 arg2)
|
||||
{
|
||||
u8 var1 = arg1;
|
||||
|
||||
if (arg1 > arg2)
|
||||
{
|
||||
arg1 = arg2;
|
||||
arg2 = var1;
|
||||
}
|
||||
|
||||
while (arg1 <= arg2)
|
||||
sub_80956A4(arg1++, arg0);
|
||||
}
|
||||
|
||||
static void sub_8095634(u8 arg0, u8 arg1, u8 arg2)
|
||||
{
|
||||
u8 var1 = arg1;
|
||||
|
||||
if (arg1 > arg2)
|
||||
{
|
||||
arg1 = arg2;
|
||||
arg2 = var1;
|
||||
}
|
||||
|
||||
while (arg1 <= arg2)
|
||||
sub_809572C(arg0, arg1++);
|
||||
}
|
||||
|
||||
static void sub_809566C(u8 arg0, u8 arg1, u8 arg2)
|
||||
{
|
||||
u8 var1 = arg1;
|
||||
|
||||
if (arg1 > arg2)
|
||||
{
|
||||
arg1 = arg2;
|
||||
arg2 = var1;
|
||||
}
|
||||
|
||||
while (arg1 <= arg2)
|
||||
sub_809572C(arg1++, arg0);
|
||||
}
|
||||
|
||||
static void sub_80956A4(u8 x, u8 y)
|
||||
{
|
||||
u8 position = x + (IN_BOX_ROWS * y);
|
||||
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
|
||||
u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY);
|
||||
|
||||
if (species != SPECIES_NONE)
|
||||
{
|
||||
const u8 *iconGfx = GetMonIconPtr(species, personality, 1);
|
||||
u8 index = GetValidMonIconPalIndex(species) + 8;
|
||||
|
||||
BlitBitmapRectToWindow4BitTo8Bit(gPSSData->field_2200,
|
||||
iconGfx,
|
||||
0,
|
||||
0,
|
||||
32,
|
||||
32,
|
||||
24 * x,
|
||||
24 * y,
|
||||
32,
|
||||
32,
|
||||
index);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_809572C(u8 x, u8 y)
|
||||
{
|
||||
u8 position = x + (IN_BOX_ROWS * y);
|
||||
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
|
||||
|
||||
if (species != SPECIES_NONE)
|
||||
{
|
||||
FillWindowPixelRect8Bit(gPSSData->field_2200,
|
||||
PIXEL_FILL(0),
|
||||
24 * x,
|
||||
24 * y,
|
||||
32,
|
||||
32);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8095780(u16 bgX, u16 bgY, u16 duration)
|
||||
{
|
||||
sMoveMonsPtr->bgX = bgX;
|
||||
sMoveMonsPtr->bgY = bgY;
|
||||
sMoveMonsPtr->field_10 = duration;
|
||||
}
|
||||
|
||||
static u8 sub_8095790(void)
|
||||
{
|
||||
if (sMoveMonsPtr->field_10 != 0)
|
||||
{
|
||||
ChangeBgX(0, sMoveMonsPtr->bgX, 1);
|
||||
ChangeBgY(0, sMoveMonsPtr->bgY, 1);
|
||||
sMoveMonsPtr->field_10--;
|
||||
}
|
||||
|
||||
return sMoveMonsPtr->field_10;
|
||||
}
|
||||
|
||||
static void sub_80957C8(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 rowCount, columnCount;
|
||||
u8 boxId;
|
||||
u8 monArrayId;
|
||||
|
||||
sMoveMonsPtr->minRow = min(sMoveMonsPtr->fromRow, sMoveMonsPtr->toRow);
|
||||
sMoveMonsPtr->minColumn = min(sMoveMonsPtr->fromColumn, sMoveMonsPtr->toColumn);
|
||||
sMoveMonsPtr->rowsTotal = abs(sMoveMonsPtr->fromRow - sMoveMonsPtr->toRow) + 1;
|
||||
sMoveMonsPtr->columsTotal = abs(sMoveMonsPtr->fromColumn - sMoveMonsPtr->toColumn) + 1;
|
||||
boxId = StorageGetCurrentBox();
|
||||
monArrayId = 0;
|
||||
rowCount = sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal;
|
||||
columnCount = sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal;
|
||||
for (i = sMoveMonsPtr->minColumn; i < columnCount; i++)
|
||||
{
|
||||
u8 boxPosition = (IN_BOX_ROWS * i) + sMoveMonsPtr->minRow;
|
||||
for (j = sMoveMonsPtr->minRow; j < rowCount; j++)
|
||||
{
|
||||
struct BoxPokemon *boxMon = GetBoxedMonPtr(boxId, boxPosition);
|
||||
|
||||
sMoveMonsPtr->boxMons[monArrayId] = *boxMon;
|
||||
monArrayId++;
|
||||
boxPosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80958A0(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 rowCount = sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal;
|
||||
s32 columnCount = sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal;
|
||||
u8 boxId = StorageGetCurrentBox();
|
||||
|
||||
for (i = sMoveMonsPtr->minColumn; i < columnCount; i++)
|
||||
{
|
||||
u8 boxPosition = (IN_BOX_ROWS * i) + sMoveMonsPtr->minRow;
|
||||
for (j = sMoveMonsPtr->minRow; j < rowCount; j++)
|
||||
{
|
||||
DestroyBoxMonIconAtPosition(boxPosition);
|
||||
ZeroBoxMonAt(boxId, boxPosition);
|
||||
boxPosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8095918(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 rowCount = sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal;
|
||||
s32 columnCount = sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal;
|
||||
u8 monArrayId = 0;
|
||||
|
||||
for (i = sMoveMonsPtr->minColumn; i < columnCount; i++)
|
||||
{
|
||||
u8 boxPosition = (IN_BOX_ROWS * i) + sMoveMonsPtr->minRow;
|
||||
for (j = sMoveMonsPtr->minRow; j < rowCount; j++)
|
||||
{
|
||||
if (GetBoxMonData(&sMoveMonsPtr->boxMons[monArrayId], MON_DATA_SANITY_HAS_SPECIES))
|
||||
sub_80901EC(boxPosition);
|
||||
monArrayId++;
|
||||
boxPosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80959A8(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 rowCount = sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal;
|
||||
s32 columnCount = sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal;
|
||||
u8 boxId = StorageGetCurrentBox();
|
||||
u8 monArrayId = 0;
|
||||
|
||||
for (i = sMoveMonsPtr->minColumn; i < columnCount; i++)
|
||||
{
|
||||
u8 boxPosition = (IN_BOX_ROWS * i) + sMoveMonsPtr->minRow;
|
||||
for (j = sMoveMonsPtr->minRow; j < rowCount; j++)
|
||||
{
|
||||
if (GetBoxMonData(&sMoveMonsPtr->boxMons[monArrayId], MON_DATA_SANITY_HAS_SPECIES))
|
||||
SetBoxMonAt(boxId, boxPosition, &sMoveMonsPtr->boxMons[monArrayId]);
|
||||
boxPosition++;
|
||||
monArrayId++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8095A58(void)
|
||||
{
|
||||
ChangeBgX(0, 0, 0);
|
||||
ChangeBgY(0, 0, 0);
|
||||
SetBgAttribute(0, BG_ATTR_PALETTEMODE, 0);
|
||||
ClearGpuRegBits(REG_OFFSET_BG0CNT, BGCNT_256COLOR);
|
||||
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
}
|
||||
|
||||
u8 sub_8095AA0(void)
|
||||
{
|
||||
return (IN_BOX_ROWS * sMoveMonsPtr->fromColumn) + sMoveMonsPtr->fromRow;
|
||||
}
|
||||
|
||||
bool8 sub_8095ABC(void)
|
||||
{
|
||||
s32 i, j;
|
||||
s32 rowCount = sMoveMonsPtr->minRow + sMoveMonsPtr->rowsTotal;
|
||||
s32 columnCount = sMoveMonsPtr->minColumn + sMoveMonsPtr->columsTotal;
|
||||
u8 monArrayId = 0;
|
||||
|
||||
for (i = sMoveMonsPtr->minColumn; i < columnCount; i++)
|
||||
{
|
||||
u8 boxPosition = (IN_BOX_ROWS * i) + sMoveMonsPtr->minRow;
|
||||
for (j = sMoveMonsPtr->minRow; j < rowCount; j++)
|
||||
{
|
||||
if (GetBoxMonData(&sMoveMonsPtr->boxMons[monArrayId], MON_DATA_SANITY_HAS_SPECIES)
|
||||
&& GetCurrentBoxMonData(boxPosition, MON_DATA_SANITY_HAS_SPECIES))
|
||||
return FALSE;
|
||||
|
||||
monArrayId++;
|
||||
boxPosition++;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -0,0 +1,755 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "decompress.h"
|
||||
#include "item.h"
|
||||
#include "item_menu_icons.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
#include "trig.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
static u8 sub_80961D8(void);
|
||||
static bool32 sub_8096210(u8 cursorArea, u8 cursorPos);
|
||||
static u8 sub_8096258(u8 cursorArea, u8 cursorPos);
|
||||
static void sub_80962F0(u8 id, u8 cursorArea, u8 cursorPos);
|
||||
static void sub_8096408(u8 id, const u32 * tiles, const u32 * pal);
|
||||
static void sub_80964B8(u8 id, u8 affineAnimNo);
|
||||
static void sub_80964E8(u8 id, u8 command, u8 cursorArea, u8 cursorPos);
|
||||
static void sub_8096624(u8 id, bool8 show);
|
||||
static const u32 *GetItemIconPic(u16 itemId);
|
||||
static const u32 *GetItemIconPalette(u16 itemId);
|
||||
static void sub_8096898(u32 x);
|
||||
static void sub_809692C(struct Sprite * sprite);
|
||||
static void sub_8096958(struct Sprite * sprite);
|
||||
static void sub_80969BC(struct Sprite * sprite);
|
||||
static void sub_80969F4(struct Sprite * sprite);
|
||||
static void sub_8096A74(struct Sprite * sprite);
|
||||
static void sub_8096B10(struct Sprite * sprite);
|
||||
static void sub_8096BAC(struct Sprite * sprite);
|
||||
|
||||
static const u32 gUnknown_83D35DC[] = INCBIN_U32("graphics/interface/pss_unk_83D35DC.4bpp");
|
||||
|
||||
static const struct OamData gUnknown_83D365C = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = FALSE,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(32x32),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(32x32),
|
||||
.tileNum = 0x000,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D3664[] = {
|
||||
AFFINEANIMCMD_FRAME(128, 128, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D3674[] = {
|
||||
AFFINEANIMCMD_FRAME(88, 88, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(5, 5, 0, 8),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D368C[] = {
|
||||
AFFINEANIMCMD_FRAME(128, 128, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(-5, -5, 0, 8),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D36A4[] = {
|
||||
AFFINEANIMCMD_FRAME(128, 128, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(10, 10, 0, 12),
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D36C4[] = {
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(-10, -10, 0, 12),
|
||||
AFFINEANIMCMD_FRAME(128, 128, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D36E4[] = {
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(-5, -5, 0, 16),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D36FC[] = {
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const gUnknown_83D370C[] = {
|
||||
gUnknown_83D3664,
|
||||
gUnknown_83D3674,
|
||||
gUnknown_83D368C,
|
||||
gUnknown_83D36A4,
|
||||
gUnknown_83D36C4,
|
||||
gUnknown_83D36E4,
|
||||
gUnknown_83D36FC
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_83D3728 = {
|
||||
.tileTag = TAG_TILE_7,
|
||||
.paletteTag = TAG_PAL_DACB,
|
||||
.oam = &gUnknown_83D365C,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gUnknown_83D370C,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
void sub_8095B5C(void)
|
||||
{
|
||||
s32 i;
|
||||
u8 spriteId;
|
||||
struct CompressedSpriteSheet spriteSheet;
|
||||
struct SpriteTemplate spriteTemplate;
|
||||
static u32 gUnknown_3000FE8[0x61];
|
||||
|
||||
if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS)
|
||||
{
|
||||
spriteSheet.data = gUnknown_3000FE8;
|
||||
spriteSheet.size = 0x200;
|
||||
spriteTemplate = gUnknown_83D3728;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
spriteSheet.tag = TAG_TILE_7 + i;
|
||||
LoadCompressedSpriteSheet(&spriteSheet);
|
||||
gPSSData->itemIconSprites[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * 32 + (void*)(OBJ_VRAM0);
|
||||
gPSSData->itemIconSprites[i].palIndex = AllocSpritePalette(TAG_PAL_DACB + i);
|
||||
gPSSData->itemIconSprites[i].palIndex *= 16;
|
||||
gPSSData->itemIconSprites[i].palIndex += 0x100;
|
||||
spriteTemplate.tileTag = TAG_TILE_7 + i;
|
||||
spriteTemplate.paletteTag = TAG_PAL_DACB + i;
|
||||
spriteId = CreateSprite(&spriteTemplate, 0, 0, 11);
|
||||
gPSSData->itemIconSprites[i].sprite = &gSprites[spriteId];
|
||||
gPSSData->itemIconSprites[i].sprite->invisible = TRUE;
|
||||
gPSSData->itemIconSprites[i].active = 0;
|
||||
}
|
||||
}
|
||||
gPSSData->movingItem = ITEM_NONE;
|
||||
}
|
||||
|
||||
void sub_8095C84(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u16 heldItem;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
if (sub_8096210(cursorArea, cursorPos))
|
||||
return;
|
||||
|
||||
switch (cursorArea)
|
||||
{
|
||||
case CURSOR_AREA_IN_BOX:
|
||||
if (!GetCurrentBoxMonData(cursorPos, MON_DATA_SANITY_HAS_SPECIES))
|
||||
return;
|
||||
heldItem = GetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM);
|
||||
break;
|
||||
case CURSOR_AREA_IN_PARTY:
|
||||
if (!GetMonData(&gPlayerParty[cursorPos], MON_DATA_SANITY_HAS_SPECIES))
|
||||
return;
|
||||
heldItem = GetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (heldItem != ITEM_NONE)
|
||||
{
|
||||
const u32 *tiles = GetItemIconPic(heldItem);
|
||||
const u32 *pal = GetItemIconPalette(heldItem);
|
||||
u8 id = sub_80961D8();
|
||||
|
||||
sub_80962F0(id, cursorArea, cursorPos);
|
||||
sub_8096408(id, tiles, pal);
|
||||
sub_80964B8(id, 1);
|
||||
sub_8096624(id, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8095D44(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 id;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
id = sub_8096258(cursorArea, cursorPos);
|
||||
sub_80964B8(id, 2);
|
||||
sub_80964E8(id, 0, cursorArea, cursorPos);
|
||||
}
|
||||
|
||||
void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 id;
|
||||
u16 item;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
id = sub_8096258(cursorArea, cursorPos);
|
||||
item = 0;
|
||||
sub_80964B8(id, 3);
|
||||
sub_80964E8(id, 1, cursorArea, cursorPos);
|
||||
sub_80962F0(id, 2, 0);
|
||||
if (cursorArea == CURSOR_AREA_IN_BOX)
|
||||
{
|
||||
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &item);
|
||||
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &item);
|
||||
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
|
||||
}
|
||||
|
||||
gPSSData->movingItem = gPSSData->cursorMonItem;
|
||||
}
|
||||
|
||||
void sub_8095E2C(u16 item)
|
||||
{
|
||||
const u32 *tiles = GetItemIconPic(item);
|
||||
const u32 *pal = GetItemIconPalette(item);
|
||||
u8 id = sub_80961D8();
|
||||
|
||||
sub_8096408(id, tiles, pal);
|
||||
sub_80964B8(id, 6);
|
||||
sub_80964E8(id, 1, CURSOR_AREA_IN_BOX, 0);
|
||||
sub_80962F0(id, CURSOR_AREA_BOX, 0);
|
||||
sub_8096624(id, TRUE);
|
||||
gPSSData->movingItem = item;
|
||||
}
|
||||
|
||||
void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 id;
|
||||
u16 item;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
id = sub_8096258(cursorArea, cursorPos);
|
||||
sub_80964B8(id, 3);
|
||||
sub_80964E8(id, 3, CURSOR_AREA_BOX, 0);
|
||||
if (cursorArea == CURSOR_AREA_IN_BOX)
|
||||
{
|
||||
item = GetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM);
|
||||
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItem);
|
||||
gPSSData->movingItem = item;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = GetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM);
|
||||
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItem);
|
||||
gPSSData->movingItem = item;
|
||||
}
|
||||
|
||||
id = sub_8096258(2, 0);
|
||||
sub_80964B8(id, 4);
|
||||
sub_80964E8(id, 4, cursorArea, cursorPos);
|
||||
}
|
||||
|
||||
void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 id;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
id = sub_8096258(2, 0);
|
||||
sub_80964B8(id, 4);
|
||||
sub_80964E8(id, 2, cursorArea, cursorPos);
|
||||
if (cursorArea == CURSOR_AREA_IN_BOX)
|
||||
{
|
||||
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItem);
|
||||
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItem);
|
||||
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
void Item_TakeMons(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 id;
|
||||
u16 item;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
item = 0;
|
||||
id = sub_8096258(cursorArea, cursorPos);
|
||||
sub_80964B8(id, 2);
|
||||
sub_80964E8(id, 0, cursorArea, cursorPos);
|
||||
if (cursorArea == CURSOR_AREA_IN_BOX)
|
||||
{
|
||||
SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &item);
|
||||
SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &item);
|
||||
SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8096088(void)
|
||||
{
|
||||
if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS)
|
||||
{
|
||||
u8 id = sub_8096258(2, 0);
|
||||
sub_80964B8(id, 5);
|
||||
sub_80964E8(id, 0, CURSOR_AREA_BOX, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80960C0(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active && gPSSData->itemIconSprites[i].cursorArea == CURSOR_AREA_IN_PARTY)
|
||||
sub_80964E8(i, 7, CURSOR_AREA_BOX, 0);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_809610C(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active)
|
||||
{
|
||||
if (!gPSSData->itemIconSprites[i].sprite->affineAnimEnded && gPSSData->itemIconSprites[i].sprite->affineAnimBeginning)
|
||||
return TRUE;
|
||||
if (gPSSData->itemIconSprites[i].sprite->callback != SpriteCallbackDummy && gPSSData->itemIconSprites[i].sprite->callback != sub_80969BC)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 IsActiveItemMoving(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS)
|
||||
{
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active && gPSSData->itemIconSprites[i].cursorArea == CURSOR_AREA_BOX)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const u8 *GetMovingItemName(void)
|
||||
{
|
||||
return ItemId_GetName(gPSSData->movingItem);
|
||||
}
|
||||
|
||||
u16 GetMovingItem(void)
|
||||
{
|
||||
return gPSSData->movingItem;
|
||||
}
|
||||
|
||||
static u8 sub_80961D8(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (!gPSSData->itemIconSprites[i].active)
|
||||
{
|
||||
gPSSData->itemIconSprites[i].active = TRUE;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return MAX_ITEM_ICONS;
|
||||
}
|
||||
|
||||
static bool32 sub_8096210(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active
|
||||
&& gPSSData->itemIconSprites[i].cursorArea == cursorArea
|
||||
&& gPSSData->itemIconSprites[i].cursorPos == cursorPos)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static u8 sub_8096258(u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active
|
||||
&& gPSSData->itemIconSprites[i].cursorArea == cursorArea
|
||||
&& gPSSData->itemIconSprites[i].cursorPos == cursorPos)
|
||||
return i;
|
||||
}
|
||||
|
||||
return MAX_ITEM_ICONS;
|
||||
}
|
||||
|
||||
static u8 sub_80962A8(struct Sprite *sprite)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < MAX_ITEM_ICONS; i++)
|
||||
{
|
||||
if (gPSSData->itemIconSprites[i].active
|
||||
&& gPSSData->itemIconSprites[i].sprite == sprite)
|
||||
return i;
|
||||
}
|
||||
|
||||
return MAX_ITEM_ICONS;
|
||||
}
|
||||
|
||||
static void sub_80962F0(u8 id, u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
u8 row, column;
|
||||
|
||||
if (id >= MAX_ITEM_ICONS)
|
||||
return;
|
||||
|
||||
switch (cursorArea)
|
||||
{
|
||||
case CURSOR_AREA_IN_BOX:
|
||||
row = cursorPos % IN_BOX_ROWS;
|
||||
column = cursorPos / IN_BOX_ROWS;
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.x = (24 * row) + 112;
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.y = (24 * column) + 56;
|
||||
gPSSData->itemIconSprites[id].sprite->oam.priority = 2;
|
||||
break;
|
||||
case CURSOR_AREA_IN_PARTY:
|
||||
if (cursorPos == 0)
|
||||
{
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.x = 116;
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.y = 76;
|
||||
}
|
||||
else
|
||||
{
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.x = 164;
|
||||
gPSSData->itemIconSprites[id].sprite->pos1.y = 24 * (cursorPos - 1) + 28;
|
||||
}
|
||||
gPSSData->itemIconSprites[id].sprite->oam.priority = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
gPSSData->itemIconSprites[id].cursorArea = cursorArea;
|
||||
gPSSData->itemIconSprites[id].cursorPos = cursorPos;
|
||||
}
|
||||
|
||||
static void sub_8096408(u8 id, const u32 *itemTiles, const u32 *itemPal)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (id >= MAX_ITEM_ICONS)
|
||||
return;
|
||||
|
||||
CpuFastFill(0, gPSSData->field_42C4, 0x200);
|
||||
LZ77UnCompWram(itemTiles, gPSSData->field_22C4);
|
||||
for (i = 0; i < 3; i++)
|
||||
CpuFastCopy(gPSSData->field_22C4 + (i * 0x60), gPSSData->field_42C4 + (i * 0x80), 0x60);
|
||||
|
||||
CpuFastCopy(gPSSData->field_42C4, gPSSData->itemIconSprites[id].tiles, 0x200);
|
||||
LZ77UnCompWram(itemPal, gPSSData->field_42C4);
|
||||
LoadPalette(gPSSData->field_42C4, gPSSData->itemIconSprites[id].palIndex, 0x20);
|
||||
}
|
||||
|
||||
static void sub_80964B8(u8 id, u8 animNum)
|
||||
{
|
||||
if (id >= MAX_ITEM_ICONS)
|
||||
return;
|
||||
|
||||
StartSpriteAffineAnim(gPSSData->itemIconSprites[id].sprite, animNum);
|
||||
}
|
||||
|
||||
static void sub_80964E8(u8 id, u8 command, u8 cursorArea, u8 cursorPos)
|
||||
{
|
||||
if (id >= MAX_ITEM_ICONS)
|
||||
return;
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case 0:
|
||||
gPSSData->itemIconSprites[id].sprite->data[0] = id;
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_809692C;
|
||||
break;
|
||||
case 1:
|
||||
gPSSData->itemIconSprites[id].sprite->data[0] = 0;
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_8096958;
|
||||
break;
|
||||
case 2:
|
||||
gPSSData->itemIconSprites[id].sprite->data[0] = 0;
|
||||
gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea;
|
||||
gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos;
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_80969F4;
|
||||
break;
|
||||
case 3:
|
||||
gPSSData->itemIconSprites[id].sprite->data[0] = 0;
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_8096A74;
|
||||
gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea;
|
||||
gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos;
|
||||
break;
|
||||
case 4:
|
||||
gPSSData->itemIconSprites[id].sprite->data[0] = 0;
|
||||
gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea;
|
||||
gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos;
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_8096B10;
|
||||
break;
|
||||
case 7:
|
||||
gPSSData->itemIconSprites[id].sprite->callback = sub_8096BAC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8096624(u8 id, bool8 show)
|
||||
{
|
||||
if (id >= MAX_ITEM_ICONS)
|
||||
return;
|
||||
|
||||
gPSSData->itemIconSprites[id].active = show;
|
||||
gPSSData->itemIconSprites[id].sprite->invisible = (show == FALSE);
|
||||
}
|
||||
|
||||
static const u32 *GetItemIconPic(u16 itemId)
|
||||
{
|
||||
return GetItemIconGfxPtr(itemId, 0);
|
||||
}
|
||||
|
||||
static const u32 *GetItemIconPalette(u16 itemId)
|
||||
{
|
||||
return GetItemIconGfxPtr(itemId, 1);
|
||||
}
|
||||
|
||||
void PrintItemDescription(void)
|
||||
{
|
||||
const u8 *description;
|
||||
|
||||
if (IsActiveItemMoving())
|
||||
description = ItemId_GetDescription(gPSSData->movingItem);
|
||||
else
|
||||
description = ItemId_GetDescription(gPSSData->cursorMonItem);
|
||||
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized5(2, 2, description, 2, 0, 0, NULL, 0, 0);
|
||||
}
|
||||
|
||||
void sub_80966F4(void)
|
||||
{
|
||||
gPSSData->field_2236 = 25;
|
||||
LoadBgTiles(0, gUnknown_83D35DC, 0x80, 0x1A4);
|
||||
sub_8096898(0);
|
||||
}
|
||||
|
||||
bool8 sub_8096728(void)
|
||||
{
|
||||
s32 i, var;
|
||||
|
||||
if (gPSSData->field_2236 == 0)
|
||||
return FALSE;
|
||||
|
||||
gPSSData->field_2236--;
|
||||
var = 25 - gPSSData->field_2236;
|
||||
for (i = 0; i < var; i++)
|
||||
{
|
||||
WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->field_2236 + i, i, 12, 1, 8, 15, 25);
|
||||
}
|
||||
|
||||
sub_8096898(var);
|
||||
return (gPSSData->field_2236 != 0);
|
||||
}
|
||||
|
||||
bool8 sub_80967C0(void)
|
||||
{
|
||||
s32 i, var;
|
||||
|
||||
if (gPSSData->field_2236 == 25)
|
||||
return FALSE;
|
||||
|
||||
if (gPSSData->field_2236 == 0)
|
||||
FillBgTilemapBufferRect(0, 0, 25, 11, 1, 10, 17);
|
||||
|
||||
gPSSData->field_2236++;
|
||||
var = 25 - gPSSData->field_2236;
|
||||
for (i = 0; i < var; i++)
|
||||
{
|
||||
WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->field_2236 + i, i, 12, 1, 8, 15, 25);
|
||||
}
|
||||
|
||||
sub_8096898(var);
|
||||
|
||||
FillBgTilemapBufferRect(0, 0, var, 11, 1, 10, 0x11);
|
||||
return (gPSSData->field_2236 != 25);
|
||||
}
|
||||
|
||||
static void sub_8096898(u32 x)
|
||||
{
|
||||
if (x != 0)
|
||||
{
|
||||
FillBgTilemapBufferRect(0, 0x1A4, 0, 0xB, x, 1, 0xFu);
|
||||
FillBgTilemapBufferRect(0, 0x9A4, 0, 0x14, x, 1, 0xFu);
|
||||
}
|
||||
FillBgTilemapBufferRect(0, 0x1A5, x, 0xC, 1, 8, 0xFu);
|
||||
FillBgTilemapBufferRect(0, 0x1A6, x, 0xB, 1, 1, 0xFu);
|
||||
FillBgTilemapBufferRect(0, 0x1A7, x, 0x14, 1, 1, 0xFu);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
|
||||
static void sub_809692C(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
sub_8096624(sprite->data[0], FALSE);
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8096958(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[1] = sprite->pos1.x << 4;
|
||||
sprite->data[2] = sprite->pos1.y << 4;
|
||||
sprite->data[3] = 10;
|
||||
sprite->data[4] = 21;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[0]++;
|
||||
case 1:
|
||||
sprite->data[1] -= sprite->data[3];
|
||||
sprite->data[2] -= sprite->data[4];
|
||||
sprite->pos1.x = sprite->data[1] >> 4;
|
||||
sprite->pos1.y = sprite->data[2] >> 4;
|
||||
if (++sprite->data[5] > 11)
|
||||
sprite->callback = sub_80969BC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80969BC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.x = gPSSData->field_CB4->pos1.x + 4;
|
||||
sprite->pos1.y = gPSSData->field_CB4->pos1.y + gPSSData->field_CB4->pos2.y + 8;
|
||||
sprite->oam.priority = gPSSData->field_CB4->oam.priority;
|
||||
}
|
||||
|
||||
static void sub_80969F4(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[1] = sprite->pos1.x << 4;
|
||||
sprite->data[2] = sprite->pos1.y << 4;
|
||||
sprite->data[3] = 10;
|
||||
sprite->data[4] = 21;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[0]++;
|
||||
case 1:
|
||||
sprite->data[1] += sprite->data[3];
|
||||
sprite->data[2] += sprite->data[4];
|
||||
sprite->pos1.x = sprite->data[1] >> 4;
|
||||
sprite->pos1.y = sprite->data[2] >> 4;
|
||||
if (++sprite->data[5] > 11)
|
||||
{
|
||||
sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]);
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8096A74(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[1] = sprite->pos1.x << 4;
|
||||
sprite->data[2] = sprite->pos1.y << 4;
|
||||
sprite->data[3] = 10;
|
||||
sprite->data[4] = 21;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[0]++;
|
||||
case 1:
|
||||
sprite->data[1] -= sprite->data[3];
|
||||
sprite->data[2] -= sprite->data[4];
|
||||
sprite->pos1.x = sprite->data[1] >> 4;
|
||||
sprite->pos1.y = sprite->data[2] >> 4;
|
||||
sprite->pos2.x = gSineTable[sprite->data[5] * 8] >> 4;
|
||||
if (++sprite->data[5] > 11)
|
||||
{
|
||||
sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]);
|
||||
sprite->pos2.x = 0;
|
||||
sprite->callback = sub_80969BC;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8096B10(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
sprite->data[1] = sprite->pos1.x << 4;
|
||||
sprite->data[2] = sprite->pos1.y << 4;
|
||||
sprite->data[3] = 10;
|
||||
sprite->data[4] = 21;
|
||||
sprite->data[5] = 0;
|
||||
sprite->data[0]++;
|
||||
case 1:
|
||||
sprite->data[1] += sprite->data[3];
|
||||
sprite->data[2] += sprite->data[4];
|
||||
sprite->pos1.x = sprite->data[1] >> 4;
|
||||
sprite->pos1.y = sprite->data[2] >> 4;
|
||||
sprite->pos2.x = -(gSineTable[sprite->data[5] * 8] >> 4);
|
||||
if (++sprite->data[5] > 11)
|
||||
{
|
||||
sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]);
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
sprite->pos2.x = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8096BAC(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.y -= 8;
|
||||
if (sprite->pos1.y + sprite->pos2.y < -16)
|
||||
{
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
sub_8096624(sub_80962A8(sprite), FALSE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "pokemon_storage_system_internal.h"
|
||||
|
||||
static EWRAM_DATA struct UnkStruct_2000020 *gUnknown_203982C = NULL;
|
||||
|
||||
static void sub_8096CDC(struct UnkStruct_2000028 *unkStruct);
|
||||
static void sub_8096D70(struct UnkStruct_2000028 *unkStruct);
|
||||
|
||||
void sub_8096BE4(struct UnkStruct_2000020 *arg0, struct UnkStruct_2000028 *arg1, u32 arg2)
|
||||
{
|
||||
gUnknown_203982C = arg0;
|
||||
arg0->unk_00 = arg1;
|
||||
arg0->unk_05 = arg2;
|
||||
arg0->unk_04 = 0;
|
||||
}
|
||||
|
||||
void sub_8096BF8(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
if (gUnknown_203982C->unk_04)
|
||||
{
|
||||
for (i = 0; i < gUnknown_203982C->unk_04; i++)
|
||||
{
|
||||
struct UnkStruct_2000028 *unkStruct = &gUnknown_203982C->unk_00[i];
|
||||
unkStruct->unk_0c(unkStruct);
|
||||
}
|
||||
|
||||
gUnknown_203982C->unk_04 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg)
|
||||
{
|
||||
struct UnkStruct_2000028 *unkStruct;
|
||||
|
||||
if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05)
|
||||
return FALSE;
|
||||
|
||||
unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++];
|
||||
unkStruct->unk_08 = width * 2;
|
||||
unkStruct->unk_04 = dest + 2 * (dTop * 32 + dLeft);
|
||||
unkStruct->unk_00 = src + 2 * (sTop * unkArg + sLeft);
|
||||
unkStruct->newField = height;
|
||||
unkStruct->unk_0a = unkArg;
|
||||
unkStruct->unk_0c = sub_8096CDC;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_8096CDC(struct UnkStruct_2000028 *unkStruct)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < unkStruct->newField; i++)
|
||||
{
|
||||
CpuCopy16(unkStruct->unk_00, unkStruct->unk_04, unkStruct->unk_08);
|
||||
unkStruct->unk_04 += 64;
|
||||
unkStruct->unk_00 += (unkStruct->unk_0a * 2);
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height)
|
||||
{
|
||||
struct UnkStruct_2000028 *unkStruct;
|
||||
|
||||
if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05)
|
||||
return FALSE;
|
||||
|
||||
unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++];
|
||||
unkStruct->unk_08 = width * 2;
|
||||
unkStruct->unk_04 = dest + ((dTop * 32) + dLeft) * 2;
|
||||
unkStruct->newField = height;
|
||||
unkStruct->unk_0c = sub_8096D70;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_8096D70(struct UnkStruct_2000028 *unkStruct)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < unkStruct->newField; i++)
|
||||
{
|
||||
Dma3FillLarge_(0, unkStruct->unk_04, unkStruct->unk_08, 16);
|
||||
unkStruct->unk_04 += 64;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -752,7 +752,7 @@ void sub_8111438(void)
|
||||
{
|
||||
for (r3 = 0; r3 < 5; r3++)
|
||||
{
|
||||
sub_808BCB4(0, r3);
|
||||
ZeroBoxMonAt(0, r3);
|
||||
}
|
||||
for (r3 = r5; r3 < r9->sanePartyCount; r3++)
|
||||
{
|
||||
@@ -767,9 +767,9 @@ void sub_8111438(void)
|
||||
{
|
||||
for (r6 = 0; r6 < 30; r6++)
|
||||
{
|
||||
if (GetBoxMonDataFromAnyBox(r3, r6, MON_DATA_SANITY_HAS_SPECIES))
|
||||
if (GetBoxMonDataAt(r3, r6, MON_DATA_SANITY_HAS_SPECIES))
|
||||
{
|
||||
sub_808BCB4(r3, r6);
|
||||
ZeroBoxMonAt(r3, r6);
|
||||
r5--;
|
||||
if (r5 == r9->saneBoxesCount)
|
||||
break;
|
||||
@@ -832,7 +832,7 @@ static u16 QuestLog_GetSaneBoxCount(void)
|
||||
{
|
||||
for (j = 0; j < IN_BOX_COUNT; j++)
|
||||
{
|
||||
if (GetBoxMonDataFromAnyBox(i, j, MON_DATA_SANITY_HAS_SPECIES))
|
||||
if (GetBoxMonDataAt(i, j, MON_DATA_SANITY_HAS_SPECIES))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -532,11 +532,11 @@ u8 *StringFillWithTerminator(u8 *dest, u16 n)
|
||||
return StringFill(dest, EOS, n);
|
||||
}
|
||||
|
||||
u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n)
|
||||
u8 *StringCopyN_Multibyte(u8 *dest, const u8 *src, u32 n)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = n - 1; i != (u32)-1; i--)
|
||||
for (i = n - 1; i != -1u; i--)
|
||||
{
|
||||
if (*src == EOS)
|
||||
{
|
||||
@@ -554,7 +554,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;
|
||||
|
||||
|
||||
+80
-80
@@ -601,87 +601,87 @@ const u8 gString_BattleRecords_4Dashes[] = _("----");
|
||||
const u8 gFameCheckerText_FameCheckerWillBeClosed[] = _("The FAME CHECKER will be closed.");
|
||||
const u8 gFameCheckerText_ClearTextbox[] = _("\n ");
|
||||
const u8 gUnknown_8418204[] = _("やめる");
|
||||
const u8 gUnknown_8418208[] = _("Exit from the BOX.");
|
||||
const u8 gUnknown_841821B[] = _("What do you want to do?");
|
||||
const u8 gUnknown_8418233[] = _("Please pick a theme.");
|
||||
const u8 gUnknown_8418248[] = _("Pick the wallpaper.");
|
||||
const u8 gUnknown_841825C[] = _("{DYNAMIC 0x00} is selected.");
|
||||
const u8 gUnknown_841826C[] = _("Jump to which BOX?");
|
||||
const u8 gUnknown_841827F[] = _("Deposit in which BOX?");
|
||||
const u8 gUnknown_8418295[] = _("{DYNAMIC 0x00} was deposited.");
|
||||
const u8 gUnknown_84182A7[] = _("The BOX is full.");
|
||||
const u8 gUnknown_84182B8[] = _("Release this POKéMON?");
|
||||
const u8 gUnknown_84182CE[] = _("{DYNAMIC 0x00} was released.");
|
||||
const u8 gUnknown_84182DF[] = _("Bye-bye, {DYNAMIC 0x00}!");
|
||||
const u8 gUnknown_84182EC[] = _("Mark your POKéMON.");
|
||||
const u8 gUnknown_84182FF[] = _("That's your last POKéMON!");
|
||||
const u8 gUnknown_8418319[] = _("Your party's full!");
|
||||
const u8 gUnknown_841832C[] = _("You're holding a POKéMON!");
|
||||
const u8 gUnknown_8418346[] = _("Which one will you take?");
|
||||
const u8 gUnknown_841835F[] = _("You can't release an EGG.");
|
||||
const u8 gUnknown_8418379[] = _("Continue BOX operations?");
|
||||
const u8 gUnknown_8418392[] = _("{DYNAMIC 0x00} came back!");
|
||||
const u8 gUnknown_84183A0[] = _("Was it worried about you?");
|
||||
const u8 gUnknown_84183BA[] = _("‥ ‥ ‥ ‥ ‥!");
|
||||
const u8 gUnknown_84183C5[] = _("Please remove the MAIL.");
|
||||
const u8 gUnknown_84183DD[] = _("GIVE to a POKéMON?");
|
||||
const u8 gUnknown_84183F0[] = _("Placed item in the BAG.");
|
||||
const u8 gUnknown_8418408[] = _("The BAG is full.");
|
||||
const u8 gUnknown_8418419[] = _("Put this item in the BAG?");
|
||||
const u8 gUnknown_8418433[] = _("{DYNAMIC 0x00} is now held.");
|
||||
const u8 gUnknown_8418443[] = _("Changed to {DYNAMIC 0x00}.");
|
||||
const u8 gUnknown_8418452[] = _("MAIL can't be stored!");
|
||||
const u8 gUnknown_8418468[] = _("CANCEL");
|
||||
const u8 gUnknown_841846F[] = _("STORE");
|
||||
const u8 gUnknown_8418475[] = _("WITHDRAW");
|
||||
const u8 gUnknown_841847E[] = _("SHIFT");
|
||||
const u8 gUnknown_8418484[] = _("MOVE");
|
||||
const u8 gUnknown_8418489[] = _("PLACE");
|
||||
const u8 gUnknown_841848F[] = _("SUMMARY");
|
||||
const u8 gUnknown_8418497[] = _("RELEASE");
|
||||
const u8 gUnknown_841849F[] = _("MARK");
|
||||
const u8 gUnknown_84184A4[] = _("NAME");
|
||||
const u8 gUnknown_84184A9[] = _("JUMP");
|
||||
const u8 gUnknown_84184AE[] = _("WALLPAPER");
|
||||
const u8 gUnknown_84184B8[] = _("TAKE");
|
||||
const u8 gUnknown_84184BD[] = _("GIVE");
|
||||
const u8 gUnknown_84184C2[] = _("SWITCH");
|
||||
const u8 gUnknown_84184C9[] = _("BAG");
|
||||
const u8 gUnknown_84184CD[] = _("INFO");
|
||||
const u8 gUnknown_84184D2[] = _("SCENERY 1");
|
||||
const u8 gUnknown_84184DC[] = _("SCENERY 2");
|
||||
const u8 gUnknown_84184E6[] = _("SCENERY 3");
|
||||
const u8 gUnknown_84184F0[] = _("ETCETERA");
|
||||
const u8 gUnknown_84184F9[] = _("FOREST");
|
||||
const u8 gUnknown_8418500[] = _("CITY");
|
||||
const u8 gUnknown_8418505[] = _("DESERT");
|
||||
const u8 gUnknown_841850C[] = _("SAVANNA");
|
||||
const u8 gUnknown_8418514[] = _("CRAG");
|
||||
const u8 gUnknown_8418519[] = _("VOLCANO");
|
||||
const u8 gUnknown_8418521[] = _("SNOW");
|
||||
const u8 gUnknown_8418526[] = _("CAVE");
|
||||
const u8 gUnknown_841852B[] = _("BEACH");
|
||||
const u8 gUnknown_8418531[] = _("SEAFLOOR");
|
||||
const u8 gUnknown_841853A[] = _("RIVER");
|
||||
const u8 gUnknown_8418540[] = _("SKY");
|
||||
const u8 gUnknown_8418544[] = _("STARS");
|
||||
const u8 gUnknown_841854A[] = _("POKéCENTER");
|
||||
const u8 gUnknown_8418555[] = _("TILES");
|
||||
const u8 gUnknown_841855B[] = _("SIMPLE");
|
||||
const u8 gText_ExitFromBox[] = _("Exit from the BOX.");
|
||||
const u8 gText_WhatDoYouWantToDo[] = _("What do you want to do?");
|
||||
const u8 gText_PleasePickATheme[] = _("Please pick a theme.");
|
||||
const u8 gText_PickTheWallpaper[] = _("Pick the wallpaper.");
|
||||
const u8 gText_PkmnIsSelected[] = _("{DYNAMIC 0x00} is selected.");
|
||||
const u8 gText_JumpToWhichBox[] = _("Jump to which BOX?");
|
||||
const u8 gText_DepositInWhichBox[] = _("Deposit in which BOX?");
|
||||
const u8 gText_PkmnWasDeposited[] = _("{DYNAMIC 0x00} was deposited.");
|
||||
const u8 gText_BoxIsFull2[] = _("The BOX is full.");
|
||||
const u8 gText_ReleaseThisPokemon[] = _("Release this POKéMON?");
|
||||
const u8 gText_PkmnWasReleased[] = _("{DYNAMIC 0x00} was released.");
|
||||
const u8 gText_ByeByePkmn[] = _("Bye-bye, {DYNAMIC 0x00}!");
|
||||
const u8 gText_MarkYourPkmn[] = _("Mark your POKéMON.");
|
||||
const u8 gText_ThatsYourLastPkmn[] = _("That's your last POKéMON!");
|
||||
const u8 gText_YourPartysFull[] = _("Your party's full!");
|
||||
const u8 gText_YoureHoldingAPkmn[] = _("You're holding a POKéMON!");
|
||||
const u8 gText_WhichOneWillYouTake[] = _("Which one will you take?");
|
||||
const u8 gText_YouCantReleaseAnEgg[] = _("You can't release an EGG.");
|
||||
const u8 gText_ContinueBoxOperations[] = _("Continue BOX operations?");
|
||||
const u8 gText_PkmnCameBack[] = _("{DYNAMIC 0x00} came back!");
|
||||
const u8 gText_WasItWorriedAboutYou[] = _("Was it worried about you?");
|
||||
const u8 gText_FourEllipsesExclamation[] = _("‥ ‥ ‥ ‥ ‥!");
|
||||
const u8 gText_PleaseRemoveTheMail[] = _("Please remove the MAIL.");
|
||||
const u8 gText_GiveToAPkmn[] = _("GIVE to a POKéMON?");
|
||||
const u8 gText_PlacedItemInBag[] = _("Placed item in the BAG.");
|
||||
const u8 gText_BagIsFull2[] = _("The BAG is full.");
|
||||
const u8 gText_PutItemInBag[] = _("Put this item in the BAG?");
|
||||
const u8 gText_ItemIsNowHeld[] = _("{DYNAMIC 0x00} is now held.");
|
||||
const u8 gText_ChangedToNewItem[] = _("Changed to {DYNAMIC 0x00}.");
|
||||
const u8 gText_MailCantBeStored[] = _("MAIL can't be stored!");
|
||||
const u8 gPCText_Cancel[] = _("CANCEL");
|
||||
const u8 gPCText_Store[] = _("STORE");
|
||||
const u8 gPCText_Withdraw[] = _("WITHDRAW");
|
||||
const u8 gPCText_Shift[] = _("SHIFT");
|
||||
const u8 gPCText_Move[] = _("MOVE");
|
||||
const u8 gPCText_Place[] = _("PLACE");
|
||||
const u8 gPCText_Summary[] = _("SUMMARY");
|
||||
const u8 gPCText_Release[] = _("RELEASE");
|
||||
const u8 gPCText_Mark[] = _("MARK");
|
||||
const u8 gPCText_Name[] = _("NAME");
|
||||
const u8 gPCText_Jump[] = _("JUMP");
|
||||
const u8 gPCText_Wallpaper[] = _("WALLPAPER");
|
||||
const u8 gPCText_Take[] = _("TAKE");
|
||||
const u8 gPCText_Give[] = _("GIVE");
|
||||
const u8 gPCText_Switch[] = _("SWITCH");
|
||||
const u8 gPCText_Bag[] = _("BAG");
|
||||
const u8 gPCText_Info[] = _("INFO");
|
||||
const u8 gPCText_Scenery1[] = _("SCENERY 1");
|
||||
const u8 gPCText_Scenery2[] = _("SCENERY 2");
|
||||
const u8 gPCText_Scenery3[] = _("SCENERY 3");
|
||||
const u8 gPCText_Etcetera[] = _("ETCETERA");
|
||||
const u8 gPCText_Forest[] = _("FOREST");
|
||||
const u8 gPCText_City[] = _("CITY");
|
||||
const u8 gPCText_Desert[] = _("DESERT");
|
||||
const u8 gPCText_Savanna[] = _("SAVANNA");
|
||||
const u8 gPCText_Crag[] = _("CRAG");
|
||||
const u8 gPCText_Volcano[] = _("VOLCANO");
|
||||
const u8 gPCText_Snow[] = _("SNOW");
|
||||
const u8 gPCText_Cave[] = _("CAVE");
|
||||
const u8 gPCText_Beach[] = _("BEACH");
|
||||
const u8 gPCText_Seafloor[] = _("SEAFLOOR");
|
||||
const u8 gPCText_River[] = _("RIVER");
|
||||
const u8 gPCText_Sky[] = _("SKY");
|
||||
const u8 gPCText_PolkaDot[] = _("STARS");
|
||||
const u8 gPCText_Pokecenter[] = _("POKéCENTER");
|
||||
const u8 gPCText_Machine[] = _("TILES");
|
||||
const u8 gPCText_Simple[] = _("SIMPLE");
|
||||
const u8 gUnknown_8418562[] = _("なにを しますか?");
|
||||
const u8 gUnknown_841856C[] = _("WITHDRAW POKéMON");
|
||||
const u8 gUnknown_841857D[] = _("DEPOSIT POKéMON");
|
||||
const u8 gUnknown_841858D[] = _("MOVE POKéMON");
|
||||
const u8 gUnknown_841859A[] = _("MOVE ITEMS");
|
||||
const u8 gUnknown_84185A5[] = _("SEE YA!");
|
||||
const u8 gUnknown_84185AD[] = _("You can withdraw a POKéMON if you\nhave any in a BOX.");
|
||||
const u8 gUnknown_84185E2[] = _("You can deposit your party\nPOKéMON in any BOX.");
|
||||
const u8 gUnknown_8418611[] = _("You can move POKéMON that are\nstored in any BOX.");
|
||||
const u8 gUnknown_8418642[] = _("You can move items held by any\nPOKéMON in a BOX or your party.");
|
||||
const u8 gUnknown_8418681[] = _("See you later!");
|
||||
const u8 gUnknown_8418690[] = _("Can't deposit the last POKéMON!");
|
||||
const u8 gUnknown_84186B0[] = _("Can't take any more POKéMON.");
|
||||
const u8 gUnknown_84186CD[] = _("BOX");
|
||||
const u8 gText_WithdrawPokemon[] = _("WITHDRAW POKéMON");
|
||||
const u8 gText_DepositPokemon[] = _("DEPOSIT POKéMON");
|
||||
const u8 gText_MovePokemon[] = _("MOVE POKéMON");
|
||||
const u8 gText_MoveItems[] = _("MOVE ITEMS");
|
||||
const u8 gText_SeeYa[] = _("SEE YA!");
|
||||
const u8 gText_WithdrawMonDescription[] = _("You can withdraw a POKéMON if you\nhave any in a BOX.");
|
||||
const u8 gText_DepositMonDescription[] = _("You can deposit your party\nPOKéMON in any BOX.");
|
||||
const u8 gText_MoveMonDescription[] = _("You can move POKéMON that are\nstored in any BOX.");
|
||||
const u8 gText_MoveItemsDescription[] = _("You can move items held by any\nPOKéMON in a BOX or your party.");
|
||||
const u8 gText_SeeYaDescription[] = _("See you later!");
|
||||
const u8 gText_JustOnePkmn[] = _("Can't deposit the last POKéMON!");
|
||||
const u8 gText_PartyFull[] = _("Can't take any more POKéMON.");
|
||||
const u8 gText_Box[] = _("BOX");
|
||||
const u8 gUnknown_84186D1[] = _("Combine four words or phrases");
|
||||
const u8 gUnknown_84186EF[] = _("and make your profile.");
|
||||
const u8 gUnknown_8418706[] = _("Make a message of six phrases.");
|
||||
|
||||
+1
-1
@@ -959,7 +959,7 @@ static void Task_SelectTMAction_Type3(u8 taskId)
|
||||
|
||||
if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])))
|
||||
{
|
||||
sTMCaseDynamicResources->savedCallback = sub_808CE60;
|
||||
sTMCaseDynamicResources->savedCallback = Cb2_ReturnToPSS;
|
||||
Task_BeginFadeOutFromTMCase(taskId);
|
||||
}
|
||||
else
|
||||
|
||||
+7
-7
@@ -882,10 +882,10 @@ static void sub_804C728(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 10:
|
||||
PSS_RenderTextToVramViaBuffer(gSaveBlock2Ptr->playerName, sSpriteTextTilePtrs[0], 0, 0, gDecompressionBuffer, 3);
|
||||
DrawTextWindowAndBufferTiles(gSaveBlock2Ptr->playerName, sSpriteTextTilePtrs[0], 0, 0, gDecompressionBuffer, 3);
|
||||
id = GetMultiplayerId();
|
||||
PSS_RenderTextToVramViaBuffer(gLinkPlayers[id ^ 1].name, sSpriteTextTilePtrs[3], 0, 0, gDecompressionBuffer, 3);
|
||||
PSS_RenderTextToVramViaBuffer(sTradeUITextPtrs[TRADEUITEXT_CANCEL], sSpriteTextTilePtrs[6], 0, 0, gDecompressionBuffer, 2);
|
||||
DrawTextWindowAndBufferTiles(gLinkPlayers[id ^ 1].name, sSpriteTextTilePtrs[3], 0, 0, gDecompressionBuffer, 3);
|
||||
DrawTextWindowAndBufferTiles(sTradeUITextPtrs[TRADEUITEXT_CANCEL], sSpriteTextTilePtrs[6], 0, 0, gDecompressionBuffer, 2);
|
||||
RenderTextToVramViaBuffer(sTradeUITextPtrs[TRADEUITEXT_CHOOSE], sSpriteTextTilePtrs[8], 24);
|
||||
gMain.state++;
|
||||
sTradeMenuResourcesPtr->unk_A8 = 0;
|
||||
@@ -1080,10 +1080,10 @@ void sub_804CF14(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 10:
|
||||
PSS_RenderTextToVramViaBuffer(gSaveBlock2Ptr->playerName, sSpriteTextTilePtrs[0], 0, 0, gDecompressionBuffer, 3);
|
||||
DrawTextWindowAndBufferTiles(gSaveBlock2Ptr->playerName, sSpriteTextTilePtrs[0], 0, 0, gDecompressionBuffer, 3);
|
||||
id = GetMultiplayerId();
|
||||
PSS_RenderTextToVramViaBuffer(gLinkPlayers[id ^ 1].name, sSpriteTextTilePtrs[3], 0, 0, gDecompressionBuffer, 3);
|
||||
PSS_RenderTextToVramViaBuffer(sTradeUITextPtrs[TRADEUITEXT_CANCEL], sSpriteTextTilePtrs[6], 0, 0, gDecompressionBuffer, 2);
|
||||
DrawTextWindowAndBufferTiles(gLinkPlayers[id ^ 1].name, sSpriteTextTilePtrs[3], 0, 0, gDecompressionBuffer, 3);
|
||||
DrawTextWindowAndBufferTiles(sTradeUITextPtrs[TRADEUITEXT_CANCEL], sSpriteTextTilePtrs[6], 0, 0, gDecompressionBuffer, 2);
|
||||
RenderTextToVramViaBuffer(sTradeUITextPtrs[TRADEUITEXT_CHOOSE], sSpriteTextTilePtrs[8], 24);
|
||||
gMain.state++;
|
||||
sTradeMenuResourcesPtr->unk_A8 = 0;
|
||||
@@ -2502,7 +2502,7 @@ static bool8 sub_804F610(void)
|
||||
|
||||
static void RenderTextToVramViaBuffer(const u8 *name, u8 *dest, u8 unused)
|
||||
{
|
||||
PSS_RenderTextToVramViaBuffer(name, dest, 0, 0, gDecompressionBuffer, 6);
|
||||
DrawTextWindowAndBufferTiles(name, dest, 0, 0, gDecompressionBuffer, 6);
|
||||
}
|
||||
|
||||
static void sub_804F748(u8 who)
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ static void nullsub_9(void)
|
||||
{
|
||||
}
|
||||
|
||||
u16 AddWindow8Bit(struct WindowTemplate *template)
|
||||
u16 AddWindow8Bit(const struct WindowTemplate *template)
|
||||
{
|
||||
u16 windowId;
|
||||
u8* memAddress;
|
||||
@@ -81,7 +81,7 @@ void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width,
|
||||
FillBitmapRect8Bit(&pixelRect, x, y, width, height, fillValue);
|
||||
}
|
||||
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum)
|
||||
void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum)
|
||||
{
|
||||
struct Bitmap sourceRect;
|
||||
struct Bitmap destRect;
|
||||
|
||||
+1
-5
@@ -47,12 +47,8 @@ gUnknown_3000E89: @ 3000E89
|
||||
.include "src/sound.o"
|
||||
.align 2
|
||||
.include "src/field_effect.o"
|
||||
|
||||
.align 2
|
||||
@ .include "src/pokemon_storage_system.o"
|
||||
gUnknown_3000FE8: @ 3000FE8
|
||||
.space 0x184
|
||||
|
||||
.include "src/pokemon_storage_system_8.o"
|
||||
.align 2
|
||||
.include "src/easy_chat.o"
|
||||
.align 2
|
||||
|
||||
+9
-59
@@ -150,66 +150,16 @@ gUnknown_20386A8: @ 20386A8
|
||||
.include "src/option_menu.o"
|
||||
.align 2
|
||||
.include "src/trainer_card.o"
|
||||
|
||||
.align 2
|
||||
@ .include "src/pokemon_storage_system.o"
|
||||
sPreviousBoxOption: @ 20397A8
|
||||
.space 0x4
|
||||
|
||||
gUnknown_20397AC: @ 20397AC
|
||||
.space 0x4
|
||||
|
||||
sPSSData: @ 20397B0
|
||||
.space 0x4
|
||||
|
||||
sInPartyMenu: @ 20397B4
|
||||
.space 0x1
|
||||
|
||||
sCurrentBoxOption: @ 20397B5
|
||||
.space 0x1
|
||||
|
||||
gUnknown_20397B6: @ 20397B6
|
||||
.space 0x1
|
||||
|
||||
sWhichToReshow: @ 20397B7
|
||||
.space 0x1
|
||||
|
||||
sLastUsedBox: @ 20397B8
|
||||
.space 0x2
|
||||
|
||||
gUnknown_20397BA: @ 20397BA
|
||||
.space 0x2
|
||||
|
||||
gUnknown_20397BC: @ 20397BC
|
||||
.space 0x64
|
||||
|
||||
sBoxCursorArea: @ 2039820
|
||||
.space 0x1
|
||||
|
||||
sBoxCursorPosition: @ 2039821
|
||||
.space 0x1
|
||||
|
||||
sIsMonBeingMoved: @ 2039822
|
||||
.space 0x1
|
||||
|
||||
sMovingMonOrigBoxId: @ 2039823
|
||||
.space 0x1
|
||||
|
||||
sMovingMonOrigBoxPos: @ 2039824
|
||||
.space 0x1
|
||||
|
||||
sCanOnlyMove: @ 2039825
|
||||
.space 0x1
|
||||
|
||||
gUnknown_2039826: @ 2039826
|
||||
.space 0x2
|
||||
|
||||
gUnknown_2039828: @ 2039828
|
||||
.space 0x4
|
||||
|
||||
gUnknown_203982C: @ 203982C
|
||||
.space 0x4
|
||||
|
||||
.include "src/pokemon_storage_system_2.o"
|
||||
.align 2
|
||||
.include "src/pokemon_storage_system_3.o"
|
||||
.align 2
|
||||
.include "src/pokemon_storage_system_5.o"
|
||||
.align 2
|
||||
.include "src/pokemon_storage_system_7.o"
|
||||
.align 2
|
||||
.include "src/pokemon_storage_system_9.o"
|
||||
.align 2
|
||||
.include "src/script_movement.o"
|
||||
.align 2
|
||||
|
||||
Reference in New Issue
Block a user