From df67e27500c2149bca5f444dbe278d734a6ba17d Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 12 Sep 2020 13:24:16 -0400 Subject: Define ld16 macro --- source/bank_05.asm | 270 +++++++++++------------------------------------------ 1 file changed, 54 insertions(+), 216 deletions(-) (limited to 'source') diff --git a/source/bank_05.asm b/source/bank_05.asm index 237eb88..7947d0a 100644 --- a/source/bank_05.asm +++ b/source/bank_05.asm @@ -52,10 +52,7 @@ function_05_4028: ld [w_textbox_width], a ld a, 141 ld [w_textbox_height], a - ld a, LOW(string_02_6880) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6880) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6880 ld a, $01 ld [w_d6ca], a ld a, [w_d61b] @@ -230,10 +227,7 @@ tutorial_scene_01: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_68ca) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_68ca) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_68ca xor a ld [w_cdb0], a @@ -242,10 +236,7 @@ tutorial_scene_01: ld [w_cdac], a ld a, $0e ld [w_cdad], a - ld a, LOW(tutorial_data_42c8) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_42c8) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_42c8 ld a, $05 ld [w_cdb3], a ld a, 60 @@ -278,10 +269,7 @@ tutorial_scene_03: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_68e2) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_68e2) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_68e2 xor a ld [w_cdb0], a @@ -290,10 +278,7 @@ tutorial_scene_03: ld [w_cdac], a ld a, $31 ld [w_cdad], a - ld a, LOW(tutorial_data_42c8) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_42c8) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_42c8 ld a, $05 ld [w_cdb3], a ld a, 60 @@ -323,10 +308,7 @@ tutorial_scene_05: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_68fe) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_68fe) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_68fe ld hl, w_tutorial_scene inc [hl] @@ -345,10 +327,7 @@ tutorial_scene_06: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_693e) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_693e) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_693e ld a, 10 ld [w_text_delay_timer], a @@ -384,10 +363,7 @@ tutorial_scene_09: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data farcall function_02_5b67 ld a, $00 ld [w_d6ca], a @@ -413,10 +389,7 @@ tutorial_scene_10: ld [w_text_delay_timer], a farcall function_02_5b67 - ld a, LOW(string_02_6960) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6960) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6960 ld hl, w_tutorial_scene inc [hl] @@ -437,10 +410,7 @@ tutorial_scene_11: farcall function_06_4964 farcall function_02_5b98 - ld a, LOW(string_02_69ae) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_69ae) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_69ae ld hl, w_tutorial_scene inc [hl] @@ -462,10 +432,7 @@ tutorial_scene_12: farcall function_02_5560 farcall function_02_5a82 - ld a, LOW(string_02_69e6) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_69e6) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_69e6 xor a ld [w_cdb0], a @@ -474,10 +441,7 @@ tutorial_scene_12: ld [w_cdac], a ld a, $0e ld [w_cdad], a - ld a, LOW(tutorial_data_42c8) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_42c8) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_42c8 ld a, $05 ld [w_cdb3], a ld a, 60 @@ -507,10 +471,7 @@ tutorial_scene_14: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_6a06) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6a06) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6a06 ld hl, w_tutorial_scene inc [hl] @@ -529,10 +490,7 @@ tutorial_scene_15: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6a44) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6a44) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6a44 xor a ld [w_cdb0], a @@ -541,10 +499,7 @@ tutorial_scene_15: ld [w_cdac], a ld a, $0e ld [w_cdad], a - ld a, LOW(tutorial_data_497d) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_497d) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_497d ld a, $05 ld [w_cdb3], a ld a, 60 @@ -577,10 +532,7 @@ tutorial_scene_17: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_6a5e) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6a5e) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6a5e ld hl, w_tutorial_scene inc [hl] @@ -595,10 +547,7 @@ tutorial_scene_18: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data ld a, $00 ld [w_cdd6], a ld a, $00 @@ -637,19 +586,13 @@ tutorial_scene_19: ld [w_cdac], a ld a, $31 ld [w_cdad], a - ld a, LOW(tutorial_data_42c8) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_42c8) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_42c8 ld a, $05 ld [w_cdb3], a ld a, 60 ld [w_text_delay_timer], a - ld a, LOW(string_02_6aa4) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6aa4) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6aa4 ld hl, w_tutorial_scene inc [hl] @@ -674,10 +617,7 @@ tutorial_scene_21: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_6ac4) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6ac4) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6ac4 ld hl, w_tutorial_scene inc [hl] @@ -693,10 +633,7 @@ tutorial_scene_22: ld hl, function_02_5b77 farcall wait_press_a_blink - ld a, LOW(string_02_6afc) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6afc) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6afc call function_00_1085 farcall function_02_5b98 @@ -708,10 +645,7 @@ tutorial_scene_22: ld [w_cdac], a ld a, $37 ld [w_cdad], a - ld a, LOW(tutorial_data_4c91) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_4c91) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_4c91 ld a, $05 ld [w_cdb3], a ld a, 60 @@ -743,10 +677,7 @@ tutorial_scene_24: farcall text_delay jp nz, farcall_ret - ld a, LOW(string_02_6b1c) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6b1c) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6b1c ld hl, w_tutorial_scene inc [hl] @@ -761,10 +692,7 @@ tutorial_scene_25: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data ld a, $00 ld [w_cdd6], a ld a, $01 @@ -796,10 +724,7 @@ tutorial_scene_26: ld hl, w_tutorial_scene inc [hl] - ld a, LOW(string_02_6b7e) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6b7e) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6b7e call function_00_1085 farcall function_02_5b98 @@ -835,10 +760,7 @@ tutorial_scene_28: ld [w_ce00], a farcall function_3c_4377 - ld a, LOW(string_02_6bca) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6bca) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6bca ld hl, w_tutorial_scene inc [hl] @@ -857,10 +779,7 @@ tutorial_scene_29: ld hl, w_tutorial_scene inc [hl] - ld a, LOW(string_02_6be4) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6be4) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6be4 call function_00_1085 farcall function_02_5b98 @@ -879,10 +798,7 @@ tutorial_scene_30: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data ld a, $03 ld [w_cdd6], a ld a, $01 @@ -915,10 +831,7 @@ tutorial_scene_32: call function_00_1085 - ld a, LOW(string_02_6c18) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6c18) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6c18 ld a, $01 ld [w_d6ca], a @@ -940,10 +853,7 @@ tutorial_scene_33: ld hl, w_tutorial_scene inc [hl] - ld a, LOW(string_02_6c58) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6c58) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6c58 call function_00_1085 farcall function_02_5b98 @@ -960,10 +870,7 @@ tutorial_scene_34: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data ld a, $03 ld [w_cdd6], a ld a, $01 @@ -998,10 +905,7 @@ tutorial_scene_35: farcall function_02_5a82 farcall function_29_7421 - ld a, LOW(string_02_6cba) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6cba) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6cba ld hl, w_tutorial_scene inc [hl] @@ -1021,10 +925,7 @@ tutorial_scene_36: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data ld hl, w_tutorial_scene inc [hl] @@ -1056,10 +957,7 @@ tutorial_scene_37: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6d10) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6d10) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6d10 ld a, $01 ld [w_c329], a @@ -1097,10 +995,7 @@ tutorial_scene_39: cp $3f jp c, farcall_ret - ld a, LOW(string_02_6d74) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6d74) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6d74 ld hl, w_tutorial_scene inc [hl] @@ -1134,10 +1029,7 @@ tutorial_scene_41: cp $3f jp c, farcall_ret - ld a, LOW(string_02_6d90) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6d90) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6d90 call function_00_1085 farcall function_02_5b98 @@ -1162,10 +1054,7 @@ tutorial_scene_42: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6dde) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6dde) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6dde ld hl, w_tutorial_scene inc [hl] @@ -1185,10 +1074,7 @@ tutorial_scene_43: farcall function_02_5b98 farcall function_02_5a82 - ld a, LOW(string_02_6e1e) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6e1e) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6e1e ld hl, w_tutorial_scene inc [hl] @@ -1203,10 +1089,7 @@ tutorial_scene_44: xor a ld [w_d54a], a ld [w_d54b], a - ld a, LOW(.data) - ld [w_d54c + 0], a - ld a, HIGH(.data) - ld [w_d54c + 1], a + ld16 w_d54c, .data farcall function_02_5b67 xor a ld [w_cdd6], a @@ -1232,10 +1115,7 @@ tutorial_scene_45: ld hl, function_02_5b77 farcall wait_press_a_blink - ld a, LOW(string_02_6e42) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6e42) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6e42 ld hl, w_tutorial_scene inc [hl] @@ -1259,10 +1139,7 @@ tutorial_scene_46: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6e60) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6e60) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6e60 ld hl, w_tutorial_scene inc [hl] @@ -1281,10 +1158,7 @@ tutorial_scene_47: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6ed0) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6ed0) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6ed0 ld hl, w_tutorial_scene inc [hl] @@ -1317,10 +1191,7 @@ tutorial_scene_48: farcall function_02_5b98 farcall function_02_5a82 - ld a, LOW(string_02_6ee4) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6ee4) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6ee4 ld hl, w_tutorial_scene inc [hl] @@ -1339,10 +1210,7 @@ tutorial_scene_49: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6f32) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6f32) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6f32 ld hl, w_tutorial_scene inc [hl] @@ -1361,10 +1229,7 @@ tutorial_scene_50: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6f96) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6f96) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6f96 ld hl, w_tutorial_scene inc [hl] @@ -1383,10 +1248,7 @@ tutorial_scene_51: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_6fe2) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_6fe2) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_6fe2 ld hl, w_tutorial_scene inc [hl] @@ -1411,10 +1273,7 @@ tutorial_scene_52: ld a, $27 ld [w_cdad], a - ld a, LOW(tutorial_data_5b4e) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_5b4e) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_5b4e ld a, $05 ld [w_cdb3], a jp farcall_ret @@ -1435,10 +1294,7 @@ tutorial_scene_53: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_702c) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_702c) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_702c ld hl, w_tutorial_scene inc [hl] @@ -1469,10 +1325,7 @@ tutorial_scene_54: ld [w_cdac], a ld a, $27 ld [w_cdad], a - ld a, LOW(tutorial_data_5b4e) - ld [w_cdb1 + 0], a - ld a, HIGH(tutorial_data_5b4e) - ld [w_cdb1 + 1], a + ld16 w_cdb1, tutorial_data_5b4e ld a, $05 ld [w_cdb3], a jp farcall_ret @@ -1490,10 +1343,7 @@ tutorial_scene_55: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_708c) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_708c) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_708c ld hl, w_tutorial_scene inc [hl] @@ -1512,10 +1362,7 @@ tutorial_scene_56: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_70c2) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_70c2) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_70c2 ld hl, w_tutorial_scene inc [hl] @@ -1534,10 +1381,7 @@ tutorial_scene_57: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_710e) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_710e) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_710e ld hl, w_tutorial_scene inc [hl] @@ -1556,10 +1400,7 @@ tutorial_scene_58: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_7142) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_7142) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_7142 ld hl, w_tutorial_scene inc [hl] @@ -1578,10 +1419,7 @@ tutorial_scene_59: call function_00_1085 farcall function_02_5b98 - ld a, LOW(string_02_71be) - ld [w_text_cur_string + 0], a - ld a, HIGH(string_02_71be) - ld [w_text_cur_string + 1], a + ld16 w_text_cur_string, string_02_71be ld hl, w_tutorial_scene inc [hl] -- cgit v1.2.3 From 4ffbbdfa129314e39a2b9487385d5c52eac9d04d Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 12 Sep 2020 13:36:53 -0400 Subject: Port const macros from pokecrystal, and add const_dw for jumptables --- source/bank_05.asm | 139 +++++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 68 deletions(-) (limited to 'source') diff --git a/source/bank_05.asm b/source/bank_05.asm index 7947d0a..ce0b36f 100644 --- a/source/bank_05.asm +++ b/source/bank_05.asm @@ -6,28 +6,29 @@ SECTION "tutorial", ROMX[$4000], BANK[$05] tutorial:: ld a, [w_cdd2_jumptable_index] rst jumptable - dw function_05_400a - dw function_05_401b - dw function_05_4028 + const_def + const_dw TUTORIAL_0, function_05_400a + const_dw TUTORIAL_1, function_05_401b + const_dw TUTORIAL_2, function_05_4028 function_05_400a: xor a ld [w_d535], a ld a, $00 ld [w_d550], a - ld a, 2 + ld a, TUTORIAL_2 ld [w_cdd2_jumptable_index], a jp farcall_ret function_05_401b: ld a, $01 ld [w_d550], a - ld a, 2 + ld a, TUTORIAL_2 ld [w_cdd2_jumptable_index], a jp farcall_ret function_05_4028: - xor a + xor a ; TUTORIAL_0 ld [w_cdd2_jumptable_index], a ld a, [w_c357] and a @@ -143,67 +144,69 @@ function_05_4028: tutorial_scene:: ld a, [w_tutorial_scene] rst jumptable - dw tutorial_scene_00 - dw tutorial_scene_01 - dw tutorial_scene_02 - dw tutorial_scene_03 - dw tutorial_scene_04 - dw tutorial_scene_05 - dw tutorial_scene_06 - dw tutorial_scene_07 - dw tutorial_scene_08 - dw tutorial_scene_09 - dw tutorial_scene_10 - dw tutorial_scene_11 - dw tutorial_scene_12 - dw tutorial_scene_13 - dw tutorial_scene_14 - dw tutorial_scene_15 - dw tutorial_scene_16 - dw tutorial_scene_17 - dw tutorial_scene_18 - dw tutorial_scene_19 - dw tutorial_scene_20 - dw tutorial_scene_21 - dw tutorial_scene_22 - dw tutorial_scene_23 - dw tutorial_scene_24 - dw tutorial_scene_25 - dw tutorial_scene_26 - dw tutorial_scene_27 - dw tutorial_scene_28 - dw tutorial_scene_29 - dw tutorial_scene_30 - dw tutorial_scene_31 - dw tutorial_scene_32 - dw tutorial_scene_33 - dw tutorial_scene_34 - dw tutorial_scene_35 - dw tutorial_scene_36 - dw tutorial_scene_37 - dw tutorial_scene_38 - dw tutorial_scene_39 - dw tutorial_scene_40 - dw tutorial_scene_41 - dw tutorial_scene_42 - dw tutorial_scene_43 - dw tutorial_scene_44 - dw tutorial_scene_45 - dw tutorial_scene_46 - dw tutorial_scene_47 - dw tutorial_scene_48 - dw tutorial_scene_49 - dw tutorial_scene_50 - dw tutorial_scene_51 - dw tutorial_scene_52 - dw tutorial_scene_53 - dw tutorial_scene_54 - dw tutorial_scene_55 - dw tutorial_scene_56 - dw tutorial_scene_57 - dw tutorial_scene_58 - dw tutorial_scene_59 - dw tutorial_scene_60 + const_def + const_dw TUTORIAL_SCENE_00, tutorial_scene_00 + const_dw TUTORIAL_SCENE_01, tutorial_scene_01 + const_dw TUTORIAL_SCENE_02, tutorial_scene_02 + const_dw TUTORIAL_SCENE_03, tutorial_scene_03 + const_dw TUTORIAL_SCENE_04, tutorial_scene_04 + const_dw TUTORIAL_SCENE_05, tutorial_scene_05 + const_dw TUTORIAL_SCENE_06, tutorial_scene_06 + const_dw TUTORIAL_SCENE_07, tutorial_scene_07 + const_dw TUTORIAL_SCENE_08, tutorial_scene_08 + const_dw TUTORIAL_SCENE_09, tutorial_scene_09 + const_dw TUTORIAL_SCENE_10, tutorial_scene_10 + const_dw TUTORIAL_SCENE_11, tutorial_scene_11 + const_dw TUTORIAL_SCENE_12, tutorial_scene_12 + const_dw TUTORIAL_SCENE_13, tutorial_scene_13 + const_dw TUTORIAL_SCENE_14, tutorial_scene_14 + const_dw TUTORIAL_SCENE_15, tutorial_scene_15 + const_dw TUTORIAL_SCENE_16, tutorial_scene_16 + const_dw TUTORIAL_SCENE_17, tutorial_scene_17 + const_dw TUTORIAL_SCENE_18, tutorial_scene_18 + const_dw TUTORIAL_SCENE_19, tutorial_scene_19 + const_dw TUTORIAL_SCENE_20, tutorial_scene_20 + const_dw TUTORIAL_SCENE_21, tutorial_scene_21 + const_dw TUTORIAL_SCENE_22, tutorial_scene_22 + const_dw TUTORIAL_SCENE_23, tutorial_scene_23 + const_dw TUTORIAL_SCENE_24, tutorial_scene_24 + const_dw TUTORIAL_SCENE_25, tutorial_scene_25 + const_dw TUTORIAL_SCENE_26, tutorial_scene_26 + const_dw TUTORIAL_SCENE_27, tutorial_scene_27 + const_dw TUTORIAL_SCENE_28, tutorial_scene_28 + const_dw TUTORIAL_SCENE_29, tutorial_scene_29 + const_dw TUTORIAL_SCENE_30, tutorial_scene_30 + const_dw TUTORIAL_SCENE_31, tutorial_scene_31 + const_dw TUTORIAL_SCENE_32, tutorial_scene_32 + const_dw TUTORIAL_SCENE_33, tutorial_scene_33 + const_dw TUTORIAL_SCENE_34, tutorial_scene_34 + const_dw TUTORIAL_SCENE_35, tutorial_scene_35 + const_dw TUTORIAL_SCENE_36, tutorial_scene_36 + const_dw TUTORIAL_SCENE_37, tutorial_scene_37 + const_dw TUTORIAL_SCENE_38, tutorial_scene_38 + const_dw TUTORIAL_SCENE_39, tutorial_scene_39 + const_dw TUTORIAL_SCENE_40, tutorial_scene_40 + const_dw TUTORIAL_SCENE_41, tutorial_scene_41 + const_dw TUTORIAL_SCENE_42, tutorial_scene_42 + const_dw TUTORIAL_SCENE_43, tutorial_scene_43 + const_dw TUTORIAL_SCENE_44, tutorial_scene_44 + const_dw TUTORIAL_SCENE_45, tutorial_scene_45 + const_dw TUTORIAL_SCENE_46, tutorial_scene_46 + const_dw TUTORIAL_SCENE_47, tutorial_scene_47 + const_dw TUTORIAL_SCENE_48, tutorial_scene_48 + const_dw TUTORIAL_SCENE_49, tutorial_scene_49 + const_dw TUTORIAL_SCENE_50, tutorial_scene_50 + const_dw TUTORIAL_SCENE_51, tutorial_scene_51 + const_dw TUTORIAL_SCENE_52, tutorial_scene_52 + const_dw TUTORIAL_SCENE_53, tutorial_scene_53 + const_dw TUTORIAL_SCENE_54, tutorial_scene_54 + const_dw TUTORIAL_SCENE_55, tutorial_scene_55 + const_dw TUTORIAL_SCENE_56, tutorial_scene_56 + const_dw TUTORIAL_SCENE_57, tutorial_scene_57 + const_dw TUTORIAL_SCENE_58, tutorial_scene_58 + const_dw TUTORIAL_SCENE_59, tutorial_scene_59 + const_dw TUTORIAL_SCENE_60, tutorial_scene_60 +NUM_TUTORIAL_SCENES EQU const_value tutorial_scene_00: ld a, [w_cdd2_jumptable_index] @@ -920,7 +923,7 @@ tutorial_scene_36: ld a, $01 ld [w_d60f], a farcall function_29_5579 - ld a, $02 + ld a, TUTORIAL_2 ld [w_cdd2_jumptable_index], a xor a ld [w_d54a], a -- cgit v1.2.3 From 24d95f7de2da127a5d9ee71372c61be20a522549 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 12 Sep 2020 16:39:56 -0400 Subject: Extract the rest of the level graphics, and add gfx subdirectories --- source/bank_69.asm | 15 +++++++++++++++ source/bank_6e.asm | 24 ++++++++++++------------ source/bank_6f.asm | 8 ++++---- source/bank_70.asm | 13 +++++++++++++ source/bank_71.asm | 13 +++++++++++++ source/bank_72.asm | 17 +++++++++++++++++ source/bank_73.asm | 15 +++++++++++++++ source/bank_74.asm | 28 ++++++++++++++++++++++++++++ source/bank_75.asm | 25 +++++++++++++++++++++++++ source/bank_76.asm | 27 +++++++++++++++++++++++++++ source/bank_77.asm | 25 +++++++++++++++++++++++++ source/bank_78.asm | 15 +++++++++++++++ 12 files changed, 209 insertions(+), 16 deletions(-) create mode 100644 source/bank_70.asm create mode 100644 source/bank_71.asm create mode 100644 source/bank_72.asm create mode 100644 source/bank_73.asm create mode 100644 source/bank_74.asm create mode 100644 source/bank_75.asm create mode 100644 source/bank_76.asm create mode 100644 source/bank_77.asm create mode 100644 source/bank_78.asm (limited to 'source') diff --git a/source/bank_69.asm b/source/bank_69.asm index ccd64a6..f76b9d4 100644 --- a/source/bank_69.asm +++ b/source/bank_69.asm @@ -1,3 +1,18 @@ +SECTION "lv_1_tok", ROMX[$4800], BANK[$69] + +gfx_lv_1_tokiwa_forest:: +INCBIN "gfx/levels/lv_1_tokiwa_forest.bin" +.end:: + +gfx_lv_1_tokiwa_forest_sgb:: +INCBIN "gfx/levels/lv_1_tokiwa_forest_sgb.bin" +.end:: + +; The unused tree trunk tiles are darker. +gfx_lv_1_tokiwa_forest_duplicate:: +INCBIN "gfx/levels/lv_1_tokiwa_forest_unused.bin" +.end:: + SECTION "gfx_textbox_border", ROMX[$6000], BANK[$69] gfx_textbox_border:: INCBIN "gfx/textbox_border.bin" diff --git a/source/bank_6e.asm b/source/bank_6e.asm index 765e5b3..aad1d67 100644 --- a/source/bank_6e.asm +++ b/source/bank_6e.asm @@ -1,49 +1,49 @@ SECTION "bank6e", ROMX[$4000], BANK[$6e] gfx_text_chars_bw:: -INCBIN "gfx/text_chars_2.bin" +INCBIN "gfx/fonts/text_chars_2.bin" .end:: gfx_pikachu_walk:: -INCBIN "gfx/pikachu_walk.bin" +INCBIN "gfx/sprites/pikachu_walk.bin" .end:: gfx_bulbasaur_walk:: -INCBIN "gfx/bulbasaur_walk.bin" +INCBIN "gfx/sprites/bulbasaur_walk.bin" .end:: gfx_charmander_walk:: -INCBIN "gfx/charmander_walk.bin" +INCBIN "gfx/sprites/charmander_walk.bin" .end:: gfx_squirtle_walk:: -INCBIN "gfx/squirtle_walk.bin" +INCBIN "gfx/sprites/squirtle_walk.bin" .end:: gfx_clefairy_walk:: -INCBIN "gfx/clefairy_walk.bin" +INCBIN "gfx/sprites/clefairy_walk.bin" .end:: gfx_jigglypuff_walk:: -INCBIN "gfx/jigglypuff_walk.bin" +INCBIN "gfx/sprites/jigglypuff_walk.bin" .end:: gfx_misty_walk:: -INCBIN "gfx/misty_walk.bin" +INCBIN "gfx/sprites/misty_walk.bin" .end:: gfx_mew_walk:: -INCBIN "gfx/mew_walk.bin" +INCBIN "gfx/sprites/mew_walk.bin" .end:: gfx_mew_silhouette_walk:: -INCBIN "gfx/mew_silhouette_walk.bin" +INCBIN "gfx/sprites/mew_silhouette_walk.bin" .end:: gfx_psyduck_walk:: -INCBIN "gfx/psyduck_walk.bin" +INCBIN "gfx/sprites/psyduck_walk.bin" .end:: gfx_bill_walk:: -INCBIN "gfx/bill_walk.bin" +INCBIN "gfx/sprites/bill_walk.bin" .end:: diff --git a/source/bank_6f.asm b/source/bank_6f.asm index d4d908b..7240091 100644 --- a/source/bank_6f.asm +++ b/source/bank_6f.asm @@ -1,17 +1,17 @@ SECTION "bank6f", ROMX[$4000], BANK[$6f] gfx_text_chars:: -INCBIN "gfx/text_chars.bin" +INCBIN "gfx/fonts/text_chars.bin" .end:: gfx_lv_2_mt_otsukimi:: -INCBIN "gfx/lv_2_mt_otsukimi.bin" +INCBIN "gfx/levels/lv_2_mt_otsukimi.bin" .end:: gfx_lv_2_mt_otsukimi_sgb:: -INCBIN "gfx/lv_2_mt_otsukimi_sgb.bin" +INCBIN "gfx/levels/lv_2_mt_otsukimi_sgb.bin" .end:: gfx_lv_2_mt_otsukimi_duplicate:: -INCBIN "gfx/lv_2_mt_otsukimi.bin" +INCBIN "gfx/levels/lv_2_mt_otsukimi.bin" .end:: diff --git a/source/bank_70.asm b/source/bank_70.asm new file mode 100644 index 0000000..0d6ed32 --- /dev/null +++ b/source/bank_70.asm @@ -0,0 +1,13 @@ +SECTION "bank70", ROMX[$64c0], BANK[$70] + +gfx_lv_2_lake_zone:: +INCBIN "gfx/levels/lv_2_lake_zone.bin" +.end:: + +gfx_lv_2_lake_zone_sgb:: +INCBIN "gfx/levels/lv_2_lake_zone_sgb.bin" +.end:: + +gfx_lv_2_lake_zone_duplicate:: +INCBIN "gfx/levels/lv_2_lake_zone.bin" +.end:: diff --git a/source/bank_71.asm b/source/bank_71.asm new file mode 100644 index 0000000..430f639 --- /dev/null +++ b/source/bank_71.asm @@ -0,0 +1,13 @@ +SECTION "bank71", ROMX[$6400], BANK[$71] + +gfx_lv_3_mountain_zone:: +INCBIN "gfx/levels/lv_3_mountain_zone.bin" +.end:: + +gfx_lv_3_mountain_zone_sgb:: +INCBIN "gfx/levels/lv_3_mountain_zone_sgb.bin" +.end:: + +gfx_lv_3_mountain_zone_duplicate:: +INCBIN "gfx/levels/lv_3_mountain_zone.bin" +.end:: diff --git a/source/bank_72.asm b/source/bank_72.asm new file mode 100644 index 0000000..fd5f5f5 --- /dev/null +++ b/source/bank_72.asm @@ -0,0 +1,17 @@ +SECTION "bank72", ROMX[$4800], BANK[$72] + +; The Safari Zone level 1 was renamed from Forest Zone to Plain Zone, +; but only the CGB graphics were updated, leaving the old name in +; the SGB and duplicate CGB graphics. + +gfx_lv_1_plain_zone:: +INCBIN "gfx/levels/lv_1_plain_zone.bin" +.end:: + +gfx_lv_1_plain_zone_sgb:: +INCBIN "gfx/levels/lv_1_forest_zone_sgb.bin" +.end:: + +gfx_lv_1_plain_zone_duplicate:: +INCBIN "gfx/levels/lv_1_forest_zone.bin" +.end:: diff --git a/source/bank_73.asm b/source/bank_73.asm new file mode 100644 index 0000000..7108756 --- /dev/null +++ b/source/bank_73.asm @@ -0,0 +1,15 @@ +SECTION "bank73", ROMX[$4800], BANK[$73] + +gfx_lv_0_home:: +INCBIN "gfx/levels/lv_0_home.bin" +.end:: + +gfx_lv_0_home_sgb:: +INCBIN "gfx/levels/lv_0_home_sgb.bin" +.end:: + +; The edges of the unused house roof tiles are dark gray +; like the rest of the roof, not white. +gfx_lv_0_home_duplicate:: +INCBIN "gfx/levels/lv_0_home_unused.bin" +.end:: diff --git a/source/bank_74.asm b/source/bank_74.asm new file mode 100644 index 0000000..097f935 --- /dev/null +++ b/source/bank_74.asm @@ -0,0 +1,28 @@ +SECTION "bank74", ROMX[$4000], BANK[$74] + +gfx_lv_4_jungle_zone:: +INCBIN "gfx/levels/lv_4_jungle_zone.bin" +.end:: + +gfx_lv_4_jungle_zone_sgb:: +INCBIN "gfx/levels/lv_4_jungle_zone_sgb.bin" +.end:: + +; The edges of the unused tree trunk tiles are light and dark gray +; like the rest of the tree, not white and light gray. +gfx_lv_4_jungle_zone_duplicate:: +INCBIN "gfx/levels/lv_4_jungle_zone_unused.bin" +.end:: + +gfx_lv_3_sea_cottage:: +INCBIN "gfx/levels/lv_3_sea_cottage.bin" +.end:: + +gfx_lv_3_sea_cottage_sgb:: +INCBIN "gfx/levels/lv_3_sea_cottage_sgb.bin" +.end:: + +; The unused "3" in "3/10" is has less of a black border. +gfx_lv_3_sea_cottage_duplicate:: +INCBIN "gfx/levels/lv_3_sea_cottage_unused.bin" +.end:: diff --git a/source/bank_75.asm b/source/bank_75.asm new file mode 100644 index 0000000..0862024 --- /dev/null +++ b/source/bank_75.asm @@ -0,0 +1,25 @@ +SECTION "bank75", ROMX[$4000], BANK[$75] + +gfx_lv_4_s_s_anne:: +INCBIN "gfx/levels/lv_4_s_s_anne.bin" +.end:: + +gfx_lv_4_s_s_anne_sgb:: +INCBIN "gfx/levels/lv_4_s_s_anne_sgb.bin" +.end:: + +gfx_lv_4_s_s_anne_duplicate:: +INCBIN "gfx/levels/lv_4_s_s_anne.bin" +.end:: + +gfx_lv_5_pokemon_tower:: +INCBIN "gfx/levels/lv_5_pokemon_tower.bin" +.end:: + +gfx_lv_5_pokemon_tower_sgb:: +INCBIN "gfx/levels/lv_5_pokemon_tower_sgb.bin" +.end:: + +gfx_lv_5_pokemon_tower_duplicate:: +INCBIN "gfx/levels/lv_5_pokemon_tower.bin" +.end:: diff --git a/source/bank_76.asm b/source/bank_76.asm new file mode 100644 index 0000000..e4dbb0f --- /dev/null +++ b/source/bank_76.asm @@ -0,0 +1,27 @@ +SECTION "bank76", ROMX[$4000], BANK[$76] + +gfx_lv_6_silph_company:: +INCBIN "gfx/levels/lv_6_silph_company.bin" +.end:: + +gfx_lv_6_silph_company_sgb:: +INCBIN "gfx/levels/lv_6_silph_company_sgb.bin" +.end:: + +; The unused "6" in "6/10" is taller. +gfx_lv_6_silph_company_duplicate:: +INCBIN "gfx/levels/lv_6_silph_company_unused.bin" +.end:: + +gfx_lv_7_cycling_road:: +INCBIN "gfx/levels/lv_7_cycling_road.bin" +.end:: + +gfx_lv_7_cycling_road_sgb:: +INCBIN "gfx/levels/lv_7_cycling_road_sgb.bin" +.end:: + +; The unused "/10" in "7/10" and "LV" are taller. +gfx_lv_7_cycling_road_duplicate:: +INCBIN "gfx/levels/lv_7_cycling_road_unused.bin" +.end:: diff --git a/source/bank_77.asm b/source/bank_77.asm new file mode 100644 index 0000000..8874fb2 --- /dev/null +++ b/source/bank_77.asm @@ -0,0 +1,25 @@ +SECTION "bank77", ROMX[$4000], BANK[$77] + +gfx_lv_8_power_plant:: +INCBIN "gfx/levels/lv_8_power_plant.bin" +.end:: + +gfx_lv_8_power_plant_sgb:: +INCBIN "gfx/levels/lv_8_power_plant_sgb.bin" +.end:: + +gfx_lv_8_power_plant_duplicate:: +INCBIN "gfx/levels/lv_8_power_plant.bin" +.end:: + +gfx_lv_9_futago_island:: +INCBIN "gfx/levels/lv_9_futago_island.bin" +.end:: + +gfx_lv_9_futago_island_sgb:: +INCBIN "gfx/levels/lv_9_futago_island_sgb.bin" +.end:: + +gfx_lv_9_futago_island_duplicate:: +INCBIN "gfx/levels/lv_9_futago_island.bin" +.end:: diff --git a/source/bank_78.asm b/source/bank_78.asm new file mode 100644 index 0000000..f150592 --- /dev/null +++ b/source/bank_78.asm @@ -0,0 +1,15 @@ +SECTION "bank78", ROMX[$4000], BANK[$78] + +gfx_lv_10_hanada_cave:: +INCBIN "gfx/levels/lv_10_hanada_cave.bin" +.end:: + +gfx_lv_10_hanada_cave_sgb:: +INCBIN "gfx/levels/lv_10_hanada_cave_sgb.bin" +.end:: + +; The water behind cliff corner tiles is dark gray +; like the rest of the water, not white. +gfx_lv_10_hanada_cave_duplicate:: +INCBIN "gfx/levels/lv_10_hanada_cave_unused.bin" +.end:: -- cgit v1.2.3