diff options
Diffstat (limited to 'engine/overworld')
-rwxr-xr-x | engine/overworld/card_key.asm | 10 | ||||
-rwxr-xr-x | engine/overworld/cinnabar_lab.asm | 10 | ||||
-rwxr-xr-x | engine/overworld/cut.asm | 12 | ||||
-rwxr-xr-x | engine/overworld/doors.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/hidden_items.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/hidden_objects.asm | 14 | ||||
-rw-r--r-- | engine/overworld/is_player_just_outside_map.asm | 8 | ||||
-rw-r--r-- | engine/overworld/item.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/ledges.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/map_sprites.asm | 28 | ||||
-rw-r--r-- | engine/overworld/movement.asm | 18 | ||||
-rwxr-xr-x | engine/overworld/npc_movement.asm | 6 | ||||
-rwxr-xr-x | engine/overworld/pewter_guys.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/player_animations.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/trainers.asm | 2 |
15 files changed, 63 insertions, 63 deletions
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index cc9fe3a7..2ef7529c 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -1,6 +1,6 @@ PrintCardKeyText: ; 52673 (14:6673) ld hl, SilphCoMapList - ld a, [W_CURMAP] + ld a, [wCurMap] ld b, a .silphCoMapListLoop ld a, [hli] @@ -15,7 +15,7 @@ PrintCardKeyText: ; 52673 (14:6673) cp $24 jr z, .cardKeyDoorInFrontOfPlayer ld b, a - ld a, [W_CURMAP] + ld a, [wCurMap] cp SILPH_CO_11F ret nz ld a, b @@ -39,7 +39,7 @@ PrintCardKeyText: ; 52673 (14:6673) ld a, e ld c, a ld [wCardKeyDoorX], a - ld a, [W_CURMAP] + ld a, [wCurMap] cp SILPH_CO_11F jr nz, .notSilphCo11F ld a, $3 @@ -84,9 +84,9 @@ CardKeyFailText: ; 526f8 (14:66f8) ; d = Y ; e = X GetCoordsInFrontOfPlayer: ; 526fd (14:66fd) - ld a, [W_YCOORD] + ld a, [wYCoord] ld d, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld e, a ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction and a diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index f81324e0..f7c5e326 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -48,9 +48,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006) .choseDomeFossil ld b, KABUTO .fossilSelected - ld [W_FOSSILITEM], a + ld [wFossilItem], a ld a, b - ld [W_FOSSILMON], a + ld [wFossilMon], a call LoadFossilItemAndMonName ld hl, LabFossil_610ae call PrintText @@ -60,7 +60,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006) jr nz, .cancelledGivingFossil ld hl, LabFossil_610b3 call PrintText - ld a, [W_FOSSILITEM] + ld a, [wFossilItem] ld [hItemToRemoveID], a callba RemoveItemByID ld hl, LabFossil_610b8 @@ -113,11 +113,11 @@ PrintFossilsInBag: ; 610c2 (18:50c2) ; loads the names of the fossil item and the resulting mon LoadFossilItemAndMonName: ; 610eb (18:50eb) - ld a, [W_FOSSILMON] + ld a, [wFossilMon] ld [wd11e], a call GetMonName call CopyStringToCF4B - ld a, [W_FOSSILITEM] + ld a, [wFossilItem] ld [wd11e], a call GetItemName ret diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 30aedbc1..8a0513b2 100755 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -1,7 +1,7 @@ UsedCut: ; ef54 (3:6f54) xor a ld [wActionResultOrTookBattleTurn], a ; initialise to failure value - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] and a ; OVERWORLD jr z, .overworld cp GYM @@ -177,7 +177,7 @@ ReplaceTreeTileBlock: ; f09f (3:709f) ; player (i.e. where the tree is) and replace it with the corresponding tile ; block that doesn't have the tree. push de - ld a, [W_CURMAPWIDTH] + ld a, [wCurMapWidth] add 6 ld c, a ld b, 0 @@ -195,22 +195,22 @@ ReplaceTreeTileBlock: ; f09f (3:709f) cp SPRITE_FACING_LEFT jr z, .left ; right - ld a, [W_XBLOCKCOORD] + ld a, [wXBlockCoord] and a jr z, .centerTileBlock jr .rightOfCenter .down - ld a, [W_YBLOCKCOORD] + ld a, [wYBlockCoord] and a jr z, .centerTileBlock jr .belowCenter .up - ld a, [W_YBLOCKCOORD] + ld a, [wYBlockCoord] and a jr z, .aboveCenter jr .centerTileBlock .left - ld a, [W_XBLOCKCOORD] + ld a, [wXBlockCoord] and a jr z, .leftOfCenter jr .centerTileBlock diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm index 641c021f..6b0c0464 100755 --- a/engine/overworld/doors.asm +++ b/engine/overworld/doors.asm @@ -2,7 +2,7 @@ IsPlayerStandingOnDoorTile: ; 1a609 (6:6609) push de ld hl, DoorTileIDPointers - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] ld de, $3 call IsInArray pop de diff --git a/engine/overworld/hidden_items.asm b/engine/overworld/hidden_items.asm index 28528116..f7f81070 100755 --- a/engine/overworld/hidden_items.asm +++ b/engine/overworld/hidden_items.asm @@ -135,7 +135,7 @@ FindHiddenItemOrCoinsIndex: ; 76857 (1d:6857) ld d, a ld a, [wHiddenObjectX] ld e, a - ld a, [W_CURMAP] + ld a, [wCurMap] ld b, a ld c, -1 .loop diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm index cabfc093..1fc20e5c 100755 --- a/engine/overworld/hidden_objects.asm +++ b/engine/overworld/hidden_objects.asm @@ -29,7 +29,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0) ld b, a cp $ff jr z, .noMatch - ld a, [W_CURMAP] + ld a, [wCurMap] cp b jr z, .foundMatchingMap inc de @@ -95,30 +95,30 @@ CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01) cp SPRITE_FACING_RIGHT jr z, .facingRight ; facing down - ld a, [W_YCOORD] + ld a, [wYCoord] inc a jr .upDownCommon .facingUp - ld a, [W_YCOORD] + ld a, [wYCoord] dec a .upDownCommon cp b jr nz, .didNotMatch - ld a, [W_XCOORD] + ld a, [wXCoord] cp c jr nz, .didNotMatch jr .matched .facingLeft - ld a, [W_XCOORD] + ld a, [wXCoord] dec a jr .leftRightCommon .facingRight - ld a, [W_XCOORD] + ld a, [wXCoord] inc a .leftRightCommon cp c jr nz, .didNotMatch - ld a, [W_YCOORD] + ld a, [wYCoord] cp b jr nz, .didNotMatch .matched diff --git a/engine/overworld/is_player_just_outside_map.asm b/engine/overworld/is_player_just_outside_map.asm index 24e434b3..e9ba204a 100644 --- a/engine/overworld/is_player_just_outside_map.asm +++ b/engine/overworld/is_player_just_outside_map.asm @@ -1,13 +1,13 @@ ; returns whether the player is one tile outside the map in Z IsPlayerJustOutsideMap: ; 128d8 (4:68d8) - ld a, [W_YCOORD] + ld a, [wYCoord] ld b, a - ld a, [W_CURMAPHEIGHT] + ld a, [wCurMapHeight] call .compareCoordWithMapDimension ret z - ld a, [W_XCOORD] + ld a, [wXCoord] ld b, a - ld a, [W_CURMAPWIDTH] + ld a, [wCurMapWidth] .compareCoordWithMapDimension add a cp b diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm index 6fbe823d..63eecef9 100644 --- a/engine/overworld/item.asm +++ b/engine/overworld/item.asm @@ -3,7 +3,7 @@ PickUpItem: ld a, [hSpriteIndexOrTextID] ld b, a - ld hl, W_MISSABLEOBJECTLIST + ld hl, wMissableObjectList .missableObjectsListLoop ld a, [hli] cp $ff @@ -17,7 +17,7 @@ PickUpItem: ld a, [hl] ld [$ffdb], a - ld hl, W_MAPSPRITEEXTRADATA + ld hl, wMapSpriteExtraData ld a, [hSpriteIndexOrTextID] dec a add a diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index df4273fd..b04f6332 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -2,7 +2,7 @@ HandleLedges: ; 1a672 (6:6672) ld a, [wd736] bit 6, a ; already jumping down ledge ret nz - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] and a ; OVERWORLD ret nz predef GetTileAndCoordsInFrontOfPlayer diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 33411dfc..bdd3320b 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -30,12 +30,12 @@ InitMapSprites: ; 1785b (5:785b) ; InitOutsideMapSprites. ; Loads tile pattern data for sprites into VRAM. LoadMapSpriteTilePatterns: ; 17871 (5:7871) - ld a,[W_NUMSPRITES] + ld a,[wNumSprites] and a ; are there any sprites? jr nz,.spritesExist ret .spritesExist - ld c,a ; c = [W_NUMSPRITES] + ld c,a ; c = [wNumSprites] ld b,$10 ; number of sprite slots ld hl,wSpriteStateData2 + $0d xor a @@ -251,7 +251,7 @@ ReadSpriteSheetData: ; 17971 (5:7971) ; Loads sprite set for outside maps (cities and routes) and sets VRAM slots. ; sets carry if the map is a city or route, unsets carry if not InitOutsideMapSprites: ; 1797b (5:797b) - ld a,[W_CURMAP] + ld a,[wCurMap] cp a,REDS_HOUSE_1F ; is the map a city or a route (map ID less than $25)? ret nc ; if not, return ld hl,MapSpriteSets @@ -267,12 +267,12 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld a,[wFontLoaded] bit 0,a ; reloading upper half of tile patterns after displaying text? jr nz,.loadSpriteSet ; if so, forcibly reload the sprite set - ld a,[W_SPRITESETID] + ld a,[wSpriteSetID] cp b ; has the sprite set ID changed? jr z,.skipLoadingSpriteSet ; if not, don't load it again .loadSpriteSet ld a,b - ld [W_SPRITESETID],a + ld [wSpriteSetID],a dec a ld b,a sla a @@ -291,7 +291,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld hl,wSpriteStateData2 + $0d ld a,SPRITE_RED ld [hl],a - ld bc,W_SPRITESET + ld bc,wSpriteSet ; Load the sprite set into RAM. ; This loop also fills $C2XD (sprite picture ID) where X is from $0 to $A ; with picture ID's. This is done so that LoadMapSpriteTilePatterns will @@ -317,13 +317,13 @@ InitOutsideMapSprites: ; 1797b (5:797b) ld [hl],a ; $C2XD (sprite picture ID) dec b jr nz,.zeroRemainingSlotsLoop - ld a,[W_NUMSPRITES] + ld a,[wNumSprites] push af ; save number of sprites ld a,11 ; 11 sprites in sprite set - ld [W_NUMSPRITES],a + ld [wNumSprites],a call LoadMapSpriteTilePatterns pop af - ld [W_NUMSPRITES],a ; restore number of sprites + ld [wNumSprites],a ; restore number of sprites ld hl,wSpriteStateData2 + $1e ld b,$0f ; The VRAM tile pattern slots that LoadMapSpriteTilePatterns set are in the @@ -352,7 +352,7 @@ InitOutsideMapSprites: ; 1797b (5:797b) and a ; is the sprite slot used? jr z,.skipGettingPictureIndex ; if the sprite slot is not used ld b,a ; b = picture ID - ld de,W_SPRITESET + ld de,wSpriteSet ; Loop to find the index of the sprite's picture ID within the sprite set. .getPictureIndexLoop inc c @@ -399,10 +399,10 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) ld b,a jr z,.eastWestDivide .northSouthDivide - ld a,[W_YCOORD] + ld a,[wYCoord] jr .compareCoord .eastWestDivide - ld a,[W_XCOORD] + ld a,[wXCoord] .compareCoord cp b jr c,.loadSpriteSetID @@ -415,7 +415,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) ; Route 20 is a special case because the two map sections have a more complex ; shape instead of the map simply being split horizontally or vertically. .route20 - ld hl,W_XCOORD + ld hl,wXCoord ld a,[hl] cp a,$2b ld a,$01 @@ -430,7 +430,7 @@ GetSplitMapSpriteSetID: ; 17a1a (5:7a1a) jr nc,.next ld b,$0d .next - ld a,[W_YCOORD] + ld a,[wYCoord] cp b ld a,$0a ret c diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 2ed49838..c89406d1 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -89,7 +89,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ; bit set by later logic. ld a, [hTilePlayerStandingOn] ld c, a - ld a, [W_GRASSTILE] + ld a, [wGrassTile] cp c ld a, $0 jr nz, .next2 @@ -114,7 +114,7 @@ UpdateNPCSprite: ; 4ed1 (1:4ed1) swap a dec a add a - ld hl, W_MAPSPRITEDATA + ld hl, wMapSpriteData add l ld l, a ld a, [hl] ; read movement byte 2 @@ -453,7 +453,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd) ld a, [H_CURRENTSPRITEOFFSET] add $4 ld l, a - ld a, [W_YCOORD] + ld a, [wYCoord] ld b, a ld a, [hl] ; c2x4 (Y position + 4) sub b ; relative to player position @@ -462,7 +462,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd) dec h ld [hli], a ; c1x4 (screen Y position) inc h - ld a, [W_XCOORD] + ld a, [wXCoord] ld b, a ld a, [hli] ; c2x6 (X position + 4) sub b ; relative to player position @@ -488,7 +488,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) add $4 ld l, a ld b, [hl] ; c2x4: Y pos (+4) - ld a, [W_YCOORD] + ld a, [wYCoord] cp b jr z, .skipYVisibilityTest jr nc, .spriteInvisible ; above screen region @@ -498,7 +498,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) .skipYVisibilityTest inc l ld b, [hl] ; c2x5: X pos (+4) - ld a, [W_XCOORD] + ld a, [wXCoord] cp b jr z, .skipXVisibilityTest jr nc, .spriteInvisible ; left of screen region @@ -542,7 +542,7 @@ CheckSpriteAvailability: ; 50dc (1:50dc) ld a, [H_CURRENTSPRITEOFFSET] add $7 ld l, a - ld a, [W_GRASSTILE] + ld a, [wGrassTile] cp c ld a, $0 jr nz, .notInGrass @@ -590,9 +590,9 @@ CanWalkOntoTile: ; 516e (1:516e) and a ret .notScripted - ld a, [W_TILESETCOLLISIONPTR] + ld a, [wTileSetCollisionPtr] ld l, a - ld a, [W_TILESETCOLLISIONPTR+1] + ld a, [wTileSetCollisionPtr+1] ld h, a .tilePassableLoop ld a, [hli] diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 098be875..719c8835 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -52,7 +52,7 @@ PalletMovementScriptPointerTable: ; 1a442 (6:6442) dw PalletMovementScript_Done PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c) - ld a, [W_XCOORD] + ld a, [wXCoord] sub $a ld [wNumStepsToTake], a jr z, .playerOnLeftTile @@ -79,7 +79,7 @@ PalletMovementScript_OakMoveLeft: ; 1a44c (6:644c) ld a, $3 ld [wNPCMovementScriptFunctionNum], a .done - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 set 1, [hl] ld a, $fc ld [wJoyIgnore], a @@ -267,7 +267,7 @@ RLEList_PewterGymGuy: ; 1a5da (6:65da) db $FF FreezeEnemyTrainerSprite: ; 1a5e7 (6:65e7) - ld a, [W_CURMAP] + ld a, [wCurMap] cp POKEMONTOWER_7 ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them ld hl, RivalIDs diff --git a/engine/overworld/pewter_guys.asm b/engine/overworld/pewter_guys.asm index 4ac60e00..543dac91 100755 --- a/engine/overworld/pewter_guys.asm +++ b/engine/overworld/pewter_guys.asm @@ -17,9 +17,9 @@ PewterGuys: ; 37ca1 (d:7ca1) ld a, [hli] ld h, [hl] ld l, a - ld a, [W_YCOORD] + ld a, [wYCoord] ld b, a - ld a, [W_XCOORD] + ld a, [wXCoord] ld c, a .findMatchingCoordsLoop ld a, [hli] diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 74762b00..de36eeaf 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -5,7 +5,7 @@ EnterMapAnim: ; 70510 (1c:4510) call Delay3 push hl call GBFadeInFromWhite - ld hl, W_FLAGS_D733 + ld hl, wFlags_D733 bit 7, [hl] ; used fly out of battle? res 7, [hl] jr nz, .flyAnimation @@ -350,7 +350,7 @@ GetPlayerTeleportAnimFrameDelay: ; 7077f (1c:477f) IsPlayerStandingOnWarpPadOrHole: ; 70787 (1c:4787) ld b, 0 ld hl, .warpPadAndHoleData - ld a, [W_CURMAPTILESET] + ld a, [wCurMapTileset] ld c, a .loop ld a, [hli] diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm index 7d2ec0dd..66ae20ce 100755 --- a/engine/overworld/trainers.asm +++ b/engine/overworld/trainers.asm @@ -291,7 +291,7 @@ CheckSpriteCanSeePlayer: ; 569af (15:69af) ; tests if the player is in front of the sprite (rather than behind it) CheckPlayerIsInFrontOfSprite: ; 569e3 (15:69e3) - ld a, [W_CURMAP] + ld a, [wCurMap] cp POWER_PLANT jp z, .engage ; bypass this for power plant to get voltorb fake items to work ld a, [wTrainerSpriteOffset] |