mirror of
https://github.com/pret/pokeruby.git
synced 2024-12-02 18:16:44 +00:00
Merge pull request #408 from DizzyEggg/decompile_pokeblock_feed
decompile pokeblock feed
This commit is contained in:
commit
2f6f980eca
1836
asm/pokeblock_feed.s
1836
asm/pokeblock_feed.s
File diff suppressed because it is too large
Load Diff
12
common_syms/pokeblock_feed.txt
Normal file
12
common_syms/pokeblock_feed.txt
Normal file
@ -0,0 +1,12 @@
|
||||
gPokeblockFeedPokeSprite
|
||||
gPokeblockFeedMonSpecies
|
||||
gPokeblockMonNotFlipped
|
||||
gPokeblockFeedMonSpriteID
|
||||
gPokeblockFeedMonNature
|
||||
gUnknown_03005F34
|
||||
gPokeblockFeedUnused0
|
||||
gUnknown_03005F3C
|
||||
gUnknown_03005F40
|
||||
gPokeblockFeedPokeSpriteCopy
|
||||
gUnknown_03005F94
|
||||
gUnknown_03005FA0
|
@ -1,133 +0,0 @@
|
||||
gNatureToMonPokeblockAnim:: @ 8411A10
|
||||
.byte 0, 0 @ HARDY
|
||||
.byte 3, 0 @ LONELY
|
||||
.byte 4, 1 @ BRAVE
|
||||
.byte 5, 0 @ ADAMANT
|
||||
.byte 10, 0 @ NAUGHTY
|
||||
.byte 13, 0 @ BOLD
|
||||
.byte 15, 0 @ DOCILE
|
||||
.byte 16, 2 @ RELAXED
|
||||
.byte 18, 0 @ IMPISH
|
||||
.byte 19, 0 @ LAX
|
||||
.byte 20, 0 @ TIMID
|
||||
.byte 25, 0 @ HASTY
|
||||
.byte 27, 3 @ SERIOUS
|
||||
.byte 28, 0 @ JOLLY
|
||||
.byte 29, 0 @ NAIVE
|
||||
.byte 33, 4 @ MODEST
|
||||
.byte 36, 0 @ MILD
|
||||
.byte 37, 0 @ QUIET
|
||||
.byte 39, 0 @ BASHFUL
|
||||
.byte 42, 0 @ RASH
|
||||
.byte 45, 0 @ CALM
|
||||
.byte 46, 5 @ GENTLE
|
||||
.byte 47, 6 @ SASSY
|
||||
.byte 48, 0 @ CAREFUL
|
||||
.byte 53, 0 @ QUIRKY
|
||||
|
||||
.align 1
|
||||
gMonPokeblockAnims:: @ 8411A42
|
||||
@ HARDY
|
||||
.2byte 0, 4, 0, 8, 24, 0, 0, 0, 12, 0
|
||||
.2byte 0, 4, 0, 16, 24, 0, 0, 0, 12, 0
|
||||
.2byte 0, 4, 0, 32, 32, 0, 0, 0, 16, 1
|
||||
|
||||
@ LONELY
|
||||
.2byte 0, 3, 6, 0, 48, 0, 0, 0, 24, 1
|
||||
|
||||
@ BRAVE
|
||||
.2byte 64, 16, -24, 0, 32, 0, 0, 0, 0, 1
|
||||
|
||||
@ ADAMANT
|
||||
.2byte 0, 4, 8, 0, 16, 0, -8, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 16, 0, 0, 0, 0, 0
|
||||
.2byte 0, 4, 8, 0, 16, 0, -8, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 16, 0, 0, 0, 0, 0
|
||||
.2byte 0, 4, -16, 0, 4, 0, 16, 0, 0, 1
|
||||
|
||||
@ NAUGHTY
|
||||
.2byte 0, 3, 6, 0, 12, 0, 0, 0, 6, 0
|
||||
.2byte 0, 3, -6, 0, 12, 0, 0, 0, 6, 0
|
||||
.2byte 0, 16, 16, 0, 45, 1, 0, 0, 0, 1
|
||||
|
||||
@ BOLD
|
||||
.2byte 0, 16, 0, 24, 32, 0, 0, 0, 16, 0
|
||||
.2byte 0, 16, 0, 23, 32, 0, 0, 0, 16, 1
|
||||
|
||||
@ DOCILE
|
||||
.2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 1
|
||||
|
||||
@ RELAXED
|
||||
.2byte 0, 2, 8, 0, 32, 0, 0, 0, 0, 0
|
||||
.2byte 0, 2, -8, 0, 32, 0, 0, 0, 0, 1
|
||||
|
||||
@ IMPISH
|
||||
.2byte 0, 32, 2, 1, 48, 1, 0, 0, 24, 1
|
||||
|
||||
@ LAX
|
||||
.2byte 0, 2, 16, 16, 128, 0, 0, 0, 0, 1
|
||||
|
||||
@ TIMID
|
||||
.2byte 0, 2, -8, 0, 48, 0, -24, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
|
||||
.2byte 64, 32, 2, 0, 36, 0, 0, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
|
||||
.2byte 0, 2, 8, 0, 48, 0, 24, 0, 0, 1
|
||||
|
||||
@ HASTY
|
||||
.2byte 64, 24, 16, 0, 32, 0, 0, 0, 0, 0
|
||||
.2byte 0, 28, 2, 1, 32, 1, 0, 0, 16, 1
|
||||
|
||||
@ SERIOUS
|
||||
.2byte 0, 0, 0, 0, 32, 0, 0, 0, 0, 1
|
||||
|
||||
@ JOLLY
|
||||
.2byte 64, 16, -16, 2, 48, 0, 0, 0, 32, 1
|
||||
|
||||
@ NAIVE
|
||||
.2byte 0, 12, -8, 4, 24, 0, 8, 0, 12, 0
|
||||
.2byte 0, 12, 8, 8, 24, 0, -16, 0, 12, 0
|
||||
.2byte 0, 12, -8, 16, 24, 0, 16, 0, 12, 0
|
||||
.2byte 0, 12, 8, 28, 24, 0, -8, 0, 12, 1
|
||||
|
||||
@ MODEST
|
||||
.2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 0
|
||||
.2byte 64, 16, -4, 0, 32, 0, 0, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 8, 0, 0, 0, 0, 1
|
||||
|
||||
@ MILD
|
||||
.2byte 128, 4, 0, 8, 64, 0, 0, 0, 0, 1
|
||||
|
||||
@ QUIET
|
||||
.2byte 0, 2, 16, 0, 48, 0, 0, 0, 0, 0
|
||||
.2byte 128, 2, 16, 0, 48, 0, 0, 0, 0, 1
|
||||
|
||||
@ BASHFUL
|
||||
.2byte 0, 2, -4, 0, 48, 0, -48, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 0
|
||||
.2byte 0, 2, 8, 0, 24, 0, 48, 0, 0, 1
|
||||
|
||||
@ RASH
|
||||
.2byte 64, 4, 64, 58, 52, 0, -88, 0, 0, 0
|
||||
.2byte 0, 0, 0, 0, 80, 0, 0, 0, 0, 0
|
||||
.2byte 0, 24, 80, 0, 32, 0, 88, 0, 0, 1
|
||||
|
||||
@ CALM
|
||||
.2byte 0, 2, 16, 4, 64, 0, 0, 0, 0, 1
|
||||
|
||||
@ GENTLE
|
||||
.2byte 0, 0, 0, 0, 32, 0, 0, 0, 0, 1
|
||||
|
||||
@ SASSY
|
||||
.2byte 0, 0, 0, 0, 42, 0, 0, 0, 0, 1
|
||||
|
||||
@ CAREFUL
|
||||
.2byte 0, 4, 0, 8, 24, 0, 0, 0, 12, 0
|
||||
.2byte 0, 0, 0, 0, 12, 0, 0, 0, 0, 0
|
||||
.2byte 0, 4, 0, 12, 24, 0, 0, 0, 12, 0
|
||||
.2byte 0, 0, 0, 0, 12, 0, 0, 0, 0, 0
|
||||
.2byte 0, 4, 0, 4, 24, 0, 0, 0, 12, 1
|
||||
|
||||
@ QUIRKY
|
||||
.2byte 0, 4, 16, 12, 64, 0, 0, 0, 0, 0
|
||||
.2byte 0, -4, 16, 12, 64, 0, 0, 0, 0, 1
|
@ -1,225 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
@ 8411A10
|
||||
.include "data/mon_pokeblock_anims.inc"
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411E90:: @ 8411E90
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411EA0:: @ 8411EA0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 12, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 30
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -12, 1
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411EC0:: @ 8411EC0
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 12, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 28
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -4, 3
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411EE8:: @ 8411EE8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 32
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411F08:: @ 8411F08
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 32
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 16
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411F30:: @ 8411F30
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411F50:: @ 8411F50
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411F78:: @ 8411F78
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 32
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411F98:: @ 8411F98
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 32
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 8
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411FC0:: @ 8411FC0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 4
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 24
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 4
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8411FE0:: @ 8411FE0
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -1, 4
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 24
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 4
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8412008:: @ 8412008
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 24
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -12, 2
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8412028:: @ 8412028
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 1, 24
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 16
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -12, 2
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_8412050:: @ 8412050
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411EA0
|
||||
.4byte gSpriteAffineAnim_8411EE8
|
||||
.4byte gSpriteAffineAnim_8411F30
|
||||
.4byte gSpriteAffineAnim_8411F78
|
||||
.4byte gSpriteAffineAnim_8411FC0
|
||||
.4byte gSpriteAffineAnim_8412008
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411EC0
|
||||
.4byte gSpriteAffineAnim_8411F08
|
||||
.4byte gSpriteAffineAnim_8411F50
|
||||
.4byte gSpriteAffineAnim_8411F98
|
||||
.4byte gSpriteAffineAnim_8411FE0
|
||||
.4byte gSpriteAffineAnim_8412028
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
.4byte gSpriteAffineAnim_8411E90
|
||||
|
||||
.align 2
|
||||
gUnknown_084120A4:: @ 84120A4
|
||||
.4byte gPokeblockRed_Pal
|
||||
.4byte gPokeblockBlue_Pal
|
||||
.4byte gPokeblockPink_Pal
|
||||
.4byte gPokeblockGreen_Pal
|
||||
.4byte gPokeblockYellow_Pal
|
||||
.4byte gPokeblockPurple_Pal
|
||||
.4byte gPokeblockIndigo_Pal
|
||||
.4byte gPokeblockBrown_Pal
|
||||
.4byte gPokeblockLiteBlue_Pal
|
||||
.4byte gPokeblockOlive_Pal
|
||||
.4byte gPokeblockGray_Pal
|
||||
.4byte gPokeblockBlack_Pal
|
||||
.4byte gPokeblockWhite_Pal
|
||||
.4byte gPokeblockGold_Pal
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_84120DC:: @ 84120DC
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_84120EC:: @ 84120EC
|
||||
.4byte gSpriteAffineAnim_84120DC
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_84120F0:: @ 84120F0
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 16, 1
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8412148:: @ 8412148
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 8, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, 0, 8
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
|
||||
obj_rot_scal_anim_frame 0x0, 0x0, -16, 1
|
||||
obj_rot_scal_anim_frame 0xFF00, 0x100, 0, 0
|
||||
obj_rot_scal_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_84121A0:: @ 84121A0
|
||||
.4byte gSpriteAffineAnim_84120DC
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_84121A4:: @ 84121A4
|
||||
.4byte gSpriteAffineAnim_84120F0
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_84121A8:: @ 84121A8
|
||||
.4byte gSpriteAffineAnim_8412148
|
||||
|
||||
.align 2
|
||||
gOamData_84121AC:: @ 84121AC
|
||||
.2byte 0x0300
|
||||
.2byte 0x0000
|
||||
.2byte 0x0400
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_84121B4:: @ 84121B4
|
||||
obj_image_anim_frame 0, 0
|
||||
obj_image_anim_end
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_84121BC:: @ 84121BC
|
||||
.4byte gSpriteAnim_84121B4
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_84121C0:: @ 84121C0
|
||||
obj_rot_scal_anim_frame 0x100, 0x100, 0, 0
|
||||
obj_rot_scal_anim_frame 0xFFF8, 0xFFF8, 0, 1
|
||||
obj_rot_scal_anim_jump 1
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_84121D8:: @ 84121D8
|
||||
.4byte gSpriteAffineAnim_84121C0
|
||||
|
||||
.align 2
|
||||
gUnknown_084121DC:: @ 84121DC
|
||||
obj_tiles gPokeblock_Gfx, 0x20, 14818
|
||||
|
||||
.align 2
|
||||
gSpriteTemplate_84121E4:: @ 84121E4
|
||||
spr_template 14818, 14818, gOamData_84121AC, gSpriteAnimTable_84121BC, NULL, gSpriteAffineAnimTable_84121D8, sub_81481B0
|
@ -1,7 +1,8 @@
|
||||
#ifndef GUARD_POKEBLOCK_H
|
||||
#define GUARD_POKEBLOCK_H
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PBLOCK_CLR_BLACK,
|
||||
PBLOCK_CLR_RED,
|
||||
PBLOCK_CLR_BLUE,
|
||||
@ -10,15 +11,32 @@ enum {
|
||||
PBLOCK_CLR_YELLOW
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PBLOCK_COLOR,
|
||||
PBLOCK_SPICY,
|
||||
PBLOCK_DRY,
|
||||
PBLOCK_SWEET,
|
||||
PBLOCK_BITTER,
|
||||
PBLOCK_SOUR,
|
||||
PBLOCK_FEEL,
|
||||
};
|
||||
|
||||
void sub_810B96C(void);
|
||||
u8 sub_810BA50(s16, s16, u8);
|
||||
u8 sub_810C9B0(struct Pokeblock *);
|
||||
s16 sub_810CA9C(const struct Pokeblock *, u8);
|
||||
s16 GetPokeblockData(const struct Pokeblock *, u8);
|
||||
u8 sub_810C9E8(struct Pokeblock *);
|
||||
void sub_810BA7C(u8);
|
||||
void ClearPokeblocks(void);
|
||||
bool8 sub_810CA6C(u8);
|
||||
s16 sub_810CAE4(u8, const struct Pokeblock *);
|
||||
bool8 PokeblockClearIfExists(u8);
|
||||
s16 PokeblockGetGain(u8, const struct Pokeblock *);
|
||||
u8 sub_810CB68(u8, u8*);
|
||||
void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest);
|
||||
void CB2_PreparePokeblockFeedScene(void);
|
||||
|
||||
#include "main.h"
|
||||
|
||||
void sub_8136130(struct Pokeblock *, MainCallback);
|
||||
|
||||
#endif // GUARD_POKEBLOCK_H
|
||||
|
@ -1,10 +0,0 @@
|
||||
//
|
||||
// Created by Scott Norton on 6/28/17.
|
||||
//
|
||||
|
||||
#ifndef POKERUBY_POKEBLOCK_FEED_H
|
||||
#define POKERUBY_POKEBLOCK_FEED_H
|
||||
|
||||
void sub_8147ADC(void);
|
||||
|
||||
#endif //POKERUBY_POKEBLOCK_FEED_H
|
@ -1,10 +0,0 @@
|
||||
//
|
||||
// Created by Scott Norton on 5/31/17.
|
||||
//
|
||||
|
||||
#ifndef POKERUBY_USE_POKEBLOCK_H
|
||||
#define POKERUBY_USE_POKEBLOCK_H
|
||||
|
||||
void sub_8136130(struct Pokeblock *, MainCallback);
|
||||
|
||||
#endif //POKERUBY_USE_POKEBLOCK_H
|
@ -263,7 +263,7 @@ SECTIONS {
|
||||
src/mystery_event_menu.o(.text);
|
||||
src/save_failed_screen.o(.text);
|
||||
src/braille_puzzles.o(.text);
|
||||
asm/pokeblock_feed.o(.text);
|
||||
src/pokeblock_feed.o(.text);
|
||||
src/clear_save_data_menu.o(.text);
|
||||
src/intro_credits_graphics.o(.text);
|
||||
asm/evolution_graphics.o(.text);
|
||||
@ -472,7 +472,7 @@ SECTIONS {
|
||||
src/strings.o(.rodata);
|
||||
src/berry_tag_screen.o(.rodata);
|
||||
src/save_failed_screen.o(.rodata);
|
||||
data/pokeblock_feed.o(.rodata);
|
||||
src/pokeblock_feed.o(.rodata);
|
||||
data/intro_credits_graphics.o(.rodata);
|
||||
data/evolution_graphics.o(.rodata);
|
||||
data/bard_music.o(.rodata);
|
||||
|
@ -134,7 +134,7 @@ s8 MoriDebugMenu_PokeblockCase(void)
|
||||
s32 loopCounter;
|
||||
|
||||
for (loopCounter = 0; loopCounter <= 39; loopCounter++)
|
||||
sub_810CA6C(loopCounter);
|
||||
PokeblockClearIfExists(loopCounter);
|
||||
|
||||
CloseMenu();
|
||||
return 1;
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "sound.h"
|
||||
#include "songs.h"
|
||||
#include "safari_zone.h"
|
||||
#include "use_pokeblock.h"
|
||||
#include "event_data.h"
|
||||
#include "pokeblock.h"
|
||||
|
||||
@ -582,7 +581,7 @@ static void sub_810BDAC(bool8 flag)
|
||||
v0 = ((i % 3) << 6) + 0x1a1 + (i / 3) * 6;
|
||||
if (gUnknown_02039248.unk0 + gUnknown_02039248.unk1 != gUnknown_02039248.unk2)
|
||||
{
|
||||
if (sub_810CA9C(&gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1], i + 1) > 0)
|
||||
if (GetPokeblockData(&gSaveBlock1.pokeblocks[gUnknown_02039248.unk0 + gUnknown_02039248.unk1], i + 1) > 0)
|
||||
{
|
||||
gBGTilemapBuffers[2][v0] = (i << 12) + 23;
|
||||
gBGTilemapBuffers[2][v0 + 32] = (i << 12) + 24;
|
||||
@ -894,7 +893,7 @@ static void sub_810C5EC(u8 taskId)
|
||||
static void sub_810C610(u8 taskId)
|
||||
{
|
||||
MenuZeroFillWindowRect(7, 6, 13, 11);
|
||||
sub_810CA6C((gUnknown_02039248.unk0 + gUnknown_02039248.unk1));
|
||||
PokeblockClearIfExists((gUnknown_02039248.unk0 + gUnknown_02039248.unk1));
|
||||
StringExpandPlaceholders(gStringVar4, gContestStatsText_WasThrownAway);
|
||||
DisplayItemMessageOnField(taskId, gStringVar4, sub_810C704, 0);
|
||||
sub_810BC98();
|
||||
@ -942,9 +941,9 @@ static void sub_810C748(u8 taskId)
|
||||
|
||||
static void sub_810C788(u8 taskId)
|
||||
{
|
||||
s16 v0 = sub_810CAE4(GetNature(&gEnemyParty[0]), &gSaveBlock1.pokeblocks[gScriptItemId]);
|
||||
s16 v0 = PokeblockGetGain(GetNature(&gEnemyParty[0]), &gSaveBlock1.pokeblocks[gScriptItemId]);
|
||||
StringCopy(gBattleTextBuff1, gPokeblockNames[gSaveBlock1.pokeblocks[gScriptItemId].color]);
|
||||
sub_810CA6C(gScriptItemId);
|
||||
PokeblockClearIfExists(gScriptItemId);
|
||||
gScriptItemId = gSaveBlock1.pokeblocks[gScriptItemId].color << 8;
|
||||
if (v0 == 0)
|
||||
{
|
||||
@ -967,7 +966,7 @@ static void sub_810C854(u8 taskId)
|
||||
SafariZoneActivatePokeblockFeeder(gScriptItemId);
|
||||
StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1.pokeblocks[gScriptItemId].color]);
|
||||
gScriptResult = gScriptItemId;
|
||||
sub_810CA6C(gScriptItemId);
|
||||
PokeblockClearIfExists(gScriptItemId);
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
gTasks[taskId].func = sub_810C2C8;
|
||||
}
|
||||
@ -1024,10 +1023,10 @@ u8 sub_810C9B0(struct Pokeblock *pokeblock)
|
||||
{
|
||||
u8 contestStat;
|
||||
u8 maxRating;
|
||||
u8 rating = sub_810CA9C(pokeblock, 1);
|
||||
u8 rating = GetPokeblockData(pokeblock, 1);
|
||||
for (contestStat=1; contestStat<5; contestStat++)
|
||||
{
|
||||
maxRating = sub_810CA9C(pokeblock, contestStat + 1);
|
||||
maxRating = GetPokeblockData(pokeblock, contestStat + 1);
|
||||
if (rating < maxRating)
|
||||
{
|
||||
rating = maxRating;
|
||||
@ -1038,7 +1037,7 @@ u8 sub_810C9B0(struct Pokeblock *pokeblock)
|
||||
|
||||
u8 sub_810C9E8(struct Pokeblock *pokeblock)
|
||||
{
|
||||
u8 feel = sub_810CA9C(pokeblock, 6);
|
||||
u8 feel = GetPokeblockData(pokeblock, 6);
|
||||
if (feel > 99)
|
||||
feel = 99;
|
||||
return feel;
|
||||
@ -1068,7 +1067,7 @@ bool8 sub_810CA34(struct Pokeblock *pokeblock)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_810CA6C(u8 pokeblockIdx)
|
||||
bool8 PokeblockClearIfExists(u8 pokeblockIdx)
|
||||
{
|
||||
if (gSaveBlock1.pokeblocks[pokeblockIdx].color == 0)
|
||||
{
|
||||
@ -1078,33 +1077,33 @@ bool8 sub_810CA6C(u8 pokeblockIdx)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
s16 sub_810CA9C(const struct Pokeblock *pokeblock, u8 field)
|
||||
s16 GetPokeblockData(const struct Pokeblock *pokeblock, u8 field)
|
||||
{
|
||||
if (field == 0)
|
||||
if (field == PBLOCK_COLOR)
|
||||
return pokeblock->color;
|
||||
if (field == 1)
|
||||
if (field == PBLOCK_SPICY)
|
||||
return pokeblock->spicy;
|
||||
if (field == 2)
|
||||
if (field == PBLOCK_DRY)
|
||||
return pokeblock->dry;
|
||||
if (field == 3)
|
||||
if (field == PBLOCK_SWEET)
|
||||
return pokeblock->sweet;
|
||||
if (field == 4)
|
||||
if (field == PBLOCK_BITTER)
|
||||
return pokeblock->bitter;
|
||||
if (field == 5)
|
||||
if (field == PBLOCK_SOUR)
|
||||
return pokeblock->sour;
|
||||
if (field == 6)
|
||||
if (field == PBLOCK_FEEL)
|
||||
return pokeblock->feel;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s16 sub_810CAE4(u8 nature, const struct Pokeblock *pokeblock)
|
||||
s16 PokeblockGetGain(u8 nature, const struct Pokeblock *pokeblock)
|
||||
{
|
||||
u8 flavor;
|
||||
s16 curGain;
|
||||
s16 totalGain = 0;
|
||||
for (flavor=0; flavor<5; flavor++)
|
||||
{
|
||||
curGain = sub_810CA9C(pokeblock, flavor + 1);
|
||||
curGain = GetPokeblockData(pokeblock, flavor + 1);
|
||||
if (curGain > 0)
|
||||
{
|
||||
totalGain += curGain * gPokeblockFlavorCompatibilityTable[5 * nature + flavor];
|
||||
@ -1113,9 +1112,9 @@ s16 sub_810CAE4(u8 nature, const struct Pokeblock *pokeblock)
|
||||
return totalGain;
|
||||
}
|
||||
|
||||
void sub_810CB44(struct Pokeblock *pokeblock, u8 *dest)
|
||||
void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest)
|
||||
{
|
||||
u8 color = sub_810CA9C(pokeblock, 0);
|
||||
u8 color = GetPokeblockData(pokeblock, PBLOCK_COLOR);
|
||||
StringCopy(dest, gPokeblockNames[color]);
|
||||
}
|
||||
|
||||
@ -1124,7 +1123,7 @@ bool8 sub_810CB68(u8 nature, u8 *dest)
|
||||
u8 flavor;
|
||||
for (flavor=0; flavor<5; flavor++)
|
||||
{
|
||||
if (sub_810CAE4(nature, &gUnknown_083F7F9C[flavor]) > 0)
|
||||
if (PokeblockGetGain(nature, &gUnknown_083F7F9C[flavor]) > 0)
|
||||
{
|
||||
StringCopy(dest, gPokeblockNames[flavor + 1]);
|
||||
return TRUE;
|
||||
|
1015
src/pokeblock_feed.c
Normal file
1015
src/pokeblock_feed.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
//
|
||||
// Created by Scott Norton on 5/31/17.
|
||||
// Modified by Dizzy Egg on 8/15/17.
|
||||
//
|
||||
|
||||
#include "global.h"
|
||||
@ -16,8 +17,6 @@
|
||||
#include "sound.h"
|
||||
#include "songs.h"
|
||||
#include "pokeblock.h"
|
||||
#include "pokeblock_feed.h"
|
||||
#include "use_pokeblock.h"
|
||||
|
||||
#define GFX_TAG_CONDITIONUPDOWN 0
|
||||
|
||||
@ -29,7 +28,7 @@ const u16 ConditionUpDownPalette[] = INCBIN_U16("graphics/misc/condition_up_down
|
||||
const u32 ConditionUpDownTiles[] = INCBIN_U32("graphics/misc/condition_up_down.4bpp");
|
||||
#endif
|
||||
|
||||
const u32 gUnknown_08406118[] = {
|
||||
static const u32 sContestStatsMonData[] = {
|
||||
MON_DATA_COOL,
|
||||
MON_DATA_TOUGH,
|
||||
MON_DATA_SMART,
|
||||
@ -37,11 +36,11 @@ const u32 gUnknown_08406118[] = {
|
||||
MON_DATA_BEAUTY
|
||||
};
|
||||
|
||||
const u8 gUnknown_0840612C[] = {
|
||||
static const u8 gUnknown_0840612C[] = {
|
||||
0, 4, 3, 2, 1
|
||||
};
|
||||
|
||||
const u8 *const gUnknown_08406134[] = {
|
||||
static const u8 *const sContextStatNames[] = {
|
||||
OtherText_Coolness,
|
||||
OtherText_Toughness,
|
||||
OtherText_Smartness,
|
||||
@ -49,18 +48,18 @@ const u8 *const gUnknown_08406134[] = {
|
||||
OtherText_Beauty
|
||||
};
|
||||
|
||||
const struct SpriteSheet gSpriteSheet_ConditionUpDown = {
|
||||
static const struct SpriteSheet gSpriteSheet_ConditionUpDown = {
|
||||
(u8 *)ConditionUpDownTiles,
|
||||
sizeof ConditionUpDownTiles,
|
||||
GFX_TAG_CONDITIONUPDOWN
|
||||
};
|
||||
|
||||
const struct SpritePalette gSpritePalette_ConditionUpDown = {
|
||||
static const struct SpritePalette gSpritePalette_ConditionUpDown = {
|
||||
ConditionUpDownPalette,
|
||||
GFX_TAG_CONDITIONUPDOWN
|
||||
};
|
||||
|
||||
const s16 gUnknown_08406158[][2] = {
|
||||
static const s16 gUnknown_08406158[][2] = {
|
||||
{0x9c, 0x1e},
|
||||
{0x75, 0x35},
|
||||
{0x75, 0x70},
|
||||
@ -68,28 +67,28 @@ const s16 gUnknown_08406158[][2] = {
|
||||
{0xc5, 0x35}
|
||||
};
|
||||
|
||||
const struct OamData gOamData_840616C = {
|
||||
static const struct OamData gOamData_840616C = {
|
||||
.shape = 1,
|
||||
.size = 2,
|
||||
.priority = 1
|
||||
};
|
||||
|
||||
const union AnimCmd gSpriteAnim_8406174[] = {
|
||||
static const union AnimCmd gSpriteAnim_8406174[] = {
|
||||
ANIMCMD_FRAME(0, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd gSpriteAnim_840617C[] = {
|
||||
static const union AnimCmd gSpriteAnim_840617C[] = {
|
||||
ANIMCMD_FRAME(8, 5),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd *const gSpriteAnimTable_8406184[] = {
|
||||
static const union AnimCmd *const gSpriteAnimTable_8406184[] = {
|
||||
gSpriteAnim_8406174,
|
||||
gSpriteAnim_840617C
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_840618C = {
|
||||
static const struct SpriteTemplate gSpriteTemplate_840618C = {
|
||||
GFX_TAG_CONDITIONUPDOWN,
|
||||
GFX_TAG_CONDITIONUPDOWN,
|
||||
&gOamData_840616C,
|
||||
@ -99,47 +98,44 @@ const struct SpriteTemplate gSpriteTemplate_840618C = {
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
asm(".text\n"
|
||||
".include \"constants/gba_constants.inc\"");
|
||||
|
||||
static EWRAM_DATA struct UnkPokenavStruct_Sub1 *gUnknown_02039304 = NULL;
|
||||
static EWRAM_DATA MainCallback gUnknown_02039308 = NULL;
|
||||
static EWRAM_DATA struct Pokeblock *gUnknown_0203930C = NULL;
|
||||
EWRAM_DATA u8 gUnknown_02039310 = 0;
|
||||
EWRAM_DATA s16 gUnknown_02039312 = 0;
|
||||
EWRAM_DATA u8 gPokeblockMonID = 0;
|
||||
EWRAM_DATA s16 gPokeblockGain = 0;
|
||||
|
||||
extern u16 gKeyRepeatStartDelay;
|
||||
extern u16 gScriptItemId; // FIXME: remove after merge of #349 Pokeblock
|
||||
|
||||
void launch_c3_walk_stairs_and_run_once(void (*const)(void));
|
||||
void sub_81361E4(void);
|
||||
void sub_813622C(void);
|
||||
void sub_8136244(void);
|
||||
void sub_8136264(void);
|
||||
void sub_8136294(void);
|
||||
void sub_81365A0(void);
|
||||
void sub_81365C8(void);
|
||||
void sub_8136638(void);
|
||||
void sub_81368A4(void);
|
||||
static void launch_c3_walk_stairs_and_run_once(void (*const)(void));
|
||||
static void sub_81361E4(void);
|
||||
static void sub_813622C(void);
|
||||
static void sub_8136244(void);
|
||||
static void sub_8136264(void);
|
||||
static void sub_8136294(void);
|
||||
static void sub_81365A0(void);
|
||||
static void sub_81365C8(void);
|
||||
static void sub_8136638(void);
|
||||
static void sub_81368A4(void);
|
||||
void sub_8089668(void);
|
||||
void sub_8136B44(void);
|
||||
u8 sub_81370E4(u8);
|
||||
void sub_8136BB8(void);
|
||||
s8 sub_8136C40(void);
|
||||
bool8 sub_8137058(void);
|
||||
void sub_8136D60(void);
|
||||
void sub_8136808(void);
|
||||
void sub_8136D8C(void);
|
||||
u8 sub_81370A4(u8);
|
||||
void sub_81369CC(void);
|
||||
void sub_8136EF0(void);
|
||||
void sub_8137138(void);
|
||||
void sub_8136C6C(void);
|
||||
bool8 sub_8136D00(void);
|
||||
void sub_8136DC0(u8 *, u8, s16);
|
||||
void sub_8136DA0(const u8 *);
|
||||
void sub_8136F74(struct Pokeblock *, struct Pokemon *);
|
||||
void sub_81371DC(struct Sprite *);
|
||||
static void sub_8136B44(void);
|
||||
static u8 sub_81370E4(u8);
|
||||
static void sub_8136BB8(void);
|
||||
static s8 sub_8136C40(void);
|
||||
static bool8 sub_8137058(void);
|
||||
static void sub_8136D60(void);
|
||||
static void sub_8136808(void);
|
||||
static void sub_8136D8C(void);
|
||||
static u8 sub_81370A4(u8);
|
||||
static void sub_81369CC(void);
|
||||
static void sub_8136EF0(void);
|
||||
static void sub_8137138(void);
|
||||
static void sub_8136C6C(void);
|
||||
static bool8 sub_8136D00(void);
|
||||
static void Pokeblock_BufferEnhancedStatText(u8 *, u8, s16);
|
||||
static void Pokeblock_MenuWindowTextPrint(const u8 *);
|
||||
static void sub_8136F74(struct Pokeblock *, struct Pokemon *);
|
||||
static void sub_81371DC(struct Sprite *);
|
||||
|
||||
void sub_8136130(struct Pokeblock *pokeblock, MainCallback callback)
|
||||
{
|
||||
@ -151,18 +147,18 @@ void sub_8136130(struct Pokeblock *pokeblock, MainCallback callback)
|
||||
SetMainCallback2(sub_8136244);
|
||||
}
|
||||
|
||||
void sub_8136174(void)
|
||||
static void sub_8136174(void)
|
||||
{
|
||||
gUnknown_02039304->pokeblock = gUnknown_0203930C;
|
||||
gUnknown_02039304->callback = gUnknown_02039308;
|
||||
gUnknown_02039310 = sub_81370E4(gUnknown_02039310);
|
||||
gUnknown_02039304->unk56 = gUnknown_02039310 < 4 ? 0 : 1;
|
||||
gPokeblockMonID = sub_81370E4(gPokeblockMonID);
|
||||
gUnknown_02039304->unk56 = gPokeblockMonID < 4 ? 0 : 1;
|
||||
gUnknown_083DFEC4->unkD162[0] = 2;
|
||||
launch_c3_walk_stairs_and_run_once(sub_8136294);
|
||||
SetMainCallback2(sub_81361E4);
|
||||
}
|
||||
|
||||
void sub_81361E4(void)
|
||||
static void sub_81361E4(void)
|
||||
{
|
||||
gUnknown_02039304->unk0();
|
||||
AnimateSprites();
|
||||
@ -176,7 +172,7 @@ void sub_81361E4(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_813622C(void)
|
||||
static void sub_813622C(void)
|
||||
{
|
||||
sub_81368A4();
|
||||
AnimateSprites();
|
||||
@ -184,7 +180,7 @@ void sub_813622C(void)
|
||||
UpdatePaletteFade();
|
||||
}
|
||||
|
||||
void sub_8136244(void)
|
||||
static void sub_8136244(void)
|
||||
{
|
||||
gUnknown_02039304->unk0();
|
||||
AnimateSprites();
|
||||
@ -192,7 +188,7 @@ void sub_8136244(void)
|
||||
UpdatePaletteFade();
|
||||
}
|
||||
|
||||
void sub_8136264(void)
|
||||
static void sub_8136264(void)
|
||||
{
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
@ -201,13 +197,13 @@ void sub_8136264(void)
|
||||
sub_8089668();
|
||||
}
|
||||
|
||||
void launch_c3_walk_stairs_and_run_once(void (*const func)(void))
|
||||
static void launch_c3_walk_stairs_and_run_once(void (*const func)(void))
|
||||
{
|
||||
gUnknown_02039304->unk0 = func;
|
||||
gUnknown_02039304->unk50 = 0;
|
||||
}
|
||||
|
||||
void sub_8136294(void)
|
||||
static void sub_8136294(void)
|
||||
{
|
||||
bool32 c1LinkRelatedActive;
|
||||
switch (gUnknown_02039304->unk50)
|
||||
@ -346,7 +342,7 @@ void sub_8136294(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81365A0(void)
|
||||
static void sub_81365A0(void)
|
||||
{
|
||||
while (!gUnknown_02039304->unk55)
|
||||
{
|
||||
@ -354,7 +350,7 @@ void sub_81365A0(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81365C8(void)
|
||||
static void sub_81365C8(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
@ -374,7 +370,7 @@ void sub_81365C8(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136638(void)
|
||||
static void sub_8136638(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
@ -464,12 +460,12 @@ void sub_8136638(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136808(void)
|
||||
static void sub_8136808(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
case 0:
|
||||
gUnknown_02039310 = sub_81370A4(gUnknown_083DFEC4->unk87DC);
|
||||
gPokeblockMonID = sub_81370A4(gUnknown_083DFEC4->unk87DC);
|
||||
gUnknown_02039308 = gUnknown_02039304->callback;
|
||||
gUnknown_0203930C = gUnknown_02039304->pokeblock;
|
||||
BeginNormalPaletteFade(-1, 0, 0, 16, 0);
|
||||
@ -479,18 +475,18 @@ void sub_8136808(void)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
gMain.savedCallback = sub_8136174;
|
||||
SetMainCallback2(sub_8147ADC);
|
||||
SetMainCallback2(CB2_PreparePokeblockFeedScene);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81368A4(void)
|
||||
static void sub_81368A4(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
case 0:
|
||||
if (gUnknown_083DFEC4->unk87DC != gUnknown_02039310)
|
||||
if (gUnknown_083DFEC4->unk87DC != gPokeblockMonID)
|
||||
{
|
||||
sub_80F5060(gUnknown_02039304->unk56);
|
||||
gUnknown_02039304->unk50++;
|
||||
@ -538,7 +534,7 @@ void sub_81368A4(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81369CC(void)
|
||||
static void sub_81369CC(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
@ -578,14 +574,14 @@ void sub_81369CC(void)
|
||||
case 5:
|
||||
if (gMain.newKeys & (A_BUTTON | B_BUTTON) && !sub_8136D00())
|
||||
{
|
||||
sub_810CA6C((u8)gScriptItemId);
|
||||
PokeblockClearIfExists((u8)gScriptItemId);
|
||||
launch_c3_walk_stairs_and_run_once(sub_8136B44);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136B44(void)
|
||||
static void sub_8136B44(void)
|
||||
{
|
||||
switch (gUnknown_02039304->unk50)
|
||||
{
|
||||
@ -609,7 +605,7 @@ void sub_8136B44(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136BB8(void)
|
||||
static void sub_8136BB8(void)
|
||||
{
|
||||
GetMonData(&gPlayerParty[sub_81370A4(gUnknown_083DFEC4->unk87DC)], MON_DATA_NICKNAME, gUnknown_02039304->stringBuffer);
|
||||
StringGetEnd10(gUnknown_02039304->stringBuffer);
|
||||
@ -621,7 +617,7 @@ void sub_8136BB8(void)
|
||||
MoveMenuCursor(0);
|
||||
}
|
||||
|
||||
s8 sub_8136C40(void)
|
||||
static s8 sub_8136C40(void)
|
||||
{
|
||||
s8 retval = ProcessMenuInputNoWrap();
|
||||
if ((u8)(retval + 1) < 3)
|
||||
@ -632,124 +628,68 @@ s8 sub_8136C40(void)
|
||||
return retval;
|
||||
}
|
||||
|
||||
void sub_8136C6C(void)
|
||||
static void sub_8136C6C(void)
|
||||
{
|
||||
BasicInitMenuWindow(&gWindowConfig_81E709C);
|
||||
MenuDrawTextWindow(0, 16, 29, 19);
|
||||
for (gUnknown_02039304->unk53 = 0; gUnknown_02039304->unk53 < 5 && gUnknown_02039304->unk61[gUnknown_02039304->unk53] == 0; gUnknown_02039304->unk53++);
|
||||
if (gUnknown_02039304->unk53 < 5)
|
||||
{
|
||||
sub_8136DC0(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, gUnknown_02039304->unk61[gUnknown_02039304->unk53]);
|
||||
Pokeblock_BufferEnhancedStatText(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, gUnknown_02039304->unk61[gUnknown_02039304->unk53]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_8136DC0(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, 0);
|
||||
Pokeblock_BufferEnhancedStatText(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, 0);
|
||||
}
|
||||
sub_8136DA0(gUnknown_02039304->stringBuffer);
|
||||
Pokeblock_MenuWindowTextPrint(gUnknown_02039304->stringBuffer);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
bool8 sub_8136D00(void)
|
||||
static bool8 sub_8136D00(void)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (++gUnknown_02039304->unk53 >= 5)
|
||||
gUnknown_02039304->unk53++;
|
||||
if (gUnknown_02039304->unk53 < 5)
|
||||
{
|
||||
break;
|
||||
if (gUnknown_02039304->unk61[gUnknown_02039304->unk53] != 0)
|
||||
break;
|
||||
}
|
||||
if (gUnknown_02039304->unk61[gUnknown_02039304->unk53] != 0)
|
||||
else
|
||||
{
|
||||
sub_8136DC0(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, gUnknown_02039304->unk61[gUnknown_02039304->unk53]);
|
||||
sub_8136DA0(gUnknown_02039304->stringBuffer);
|
||||
return TRUE;
|
||||
gUnknown_02039304->unk53 = 5;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
gUnknown_02039304->unk53 = 5;
|
||||
return FALSE;
|
||||
Pokeblock_BufferEnhancedStatText(gUnknown_02039304->stringBuffer, gUnknown_02039304->unk53, gUnknown_02039304->unk61[gUnknown_02039304->unk53]);
|
||||
Pokeblock_MenuWindowTextPrint(gUnknown_02039304->stringBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
__attribute__((naked))
|
||||
bool8 sub_8136D00(void)
|
||||
{
|
||||
asm_unified("\tpush {r4,r5,lr}\n"
|
||||
"\tldr r4, _08136D30 @ =gUnknown_02039304\n"
|
||||
"\tadds r3, r4, 0\n"
|
||||
"\tmovs r5, 0x5\n"
|
||||
"_08136D08:\n"
|
||||
"\tldr r0, [r3]\n"
|
||||
"\tadds r0, 0x53\n"
|
||||
"\tldrb r1, [r0]\n"
|
||||
"\tadds r1, 0x1\n"
|
||||
"\tstrb r1, [r0]\n"
|
||||
"\tldr r2, [r3]\n"
|
||||
"\tadds r1, r2, 0\n"
|
||||
"\tadds r1, 0x53\n"
|
||||
"\tldrb r0, [r1]\n"
|
||||
"\tcmp r0, 0x4\n"
|
||||
"\tbhi _08136D34\n"
|
||||
"\tadds r0, r2, 0\n"
|
||||
"\tadds r0, 0x61\n"
|
||||
"\tldrb r1, [r1]\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldrb r0, [r0]\n"
|
||||
"\tcmp r0, 0\n"
|
||||
"\tbne _08136D3A\n"
|
||||
"\tb _08136D08\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08136D30: .4byte gUnknown_02039304\n"
|
||||
"_08136D34:\n"
|
||||
"\tstrb r5, [r1]\n"
|
||||
"\tmovs r0, 0\n"
|
||||
"\tb _08136D5A\n"
|
||||
"_08136D3A:\n"
|
||||
"\tldr r2, [r4]\n"
|
||||
"\tadds r0, r2, 0\n"
|
||||
"\tadds r0, 0x10\n"
|
||||
"\tadds r1, r2, 0\n"
|
||||
"\tadds r1, 0x53\n"
|
||||
"\tldrb r1, [r1]\n"
|
||||
"\tadds r2, 0x61\n"
|
||||
"\tadds r2, r1\n"
|
||||
"\tldrb r2, [r2]\n"
|
||||
"\tbl sub_8136DC0\n"
|
||||
"\tldr r0, [r4]\n"
|
||||
"\tadds r0, 0x10\n"
|
||||
"\tbl sub_8136DA0\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"_08136D5A:\n"
|
||||
"\tpop {r4,r5}\n"
|
||||
"\tpop {r1}\n"
|
||||
"\tbx r1");
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_8136D60(void)
|
||||
static void sub_8136D60(void)
|
||||
{
|
||||
BasicInitMenuWindow(&gWindowConfig_81E709C);
|
||||
MenuDrawTextWindow(0, 16, 29, 19);
|
||||
MenuPrint(gOtherText_WontEat, 1, 17);
|
||||
}
|
||||
|
||||
void sub_8136D8C(void)
|
||||
static void sub_8136D8C(void)
|
||||
{
|
||||
MenuZeroFillScreen();
|
||||
BasicInitMenuWindow(&gWindowConfig_81E7080);
|
||||
}
|
||||
|
||||
void sub_8136DA0(const u8 *message)
|
||||
static void Pokeblock_MenuWindowTextPrint(const u8 *message)
|
||||
{
|
||||
MenuDrawTextWindow(0, 16, 29, 19);
|
||||
MenuPrint(message, 1, 17);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
static void Pokeblock_BufferEnhancedStatText(u8 *dest, u8 statID, s16 a2)
|
||||
{
|
||||
u16 v0 = a2;
|
||||
if (a2 != 0)
|
||||
{
|
||||
if ((v0 = max(a2, 0)) == 0);
|
||||
StringCopy(dest, gUnknown_08406134[a1]);
|
||||
StringCopy(dest, sContextStatNames[statID]);
|
||||
StringAppend(dest, gOtherText_WasEnhanced);
|
||||
}
|
||||
else
|
||||
@ -759,7 +699,7 @@ void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
}
|
||||
#else
|
||||
__attribute__((naked))
|
||||
void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
static void Pokeblock_BufferEnhancedStatText(u8 *dest, u8 a1, s16 a2)
|
||||
{
|
||||
asm_unified("\tpush {r4,lr}\n"
|
||||
"\tadds r4, r0, 0\n"
|
||||
@ -775,7 +715,7 @@ void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
"\tmovs r0, 0\n"
|
||||
"_08136DD8:\n"
|
||||
"\tlsls r0, 16\n"
|
||||
"\tldr r1, _08136DF4 @ =gUnknown_08406134\n"
|
||||
"\tldr r1, _08136DF4 @ =sContextStatNames\n"
|
||||
"\tlsls r0, r3, 2\n"
|
||||
"\tadds r0, r1\n"
|
||||
"\tldr r1, [r0]\n"
|
||||
@ -786,7 +726,7 @@ void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
"\tbl StringAppend\n"
|
||||
"\tb _08136E04\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_08136DF4: .4byte gUnknown_08406134\n"
|
||||
"_08136DF4: .4byte sContextStatNames\n"
|
||||
"_08136DF8: .4byte gOtherText_WasEnhanced\n"
|
||||
"_08136DFC:\n"
|
||||
"\tldr r1, _08136E0C @ =gOtherText_NothingChanged\n"
|
||||
@ -801,16 +741,16 @@ void sub_8136DC0(u8 *dest, u8 a1, s16 a2)
|
||||
}
|
||||
#endif
|
||||
|
||||
void sub_8136E10(struct Pokemon *pokemon, u8 *data)
|
||||
static void Pokeblock_GetMonContestStats(struct Pokemon *pokemon, u8 *data)
|
||||
{
|
||||
u16 i;
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
data[i] = GetMonData(pokemon, gUnknown_08406118[i]);
|
||||
data[i] = GetMonData(pokemon, sContestStatsMonData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136E40(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
static void sub_8136E40(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
{
|
||||
u16 i;
|
||||
s16 cstat;
|
||||
@ -820,14 +760,14 @@ void sub_8136E40(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
sub_8136F74(pokeblock, pokemon);
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
data = GetMonData(pokemon, gUnknown_08406118[i]);
|
||||
data = GetMonData(pokemon, sContestStatsMonData[i]);
|
||||
cstat = data + gUnknown_02039304->unk66[i];
|
||||
if (cstat < 0)
|
||||
cstat = 0;
|
||||
if (cstat > 255)
|
||||
cstat = 255;
|
||||
data = cstat;
|
||||
SetMonData(pokemon, gUnknown_08406118[i], &data);
|
||||
SetMonData(pokemon, sContestStatsMonData[i], &data);
|
||||
}
|
||||
cstat = (u8)GetMonData(pokemon, MON_DATA_SHEEN);
|
||||
cstat = cstat + pokeblock->feel;
|
||||
@ -838,21 +778,21 @@ void sub_8136E40(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136EF0(void)
|
||||
static void sub_8136EF0(void)
|
||||
{
|
||||
u16 i;
|
||||
struct Pokemon *pokemon = gPlayerParty;
|
||||
pokemon += gUnknown_083DFEC4->unk893c[gUnknown_083DFEC4->unk87DC].partyIdx;
|
||||
sub_8136E10(pokemon, gUnknown_02039304->unk57);
|
||||
Pokeblock_GetMonContestStats(pokemon, gUnknown_02039304->unk57);
|
||||
sub_8136E40(gUnknown_02039304->pokeblock, pokemon);
|
||||
sub_8136E10(pokemon, gUnknown_02039304->unk5c);
|
||||
Pokeblock_GetMonContestStats(pokemon, gUnknown_02039304->unk5c);
|
||||
for (i=0; i<5; i++)
|
||||
{
|
||||
gUnknown_02039304->unk61[i] = gUnknown_02039304->unk5c[i] - gUnknown_02039304->unk57[i];
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8136F74(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
static void sub_8136F74(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
{
|
||||
s8 direction;
|
||||
s8 i;
|
||||
@ -864,9 +804,9 @@ void sub_8136F74(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
gUnknown_02039304->unk66[2] = pokeblock->bitter;
|
||||
gUnknown_02039304->unk66[3] = pokeblock->sweet;
|
||||
gUnknown_02039304->unk66[4] = pokeblock->dry;
|
||||
if (gUnknown_02039312 > 0)
|
||||
if (gPokeblockGain > 0)
|
||||
direction = 1;
|
||||
else if (gUnknown_02039312 < 0)
|
||||
else if (gPokeblockGain < 0)
|
||||
direction = -1;
|
||||
else
|
||||
return;
|
||||
@ -884,7 +824,7 @@ void sub_8136F74(struct Pokeblock *pokeblock, struct Pokemon *pokemon)
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8137058(void)
|
||||
static bool8 sub_8137058(void)
|
||||
{
|
||||
struct Pokemon *pokemon = gPlayerParty;
|
||||
pokemon += gUnknown_083DFEC4->unk893c[gUnknown_083DFEC4->unk87DC].partyIdx;
|
||||
@ -893,7 +833,7 @@ bool8 sub_8137058(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 sub_81370A4(u8 a0)
|
||||
static u8 sub_81370A4(u8 a0)
|
||||
{
|
||||
u8 i;
|
||||
for (i=0; i<PARTY_SIZE; i++)
|
||||
@ -908,7 +848,7 @@ u8 sub_81370A4(u8 a0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_81370E4(u8 a0)
|
||||
static u8 sub_81370E4(u8 a0)
|
||||
{
|
||||
u8 ct;
|
||||
u8 i;
|
||||
@ -927,7 +867,7 @@ u8 sub_8137124(u8 a0)
|
||||
return sub_81370A4(a0);
|
||||
}
|
||||
|
||||
void sub_8137138(void)
|
||||
static void sub_8137138(void)
|
||||
{
|
||||
u16 flavor;
|
||||
u8 spriteidx;
|
||||
@ -951,7 +891,7 @@ void sub_8137138(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81371DC(struct Sprite *sprite)
|
||||
static void sub_81371DC(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->data0 <= 5)
|
||||
sprite->pos2.y -= 2;
|
||||
|
@ -3161,7 +3161,7 @@ static u8 PickWildMonNature(void)
|
||||
}
|
||||
for (i = 0; i < 25; i++)
|
||||
{
|
||||
if (sub_810CAE4(natures[i], safariPokeblock) > 0)
|
||||
if (PokeblockGetGain(natures[i], safariPokeblock) > 0)
|
||||
return natures[i];
|
||||
}
|
||||
}
|
||||
|
@ -274,40 +274,7 @@ gUnknown_03005F10: @ 3005F10
|
||||
gUnknown_03005F14: @ 3005F14
|
||||
.space 0xC
|
||||
|
||||
@ pokeblock_feed
|
||||
|
||||
gUnknown_03005F20: @ 3005F20
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F24: @ 3005F24
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F28: @ 3005F28
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F2C: @ 3005F2C
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F30: @ 3005F30
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F34: @ 3005F34
|
||||
.space 0x8
|
||||
|
||||
gUnknown_03005F3C: @ 3005F3C
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005F40: @ 3005F40
|
||||
.space 0x10
|
||||
|
||||
gUnknown_03005F50: @ 3005F50
|
||||
.space 0x44
|
||||
|
||||
gUnknown_03005F94: @ 3005F94
|
||||
.space 0xC
|
||||
|
||||
gUnknown_03005FA0: @ 3005FA0
|
||||
.space 0x30
|
||||
|
||||
.include "pokeblock_feed.o"
|
||||
.include "m4a_2.o"
|
||||
.include "agb_flash.o"
|
||||
|
@ -655,12 +655,7 @@ gUnknown_0203927D: @ 203927D
|
||||
.include "src/berry_tag_screen.o"
|
||||
.include "src/mystery_event_menu.o"
|
||||
.include "src/save_failed_screen.o"
|
||||
|
||||
@ pokeblock_feed
|
||||
|
||||
.align 2
|
||||
gUnknown_02039350: @ 2039350
|
||||
.space 0x8
|
||||
.include "src/pokeblock_feed.o"
|
||||
|
||||
@ intro_credits_graphics
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user