Merge with master

This commit is contained in:
DizzyEggg 2019-04-01 13:40:42 +02:00
commit 944dc4f6bf
63 changed files with 8784 additions and 13953 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10839,7 +10839,7 @@ sub_81CD624: @ 81CD624
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0x2D movs r2, 0x2D
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
cmp r0, 0 cmp r0, 0
beq _081CD690 beq _081CD690
ldr r1, =gText_EggNickname ldr r1, =gText_EggNickname
@ -10854,14 +10854,14 @@ _081CD690:
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0x2 movs r2, 0x2
adds r3, r5, 0 adds r3, r5, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
adds r0, r5, 0 adds r0, r5, 0
bl StringGetEnd10 bl StringGetEnd10
adds r0, r4, 0 adds r0, r4, 0
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0xB movs r2, 0xB
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
lsls r0, 16 lsls r0, 16
lsrs r7, r0, 16 lsrs r7, r0, 16
cmp r4, 0xE cmp r4, 0xE
@ -11328,7 +11328,7 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x16 movs r2, 0x16
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
mov r1, r9 mov r1, r9
lsls r5, r1, 2 lsls r5, r1, 2
adds r4, r5, r1 adds r4, r5, r1
@ -11340,7 +11340,7 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x2F movs r2, 0x2F
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
ldr r1, =0x00006429 ldr r1, =0x00006429
add r1, r8 add r1, r8
adds r1, r4 adds r1, r4
@ -11349,7 +11349,7 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x21 movs r2, 0x21
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
ldr r1, =0x0000642a ldr r1, =0x0000642a
add r1, r8 add r1, r8
adds r1, r4 adds r1, r4
@ -11358,7 +11358,7 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x18 movs r2, 0x18
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
ldr r1, =0x0000642b ldr r1, =0x0000642b
add r1, r8 add r1, r8
adds r1, r4 adds r1, r4
@ -11367,7 +11367,7 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x17 movs r2, 0x17
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
ldr r1, =0x0000642c ldr r1, =0x0000642c
add r1, r8 add r1, r8
adds r1, r4 adds r1, r4
@ -11381,14 +11381,14 @@ _081CDA5A:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x30 movs r2, 0x30
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
cmp r0, 0xFF cmp r0, 0xFF
beq _081CDB10 beq _081CDB10
adds r0, r6, 0 adds r0, r6, 0
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x30 movs r2, 0x30
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
movs r1, 0x1D movs r1, 0x1D
bl __udivsi3 bl __udivsi3
b _081CDB12 b _081CDB12
@ -11401,7 +11401,7 @@ _081CDB12:
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0x8 movs r2, 0x8
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
ldr r1, =0x00006783 ldr r1, =0x00006783
add r1, r8 add r1, r8
add r1, r9 add r1, r9
@ -11498,7 +11498,7 @@ _081CDBD0:
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0x41 movs r2, 0x41
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
adds r4, r0, 0 adds r4, r0, 0
lsls r4, 16 lsls r4, 16
lsrs r4, 16 lsrs r4, 16
@ -11506,13 +11506,13 @@ _081CDBD0:
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0x1 movs r2, 0x1
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
mov r8, r0 mov r8, r0
adds r0, r5, 0 adds r0, r5, 0
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0 movs r2, 0
movs r3, 0 movs r3, 0
bl sub_81D2C68 bl GetBoxOrPartyMonData
adds r5, r0, 0 adds r5, r0, 0
lsls r0, r4, 3 lsls r0, r4, 3
ldr r1, =gMonFrontPicTable ldr r1, =gMonFrontPicTable

File diff suppressed because it is too large Load Diff

2772
asm/union_room_player_avatar.s Executable file

File diff suppressed because it is too large Load Diff

View File

@ -151,10 +151,22 @@ gUnknown_082F4190:: @ 82F4190
.align 2 .align 2
gUnknown_082F41CC:: @ 82F41CC gUnknown_082F41CC:: @ 82F41CC
.byte 0x00, 0x00, 0xff, 0x00, 0x01, 0x01, 0x00, 0x00 .byte 0x00, 0x00
.byte 0xf0, 0xfc, 0x10, 0xfc, 0xf8, 0xfe, 0x08, 0xfe .byte 0xff, 0x00
.byte 0xe8, 0xf8, 0x18, 0xf8, 0xe0, 0xf4, 0x20, 0xf4 .byte 0x01, 0x01
.byte 0xd8, 0xf0, 0x28, 0xf0
gUnknown_082F41D2::
.byte 0x00, 0x00
.byte 0xf0, 0xfc
.byte 0x10, 0xfc
.byte 0xf8, 0xfe
.byte 0x08, 0xfe
.byte 0xe8, 0xf8
.byte 0x18, 0xf8
.byte 0xe0, 0xf4
.byte 0x20, 0xf4
.byte 0xd8, 0xf0
.byte 0x28, 0xf0
.align 2 .align 2
gUnknown_082F41E8:: @ 82F41E8 gUnknown_082F41E8:: @ 82F41E8

View File

@ -3,83 +3,7 @@
.section .rodata .section .rodata
gUnknown_08625560:: @ 8625560
.incbin "graphics/pokenav/pokeball.4bpp"
gUnknown_08625660:: @ 8625660
.incbin "graphics/pokenav/pokeball_placeholder.4bpp"
gUnknown_08625680:: @ 8625680
.incbin "graphics/pokenav/sparkle.gbapal"
gUnknown_086256A0:: @ 86255A0
.incbin "graphics/pokenav/sparkle.4bpp"
gUnknown_08625A20:: @ 8625A20
.2byte 0
.2byte 0xC000
.2byte 0x400
.2byte 0
gUnknown_08625A28:: @ 8625A28
.2byte 0
.2byte 0x4000
.2byte 0x800
.2byte 0
gUnknown_08625A30:: @ 8625A30
.2byte 0
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A38:: @ 8625A38
.2byte 4
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A40:: @ 8625A40
.4byte gUnknown_08625A30
.4byte gUnknown_08625A38
gUnknown_08625A48:: @ 8625A48
.4byte NULL
.4byte 0x640800
gUnknown_08625A50:: @ 8625A50
spr_template 0x64, 0x64, gUnknown_08625A20, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625A68:: @ 8625A68
.4byte NULL
.4byte 0x64
gUnknown_08625A70:: @ 8625A70
.4byte gUnknown_08625560
.byte 0, 1, 0x65, 0
.4byte gUnknown_08625660
.2byte 0x20, 0x67
.4byte gPokenavConditionCancel_Gfx
.byte 0, 1, 0x66, 0
.4byte NULL, NULL
gUnknown_08625A90:: @ 8625A90
.4byte gPokenavConditionCancel_Pal + 0x0
.byte 0x65, 0, 0, 0
.4byte gPokenavConditionCancel_Pal + 0x20
.byte 0x66, 0, 0, 0
.4byte NULL, NULL
gUnknown_08625AA8:: @ 8625AA8
spr_template 0x65, 0x65, gUnknown_08625A28, gUnknown_08625A40, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625AC0:: @ 8625AC0
.4byte gUnknown_086256A0
.byte 0x80, 3, 0x68, 0
gUnknown_08625AC8:: @ 8625AC8
.4byte gUnknown_08625680
.byte 0x68, 0, 0, 0
gUnknown_08625AD0:: @ 8625AD0 gUnknown_08625AD0:: @ 8625AD0
.2byte 0 .2byte 0

File diff suppressed because it is too large Load Diff

99
data/union_room_player_avatar.s Executable file
View File

@ -0,0 +1,99 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnknown_082F072C:: @ 82F072C
.byte 0x21, 0x2c, 0x1f, 0x23, 0x25, 0x24, 0x41, 0x42
.byte 0x00, 0x00, 0x22, 0x28, 0x20, 0x2f, 0x2f, 0x0e
.byte 0x14, 0x2d, 0x00, 0x00
.align 2
gUnknown_082F0740:: @ 82F0740
.2byte 0x0004, 0x0006, 0x000d, 0x0008
.2byte 0x000a, 0x0006, 0x0001, 0x0008
.2byte 0x000d, 0x0004, 0x0007, 0x0004
.2byte 0x0001, 0x0004, 0x0007, 0x0008
.align 2
gUnknown_082F0760:: @ 82F0760
.byte 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00
.byte 0x00, 0x01
gUnknown_082F076A:: @ 82F076A
.byte 0x00, 0x02, 0x01, 0x04, 0x03
gUnknown_082F076F:: @ 82F076F
.byte 0x01, 0x03, 0x01, 0x04, 0x02
gUnknown_082F0774:: @ 82F0774
.byte 0x09, 0x08, 0x07, 0x02, 0x06, 0x05, 0x04, 0x03
.byte 0xbf, 0x02, 0xc0, 0x02, 0xc1, 0x02, 0xc2, 0x02
.byte 0xc3, 0x02, 0xc4, 0x02, 0xc5, 0x02, 0xc6, 0x02
gUnknown_082F078C:: @ 82F078C
.byte 0x9c, 0xfe
gUnknown_082F078E:: @ 82F078E
.byte 0x9d, 0xfe
.align 2
gWirelessInfoScreenPal:: @ 82F0790
.incbin "graphics/interface/wireless_info_screen.gbapal"
.align 2
gWirelessInfoScreenGfx:: @ 82F0990
.incbin "graphics/interface/wireless_info_screen.4bpp.lz"
.align 2
gWirelessInfoScreenTilemap:: @ 82F0BA0
.incbin "graphics/interface/wireless_info_screen.bin.lz"
.align 2
gUnknown_082F0D34:: @ 82F0D34
.4byte 0x000001f8
.4byte 0x00001081
.align 2
gUnknown_082F0D3C:: @ 82F0D3C
window_template 0x00, 0x03, 0x00, 0x18, 0x03, 0x0f, 0x0001
window_template 0x00, 0x03, 0x04, 0x15, 0x0f, 0x0f, 0x0049
window_template 0x00, 0x18, 0x04, 0x03, 0x0f, 0x0f, 0x0184
null_window_template
.align 2
gUnknown_082F0D5C:: @ 82F0D5C
.4byte gText_WirelessCommStatus
.4byte gText_PeopleTrading
.4byte gText_PeopleBattling
.4byte gText_PeopleInUnionRoom
.4byte gText_PeopleCommunicating
.align 2
gUnknown_082F0D70:: @ 82F0D70
.byte 0x01, 0x01, 0x02, 0x02, 0x01, 0x02, 0x03, 0x01
.byte 0x04, 0x04, 0x00, 0x02, 0x06, 0x03, 0x02, 0x07
.byte 0x03, 0x02, 0x09, 0x03, 0x00, 0x0a, 0x03, 0x00
.byte 0x0b, 0x03, 0x00, 0x0c, 0xff, 0x00, 0x0d, 0x00
.byte 0x00, 0x10, 0x03, 0x00, 0x0f, 0x03, 0x00, 0x40
.byte 0x02, 0x01, 0x41, 0x02, 0x02, 0x44, 0x02, 0x02
.byte 0x45, 0x02, 0x00, 0x48, 0x02, 0x02, 0x54, 0x02
.byte 0x01, 0x53, 0x02, 0x02, 0x51, 0x02, 0x01, 0x52
.byte 0x02, 0x01, 0x15, 0x03, 0x02, 0x16, 0x03, 0x02
.byte 0x17, 0x03, 0x00, 0x18, 0x03, 0x00, 0x19, 0x03
.byte 0x00, 0x1a, 0x03, 0x00, 0x1b, 0x03, 0x00, 0x1c
.byte 0x01, 0x02, 0x0e, 0x01, 0x02, 0x00, 0x00, 0x00
.align 2
gUnknown_082F0DD0:: @ 82F0DD0
.4byte 0x000001FC
.align 2
gUnknown_082F0DD4:: @ 82F0DD4
window_template 0x00, 0x03, 0x0f, 0x18, 0x04, 0x0e, 0x0014
null_window_template
.align 2
gUnknown_082F0DE4:: @ 82F0DE4
.byte 0x01, 0x02, 0x03

View File

@ -646,9 +646,7 @@ struct BattleScripting
}; };
// rom_80A5C6C // rom_80A5C6C
u8 GetBattlerSide(u8 battler);
u8 GetBattlerPosition(u8 battler);
u8 GetBattlerAtPosition(u8 position);
struct BattleSpriteInfo struct BattleSpriteInfo
{ {
@ -859,5 +857,6 @@ extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT];
extern u8 gMultiUsePlayerCursor; extern u8 gMultiUsePlayerCursor;
extern u8 gNumberOfMovesToChoose; extern u8 gNumberOfMovesToChoose;
extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT];
extern const u8 gTrainerClassNames[][13];
#endif // GUARD_BATTLE_H #endif // GUARD_BATTLE_H

View File

@ -73,7 +73,7 @@ void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *ar
void HandleIntroSlide(u8 terrainId); void HandleIntroSlide(u8 terrainId);
int GetAnimBgAttribute(u8 bgId, u8 attributeId); int GetAnimBgAttribute(u8 bgId, u8 attributeId);
// battle_anim_80A5C6C.s // battle_anim_mons.s
void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite); void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite);
void sub_80A8AEC(struct Sprite *sprite); void sub_80A8AEC(struct Sprite *sprite);
void sub_80A8A6C(struct Sprite *sprite); void sub_80A8A6C(struct Sprite *sprite);
@ -155,6 +155,9 @@ void sub_80A6DEC(struct Sprite *sprite);
void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroyAnimVisualTaskAndDisableBlend(u8 taskId);
void DestroySpriteAndFreeResources_(struct Sprite *sprite); void DestroySpriteAndFreeResources_(struct Sprite *sprite);
void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId);
u8 GetBattlerSide(u8 battler);
u8 GetBattlerPosition(u8 battler);
u8 GetBattlerAtPosition(u8 position);
enum enum
{ {
@ -193,7 +196,7 @@ u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
void sub_80A64EC(struct Sprite *sprite); void sub_80A64EC(struct Sprite *sprite);
void sub_80A718C(struct Sprite *sprite); void sub_80A718C(struct Sprite *sprite);
// battle_anim_80A9C70.s // battle_anim_status_effects.s
#define STAT_ANIM_PLUS1 15 #define STAT_ANIM_PLUS1 15
#define STAT_ANIM_PLUS2 39 #define STAT_ANIM_PLUS2 39
#define STAT_ANIM_MINUS1 22 #define STAT_ANIM_MINUS1 22
@ -204,13 +207,11 @@ void sub_80A718C(struct Sprite *sprite);
#define STAT_ANIM_MULTIPLE_MINUS2 58 #define STAT_ANIM_MULTIPLE_MINUS2 58
void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId); void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId);
// battle_anim_8170478.c
void sub_8172EF0(u8 battler, struct Pokemon *mon);
// ground.c // ground.c
void sub_81152DC(u8 taskId); void sub_81152DC(u8 taskId);
// battle_anim_8170478.s // battle_anim_special.c
void sub_8172EF0(u8 battler, struct Pokemon *mon);
u8 ItemIdToBallId(u16 itemId); u8 ItemIdToBallId(u16 itemId);
u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId);
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId);

6
include/berry_crush.h Executable file
View File

@ -0,0 +1,6 @@
#ifndef GUARD_BERRY_CRUSH_H
#define GUARD_BERRY_CRUSH_H
void sub_8020C70(MainCallback callback);
#endif // GUARD_BERRY_CRUSH_H

View File

@ -8,5 +8,6 @@ void LockSelectedEventObject(void);
void sub_8098630(void); void sub_8098630(void);
bool8 sub_8098734(void); bool8 sub_8098734(void);
void ScriptUnfreezeEventObjects(void); void ScriptUnfreezeEventObjects(void);
void sub_8098524(void);
#endif // GUARD_EVENT_OBJ_LOCK_H #endif // GUARD_EVENT_OBJ_LOCK_H

View File

@ -5184,4 +5184,12 @@ extern const u16 gLinkMiscMenu_Pal[];
extern const u32 gLinkMiscMenu_Gfx[]; extern const u32 gLinkMiscMenu_Gfx[];
extern const u32 gLinkMiscMenu_Tilemap[]; extern const u32 gLinkMiscMenu_Tilemap[];
// Use Pokeblock
extern const u8 gPokenavConditionCancel_Gfx[];
extern const u16 gPokenavConditionCancel_Pal[];
// Berry Crush
extern const u32 gUnknown_08DE34B8[];
extern const u16 gUnknown_08DE3398[];
#endif //GUARD_GRAPHICS_H #endif //GUARD_GRAPHICS_H

View File

@ -10,7 +10,7 @@ bool8 AllocItemIconTemporaryBuffers(void);
void FreeItemIconTemporaryBuffers(void); void FreeItemIconTemporaryBuffers(void);
void CopyItemIconPicTo4x4Buffer(const void *src, void *dest); void CopyItemIconPicTo4x4Buffer(const void *src, void *dest);
u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId); u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId);
u8 AddCustomItemIconSprite(struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId); u8 AddCustomItemIconSprite(const struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId);
const void *GetItemIconPicOrPalette(u16 itemId, u8 which); const void *GetItemIconPicOrPalette(u16 itemId, u8 which);
#endif //GUARD_ITEM_ICON_H #endif //GUARD_ITEM_ICON_H

View File

@ -281,6 +281,7 @@ void sub_8011DE0(u32 arg0);
u8 sub_801100C(int a0); u8 sub_801100C(int a0);
void sub_800EF7C(void); void sub_800EF7C(void);
bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx);
bool8 sub_800DF34(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx);
s32 sub_800E87C(u8 idx); s32 sub_800E87C(u8 idx);
void sub_8011BA4(void); void sub_8011BA4(void);
void sub_8010198(void); void sub_8010198(void);

View File

@ -98,7 +98,7 @@ struct CursorStruct
extern struct ScrollArrowsTemplate gTempScrollArrowTemplate; extern struct ScrollArrowsTemplate gTempScrollArrowTemplate;
extern struct ListMenuTemplate gMultiuseListMenuTemplate; extern struct ListMenuTemplate gMultiuseListMenuTemplate;
s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum);
u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow); u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow);
u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow); u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow);
s32 ListMenu_ProcessInput(u8 listTaskId); s32 ListMenu_ProcessInput(u8 listTaskId);

View File

@ -99,6 +99,8 @@ void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height);
u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile);
void sub_8198314(void); void sub_8198314(void);
void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram);
void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed);
void sub_8198C78(void);
void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs);
#endif // GUARD_MENU_H #endif // GUARD_MENU_H

View File

@ -38,15 +38,8 @@ void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0);
void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0);
void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0);
void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0);
void sub_81D3520(struct Sprite **);
bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0);
void sub_81D354C(struct Sprite **);
void sub_81D3464(struct Sprite **arg0);
void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2);
u8 sub_81D3178(struct UnknownStruct_81D1ED4*, u16*);
u8 sub_81D31A4(struct UnknownStruct_81D1ED4*, u16*);
bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0); bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0);
u8 sub_81D3150(u16 *arg0);
void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1);
void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2);
void MoveRelearnerPrintText(u8 *str); void MoveRelearnerPrintText(u8 *str);
@ -55,5 +48,20 @@ void MoveRelearnerCreateYesNoMenu(void);
u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices);
void InitMoveRelearnerWindows(bool8 useContextWindow); void InitMoveRelearnerWindows(bool8 useContextWindow);
void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation);
s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst);
void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7);
void sub_81D2F78(struct UnknownStruct_81D1ED4 *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8);
void sub_81D3094(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7);
bool8 sub_81D312C(s16 *var);
bool8 sub_81D3150(s16 *var);
bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1);
bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1);
void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal);
void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals);
void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal);
void sub_81D3464(struct Sprite **sprites);
void sub_81D3480(struct Sprite **sprites, u8 arg1, u8 arg2);
void sub_81D3520(struct Sprite **sprites);
void sub_81D354C(struct Sprite **sprites);
#endif // GUARD_MENU_SPECIALIZED_H #endif // GUARD_MENU_SPECIALIZED_H

6
include/mevent2.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef GUARD_MEVENT2_H
#define GUARD_MEVENT2_H
void sub_801B990(u32, u32);
#endif //GUARD_MEVENT2_H

16
include/mevent_801BAAC.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef GUARD_MEVENT_801BAAC_H
#define GUARD_MEVENT_801BAAC_H
bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6);
bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0);
s32 sub_801BB74(void);
s32 sub_801C758(void);
s32 sub_801BDA4(bool32 flag);
void sub_801BB48(void);
s32 sub_801CA50(bool32 flag);
void sub_801C72C(void);
u32 sub_801CCD0(u16 input);
void sub_801CC80(void);
void sub_801CC38(void);
#endif //GUARD_MEVENT_801BAAC_H

View File

@ -2,5 +2,6 @@
#define GUARD_MEVENT_NEWS_H #define GUARD_MEVENT_NEWS_H
void sub_801DBC0(void); void sub_801DBC0(void);
void sub_801DB68(u32 a0);
#endif //GUARD_MEVENT_NEWS_H #endif //GUARD_MEVENT_NEWS_H

8
include/mevent_server.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef GUARD_MEVENT_SERVER_H
#define GUARD_MEVENT_SERVER_H
void mevent_srv_new_wcard();
void mevent_srv_init_wnews();
u32 sub_801D0C4(u16 * a0);
#endif //GUARD_MEVENT_SERVER_H

View File

@ -0,0 +1,10 @@
#ifndef GUARD_MEVENT_SERVER_ISH_H
#define GUARD_MEVENT_SERVER_ISH_H
void sub_801D484(u32 arg);
u32 sub_801D4A8(u16 * a0);
void sub_801D4E4(void);
void * sub_801D4F4(void);
void sub_801D500(u32 a0);
#endif //GUARD_MEVENT_SERVER_ISH_H

8
include/mystery_gift.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef GUARD_MYSTERY_GIFT_H
#define GUARD_MYSTERY_GIFT_H
void sub_8018438(void);
void sub_80186EC(bool8 isJapanese, bool32 usePickOkCancel);
void sub_8018798(u32 bg);
#endif //GUARD_MYSTERY_GIFT_H

View File

@ -1,8 +1,6 @@
#ifndef GUARD_POKENAV_H #ifndef GUARD_POKENAV_H
#define GUARD_POKENAV_H #define GUARD_POKENAV_H
#include "list_menu.h"
bool8 sub_81D312C(void *arg0);
void CB2_InitPokeNav(void); void CB2_InitPokeNav(void);
#endif //GUARD_POKENAV_H #endif //GUARD_POKENAV_H

View File

@ -1,26 +1,4 @@
#ifndef GUARD_rom_8011DC0_H #ifndef GUARD_rom_8011DC0_H
#define GUARD_rom_8011DC0_H #define GUARD_rom_8011DC0_H
// Exported type declarations
// Exported RAM declarations
extern u8 gUnknown_02022C2C;
extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38;
extern u16 gUnknown_02022C3C;
extern u8 gUnknown_02022C3E;
// Exported ROM declarations
void sub_8018438(void);
void sub_801B990(u32, u32);
u8 sub_8013F78(void);
bool32 sub_802C908(u16);
void nullsub_89(u8 taskId);
void var_800D_set_xB(void);
bool32 mevent_0814257C(u8 *textState, const u8 *str);
void sub_8018884(const u8 *src);
void sub_80186A4(void);
#endif //GUARD_rom_8011DC0_H #endif //GUARD_rom_8011DC0_H

View File

@ -194,6 +194,7 @@ extern const u8 gText_SeeYaDescription[];
extern const u8 gText_EggNickname[]; extern const u8 gText_EggNickname[];
extern const u8 gText_Pokemon[]; extern const u8 gText_Pokemon[];
extern const u8 gText_InParty[];
extern const u8 gText_InGameClockUsable[]; extern const u8 gText_InGameClockUsable[];
// reset rtc screen texts // reset rtc screen texts
@ -2606,4 +2607,70 @@ extern const u8 gText_YayUnkF9F9[];
extern const u8 gText_ThankYou[]; extern const u8 gText_ThankYou[];
extern const u8 gText_ByeBye[]; extern const u8 gText_ByeBye[];
// Mystery Gift
extern const u8 gText_MysteryGift[];
extern const u8 gText_PickOKCancel[];
extern const u8 gText_PickOKExit[];
extern const u8 gJPText_MysteryGift[];
extern const u8 gJPText_DecideStop[];
extern const u8 gText_WonderCards[];
extern const u8 gText_WonderNews[];
extern const u8 gText_Exit3[];
extern const u8 gText_WirelessCommunication[];
extern const u8 gText_Friend2[];
extern const u8 gText_Cancel2[];
extern const u8 gText_Receive[];
extern const u8 gText_Send[];
extern const u8 gText_Toss[];
extern const u8 gText_VarietyOfEventsImportedWireless[];
extern const u8 gText_WonderCardsInPossession[];
extern const u8 gText_ReadNewsThatArrived[];
extern const u8 gText_ReturnToTitle[];
extern const u8 gText_WhatToDoWithCards[];
extern const u8 gText_WhatToDoWithNews[];
extern const u8 gText_IfThrowAwayCardEventWontHappen[];
extern const u8 gText_OkayToDiscardNews[];
extern const u8 gText_WonderNewsThrownAway[];
extern const u8 gText_WonderCardThrownAway[];
extern const u8 gText_DataWillBeSaved[];
extern const u8 gText_SaveCompletedPressA[];
extern const u8 gText_NothingSentOver[];
extern const u8 gText_RecordUploadedViaWireless[];
extern const u8 gText_WonderCardReceivedFrom[];
extern const u8 gText_WonderCardReceived[];
extern const u8 gText_WonderNewsReceivedFrom[];
extern const u8 gText_WonderNewsReceived[];
extern const u8 gText_NewStampReceived[];
extern const u8 gText_AlreadyHadCard[];
extern const u8 gText_AlreadyHadStamp[];
extern const u8 gText_AlreadyHadNews[];
extern const u8 gText_NoMoreRoomForStamps[];
extern const u8 gText_CommunicationCanceled[];
extern const u8 gText_CantAcceptNewsFromTrainer[];
extern const u8 gText_CantAcceptCardFromTrainer[];
extern const u8 gText_CommunicationError[];
extern const u8 gText_NewTrainerReceived[];
extern const u8 gText_RecordUploadedViaWireless[];
extern const u8 gText_WonderCardSentTo[];
extern const u8 gText_WonderNewsSentTo[];
extern const u8 gText_StampSentTo[];
extern const u8 gText_OtherTrainerHasCard[];
extern const u8 gText_OtherTrainerHasStamp[];
extern const u8 gText_OtherTrainerHasNews[];
extern const u8 gText_NoMoreRoomForStamps[];
extern const u8 gText_OtherTrainerCanceled[];
extern const u8 gText_GiftSentTo[];
extern const u8 gText_CantSendGiftToTrainer[];
extern const u8 gText_DontHaveCardNewOneInput[];
extern const u8 gText_DontHaveNewsNewOneInput[];
extern const u8 gText_WhereShouldCardBeAccessed[];
extern const u8 gText_WhereShouldNewsBeAccessed[];
extern const u8 gText_Communicating[];
extern const u8 gText_ThrowAwayWonderCard[];
extern const u8 gText_HaventReceivedCardsGift[];
extern const u8 gText_CommunicationCompleted[];
extern const u8 gText_HaventReceivedGiftOkayToDiscard[];
extern const u8 gText_SendingWonderCard[];
extern const u8 gText_SendingWonderNews[];
#endif // GUARD_STRINGS_H #endif // GUARD_STRINGS_H

View File

@ -1,9 +1,178 @@
#ifndef GUARD_UNION_ROOM_H #ifndef GUARD_UNION_ROOM_H
#define GUARD_UNION_ROOM_H #define GUARD_UNION_ROOM_H
#include "librfu.h"
// Exported type declarations
struct UnkStruct_Shared
{
struct UnkLinkRfuStruct_02022B14 field_0;
u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1];
};
struct UnkStruct_x1C
{
struct UnkStruct_Shared unk0;
u8 unk18:1;
};
struct UnkStruct_x20
{
struct UnkStruct_Shared unk;
u16 field_18;
u8 field_1A_0:2;
u8 field_1A_1:1;
u8 field_1B;
u8 field_1D;
u8 field_1E;
u8 field_1F;
};
struct UnkStruct_Main0
{
struct UnkStruct_x20 arr[8];
};
struct UnkStruct_Main4
{
struct UnkStruct_x1C arr[5];
};
struct UnkStruct_Main8
{
struct UnkStruct_x20 arr[5];
};
struct UnkStruct_Leader
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main8 *field_8;
u8 state;
u8 textState;
u8 field_E;
u8 listWindowId;
u8 field_10;
u8 field_11;
u8 listTaskId;
u8 field_13;
u8 field_14;
u8 field_15;
u8 field_16;
u8 field_17;
u8 field_18;
u8 field_19;
u16 field_1A;
};
struct UnkStruct_Group
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
u8 state;
u8 textState;
u8 field_A;
u8 listWindowId;
u8 field_C;
u8 field_D;
u8 listTaskId;
u8 field_F;
u8 field_10;
u8 field_11;
u8 field_12;
u8 field_13;
u8 field_14;
u8 field_15;
};
struct UnkStruct_8019BA8
{
u8 field_0;
u8 field_1;
u8 field_2;
u8 field_3;
};
struct UnkStruct_URoom
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main0 *field_8;
struct UnkStruct_Main4 *field_C;
u16 field_10;
u16 field_12;
u8 state;
u8 stateAfterPrint;
u8 textState;
u8 field_17;
u8 field_18;
u8 field_19;
u8 field_1A;
u8 field_1B;
u8 field_1C;
u8 field_1D;
u8 field_1E;
u8 field_1F;
u8 field_20;
u8 spriteIds[40];
u8 field_49;
u8 field_4A;
u16 field_4C[6];
u8 field_58[0x98 - 0x58];
u16 field_98;
u16 field_9A[3];
struct UnkStruct_8019BA8 field_A0[8];
u8 field_C0[12][15];
u8 field_174[48];
u8 field_1A4[200];
};
union UnkUnion_Main
{
struct UnkStruct_Leader *leader;
struct UnkStruct_Group *group;
struct UnkStruct_URoom *uRoom;
};
struct TradeUnkStruct
{
u16 field_0;
u16 type;
u32 playerPersonality;
u8 field_8;
u8 field_9;
u16 playerSpecies;
u16 playerLevel;
u16 species;
u16 level;
u16 field_12;
u32 personality;
};
// Exported RAM declarations
extern u8 gUnknown_02022C2C;
extern union UnkUnion_Main gUnknown_02022C30;
extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38;
extern u16 gUnknown_02022C3C;
extern u8 gUnknown_02022C3E;
// Exported ROM declarations
u8 sub_8013F78(void);
bool32 sub_802C908(u16);
void nullsub_89(u8 taskId);
void var_800D_set_xB(void);
bool32 mevent_0814257C(u8 *textState, const u8 *str);
void sub_8018884(const u8 *src);
void sub_80186A4(void);
void sub_8014EFC(u32 arg0);
void sub_80152A8(u32 arg0);
void sub_8014A00(u32 arg0);
extern bool8 gUnknown_02022C60; extern bool8 gUnknown_02022C60;
void sub_8018798(u8);
void sub_80186EC(bool8, bool32);
#endif //GUARD_UNION_ROOM_H #endif //GUARD_UNION_ROOM_H

View File

@ -55,7 +55,8 @@ SECTIONS {
src/link.o(.text); src/link.o(.text);
src/link_rfu.o(.text); src/link_rfu.o(.text);
src/union_room.o(.text); src/union_room.o(.text);
asm/union_room.o(.text); src/mystery_gift.o(.text);
asm/union_room_player_avatar.o(.text);
src/mevent2.o(.text); src/mevent2.o(.text);
src/mevent_801BAAC.o(.text); src/mevent_801BAAC.o(.text);
asm/mevent_server.o(.text); asm/mevent_server.o(.text);
@ -63,6 +64,7 @@ SECTIONS {
asm/mevent_server_helpers.o(.text); asm/mevent_server_helpers.o(.text);
src/mevent_news.o(.text); src/mevent_news.o(.text);
src/union_room_chat.o(.text); src/union_room_chat.o(.text);
src/berry_crush.o(.text);
asm/berry_crush.o(.text); asm/berry_crush.o(.text);
src/berry_powder.o(.text); src/berry_powder.o(.text);
asm/dodrio_berry_picking.o(.text); asm/dodrio_berry_picking.o(.text);
@ -119,10 +121,10 @@ SECTIONS {
src/palette.o(.text); src/palette.o(.text);
src/sound.o(.text); src/sound.o(.text);
src/battle_anim.o(.text); src/battle_anim.o(.text);
src/battle_anim_80A5C6C.o(.text); src/battle_anim_mons.o(.text);
src/task.o(.text); src/task.o(.text);
src/reshow_battle_screen.o(.text); src/reshow_battle_screen.o(.text);
src/battle_anim_80A9C70.o(.text); src/battle_anim_status_effects.o(.text);
src/title_screen.o(.text); src/title_screen.o(.text);
src/field_weather.o(.text); src/field_weather.o(.text);
src/field_weather_effect.o(.text); src/field_weather_effect.o(.text);
@ -144,7 +146,7 @@ SECTIONS {
src/mail_data.o(.text); src/mail_data.o(.text);
src/map_name_popup.o(.text); src/map_name_popup.o(.text);
src/item_menu_icons.o(.text); src/item_menu_icons.o(.text);
src/battle_anim_80D51AC.o(.text); src/battle_anim_mon_movement.o(.text);
src/item.o(.text); src/item.o(.text);
src/contest.o(.text); src/contest.o(.text);
src/shop.o(.text); src/shop.o(.text);
@ -246,7 +248,7 @@ SECTIONS {
src/intro.o(.text); src/intro.o(.text);
src/reset_save_heap.o(.text); src/reset_save_heap.o(.text);
src/field_region_map.o(.text); src/field_region_map.o(.text);
src/battle_anim_8170478.o(.text); src/battle_anim_special.o(.text);
src/hall_of_fame.o(.text); src/hall_of_fame.o(.text);
src/credits.o(.text); src/credits.o(.text);
src/lottery_corner.o(.text); src/lottery_corner.o(.text);
@ -409,7 +411,8 @@ SECTIONS {
src/link.o(.rodata); src/link.o(.rodata);
src/link_rfu.o(.rodata); src/link_rfu.o(.rodata);
src/union_room.o(.rodata); src/union_room.o(.rodata);
data/union_room.o(.rodata); src/mystery_gift.o(.rodata);
data/union_room_player_avatar.o(.rodata);
src/mevent2.o(.rodata); src/mevent2.o(.rodata);
src/mevent_801BAAC.o(.rodata); src/mevent_801BAAC.o(.rodata);
data/mevent_server.o(.rodata); data/mevent_server.o(.rodata);
@ -461,9 +464,9 @@ SECTIONS {
src/palette.o(.rodata); src/palette.o(.rodata);
src/sound.o(.rodata); src/sound.o(.rodata);
src/battle_anim.o(.rodata); src/battle_anim.o(.rodata);
src/battle_anim_80A5C6C.o(.rodata); src/battle_anim_mons.o(.rodata);
data/map_events.o(.rodata); data/map_events.o(.rodata);
src/battle_anim_80A9C70.o(.rodata); src/battle_anim_status_effects.o(.rodata);
src/title_screen.o(.rodata); src/title_screen.o(.rodata);
src/field_weather.o(.rodata); src/field_weather.o(.rodata);
src/field_weather_effect.o(.rodata); src/field_weather_effect.o(.rodata);
@ -482,7 +485,7 @@ SECTIONS {
src/fldeff_cut.o(.rodata); src/fldeff_cut.o(.rodata);
src/map_name_popup.o(.rodata); src/map_name_popup.o(.rodata);
src/item_menu_icons.o(.rodata); src/item_menu_icons.o(.rodata);
src/battle_anim_80D51AC.o(.rodata); src/battle_anim_mon_movement.o(.rodata);
src/item.o(.rodata); src/item.o(.rodata);
data/contest.o(.rodata); data/contest.o(.rodata);
src/shop.o(.rodata); src/shop.o(.rodata);
@ -566,7 +569,7 @@ SECTIONS {
src/player_pc.o(.rodata); src/player_pc.o(.rodata);
src/intro.o(.rodata); src/intro.o(.rodata);
src/field_region_map.o(.rodata); src/field_region_map.o(.rodata);
src/battle_anim_8170478.o(.rodata); src/battle_anim_special.o(.rodata);
src/hall_of_fame.o(.rodata); src/hall_of_fame.o(.rodata);
src/credits.o(.rodata); src/credits.o(.rodata);
src/lottery_corner.o(.rodata); src/lottery_corner.o(.rodata);

View File

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "alloc.h" #include "alloc.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_ai_script_commands.h" #include "battle_ai_script_commands.h"
#include "battle_factory.h" #include "battle_factory.h"
#include "battle_setup.h" #include "battle_setup.h"

View File

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_ai_script_commands.h" #include "battle_ai_script_commands.h"
#include "battle_anim.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "battle_setup.h" #include "battle_setup.h"
#include "pokemon.h" #include "pokemon.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_message.h" #include "battle_message.h"
#include "main.h" #include "main.h"
#include "menu.h" #include "menu.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_ai_script_commands.h" #include "battle_ai_script_commands.h"
#include "battle_arena.h" #include "battle_arena.h"
#include "battle_controllers.h" #include "battle_controllers.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "battle_message.h" #include "battle_message.h"
#include "battle_setup.h" #include "battle_setup.h"

View File

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "pokemon.h" #include "pokemon.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_tv.h" #include "battle_tv.h"
#include "constants/battle_string_ids.h" #include "constants/battle_string_ids.h"
#include "constants/battle_anim.h" #include "constants/battle_anim.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "battle_interface.h" #include "battle_interface.h"
#include "battle_setup.h" #include "battle_setup.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "alloc.h" #include "alloc.h"
#include "pokemon.h" #include "pokemon.h"

775
src/berry_crush.c Executable file
View File

@ -0,0 +1,775 @@
#include "global.h"
#include "alloc.h"
#include "berry_powder.h"
#include "bg.h"
#include "event_data.h"
#include "gpu_regs.h"
#include "graphics.h"
#include "item_icon.h"
#include "item_menu.h"
#include "link.h"
#include "link_rfu.h"
#include "main.h"
#include "math_util.h"
#include "menu.h"
#include "overworld.h"
#include "palette.h"
#include "rom_8034C54.h"
#include "scanline_effect.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
#include "trig.h"
#include "window.h"
#include "constants/items.h"
#include "constants/rgb.h"
#include "constants/songs.h"
struct BerryCrushGame_Player
{
u16 unk0;
u8 filler2[0x12];
u8 unk14[0xC];
};
struct BerryCrushGame_PlayersSeparate
{
struct BerryCrushGame_Player player;
struct BerryCrushGame_Player others[4];
};
typedef union BerryCrushGame_Players
{
struct BerryCrushGame_Player players[5];
struct BerryCrushGame_PlayersSeparate separate;
} BerryCrushGame_Players;
struct BerryCrushGame_138_C
{
u8 filler0[0x8];
s16 unk8;
u16 unkA;
};
struct BerryCrushGame_138
{
u8 filler0[0xC];
struct BerryCrushGame_138_C *unkC[5];
u8 filler1C[0x4];
struct Sprite *unk24[5];
struct Sprite *unk38[5];
struct Sprite *unk4C[5];
struct Sprite *unk60[5];
struct Sprite *unk74[5];
};
struct BerryCrushGame_4E
{
u8 filler0[0x4];
u8 unk4;
u8 filler5[0x5];
u16 unkA;
u16 unkC;
};
struct __attribute__((packed)) BerryCrushGame_40
{
u8 filler0[0xE];
struct BerryCrushGame_4E unkE;
};
struct BerryCrushGame
{
MainCallback unk0;
void (* unk4)(struct BerryCrushGame *, u8 *);
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
u8 unkC;
u8 fillerD[0x1];
u8 unkE;
u8 unkF;
u8 filler10[0x2];
u16 unk12;
u8 filler14[0x2];
u16 unk16;
u8 filler18[0x4];
int unk1C;
u8 filler20[0x5];
u8 unk25_0:1;
u8 unk25_1:1;
u8 unk25_2:1;
u8 filler26[0x2];
u16 unk28;
u16 unk2A;
u16 unk2C;
u8 filler2E[0x8];
u8 unk36[0xA];
struct BerryCrushGame_40 unk40;
u8 filler60[0x8];
int unk68;
u16 unk6C;
u8 filler6E[0x4];
u16 unk72;
u8 filler74[0x10];
BerryCrushGame_Players unk84;
u8 filler124[0x14];
struct BerryCrushGame_138 unk138;
u8 unk1C0[0x1000];
u8 unk11C0[0x1000];
u8 unk21C0[0x1000];
u8 unk31C0[0x1000];
};
static void sub_8020F74(void);
static void sub_8020F88(void);
static void sub_8020FA0(u8);
void sub_8020FC4(struct BerryCrushGame *);
void sub_8022BEC(u16, u8, u8 *);
void sub_8024604(u8 *, u8, s8, u8, u8, u8, u8);
static int sub_8021450(struct BerryCrushGame *);
void sub_8022588(struct BerryCrushGame *);
void sub_8022600(struct BerryCrushGame *);
void sub_80226D0(struct BerryCrushGame *);
void sub_8022730(struct BerryCrushGame *);
void sub_8022960(struct BerryCrushGame *);
void sub_8022524(struct BerryCrushGame_138 *, u16);
void sub_8022B28(struct Sprite *);
extern struct BerryCrushGame *gUnknown_02022C90;
extern const struct BgTemplate gUnknown_082F32C8[4];
extern const u8 gBerryCrushGrinderTopTilemap[];
extern const u8 gBerryCrushContainerCapTilemap[];
extern const u8 gBerryCrushBackgroundTilemap[];
extern const struct SpriteTemplate gUnknown_082F436C;
extern const u16 gUnknown_082F41E8[];
extern const s8 gUnknown_082F41CC[][2];
extern const s8 gUnknown_082F41D2[][2];
struct BerryCrushGame *sub_8020C00(void)
{
return gUnknown_02022C90;
}
int sub_8020C0C(MainCallback callback)
{
if (!gUnknown_02022C90)
return 2;
if (!callback)
callback = gUnknown_02022C90->unk0;
DestroyTask(gUnknown_02022C90->unkA);
FREE_AND_SET_NULL(gUnknown_02022C90);
SetMainCallback2(callback);
if (callback == CB2_ReturnToField)
{
gTextFlags.autoScroll = 1;
PlayNewMapMusic(MUS_POKECEN);
SetMainCallback1(CB1_Overworld);
}
return 0;
}
void sub_8020C70(MainCallback callback)
{
u8 playerCount = 0;
u8 multiplayerId;
if (!gReceivedRemoteLinkPlayers || gWirelessCommType == 0)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
playerCount = GetLinkPlayerCount();
multiplayerId = GetMultiplayerId();
if (playerCount < 2 || multiplayerId >= playerCount)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
gUnknown_02022C90 = AllocZeroed(sizeof(*gUnknown_02022C90));
if (!gUnknown_02022C90)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
gUnknown_02022C90->unk0 = callback;
gUnknown_02022C90->unk8 = multiplayerId;
gUnknown_02022C90->unk9 = playerCount;
sub_8020FC4(gUnknown_02022C90);
gUnknown_02022C90->unk12 = 1;
gUnknown_02022C90->unkE = 1;
gUnknown_02022C90->unkF = 6;
sub_8024604(gUnknown_02022C90->unk36, 1, -1, 0, 16, 0, 0);
sub_8022BEC(4, 1, gUnknown_02022C90->unk36);
SetMainCallback2(sub_8020F88);
gUnknown_02022C90->unkA = CreateTask(sub_8020FA0, 8);
gTextFlags.autoScroll = 0;
}
static void sub_8020D8C(void)
{
if (gSpecialVar_ItemId < FIRST_BERRY_INDEX || gSpecialVar_ItemId > LAST_BERRY_INDEX + 1)
gSpecialVar_ItemId = ITEM_CHERI_BERRY;
else
RemoveBagItem(gSpecialVar_ItemId, 1);
gUnknown_02022C90->unk84.separate.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX;
gUnknown_02022C90->unkE = 1;
gUnknown_02022C90->unkF = 9;
sub_8024604(gUnknown_02022C90->unk36, 0, -1, 0, 16, 0, 0);
sub_8022BEC(4, 1, gUnknown_02022C90->unk36);
gUnknown_02022C90->unkA = CreateTask(sub_8020FA0, 8);
SetMainCallback2(sub_8020F88);
}
void sub_8020E1C(void)
{
DestroyTask(gUnknown_02022C90->unkA);
sub_81AABF0(sub_8020D8C);
}
static void sub_8020E3C(void)
{
SetVBlankCallback(sub_8020F74);
}
void sub_8020E4C(void)
{
SetVBlankCallback(NULL);
}
void sub_8020E58(void)
{
u32 var0, var1;
var0 = gUnknown_02022C90->unk6C;
var0 <<= 8;
var0 = sub_81515FC(var0, 60 << 8);
var1 = gUnknown_02022C90->unk72;
var1 <<= 8;
var1 = sub_81515FC(var1, var0) & 0xFFFF;
gUnknown_02022C90->unk16 = var1;
switch (gUnknown_02022C90->unk9)
{
case 2:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[0])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[0] = gUnknown_02022C90->unk16;
}
break;
case 3:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[1])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[1] = gUnknown_02022C90->unk16;
}
break;
case 4:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[2])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[2] = gUnknown_02022C90->unk16;
}
break;
case 5:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[3])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[3] = gUnknown_02022C90->unk16;
}
break;
}
gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68;
if (GiveBerryPowder(gUnknown_02022C90->unk1C))
return;
gUnknown_02022C90->unk25_0 = 1;
}
static void sub_8020F74(void)
{
TransferPlttBuffer();
LoadOam();
ProcessSpriteCopyRequests();
}
static void sub_8020F88(void)
{
RunTasks();
RunTextPrinters();
AnimateSprites();
BuildOamBuffer();
}
static void sub_8020FA0(u8 taskId)
{
if (gUnknown_02022C90->unk4)
gUnknown_02022C90->unk4(gUnknown_02022C90, gUnknown_02022C90->unk36);
sub_8021450(gUnknown_02022C90);
}
#ifdef NONMATCHING
void sub_8020FC4(struct BerryCrushGame *arg0)
{
u8 i;
for (i = 0; i < arg0->unk9; i++)
StringCopy(arg0->unk84.players[i].unk14, gLinkPlayers[i].name);
for (; i < 5; i++)
{
memset(arg0->unk84.players[i].unk14, 1, PLAYER_NAME_LENGTH);
arg0->unk84.players[i].unk14[PLAYER_NAME_LENGTH] = EOS;
}
switch (gSaveBlock2Ptr->optionsTextSpeed)
{
case OPTIONS_TEXT_SPEED_SLOW:
arg0->unkB = 8;
break;
case OPTIONS_TEXT_SPEED_MID:
arg0->unkB = 4;
break;
case OPTIONS_TEXT_SPEED_FAST:
arg0->unkB = 1;
break;
}
}
#else
NAKED
void sub_8020FC4(struct BerryCrushGame *arg0)
{
asm_unified("\n\
push {r4-r6,lr}\n\
adds r6, r0, 0\n\
movs r5, 0\n\
b _08020FE6\n\
LOOP_1:\n\
lsls r0, r5, 5\n\
adds r0, 0x98\n\
adds r0, r6, r0\n\
lsls r1, r5, 3\n\
subs r1, r5\n\
lsls r1, 2\n\
ldr r2, =gLinkPlayers + 8\n\
adds r1, r2\n\
bl StringCopy\n\
adds r0, r5, 0x1\n\
lsls r0, 24\n\
lsrs r5, r0, 24\n\
_08020FE6:\n\
ldrb r0, [r6, 0x9]\n\
cmp r5, r0\n\
bcc LOOP_1\n\
cmp r5, 0x4\n\
bhi _08021012\n\
_08020FF0:\n\
lsls r4, r5, 5\n\
adds r0, r4, 0\n\
adds r0, 0x98\n\
adds r0, r6, r0\n\
movs r1, 0x1\n\
movs r2, 0x7\n\
bl memset\n\
adds r4, r6, r4\n\
adds r4, 0x9F\n\
movs r0, 0xFF\n\
strb r0, [r4]\n\
adds r0, r5, 0x1\n\
lsls r0, 24\n\
lsrs r5, r0, 24\n\
cmp r5, 0x4\n\
bls _08020FF0\n\
_08021012:\n\
ldr r0, =gSaveBlock2Ptr\n\
ldr r0, [r0]\n\
ldrb r0, [r0, 0x14]\n\
lsls r0, 29\n\
lsrs r0, 29\n\
cmp r0, 0x1\n\
beq _0802103E\n\
cmp r0, 0x1\n\
bgt _08021034\n\
cmp r0, 0\n\
beq _0802103A\n\
b _08021046\n\
.pool\n\
_08021034:\n\
cmp r0, 0x2\n\
beq _08021042\n\
b _08021046\n\
_0802103A:\n\
movs r0, 0x8\n\
b _08021044\n\
_0802103E:\n\
movs r0, 0x4\n\
b _08021044\n\
_08021042:\n\
movs r0, 0x1\n\
_08021044:\n\
strb r0, [r6, 0xB]\n\
_08021046:\n\
pop {r4-r6}\n\
pop {r0}\n\
bx r0");
}
#endif // NONMATCHING
int sub_802104C(void)
{
struct BerryCrushGame *var0 = sub_8020C00();
if (!var0)
return -1;
switch (var0->unkC)
{
case 0:
SetVBlankCallback(NULL);
SetHBlankCallback(NULL);
SetGpuReg(REG_OFFSET_DISPCNT, 0);
ScanlineEffect_Stop();
reset_temp_tile_data_buffers();
break;
case 1:
CpuFill16(0, (void *)OAM, OAM_SIZE);
gReservedSpritePaletteCount = 0;
sub_8034C54(3);
break;
case 2:
ResetPaletteFade();
ResetSpriteData();
FreeAllSpritePalettes();
break;
case 3:
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, gUnknown_082F32C8, ARRAY_COUNT(gUnknown_082F32C8));
SetBgTilemapBuffer(1, var0->unk1C0);
SetBgTilemapBuffer(2, var0->unk21C0);
SetBgTilemapBuffer(3, var0->unk31C0);
ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0);
ChangeBgX(2, 0, 0);
ChangeBgY(2, 0, 0);
ChangeBgX(3, 0, 0);
ChangeBgY(3, 0, 0);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
break;
case 4:
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 64);
FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 32, 32);
break;
case 5:
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
decompress_and_copy_tile_data_to_vram(1, gUnknown_08DE34B8, 0, 0, 0);
break;
case 6:
if (free_temp_tile_data_buffers_if_possible())
return 0;
InitStandardTextBoxWindows();
sub_8197200();
sub_8022588(var0);
sub_8022600(var0);
gPaletteFade.bufferTransferDisabled = 1;
break;
case 7:
LoadPalette(gUnknown_08DE3398, 0, 0x180);
CopyToBgTilemapBuffer(1, gBerryCrushGrinderTopTilemap, 0, 0);
CopyToBgTilemapBuffer(2, gBerryCrushContainerCapTilemap, 0, 0);
CopyToBgTilemapBuffer(3, gBerryCrushBackgroundTilemap, 0, 0);
sub_80226D0(var0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
break;
case 8:
sub_800E0E8();
CreateWirelessStatusIndicatorSprite(0, 0);
sub_8022730(var0);
SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY);
ChangeBgX(1, 0, 0);
ChangeBgY(1, 0, 0);
break;
case 9:
gPaletteFade.bufferTransferDisabled = 0;
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
ShowBg(0);
ShowBg(1);
ShowBg(2);
ShowBg(3);
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
sub_8020E3C();
var0->unkC = 0;
return 1;
}
var0->unkC++;
return 0;
}
int sub_802130C(void)
{
struct BerryCrushGame *var0 = sub_8020C00();
if (!var0)
return -1;
switch (var0->unkC)
{
case 0:
sub_8010434();
break;
case 1:
if (!IsLinkTaskFinished())
return 0;
// fall through. The original author forgot to use "break" here
// because this will call BeginNormalPaletteFade() twice.
case 2:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
UpdatePaletteFade();
break;
case 3:
if (UpdatePaletteFade())
return 0;
break;
case 4:
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 32, 32);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
break;
case 5:
FreeAllWindowBuffers();
HideBg(0);
UnsetBgTilemapBuffer(0);
HideBg(1);
UnsetBgTilemapBuffer(1);
HideBg(2);
UnsetBgTilemapBuffer(2);
HideBg(3);
UnsetBgTilemapBuffer(3);
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
break;
case 6:
sub_800E084();
sub_8022960(var0);
sub_8034CC8();
break;
case 7:
var0->unkC = 0;
return 1;
}
var0->unkC++;
return 0;
}
static int sub_8021450(struct BerryCrushGame *arg0)
{
gSpriteCoordOffsetY = arg0->unk2A + arg0->unk2C;
SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY);
if (arg0->unk12 == 7)
{
sub_8022524(&arg0->unk138, arg0->unk28);
}
return 0;
}
void sub_8021488(struct BerryCrushGame *arg0)
{
arg0->unk2A = -104;
arg0->unk2C = 0;
gSpriteCoordOffsetX = 0;
gSpriteCoordOffsetY = -104;
}
void sub_80214A8(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
{
u8 i;
u8 spriteId;
s16 var0, var1;
s16 *data;
int var3;
s16 var5;
u32 var6;
for (i = 0; i < arg0->unk9; i++)
{
spriteId = AddCustomItemIconSprite(
&gUnknown_082F436C,
gUnknown_082F41E8[i],
gUnknown_082F41E8[i],
arg0->unk84.separate.others[i].unk0 + 133);
arg1->unk38[i] = &gSprites[spriteId];
arg1->unk38[i]->oam.priority = 3;
arg1->unk38[i]->affineAnimPaused = 1;
arg1->unk38[i]->pos1.x = arg1->unkC[i]->unk8 + 120;
arg1->unk38[i]->pos1.y = -16;
data = arg1->unk38[i]->data;
var5 = 512;
data[1] = var5;
data[2] = 32;
data[7] = 112;
var0 = arg1->unkC[i]->unkA - arg1->unkC[i]->unk8;
var3 = var0;
if (var0 < 0)
var3 += 3;
data[6] = var3 >> 2;
var0 *= 128;
var6 = var5 + 32;
var6 = var6 / 2;
var1 = sub_81515D4(7, 0x3F80, var6);
data[0] = (u16)arg1->unk38[i]->pos1.x * 128;
data[3] = sub_81515D4(7, var0, var1);
var1 = sub_8151550(7, var1, 85);
data[4] = 0;
data[5] = sub_81515D4(7, 0x3F80, var1);
data[7] |= 0x8000;
if (arg1->unkC[i]->unk8 < 0)
StartSpriteAffineAnim(arg1->unk38[i], 1);
}
}
void sub_8021608(struct Sprite *sprite)
{
s16 *data = sprite->data;
data[1] += data[2];
sprite->pos2.y += data[1] >> 8;
if (data[7] & 0x8000)
{
sprite->data[0] += data[3];
data[4] += data[5];
sprite->pos2.x = Sin(data[4] >> 7, data[6]);
if ((data[7] & 0x8000) && (data[4] >> 7) > 126)
{
sprite->pos2.x = 0;
data[7] &= 0x7FFF;
}
}
sprite->pos1.x = data[0] >> 7;
if (sprite->pos1.y + sprite->pos2.y >= (data[7] & 0x7FFF))
{
sprite->callback = SpriteCallbackDummy;
FreeSpriteOamMatrix(sprite);
DestroySprite(sprite);
}
}
void sub_80216A8(struct BerryCrushGame *arg0)
{
u8 i;
for (i = 0; i < arg0->unk9; i++)
{
FreeSpritePaletteByTag(gUnknown_082F41E8[i]);
FreeSpriteTilesByTag(gUnknown_082F41E8[i]);
}
}
// void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
// {
// u8 sp4;
// struct BerryCrushGame_4E *var4E;
// u8 i;
// u16 var0;
// sp4 = 0;
// var4E = &arg0->unk40.unkE;
// for (i = 0; i < arg0->unk9; i++)
// {
// var0 = var4E->unkA >> (i * 3);
// var0 &= 7;
// if (var0)
// {
// int offset;
// sp4++;
// if (var0 & 0x4)
// StartSpriteAnim(arg1->unk24[i], 1);
// else
// StartSpriteAnim(arg1->unk24[i], 0);
// arg1->unk24[i]->invisible = 0;
// arg1->unk24[i]->animPaused = 0;
// offset = (var0 % 4) - 1;
// arg1->unk24[i]->pos2.x = gUnknown_082F41CC[offset][0];
// arg1->unk24[i]->pos2.y = gUnknown_082F41CC[offset][1];
// }
// }
// if (sp4 == 0)
// {
// arg0->unk25_2 = 0;
// }
// else
// {
// u8 var3 = arg0->unk28 % 3;
// u16 var2 = var3;
// for (i = 0; i < var4E->unkC * 2 + 3; i++)
// {
// if (arg1->unk4C[i]->invisible)
// {
// arg1->unk4C[i]->callback = sub_8022B28;
// arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120;
// arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + (136 - var2 * 4);
// arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] / (var3 * 4);
// arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1];
// if (var4E->unk4 & 0x2)
// StartSpriteAnim(arg1->unk4C[i], 1);
// else
// StartSpriteAnim(arg1->unk4C[i], 0);
// var2++;
// if (var2 > 3)
// var2 = 0;
// }
// }
// if (arg0->unk25_2)
// {
// arg0->unk25_2 = 0;
// }
// else
// {
// if (sp4 == 1)
// PlaySE(SE_TOY_DANGO);
// else
// PlaySE(SE_TOY_KABE);
// arg0->unk25_2 = 1;
// }
// }
// }

View File

@ -17,7 +17,8 @@
#include "menu.h" #include "menu.h"
#include "overworld.h" #include "overworld.h"
#include "palette.h" #include "palette.h"
#include "rom_8011DC0.h" #include "union_room.h"
#include "mevent2.h"
#include "script.h" #include "script.h"
#include "script_pokemon_util_80F87D8.h" #include "script_pokemon_util_80F87D8.h"
#include "sound.h" #include "sound.h"

View File

@ -4,7 +4,7 @@
#include "ereader_helpers.h" #include "ereader_helpers.h"
#include "link.h" #include "link.h"
#include "main.h" #include "main.h"
#include "rom_8011DC0.h" #include "union_room.h"
#include "save.h" #include "save.h"
#include "sprite.h" #include "sprite.h"
#include "task.h" #include "task.h"

View File

@ -4,7 +4,7 @@
#include "ereader_helpers.h" #include "ereader_helpers.h"
#include "link.h" #include "link.h"
#include "main.h" #include "main.h"
#include "rom_8011DC0.h" #include "union_room.h"
#include "save.h" #include "save.h"
#include "sound.h" #include "sound.h"
#include "sprite.h" #include "sprite.h"

View File

@ -122,7 +122,7 @@ u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId)
} }
} }
u8 AddCustomItemIconSprite(struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId) u8 AddCustomItemIconSprite(const struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId)
{ {
if (!AllocItemIconTemporaryBuffers()) if (!AllocItemIconTemporaryBuffers())
{ {

View File

@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "item_use.h" #include "item_use.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_pyramid.h" #include "battle_pyramid.h"
#include "battle_pyramid_bag.h" #include "battle_pyramid_bag.h"
#include "berry.h" #include "berry.h"

View File

@ -11,13 +11,13 @@
#include "overworld.h" #include "overworld.h"
#include "random.h" #include "random.h"
#include "palette.h" #include "palette.h"
#include "rom_8011DC0.h" #include "union_room.h"
#include "string_util.h" #include "string_util.h"
#include "task.h" #include "task.h"
#include "text.h" #include "text.h"
#include "constants/species.h" #include "constants/species.h"
#include "save.h" #include "save.h"
#include "rom_8011DC0.h" #include "mystery_gift.h"
extern u16 gHeldKeyCodeToSend; extern u16 gHeldKeyCodeToSend;
@ -310,10 +310,22 @@ const char gUnknown_082ED7EC[] = "PokemonSioInfo";
const char gUnknown_082ED7FC[] = "LINK LOSS DISCONNECT!"; const char gUnknown_082ED7FC[] = "LINK LOSS DISCONNECT!";
const char gUnknown_082ED814[] = "LINK LOSS RECOVERY NOW"; const char gUnknown_082ED814[] = "LINK LOSS RECOVERY NOW";
extern const char gUnknown_082ED82C[]; ALIGNED(4) const char gUnknown_082ED82C[31] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',0x00};
extern const char gUnknown_082ED84B[]; const char gUnknown_082ED84B[16] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',0x00};
extern const char gUnknown_082ED85B[]; const char gUnknown_082ED85B[9] = {' ',' ',' ',' ',' ',' ',' ',' ',0x00};
extern const char gUnknown_082ED868[]; ALIGNED(4) const char gUnknown_082ED864[2] = {' ',0x00};
const char gUnknown_082ED866[2] = {'*',0x00};
const char gUnknown_082ED868[8] = "NOWSLOT";
const char gUnknown_082ED870[12] = " ";
const char gUnknown_082ED87C[12] = "CLOCK DRIFT";
const char gUnknown_082ED888[12] = "BUSY SEND ";
const char gUnknown_082ED894[12] = "CMD REJECT ";
const char gUnknown_082ED8A0[12] = "CLOCK SLAVE";
const char gUnknown_082ED8A8[3][8] = {
"CHILD ",
"PARENT",
"SEARCH"
};
// .text // .text

View File

@ -312,7 +312,7 @@ static void ListMenuDummyTask(u8 taskId)
} }
s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum) s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum)
{ {
switch (sMysteryGiftLinkMenu.state) switch (sMysteryGiftLinkMenu.state)
{ {

View File

@ -2,7 +2,10 @@
#include "alloc.h" #include "alloc.h"
#include "battle_main.h" #include "battle_main.h"
#include "contest_effect.h" #include "contest_effect.h"
#include "data2.h"
#include "decompress.h"
#include "gpu_regs.h" #include "gpu_regs.h"
#include "graphics.h"
#include "menu.h" #include "menu.h"
#include "international_string_util.h" #include "international_string_util.h"
#include "menu.h" #include "menu.h"
@ -11,16 +14,21 @@
#include "palette.h" #include "palette.h"
#include "player_pc.h" #include "player_pc.h"
#include "pokemon_summary_screen.h" #include "pokemon_summary_screen.h"
#include "pokemon_storage_system.h"
#include "scanline_effect.h" #include "scanline_effect.h"
#include "sound.h" #include "sound.h"
#include "strings.h" #include "strings.h"
#include "string_util.h" #include "string_util.h"
#include "text.h"
#include "text_window.h" #include "text_window.h"
#include "trig.h" #include "trig.h"
#include "window.h" #include "window.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "constants/species.h"
#include "gba/io_reg.h" #include "gba/io_reg.h"
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
EWRAM_DATA static u8 sUnknown_0203CF48[3] = {0}; EWRAM_DATA static u8 sUnknown_0203CF48[3] = {0};
EWRAM_DATA static struct ListMenuItem *sUnknown_0203CF4C = NULL; EWRAM_DATA static struct ListMenuItem *sUnknown_0203CF4C = NULL;
@ -29,6 +37,9 @@ static void sub_81D24A4(struct UnknownStruct_81D1ED4 *a0);
static void sub_81D2634(struct UnknownStruct_81D1ED4 *a0); static void sub_81D2634(struct UnknownStruct_81D1ED4 *a0);
static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list); static void MoveRelearnerCursorCallback(s32 itemIndex, bool8 onInit, struct ListMenu *list);
static void nullsub_79(void); static void nullsub_79(void);
static void sub_81D3408(struct Sprite *sprite);
/*static*/ void sub_81D3564(struct Sprite *sprite);
static void sub_81D35E8(struct Sprite *sprite);
static const struct WindowTemplate sUnknown_086253E8[] = static const struct WindowTemplate sUnknown_086253E8[] =
{ {
@ -1075,3 +1086,556 @@ void MoveRelearnerCreateYesNoMenu(void)
{ {
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, 1, 0xE, 0); CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, 1, 0xE, 0);
} }
s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst)
{
s32 ret;
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
{
if (request == MON_DATA_NICKNAME || request == MON_DATA_OT_NAME)
ret = GetMonData(&gPlayerParty[monId], request, dst);
else
ret = GetMonData(&gPlayerParty[monId], request);
}
else
{
if (request == MON_DATA_NICKNAME || request == MON_DATA_OT_NAME)
ret = GetAndCopyBoxMonDataAt(boxId, monId, request, dst);
else
ret = GetBoxMonDataAt(boxId, monId, request);
}
return ret;
}
static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId)
{
u16 species, level, gender;
struct BoxPokemon *boxMon;
u8 *str;
*(dst++) = EXT_CTRL_CODE_BEGIN;
*(dst++) = 4;
*(dst++) = 8;
*(dst++) = 0;
*(dst++) = 9;
if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL))
{
return StringCopyPadded(dst, gText_EggNickname, 0, 12);
}
else
{
GetBoxOrPartyMonData(boxId, monId, MON_DATA_NICKNAME, dst);
StringGetEnd10(dst);
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES, NULL);
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
{
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
gender = GetMonGender(&gPlayerParty[monId]);
}
else
{
// Needed to match, feel free to remove.
boxId++;boxId--;
monId++;monId--;
boxMon = GetBoxedMonPtr(boxId, monId);
gender = GetBoxMonGender(boxMon);
level = GetLevelFromBoxMonExp(boxMon);
}
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(dst, gSpeciesNames[species]))
gender = MON_GENDERLESS;
for (str = dst; *str != EOS; str++)
;
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = 0x12;
*(str++) = 0x3C;
switch (gender)
{
default:
*(str++) = CHAR_SPACE;
break;
case MON_MALE:
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = EXT_CTRL_CODE_COLOR;
*(str++) = 4;
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = 3;
*(str++) = 5;
*(str++) = CHAR_MALE;
break;
case MON_FEMALE:
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = EXT_CTRL_CODE_COLOR;
*(str++) = 6;
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = 3;
*(str++) = 7;
*(str++) = CHAR_FEMALE;
break;
}
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = 4;
*(str++) = 8;
*(str++) = 0;
*(str++) = 9;
*(str++) = CHAR_SLASH;
*(str++) = CHAR_SPECIAL_F9;
*(str++) = 5;
str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3);
*(str++) = CHAR_SPACE;
*str = EOS;
return str;
}
}
static u8 *sub_81D2E7C(u8 *dst, const u8 *src, s16 n)
{
while (*src != EOS)
{
*(dst++) = *(src++);
n--;
}
while (n-- > 0)
*(dst++) = CHAR_SPACE;
*dst = EOS;
return dst;
}
void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7)
{
u16 i;
if (!arg7)
arg6--;
if (arg5 != arg6)
{
sub_81D2CD0(nameDst, boxId, monId);
dst[0] = EXT_CTRL_CODE_BEGIN;
dst[1] = 4;
dst[2] = 8;
dst[3] = 0;
dst[4] = 9;
if (boxId == TOTAL_BOXES_COUNT) // Party mon.
{
sub_81D2E7C(dst + 5, gText_InParty, 8);
}
else
{
boxId++;boxId--; // Again...Someone fix this maybe?
sub_81D2E7C(dst + 5, GetBoxNamePtr(boxId), 8);
}
}
else
{
for (i = 0; i < 12; i++)
nameDst[i] = CHAR_SPACE;
nameDst[i] = EOS;
for (i = 0; i < 8; i++)
dst[i] = CHAR_SPACE;
dst[i] = EOS;
}
}
void sub_81D2F78(struct UnknownStruct_81D1ED4 *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8)
{
u16 i;
if (!arg8)
arg7--;
if (arg5 != arg7)
{
arg0->unk0[id][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
arg0->unk0[id][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
arg0->unk0[id][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
arg0->unk0[id][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
arg0->unk0[id][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
sheen[id] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 0xFF)
? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u
: 9;
sub_81D2754(arg0->unk0[id], arg0->unk14[id]);
}
else
{
for (i = 0; i < 5; i++)
{
arg0->unk0[id][i] = 0;
arg0->unk14[id][i].unk0 = 155;
arg0->unk14[id][i].unk2 = 91;
}
}
}
void sub_81D3094(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7)
{
if (!arg7)
arg6--;
if (arg5 != arg6)
{
u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
LoadSpecialPokePic(&gMonFrontPicTable[species], tilesDst, species, personality, TRUE);
LZ77UnCompWram(GetFrontSpritePalFromSpeciesAndPersonality(species, trainerId, personality), palDst);
}
}
bool8 sub_81D312C(s16 *var)
{
*var += 24;
if (*var > 0)
*var = 0;
return (*var != 0);
}
bool8 sub_81D3150(s16 *var)
{
*var -= 24;
if (*var < -80)
*var = -80;
return (*var != -80);
}
bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1)
{
bool8 var1 = sub_81D2074(arg0);
bool8 var2 = sub_81D312C(arg1);
return ((var1 != 0) || (var2 != 0));
}
bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1)
{
bool8 var1 = sub_81D2074(arg0);
bool8 var2 = sub_81D3150(arg1);
return ((var1 != 0) || (var2 != 0));
}
static const u32 gUnknown_08625560[] = INCBIN_U32("graphics/pokenav/pokeball.4bpp");
static const u32 gUnknown_08625660[] = INCBIN_U32("graphics/pokenav/pokeball_placeholder.4bpp");
static const u16 gUnknown_08625680[] = INCBIN_U16("graphics/pokenav/sparkle.gbapal");
static const u32 gUnknown_086256A0[] = INCBIN_U32("graphics/pokenav/sparkle.4bpp");
static const struct OamData sOamData_8625A20 =
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.x = 0,
.matrixNum = 0,
.size = 3,
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0
};
static const struct OamData sOamData_8625A28 =
{
.y = 0,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.x = 0,
.matrixNum = 0,
.size = 1,
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
.affineParam = 0
};
static const union AnimCmd sSpriteAnim_8625A30[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_8625A38[] =
{
ANIMCMD_FRAME(4, 5),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteAnimTable_8625A40[] =
{
sSpriteAnim_8625A30,
sSpriteAnim_8625A38
};
void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal)
{
struct SpriteSheet dataSheet = {NULL, 0x800, 100};
struct SpriteTemplate dataTemplate =
{
.tileTag = 100,
.paletteTag = 100,
.oam = &sOamData_8625A20,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy,
};
struct SpritePalette dataPal = {NULL, 100};
*sheet = dataSheet;
*template = dataTemplate;
*pal = dataPal;
}
void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals)
{
u8 i;
struct SpriteSheet dataSheets[] =
{
{gUnknown_08625560, 0x100, 101},
{gUnknown_08625660, 0x20, 103},
{gPokenavConditionCancel_Gfx, 0x100, 102},
{},
};
struct SpritePalette dataPals[] =
{
{gPokenavConditionCancel_Pal, 101},
{gPokenavConditionCancel_Pal + 16, 102},
{},
};
struct SpriteTemplate dataTemplate =
{
.tileTag = 101,
.paletteTag = 101,
.oam = &sOamData_8625A28,
.anims = sSpriteAnimTable_8625A40,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy,
};
for (i = 0; i < ARRAY_COUNT(dataSheets); i++)
*(sheets++) = dataSheets[i];
*template = dataTemplate;
for (i = 0; i < ARRAY_COUNT(dataPals); i++)
*(pals++) = dataPals[i];
}
void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal)
{
struct SpriteSheet dataSheet = {gUnknown_086256A0, 0x380, 104};
struct SpritePalette dataPal = {gUnknown_08625680, 104};
*sheet = dataSheet;
*pal = dataPal;
}
static void sub_81D32D4(struct Sprite *sprite)
{
if (++sprite->data[1] > 60)
{
sprite->data[1] = 0;
sub_81D3408(sprite);
}
}
static void sub_81D32F4(struct Sprite *sprite)
{
if (sprite->animEnded)
{
sprite->data[1] = 0;
sprite->callback = sub_81D32D4;
}
}
// Todo: Move these variables to C.
extern const s16 gUnknown_08625B2C[][2];
extern const struct SpriteTemplate gUnknown_08625B14;
void sub_81D3314(struct Sprite *sprite)
{
struct Sprite *sprite2 = &gSprites[sprite->data[4]];
if (sprite2 != NULL)
{
sprite->pos1.x = sprite2->pos1.x + sprite2->pos2.x + gUnknown_08625B2C[sprite->data[0]][0];
sprite->pos1.y = sprite2->pos1.y + sprite2->pos2.y + gUnknown_08625B2C[sprite->data[0]][1];
}
else
{
sprite->pos1.x = gUnknown_08625B2C[sprite->data[0]][0] + 40;
sprite->pos1.y = gUnknown_08625B2C[sprite->data[0]][1] + 104;
}
}
void sub_81D338C(u8 arg0, u8 arg1, struct Sprite **sprites)
{
u16 i;
for (i = 0; i < 10; i++)
{
if (sprites[i] != NULL)
{
sprites[i]->data[0] = i;
sprites[i]->data[1] = (i * 16) + 1;
sprites[i]->data[2] = arg0;
sprites[i]->data[3] = i;
if (arg1 == 0 || arg0 != 9)
{
sprites[i]->callback = sub_81D3564;
}
else
{
sub_81D3314(sprites[i]);
sub_81D35E8(sprites[i]);
sprites[i]->callback = sub_81D32F4;
sprites[i]->invisible = FALSE;
}
}
}
}
static void sub_81D3408(struct Sprite *sprite)
{
u16 i;
u8 id = sprite->data[5];
for (i = 0; i < sprite->data[2] + 1; i++)
{
gSprites[id].data[1] = (gSprites[id].data[0] * 16) + 1;
gSprites[id].callback = sub_81D3564;
id = gSprites[id].data[5];
}
}
void sub_81D3464(struct Sprite **sprites)
{
u8 i;
for (i = 0; i < 10; i++)
sprites[i] = NULL;
}
void sub_81D3480(struct Sprite **sprites, u8 arg1, u8 arg2)
{
u16 i, spriteId, firstSpriteId = 0;
u8 count = arg2;
for (i = 0; i < count + 1; i++)
{
spriteId = CreateSprite(&gUnknown_08625B14, 0, 0, 0);
if (spriteId != MAX_SPRITES)
{
sprites[i] = &gSprites[spriteId];
sprites[i]->invisible = TRUE;
sprites[i]->data[4] = arg1;
if (i != 0)
sprites[i - 1]->data[5] = spriteId;
else
firstSpriteId = spriteId;
}
else
{
break;
}
}
sprites[count]->data[5] = firstSpriteId;
sub_81D338C(count, 1, sprites);
}
void sub_81D3520(struct Sprite **sprites)
{
u16 i;
for (i = 0; i < 10; i++)
{
if (sprites[i] != NULL)
{
DestroySprite(sprites[i]);
sprites[i] = NULL;
}
else
{
break;
}
}
}
void sub_81D354C(struct Sprite **sprites)
{
sub_81D3520(sprites);
FreeSpriteTilesByTag(104);
FreeSpritePaletteByTag(104);
}
/*static*/ void sub_81D3564(struct Sprite *sprite)
{
if (sprite->data[1] != 0)
{
if (--sprite->data[1] != 0)
return;
SeekSpriteAnim(sprite, 0);
sprite->invisible = FALSE;
}
sub_81D3314(sprite);
if (sprite->animEnded)
{
sprite->invisible = TRUE;
if (sprite->data[3] == sprite->data[2])
{
if (sprite->data[3] == 9)
{
sub_81D35E8(sprite);
sprite->callback = sub_81D32F4;
}
else
{
sprite->callback = sub_81D32D4;
}
}
else
{
sprite->callback = SpriteCallbackDummy;
}
}
}
static void sub_81D35E8(struct Sprite *sprite)
{
u8 i, id = sprite->data[5];
for (i = 0; i < sprite->data[2] + 1; i++)
{
SeekSpriteAnim(&gSprites[id], 0);
gSprites[id].invisible = FALSE;
id = gSprites[id].data[5];
}
}

View File

@ -13,6 +13,7 @@
#include "string_util.h" #include "string_util.h"
#include "link_rfu.h" #include "link_rfu.h"
#include "mevent.h" #include "mevent.h"
#include "mystery_gift.h"
struct UnkStruct_8467FB8 struct UnkStruct_8467FB8
{ {
@ -723,7 +724,7 @@ void sub_801CC80(void)
} }
} }
u8 sub_801CCD0(u16 input) u32 sub_801CCD0(u16 input)
{ {
if (gUnknown_02022C78->unk_01C2_0) if (gUnknown_02022C78->unk_01C2_0)
{ {

1692
src/mystery_gift.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,7 @@
#include "pokemon_summary_screen.h" #include "pokemon_summary_screen.h"
#include "region_map.h" #include "region_map.h"
#include "reshow_battle_screen.h" #include "reshow_battle_screen.h"
#include "rom_8011DC0.h" #include "union_room.h"
#include "scanline_effect.h" #include "scanline_effect.h"
#include "script.h" #include "script.h"
#include "sound.h" #include "sound.h"

View File

@ -2,6 +2,7 @@
#include "alloc.h" #include "alloc.h"
#include "apprentice.h" #include "apprentice.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h" #include "battle_controllers.h"
#include "battle_message.h" #include "battle_message.h"
#include "battle_pike.h" #include "battle_pike.h"

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "battle.h" #include "battle.h"
#include "battle_anim.h"
#include "recorded_battle.h" #include "recorded_battle.h"
#include "main.h" #include "main.h"
#include "pokemon.h" #include "pokemon.h"

View File

@ -44,6 +44,7 @@
#include "window.h" #include "window.h"
#include "constants/songs.h" #include "constants/songs.h"
#include "rom_8011DC0.h" #include "rom_8011DC0.h"
#include "union_room.h"
// Menu actions // Menu actions
enum enum

View File

@ -19,6 +19,8 @@
#include "load_save.h" #include "load_save.h"
#include "mail.h" #include "mail.h"
#include "main.h" #include "main.h"
#include "mevent2.h"
#include "mystery_gift.h"
#include "overworld.h" #include "overworld.h"
#include "palette.h" #include "palette.h"
#include "party_menu.h" #include "party_menu.h"
@ -39,6 +41,7 @@
#include "text_window.h" #include "text_window.h"
#include "trainer_card.h" #include "trainer_card.h"
#include "trade.h" #include "trade.h"
#include "union_room.h"
#include "util.h" #include "util.h"
#include "window.h" #include "window.h"
#include "constants/easy_chat.h" #include "constants/easy_chat.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
.include "save.o" .include "save.o"
.include "battle_tower.o" .include "battle_tower.o"
.include "intro.o" .include "intro.o"
.include "battle_anim_8170478.o" .include "battle_anim_special.o"
.include "battle_factory_screen.o" .include "battle_factory_screen.o"
.include "apprentice.o" .include "apprentice.o"

View File

@ -6,34 +6,10 @@
.include "src/string_util.o" .include "src/string_util.o"
.include "src/link.o" .include "src/link.o"
.include "src/link_rfu.o" .include "src/link_rfu.o"
.include "src/union_room.o"
.include "src/mystery_gift.o"
gUnknown_02022C20: @ 2022C20 .align 3
.space 0xC
gUnknown_02022C2C: @ 2022C2C
.space 0x1
gUnknown_02022C2D: @ 2022C2D
.space 0x3
gUnknown_02022C30: @ 2022C30
.space 0x8
gUnknown_02022C38: @ 2022C38
.space 0x4
gUnknown_02022C3C: @ 2022C3C
.space 0x2
gUnknown_02022C3E: @ 2022C3E
.space 0x2
gUnknown_02022C40: @ 2022C40
.space 0x18
gUnknown_02022C58: @ 2022C58
.space 0x8
gUnknown_02022C60: @ 2022C60 gUnknown_02022C60: @ 2022C60
.space 0x4 .space 0x4
@ -127,7 +103,7 @@ gUnknown_02022D00: @ 2022D00
.include "src/palette.o" .include "src/palette.o"
.include "src/sound.o" .include "src/sound.o"
.include "src/battle_anim.o" .include "src/battle_anim.o"
.include "src/battle_anim_80A5C6C.o" .include "src/battle_anim_mons.o"
.space 0xC .space 0xC
.include "src/field_weather.o" .include "src/field_weather.o"