pokeheartgold/asm/unk_0208E55C.s
2022-01-31 21:10:21 -05:00

276 lines
7.9 KiB
ArmAsm

#include "constants/items.h"
#include "constants/moves.h"
#include "constants/pokemon.h"
#include "constants/ribbon.h"
#include "party_menu.h"
#include "msgdata/msg/msg_0300.h"
.include "asm/macros.inc"
.include "global.inc"
.public _020FA484
.public gNatureStatMods
.text
thumb_func_start sub_0208E55C
sub_0208E55C: ; 0x0208E55C
cmp r1, #4
bhi _0208E5A8
add r1, r1, r1
add r1, pc
ldrh r1, [r1, #6]
lsl r1, r1, #0x10
asr r1, r1, #0x10
add pc, r1
_0208E56C: ; jump table
.short _0208E576 - _0208E56C - 2 ; case 0
.short _0208E580 - _0208E56C - 2 ; case 1
.short _0208E58A - _0208E56C - 2 ; case 2
.short _0208E594 - _0208E56C - 2 ; case 3
.short _0208E59E - _0208E56C - 2 ; case 4
_0208E576:
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5AC ; =_02105028
ldr r0, [r0, r1]
bx lr
_0208E580:
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5B0 ; =_02105028 + 4
ldrh r0, [r0, r1]
bx lr
_0208E58A:
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5B4 ; =_02105028 + 6
ldrh r0, [r0, r1]
bx lr
_0208E594:
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5B8 ; =_02105028 + 8
ldrh r0, [r0, r1]
bx lr
_0208E59E:
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5BC ; =_02105028 + 10
ldrh r0, [r0, r1]
bx lr
_0208E5A8:
mov r0, #0
bx lr
.balign 4, 0
_0208E5AC: .word _02105028
_0208E5B0: .word _02105028 + 4
_0208E5B4: .word _02105028 + 6
_0208E5B8: .word _02105028 + 8
_0208E5BC: .word _02105028 + 10
thumb_func_end sub_0208E55C
thumb_func_start sub_0208E5C0
sub_0208E5C0: ; 0x0208E5C0
mov r2, #0xc
mul r2, r1
ldr r1, _0208E5DC ; =_02105028 + 10
ldrh r2, [r1, r2]
mov r1, #2
lsl r1, r1, #0xe
tst r1, r2
beq _0208E5D8
lsl r1, r2, #0x18
lsr r1, r1, #0x18
ldrb r2, [r0, r1]
add r2, #0x92
_0208E5D8:
add r0, r2, #0
bx lr
.balign 4, 0
_0208E5DC: .word _02105028 + 10
thumb_func_end sub_0208E5C0
thumb_func_start sub_0208E5E0
sub_0208E5E0: ; 0x0208E5E0
mov r1, #0xc
mul r1, r0
ldr r0, _0208E5FC ; =_02105028 + 10
ldrh r1, [r0, r1]
mov r0, #2
lsl r0, r0, #0xe
tst r0, r1
beq _0208E5F6
lsl r0, r1, #0x18
lsr r0, r0, #0x18
bx lr
_0208E5F6:
mov r0, #0xff
bx lr
nop
_0208E5FC: .word _02105028 + 10
thumb_func_end sub_0208E5E0
.rodata
_02105028:
.word MON_DATA_HOENN_CHAMPION_RIBBON
.short 0x0048, 0x0000, 0x0000, 0x0050
.word MON_DATA_HOENN_COOL_RIBBON
.short 0x0049, 0x0000, 0x0001, 0x0051
.word MON_DATA_HOENN_COOL_RIBBON_SUPER
.short 0x004A, 0x0000, 0x0002, 0x0052
.word MON_DATA_HOENN_COOL_RIBBON_HYPER
.short 0x004B, 0x0000, 0x0003, 0x0053
.word MON_DATA_HOENN_COOL_RIBBON_MASTER
.short 0x004C, 0x0000, 0x0004, 0x0054
.word MON_DATA_HOENN_BEAUTY_RIBBON
.short 0x0049, 0x0001, 0x0005, 0x0055
.word MON_DATA_HOENN_BEAUTY_RIBBON_SUPER
.short 0x004A, 0x0001, 0x0006, 0x0056
.word MON_DATA_HOENN_BEAUTY_RIBBON_HYPER
.short 0x004B, 0x0001, 0x0007, 0x0057
.word MON_DATA_HOENN_BEAUTY_RIBBON_MASTER
.short 0x004C, 0x0001, 0x0008, 0x0058
.word MON_DATA_HOENN_CUTE_RIBBON
.short 0x0049, 0x0002, 0x0009, 0x0059
.word MON_DATA_HOENN_CUTE_RIBBON_SUPER
.short 0x004A, 0x0002, 0x000A, 0x005A
.word MON_DATA_HOENN_CUTE_RIBBON_HYPER
.short 0x004B, 0x0002, 0x000B, 0x005B
.word MON_DATA_HOENN_CUTE_RIBBON_MASTER
.short 0x004C, 0x0002, 0x000C, 0x005C
.word MON_DATA_HOENN_SMART_RIBBON
.short 0x0049, 0x0003, 0x000D, 0x005D
.word MON_DATA_HOENN_SMART_RIBBON_SUPER
.short 0x004A, 0x0003, 0x000E, 0x005E
.word MON_DATA_HOENN_SMART_RIBBON_HYPER
.short 0x004B, 0x0003, 0x000F, 0x005F
.word MON_DATA_HOENN_SMART_RIBBON_MASTER
.short 0x004C, 0x0003, 0x0010, 0x0060
.word MON_DATA_HOENN_TOUGH_RIBBON
.short 0x0049, 0x0004, 0x0011, 0x0061
.word MON_DATA_HOENN_TOUGH_RIBBON_SUPER
.short 0x004A, 0x0004, 0x0012, 0x0062
.word MON_DATA_HOENN_TOUGH_RIBBON_HYPER
.short 0x004B, 0x0004, 0x0013, 0x0063
.word MON_DATA_HOENN_TOUGH_RIBBON_MASTER
.short 0x004C, 0x0004, 0x0014, 0x0064
.word MON_DATA_HOENN_WINNING_RIBBON
.short 0x004E, 0x0000, 0x0015, 0x0065
.word MON_DATA_HOENN_VICTORY_RIBBON
.short 0x004D, 0x0000, 0x0016, 0x0066
.word MON_DATA_HOENN_ARTIST_RIBBON
.short 0x004F, 0x0001, 0x0017, 0x0067
.word MON_DATA_HOENN_EFFORT_RIBBON
.short 0x0050, 0x0002, 0x0018, 0x0068
.word MON_DATA_HOENN_MARINE_RIBBON
.short 0x0051, 0x0001, 0x0019, 0x8000
.word MON_DATA_HOENN_LAND_RIBBON
.short 0x0051, 0x0003, 0x001A, 0x8001
.word MON_DATA_HOENN_SKY_RIBBON
.short 0x0051, 0x0004, 0x001B, 0x8002
.word MON_DATA_HOENN_COUNTRY_RIBBON
.short 0x0052, 0x0003, 0x001C, 0x00B2
.word MON_DATA_HOENN_NATIONAL_RIBBON
.short 0x0052, 0x0004, 0x001D, 0x00BE
.word MON_DATA_HOENN_EARTH_RIBBON
.short 0x0053, 0x0000, 0x001E, 0x00BF
.word MON_DATA_HOENN_WORLD_RIBBON
.short 0x0053, 0x0001, 0x001F, 0x00B2
.word MON_DATA_SINNOH_CHAMP_RIBBON
.short 0x0058, 0x0000, 0x0020, 0x0069
.word MON_DATA_COOL_RIBBON
.short 0x0059, 0x0000, 0x0021, 0x006A
.word MON_DATA_COOL_RIBBON_GREAT
.short 0x005A, 0x0000, 0x0022, 0x006B
.word MON_DATA_COOL_RIBBON_ULTRA
.short 0x005B, 0x0000, 0x0023, 0x006C
.word MON_DATA_COOL_RIBBON_MASTER
.short 0x005C, 0x0000, 0x0024, 0x006D
.word MON_DATA_BEAUTY_RIBBON
.short 0x0059, 0x0001, 0x0025, 0x006E
.word MON_DATA_BEAUTY_RIBBON_GREAT
.short 0x005A, 0x0001, 0x0026, 0x006F
.word MON_DATA_BEAUTY_RIBBON_ULTRA
.short 0x005B, 0x0001, 0x0027, 0x0070
.word MON_DATA_BEAUTY_RIBBON_MASTER
.short 0x005C, 0x0001, 0x0028, 0x0071
.word MON_DATA_CUTE_RIBBON
.short 0x0059, 0x0002, 0x0029, 0x0072
.word MON_DATA_CUTE_RIBBON_GREAT
.short 0x005A, 0x0002, 0x002A, 0x0073
.word MON_DATA_CUTE_RIBBON_ULTRA
.short 0x005B, 0x0002, 0x002B, 0x0074
.word MON_DATA_CUTE_RIBBON_MASTER
.short 0x005C, 0x0002, 0x002C, 0x0075
.word MON_DATA_SMART_RIBBON
.short 0x0059, 0x0003, 0x002D, 0x0076
.word MON_DATA_SMART_RIBBON_GREAT
.short 0x005A, 0x0003, 0x002E, 0x0077
.word MON_DATA_SMART_RIBBON_ULTRA
.short 0x005B, 0x0003, 0x002F, 0x0078
.word MON_DATA_SMART_RIBBON_MASTER
.short 0x005C, 0x0003, 0x0030, 0x0079
.word MON_DATA_TOUGH_RIBBON
.short 0x0059, 0x0004, 0x0031, 0x007A
.word MON_DATA_TOUGH_RIBBON_GREAT
.short 0x005A, 0x0004, 0x0032, 0x007B
.word MON_DATA_TOUGH_RIBBON_ULTRA
.short 0x005B, 0x0004, 0x0033, 0x007C
.word MON_DATA_TOUGH_RIBBON_MASTER
.short 0x005C, 0x0004, 0x0034, 0x007D
.word MON_DATA_ABILITY_RIBBON
.short 0x005D, 0x0000, 0x0035, 0x007E
.word MON_DATA_GREAT_ABILITY_RIBBON
.short 0x005E, 0x0000, 0x0036, 0x007F
.word MON_DATA_DOUBLE_ABILITY_RIBBON
.short 0x005F, 0x0000, 0x0037, 0x0080
.word MON_DATA_MULTI_ABILITY_RIBBON
.short 0x0060, 0x0000, 0x0038, 0x0081
.word MON_DATA_PAIR_ABILITY_RIBBON
.short 0x0061, 0x0000, 0x0039, 0x0082
.word MON_DATA_WORLD_ABILITY_RIBBON
.short 0x0062, 0x0000, 0x003A, 0x0083
.word MON_DATA_ALERT_RIBBON
.short 0x0063, 0x0002, 0x003B, 0x0084
.word MON_DATA_SHOCK_RIBBON
.short 0x0064, 0x0000, 0x003C, 0x0085
.word MON_DATA_DOWNCAST_RIBBON
.short 0x0065, 0x0001, 0x003D, 0x0086
.word MON_DATA_CARELESS_RIBBON
.short 0x0066, 0x0002, 0x003E, 0x0087
.word MON_DATA_RELAX_RIBBON
.short 0x0067, 0x0003, 0x003F, 0x0088
.word MON_DATA_SNOOZE_RIBBON
.short 0x0068, 0x0000, 0x0040, 0x0089
.word MON_DATA_SMILE_RIBBON
.short 0x0069, 0x0002, 0x0041, 0x008A
.word MON_DATA_GORGEOUS_RIBBON
.short 0x006A, 0x0001, 0x0042, 0x008B
.word MON_DATA_ROYAL_RIBBON
.short 0x006B, 0x0003, 0x0043, 0x008C
.word MON_DATA_GORGEOUS_ROYAL_RIBBON
.short 0x006C, 0x0000, 0x0044, 0x008D
.word MON_DATA_FOOTPRINT_RIBBON
.short 0x006D, 0x0000, 0x0045, 0x008E
.word MON_DATA_RECORD_RIBBON
.short 0x006E, 0x0001, 0x0046, 0x008F
.word MON_DATA_HISTORY_RIBBON
.short 0x006F, 0x0003, 0x0047, 0x0090
.word MON_DATA_LEGEND_RIBBON
.short 0x0070, 0x0000, 0x0048, 0x0091
.word MON_DATA_RED_RIBBON
.short 0x0071, 0x0000, 0x0049, 0x8007
.word MON_DATA_GREEN_RIBBON
.short 0x0072, 0x0003, 0x004A, 0x8008
.word MON_DATA_BLUE_RIBBON
.short 0x0073, 0x0001, 0x004B, 0x8009
.word MON_DATA_FESTIVAL_RIBBON
.short 0x0074, 0x0001, 0x004C, 0x800A
.word MON_DATA_CARNIVAL_RIBBON
.short 0x0075, 0x0000, 0x004D, 0x800B
.word MON_DATA_CLASSIC_RIBBON
.short 0x0076, 0x0001, 0x004E, 0x800C
.word MON_DATA_PREMIER_RIBBON
.short 0x0077, 0x0000, 0x004F, 0x800D