Skip to content

Commit

Permalink
Expand tilesets from 192 to 255 tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
lwelyk committed Jan 11, 2024
1 parent 69cc93b commit c6661e2
Show file tree
Hide file tree
Showing 86 changed files with 187 additions and 294 deletions.
75 changes: 24 additions & 51 deletions constants/charmap.asm
Original file line number Diff line number Diff line change
Expand Up @@ -36,42 +36,6 @@
charmap "<ROCKET>", $5e ; "ROCKET"
charmap "<DEXEND>", $5f

; Actual characters (from gfx/font/font_extra.png)

charmap "<BOLD_A>", $60 ; unused
charmap "<BOLD_B>", $61 ; unused
charmap "<BOLD_C>", $62 ; unused
charmap "<BOLD_D>", $63 ; unused
charmap "<BOLD_E>", $64 ; unused
charmap "<BOLD_F>", $65 ; unused
charmap "<BOLD_G>", $66 ; unused
charmap "<BOLD_H>", $67 ; unused
charmap "<BOLD_I>", $68 ; unused
charmap "<BOLD_V>", $69
charmap "<BOLD_S>", $6a
charmap "<BOLD_L>", $6b ; unused
charmap "<BOLD_M>", $6c ; unused
charmap "<COLON>", $6d ; colon with tinier dots than ":"
charmap "ぃ", $6e ; hiragana small i, unused
charmap "ぅ", $6f ; hiragana small u, unused
charmap "<PO>", $70
charmap "<KE>", $71
charmap "“", $72 ; opening quote
charmap "”", $73 ; closing quote
charmap "·", $74 ; middle dot, unused
charmap "…", $75 ; ellipsis
charmap "ぁ", $76 ; hiragana small a, unused
charmap "ぇ", $77 ; hiragana small e, unused
charmap "ぉ", $78 ; hiragana small o, unused

charmap "┌", $79
charmap "─", $7a
charmap "┐", $7b
charmap "│", $7c
charmap "└", $7d
charmap "┘", $7e
charmap " ", $7f

; Actual characters (from gfx/font/font_battle_extra.png)

charmap "<LV>", $6e
Expand All @@ -84,14 +48,7 @@

; Actual characters (from other graphics files)

; needed for _LoadFontsExtra1 (see engine/gfx/load_font.asm)
charmap "■", $60 ; gfx/font/black.2bpp
charmap "▲", $61 ; gfx/font/up_arrow.png
charmap "☎", $62 ; gfx/font/phone_icon.2bpp

; needed for MagikarpHouseSign (see engine/events/magikarp.asm)
charmap "′", $6e ; gfx/font/feet_inches.png
charmap "″", $6f ; gfx/font/feet_inches.png
charmap " ", $7f ; gfx/frames/space.png

; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1
charmap "⁂", $3f ; gfx/stats/stats_tiles.png, tile 14
Expand Down Expand Up @@ -159,12 +116,15 @@
charmap "y", $b8
charmap "z", $b9

charmap "Ä", $c0
charmap "Ö", $c1
charmap "Ü", $c2
charmap "ä", $c3
charmap "ö", $c4
charmap "ü", $c5
charmap "┌", $ba
charmap "─", $bb
charmap "┐", $bc
charmap "│", $bd
charmap "└", $be
charmap "┘", $bf

charmap "′", $ce
charmap "″", $cf

charmap "'d", $d0
charmap "'l", $d1
Expand All @@ -174,15 +134,28 @@
charmap "'t", $d5
charmap "'v", $d6

charmap "■", $d7
charmap "▲", $d8
charmap "☎", $d9
charmap "<BOLD_V>", $da
charmap "<BOLD_S>", $db
charmap "<COLON>", $dc ; colon with tinier dots than ":"
charmap "“", $dd ; opening quote
charmap "”", $de ; closing quote

charmap "←", $df
charmap "'", $e0
charmap "<PK>", $e1
charmap "<MN>", $e2
charmap "-", $e3

charmap "<PO>", $e4
charmap "<KE>", $e5

charmap "?", $e6
charmap "!", $e7
charmap ".", $e8
charmap "<DOT>", $e8 ; decimal point; same as "."
charmap "&", $e9

charmap "é", $ea
Expand All @@ -193,7 +166,7 @@
charmap "♂", $ef
charmap "¥", $f0 ; Poké Dollar sign
charmap "×", $f1
charmap "<DOT>", $f2 ; decimal point; same as "." in English
charmap "", $f2 ; ellipsis
charmap "/", $f3
charmap ",", $f4
charmap "♀", $f5
Expand Down
2 changes: 1 addition & 1 deletion constants/text_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DEF PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F
DEF PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F

; character sets (see charmap.asm)
DEF FIRST_REGULAR_TEXT_CHAR EQU $60
DEF FIRST_REGULAR_TEXT_CHAR EQU $7f
DEF FIRST_HIRAGANA_DAKUTEN_CHAR EQU $20

; gfx/font/unown_font.png
Expand Down
7 changes: 1 addition & 6 deletions engine/events/halloffame.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DEF HALLOFFAME_COLON EQU $63

HallOfFame::
call HallOfFame_FadeOutMusic
Expand Down Expand Up @@ -519,10 +518,6 @@ DisplayHOFMon:

HOF_AnimatePlayerPic:
call ClearBGPalettes
ld hl, vTiles2 tile HALLOFFAME_COLON
ld de, FontExtra + 13 tiles ; "<COLON>"
lb bc, BANK(FontExtra), 1
call Request2bpp
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
Expand Down Expand Up @@ -592,7 +587,7 @@ HOF_AnimatePlayerPic:
ld de, wGameTimeHours
lb bc, 2, 3
call PrintNum
ld [hl], HALLOFFAME_COLON
ld [hl], "<COLON>"
inc hl
ld de, wGameTimeMinutes
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
Expand Down
11 changes: 0 additions & 11 deletions engine/events/magikarp.asm
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,7 @@ CheckMagikarpLength:
text_far _MagikarpGuruMeasureText
text_end

Magikarp_LoadFeetInchesChars:
ld hl, vTiles2 tile "′" ; $6e
ld de, .feetinchchars
lb bc, BANK(.feetinchchars), 2
call Request2bpp
ret

.feetinchchars
INCBIN "gfx/font/feet_inches.2bpp"

PrintMagikarpLength:
call Magikarp_LoadFeetInchesChars
ld hl, wStringBuffer1
ld de, wMagikarpLength
lb bc, PRINTNUM_LEFTALIGN | 1, 2
Expand Down
14 changes: 1 addition & 13 deletions engine/events/map_name_sign.asm
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
DEF MAP_NAME_SIGN_START EQU $60
DEF MAP_NAME_SIGN_START EQU $c0

InitMapNameSign::
xor a
ldh [hBGMapMode], a
farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
ret

; should have just been a fallthrough
.inefficient_farcall
ld a, [wMapGroup]
ld b, a
ld a, [wMapNumber]
Expand Down Expand Up @@ -42,7 +38,6 @@ InitMapNameSign::
; Display for 60 frames
ld a, 60
ld [wLandmarkSignTimer], a
call LoadMapNameSignGFX
call InitMapNameFrame
farcall HDMATransfer_OnlyTopFourRows
ret
Expand Down Expand Up @@ -124,13 +119,6 @@ PlaceMapNameSign::
ldh [hLCDCPointer], a
ret

LoadMapNameSignGFX:
ld de, MapEntryFrameGFX
ld hl, vTiles2 tile MAP_NAME_SIGN_START
lb bc, BANK(MapEntryFrameGFX), 14
call Get2bpp
ret

InitMapNameFrame:
hlcoord 0, 0
ld b, 2
Expand Down
30 changes: 3 additions & 27 deletions engine/gfx/load_font.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,17 @@ Get2bppOptionalHDMA: ; unreferenced
jp Get2bpp

_LoadStandardFont::
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 128 ; "A" to "9"
ldh a, [rLCDC]
bit rLCDC_ENABLE, a
jp z, Copy1bpp

ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 32 ; "A" to "]"
call Get1bppViaHDMA
ld de, Font + 32 * LEN_1BPP_TILE
ld hl, vTiles1 tile $20
lb bc, BANK(Font), 32 ; "a" to $bf
lb bc, BANK(Font), 26 ; "a" to "z" (skip "┌" to "┘")
call Get1bppViaHDMA
ld de, Font + 64 * LEN_1BPP_TILE
ld hl, vTiles1 tile $40
lb bc, BANK(Font), 32 ; "Ä" to "←"
lb bc, BANK(Font), 32 ; $c0 to "←"
call Get1bppViaHDMA
ld de, Font + 96 * LEN_1BPP_TILE
ld hl, vTiles1 tile $60
Expand All @@ -42,26 +35,9 @@ _LoadStandardFont::
ret

_LoadFontsExtra1::
ld de, FontsExtra_SolidBlackGFX
ld hl, vTiles2 tile "■" ; $60
lb bc, BANK(FontsExtra_SolidBlackGFX), 1
call Get1bppViaHDMA
ld de, PokegearPhoneIconGFX
ld hl, vTiles2 tile "☎" ; $62
lb bc, BANK(PokegearPhoneIconGFX), 1
call Get2bppViaHDMA
ld de, FontExtra + 3 tiles ; "<BOLD_D>"
ld hl, vTiles2 tile "<BOLD_D>"
lb bc, BANK(FontExtra), 22 ; "<BOLD_D>" to "ぉ"
call Get2bppViaHDMA
jr LoadFrame

_LoadFontsExtra2::
ld de, FontsExtra2_UpArrowGFX
ld hl, vTiles2 tile "▲" ; $61
ld b, BANK(FontsExtra2_UpArrowGFX)
ld c, 1
call Get2bppViaHDMA
ret

_LoadFontsBattleExtra::
Expand All @@ -79,7 +55,7 @@ LoadFrame:
call AddNTimes
ld d, h
ld e, l
ld hl, vTiles2 tile "┌" ; $79
ld hl, vTiles0 tile "┌" ; $ba
lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘"
call Get1bppViaHDMA
ld hl, vTiles2 tile " " ; $7f
Expand Down
6 changes: 3 additions & 3 deletions engine/menus/naming_screen.asm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DEF NAMINGSCREEN_CURSOR EQU $7e

DEF NAMINGSCREEN_BORDER EQU "■" ; $60
DEF NAMINGSCREEN_BORDER EQU "■" ; $d7
DEF NAMINGSCREEN_MIDDLELINE EQU "→" ; $eb
DEF NAMINGSCREEN_UNDERLINE EQU "<DOT>" ; $f2
DEF NAMINGSCREEN_UNDERLINE EQU "" ; $d9

_NamingScreen:
call DisableSpriteUpdates
Expand Down Expand Up @@ -844,7 +844,7 @@ LoadNamingScreenGFX:
lb bc, BANK(NamingScreenGFX_UnderLine), 1
call Get1bpp

ld de, vTiles2 tile NAMINGSCREEN_BORDER
ld de, vTiles0 tile NAMINGSCREEN_BORDER
ld hl, NamingScreenGFX_Border
ld bc, 1 tiles
ld a, BANK(NamingScreenGFX_Border)
Expand Down
2 changes: 1 addition & 1 deletion engine/pokemon/correct_nick_errors.asm
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ CorrectNickErrors::
db "<ROUTE>", "<GREEN>" + 1
db "<ENEMY>", "<ENEMY>" + 1
db "<MOM>", "<TM>" + 1
db "<ROCKET>", "┘" + 1
db "<ROCKET>", " "
db -1 ; end
14 changes: 0 additions & 14 deletions gfx/font.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
FontExtra:
INCBIN "gfx/font/font_extra.2bpp"

Font:
INCBIN "gfx/font/font.1bpp"
Expand Down Expand Up @@ -38,29 +36,17 @@ INCBIN "gfx/pokegear/town_map.2bpp.lz"
UnusedWeekdayKanjiGFX: ; unreferenced
INCBIN "gfx/font/unused_weekday_kanji.2bpp"

PokegearPhoneIconGFX:
INCBIN "gfx/font/phone_icon.2bpp"

UnusedBoldFontGFX: ; unreferenced
INCBIN "gfx/font/unused_bold_font.1bpp"

TextboxSpaceGFX:
; StatsScreen_LoadTextboxSpaceGFX reads 2bpp; LoadFrame reads first half as 1bpp
INCBIN "gfx/font/space.2bpp"

FontsExtra_SolidBlackGFX:
INCBIN "gfx/font/black.1bpp"

UnusedUpArrowGFX: ; unreferenced
INCBIN "gfx/font/unused_up_arrow.1bpp"

MobilePhoneTilesGFX:
INCBIN "gfx/mobile/phone_tiles.2bpp"

MapEntryFrameGFX:
INCBIN "gfx/frames/map_entry_sign.2bpp"

FontsExtra2_UpArrowGFX:
INCBIN "gfx/font/up_arrow.2bpp"

INCLUDE "gfx/footprints.asm"
Binary file removed gfx/font/black.png
Binary file not shown.
Binary file removed gfx/font/feet_inches.png
Binary file not shown.
Binary file modified gfx/font/font.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gfx/font/font_extra.png
Binary file not shown.
Binary file modified gfx/font/font_inversed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gfx/font/overworld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gfx/font/phone_icon.png
Binary file not shown.
Binary file removed gfx/font/up_arrow.png
Binary file not shown.
Binary file removed gfx/frames/map_entry_sign.png
Binary file not shown.
Binary file modified gfx/tilesets/aerodactyl_word_room.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions gfx/tilesets/aerodactyl_word_room_palette_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN
tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN

rept 16
db $ff
endr
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, TEXT

tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
Expand Down
Binary file added gfx/tilesets/battle_tower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions gfx/tilesets/battle_tower_inside_palette_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
tilepal 0, BROWN, YELLOW, RED, BROWN, BROWN, BROWN, RED, RED
tilepal 0, WATER, RED, RED, RED, RED, GRAY, RED, WATER

rept 16
db $ff
endr
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, TEXT

tilepal 1, GRAY, WATER, GRAY, WATER, WATER, WATER, ROOF, ROOF
tilepal 1, YELLOW, YELLOW, GRAY, GRAY, WATER, WATER, RED, RED
Expand Down
Binary file modified gfx/tilesets/battle_tower_outside.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions gfx/tilesets/battle_tower_outside_palette_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
tilepal 0, WATER, GRAY, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY

rept 16
db $ff
endr
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, TEXT

tilepal 1, RED, WATER, WATER, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 1, RED, RED, RED, ROOF, RED, WATER, WATER, WATER
Expand Down
Binary file modified gfx/tilesets/beta_word_room.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions gfx/tilesets/beta_word_room_palette_map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN
tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN

rept 16
db $ff
endr
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
tilepal 0, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, TEXT

tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
Expand Down
Loading

0 comments on commit c6661e2

Please sign in to comment.