diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-03-19 11:36:14 -0400 | 
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-03-19 11:36:14 -0400 | 
| commit | 0447ee0cf95d2defb9a202def65288aa5bf1410b (patch) | |
| tree | db0a67dcb406514756a94e2a3053b72e105b761e /engine | |
| parent | 12070ca50067d3abe36a730190f88ee43f2cace9 (diff) | |
Relabel some map-related WRAM
wMisc -> {wSurroundingTiles, wBoxPartialData, wLink_c608}
wOverworldMap -> {wOverworldMapBlocks, wHallOfFamePokemonList}
Diffstat (limited to 'engine')
| -rwxr-xr-x | engine/debug.asm | 8 | ||||
| -rwxr-xr-x | engine/events/battle_tower/battle_tower.asm | 20 | ||||
| -rwxr-xr-x | engine/events/halloffame.asm | 14 | ||||
| -rwxr-xr-x | engine/events/overworld.asm | 4 | ||||
| -rw-r--r-- | engine/events/print_unown_2.asm | 12 | ||||
| -rwxr-xr-x | engine/link.asm | 14 | ||||
| -rwxr-xr-x | engine/mystery_gift.asm | 6 | ||||
| -rw-r--r-- | engine/routines/loadmappart.asm | 6 | ||||
| -rw-r--r-- | engine/save.asm | 76 | ||||
| -rwxr-xr-x | engine/unown_puzzle.asm | 4 | ||||
| -rwxr-xr-x | engine/warp_connection.asm | 2 | 
11 files changed, 83 insertions, 83 deletions
| diff --git a/engine/debug.asm b/engine/debug.asm index 4c3110fe1..d148af542 100755 --- a/engine/debug.asm +++ b/engine/debug.asm @@ -71,7 +71,7 @@ Function818f4: ; 818f4  	ld hl, PokemonPalettes  Function818fd: ; 818fd -	ld de, wOverworldMap +	ld de, wOverworldMapBlocks  	ld c, NUM_POKEMON + 1  .asm_81902  	push bc @@ -87,7 +87,7 @@ Function818fd: ; 818fd  Function81911: ; 81911  	ld hl, TrainerPalettes -	ld de, wOverworldMap +	ld de, wOverworldMapBlocks  	ld c, NUM_TRAINER_CLASSES  .asm_81919  	push bc @@ -424,7 +424,7 @@ Function81bf4: ; 81bf4  	ld h, $0  	add hl, hl  	add hl, hl -	ld de, wOverworldMap +	ld de, wOverworldMapBlocks  	add hl, de  	ld de, wc608  	ld bc, 4 @@ -876,7 +876,7 @@ Function81eca: ; 81eca  	ld h, $0  	add hl, hl  	add hl, hl -	ld de, wOverworldMap +	ld de, wOverworldMapBlocks  	add hl, de  	ld e, l  	ld d, h diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm index 9dace59b4..d2e3b1c4c 100755 --- a/engine/events/battle_tower/battle_tower.asm +++ b/engine/events/battle_tower/battle_tower.asm @@ -64,7 +64,7 @@ Function170114: ; 170114  	ld a, $5  	call GetSRAMBank  	ld hl, $a948 -	ld de, wMisc +	ld de, wc608  	ld bc, $f6 ; 246  	call CopyBytes  	call CloseSRAM @@ -90,11 +90,11 @@ Function170139: ; 170139  	ld b, $0  	add hl, bc  	call CloseSRAM -; Store that number in wMisc +; Store that number in wc608  	ld a, h -	ld [wMisc], a +	ld [wc608], a  	ld a, l -	ld [wMisc + 1], a +	ld [wc608 + 1], a  	ld hl, wBT_OTTempMon1DVs  	ld a, [wPlayerID]  	ld [hli], a @@ -161,7 +161,7 @@ Function170139: ; 170139  	ld hl, $a894  	ld bc, NAME_LENGTH_JAPANESE  	call CopyBytes -	ld hl, wMisc +	ld hl, wc608  	ld de, $a948  	ld bc, $f6  	call CopyBytes @@ -674,7 +674,7 @@ Function1704e1: ; 1704e1  	call CopyBytes  	ld hl, $a8b2 -	ld de, wMisc +	ld de, wc608  	ld bc, $0096  	call CopyBytes @@ -793,7 +793,7 @@ Function1704e1: ; 1704e1  	call .PlaceUpDownArrows  	ld a, $50  	ld [wcd4e], a -	ld hl, wMisc +	ld hl, wc608  	ld a, [wNrOfBeatenBattleTowerTrainers]  	ld c, a  	xor a @@ -1441,7 +1441,7 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10  	ld a, $5  	call GetSRAMBank  	ld hl, $b023 -	ld de, wMisc +	ld de, wc608  	ld bc, $0069  	call CopyBytes  	ld a, [$a825] @@ -1460,14 +1460,14 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10  	ld a, $0  	call GetSRAMBank  	ld hl, wRTC -	ld de, wMisc +	ld de, wc608  	ld bc, $0004  	call CopyBytes  	call CloseSRAM  	ld a, $5  	call GetSRAMBank  	ld hl, $b08c -	ld de, wMisc +	ld de, wc608  	ld c, $4  .compare_loop  	ld a, [de] diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index cf3831066..b6b547aae 100755 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -143,12 +143,12 @@ AnimateHallOfFame: ; 864c3  GetHallOfFameParty: ; 8653f -	ld hl, wOverworldMap -	ld bc, HOF_LENGTH +	ld hl, wHallOfFamePokemonList +	ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1  	xor a  	call ByteFill  	ld a, [wHallOfFameCount] -	ld de, wOverworldMap +	ld de, wHallOfFamePokemonList  	ld [de], a  	inc de  	ld hl, wPartySpecies @@ -216,7 +216,7 @@ GetHallOfFameParty: ; 8653f  	pop bc  	inc c  	pop de -	ld hl, HOF_MON_LENGTH +	ld hl, wHallOfFamePokemonListMon1End - wHallOfFamePokemonListMon1  	add hl, de  	ld e, l  	ld d, h @@ -224,7 +224,7 @@ GetHallOfFameParty: ; 8653f  	jr .next  .done -	ld a, $ff +	ld a, -1  	ld [de], a  	ret  ; 865b5 @@ -422,7 +422,7 @@ LoadHOFTeam: ; 8671c  	cp NUM_HOF_TEAMS  	jr nc, .invalid  	ld hl, sHallOfFame -	ld bc, HOF_LENGTH +	ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1  	call AddNTimes  	ld a, BANK(sHallOfFame)  	call GetSRAMBank @@ -430,7 +430,7 @@ LoadHOFTeam: ; 8671c  	and a  	jr z, .absent  	ld de, wHallOfFameTemp -	ld bc, HOF_LENGTH +	ld bc, wHallOfFameTempEnd - wHallOfFameTemp + 1  	call CopyBytes  	call CloseSRAM  	and a diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 60ed7cdf9..f9d67f0bd 100755 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -179,7 +179,7 @@ CheckMapForSomethingToCut: ; c7ce  	farcall CheckCutCollision  	pop de  	jr nc, .fail -	; Get the location of the current block in wOverworldMap. +	; Get the location of the current block in wOverworldMapBlocks.  	call GetBlockLocation  	ld c, [hl]  	; See if that block contains something that can be cut. @@ -188,7 +188,7 @@ CheckMapForSomethingToCut: ; c7ce  	call CheckOverworldTileArrays  	pop hl  	jr nc, .fail -	; Back up the wOverworldMap address to wBuffer3 +	; Back up the wOverworldMapBlocks address to wBuffer3  	ld a, l  	ld [wBuffer3], a  	ld a, h diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm index 78611e594..a2c1f47e3 100644 --- a/engine/events/print_unown_2.asm +++ b/engine/events/print_unown_2.asm @@ -12,7 +12,7 @@ RotateUnownFrontpic: ; e0000  	ld de, wd002  	call .Copy  	call .Rotate -	ld hl, UnownPrinter_OverworldMapRectangle +	ld hl, UnownPrinter_GBPrinterRectangle  	pop bc  	add hl, bc  	add hl, bc @@ -30,7 +30,7 @@ RotateUnownFrontpic: ; e0000  	cp 7 * 7  	jr c, .loop -	ld hl, wOverworldMap +	ld hl, wGameboyPrinterRAM  	ld de, sScratch  	ld bc, 7 * 7 tiles  	call CopyBytes @@ -95,17 +95,17 @@ RotateUnownFrontpic: ; e0000  	jr nz, .loop_count  	ret -overworldmaprect: MACRO +gbprinterrect: MACRO  y = 0  rept \1  x = \1 * (\2 + -1) + y  rept \2 -	dw wOverworldMap tile x +	dw wGameboyPrinterRAM tile x  x = x + -\2  endr  y = y + 1  endr  ENDM -UnownPrinter_OverworldMapRectangle: ; e008b -	overworldmaprect 7, 7 +UnownPrinter_GBPrinterRectangle: ; e008b +	gbprinterrect 7, 7 diff --git a/engine/link.asm b/engine/link.asm index c693e6919..77c3a5d6b 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -84,9 +84,9 @@ Gen2ToGen1LinkComms: ; 2805d  	call Serial_ExchangeBytes  	ld a, SERIAL_NO_DATA_BYTE  	ld [de], a -	ld hl, wMisc -	ld de, wPlayerTrademonSpecies -	ld bc, wPlayerTrademonSpecies - wMisc +	ld hl, wLink_c608 +	ld de, wTrademons +	ld bc, wTrademons - wLink_c608  	call Serial_ExchangeBytes  	xor a  	ld [rIF], a @@ -229,9 +229,9 @@ Gen2ToGen2LinkComms: ; 28177  	call Serial_ExchangeBytes  	ld a, SERIAL_NO_DATA_BYTE  	ld [de], a -	ld hl, wMisc -	ld de, wPlayerTrademonSpecies -	ld bc, $c8 +	ld hl, wLink_c608 +	ld de, wTrademons +	ld bc, wTrademons - wLink_c608  	call Serial_ExchangeBytes  	ld a, [wLinkMode]  	cp LINK_TRADECENTER @@ -581,7 +581,7 @@ FixDataForLinkTransfer: ; 28434  	ld [hli], a  	dec b  	jr nz, .loop2 -	ld hl, wMisc +	ld hl, wLink_c608  	ld a, SERIAL_PREAMBLE_BYTE  	ld [hli], a  	ld [hli], a diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm index c73e4246e..4aed9ee70 100755 --- a/engine/mystery_gift.asm +++ b/engine/mystery_gift.asm @@ -394,7 +394,7 @@ Function104b88: ; 104b88 (41:4b88)  	jp nz, Function104d32  	call Function104d38  	ret nz -	ld hl, wOverworldMap +	ld hl, wLinkData  	ld a, [wca02]  	ld b, a  	call Function104d4e @@ -551,7 +551,7 @@ Function104cd2: ; 104cd2 (41:4cd2)  	jp nz, Function104d32  	call Function104d38  	ret nz -	ld hl, wOverworldMap +	ld hl, wLinkData  	ld a, [wca02]  	ld b, a  	call Function104d4e @@ -1543,7 +1543,7 @@ Function105777: ; 105777 (41:5777)  	ret  Function10578c: ; 10578c (41:578c) -	ld de, wOverworldMap +	ld de, wLinkData  	ld a, BANK(sPlayerData)  	call GetSRAMBank  	ld hl, sPlayerData + wPlayerName - wPlayerData diff --git a/engine/routines/loadmappart.asm b/engine/routines/loadmappart.asm index 2184ebf7e..9eeef7259 100644 --- a/engine/routines/loadmappart.asm +++ b/engine/routines/loadmappart.asm @@ -1,9 +1,9 @@  _LoadMapPart:: ; 4d15b -	ld hl, wMisc +	ld hl, wSurroundingTiles  	ld a, [wMetatileStandingY]  	and a  	jr z, .top_row -	ld bc, WMISC_WIDTH * 2 +	ld bc, SURROUNDING_WIDTH * 2  	add hl, bc  .top_row @@ -25,7 +25,7 @@ _LoadMapPart:: ; 4d15b  	dec c  	jr nz, .loop2  	ld a, l -	add 4 +	add METATILE_WIDTH  	ld l, a  	jr nc, .carry  	inc h diff --git a/engine/save.asm b/engine/save.asm index 7984c1612..efde37ffe 100644 --- a/engine/save.asm +++ b/engine/save.asm @@ -165,9 +165,9 @@ AddHallOfFameEntry: ; 14b5f  	ld a, c  	or b  	jr nz, .loop -	ld hl, wOverworldMap +	ld hl, wHallOfFamePokemonList  	ld de, sHallOfFame -	ld bc, HOF_LENGTH +	ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1  	call CopyBytes  	call CloseSRAM  	ret @@ -943,8 +943,8 @@ endr  ; 150f9  SaveBoxAddress: ; 150f9 -; Save box via wMisc. -; We do this in three steps because the size of wMisc is less than +; Save box via wBoxPartialData. +; We do this in three steps because the size of wBoxPartialData is less than  ; the size of sBox.  	push hl  ; Load the first part of the active box. @@ -953,8 +953,8 @@ SaveBoxAddress: ; 150f9  	ld a, BANK(sBox)  	call GetSRAMBank  	ld hl, sBox -	ld de, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld de, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	pop de @@ -963,23 +963,23 @@ SaveBoxAddress: ; 150f9  	push af  	push de  	call GetSRAMBank -	ld hl, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld hl, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  ; Load the second part of the active box.  	ld a, BANK(sBox)  	call GetSRAMBank -	ld hl, sBox + (wMiscEnd - wMisc) -	ld de, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) +	ld de, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	pop de  	pop af -	ld hl, (wMiscEnd - wMisc) +	ld hl, (wBoxPartialDataEnd - wBoxPartialData)  	add hl, de  	ld e, l  	ld d, h @@ -987,30 +987,30 @@ SaveBoxAddress: ; 150f9  	push af  	push de  	call GetSRAMBank -	ld hl, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld hl, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  ; Load the third and final part of the active box.  	ld a, BANK(sBox)  	call GetSRAMBank -	ld hl, sBox + (wMiscEnd - wMisc) * 2 -	ld de, wMisc -	ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e +	ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2 +	ld de, wBoxPartialData +	ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e  	call CopyBytes  	call CloseSRAM  	pop de  	pop af -	ld hl, (wMiscEnd - wMisc) +	ld hl, (wBoxPartialDataEnd - wBoxPartialData)  	add hl, de  	ld e, l  	ld d, h  ; Save it to the final part of the target box.  	call GetSRAMBank -	ld hl, wMisc -	ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e +	ld hl, wBoxPartialData +	ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e  	call CopyBytes  	call CloseSRAM @@ -1020,8 +1020,8 @@ SaveBoxAddress: ; 150f9  LoadBoxAddress: ; 1517d (5:517d) -; Load box via wMisc. -; We do this in three steps because the size of wMisc is less than +; Load box via wBoxPartialData. +; We do this in three steps because the size of wBoxPartialData is less than  ; the size of sBox.  	push hl  	ld l, e @@ -1030,52 +1030,52 @@ LoadBoxAddress: ; 1517d (5:517d)  	push af  	push hl  	call GetSRAMBank -	ld de, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld de, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	ld a, BANK(sBox)  	call GetSRAMBank -	ld hl, wMisc +	ld hl, wBoxPartialData  	ld de, sBox -	ld bc, (wMiscEnd - wMisc) +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	pop hl  	pop af -	ld de, (wMiscEnd - wMisc) +	ld de, (wBoxPartialDataEnd - wBoxPartialData)  	add hl, de  ; Load part 2  	push af  	push hl  	call GetSRAMBank -	ld de, wMisc -	ld bc, (wMiscEnd - wMisc) +	ld de, wBoxPartialData +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	ld a, BANK(sBox)  	call GetSRAMBank -	ld hl, wMisc -	ld de, sBox + (wMiscEnd - wMisc) -	ld bc, (wMiscEnd - wMisc) +	ld hl, wBoxPartialData +	ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) +	ld bc, (wBoxPartialDataEnd - wBoxPartialData)  	call CopyBytes  	call CloseSRAM  	pop hl  	pop af  ; Load part 3 -	ld de, (wMiscEnd - wMisc) +	ld de, (wBoxPartialDataEnd - wBoxPartialData)  	add hl, de  	call GetSRAMBank -	ld de, wMisc -	ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e +	ld de, wBoxPartialData +	ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e  	call CopyBytes  	call CloseSRAM  	ld a, BANK(sBox)  	call GetSRAMBank -	ld hl, wMisc -	ld de, sBox + (wMiscEnd - wMisc) * 2 -	ld bc, sBoxEnd - (sBox + (wMiscEnd - wMisc) * 2) ; $8e +	ld hl, wBoxPartialData +	ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2 +	ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e  	call CopyBytes  	call CloseSRAM diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm index 83527ea69..300f07de4 100755 --- a/engine/unown_puzzle.asm +++ b/engine/unown_puzzle.asm @@ -14,8 +14,8 @@ _UnownPuzzle: ; e1190  	xor a  	ld [hBGMapMode], a  	call DisableLCD -	ld hl, wMisc ; includes wPuzzlePieces -	ld bc, wMiscEnd - wMisc +	ld hl, wc608 ; includes wPuzzlePieces +	ld bc, wc7e8 - wc608  	xor a  	call ByteFill  	ld hl, UnownPuzzleCursorGFX diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm index 069b72234..2f5e488cc 100755 --- a/engine/warp_connection.asm +++ b/engine/warp_connection.asm @@ -392,7 +392,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)  GetCoordOfUpperLeftCorner:: ; 10486d -	ld hl, wOverworldMap +	ld hl, wOverworldMapBlocks  	ld a, [wXCoord]  	bit 0, a  	jr nz, .increment_then_halve1 | 
