diff options
| author | dannye <33dannye@gmail.com> | 2023-11-20 00:33:27 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2023-11-20 20:23:27 -0600 |
| commit | 298e99d3776580585c3f434e5d93137ae431bdd3 (patch) | |
| tree | a808c4ffd0fd0f9bd28972bae5236e0d3345c8e5 /engine/overworld | |
| parent | Add sound bits documentation for wOptions (#110) (diff) | |
| parent | Name 2 unnamed labels I missed in SeafoamIslandsB4F and PokemonMansion3F (#437) (diff) | |
| download | pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.gz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.tar.xz pokeyellow-298e99d3776580585c3f434e5d93137ae431bdd3.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/overworld')
| -rw-r--r-- | engine/overworld/auto_movement.asm | 4 | ||||
| -rw-r--r-- | engine/overworld/ledges.asm | 2 | ||||
| -rw-r--r-- | engine/overworld/player_state.asm | 4 | ||||
| -rw-r--r-- | engine/overworld/push_boulder.asm | 2 | ||||
| -rw-r--r-- | engine/overworld/special_warps.asm | 61 |
5 files changed, 36 insertions, 37 deletions
diff --git a/engine/overworld/auto_movement.asm b/engine/overworld/auto_movement.asm index a68da55f..65888294 100644 --- a/engine/overworld/auto_movement.asm +++ b/engine/overworld/auto_movement.asm @@ -3,7 +3,7 @@ PlayerStepOutFromDoor:: res 1, [hl] call IsPlayerStandingOnDoorTile jr nc, .notStandingOnDoor - ld a, $fc + ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a ld hl, wd736 set 1, [hl] @@ -85,7 +85,7 @@ PalletMovementScript_OakMoveLeft: call PlayMusic ld hl, wFlags_D733 set 1, [hl] - ld a, $fc + ld a, SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a ret diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index efb56628..96441838 100644 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -39,7 +39,7 @@ HandleLedges:: ldh a, [hJoyHeld] and e ret z - ld a, $ff + ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a ld hl, wd736 set 6, [hl] ; jumping down ledge diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 4998360d..1cedcf7c 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -56,12 +56,12 @@ CheckForceBikeOrSurf:: jr nz, .loop ; incorrect x-coord, check next item ld a, [wCurMap] cp SEAFOAM_ISLANDS_B3F - ld a, $2 + ld a, SCRIPT_SEAFOAMISLANDSB3F_MOVE_OBJECT ld [wSeafoamIslandsB3FCurScript], a jr z, .forceSurfing ld a, [wCurMap] cp SEAFOAM_ISLANDS_B4F - ld a, $2 + ld a, SCRIPT_SEAFOAMISLANDSB4F_MOVE_OBJECT ld [wSeafoamIslandsB4FCurScript], a jr z, .forceSurfing ;force bike riding diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm index a8e532d3..96c506c0 100644 --- a/engine/overworld/push_boulder.asm +++ b/engine/overworld/push_boulder.asm @@ -94,7 +94,7 @@ DoBoulderDustAnimation:: call DiscardButtonPresses ld [wJoyIgnore], a call ResetBoulderPushFlags - set 7, [hl] + set 7, [hl] ; [wFlags_0xcd60] ld a, [wBoulderSpriteIndex] ldh [hSpriteIndex], a call GetSpriteMovementByte2Pointer diff --git a/engine/overworld/special_warps.asm b/engine/overworld/special_warps.asm index 61356a03..c538938b 100644 --- a/engine/overworld/special_warps.asm +++ b/engine/overworld/special_warps.asm @@ -1,60 +1,60 @@ -SpecialWarpIn:: +PrepareForSpecialWarp:: call LoadSpecialWarpData predef LoadTilesetHeader ld hl, wd732 bit 2, [hl] ; dungeon warp or fly warp? res 2, [hl] - jr z, .next -; if dungeon warp or fly warp + jr z, .debugNewGameWarp ld a, [wDestinationMap] - jr .next2 + jr .next +.debugNewGameWarp + bit BIT_DEBUG_MODE, [hl] + jr z, .setNewGameMatWarp ; apply to StartNewGameDebug only + call PrepareNewGameDebug +.setNewGameMatWarp + ; This is called by OakSpeech during StartNewGame and + ; loads the first warp event for the specified map index. + ld a, PALLET_TOWN .next - bit 1, [hl] - jr z, .next3 - call DebugStart -.next3 - ld a, 0 -.next2 ld b, a ld a, [wd72d] and a - jr nz, .next4 + jr nz, .next2 ld a, b -.next4 +.next2 ld hl, wd732 - bit 4, [hl] ; dungeon warp? + bit 4, [hl] ; dungeon warp ret nz -; if not dungeon warp ld [wLastMap], a ret -; gets the map ID, tile block map view pointer, tileset, and coordinates LoadSpecialWarpData: ld a, [wd72d] cp TRADE_CENTER jr nz, .notTradeCenter - ld hl, TradeCenterSpec1 + ld hl, TradeCenterPlayerWarp ldh a, [hSerialConnectionStatus] - cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right + cp USING_INTERNAL_CLOCK jr z, .copyWarpData - ld hl, TradeCenterSpec2 + ld hl, TradeCenterFriendWarp jr .copyWarpData .notTradeCenter cp COLOSSEUM jr nz, .notColosseum - ld hl, ColosseumSpec1 + ld hl, ColosseumPlayerWarp ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK jr z, .copyWarpData - ld hl, ColosseumSpec2 + ld hl, ColosseumFriendWarp jr .copyWarpData .notColosseum ld a, [wd732] - bit 1, a - jr nz, .notFirstMap + bit BIT_DEBUG_MODE, a + ; warp to wLastMap (PALLET_TOWN) for StartNewGameDebug + jr nz, .notNewGameWarp bit 2, a - jr nz, .notFirstMap - ld hl, FirstMapSpec + jr nz, .notNewGameWarp + ld hl, NewGameWarp .copyWarpData ld de, wCurMap ld c, $7 @@ -68,18 +68,17 @@ LoadSpecialWarpData: ld [wCurMapTileset], a xor a jr .done -.notFirstMap +.notNewGameWarp ld a, [wLastMap] ; this value is overwritten before it's ever read ld hl, wd732 - bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)? - jr nz, .usedDunegonWarp - bit 6, [hl] ; return to last pokemon center (or player's house)? + bit 4, [hl] ; dungeon warp + jr nz, .usedDungeonWarp + bit 6, [hl] ; blacked out res 6, [hl] jr z, .otherDestination -; return to last pokemon center or player's house ld a, [wLastBlackoutMap] jr .usedFlyWarp -.usedDunegonWarp +.usedDungeonWarp ld hl, wd72d res 4, [hl] ld a, [wDungeonWarpDestinationMap] @@ -142,7 +141,7 @@ LoadSpecialWarpData: .done ld [wYOffsetSinceLastSpecialWarp], a ld [wXOffsetSinceLastSpecialWarp], a - ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps + ld a, -1 ; exclude normal warps ld [wDestinationWarpID], a ret |
