summaryrefslogtreecommitdiff
path: root/asm/emerald.s
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-10-06 20:15:42 -0700
committerYamaArashi <shadow962@live.com>2015-10-06 20:15:42 -0700
commit65228e6fb8ee96d6ea2d10075c7e09c6e3fc4860 (patch)
tree2396833e04ad875593081a6ced799f85ec5abf08 /asm/emerald.s
parentdc52bd0d851dbab5fca188e44b936a0811f24ee9 (diff)
add type signatures
- many of these probably have mistakes
Diffstat (limited to 'asm/emerald.s')
-rw-r--r--asm/emerald.s351
1 files changed, 304 insertions, 47 deletions
diff --git a/asm/emerald.s b/asm/emerald.s
index 91e42cca2..c35638638 100644
--- a/asm/emerald.s
+++ b/asm/emerald.s
@@ -308,6 +308,7 @@ _08008CBA:
thumb_func_end sub_8008C94
thumb_func_start decimal_int_to_string
+@ int decimal_int_to_string(char *dest, int decimal_num, int mode, int max_digits)
decimal_int_to_string: @ 8008CC0
push {r4-r7,lr}
mov r7, r8
@@ -616,6 +617,7 @@ _08008ECA:
thumb_func_end sub_8008E20
thumb_func_start ExpandTextCodes
+@ char *ExpandTextCodes(char *dest, char *src)
ExpandTextCodes: @ 8008EE0
push {r4,r5,lr}
adds r4, r0, 0
@@ -931,8 +933,9 @@ _080090F2:
.pool
thumb_func_end get_fcode_buffer
- thumb_func_start sub_80090FC
-sub_80090FC: @ 80090FC
+ thumb_func_start RepeatChar
+@ int RepeatChar(char *dest, char c, u16 length)
+RepeatChar: @ 80090FC
push {lr}
adds r3, r0, 0
lsls r1, 24
@@ -956,7 +959,7 @@ _0800911C:
adds r0, r3, 0
pop {r1}
bx r1
- thumb_func_end sub_80090FC
+ thumb_func_end RepeatChar
thumb_func_start sub_8009128
sub_8009128: @ 8009128
@@ -1014,7 +1017,7 @@ sub_800917C: @ 800917C
lsls r2, r1, 16
lsrs r2, 16
movs r1, 0xFF
- bl sub_80090FC
+ bl RepeatChar
pop {r1}
bx r1
thumb_func_end sub_800917C
@@ -47275,7 +47278,7 @@ sub_8020584: @ 8020584
movs r0, 0
movs r2, 0x20
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
movs r0, 0x20
str r0, [sp]
str r0, [sp, 0x4]
@@ -47386,7 +47389,7 @@ sub_8020680: @ 8020680
movs r0, 0
movs r2, 0x20
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
pop {r0}
bx r0
.align 2, 0
@@ -77973,6 +77976,7 @@ sub_802F6C8: @ 802F6C8
thumb_func_end sub_802F6C8
thumb_func_start c2_title_menu_2
+@ void c2_title_menu_2()
c2_title_menu_2: @ 802F6DC
push {lr}
movs r0, 0
@@ -77982,6 +77986,7 @@ c2_title_menu_2: @ 802F6DC
thumb_func_end c2_title_menu_2
thumb_func_start c2_title_menu_2_dupe
+@ void c2_title_menu_2_dupe()
c2_title_menu_2_dupe: @ 802F6E8
push {lr}
movs r0, 0x1
@@ -77991,6 +77996,7 @@ c2_title_menu_2_dupe: @ 802F6E8
thumb_func_end c2_title_menu_2_dupe
thumb_func_start init_title_menu
+@ void init_title_menu(int useless_param)
init_title_menu: @ 802F6F4
push {r4,r5,lr}
sub sp, 0xC
@@ -78170,6 +78176,7 @@ _0802F7FE:
thumb_func_end init_title_menu
thumb_func_start task_init_title_menu_graphics
+@ void task_init_title_menu_graphics(int task_id)
task_init_title_menu_graphics: @ 802F8D8
push {r4-r7,lr}
mov r7, r8
@@ -78498,6 +78505,7 @@ _0802FB8C:
thumb_func_end task_init_title_menu_battery_dry
thumb_func_start task_init_title_menu_graphics_3
+@ void task_init_title_menu_graphics_3(int task_id)
task_init_title_menu_graphics_3: @ 802FBA4
push {r4-r7,lr}
mov r7, r9
@@ -78997,6 +79005,7 @@ _0803006C:
thumb_func_end task_init_title_menu_graphics_3
thumb_func_start task_title_menu_highlight_selected_menu_items
+@ void task_title_menu_highlight_selected_menu_items(int task_id)
task_title_menu_highlight_selected_menu_items: @ 80300B0
push {r4,lr}
lsls r0, 24
@@ -79219,6 +79228,7 @@ _0803026C:
thumb_func_end task_title_menu_handle_input
thumb_func_start title_menu_handle_keypad_a_pressed
+@ void title_menu_handle_keypad_a_pressed(int task_id)
title_menu_handle_keypad_a_pressed: @ 803027C
push {r4-r7,lr}
sub sp, 0x4
@@ -79713,6 +79723,7 @@ _08030688:
thumb_func_end sub_80305A4
thumb_func_start title_menu_highlight_selected_menu_items
+@ void title_menu_highlight_selected_menu_items(u8 a1, u8 selected_menu_item, u16 a3)
title_menu_highlight_selected_menu_items: @ 8030698
push {r4-r6,lr}
lsls r0, 24
@@ -79867,6 +79878,7 @@ _080307A4:
thumb_func_end title_menu_highlight_selected_menu_items
thumb_func_start task_new_game_prof_birch_speech_1
+@ void task_new_game_prof_birch_speech_1(int task_id)
task_new_game_prof_birch_speech_1: @ 80307B0
push {r4,r5,lr}
sub sp, 0x4
@@ -80023,6 +80035,7 @@ _0803091A:
thumb_func_end task_new_game_prof_birch_speech_2
thumb_func_start task_new_game_prof_birch_speech_3
+@ int task_new_game_prof_birch_speech_3()
task_new_game_prof_birch_speech_3: @ 8030928
push {r4,lr}
lsls r0, 24
@@ -82495,6 +82508,7 @@ sub_8031DB4: @ 8031DB4
thumb_func_end sub_8031DB4
thumb_func_start set_default_player_name
+@ void set_default_player_name(int name_id)
set_default_player_name: @ 8031DC4
push {r4,r5,lr}
lsls r0, 24
@@ -82539,6 +82553,7 @@ _08031DF0:
thumb_func_end set_default_player_name
thumb_func_start draw_text_box
+@ void draw_text_box(void *text_ptr)
draw_text_box: @ 8031E18
push {r4,lr}
sub sp, 0xC
@@ -82858,6 +82873,7 @@ unknown_title_pattern_data_to_vram: @ 80320A4
thumb_func_end unknown_title_pattern_data_to_vram
thumb_func_start write_textbox_border_to_bg_tilemap
+@ void write_textbox_border_to_bg_tilemap(struct rbox_template *box, int base_tile_num)
write_textbox_border_to_bg_tilemap: @ 80320EC
push {r4-r7,lr}
mov r7, r10
@@ -87415,6 +87431,7 @@ dp01_build_cmdbuf_x37_a: @ 80344C8
thumb_func_end dp01_build_cmdbuf_x37_a
thumb_func_start call_LZZUnCompWram
+@ void call_LZZUnCompWram(void *src, void *dest)
call_LZZUnCompWram: @ 8034518
push {lr}
bl LZ77UnCompWram
@@ -87423,6 +87440,7 @@ call_LZZUnCompWram: @ 8034518
thumb_func_end call_LZZUnCompWram
thumb_func_start call_LZZUnCompVram
+@ void call_LZZUnCompVram(void *src, void *dest)
call_LZZUnCompVram: @ 8034524
push {lr}
bl LZ77UnCompVram
@@ -87431,6 +87449,7 @@ call_LZZUnCompVram: @ 8034524
thumb_func_end call_LZZUnCompVram
thumb_func_start gpu_tile_obj_decompress_and_load
+@ u16 gpu_tile_obj_decompress_and_load(struct rom_obj_tile_data *x)
gpu_tile_obj_decompress_and_load: @ 8034530
push {r4,r5,lr}
sub sp, 0x8
@@ -87458,6 +87477,7 @@ gpu_tile_obj_decompress_and_load: @ 8034530
thumb_func_end gpu_tile_obj_decompress_and_load
thumb_func_start gpu_tile_obj_decompress_and_load2
+@ void gpu_tile_obj_decompress_and_load2(struct rom_obj_tile_data *x, void *dest)
gpu_tile_obj_decompress_and_load2: @ 8034564
push {r4,r5,lr}
sub sp, 0x8
@@ -87480,6 +87500,7 @@ gpu_tile_obj_decompress_and_load2: @ 8034564
thumb_func_end gpu_tile_obj_decompress_and_load2
thumb_func_start gpu_pal_obj_decompress_and_apply
+@ void gpu_pal_obj_decompress_and_apply(struct rom_obj_pal_data *x)
gpu_pal_obj_decompress_and_apply: @ 803458C
push {r4,r5,lr}
sub sp, 0x8
@@ -87506,6 +87527,7 @@ gpu_pal_obj_decompress_and_apply: @ 803458C
thumb_func_end gpu_pal_obj_decompress_and_apply
thumb_func_start gpu_pal_obj_decompress_and_apply2
+@ void gpu_pal_obj_decompress_and_apply2(struct rom_obj_pal_data *x, void *dest)
gpu_pal_obj_decompress_and_apply2: @ 80345C0
push {r4,r5,lr}
sub sp, 0x8
@@ -87531,6 +87553,7 @@ gpu_pal_obj_decompress_and_apply2: @ 80345C0
thumb_func_end gpu_pal_obj_decompress_and_apply2
thumb_func_start sub_80345F0
+@ void sub_80345F0(void **a1, void *a2, int species_num)
sub_80345F0: @ 80345F0
push {r4,r5,lr}
adds r3, r0, 0
@@ -87560,6 +87583,7 @@ _08034618:
thumb_func_end sub_80345F0
thumb_func_start sub_8034628
+@ void sub_8034628(int *a1, void *a2, int species_num, int a4)
sub_8034628: @ 8034628
push {r4,r5,lr}
sub sp, 0x4
@@ -87586,6 +87610,7 @@ _0803463E:
thumb_func_end sub_8034628
thumb_func_start sub_8034654
+@ void sub_8034654(void **a1, void *a2, int species_num, unsigned int a4, u8 a5)
sub_8034654: @ 8034654
push {r4-r7,lr}
mov r7, r8
@@ -88047,6 +88072,7 @@ sub_8034974: @ 8034974
thumb_func_end sub_8034974
thumb_func_start gpu_tile_obj_decompress_and_load3
+@ u16 gpu_tile_obj_decompress_and_load3(struct rom_obj_tile_data *x)
gpu_tile_obj_decompress_and_load3: @ 8034988
push {r4,r5,lr}
sub sp, 0x8
@@ -88077,6 +88103,7 @@ gpu_tile_obj_decompress_and_load3: @ 8034988
thumb_func_end gpu_tile_obj_decompress_and_load3
thumb_func_start gpu_pal_obj_decompress_and_apply3
+@ int gpu_pal_obj_decompress_and_apply3(struct rom_obj_pal_data *x)
gpu_pal_obj_decompress_and_apply3: @ 80349C4
push {r4,r5,lr}
sub sp, 0x8
@@ -88110,6 +88137,7 @@ gpu_pal_obj_decompress_and_apply3: @ 80349C4
thumb_func_end gpu_pal_obj_decompress_and_apply3
thumb_func_start LZ77UnCompAnyRam
+@ void LZ77UnCompAnyRam(void **a1, void *a2, int species_num)
LZ77UnCompAnyRam: @ 8034A08
push {r4,r5,lr}
adds r3, r0, 0
@@ -88139,6 +88167,7 @@ _08034A30:
thumb_func_end LZ77UnCompAnyRam
thumb_func_start load_poke_gfx_probably
+@ void load_poke_gfx_probably(void **a1, void *a2, int species_num, int a4, u8 a5)
load_poke_gfx_probably: @ 8034A40
push {r4-r7,lr}
mov r7, r8
@@ -88238,6 +88267,7 @@ _08034ADC:
thumb_func_end load_poke_gfx_probably
thumb_func_start help_system_enable_unless_flashback__sp199
+@ void help_system_enable_unless_flashback__sp199(int *a1, void *a2, int species_num, int a4)
help_system_enable_unless_flashback__sp199: @ 8034AFC
push {r4,r5,lr}
sub sp, 0x4
@@ -88264,6 +88294,7 @@ _08034B12:
thumb_func_end help_system_enable_unless_flashback__sp199
thumb_func_start sub_8034B28
+@ void sub_8034B28(void **a1, void *a2, int species_num)
sub_8034B28: @ 8034B28
push {lr}
adds r3, r0, 0
@@ -88286,6 +88317,7 @@ _08034B4A:
thumb_func_end sub_8034B28
thumb_func_start sub_8034B50
+@ void sub_8034B50(int a1, int a2)
sub_8034B50: @ 8034B50
push {r4,r5,lr}
sub sp, 0x4
@@ -88312,6 +88344,7 @@ _08034B66:
thumb_func_end sub_8034B50
thumb_func_start sub_8034B7C
+@ void sub_8034B7C(void **a1, void *a2, int species_num, int a4, u8 a5)
sub_8034B7C: @ 8034B7C
push {r4-r7,lr}
mov r7, r8
@@ -88408,6 +88441,7 @@ _08034C18:
thumb_func_end sub_8034B7C
thumb_func_start duplicate_deoxys_graphics_data
+@ void duplicate_deoxys_graphics_data(int a1, int species_num)
duplicate_deoxys_graphics_data: @ 8034C30
push {lr}
adds r3, r0, 0
@@ -137156,7 +137190,7 @@ sub_804F220: @ 804F220
lsls r2, 16
lsrs r2, 16
movs r1, 0x77
- bl sub_80090FC
+ bl RepeatChar
adds r5, r0, 0
cmp r7, 0xFF
beq _0804F320
@@ -166517,6 +166551,7 @@ _0805ED56:
thumb_func_end sub_805EC84
thumb_func_start sub_805ED70
+@ int sub_805ED70(obj *a1)
sub_805ED70: @ 805ED70
push {r4-r7,lr}
mov r7, r8
@@ -183226,6 +183261,7 @@ nullsub_92: @ 8067A70
thumb_func_end nullsub_92
thumb_func_start zero_pokemon_boxed_data
+@ void zero_pokemon_boxed_data(pokemon *mon)
zero_pokemon_boxed_data: @ 8067A74
push {lr}
adds r2, r0, 0
@@ -183242,6 +183278,7 @@ _08067A7C:
thumb_func_end zero_pokemon_boxed_data
thumb_func_start zero_pokemon_struct
+@ void zero_pokemon_struct(pokemon *mon)
zero_pokemon_struct: @ 8067A8C
push {r4,lr}
sub sp, 0x4
@@ -183298,6 +183335,7 @@ zero_pokemon_struct: @ 8067A8C
thumb_func_end zero_pokemon_struct
thumb_func_start zero_player_party_data
+@ void zero_player_party_data()
zero_player_party_data: @ 8067B0C
push {r4,r5,lr}
ldr r4, =0x020244ec
@@ -183338,6 +183376,7 @@ _08067B36:
thumb_func_end zero_enemy_party_data
thumb_func_start create_pokemon_set_level
+@ void create_pokemon_set_level(pokemon *mon, s16 species_num, u8 level, u8 forced_iv, char pokemon_id_is_nonrandom, int pokemon_id, u8 trainer_id_mode, int trainer_id)
create_pokemon_set_level: @ 8067B4C
push {r4-r7,lr}
mov r7, r8
@@ -183393,6 +183432,7 @@ create_pokemon_set_level: @ 8067B4C
thumb_func_end create_pokemon_set_level
thumb_func_start create_pokemon
+@ void create_pokemon(pokemon *mon, s16 species_num, u8 level, u8 forced_iv, char pokemon_id_is_nonrandom, int pokemon_id, u8 trainer_id_mode, int trainer_id)
create_pokemon: @ 8067BBC
push {r4-r7,lr}
mov r7, r10
@@ -185409,6 +185449,7 @@ _08068C60:
thumb_func_end sub_8068C18
thumb_func_start pokemon_calc_checksum
+@ int pokemon_calc_checksum(pokemon *mon)
pokemon_calc_checksum: @ 8068C78
push {r4-r7,lr}
mov r7, r8
@@ -188164,6 +188205,7 @@ _0806A20A:
thumb_func_end sub_806A1C0
thumb_func_start pokemon_encrypt
+@ void pokemon_encrypt(pokemon *mon)
pokemon_encrypt: @ 806A228
push {r4,lr}
adds r3, r0, 0
@@ -188187,6 +188229,7 @@ _0806A232:
thumb_func_end pokemon_encrypt
thumb_func_start pokemon_decrypt
+@ void pokemon_decrypt(pokemon *mon)
pokemon_decrypt: @ 806A24C
push {r4,lr}
adds r3, r0, 0
@@ -188210,6 +188253,7 @@ _0806A256:
thumb_func_end pokemon_decrypt
thumb_func_start pokemon_data_permutator
+@ int pokemon_data_permutator(pokemon *mon, int a2, u8 a3)
pokemon_data_permutator: @ 806A270
push {r4-r6,lr}
adds r5, r0, 0
@@ -188600,6 +188644,7 @@ _0806A510:
thumb_func_end pokemon_data_permutator
thumb_func_start pokemon_getattr
+@ int pokemon_getattr(pokemon *mon, enum pokemon_data_request req, void *data)
pokemon_getattr: @ 806A518
push {r4,lr}
adds r4, r0, 0
@@ -188757,6 +188802,7 @@ _0806A66E:
thumb_func_end pokemon_getattr
thumb_func_start pokemon_getattr_encrypted
+@ int pokemon_getattr_encrypted(pokemon *mon, enum pokemon_data_request req, void *data)
pokemon_getattr_encrypted: @ 806A674
push {r4-r7,lr}
mov r7, r10
@@ -189559,6 +189605,7 @@ _0806AC98:
thumb_func_end pokemon_getattr_encrypted
thumb_func_start pokemon_setattr
+@ int pokemon_setattr(pokemon *mon, enum pokemon_data_request req, void *data)
pokemon_setattr: @ 806ACAC
push {lr}
adds r3, r0, 0
@@ -189683,6 +189730,7 @@ _0806AD96:
thumb_func_end pokemon_setattr
thumb_func_start pokemon_setattr_encrypted
+@ int pokemon_setattr_encrypted(pokemon *mon, enum pokemon_data_request req, void *data)
pokemon_setattr_encrypted: @ 806AD9C
push {r4-r7,lr}
mov r7, r10
@@ -190492,6 +190540,7 @@ _0806B3EC:
thumb_func_end pokemon_setattr_encrypted
thumb_func_start memcpy_pokemon
+@ void *memcpy_pokemon(void *dest, void *src, unsigned int size)
memcpy_pokemon: @ 806B408
push {lr}
bl memcpy
@@ -190500,6 +190549,7 @@ memcpy_pokemon: @ 806B408
thumb_func_end memcpy_pokemon
thumb_func_start pokemon_catch
+@ int pokemon_catch(pokemon *mon)
pokemon_catch: @ 806B414
push {r4-r6,lr}
adds r6, r0, 0
@@ -190560,6 +190610,7 @@ _0806B48A:
thumb_func_end pokemon_catch
thumb_func_start pokemon_add_to_pc
+@ int pokemon_add_to_pc(pokemon *mon)
pokemon_add_to_pc: @ 806B490
push {r4-r7,lr}
mov r7, r8
@@ -190637,6 +190688,7 @@ _0806B530:
thumb_func_end pokemon_add_to_pc
thumb_func_start calc_player_party_count
+@ u8 calc_player_party_count()
calc_player_party_count: @ 806B53C
push {r4,lr}
ldr r0, =0x020244e9
@@ -190675,6 +190727,7 @@ _0806B572:
thumb_func_end calc_player_party_count
thumb_func_start calc_enemy_party_count
+@ u8 calc_enemy_party_count()
calc_enemy_party_count: @ 806B580
push {r4,lr}
ldr r0, =0x020244ea
@@ -190822,6 +190875,7 @@ _0806B68C:
thumb_func_end sub_806B638
thumb_func_start sub_806B694
+@ int sub_806B694(u16 a1, int a2)
sub_806B694: @ 806B694
push {lr}
lsls r0, 16
@@ -191147,6 +191201,7 @@ _0806B90E:
thumb_func_end sub_806B8E4
thumb_func_start get_pokemon_name
+@ void get_pokemon_name(char *dest, u16 species_num)
get_pokemon_name: @ 806B914
push {r4-r7,lr}
adds r6, r0, 0
@@ -193979,6 +194034,7 @@ _0806D04E:
thumb_func_end sub_806CF78
thumb_func_start get_nature
+@ u8 get_nature(pokemon *mon)
get_nature: @ 806D070
push {lr}
movs r1, 0
@@ -198832,6 +198888,7 @@ _0806F530:
thumb_func_end sub_806F4F8
thumb_func_start sine
+@ s16 sine(s16 t, s16 amplitude)
sine: @ 806F534
lsls r1, 16
asrs r1, 16
@@ -198850,6 +198907,7 @@ sine: @ 806F534
thumb_func_end sine
thumb_func_start cosine
+@ s16 cosine(s16 t, s16 amplitude)
cosine: @ 806F550
lsls r1, 16
asrs r1, 16
@@ -198869,6 +198927,7 @@ cosine: @ 806F550
thumb_func_end cosine
thumb_func_start sine2
+@ s16 sine2(u16 angle)
sine2: @ 806F570
push {r4,r5,lr}
adds r5, r0, 0
@@ -198906,6 +198965,7 @@ _0806F5AC:
thumb_func_end sine2
thumb_func_start cosine2
+@ s16 cosine2(u16 angle)
cosine2: @ 806F5B4
push {lr}
lsls r0, 16
@@ -198921,6 +198981,7 @@ cosine2: @ 806F5B4
thumb_func_end cosine2
thumb_func_start GenerateRandomNumber
+@ u16 GenerateRandomNumber()
GenerateRandomNumber: @ 806F5CC
ldr r2, =0x03005d80
ldr r1, [r2]
@@ -198940,6 +199001,7 @@ GenerateRandomNumber: @ 806F5CC
thumb_func_end GenerateRandomNumber
thumb_func_start SeedRng
+@ void SeedRng(u16 seed)
SeedRng: @ 806F5F8
lsls r0, 16
lsrs r0, 16
@@ -213541,6 +213603,7 @@ _08076B4E:
thumb_func_end sub_8076B14
thumb_func_start flash_timeout_start_on_timer_2_when_flash_present
+@ void flash_timeout_start_on_timer_2_when_flash_present()
flash_timeout_start_on_timer_2_when_flash_present: @ 8076B68
push {lr}
bl IdentifyFlash
@@ -213797,6 +213860,7 @@ sav2_gender2_inplace_and_xFE: @ 8076D78
thumb_func_end sav2_gender2_inplace_and_xFE
thumb_func_start copy_player_party_to_sav1
+@ void copy_player_party_to_sav1()
copy_player_party_to_sav1: @ 8076D8C
push {r4,lr}
ldr r0, =0x03005d8c
@@ -238741,6 +238805,7 @@ set_max_playtime: @ 80842A4
thumb_func_end set_max_playtime
thumb_func_start write_word_to_mem
+@ void write_word_to_mem(int value, int *mem)
write_word_to_mem: @ 80842CC
strb r0, [r1]
lsrs r2, r0, 8
@@ -239533,6 +239598,7 @@ mapdata_load_assets_to_gpu_and_full_redraw: @ 8084980
thumb_func_end mapdata_load_assets_to_gpu_and_full_redraw
thumb_func_start get_mapdata_header
+@ mapdata_header *get_mapdata_header()
get_mapdata_header: @ 80849A8
push {lr}
ldr r0, =0x03005d8c
@@ -239558,6 +239624,7 @@ _080849C6:
thumb_func_end get_mapdata_header
thumb_func_start warp_shift
+@ void warp_shift()
warp_shift: @ 80849D0
ldr r3, =0x020322dc
ldr r0, =0x03005d8c
@@ -239586,6 +239653,7 @@ warp_shift: @ 80849D0
thumb_func_end warp_shift
thumb_func_start set_warp2_warp3_to_neg_1
+@ void set_warp2_warp3_to_neg_1()
set_warp2_warp3_to_neg_1: @ 8084A14
ldr r2, =0x020322ec
ldr r0, =0x08339d3c
@@ -239602,6 +239670,7 @@ set_warp2_warp3_to_neg_1: @ 8084A14
thumb_func_end set_warp2_warp3_to_neg_1
thumb_func_start warp_set
+@ void warp_set(warpdata *warp, char bank, char map, char warpid, char enter_x, char enter_y)
warp_set: @ 8084A34
push {r4,r5,lr}
ldr r4, [sp, 0xC]
@@ -239621,6 +239690,7 @@ warp_set: @ 8084A34
thumb_func_end warp_set
thumb_func_start warp_data_is_not_neg_1
+@ int warp_data_is_not_neg_1(warpdata *warp)
warp_data_is_not_neg_1: @ 8084A54
push {lr}
adds r1, r0, 0
@@ -239656,6 +239726,7 @@ _08084A8A:
thumb_func_end warp_data_is_not_neg_1
thumb_func_start get_mapheader_by_bank_and_number
+@ struct mapheader *get_mapheader_by_bank_and_number(unsigned int bank, unsigned int num)
get_mapheader_by_bank_and_number: @ 8084A90
lsls r0, 16
lsls r1, 16
@@ -239672,6 +239743,7 @@ get_mapheader_by_bank_and_number: @ 8084A90
thumb_func_end get_mapheader_by_bank_and_number
thumb_func_start warp1_get_mapheader
+@ struct mapheader *warp1_get_mapheader()
warp1_get_mapheader: @ 8084AA8
push {lr}
ldr r1, =0x020322e4
@@ -239692,6 +239764,7 @@ warp1_get_mapheader: @ 8084AA8
thumb_func_end warp1_get_mapheader
thumb_func_start set_current_map_header_from_sav1_save_old_name
+@ void set_current_map_header_from_sav1_save_old_name()
set_current_map_header_from_sav1_save_old_name: @ 8084ACC
push {r4-r6,lr}
ldr r1, =0x020322fc
@@ -239762,6 +239835,7 @@ set_current_map_header_from_sav1: @ 8084B1C
thumb_func_end set_current_map_header_from_sav1
thumb_func_start update_camera_pos_from_warpid
+@ void update_camera_pos_from_warpid()
update_camera_pos_from_warpid: @ 8084B5C
push {r4,r5,lr}
ldr r0, =0x03005d8c
@@ -239838,6 +239912,7 @@ warp_in: @ 8084BD8
thumb_func_end warp_in
thumb_func_start warp1_set
+@ void warp1_set(char bank, char map, char warpid, char enter_x, char enter_y)
warp1_set: @ 8084BEC
push {r4-r6,lr}
sub sp, 0x8
@@ -239871,6 +239946,7 @@ warp1_set: @ 8084BEC
thumb_func_end warp1_set
thumb_func_start warp1_set_2
+@ void warp1_set_2(char bank, char map, char warpid)
warp1_set_2: @ 8084C28
push {lr}
sub sp, 0x4
@@ -239890,6 +239966,7 @@ warp1_set_2: @ 8084C28
thumb_func_end warp1_set_2
thumb_func_start saved_warp2_set
+@ void saved_warp2_set(char bank, char map, char warpid)
saved_warp2_set: @ 8084C48
push {r4,r5,lr}
sub sp, 0x8
@@ -239963,6 +240040,7 @@ copy_saved_warp2_bank_and_enter_x_to_warp1: @ 8084CB4
thumb_func_end copy_saved_warp2_bank_and_enter_x_to_warp1
thumb_func_start sub_8084CCC
+@ void sub_8084CCC(int a1)
sub_8084CCC: @ 8084CCC
push {r4,lr}
sub sp, 0x4
@@ -239993,6 +240071,7 @@ _08084CFA:
thumb_func_end sub_8084CCC
thumb_func_start copy_saved_warp3_bank_and_enter_x_to_warp1
+@ void copy_saved_warp3_bank_and_enter_x_to_warp1()
copy_saved_warp3_bank_and_enter_x_to_warp1: @ 8084D04
ldr r2, =0x020322e4
ldr r0, =0x03005d8c
@@ -241875,6 +241954,7 @@ _08085B62:
thumb_func_end sub_8085B2C
thumb_func_start get_map_light_level_by_bank_and_number
+@ int get_map_light_level_by_bank_and_number(int bank, int number)
get_map_light_level_by_bank_and_number: @ 8085B74
push {lr}
lsls r0, 24
@@ -241890,6 +241970,7 @@ get_map_light_level_by_bank_and_number: @ 8085B74
thumb_func_end get_map_light_level_by_bank_and_number
thumb_func_start get_map_light_level_from_warp
+@ int get_map_light_level_from_warp(warpdata *warp)
get_map_light_level_from_warp: @ 8085B8C
push {lr}
movs r2, 0
@@ -242066,6 +242147,7 @@ sav1_map_get_battletype: @ 8085C80
thumb_func_end sav1_map_get_battletype
thumb_func_start overworld_bg_setup
+@ void overworld_bg_setup()
overworld_bg_setup: @ 8085CA8
push {r4-r6,lr}
mov r6, r8
@@ -242167,6 +242249,7 @@ flag_clear_is_in_safari_zone_: @ 8085D80
thumb_func_end flag_clear_is_in_safari_zone_
thumb_func_start is_c1_link_related_active
+@ _BOOL4 is_c1_link_related_active()
is_c1_link_related_active: @ 8085D8C
push {lr}
ldr r0, =0x030022c0
@@ -242186,6 +242269,7 @@ _08085DA6:
thumb_func_end is_c1_link_related_active
thumb_func_start c1_overworld_normal
+@ void c1_overworld_normal(int buttons_new, int buttons_held)
c1_overworld_normal: @ 8085DAC
push {r4-r6,lr}
sub sp, 0x4
@@ -242793,6 +242877,7 @@ _08086308:
thumb_func_end sub_8086230
thumb_func_start sub_808631C
+@ void sub_808631C()
sub_808631C: @ 808631C
push {r4,lr}
bl warp0_in_pokecenter
@@ -243025,6 +243110,7 @@ _08086514:
thumb_func_end map_loading_iteration_3
thumb_func_start load_map_stuff
+@ int load_map_stuff(u8 *a1, int a2)
load_map_stuff: @ 808651C
push {r4,r5,lr}
adds r4, r0, 0
@@ -246274,6 +246360,7 @@ _08087E56:
thumb_func_end mapheader_copy_mapdata_with_padding
thumb_func_start map_copy_with_padding
+@ int map_copy_with_padding(void *src)
map_copy_with_padding: @ 8087E70
push {r4-r7,lr}
mov r7, r9
@@ -246795,6 +246882,7 @@ _0808821E:
thumb_func_end cur_mapdata_get_middle2bit_at
thumb_func_start cur_mapdata_get_blockid_at
+@ int cur_mapdata_get_blockid_at(int x, int y)
cur_mapdata_get_blockid_at: @ 8088224
push {r4-r6,lr}
adds r5, r0, 0
@@ -246876,6 +246964,7 @@ _080882B0:
thumb_func_end cur_mapdata_get_blockid_at
thumb_func_start cur_mapdata_block_get_role_at
+@ int cur_mapdata_block_get_role_at(int x, int y)
cur_mapdata_block_get_role_at: @ 80882BC
push {lr}
bl cur_mapdata_get_blockid_at
@@ -246890,6 +246979,7 @@ cur_mapdata_block_get_role_at: @ 80882BC
thumb_func_end cur_mapdata_block_get_role_at
thumb_func_start cur_mapdata_block_get_bgs_at
+@ int cur_mapdata_block_get_bgs_at(int x, int y)
cur_mapdata_block_get_bgs_at: @ 80882D4
push {lr}
bl cur_mapdata_get_blockid_at
@@ -246976,6 +247066,7 @@ _08088364:
thumb_func_end sub_8088338
thumb_func_start cur_mapdata_get_behaviour_by_blockid
+@ int cur_mapdata_get_behaviour_by_blockid(u16 block_id)
cur_mapdata_get_behaviour_by_blockid: @ 8088370
push {lr}
lsls r0, 16
@@ -248196,6 +248287,7 @@ _08088C2E:
thumb_func_end sub_8088BF0
thumb_func_start copy_tileset_patterns_to_vram
+@ void copy_tileset_patterns_to_vram(tileset *tileset, int num_tiles, int offset)
copy_tileset_patterns_to_vram: @ 8088C34
push {r4-r7,lr}
sub sp, 0x4
@@ -248234,6 +248326,7 @@ _08088C70:
thumb_func_end copy_tileset_patterns_to_vram
thumb_func_start copy_tileset_patterns_to_vram2
+@ void copy_tileset_patterns_to_vram2(tileset *tileset, int num_tiles, int offset)
copy_tileset_patterns_to_vram2: @ 8088C78
push {r4-r7,lr}
sub sp, 0x4
@@ -248282,6 +248375,7 @@ nullsub_90: @ 8088CC0
thumb_func_end nullsub_90
thumb_func_start apply_map_tileset_palette
+@ void apply_map_tileset_palette(tileset *tileset, int dest_offset, int size)
apply_map_tileset_palette: @ 8088CC4
push {r4-r7,lr}
mov r7, r8
@@ -248351,6 +248445,7 @@ _08088D42:
thumb_func_end apply_map_tileset_palette
thumb_func_start copy_map_tileset1_to_vram
+@ void copy_map_tileset1_to_vram(mapdata_header *a1)
copy_map_tileset1_to_vram: @ 8088D50
push {lr}
ldr r0, [r0, 0x10]
@@ -248363,6 +248458,7 @@ copy_map_tileset1_to_vram: @ 8088D50
thumb_func_end copy_map_tileset1_to_vram
thumb_func_start copy_map_tileset2_to_vram
+@ void copy_map_tileset2_to_vram(mapdata_header *a1)
copy_map_tileset2_to_vram: @ 8088D64
push {lr}
ldr r0, [r0, 0x14]
@@ -248375,6 +248471,7 @@ copy_map_tileset2_to_vram: @ 8088D64
thumb_func_end copy_map_tileset2_to_vram
thumb_func_start copy_map_tileset2_to_vram_2
+@ void copy_map_tileset2_to_vram_2(mapdata_header *a1)
copy_map_tileset2_to_vram_2: @ 8088D78
push {lr}
ldr r0, [r0, 0x14]
@@ -248387,6 +248484,7 @@ copy_map_tileset2_to_vram_2: @ 8088D78
thumb_func_end copy_map_tileset2_to_vram_2
thumb_func_start apply_map_tileset1_palette
+@ void apply_map_tileset1_palette(mapdata_header *a1)
apply_map_tileset1_palette: @ 8088D8C
push {lr}
ldr r0, [r0, 0x10]
@@ -248398,6 +248496,7 @@ apply_map_tileset1_palette: @ 8088D8C
thumb_func_end apply_map_tileset1_palette
thumb_func_start apply_map_tileset2_palette
+@ void apply_map_tileset2_palette(mapdata_header *a1)
apply_map_tileset2_palette: @ 8088D9C
push {lr}
ldr r0, [r0, 0x14]
@@ -248409,6 +248508,7 @@ apply_map_tileset2_palette: @ 8088D9C
thumb_func_end apply_map_tileset2_palette
thumb_func_start copy_map_tileset1_tileset2_to_vram
+@ void copy_map_tileset1_tileset2_to_vram(mapdata_header *a1)
copy_map_tileset1_tileset2_to_vram: @ 8088DAC
push {r4,r5,lr}
adds r5, r0, 0
@@ -248431,6 +248531,7 @@ _08088DCC:
thumb_func_end copy_map_tileset1_tileset2_to_vram
thumb_func_start apply_map_tileset1_tileset2_palette
+@ void apply_map_tileset1_tileset2_palette(mapdata_header *a1)
apply_map_tileset1_tileset2_palette: @ 8088DD4
push {r4,lr}
adds r4, r0, 0
@@ -251031,6 +251132,7 @@ _08089B54:
thumb_func_end sub_8089B44
thumb_func_start move_tilemap_camera_to_upper_left_corner_
+@ void move_tilemap_camera_to_upper_left_corner_(struc_28 *a1)
move_tilemap_camera_to_upper_left_corner_: @ 8089B58
movs r1, 0
strb r1, [r0, 0x2]
@@ -251072,6 +251174,7 @@ coords8_add: @ 8089B84
thumb_func_end coords8_add
thumb_func_start move_tilemap_camera_to_upper_left_corner
+@ void move_tilemap_camera_to_upper_left_corner()
move_tilemap_camera_to_upper_left_corner: @ 8089B94
push {lr}
ldr r0, =0x03000e20
@@ -251149,6 +251252,7 @@ sub_8089C08: @ 8089C08
thumb_func_end sub_8089C08
thumb_func_start cur_mapdata_full_redraw
+@ void cur_mapdata_full_redraw()
cur_mapdata_full_redraw: @ 8089C34
push {lr}
ldr r0, =0x03005d8c
@@ -251170,6 +251274,7 @@ cur_mapdata_full_redraw: @ 8089C34
thumb_func_end cur_mapdata_full_redraw
thumb_func_start cur_mapdata_redraw_all_blocks_at
+@ void cur_mapdata_redraw_all_blocks_at(int x, int y, mapdata_header *mapdata_header)
cur_mapdata_redraw_all_blocks_at: @ 8089C60
push {r4-r7,lr}
mov r7, r10
@@ -251544,6 +251649,7 @@ _08089F04:
thumb_func_end overworld_draw_block_type1_on_map_coord
thumb_func_start cur_mapdata_draw_block_at_internal
+@ void cur_mapdata_draw_block_at_internal(mapdata_header *mapdata_header, u16 offset, int x, int y)
cur_mapdata_draw_block_at_internal: @ 8089F10
push {r4-r7,lr}
mov r7, r8
@@ -251600,6 +251706,7 @@ _08089F54:
thumb_func_end cur_mapdata_draw_block_at_internal
thumb_func_start overworld_draw_block
+@ void overworld_draw_block(int bg, void *block, u16 offset)
overworld_draw_block: @ 8089F78
push {r4,lr}
adds r4, r1, 0
@@ -252970,6 +253077,7 @@ sub_808A9BC: @ 808A9BC
thumb_func_end sub_808A9BC
thumb_func_start player_step
+@ void player_step(int dpad_direction, int buttons_new, int buttons_held)
player_step: @ 808A9C0
push {r4-r7,lr}
mov r7, r8
@@ -253079,6 +253187,7 @@ _0808AA94:
thumb_func_end sub_808AA38
thumb_func_start npc_clear_strange_bits
+@ int npc_clear_strange_bits(npc_state *)
npc_clear_strange_bits: @ 808AA9C
ldrb r2, [r0, 0x1]
movs r1, 0x11
@@ -253101,6 +253210,7 @@ npc_clear_strange_bits: @ 808AA9C
thumb_func_end npc_clear_strange_bits
thumb_func_start player_step_by_keypad
+@ void player_step_by_keypad(int dpad_direction, int buttons_new, int buttons_held)
player_step_by_keypad: @ 808AAC0
push {r4,lr}
lsls r0, 24
@@ -253614,6 +253724,7 @@ _0808AE62:
thumb_func_end sub_808AE10
thumb_func_start dp04_continue_movement
+@ void dp04_continue_movement(int dpad_direction, int buttons_held)
dp04_continue_movement: @ 808AE68
push {r4-r6,lr}
adds r4, r0, 0
@@ -255253,6 +255364,7 @@ player_get_pos_to_plus_one_step_in_direction_player_is_facing: @ 808BA68
thumb_func_end player_get_pos_to_plus_one_step_in_direction_player_is_facing
thumb_func_start player_get_pos_to
+@ void player_get_pos_to(int *x, int *y)
player_get_pos_to: @ 808BAAC
push {r4,r5,lr}
ldr r5, =0x02037350
@@ -283498,6 +283610,7 @@ _08098772:
thumb_func_end sub_8098758
thumb_func_start copy_textbox_border_tile_patterns_to_vram
+@ void copy_textbox_border_tile_patterns_to_vram(u8 rbox_id, u16 tile_pattern_dest_offset, u8 pal_dest_offset)
copy_textbox_border_tile_patterns_to_vram: @ 809877C
push {r4,r5,lr}
adds r4, r1, 0
@@ -284162,6 +284275,7 @@ sub_8098C6C: @ 8098C6C
thumb_func_end sub_8098C6C
thumb_func_start script_env_init
+@ void script_env_init(script_env *env, int a2, int a3)
script_env_init: @ 8098CB8
push {lr}
adds r3, r0, 0
@@ -284197,6 +284311,7 @@ _08098CE6:
thumb_func_end script_env_init
thumb_func_start script_setup_bytecode_script
+@ int script_setup_bytecode_script(script_env *env, void *script_ptr)
script_setup_bytecode_script: @ 8098CF4
str r1, [r0, 0x8]
movs r1, 0x1
@@ -284214,6 +284329,7 @@ script_setup_asm_script: @ 8098D00
thumb_func_end script_setup_asm_script
thumb_func_start script_stop
+@ void script_stop(script_env *env)
script_stop: @ 8098D08
movs r1, 0
strb r1, [r0, 0x1]
@@ -284222,6 +284338,7 @@ script_stop: @ 8098D08
thumb_func_end script_stop
thumb_func_start script_main_handler
+@ int script_main_handler(script_env *env)
script_main_handler: @ 8098D10
push {r4,lr}
adds r4, r0, 0
@@ -284302,6 +284419,7 @@ _08098D90:
thumb_func_end script_main_handler
thumb_func_start script_stack_push
+@ int script_stack_push(script_env *env, int value)
script_stack_push: @ 8098D98
push {lr}
adds r2, r0, 0
@@ -284328,6 +284446,7 @@ _08098DBC:
thumb_func_end script_stack_push
thumb_func_start script_stack_pop
+@ int script_stack_pop(script_env *env)
script_stack_pop: @ 8098DC0
push {lr}
adds r2, r0, 0
@@ -284351,12 +284470,14 @@ _08098DDE:
thumb_func_end script_stack_pop
thumb_func_start script_jump
+@ void script_jump(script_env *env, int address)
script_jump: @ 8098DE4
str r1, [r0, 0x8]
bx lr
thumb_func_end script_jump
thumb_func_start script_call
+@ void script_call(script_env *env, int address)
script_call: @ 8098DE8
push {r4,r5,lr}
adds r4, r0, 0
@@ -284370,6 +284491,7 @@ script_call: @ 8098DE8
thumb_func_end script_call
thumb_func_start script_return
+@ void script_return(script_env *env)
script_return: @ 8098DFC
push {r4,lr}
adds r4, r0, 0
@@ -284381,6 +284503,7 @@ script_return: @ 8098DFC
thumb_func_end script_return
thumb_func_start script_read_halfword
+@ int script_read_halfword(script_env *env)
script_read_halfword: @ 8098E0C
adds r3, r0, 0
ldr r2, [r3, 0x8]
@@ -284396,6 +284519,7 @@ script_read_halfword: @ 8098E0C
thumb_func_end script_read_halfword
thumb_func_start script_read_word
+@ int script_read_word(script_env *env)
script_read_word: @ 8098E24
push {r4-r6,lr}
adds r3, r0, 0
@@ -284444,6 +284568,7 @@ script_env_2_disable: @ 8098E60
thumb_func_end script_env_2_disable
thumb_func_start script_env_2_is_enabled
+@ int script_env_2_is_enabled()
script_env_2_is_enabled: @ 8098E6C
ldr r0, =0x03000f2c
ldrb r0, [r0]
@@ -284453,6 +284578,7 @@ script_env_2_is_enabled: @ 8098E6C
thumb_func_end script_env_2_is_enabled
thumb_func_start script_env_context_is_running
+@ int script_env_context_is_running()
script_env_context_is_running: @ 8098E78
push {lr}
ldr r0, =0x03000e38
@@ -284564,6 +284690,7 @@ script_env_2_enable_and_set_ctx_running: @ 8098F3C
thumb_func_end script_env_2_enable_and_set_ctx_running
thumb_func_start script_env_2_execute_new_script
+@ void script_env_2_execute_new_script(void *script_ptr)
script_env_2_execute_new_script: @ 8098F50
push {r4,r5,lr}
adds r5, r0, 0
@@ -284644,6 +284771,7 @@ _08098FDA:
thumb_func_end mapheader_run_script_by_tag
thumb_func_start mapheader_get_first_match_from_tagged_ptr_list
+@ int mapheader_get_first_match_from_tagged_ptr_list(int tag)
mapheader_get_first_match_from_tagged_ptr_list: @ 8098FE0
push {r4-r6,lr}
lsls r0, 24
@@ -284743,6 +284871,7 @@ mapheader_run_script_with_tag_x6: @ 8099070
thumb_func_end mapheader_run_script_with_tag_x6
thumb_func_start mapheader_run_first_tag2_script_list_match
+@ int mapheader_run_first_tag2_script_list_match()
mapheader_run_first_tag2_script_list_match: @ 809907C
push {lr}
movs r0, 0x2
@@ -284760,6 +284889,7 @@ _08099092:
thumb_func_end mapheader_run_first_tag2_script_list_match
thumb_func_start mapheader_run_first_tag4_script_list_match
+@ void mapheader_run_first_tag4_script_list_match()
mapheader_run_first_tag4_script_list_match: @ 8099098
push {lr}
movs r0, 0x4
@@ -285167,6 +285297,7 @@ s04_call: @ 809938C
thumb_func_end s04_call
thumb_func_start s06_if_jump
+@ int s06_if_jump(script_env *env)
s06_if_jump: @ 80993A4
push {r4,r5,lr}
adds r5, r0, 0
@@ -285231,6 +285362,7 @@ _0809940E:
thumb_func_end s07_if_call
thumb_func_start sB8_set_virtual_address
+@ int sB8_set_virtual_address(script_env *env)
sB8_set_virtual_address: @ 809941C
push {r4,lr}
ldr r4, [r0, 0x8]
@@ -285248,6 +285380,7 @@ sB8_set_virtual_address: @ 809941C
thumb_func_end sB8_set_virtual_address
thumb_func_start sB9_virtual_jump
+@ int sB9_virtual_jump(script_env *env)
sB9_virtual_jump: @ 8099438
push {r4,lr}
adds r4, r0, 0
@@ -285520,6 +285653,7 @@ s0E_set_byte: @ 809962C
thumb_func_end s0E_set_byte
thumb_func_start s0F_u32_var_to_const
+@ int s0F_u32_var_to_const(script_env *env)
s0F_u32_var_to_const: @ 8099644
push {r4,r5,lr}
adds r4, r0, 0
@@ -285540,6 +285674,7 @@ s0F_u32_var_to_const: @ 8099644
thumb_func_end s0F_u32_var_to_const
thumb_func_start s12_u32_var_to_ptr
+@ int s12_u32_var_to_ptr(script_env *env)
s12_u32_var_to_ptr: @ 8099668
push {r4,r5,lr}
adds r4, r0, 0
@@ -285561,6 +285696,7 @@ s12_u32_var_to_ptr: @ 8099668
thumb_func_end s12_u32_var_to_ptr
thumb_func_start s11_u8_ptr_to_const
+@ int s11_u8_ptr_to_const(script_env *env)
s11_u8_ptr_to_const: @ 809968C
push {r4,lr}
ldr r1, [r0, 0x8]
@@ -285576,6 +285712,7 @@ s11_u8_ptr_to_const: @ 809968C
thumb_func_end s11_u8_ptr_to_const
thumb_func_start s10_u8_var_to_const
+@ int s10_u8_var_to_const(script_env *env)
s10_u8_var_to_const: @ 80996A4
ldr r1, [r0, 0x8]
ldrb r3, [r1]
@@ -285594,6 +285731,7 @@ s10_u8_var_to_const: @ 80996A4
thumb_func_end s10_u8_var_to_const
thumb_func_start s13_u8_var_to_ptr
+@ int s13_u8_var_to_ptr(script_env *env)
s13_u8_var_to_ptr: @ 80996C0
push {r4,r5,lr}
adds r4, r0, 0
@@ -286292,6 +286430,7 @@ sub_8099BE8: @ 8099BE8
thumb_func_end sub_8099BE8
thumb_func_start s29_flag_set
+@ int s29_flag_set(script_env *env)
s29_flag_set: @ 8099C14
push {lr}
bl script_read_halfword
@@ -286304,6 +286443,7 @@ s29_flag_set: @ 8099C14
thumb_func_end s29_flag_set
thumb_func_start s2A_flag_clear
+@ int s2A_flag_clear(script_env *env)
s2A_flag_clear: @ 8099C28
push {lr}
bl script_read_halfword
@@ -286316,6 +286456,7 @@ s2A_flag_clear: @ 8099C28
thumb_func_end s2A_flag_clear
thumb_func_start s2B_flag_check
+@ int s2B_flag_check(script_env *env)
s2B_flag_check: @ 8099C3C
push {r4,lr}
adds r4, r0, 0
@@ -286331,6 +286472,7 @@ s2B_flag_check: @ 8099C3C
thumb_func_end s2B_flag_check
thumb_func_start sC3_unknown
+@ int sC3_unknown(script_env *env)
sC3_unknown: @ 8099C58
push {lr}
ldr r1, [r0, 0x8]
@@ -286345,6 +286487,7 @@ sC3_unknown: @ 8099C58
thumb_func_end sC3_unknown
thumb_func_start s9A_unknown
+@ int s9A_unknown(script_env *env)
s9A_unknown: @ 8099C70
push {lr}
ldr r1, [r0, 0x8]
@@ -286360,6 +286503,7 @@ s9A_unknown: @ 8099C70
thumb_func_end s9A_unknown
thumb_func_start s99_unknown
+@ int s99_unknown(script_env *env)
s99_unknown: @ 8099C8C
push {lr}
bl script_read_halfword
@@ -286395,6 +286539,7 @@ _08099CC2:
thumb_func_end sub_8099CA8
thumb_func_start s97_screen_special_effect
+@ int s97_screen_special_effect(script_env *env)
s97_screen_special_effect: @ 8099CC8
push {r4,lr}
adds r4, r0, 0
@@ -286416,6 +286561,7 @@ s97_screen_special_effect: @ 8099CC8
thumb_func_end s97_screen_special_effect
thumb_func_start s98_refade_with_timer
+@ int s98_refade_with_timer(script_env *env)
s98_refade_with_timer: @ 8099CF0
push {r4,lr}
adds r4, r0, 0
@@ -286441,6 +286587,7 @@ s98_refade_with_timer: @ 8099CF0
thumb_func_end s98_refade_with_timer
thumb_func_start sub_8099D20
+@ int sub_8099D20(script_env *env)
sub_8099D20: @ 8099D20
push {r4,r5,lr}
adds r5, r0, 0
@@ -286511,6 +286658,7 @@ _08099DAE:
thumb_func_end s28_pause_asm
thumb_func_start s28_pause
+@ int s28_pause(script_env *env)
s28_pause: @ 8099DB4
push {r4,lr}
adds r4, r0, 0
@@ -286529,6 +286677,7 @@ s28_pause: @ 8099DB4
thumb_func_end s28_pause
thumb_func_start s2C_unknown
+@ int s2C_unknown(script_env *env)
s2C_unknown: @ 8099DD8
push {r4,r5,lr}
adds r5, r0, 0
@@ -286556,6 +286705,7 @@ s2C_unknown: @ 8099DD8
thumb_func_end s2C_unknown
thumb_func_start s2D_unknown
+@ int s2D_unknown(script_env *env)
s2D_unknown: @ 8099E10
push {lr}
bl sub_809E7B0
@@ -286565,6 +286715,7 @@ s2D_unknown: @ 8099E10
thumb_func_end s2D_unknown
thumb_func_start s2E_unknown
+@ int s2E_unknown(script_env *env)
s2E_unknown: @ 8099E1C
push {lr}
bl sub_802F588
@@ -286589,6 +286740,7 @@ s2E_unknown: @ 8099E1C
thumb_func_end s2E_unknown
thumb_func_start sA4_set_weather_data
+@ int sA4_set_weather_data(script_env *env)
sA4_set_weather_data: @ 8099E54
push {lr}
bl script_read_halfword
@@ -286604,6 +286756,7 @@ sA4_set_weather_data: @ 8099E54
thumb_func_end sA4_set_weather_data
thumb_func_start sA3_set_standard_weather_data
+@ int sA3_set_standard_weather_data(script_env *env)
sA3_set_standard_weather_data: @ 8099E70
push {lr}
bl sub_80AEDBC
@@ -286613,6 +286766,7 @@ sA3_set_standard_weather_data: @ 8099E70
thumb_func_end sA3_set_standard_weather_data
thumb_func_start sub_8099E7C
+@ int sub_8099E7C(script_env *env)
sub_8099E7C: @ 8099E7C
push {lr}
bl sub_80AEE20
@@ -286622,6 +286776,7 @@ sub_8099E7C: @ 8099E7C
thumb_func_end sub_8099E7C
thumb_func_start sA6_activate_per_step_callback_eg_ash
+@ int sA6_activate_per_step_callback_eg_ash(script_env *env)
sA6_activate_per_step_callback_eg_ash: @ 8099E88
push {lr}
ldr r1, [r0, 0x8]
@@ -286636,6 +286791,7 @@ sA6_activate_per_step_callback_eg_ash: @ 8099E88
thumb_func_end sA6_activate_per_step_callback_eg_ash
thumb_func_start sA7_set_new_map_footer
+@ int sA7_set_new_map_footer(script_env *env)
sA7_set_new_map_footer: @ 8099EA0
push {lr}
bl script_read_halfword
@@ -286651,6 +286807,7 @@ sA7_set_new_map_footer: @ 8099EA0
thumb_func_end sA7_set_new_map_footer
thumb_func_start s39_warp_sfx
+@ int s39_warp_sfx(script_env *env)
s39_warp_sfx: @ 8099EBC
push {r4-r6,lr}
mov r6, r9
@@ -286715,6 +286872,7 @@ s39_warp_sfx: @ 8099EBC
thumb_func_end s39_warp_sfx
thumb_func_start s3A_warp_new_music
+@ int s3A_warp_new_music(script_env *env)
s3A_warp_new_music: @ 8099F44
push {r4-r6,lr}
mov r6, r9
@@ -286779,6 +286937,7 @@ s3A_warp_new_music: @ 8099F44
thumb_func_end s3A_warp_new_music
thumb_func_start s3B_warp_keep_music
+@ int s3B_warp_keep_music(script_env *env)
s3B_warp_keep_music: @ 8099FCC
push {r4-r6,lr}
mov r6, r9
@@ -287342,6 +287501,7 @@ sC4_unknown: @ 809A3DC
thumb_func_end sC4_unknown
thumb_func_start s42_get_map_camera_pos
+@ int s42_get_map_camera_pos(script_env *env)
s42_get_map_camera_pos: @ 809A45C
push {r4,r5,lr}
adds r4, r0, 0
@@ -287461,6 +287621,7 @@ s32_fanfare_wait: @ 809A518
thumb_func_end s32_fanfare_wait
thumb_func_start s33_play_music
+@ int s33_play_music(script_env *env)
s33_play_music: @ 809A52C
push {r4,r5,lr}
adds r4, r0, 0
@@ -289433,6 +289594,7 @@ _0809B44A:
thumb_func_end sub_809B3DC
thumb_func_start s90_add_money
+@ int s90_add_money(script_env *env)
s90_add_money: @ 809B458
push {r4,lr}
adds r4, r0, 0
@@ -289461,6 +289623,7 @@ _0809B47E:
thumb_func_end s90_add_money
thumb_func_start s91_subtract_money
+@ int s91_subtract_money(script_env *env)
s91_subtract_money: @ 809B48C
push {r4,lr}
adds r4, r0, 0
@@ -289489,6 +289652,7 @@ _0809B4B2:
thumb_func_end s91_subtract_money
thumb_func_start s92_check_money
+@ int s92_check_money(script_env *env)
s92_check_money: @ 809B4C0
push {r4,lr}
adds r4, r0, 0
@@ -289521,6 +289685,7 @@ _0809B4EE:
thumb_func_end s92_check_money
thumb_func_start s93_display_money
+@ int s93_display_money(script_env *env)
s93_display_money: @ 809B500
push {r4,r5,lr}
ldr r1, [r0, 0x8]
@@ -289563,6 +289728,7 @@ s94_hide_money: @ 809B53C
thumb_func_end s94_hide_money
thumb_func_start s95_update_money
+@ int s95_update_money(script_env *env)
s95_update_money: @ 809B548
push {lr}
ldr r1, [r0, 0x8]
@@ -290867,6 +291033,7 @@ sub_809BEDC: @ 809BEDC
thumb_func_end sub_809BEDC
thumb_func_start process_overworld_input
+@ void process_overworld_input(overworld_input_data *input_data, char buttons_new, char buttons_held)
process_overworld_input: @ 809BF08
push {r4-r7,lr}
mov r7, r9
@@ -291014,6 +291181,7 @@ _0809C006:
thumb_func_end process_overworld_input
thumb_func_start sub_809C014
+@ int sub_809C014(overworld_input_data *input_data)
sub_809C014: @ 809C014
push {r4-r6,lr}
sub sp, 0x8
@@ -293771,6 +293939,7 @@ _0809D642:
thumb_func_end sub_809D614
thumb_func_start var_get_pointer
+@ u16 *var_get_pointer(u16 var_id)
var_get_pointer: @ 809D648
push {lr}
lsls r0, 16
@@ -293811,6 +293980,7 @@ _0809D688:
thumb_func_end var_get_pointer
thumb_func_start var_get
+@ u16 var_get(u16 var_id)
var_get: @ 809D694
push {r4,lr}
lsls r0, 16
@@ -293830,6 +294000,7 @@ _0809D6AA:
thumb_func_end var_get
thumb_func_start var_set
+@ bool var_set(u16 var_id, u16 value)
var_set: @ 809D6B0
push {r4,lr}
lsls r0, 16
@@ -293868,6 +294039,7 @@ var_load_x4010_plus_r0: @ 809D6D0
thumb_func_end var_load_x4010_plus_r0
thumb_func_start flag_get_pointer
+@ u8 *flag_get_pointer(u16 flag_id)
flag_get_pointer: @ 809D6EC
push {lr}
lsls r1, r0, 16
@@ -293909,6 +294081,7 @@ _0809D72E:
thumb_func_end flag_get_pointer
thumb_func_start flag_set
+@ bool flag_set(u16 flag_id)
flag_set: @ 809D740
push {r4,lr}
lsls r0, 16
@@ -293933,6 +294106,7 @@ _0809D760:
thumb_func_end flag_set
thumb_func_start flag_clear
+@ bool flag_clear(u16 flag_id)
flag_clear: @ 809D768
push {r4,lr}
lsls r0, 16
@@ -293957,6 +294131,7 @@ _0809D788:
thumb_func_end flag_clear
thumb_func_start flag_check
+@ bool flag_check(u16 flag_id)
flag_check: @ 809D790
push {r4,lr}
lsls r0, 16
@@ -300179,6 +300354,7 @@ append_byte: @ 80A0944
thumb_func_end append_byte
thumb_func_start sub_80A0954
+@ void sub_80A0954()
sub_80A0954: @ 80A0954
push {lr}
sub sp, 0x4
@@ -302113,6 +302289,7 @@ _080A18D6:
thumb_func_end sub_80A1884
thumb_func_start decompress_palette
+@ void decompress_palette(void *src, u16 offset, u16 size)
decompress_palette: @ 80A18F4
push {r4-r6,lr}
adds r4, r1, 0
@@ -302144,6 +302321,7 @@ decompress_palette: @ 80A18F4
thumb_func_end decompress_palette
thumb_func_start gpu_pal_apply
+@ void gpu_pal_apply(void *src, int dest_offset, int mode)
gpu_pal_apply: @ 80A1938
push {r4-r6,lr}
adds r6, r0, 0
@@ -302210,6 +302388,7 @@ rboxid_80040B8: @ 80A1970
thumb_func_end rboxid_80040B8
thumb_func_start copy_pal_bg_faded_to_pal_ram
+@ void copy_pal_bg_faded_to_pal_ram()
copy_pal_bg_faded_to_pal_ram: @ 80A19C0
push {r4,r5,lr}
ldr r4, =0x02037fd4
@@ -302252,6 +302431,7 @@ _080A1A02:
thumb_func_end copy_pal_bg_faded_to_pal_ram
thumb_func_start fade_and_return_progress_probably
+@ int fade_and_return_progress_probably()
fade_and_return_progress_probably: @ 80A1A1C
push {lr}
ldr r0, =0x02037fe4
@@ -305460,6 +305640,7 @@ sub_80A3228: @ 80A3228
thumb_func_end sub_80A3228
thumb_func_start play_sound_effect
+@ void play_sound_effect(u8 a1)
play_sound_effect: @ 80A3240
push {lr}
adds r1, r0, 0
@@ -306843,6 +307024,7 @@ ma00_load_graphics: @ 80A3D24
thumb_func_end ma00_load_graphics
thumb_func_start ma01_080728D0
+@ void ma01_080728D0()
ma01_080728D0: @ 80A3D8C
push {r4-r6,lr}
ldr r6, =0x020383f0
@@ -307598,13 +307780,13 @@ _080A43AA:
lsls r2, 6
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r1, =0x0600f000
movs r2, 0x80
lsls r2, 5
movs r0, 0xFF
movs r3, 0
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
b _080A43F8
.align 2, 0
.pool
@@ -307614,13 +307796,13 @@ _080A43DC:
lsls r2, 6
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r1, =0x0600e000
movs r2, 0x80
lsls r2, 5
movs r0, 0xFF
movs r3, 0
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
_080A43F8:
add r0, sp, 0x10
bl sub_80A6B30
@@ -307775,14 +307957,14 @@ _080A455E:
lsls r2, 6
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r1, =0x0600f000
movs r7, 0x80
lsls r7, 5
movs r0, 0
adds r2, r7, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
add r0, sp, 0x10
movs r1, 0x2
bl sub_80A6B90
@@ -308068,6 +308250,7 @@ _080A47C6:
thumb_func_end sub_80A477C
thumb_func_start task_pA_ma0A_obj_to_bg_pal
+@ void task_pA_ma0A_obj_to_bg_pal(int task_id)
task_pA_ma0A_obj_to_bg_pal: @ 80A47D8
push {r4-r6,lr}
sub sp, 0x10
@@ -316100,7 +316283,7 @@ _080A8540:
movs r2, 0x80
lsls r2, 4
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
ldr r0, [r5]
adds r0, r4
ldr r0, [r0]
@@ -319550,6 +319733,7 @@ _080AA556:
thumb_func_end sub_80AA548
thumb_func_start title_screen_logo_shine_obj_callback_type1
+@ void title_screen_logo_shine_obj_callback_type1(struct obj *obj)
title_screen_logo_shine_obj_callback_type1: @ 80AA5A4
push {r4,lr}
adds r3, r0, 0
@@ -319645,6 +319829,7 @@ _080AA648:
thumb_func_end title_screen_logo_shine_obj_callback_type1
thumb_func_start title_screen_logo_shine_obj_callback_type2
+@ void title_screen_logo_shine_obj_callback_type2(struct obj *obj)
title_screen_logo_shine_obj_callback_type2: @ 80AA654
push {lr}
adds r2, r0, 0
@@ -319669,6 +319854,7 @@ _080AA676:
thumb_func_end title_screen_logo_shine_obj_callback_type2
thumb_func_start title_screen_add_logo_shine_obj
+@ void title_screen_add_logo_shine_obj(int a1)
title_screen_add_logo_shine_obj: @ 80AA67C
push {r4-r6,lr}
mov r6, r10
@@ -319797,6 +319983,7 @@ _080AA766:
thumb_func_end title_screen_add_logo_shine_obj
thumb_func_start title_screen_vblank_callback
+@ void title_screen_vblank_callback()
title_screen_vblank_callback: @ 80AA780
push {lr}
bl sub_80BA0A8
@@ -319814,6 +320001,7 @@ title_screen_vblank_callback: @ 80AA780
thumb_func_end title_screen_vblank_callback
thumb_func_start c2_title_screen_1
+@ void c2_title_screen_1()
c2_title_screen_1: @ 80AA7A4
push {r4,lr}
sub sp, 0x14
@@ -320133,6 +320321,7 @@ _080AAB1E:
thumb_func_end c2_title_screen_1
thumb_func_start c2_title_screen_2
+@ void c2_title_screen_2()
c2_title_screen_2: @ 80AAB2C
push {lr}
bl run_active_tasks
@@ -320144,6 +320333,7 @@ c2_title_screen_2: @ 80AAB2C
thumb_func_end c2_title_screen_2
thumb_func_start task_title_screen_1
+@ void task_title_screen_1(int task_id)
task_title_screen_1: @ 80AAB44
push {r4-r6,lr}
lsls r0, 24
@@ -320265,6 +320455,7 @@ _080AAC32:
thumb_func_end task_title_screen_1
thumb_func_start task_title_screen_2
+@ void task_title_screen_2(int task_id)
task_title_screen_2: @ 80AAC50
push {r4-r7,lr}
lsls r0, 24
@@ -320394,6 +320585,7 @@ _080AAD20:
thumb_func_end task_title_screen_2
thumb_func_start task_title_screen_3
+@ void task_title_screen_3(int task_id)
task_title_screen_3: @ 80AAD64
push {r4,r5,lr}
sub sp, 0x4
@@ -320621,6 +320813,7 @@ _080AAF3E:
thumb_func_end c2_berry_program_update_screen_1
thumb_func_start title_screen_update_rayquaza_ring_palette
+@ void title_screen_update_rayquaza_ring_palette(u8 a1)
title_screen_update_rayquaza_ring_palette: @ 80AAF48
push {lr}
sub sp, 0x4
@@ -320671,6 +320864,7 @@ _080AAF9C:
thumb_func_end title_screen_update_rayquaza_ring_palette
thumb_func_start sub_80AAFA4
+@ void sub_80AAFA4()
sub_80AAFA4: @ 80AAFA4
push {r4-r6,lr}
ldr r0, =sub_80AB1B0 + 1
@@ -377368,7 +377562,7 @@ sub_80C7E98: @ 80C7E98
bl reset_all_obj_data
bl gpu_tile_obj_tags_reset
bl gpu_pal_allocator_reset
- bl dma3_transfer_queue_clear
+ bl ClearDma3Requests
ldr r1, =0x02021b3a
movs r2, 0xA0
lsls r2, 2
@@ -385682,7 +385876,7 @@ _080CC3B0:
lsls r2, 5
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
strh r0, [r4, 0xA]
b _080CC458
.align 2, 0
@@ -385690,7 +385884,7 @@ _080CC3B0:
_080CC3E8:
movs r1, 0xA
ldrsh r0, [r4, r1]
- bl dma3_transfer_queue_check_for_space
+ bl CheckForSpaceForDma3Request
lsls r0, 16
asrs r0, 16
movs r1, 0x1
@@ -390776,25 +390970,25 @@ _080CEE34:
adds r0, r3
movs r1, 0
movs r2, 0x5
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r1, =0x00000cf9
adds r0, r1
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r2, =0x00000d1d
adds r0, r2
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r3, =0x00000d41
adds r0, r3
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r1, =0x00000d65
adds r0, r1
@@ -390834,20 +391028,20 @@ _080CEECE:
adds r0, r3
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r1, =0x00000d41
adds r0, r1
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
ldr r0, [r4]
ldr r2, =0x00000d65
adds r0, r2
_080CEEF2:
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
b _080CF0B8
.align 2, 0
.pool
@@ -391019,7 +391213,7 @@ _080CF0AC:
adds r0, r4, r1
movs r1, 0
movs r2, 0x8
- bl sub_80090FC
+ bl RepeatChar
_080CF0B8:
pop {r3-r5}
mov r8, r3
@@ -396674,6 +396868,7 @@ nullsub_98: @ 80D1D08
thumb_func_end nullsub_98
thumb_func_start get_preferred_box
+@ char get_preferred_box()
get_preferred_box: @ 80D1D0C
ldr r0, =0x03005d94
ldr r0, [r0]
@@ -397179,6 +397374,7 @@ _080D2088:
thumb_func_end sub_80D2054
thumb_func_start get_pokemon_by_box_and_pos
+@ pokemon *get_pokemon_by_box_and_pos(u8 box_id, u8 pos)
get_pokemon_by_box_and_pos: @ 80D2094
push {r4,lr}
lsls r0, 24
@@ -406186,6 +406382,7 @@ call_encrypt_decrypt_all_item_quantities: @ 80D65E4
thumb_func_end call_encrypt_decrypt_all_item_quantities
thumb_func_start init_bag_pockets
+@ void init_bag_pockets()
init_bag_pockets: @ 80D65F0
push {r4,lr}
ldr r1, =0x02039dd8
@@ -406229,6 +406426,7 @@ init_bag_pockets: @ 80D65F0
thumb_func_end init_bag_pockets
thumb_func_start itemid_get_name
+@ void itemid_get_name(int item_id, char *dest)
itemid_get_name: @ 80D6644
push {r4,lr}
adds r4, r1, 0
@@ -406626,6 +406824,7 @@ _080D6916:
thumb_func_end sub_80D6800
thumb_func_start bag_add_item
+@ int bag_add_item(int item_id, int quantity)
bag_add_item: @ 80D6928
push {r4-r7,lr}
mov r7, r10
@@ -407411,6 +407610,7 @@ _080D6F0E:
thumb_func_end sub_80D6EDC
thumb_func_start bag_pocket_get_itemid
+@ int bag_pocket_get_itemid(int pocket_id_plus_1, int item_index_in_pocket)
bag_pocket_get_itemid: @ 80D6F14
lsls r0, 24
lsls r1, 16
@@ -407428,6 +407628,7 @@ bag_pocket_get_itemid: @ 80D6F14
thumb_func_end bag_pocket_get_itemid
thumb_func_start bag_pocket_get_item_quantity
+@ int bag_pocket_get_item_quantity(int pocket_id_plus_1, int item_index_in_pocket)
bag_pocket_get_item_quantity: @ 80D6F30
push {lr}
lsls r0, 24
@@ -408133,6 +408334,7 @@ _080D7470:
thumb_func_end itemid_sanitize
thumb_func_start itemid_get_item
+@ item *itemid_get_item(s16 itemId)
itemid_get_item: @ 80D7474
push {lr}
lsls r0, 16
@@ -409336,17 +409538,17 @@ _080D7E84:
movs r0, 0
adds r2, r4, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r1, =0x06008000
movs r0, 0
adds r2, r4, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r1, =0x06010000
movs r0, 0
adds r2, r4, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
b _080D80AE
.align 2, 0
.pool
@@ -418632,7 +418834,7 @@ sub_80DC9EC: @ 80DC9EC
lsls r2, 4
mov r10, r2
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
ldr r0, [r7]
ldr r0, [r0, 0x38]
ldrh r1, [r5, 0x4]
@@ -418641,7 +418843,7 @@ sub_80DC9EC: @ 80DC9EC
adds r1, r6
mov r2, r10
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
mov r3, r8
strh r3, [r4, 0x2E]
mov r0, r9
@@ -421066,7 +421268,7 @@ sub_80DDE30: @ 80DDE30
movs r2, 0x80
lsls r2, 5
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
b _080DDE8C
.align 2, 0
.pool
@@ -421076,7 +421278,7 @@ _080DDE78:
movs r2, 0x80
lsls r2, 5
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
ldrh r0, [r4, 0x20]
adds r0, 0x1
strh r0, [r4, 0x20]
@@ -421683,7 +421885,7 @@ sub_80DE350: @ 80DE350
lsls r2, 6
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
movs r5, 0
str r5, [sp]
ldr r6, =0x02039f34
@@ -424645,6 +424847,7 @@ _080DFA70:
thumb_func_end sub_80DFA08
thumb_func_start CreateShopMainMenu
+@ s8 CreateShopMainMenu(s8 type)
CreateShopMainMenu: @ 80DFA78
push {r4,r5,lr}
sub sp, 0x10
@@ -424732,6 +424935,7 @@ _080DFAF8:
thumb_func_end CreateShopMainMenu
thumb_func_start SetShopMenuCallback
+@ void SetShopMenuCallback()
SetShopMenuCallback: @ 80DFB4C
ldr r1, =0x02039f60
str r0, [r1]
@@ -424741,6 +424945,7 @@ SetShopMenuCallback: @ 80DFB4C
thumb_func_end SetShopMenuCallback
thumb_func_start SetShopItemsForSale
+@ int SetShopItemsForSale(s16 *itemsForSale)
SetShopItemsForSale: @ 80DFB58
push {lr}
adds r1, r0, 0
@@ -425280,6 +425485,7 @@ _080DFFDE:
thumb_func_end GetShopItemNames
thumb_func_start GetShopItemName
+@ void GetShopItemName(ShopItem *items1, s16 itemId, char *name)
GetShopItemName: @ 80E0000
push {r4-r6,lr}
adds r6, r0, 0
@@ -429692,6 +429898,7 @@ _080E2360:
thumb_func_end sub_80E2308
thumb_func_start sp109_CreatePCMenu
+@ bool sp109_CreatePCMenu()
sp109_CreatePCMenu: @ 80E236C
push {lr}
ldr r0, =sub_80E2058 + 1
@@ -430919,6 +431126,7 @@ _080E2D70:
thumb_func_end sub_80E2D5C
thumb_func_start do_choose_name_or_words_screen
+@ int do_choose_name_or_words_screen(u8 type, sav2 *sav2_ptr, s16 player_gender, s16 a4, int a5, void ( *after_finishing_callback)())
do_choose_name_or_words_screen: @ 80E2D78
push {r4-r7,lr}
mov r7, r8
@@ -431055,6 +431263,7 @@ _080E2EA4:
thumb_func_end c2_choose_name_or_words_screen
thumb_func_start choose_name_or_words_screen_setup
+@ void choose_name_or_words_screen_setup()
choose_name_or_words_screen_setup: @ 80E2EA8
push {r4-r7,lr}
ldr r5, =0x02039f94
@@ -435278,6 +435487,7 @@ sub_80E50EC: @ 80E50EC
thumb_func_end sub_80E50EC
thumb_func_start decrypt_money
+@ int decrypt_money(int *money_ptr)
decrypt_money: @ 80E5114
ldr r1, =0x03005d90
ldr r1, [r1]
@@ -435291,6 +435501,7 @@ decrypt_money: @ 80E5114
thumb_func_end decrypt_money
thumb_func_start encrypt_money
+@ void encrypt_money(int *money_ptr, int value)
encrypt_money: @ 80E5128
ldr r2, =0x03005d90
ldr r2, [r2]
@@ -435304,6 +435515,7 @@ encrypt_money: @ 80E5128
thumb_func_end encrypt_money
thumb_func_start is_money_greater_than
+@ int is_money_greater_than(int *money_ptr, int amount)
is_money_greater_than: @ 80E513C
push {r4,lr}
adds r4, r1, 0
@@ -435321,6 +435533,7 @@ _080E514E:
thumb_func_end is_money_greater_than
thumb_func_start add_money
+@ void add_money(int *money_ptr, int amount)
add_money: @ 80E5154
push {r4-r6,lr}
adds r6, r0, 0
@@ -435350,6 +435563,7 @@ _080E5178:
thumb_func_end add_money
thumb_func_start subtract_money
+@ void subtract_money(int *money_ptr, int amount)
subtract_money: @ 80E518C
push {r4,r5,lr}
adds r5, r0, 0
@@ -435407,6 +435621,7 @@ sub_80E51D4: @ 80E51D4
thumb_func_end sub_80E51D4
thumb_func_start PrintMoneyAmountInMoneyBox
+@ void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, s8 a3)
PrintMoneyAmountInMoneyBox: @ 80E51F4
push {lr}
sub sp, 0x4
@@ -435425,6 +435640,7 @@ PrintMoneyAmountInMoneyBox: @ 80E51F4
thumb_func_end PrintMoneyAmountInMoneyBox
thumb_func_start PrintMoneyAmount
+@ void PrintMoneyAmount(u8 windowId, char x, char y, int amount, u8 a5)
PrintMoneyAmount: @ 80E5214
push {r4-r7,lr}
mov r7, r8
@@ -435489,6 +435705,7 @@ _080E5264:
thumb_func_end PrintMoneyAmount
thumb_func_start set_window_border_style_and_print_money_box
+@ void set_window_border_style_and_print_money_box(u8 windowId, u16 tileStart, u8 palette, int amount)
set_window_border_style_and_print_money_box: @ 80E5298
push {r4-r6,lr}
mov r6, r8
@@ -435534,6 +435751,7 @@ sub_80E52D4: @ 80E52D4
thumb_func_end sub_80E52D4
thumb_func_start sub_80E52EC
+@ void sub_80E52EC(int money, int x, int y)
sub_80E52EC: @ 80E52EC
push {r4-r6,lr}
mov r6, r8
@@ -468261,7 +468479,7 @@ _080F69DE:
lsls r2, 1
adds r0, r3, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
adds r0, r4, 0
adds r0, 0xA
lsls r0, 28
@@ -468298,7 +468516,7 @@ _080F6A40:
lsls r2, 1
adds r0, r3, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
_080F6A54:
add sp, 0x10
pop {r3}
@@ -468412,7 +468630,7 @@ sub_80F6AE8: @ 80F6AE8
adds r1, r2
movs r2, 0x80
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldr r0, =0x0858d8c8
movs r1, 0x8
movs r2, 0x8
@@ -473295,6 +473513,7 @@ _080F922C:
thumb_func_end sp000_heal_pokemon
thumb_func_start sub_80F9244
+@ void sub_80F9244(s16 species_num, u8 level, int held_item)
sub_80F9244: @ 80F9244
push {r4-r6,lr}
mov r6, r8
@@ -478514,6 +478733,7 @@ _080FBBF2:
thumb_func_end sub_80FBB64
thumb_func_start overworld_free_bgmaps
+@ void overworld_free_bgmaps()
overworld_free_bgmaps: @ 80FBC00
push {lr}
ldr r0, =0x08591d58
@@ -481368,6 +481588,7 @@ sub_80FD278: @ 80FD278
thumb_func_end sub_80FD278
thumb_func_start item_field_func_bike
+@ void item_field_func_bike(int task_id)
item_field_func_bike: @ 80FD298
push {r4-r6,lr}
sub sp, 0x4
@@ -537410,6 +537631,7 @@ _08119148:
thumb_func_end sub_8119094
thumb_func_start dp04_initiate_movement
+@ void dp04_initiate_movement(int dpad_direction, int buttons_new, int buttons_held)
dp04_initiate_movement: @ 8119164
push {r4,lr}
lsls r0, 24
@@ -537728,6 +537950,7 @@ _081193BE:
thumb_func_end npc_state_reaction_to_tile
thumb_func_start sub_81193C8
+@ void sub_81193C8(int dpad_direction, int buttons_new, int buttons_held)
sub_81193C8: @ 81193C8
push {r4,lr}
sub sp, 0x4
@@ -538825,6 +539048,7 @@ _08119C36:
thumb_func_end sub_8119BC4
thumb_func_start sub_8119C3C
+@ void sub_8119C3C(int buttons_new, int buttons_held)
sub_8119C3C: @ 8119C3C
push {lr}
lsls r0, 16
@@ -538848,6 +539072,7 @@ _08119C5A:
thumb_func_end sub_8119C3C
thumb_func_start sub_8119C64
+@ void sub_8119C64(int buttons_new, int buttons_held)
sub_8119C64: @ 8119C64
push {r4,r5,lr}
lsls r1, 16
@@ -552117,7 +552342,7 @@ sub_8120084: @ 8120084
adds r0, r2
movs r2, 0x80
movs r3, 0x10
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
pop {r0}
bx r0
.align 2, 0
@@ -557781,6 +558006,7 @@ _08122CB6:
thumb_func_end sub_8122C94
thumb_func_start sub_8122CBC
+@ warpdata *sub_8122CBC(int a1)
sub_8122CBC: @ 8122CBC
push {lr}
cmp r0, 0
@@ -561063,7 +561289,7 @@ _081245A6:
adds r0, r5, 0
movs r1, 0
adds r2, r4, 0
- bl sub_80090FC
+ bl RepeatChar
b _081245D6
_081245B2:
cmp r4, 0
@@ -561323,7 +561549,7 @@ _0812479C:
adds r0, r1
movs r1, 0
movs r2, 0x10
- bl sub_80090FC
+ bl RepeatChar
ldr r1, =0x03001180
movs r0, 0x1
str r0, [r1]
@@ -606655,6 +606881,7 @@ sub_813B1D0: @ 813B1D0
thumb_func_end sub_813B1D0
thumb_func_start set_unknown_box_id
+@ void set_unknown_box_id(char id)
set_unknown_box_id: @ 813B204
ldr r1, =0x0203ab6f
strb r0, [r1]
@@ -610963,7 +611190,7 @@ _0813D4A8:
adds r0, r1
movs r1, 0
movs r2, 0x10
- bl sub_80090FC
+ bl RepeatChar
b _0813D584
.align 2, 0
.pool
@@ -703414,6 +703641,7 @@ _0816CC66:
thumb_func_end sub_816CC54
thumb_func_start load_copyright_graphics
+@ void load_copyright_graphics(u16 tile_patterns_dest, u16 tilemap_dest, u16 unknown_dest)
load_copyright_graphics: @ 816CC70
push {r4-r6,lr}
adds r3, r0, 0
@@ -703699,6 +703927,7 @@ c2_show_copyright_and_intro_again_2: @ 816CF0C
thumb_func_end c2_show_copyright_and_intro_again_2
thumb_func_start task_intro_1
+@ void task_intro_1(int task_id)
task_intro_1: @ 816CF18
push {r4-r6,lr}
mov r6, r8
@@ -704458,6 +704687,7 @@ _0816D598:
thumb_func_end task_intro_7
thumb_func_start task_intro_8
+@ void task_intro_8(int task_id)
task_intro_8: @ 816D650
push {r4-r7,lr}
sub sp, 0x4
@@ -707643,6 +707873,7 @@ _0816F0B2:
thumb_func_end sub_816EEA8
thumb_func_start intro_reset_and_hide_bgs
+@ void intro_reset_and_hide_bgs()
intro_reset_and_hide_bgs: @ 816F0C0
push {lr}
movs r0, 0
@@ -715238,7 +715469,7 @@ _08172E4E:
lsls r2, 4
movs r0, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
ldrb r0, [r4]
bl sub_805E974
adds r0, r5, 0
@@ -765758,6 +765989,7 @@ _0818CFD4:
thumb_func_end dp13_810BB8C
thumb_func_start load_pokemon_image_TODO
+@ int load_pokemon_image_TODO(int species_num, unsigned int a2, u8 a3, void *a4, int a5, u8 a6)
load_pokemon_image_TODO: @ 818CFF4
push {r4-r7,lr}
sub sp, 0x4
@@ -786226,6 +786458,7 @@ sub_8197804: @ 8197804
thumb_func_end sub_8197804
thumb_func_start SetStandardWindowBorderStyle
+@ void SetStandardWindowBorderStyle(u8 windowId, bool copyToVram)
SetStandardWindowBorderStyle: @ 8197854
push {lr}
lsls r0, 24
@@ -787045,6 +787278,7 @@ sub_8197E30: @ 8197E30
thumb_func_end sub_8197E30
thumb_func_start SetWindowBorderStyle
+@ void SetWindowBorderStyle(u8 windowId, bool copyToVram, s16 tileStart, s8 palette)
SetWindowBorderStyle: @ 8197E80
push {r4,r5,lr}
adds r4, r1, 0
@@ -787787,6 +788021,7 @@ sub_81983EC: @ 81983EC
thumb_func_end sub_81983EC
thumb_func_start RedrawMenuCursor
+@ void RedrawMenuCursor(s8 oldPos, s8 newPos)
RedrawMenuCursor: @ 8198448
push {r4-r6,lr}
mov r6, r9
@@ -787857,6 +788092,7 @@ RedrawMenuCursor: @ 8198448
thumb_func_end RedrawMenuCursor
thumb_func_start MoveMenuCursor
+@ s8 MoveMenuCursor(s8 cursorDelta)
MoveMenuCursor: @ 81984D8
push {r4,r5,lr}
ldr r1, =0x0203cd90
@@ -787896,6 +788132,7 @@ _0819850A:
thumb_func_end MoveMenuCursor
thumb_func_start MoveMenuCursorNoWrapAround
+@ s8 MoveMenuCursorNoWrapAround(s8 cursorDelta)
MoveMenuCursorNoWrapAround: @ 819851C
push {r4,r5,lr}
ldr r1, =0x0203cd90
@@ -788002,6 +788239,7 @@ _081985D2:
thumb_func_end ProcessMenuInput
thumb_func_start ProcessMenuInputNoWrapAround
+@ int ProcessMenuInputNoWrapAround()
ProcessMenuInputNoWrapAround: @ 81985D8
push {r4-r6,lr}
ldr r4, =0x0203cd90
@@ -788570,6 +788808,7 @@ sub_81989B8: @ 81989B8
thumb_func_end sub_81989B8
thumb_func_start rbox_template_set
+@ void rbox_template_set(rbox_template *template, char bg_id, char x, char y, char w, char h, char a7, s16 a8)
rbox_template_set: @ 8198A24
push {r4-r7,lr}
mov r7, r8
@@ -790020,6 +790259,7 @@ _0819951E:
thumb_func_end sub_8199484
thumb_func_start InitMenuInUpperLeftCorner
+@ int InitMenuInUpperLeftCorner(s8 windowId, s8 numItems, u8 initialCursorPos, bool doNotPlaySoundWhenAPressed)
InitMenuInUpperLeftCorner: @ 8199524
push {r4-r6,lr}
lsls r1, 24
@@ -790616,6 +790856,7 @@ _08199992:
thumb_func_end sub_8199944
thumb_func_start clear_scheduled_bg_copies_to_vram
+@ void clear_scheduled_bg_copies_to_vram()
clear_scheduled_bg_copies_to_vram: @ 81999A8
push {lr}
ldr r0, =0x0203cda4
@@ -790629,6 +790870,7 @@ clear_scheduled_bg_copies_to_vram: @ 81999A8
thumb_func_end clear_scheduled_bg_copies_to_vram
thumb_func_start schedule_bg_copy_tilemap_to_vram
+@ void schedule_bg_copy_tilemap_to_vram(u8 bg_id)
schedule_bg_copy_tilemap_to_vram: @ 81999BC
lsls r0, 24
lsrs r0, 24
@@ -790642,6 +790884,7 @@ schedule_bg_copy_tilemap_to_vram: @ 81999BC
thumb_func_end schedule_bg_copy_tilemap_to_vram
thumb_func_start do_scheduled_bg_tilemap_copies_to_vram
+@ void do_scheduled_bg_tilemap_copies_to_vram()
do_scheduled_bg_tilemap_copies_to_vram: @ 81999D0
push {r4,lr}
ldr r4, =0x0203cda4
@@ -790685,6 +790928,7 @@ _08199A14:
thumb_func_end do_scheduled_bg_tilemap_copies_to_vram
thumb_func_start reset_temp_tile_data_buffers
+@ void reset_temp_tile_data_buffers()
reset_temp_tile_data_buffers: @ 8199A20
push {lr}
ldr r3, =0x0203cda8
@@ -790749,6 +790993,7 @@ _08199A8A:
thumb_func_end free_temp_tile_data_buffers_if_possible
thumb_func_start decompress_and_copy_tile_data_to_vram
+@ int decompress_and_copy_tile_data_to_vram(u8 bg_id, int src, int size, u16 offset, u8 mode)
decompress_and_copy_tile_data_to_vram: @ 8199A90
push {r4-r7,lr}
mov r7, r9
@@ -790813,6 +791058,7 @@ _08199AFA:
thumb_func_end decompress_and_copy_tile_data_to_vram
thumb_func_start copy_decompressed_tile_data_to_vram_autofree
+@ void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, int src, u16 size, u16 offset, u8 mode)
copy_decompressed_tile_data_to_vram_autofree: @ 8199B08
push {r4-r7,lr}
mov r7, r9
@@ -790875,6 +791121,7 @@ _08199B6E:
thumb_func_end copy_decompressed_tile_data_to_vram_autofree
thumb_func_start task_free_buf_after_copying_tile_data_to_vram
+@ void task_free_buf_after_copying_tile_data_to_vram(int task_id)
task_free_buf_after_copying_tile_data_to_vram: @ 8199B84
push {r4,lr}
lsls r0, 24
@@ -790886,7 +791133,7 @@ task_free_buf_after_copying_tile_data_to_vram: @ 8199B84
adds r0, r1
movs r1, 0x8
ldrsh r0, [r0, r1]
- bl dma3_transfer_queue_check_for_space
+ bl CheckForSpaceForDma3Request
lsls r0, 16
cmp r0, 0
bne _08199BB4
@@ -790905,6 +791152,7 @@ _08199BB4:
thumb_func_end task_free_buf_after_copying_tile_data_to_vram
thumb_func_start malloc_and_decompress
+@ void *malloc_and_decompress(void *src, int *size)
malloc_and_decompress: @ 8199BC0
push {r4,r5,lr}
adds r5, r0, 0
@@ -790932,6 +791180,7 @@ _08199BE8:
thumb_func_end malloc_and_decompress
thumb_func_start copy_decompressed_tile_data_to_vram
+@ s16 copy_decompressed_tile_data_to_vram(u8 bg_id, int src, u16 size, u16 offset, u8 mode)
copy_decompressed_tile_data_to_vram: @ 8199BF0
push {r4,lr}
adds r4, r1, 0
@@ -791257,7 +791506,7 @@ _08199E16:
lsrs r2, 16
adds r1, r4, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_fill
+ bl RequestDma3Fill
pop {r3,r4}
mov r8, r3
mov r9, r4
@@ -824301,6 +824550,7 @@ sub_81AAB70: @ 81AAB70
thumb_func_end sub_81AAB70
thumb_func_start c2_bag
+@ void c2_bag()
c2_bag: @ 81AAB9C
push {lr}
ldr r2, =sub_8086194 + 1
@@ -825088,6 +825338,7 @@ allocate_bag_item_list_buffers: @ 81AB218
thumb_func_end allocate_bag_item_list_buffers
thumb_func_start load_bag_item_list_buffers
+@ void load_bag_item_list_buffers(int pocket_id)
load_bag_item_list_buffers: @ 81AB240
push {r4-r7,lr}
mov r7, r8
@@ -825243,6 +825494,7 @@ _081AB34A:
thumb_func_end load_bag_item_list_buffers
thumb_func_start get_name
+@ void get_name(char *dest, int name_id)
get_name: @ 81AB39C
push {r4-r6,lr}
adds r6, r0, 0
@@ -825413,6 +825665,7 @@ _081AB50C:
thumb_func_end sub_81AB450
thumb_func_start sub_81AB520
+@ void sub_81AB520(u8 rbox_id, int item_index_in_pocket, int a3)
sub_81AB520: @ 81AB520
push {r4-r7,lr}
mov r7, r9
@@ -825590,6 +825843,7 @@ _081AB696:
thumb_func_end sub_81AB520
thumb_func_start bag_menu_print_description_box_text
+@ void bag_menu_print_description_box_text(int a1)
bag_menu_print_description_box_text: @ 81AB6B0
push {r4,lr}
sub sp, 0x14
@@ -827006,6 +827260,7 @@ sub_81AC23C: @ 81AC23C
thumb_func_end sub_81AC23C
thumb_func_start bag_menu_draw_pocket_indicator_square
+@ void bag_menu_draw_pocket_indicator_square(char x, int is_current_bag)
bag_menu_draw_pocket_indicator_square: @ 81AC26C
push {lr}
sub sp, 0x8
@@ -829196,6 +829451,7 @@ _081AD5D2:
thumb_func_end sub_81AD520
thumb_func_start display_sell_item_ask_str
+@ void display_sell_item_ask_str(int a1)
display_sell_item_ask_str: @ 81AD5DC
push {r4-r7,lr}
lsls r0, 24
@@ -854181,6 +854437,7 @@ _081BA220:
thumb_func_end sub_81BA040
thumb_func_start fbox6_func
+@ int fbox6_func(struct TextBox *x)
fbox6_func: @ 81BA250
push {r4-r6,lr}
adds r6, r0, 0
@@ -880387,7 +880644,7 @@ sub_81C7E58: @ 81C7E58
adds r0, r4, 0
adds r2, r5, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
movs r0, 0x2
bl gpu_tile_obj_tag_get_range_start
ldr r3, [r7, 0x20]
@@ -880470,7 +880727,7 @@ sub_81C7F24: @ 81C7F24
adds r0, r4, 0
adds r2, r5, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
_081C7F8A:
pop {r4-r6}
pop {r0}
@@ -889468,7 +889725,7 @@ sub_81CC39C: @ 81CC39C
lsls r2, 4
adds r0, r5, 0
movs r3, 0x1
- bl dma3_transfer_queue_add_copy
+ bl RequestDma3Copy
adds r4, r0, 0
lsls r4, 16
lsrs r4, 16
@@ -889530,7 +889787,7 @@ sub_81CC440: @ 81CC440
_081CC452:
movs r1, 0x3C
ldrsh r0, [r4, r1]
- bl dma3_transfer_queue_check_for_space
+ bl CheckForSpaceForDma3Request
lsls r0, 16
asrs r0, 16
movs r1, 0x1