Merge pull request #630 from PikalaxALT/dodrio_berry_picking

Dodrio berry picking
This commit is contained in:
huderlem 2019-05-12 07:09:16 -05:00 committed by GitHub
commit 08c8ca8287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 2402 additions and 4003 deletions

1
.gitignore vendored
View File

@ -27,5 +27,6 @@ Thumbs.db
build/
.DS_Store
*.ddump
.idea/
porymap.project.cfg
.vscode/

File diff suppressed because it is too large Load Diff

View File

@ -4,4 +4,4 @@ OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
diff baserom.dump pokeemerald.dump
diff -u baserom.dump pokeemerald.dump

View File

@ -39,36 +39,39 @@ gUnknown_082F449C:: @ 82F449C
.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x06, 0x07, 0x08
.byte 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
.byte 0x08, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05
.byte 0x06, 0x07, 0x08, 0x04, 0x05, 0x06, 0x00, 0x00
.byte 0x06, 0x07, 0x08
gUknnown_082F45AF::
.byte 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
.byte 0x04, 0x05, 0x05, 0x06, 0x03, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05
.byte 0x06, 0x06, 0x07, 0x02, 0x02, 0x03, 0x04, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x05
.byte 0x05, 0x06, 0x07, 0x07, 0x08, 0x01, 0x01, 0x02
.byte 0x03, 0x00, 0x00, 0x00, 0x04, 0x05, 0x06, 0x06
.byte 0x07, 0x08, 0x08, 0x09, 0x00, 0x00, 0x01, 0x02
.byte 0x02, 0x03, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x03, 0x04, 0x05, 0x05, 0x06, 0x03
.byte 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x04, 0x05, 0x06, 0x06, 0x07, 0x02, 0x02
.byte 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, 0x07, 0x08
.byte 0x01, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x04
.byte 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x00
.byte 0x00, 0x01, 0x02, 0x02, 0x03, 0x04, 0x01, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01
.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00
.byte 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01
.byte 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x00, 0x00
.byte 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x02
.byte 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x04
.byte 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09
.byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x09, 0x09
.byte 0x09, 0x09, 0x00, 0x00, 0x01, 0x01, 0x00, 0x09
.byte 0x09, 0x09, 0x09, 0x09, 0x02, 0x02, 0x00, 0x00
.byte 0x01, 0x01, 0x01, 0x09, 0x09, 0x09, 0x03, 0x03
.byte 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x09
.byte 0x03, 0x03, 0x04, 0x04, 0x00, 0x00, 0x01, 0x01
.byte 0x02, 0x02, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00
.byte 0x04, 0x06, 0x00, 0x00, 0x00, 0x03, 0x05, 0x07
.byte 0x00, 0x00, 0x02, 0x04, 0x06, 0x08, 0x00, 0x01
.byte 0x03, 0x05, 0x06, 0x09
.byte 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01
.byte 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02
.byte 0x03, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04
.byte 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x03
.byte 0x02, 0x03, 0x04, 0x03, 0x04, 0x00, 0x00, 0x00
.byte 0x00, 0x09, 0x09, 0x09, 0x09, 0x01, 0x01, 0x01
.byte 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x00
.byte 0x00, 0x01, 0x01, 0x00, 0x09, 0x09, 0x09, 0x09
.byte 0x09, 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x01
.byte 0x09, 0x09, 0x09, 0x03, 0x03, 0x00, 0x00, 0x01
.byte 0x01, 0x02, 0x02, 0x03, 0x09, 0x03, 0x03, 0x04
.byte 0x04, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03
.byte 0x05, 0x00, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00
.byte 0x00, 0x00, 0x03, 0x05, 0x07, 0x00, 0x00, 0x02
.byte 0x04, 0x06, 0x08, 0x00, 0x01, 0x03, 0x05, 0x06
.byte 0x09
.align 2
gUnknown_082F7DF0_UnrefDupe:: @ 82F4698

View File

@ -86,6 +86,11 @@
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
// Macros for checking the joypad
#define TEST_BUTTON(field, button) ({(field) & (button);})
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
#define S16TOPOSFLOAT(val) \
({ \
s16 v = (val); \

View File

@ -284,6 +284,8 @@ 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);
void sub_8011BA4(void);
void sub_8010198(void);
void sub_8011AC8(void);
void LinkRfu_FatalError(void);
bool32 sub_8011A9C(void);
void sub_80104B0(void);

6
include/pokemon_jump.h Executable file → Normal file
View File

@ -3,9 +3,9 @@
#include "main.h"
void sub_802EB24(u8, u8, u8, u8, u8);
bool32 sub_802EB84(void);
void sub_802A9A8(u16 monId, MainCallback callback);
bool32 sub_802C908(u16 species);
#endif // GUARD_POKEMON_JUMP_H
#endif //GUARD_POKEMON_JUMP_H

View File

@ -68,6 +68,7 @@ SECTIONS {
src/berry_crush.o(.text);
asm/berry_crush.o(.text);
src/berry_powder.o(.text);
src/dodrio_berry_picking.o(.text);
asm/dodrio_berry_picking.o(.text);
src/pokemon_jump.o(.text);
asm/pokemon_jump.o(.text);
@ -433,6 +434,7 @@ SECTIONS {
src/union_room_chat.o(.rodata);
data/berry_crush.o(.rodata);
data/berry_powder.o(.rodata);
src/dodrio_berry_picking.o(.rodata);
data/dodrio_berry_picking.o(.rodata);
src/pokemon_jump.o(.rodata);
data/pokemon_jump.o(.rodata);

2355
src/dodrio_berry_picking.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,6 @@ struct UnkStruct_2022C6C
};
IWRAM_DATA struct UnkStruct_3000DAC * gUnknown_03000DAC;
IWRAM_DATA bool32 gUnknown_03000DB0;
EWRAM_DATA struct UnkStruct_2022C6C * gUnknown_02022C6C = NULL;

View File

@ -9,6 +9,7 @@
.include "src/link_rfu.o"
.include "src/union_room.o"
.include "src/union_room_battle.o"
.include "src/dodrio_berry_picking.o"
.include "src/rtc.o"
.include "src/main_menu.o"
.include "src/rom_8034C54.o"

View File

@ -17,29 +17,7 @@
.include "src/union_room_chat.o"
.include "src/berry_crush.o"
.include "src/berry_powder.o"
.align 2
@ dodrio_berry_picking
gUnknown_02022C98: @ 2022C98
.space 0x4
gUnknown_02022C9C: @ 2022C9C
.space 0x14
gUnknown_02022CB0: @ 2022CB0
.space 0x8
gUnknown_02022CB8: @ 2022CB8
.space 0x2C
gUnknown_02022CE4: @ 2022CE4
.space 0x10
gUnknown_02022CF4: @ 2022CF4
.space 0x4
gUnknown_02022CF8: @ 2022CF8
.space 0x4
.include "src/dodrio_berry_picking.o"
@ pokemon_jump
gUnknown_02022CFC: @ 2022CFC