From 87bf797eefd20f3409af3b11eeb8dd6e816b3c07 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 14 Sep 2020 10:05:32 -0400 Subject: Use ld16 --- source/bank_00.asm | 5 +---- source/bank_02.asm | 10 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/source/bank_00.asm b/source/bank_00.asm index 9cbddd7..1e7cc35 100644 --- a/source/bank_00.asm +++ b/source/bank_00.asm @@ -1424,10 +1424,7 @@ text_draw_char: ld d, [hl] ld hl, gfx_text_chars_bw add hl, de - ld a, l - ld [w_vwf_char_addr + 0], a - ld a, h - ld [w_vwf_char_addr + 1], a + ld16 w_vwf_char_addr, hl ld a, BANK(gfx_text_chars_bw) ld [w_vwf_char_bank], a diff --git a/source/bank_02.asm b/source/bank_02.asm index a15b070..7b25e93 100644 --- a/source/bank_02.asm +++ b/source/bank_02.asm @@ -72,10 +72,7 @@ textbox_print_char:: .done ; Back up string pointer pop hl - ld a, l - ld [w_textbox_cur_string + 0], a - ld a, h - ld [w_textbox_cur_string + 1], a + ld16 w_textbox_cur_string, hl ; Check if the next character is a terminator ld a, [hl+] @@ -102,10 +99,7 @@ textbox_draw_char:: ld d, [hl] ld hl, gfx_text_chars_dark add hl, de - ld a, l - ld [w_vwf_char_addr + 0], a - ld a, h - ld [w_vwf_char_addr + 1], a + ld16 w_vwf_char_addr, hl ld a, BANK(gfx_text_chars_dark) ld [w_vwf_char_bank], a -- cgit v1.2.3 From 83ea6fc2fba1f04fd2266f0a15e873cd94f6ed5b Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 14 Sep 2020 10:34:22 -0400 Subject: Decompress the game select screens --- gfx/game_select/game_select.bin.xor | Bin 0 -> 4759 bytes gfx/game_select/game_select.png | Bin 0 -> 2321 bytes gfx/game_select/pokemon_picross.attrmap | Bin 0 -> 1024 bytes gfx/game_select/pokemon_picross.tilemap | Bin 0 -> 1024 bytes gfx/game_select/pokemon_picross.tilemap_attrmap.xor | Bin 0 -> 614 bytes gfx/game_select/safari_picross.attrmap | 1 + gfx/game_select/safari_picross.tilemap | 2 ++ gfx/game_select/safari_picross.tilemap_attrmap.xor | Bin 0 -> 698 bytes gfx/gfx.mk | 7 +++---- source/bank_76.asm | 5 +++++ source/bank_79.asm | 4 ++++ source/bank_7a.asm | 5 +++++ 12 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 gfx/game_select/game_select.bin.xor create mode 100644 gfx/game_select/game_select.png create mode 100644 gfx/game_select/pokemon_picross.attrmap create mode 100644 gfx/game_select/pokemon_picross.tilemap create mode 100644 gfx/game_select/pokemon_picross.tilemap_attrmap.xor create mode 100644 gfx/game_select/safari_picross.attrmap create mode 100644 gfx/game_select/safari_picross.tilemap create mode 100644 gfx/game_select/safari_picross.tilemap_attrmap.xor create mode 100644 source/bank_79.asm diff --git a/gfx/game_select/game_select.bin.xor b/gfx/game_select/game_select.bin.xor new file mode 100644 index 0000000..7f3803d Binary files /dev/null and b/gfx/game_select/game_select.bin.xor differ diff --git a/gfx/game_select/game_select.png b/gfx/game_select/game_select.png new file mode 100644 index 0000000..3b1b189 Binary files /dev/null and b/gfx/game_select/game_select.png differ diff --git a/gfx/game_select/pokemon_picross.attrmap b/gfx/game_select/pokemon_picross.attrmap new file mode 100644 index 0000000..5861905 Binary files /dev/null and b/gfx/game_select/pokemon_picross.attrmap differ diff --git a/gfx/game_select/pokemon_picross.tilemap b/gfx/game_select/pokemon_picross.tilemap new file mode 100644 index 0000000..63aa168 Binary files /dev/null and b/gfx/game_select/pokemon_picross.tilemap differ diff --git a/gfx/game_select/pokemon_picross.tilemap_attrmap.xor b/gfx/game_select/pokemon_picross.tilemap_attrmap.xor new file mode 100644 index 0000000..e36d310 Binary files /dev/null and b/gfx/game_select/pokemon_picross.tilemap_attrmap.xor differ diff --git a/gfx/game_select/safari_picross.attrmap b/gfx/game_select/safari_picross.attrmap new file mode 100644 index 0000000..64ee47a --- /dev/null +++ b/gfx/game_select/safari_picross.attrmap @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/gfx/game_select/safari_picross.tilemap b/gfx/game_select/safari_picross.tilemap new file mode 100644 index 0000000..8c5ef0e --- /dev/null +++ b/gfx/game_select/safari_picross.tilemap @@ -0,0 +1,2 @@ +فڀooooooooooooی܀ooooooooooooooooooooooooooooooooooooHIJi + ooooooooooooXYZyoooooooooooo()*+,-./oooooooooooo89:;<=>?ooooooooooooHIJKLMNOooooooooooooXYZ[\]^_݀ooooooooooooklmno߀oooooooooooo{|}~辀oooooooooooo€ùĀŹooooooooooooހǹȀɹooooooooooooЀѹooooooooooooҹooooooooooooعoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo \ No newline at end of file diff --git a/gfx/game_select/safari_picross.tilemap_attrmap.xor b/gfx/game_select/safari_picross.tilemap_attrmap.xor new file mode 100644 index 0000000..c2cd4c1 Binary files /dev/null and b/gfx/game_select/safari_picross.tilemap_attrmap.xor differ diff --git a/gfx/gfx.mk b/gfx/gfx.mk index ac7c62b..df4c26e 100644 --- a/gfx/gfx.mk +++ b/gfx/gfx.mk @@ -9,12 +9,11 @@ RGBGFXFLAGS := $(dir_build)/%.bin: %.png | $$(dir $$@) $(RGBGFX) $(RGBGFXFLAGS) -o $@ $< -$(dir_build)/gfx/sprites/%.bin: RGBGFXFLAGS = -h - -# data_select.tilemap_attrmap.xor decompresses to data_select.tilemap concatenated with data_select.attrmap -$(dir_build)/gfx/data_select/data_select.tilemap_attrmap: gfx/data_select/data_select.tilemap gfx/data_select/data_select.attrmap | $$(dir $$@) +$(dir_build)/%.tilemap_attrmap: %.tilemap %.attrmap | $$(dir $$@) cat $^ > $@ +$(dir_build)/gfx/sprites/%.bin: RGBGFXFLAGS = -h + # data_select.bin.xor decompresses to 2bpp-encoded data_select.png with an extra byte $33 (ASCII "3") appended $(dir_build)/gfx/data_select/data_select.bin: gfx/data_select/data_select.bin.png | $$(dir $$@) $(RGBGFX) $(RGBGFXFLAGS) -o $@ $< diff --git a/source/bank_76.asm b/source/bank_76.asm index e4dbb0f..8775628 100644 --- a/source/bank_76.asm +++ b/source/bank_76.asm @@ -25,3 +25,8 @@ INCBIN "gfx/levels/lv_7_cycling_road_sgb.bin" gfx_lv_7_cycling_road_duplicate:: INCBIN "gfx/levels/lv_7_cycling_road_unused.bin" .end:: + +SECTION "compressed_tilemap_attrmap_safari_picross", ROMX[$7c35], BANK[$76] +compressed_tilemap_attrmap_safari_picross:: +INCBIN "gfx/game_select/safari_picross.tilemap_attrmap.xor" +.end:: diff --git a/source/bank_79.asm b/source/bank_79.asm new file mode 100644 index 0000000..457da66 --- /dev/null +++ b/source/bank_79.asm @@ -0,0 +1,4 @@ +SECTION "compressed_gfx_game_select", ROMX[$6ba1], BANK[$79] +compressed_gfx_game_select:: +INCBIN "gfx/game_select/game_select.bin.xor" +.end:: diff --git a/source/bank_7a.asm b/source/bank_7a.asm index c743f69..09e13b8 100644 --- a/source/bank_7a.asm +++ b/source/bank_7a.asm @@ -7,3 +7,8 @@ INCBIN "gfx/title/title.tilemap" attrmap_title:: INCBIN "gfx/title/title.attrmap" .end:: + +SECTION "compressed_tilemap_attrmap_pokemon_picross", ROMX[$7d18], BANK[$7a] +compressed_tilemap_attrmap_pokemon_picross:: +INCBIN "gfx/game_select/pokemon_picross.tilemap_attrmap.xor" +.end:: -- cgit v1.2.3