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 /home | |
| 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 'home')
| -rw-r--r-- | home/npc_movement.asm | 4 | ||||
| -rw-r--r-- | home/overworld.asm | 33 | ||||
| -rw-r--r-- | home/predef_text.asm | 10 | ||||
| -rw-r--r-- | home/text.asm | 8 | ||||
| -rw-r--r-- | home/text_script.asm | 2 | ||||
| -rw-r--r-- | home/trainers.asm | 2 |
6 files changed, 33 insertions, 26 deletions
diff --git a/home/npc_movement.asm b/home/npc_movement.asm index 40942bf3..cc40b1af 100644 --- a/home/npc_movement.asm +++ b/home/npc_movement.asm @@ -48,7 +48,9 @@ RunNPCMovementScript:: EndNPCMovementScript:: farjp _EndNPCMovementScript -DebugPressedOrHeldB:: +DebugPressedOrHeldB:: ; dummy except in _DEBUG +; This is used to skip Trainer battles, the +; Safari Game step counter, and some NPC scripts. IF DEF(_DEBUG) ldh a, [hJoyHeld] bit BIT_B_BUTTON, a diff --git a/home/overworld.asm b/home/overworld.asm index 62d0e3b7..201d5d42 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1,6 +1,6 @@ EnterMap:: ; Load a new map. - ld a, $ff + ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a call LoadMapData farcall ClearVariablesOnEnterMap @@ -108,7 +108,7 @@ OverworldLoopLessDelay:: bit 0, a jr nz, .checkForOpponent lda_coord 8, 9 - ld [wTilePlayerStandingOn], a ; unused? + ld [wTilePlayerStandingOn], a ; checked when using Surf for forbidden tile pairs call DisplayTextID ; display either the start menu or the NPC/sign text ld a, [wEnteringCableClub] and a @@ -743,10 +743,10 @@ HandleBlackOut:: call StopMusic ld hl, wd72e res 5, [hl] - ld a, BANK(SpecialWarpIn) ; also BANK(SpecialEnterMap) + ld a, BANK(PrepareForSpecialWarp) ; also BANK(SpecialEnterMap) call BankswitchCommon callfar ResetStatusAndHalveMoneyOnBlackout - call SpecialWarpIn + call PrepareForSpecialWarp call PlayDefaultMusicFadeOutCurrent jp SpecialEnterMap @@ -771,9 +771,9 @@ HandleFlyWarpOrDungeonWarp:: res 5, [hl] ; forced to ride bike call LeaveMapAnim call Func_07c4 - ld a, BANK(SpecialWarpIn) + ld a, BANK(PrepareForSpecialWarp) call BankswitchCommon - call SpecialWarpIn + call PrepareForSpecialWarp jp SpecialEnterMap LeaveMapAnim:: @@ -892,9 +892,9 @@ LoadTileBlockMap:: add hl, bc ld c, MAP_BORDER add hl, bc ; this puts us past the (west) border - ld a, [wMapDataPtr] ; tile map pointer + ld a, [wCurMapDataPtr] ; tile map pointer ld e, a - ld a, [wMapDataPtr + 1] + ld a, [wCurMapDataPtr + 1] ld d, a ; de = tile map pointer ld a, [wCurMapHeight] ld b, a @@ -1732,7 +1732,7 @@ RunMapScript:: call RunNPCMovementScript ld a, [wCurMap] ; current map number call SwitchToMapRomBank ; change to the ROM bank the map's data is in - ld hl, wMapScriptPtr + ld hl, wCurMapScriptPtr ld a, [hli] ld h, [hl] ld l, a @@ -1816,9 +1816,8 @@ asm_0dbd: bit 7, b ret nz call GetMapHeaderPointer -; copy the first 10 bytes (the fixed area) of the map data to D367-D370 - ld de, wCurMapTileset - ld c, $0a + ld de, wCurMapHeader + ld c, wCurMapHeaderEnd - wCurMapHeader .copyFixedHeaderLoop ld a, [hli] ld [de], a @@ -1832,25 +1831,25 @@ asm_0dbd: ld [wWestConnectedMap], a ld [wEastConnectedMap], a ; copy connection data (if any) to WRAM - ld a, [wMapConnections] + ld a, [wCurMapConnections] ld b, a .checkNorth - bit 3, b + bit NORTH_F, b jr z, .checkSouth ld de, wNorthConnectionHeader call CopyMapConnectionHeader .checkSouth - bit 2, b + bit SOUTH_F, b jr z, .checkWest ld de, wSouthConnectionHeader call CopyMapConnectionHeader .checkWest - bit 1, b + bit WEST_F, b jr z, .checkEast ld de, wWestConnectionHeader call CopyMapConnectionHeader .checkEast - bit 0, b + bit EAST_F, b jr z, .getObjectDataPointer ld de, wEastConnectionHeader call CopyMapConnectionHeader diff --git a/home/predef_text.asm b/home/predef_text.asm index b494a2c8..1537ad5b 100644 --- a/home/predef_text.asm +++ b/home/predef_text.asm @@ -7,7 +7,7 @@ PrintPredefTextID:: call DisplayTextID RestoreMapTextPointer:: - ld hl, wMapTextPtr + ld hl, wCurMapTextPtr ldh a, [hSavedMapTextPtr] ld [hli], a ldh a, [hSavedMapTextPtr + 1] @@ -15,14 +15,14 @@ RestoreMapTextPointer:: ret SetMapTextPointer:: - ld a, [wMapTextPtr] + ld a, [wCurMapTextPtr] ldh [hSavedMapTextPtr], a - ld a, [wMapTextPtr + 1] + ld a, [wCurMapTextPtr + 1] ldh [hSavedMapTextPtr + 1], a ld a, l - ld [wMapTextPtr], a + ld [wCurMapTextPtr], a ld a, h - ld [wMapTextPtr + 1], a + ld [wCurMapTextPtr + 1], a ret INCLUDE "data/text_predef_pointers.asm" diff --git a/home/text.asm b/home/text.asm index bd52dc55..25233e05 100644 --- a/home/text.asm +++ b/home/text.asm @@ -111,10 +111,14 @@ NextChar:: inc de jp PlaceNextChar -NullChar:: +NullChar:: ; unused ld b, h ld c, l pop hl + ; A "<NULL>" character in a printed string + ; displays an error message with the current value + ; of hSpriteIndexOrTextID in decimal format. + ; This is a debugging leftover. ld de, TextIDErrorText dec de ret @@ -554,7 +558,7 @@ TextCommandSounds:: db TX_SOUND_GET_KEY_ITEM, SFX_GET_KEY_ITEM db TX_SOUND_DEX_PAGE_ADDED, SFX_DEX_PAGE_ADDED db TX_SOUND_CRY_PIKACHU, STARTER_PIKACHU ; used in OakSpeech - db TX_SOUND_CRY_PIDGEOT, PIDGEOT ; used in SaffronCityText12 + db TX_SOUND_CRY_PIDGEOT, PIDGEOT ; used in SaffronCityPidgeotText db TX_SOUND_CRY_DEWGONG, DEWGONG ; unused TextCommand_DOTS:: diff --git a/home/text_script.asm b/home/text_script.asm index 5e260320..ab0cd804 100644 --- a/home/text_script.asm +++ b/home/text_script.asm @@ -17,7 +17,7 @@ DisplayTextID:: .skipSwitchToMapBank ld a, 30 ; half a second ldh [hFrameCounter], a ; used as joypad poll timer - ld hl, wMapTextPtr + ld hl, wCurMapTextPtr ld a, [hli] ld h, [hl] ld l, a ; hl = map text pointer diff --git a/home/trainers.asm b/home/trainers.asm index 468b63f8..457f47cd 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -135,7 +135,9 @@ ENDC ld a, [wSpriteIndex] cp $ff jr nz, .trainerEngaging +IF DEF(_DEBUG) .trainerNotEngaging +ENDC xor a ld [wSpriteIndex], a ld [wTrainerHeaderFlagBit], a |
