Standardize on lowercase Tilemap and Attrmap

We used to have a mixture of TileMap and and Tilemap, as well as the
similar AttrMap. Standardize on one.
This commit is contained in:
mid-kid
2020-02-13 18:30:13 +01:00
parent 34ceaac71d
commit 26b8bf003e
84 changed files with 630 additions and 630 deletions

View File

@@ -1,34 +1,34 @@
LoadTileMapToTempTileMap::
; Load wTileMap into wTempTileMap
LoadTilemapToTempTilemap::
; Load wTilemap into wTempTilemap
ldh a, [rSVBK]
push af
ld a, BANK(wTempTileMap)
ld a, BANK(wTempTilemap)
ldh [rSVBK], a
hlcoord 0, 0
decoord 0, 0, wTempTileMap
ld bc, wTileMapEnd - wTileMap
decoord 0, 0, wTempTilemap
ld bc, wTilemapEnd - wTilemap
call CopyBytes
pop af
ldh [rSVBK], a
ret
SafeLoadTempTileMapToTileMap::
SafeLoadTempTilemapToTilemap::
xor a
ldh [hBGMapMode], a
call LoadTempTileMapToTileMap
call LoadTempTilemapToTilemap
ld a, 1
ldh [hBGMapMode], a
ret
LoadTempTileMapToTileMap::
; Load wTempTileMap into wTileMap
LoadTempTilemapToTilemap::
; Load wTempTilemap into wTilemap
ldh a, [rSVBK]
push af
ld a, BANK(wTempTileMap)
ld a, BANK(wTempTilemap)
ldh [rSVBK], a
hlcoord 0, 0, wTempTileMap
hlcoord 0, 0, wTempTilemap
decoord 0, 0
ld bc, wTileMapEnd - wTileMap
ld bc, wTilemapEnd - wTilemap
call CopyBytes
pop af
ldh [rSVBK], a

View File

@@ -194,7 +194,7 @@ MenuBoxCoord2Tile::
ld b, a
Coord2Tile::
; Return the address of wTileMap(c, b) in hl.
; Return the address of wTilemap(c, b) in hl.
xor a
ld h, a
ld l, b
@@ -221,7 +221,7 @@ MenuBoxCoord2Attr::
ld b, a
Coord2Attr::
; Return the address of wAttrMap(c, b) in hl.
; Return the address of wAttrmap(c, b) in hl.
xor a
ld h, a
ld l, b
@@ -237,6 +237,6 @@ Coord2Attr::
xor a
ld b, a
add hl, bc
bccoord 0, 0, wAttrMap
bccoord 0, 0, wAttrmap
add hl, bc
ret

View File

@@ -140,7 +140,7 @@ Unreferenced_Function3ed7::
Function3eea::
push hl
push bc
ld de, wAttrMap - wTileMap
ld de, wAttrmap - wTilemap
add hl, de
inc b
inc b
@@ -165,7 +165,7 @@ Unreferenced_Function3efd::
.fill_attr
push hl
push bc
ld de, wAttrMap - wTileMap
ld de, wAttrmap - wTilemap
add hl, de
inc b
inc b
@@ -178,7 +178,7 @@ Unreferenced_Function3efd::
ret
Function3f20::
hlcoord 0, 0, wAttrMap
hlcoord 0, 0, wAttrmap
ld b, 6
ld c, 20
call Function3f35

View File

@@ -273,13 +273,13 @@ Serial_ExchangeLinkMenuSelection::
ret
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
call LoadTileMapToTempTileMap
call LoadTilemapToTempTilemap
callfar PlaceWaitingText
call WaitLinkTransfer
jp SafeLoadTempTileMapToTileMap
jp SafeLoadTempTilemapToTilemap
Serial_SyncAndExchangeNybble::
call LoadTileMapToTempTileMap
call LoadTilemapToTempTilemap
callfar PlaceWaitingText
jp WaitLinkTransfer

View File

@@ -19,12 +19,12 @@ FillBoxWithByte::
jr nz, .row
ret
ClearTileMap::
; Fill wTileMap with blank tiles.
ClearTilemap::
; Fill wTilemap with blank tiles.
hlcoord 0, 0
ld a, " "
ld bc, wTileMapEnd - wTileMap
ld bc, wTilemapEnd - wTilemap
call ByteFill
; Update the BG Map.
@@ -35,10 +35,10 @@ ClearTileMap::
ClearScreen::
ld a, PAL_BG_TEXT
hlcoord 0, 0, wAttrMap
hlcoord 0, 0, wAttrmap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
jr ClearTileMap
jr ClearTilemap
Textbox::
; Draw a text box at hl with room for b lines of c characters each.
@@ -99,7 +99,7 @@ TextboxBorder::
TextboxPalette::
; Fill text box width c height b at hl with pal 7
ld de, wAttrMap - wTileMap
ld de, wAttrmap - wTilemap
add hl, de
inc b
inc b
@@ -422,7 +422,7 @@ LineFeedChar::
CarriageReturnChar::
pop hl
push de
ld bc, -wTileMap + $10000
ld bc, -wTilemap + $10000
add hl, bc
ld de, -SCREEN_WIDTH
ld c, 1

View File

@@ -61,7 +61,7 @@ CopyTilemapAtOnce::
jr .CopyTilemapAtOnce
; unused
farcall HDMATransferAttrMapAndTileMapToWRAMBank3
farcall HDMATransferAttrmapAndTilemapToWRAMBank3
ret
.CopyTilemapAtOnce:
@@ -83,7 +83,7 @@ CopyTilemapAtOnce::
di
ld a, BANK(vTiles3)
ldh [rVBK], a
hlcoord 0, 0, wAttrMap
hlcoord 0, 0, wAttrmap
call .StackPointerMagic
ld a, BANK(vTiles0)
ldh [rVBK], a

View File

@@ -114,7 +114,7 @@ WaitTop::
ret
UpdateBGMap::
; Update the BG Map, in thirds, from wTileMap and wAttrMap.
; Update the BG Map, in thirds, from wTilemap and wAttrmap.
ldh a, [hBGMapMode]
and a
@@ -159,7 +159,7 @@ UpdateBGMap::
ld a, 1
ldh [rVBK], a
hlcoord 0, 0, wAttrMap
hlcoord 0, 0, wAttrmap
call .update
ld a, 0
@@ -234,7 +234,7 @@ THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
; Rows of tiles in a third
ld a, SCREEN_HEIGHT / 3
; Discrepancy between wTileMap and BGMap
; Discrepancy between wTilemap and BGMap
ld bc, BG_MAP_WIDTH - (SCREEN_WIDTH - 1)
.row

View File

@@ -6,7 +6,7 @@ RefreshScreen::
rst Bankswitch
call ReanchorBGMap_NoOAMUpdate
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
call LoadFonts_NoOAMUpdate
pop af
@@ -32,7 +32,7 @@ CloseText::
xor a
ldh [hBGMapMode], a
call OverworldTextModeSwitch
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
xor a
ldh [hBGMapMode], a
call SafeUpdateSprites
@@ -52,20 +52,20 @@ OpenText::
call ReanchorBGMap_NoOAMUpdate ; clear bgmap
call SpeechTextbox
call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap ; anchor bgmap
call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap
call LoadFonts_NoOAMUpdate ; load font
pop af
rst Bankswitch
ret
_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap::
_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap::
ldh a, [hOAMUpdate]
push af
ld a, $1
ldh [hOAMUpdate], a
farcall OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
farcall OpenAndCloseMenu_HDMATransferTilemapAndAttrmap
pop af
ldh [hOAMUpdate], a