diff options
author | dannye <corrnondacqb@yahoo.com> | 2016-07-16 11:11:50 -0500 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2016-07-16 11:11:50 -0500 |
commit | 707ba908f780d42e1f26af85bef0bf0eb478b877 (patch) | |
tree | 88fba78e2d9c590c4860a2e63eed00a2e29d4005 | |
parent | ce3ec76762d9e2f0c560e2ea7868678418883143 (diff) | |
parent | 28de20b9f6e1db97ec69643a907f78562f90ec74 (diff) |
Merge branch 'master' of https://github.com/pret/pokeyellow
-rw-r--r-- | INSTALL.md | 23 | ||||
-rw-r--r-- | constants.asm | 2 | ||||
-rwxr-xr-x | data/trainer_types.asm | 3 | ||||
-rwxr-xr-x | engine/cable_club.asm | 4 | ||||
-rwxr-xr-x | engine/hall_of_fame.asm | 2 | ||||
-rw-r--r-- | home.asm | 69 | ||||
-rw-r--r-- | home/audio.asm | 16 | ||||
-rw-r--r-- | home/init.asm | 2 | ||||
-rw-r--r-- | home/overworld.asm | 82 | ||||
-rw-r--r-- | home/pic.asm | 4 | ||||
-rw-r--r-- | home/serial.asm | 40 | ||||
-rw-r--r-- | home/vblank.asm | 2 | ||||
-rw-r--r-- | text/maps/celadon_dept_store_3f.asm | 2 | ||||
-rw-r--r-- | text/maps/lance.asm | 2 | ||||
-rw-r--r-- | text/maps/lorelei.asm | 1 | ||||
-rw-r--r-- | text/maps/reds_house_1f.asm | 2 | ||||
-rw-r--r-- | text/maps/route_22.asm | 2 | ||||
-rw-r--r-- | text/maps/silph_co_11f.asm | 2 | ||||
-rw-r--r-- | text/maps/underground_path_route_7_entrance_unused.asm | 3 | ||||
-rw-r--r-- | text/maps/vermilion_dock.asm | 3 | ||||
-rwxr-xr-x | wram.asm | 6 |
21 files changed, 122 insertions, 150 deletions
@@ -1,17 +1,15 @@ # Linux - sudo apt-get install make gcc bison git python python-pip - sudo pip install pypng + sudo apt-get install make gcc bison git python git clone https://github.com/bentley/rgbds - cd rgbds - sudo make install - cd .. + sudo make -C rgbds install git clone --recursive https://github.com/pret/pokeyellow cd pokeyellow To build **pokeyellow.gbc**: + make @@ -20,18 +18,13 @@ To build **pokeyellow.gbc**: In **Terminal**, run: xcode-select --install - sudo easy_install pypng git clone https://github.com/bentley/rgbds - cd rgbds - sudo make install - cd .. + sudo make -C rgbds install git clone --recursive https://github.com/pret/pokeyellow cd pokeyellow -Copy the ROM "Pokemon Yellow (U) [C][!].gbc" to the same directory as the disassembly under the name "baserom.gbc". - Then run (in the shell): make @@ -39,24 +32,18 @@ Then run (in the shell): # Windows -To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings. +To build on Windows, use [**Cygwin**](http://cygwin.com/install.html). Use the default settings in the installer. In the installer, select the following packages: `make` `git` `python` `gettext` Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/). Extract the archive and put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`. - In the **Cygwin terminal**: - lynx -source bootstrap.pypa.io/get-pip.py | python - pip install pypng - git clone --recursive https://github.com/pret/pokeyellow cd pokeyellow -Copy the ROM "Pokemon Yellow (U) [C][!].gbc" to the same directory as the disassembly under the name "baserom.gbc". - Then run (in the Cygwin terminal): make diff --git a/constants.asm b/constants.asm index 554f89ca..cc636558 100644 --- a/constants.asm +++ b/constants.asm @@ -29,5 +29,5 @@ INCLUDE "constants/tilesets.asm" INCLUDE "constants/starter_mons.asm" INCLUDE "constants/event_constants.asm" INCLUDE "constants/event_macros.asm" -INCLUDE "constants/pikachu_emotion_constants.asm" INCLUDE "constants/text_constants.asm" +INCLUDE "constants/pikachu_emotion_constants.asm" diff --git a/data/trainer_types.asm b/data/trainer_types.asm index ef02c8a8..cc7ca605 100755 --- a/data/trainer_types.asm +++ b/data/trainer_types.asm @@ -14,5 +14,4 @@ EvilTrainerList:: db OPP_SCIENTIST db OPP_GIOVANNI db OPP_ROCKET - - db $ff + db $FF diff --git a/engine/cable_club.asm b/engine/cable_club.asm index d7b5bdc8..88f7b2f7 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -907,9 +907,9 @@ CableClub_Run: call CableClub_DoBattleOrTrade ld hl, Club_GFX ld a, h - ld [wTilesetGFXPtr + 1], a + ld [wTilesetGfxPtr + 1], a ld a, l - ld [wTilesetGFXPtr], a + ld [wTilesetGfxPtr], a ld a, Bank(Club_GFX) ld [wTilesetBank], a ld hl, Club_Coll diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 61ed65c8..f0749a06 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -58,7 +58,7 @@ AnimateHallOfFame: ld c, 80 call DelayFrames coord hl, 2, 13 - lb bc, $3, $e + lb bc, 3, 14 call TextBoxBorder coord hl, 4, 15 ld de, HallOfFameText @@ -154,7 +154,7 @@ Start:: xor a jr .ok .gbc - ld a, $1 + ld a, 1 .ok ld [hGBC], a jp Init @@ -300,7 +300,7 @@ DrawHPBar:: ; OUTPUT: ; [wcf91] = pokemon ID ; wLoadedMon = base address of pokemon data -; W_MONHDEXNUM = base address of base stats +; wMonHeader = base address of base stats LoadMonData:: jpab LoadMonData_ @@ -648,11 +648,11 @@ GetMonHeader:: predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number ld a, [wd11e] dec a - ld bc, 28 + ld bc, MonBaseStatsEnd - MonBaseStats ld hl, BaseStats call AddNTimes ld de, wMonHeader - ld bc, 28 + ld bc, MonBaseStatsEnd - MonBaseStats call CopyData jr .done .specialID @@ -1064,21 +1064,20 @@ ResetPlayerSpriteData:: ResetPlayerSpriteData_ClearSpriteData:: ld bc, $10 xor a - call FillMemory ; XXX why replaced with call + ret? + call FillMemory ret - ;jp FillMemory FadeOutAudio:: ld a, [wAudioFadeOutControl] - and a - jr nz, .asm_27d3 + and a ; currently fading out audio? + jr nz, .fadingOut ld a, [wd72c] bit 1, a ret nz ld a, $77 ld [rNR50], a ret -.asm_27d3 +.fadingOut ld a, [wAudioFadeOutCounter] and a jr z, .counterReachedZero @@ -1089,8 +1088,8 @@ FadeOutAudio:: ld a, [wAudioFadeOutCounterReloadValue] ld [wAudioFadeOutCounter], a ld a, [rNR50] - and a - jr z, .asm_27fa + and a ; has the volume reached 0? + jr z, .fadeOutComplete ld b, a and $f dec a @@ -1103,7 +1102,7 @@ FadeOutAudio:: or c ld [rNR50], a ret -.asm_27fa +.fadeOutComplete ld a, [wAudioFadeOutControl] ld b, a xor a @@ -1143,7 +1142,7 @@ DisplayTextID:: ld [wSpriteIndex], a and a jp z, DisplayStartMenu - cp TEXT_PIKACHU_ANIM ; new yellow asm + cp TEXT_PIKACHU_ANIM jp z, DisplayPikachuEmotion cp TEXT_SAFARI_GAME_OVER jp z, DisplaySafariGameOverText @@ -1204,7 +1203,7 @@ DisplayTextID:: callba VendingMachineMenu ; jump banks to vending machine routine jr AfterDisplayingTextID .notVendingMachine - cp $f7 ; slot machine + cp $f7 ; prize menu jp z, FuncTX_GameCornerPrizeMenu cp $f6 ; cable connection NPC in Pokemon Center jr nz, .notSpecialCase @@ -1269,7 +1268,7 @@ DisplayPokemartDialogue:: inc hl call LoadItemList ld a, PRICEDITEMLISTMENU - ld [wListMenuID], a ; selects between subtypes of menus + ld [wListMenuID], a homecall DisplayPokemartDialogue_ jp AfterDisplayingTextID @@ -1393,9 +1392,9 @@ AddAmountSoldToMoney:: ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID ; redraw money text box - ld a, $b2 ; SFX_PURCHASE - call PlaySoundWaitForCurrent ; play sound - jp WaitForSoundToFinish ; wait until sound is done playing + ld a, SFX_PURCHASE + call PlaySoundWaitForCurrent + jp WaitForSoundToFinish ; function to remove an item (in varying quantities) from the player's bag or PC box ; INPUT: @@ -1432,7 +1431,7 @@ DisplayListMenuID:: ld a, $01 ; hardcoded bank jr .bankswitch .specialBattleType ; Old Man battle - ld a, $f ; BANK(DisplayBattleMenu) + ld a, BANK(DisplayBattleMenu) .bankswitch call BankswitchHome ld hl, wd730 @@ -1793,7 +1792,7 @@ PrintListMenuEntries:: ld a, [wListMenuID] and a jr z, .pokemonPCMenu - cp $01 + cp MOVESLISTMENU jr z, .movesMenu .itemMenu call GetItemName @@ -1946,7 +1945,7 @@ GetMonName:: push hl ld a, [H_LOADEDROMBANK] push af - ld a, BANK(MonsterNames) ; 3a + ld a, BANK(MonsterNames) ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a ld a, [wd11e] @@ -2206,6 +2205,7 @@ IsKeyItem:: ; function to draw various text boxes ; INPUT: ; [wTextBoxID] = text box ID +; b, c = y, x cursor position (TWO_OPTION_MENU only) DisplayTextBoxID:: homecall_sf DisplayTextBoxID_ ret @@ -3209,12 +3209,13 @@ YesNoChoicePokeCenter:: lb bc, 8, 12 jr DisplayYesNoChoice -Func_361d:: +WideYesNoChoice:: ; unused call SaveScreenTilesToBuffer1 ld a, WIDE_YES_NO_MENU ld [wTwoOptionMenuID], a coord hl, 12, 7 lb bc, 8, 13 + DisplayYesNoChoice:: ld a, TWO_OPTION_MENU ld [wTextBoxID], a @@ -3352,7 +3353,7 @@ SaveScreenTilesToBuffer2:: LoadScreenTilesFromBuffer2:: call LoadScreenTilesFromBuffer2DisableBGTransfer - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a ret @@ -3378,7 +3379,7 @@ LoadScreenTilesFromBuffer1:: coord de, 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyData - ld a, $1 + ld a, 1 ld [H_AUTOBGTRANSFERENABLED], a ret @@ -3515,9 +3516,9 @@ GetItemPrice:: ld a, [wListMenuID] cp MOVESLISTMENU ld a, BANK(ItemPrices) - jr nz, .asm_37e0 + jr nz, .ok ld a, $f ; hardcoded Bank -.asm_37e0 +.ok call BankswitchCommon ld hl, wItemPrices ld a, [hli] @@ -3527,10 +3528,10 @@ GetItemPrice:: cp HM_01 jr nc, .getTMPrice ld bc, $3 -.asm_37f3 +.loop add hl, bc dec a - jr nz, .asm_37f3 + jr nz, .loop dec hl ld a, [hld] ld [hItemPrice + 2], a @@ -3538,10 +3539,10 @@ GetItemPrice:: ld [hItemPrice + 1], a ld a, [hl] ld [hItemPrice], a - jr .asm_380b + jr .done .getTMPrice callbs GetMachinePrice -.asm_380b +.done ld de, hItemPrice pop af call BankswitchCommon @@ -3656,7 +3657,7 @@ ManualTextScroll:: jr z, .inLinkBattle call WaitForTextScrollButtonPress call WaitForSoundToFinish - ld a, $90 ; SFX_PRESS_AB + ld a, SFX_PRESS_AB jp PlaySound .inLinkBattle ld c, 65 @@ -4076,7 +4077,7 @@ HandleMenuInputPokemonSelection:: ld a, [wPartyMenuAnimMonEnabled] and a ; is it a pokemon selection menu? jr z, .getJoypadState - callba AnimatePartyMon ; shake mini sprite of selected pokemon (1c:578c) + callba AnimatePartyMon ; shake mini sprite of selected pokemon .getJoypadState pop hl call JoypadLowSensitivity @@ -4156,8 +4157,8 @@ HandleMenuInputPokemonSelection:: bit 5, [hl] pop hl jr nz, .skipPlayingSound - ld a, $90 ; SFX_PRESS_AB - call PlaySound ; play sound + ld a, SFX_PRESS_AB + call PlaySound .skipPlayingSound pop af ld [H_DOWNARROWBLINKCNT2], a diff --git a/home/audio.asm b/home/audio.asm index e360aab2..3cd2ffd0 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -17,6 +17,7 @@ PlayDefaultMusicFadeOutCurrent:: ld [wLastMusicSoundID], a ld c, 8 ld d, c + PlayDefaultMusicCommon:: ld a, [wWalkBikeSurfState] and a @@ -35,7 +36,7 @@ PlayDefaultMusicCommon:: ld b, a ld a, d and a ; should current music be faded out first? - ld a, $1f ; BANK(Music_BikeRiding) + ld a, BANK(Music_BikeRiding) jr nz, .next2 ; Only change the audio ROM bank if the current music isn't going to be faded @@ -87,7 +88,7 @@ CheckForNoBikingMusicMap:: ret UpdateMusic6Times:: - ld c, $6 + ld c, 6 UpdateMusicCTimes:: .loop push bc @@ -165,16 +166,17 @@ PlaySound:: ld [wChannelSoundIDs + CH7], a .next ld a, [wAudioFadeOutControl] - and a + and a ; has a fade-out length been specified? jr z, .noFadeOut ld a, [wNewSoundID] - and a - jr z, .done + and a ; is the new sound ID 0? + jr z, .done ; if so, do nothing xor a ld [wNewSoundID], a ld a, [wLastMusicSoundID] - cp $ff - jr nz, .fadeOut + cp $ff ; has the music been stopped? + jr nz, .fadeOut ; if not, fade out the current music +; If it has been stopped, start playing the new music immediately. xor a ld [wAudioFadeOutControl], a .noFadeOut diff --git a/home/init.asm b/home/init.asm index cd073279..da354aa6 100644 --- a/home/init.asm +++ b/home/init.asm @@ -3,6 +3,8 @@ SoftReset:: call GBPalWhiteOut ld c, 32 call DelayFrames + ; fallthrough + Init:: ; Program init. diff --git a/home/overworld.asm b/home/overworld.asm index 9989891b..382f90f9 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -70,7 +70,6 @@ OverworldLoopLessDelay:: jr z, .notSimulating ld a, [hJoyHeld] jr .checkIfStartIsPressed - .notSimulating ld a, [hJoyPressed] .checkIfStartIsPressed @@ -80,7 +79,6 @@ OverworldLoopLessDelay:: xor a ld [hSpriteIndexOrTextID], a ; start menu text ID jp .displayDialogue - .startButtonNotPressed bit 0, a ; A button jp z, .checkIfDownButtonIsPressed @@ -118,15 +116,6 @@ OverworldLoopLessDelay:: xor a ld [wLinkTimeoutCounter], a jp EnterMap - -; predef LoadSAV -; ld a, [wCurMap] -; ld [wDestinationMap], a -; call SpecialWarpIn -; ld a, [wCurMap] -; call SwitchToMapRomBank ; switch to the ROM bank of the current map -; ld hl, wCurMapTileset -; set 7, [hl] .checkForOpponent ld a, [wCurOpponent] and a @@ -139,7 +128,7 @@ OverworldLoopLessDelay:: res 2, [hl] xor a ld [wd435], a - ld a, $1 + ld a, 1 ld [wCheckFor180DegreeTurn], a ld a, [wPlayerMovingDirection] ; the direction that was pressed last time and a @@ -179,9 +168,10 @@ OverworldLoopLessDelay:: .checkIfRightButtonIsPressed bit 4, a ; right button jr z, .noDirectionButtonsPressed - ld a, $1 - ld [wSpriteStateData1 + 5], a - ld a, $1 + ld a, 1 + ld [wSpriteStateData1 + 5], a ; delta X + ld a, 1 + .handleDirectionButtonPress ld [wPlayerDirection], a ; new direction ld a, [wd730] @@ -234,6 +224,7 @@ OverworldLoopLessDelay:: .surfing call CollisionCheckOnWater jp c, OverworldLoop + .noCollision ld a, $08 ld [wWalkCounter], a @@ -242,7 +233,8 @@ OverworldLoopLessDelay:: .moveAhead call IsSpinning - call UpdateSprites ; move sprites + call UpdateSprites + .moveAhead2 ld hl, wFlags_0xcd60 res 2, [hl] @@ -343,6 +335,7 @@ NewBattle:: and a ret +; function to make bikes twice as fast as walking DoBikeSpeedup:: ld a, [wWalkBikeSurfState] dec a ; riding a bike? @@ -354,7 +347,7 @@ DoBikeSpeedup:: and a ret nz ld a, [wCurMap] - cp ROUTE_17 ; cycling road + cp ROUTE_17 ; Cycling Road jr nz, .goFaster ld a, [hJoyHeld] and D_UP | D_LEFT | D_RIGHT @@ -444,7 +437,6 @@ CheckWarpsCollision:: ld a, [hl] ld [hWarpDestinationMap], a jr WarpFound2 - .retry1 inc hl .retry2 @@ -502,7 +494,6 @@ WarpFound2:: ld hl, wd732 set 3, [hl] jr .skipMapChangeSound - .notWarpPad call PlayMapChangeSound .skipMapChangeSound @@ -653,14 +644,13 @@ CheckMapConnections:: ld [wCurrentTileBlockMapViewPointer], a ; pointer to upper left corner of current tile block map section ld a, h ld [wCurrentTileBlockMapViewPointer + 1], a -.loadNewMap -; load the connected map that was entered +.loadNewMap ; load the connected map that was entered ld hl, wPikachuOverworldStateFlags set 4, [hl] ld a, $2 ld [wPikachuSpawnState], a call LoadMapHeader - call PlayDefaultMusicFadeOutCurrent ; music + call PlayDefaultMusicFadeOutCurrent ld b, SET_PAL_OVERWORLD call RunPaletteCommand ; Since the sprite set shouldn't change, this will just update VRAM slots at @@ -680,13 +670,12 @@ PlayMapChangeSound:: cp CEMETERY jr z, .didNotGoThroughDoor aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on - cp UNDERGROUND ; door tile in tileset 0 + cp $0b ; door tile in tileset 0 jr nz, .didNotGoThroughDoor - ld a, $ad ; SFX_GO_INSIDE + ld a, SFX_GO_INSIDE jr .playSound - .didNotGoThroughDoor - ld a, $b5 ; SFX_GO_OUTSIDE + ld a, SFX_GO_OUTSIDE .playSound call PlaySound ld a, [wMapPalOffset] @@ -732,7 +721,6 @@ ExtraWarpCheck:: .useFunction1 ld hl, IsPlayerFacingEdgeOfMap jr .doBankswitch - .useFunction2 ld hl, IsWarpTileInFrontOfPlayer .doBankswitch @@ -869,9 +857,9 @@ INCLUDE "data/bike_riding_tilesets.asm" ; load the tile pattern data of the current tileset into VRAM LoadTilesetTilePatternData:: - ld a, [wTilesetGFXPtr] + ld a, [wTilesetGfxPtr] ld l, a - ld a, [wTilesetGFXPtr + 1] + ld a, [wTilesetGfxPtr + 1] ld h, a ld de, vTileset ld bc, $600 @@ -1078,7 +1066,7 @@ IsSpriteOrSignInFrontOfPlayer:: .extendRangeOverCounter ; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c - ld hl, wTileSetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) + ld hl, wTilesetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) ld b, 3 ld d, $20 ; talking range in pixels (long range) .counterTilesLoop @@ -1267,14 +1255,13 @@ CollisionCheckOnLand:: jr nc, .noCollision .collision ld a, [wChannelSoundIDs + CH4] - cp $b4 ; SFX_COLLISION ; check if collision sound is already playing + cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry - ld a, $b4 ; SFX_COLLISION + ld a, SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf ret - .noCollision and a ret @@ -1297,8 +1284,7 @@ CheckForJumpingAndTilePairCollisions:: predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player push de push bc - callba HandleLedges - ; check if the player is trying to jump a ledge + callba HandleLedges ; check if the player is trying to jump a ledge pop bc pop de pop hl @@ -1327,7 +1313,6 @@ CheckForTilePairCollisions:: .retry inc hl jr .tilePairCollisionLoop - .tilesetMatches ld a, [wTilePlayerStandingOn] ; tile the player is on ld b, a @@ -1339,14 +1324,12 @@ CheckForTilePairCollisions:: cp b jr z, .currentTileMatchesSecondInPair jr .retry - .currentTileMatchesFirstInPair inc hl ld a, [hl] cp c jr z, .foundMatch jr .tilePairCollisionLoop - .currentTileMatchesSecondInPair dec hl ld a, [hli] @@ -1356,7 +1339,6 @@ CheckForTilePairCollisions:: .foundMatch scf ret - .noMatch and a ret @@ -1584,9 +1566,9 @@ ScheduleWestColumnRedraw:: ; Input: c = tile block ID, hl = destination address DrawTileBlock:: push hl - ld a, [wTileSetBlocksPtr] ; pointer to tiles + ld a, [wTilesetBlocksPtr] ; pointer to tiles ld l, a - ld a, [wTileSetBlocksPtr + 1] + ld a, [wTilesetBlocksPtr + 1] ld h, a ld a, c swap a @@ -1705,13 +1687,7 @@ GetSimulatedInput:: ; function to check the tile ahead to determine if the character should get on land or keep surfing ; sets carry if there is a collision and clears carry otherwise -; It seems that this function has a bug in it, but due to luck, it doesn't -; show up. After detecting a sprite collision, it jumps to the code that -; checks if the next tile is passable instead of just directly jumping to the -; "collision detected" code. However, it doesn't store the next tile in c, -; so the old value of c is used. 2429 is always called before this function, -; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it -; is considered impassable and it is detected as a collision. +; This function had a bug in Red/Blue, but it was fixed in Yellow. CollisionCheckOnWater:: ld a, [wd730] bit 7, a @@ -1720,7 +1696,7 @@ CollisionCheckOnWater:: ld d, a ld a, [wSpriteStateData1 + 12] ; the player sprite's collision data (bit field) (set in the sprite movement code) and d ; check if a sprite is in the direction the player is trying to go - jr nz, .collision ; bug? + jr nz, .collision ld hl, TilePairCollisionsWater call CheckForJumpingAndTilePairCollisions jr c, .collision @@ -1733,9 +1709,9 @@ CollisionCheckOnWater:: jr nc, .stopSurfing .collision ld a, [wChannelSoundIDs + CH4] - cp $b4 ; SFX_COLLISION + cp SFX_COLLISION ; check if collision sound is already playing jr z, .setCarry - ld a, $b4 ; SFX_COLLISION + ld a, SFX_COLLISION call PlaySound ; play collision sound (if it's not already playing) .setCarry scf @@ -1815,7 +1791,7 @@ LoadSurfingPlayerSpriteGraphics2:: jr LoadPlayerSpriteGraphicsCommon LoadSurfingPlayerSpriteGraphics:: - ld b, BANK(RedSprite) ; not sure, but probably same bank (5) + ld b, BANK(SeelSprite) ld de, SeelSprite jr LoadPlayerSpriteGraphicsCommon @@ -2150,7 +2126,7 @@ IgnoreInputForHalfSecond: ld [wIgnoreInputCounter], a ld hl, wd730 ld a, [hl] - or %00100110 ; $26 + or %00100110 ld [hl], a ; set ignore input bit ret diff --git a/home/pic.asm b/home/pic.asm index 61a8001c..353d0f58 100644 --- a/home/pic.asm +++ b/home/pic.asm @@ -528,9 +528,9 @@ ReverseNybble:: ld de, NybbleReverseTable add e ld e, a - jr nc, .asm_2735 + jr nc, .noCarry inc d -.asm_2735 +.noCarry ld a, [de] ret diff --git a/home/serial.asm b/home/serial.asm index 6f3c72ff..5fe7fb81 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -94,79 +94,79 @@ Serial_ExchangeByte:: ld [hSerialReceivedNewData], a ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK - jr nz, .asm_2003 + jr nz, .loop ld a, START_TRANSFER_INTERNAL_CLOCK ld [rSC], a -.asm_2003 +.loop ld a, [hSerialReceivedNewData] and a - jr nz, .asm_204d + jr nz, .ok ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK - jr nz, .asm_2028 + jr nz, .doNotIncrementUnknownCounter call IsUnknownCounterZero - jr z, .asm_2028 + jr z, .doNotIncrementUnknownCounter call WaitLoop_15Iterations push hl ld hl, wUnknownSerialCounter + 1 inc [hl] - jr nz, .asm_201f + jr nz, .noCarry dec hl inc [hl] -.asm_201f +.noCarry pop hl call IsUnknownCounterZero - jr nz, .asm_2003 + jr nz, .loop jp SetUnknownCounterToFFFF -.asm_2028 +.doNotIncrementUnknownCounter ld a, [rIE] and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) cp (1 << SERIAL) - jr nz, .asm_2003 + jr nz, .loop ld a, [wUnknownSerialCounter2] dec a ld [wUnknownSerialCounter2], a - jr nz, .asm_2003 + jr nz, .loop ld a, [wUnknownSerialCounter2 + 1] dec a ld [wUnknownSerialCounter2 + 1], a - jr nz, .asm_2003 + jr nz, .loop ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK - jr z, .asm_204d + jr z, .ok ld a, 255 .waitLoop dec a jr nz, .waitLoop -.asm_204d +.ok xor a ld [hSerialReceivedNewData], a ld a, [rIE] and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) sub (1 << SERIAL) - jr nz, .asm_2060 + jr nz, .skipReloadingUnknownCounter2 ld [wUnknownSerialCounter2], a ld a, $50 ld [wUnknownSerialCounter2 + 1], a -.asm_2060 +.skipReloadingUnknownCounter2 ld a, [hSerialReceiveData] cp SERIAL_NO_DATA_BYTE ret nz call IsUnknownCounterZero - jr z, .asm_207b + jr z, .done push hl ld hl, wUnknownSerialCounter + 1 ld a, [hl] dec a ld [hld], a inc a - jr nz, .asm_2075 + jr nz, .noBorrow dec [hl] -.asm_2075 +.noBorrow pop hl call IsUnknownCounterZero jr z, SetUnknownCounterToFFFF -.asm_207b +.done ld a, [rIE] and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) cp (1 << SERIAL) diff --git a/home/vblank.asm b/home/vblank.asm index 9cc8d42f..764e5277 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -55,8 +55,8 @@ VBlank:: jr z, .skipDec dec a ld [H_FRAMECOUNTER], a -.skipDec +.skipDec call FadeOutAudio callbs Music_DoLowHealthAlarm diff --git a/text/maps/celadon_dept_store_3f.asm b/text/maps/celadon_dept_store_3f.asm index 4006a3bb..7de4a826 100644 --- a/text/maps/celadon_dept_store_3f.asm +++ b/text/maps/celadon_dept_store_3f.asm @@ -80,7 +80,7 @@ _TM18PreReceiveText:: prompt _ReceivedTM18Text:: - text $52, " received" + text "<PLAYER> received" line "@" TX_RAM wcf4b text "!@@" diff --git a/text/maps/lance.asm b/text/maps/lance.asm index 9c7bd677..22cc0dcd 100644 --- a/text/maps/lance.asm +++ b/text/maps/lance.asm @@ -1,6 +1,6 @@ _LanceBeforeBattleText:: text "Ah! I heard about" - line "you, ", $52, "!" + line "you, <PLAYER>!" para "I lead the ELITE" line "FOUR! You can" diff --git a/text/maps/lorelei.asm b/text/maps/lorelei.asm index 666aa47f..fdbb55b4 100644 --- a/text/maps/lorelei.asm +++ b/text/maps/lorelei.asm @@ -30,6 +30,7 @@ _LoreleiAfterBattleText:: text "You're better" line "than I thought!" cont "Go on ahead!" + para "You only got a" line "taste of #MON" cont "LEAGUE power!" diff --git a/text/maps/reds_house_1f.asm b/text/maps/reds_house_1f.asm index e93450da..633075bb 100644 --- a/text/maps/reds_house_1f.asm +++ b/text/maps/reds_house_1f.asm @@ -10,7 +10,7 @@ _MomWakeUpText:: done _MomHealText1:: - text "MOM: ",$52,", if" + text "MOM: <PLAYER>, if" line "you drive your" cont "#MON too hard," cont "they'll dislike" diff --git a/text/maps/route_22.asm b/text/maps/route_22.asm index 52d1a4c7..342d5015 100644 --- a/text/maps/route_22.asm +++ b/text/maps/route_22.asm @@ -78,7 +78,7 @@ _Route22RivalBeforeBattleText2:: cont "That's cool!" para "Then I'll whip" - line "you, ", $52, ", as" + line "you, <PLAYER>, as" cont "a warmup for" cont "#MON LEAGUE!" diff --git a/text/maps/silph_co_11f.asm b/text/maps/silph_co_11f.asm index 6be83c5d..2fb84f17 100644 --- a/text/maps/silph_co_11f.asm +++ b/text/maps/silph_co_11f.asm @@ -58,7 +58,7 @@ _SilphCo11Text2:: done _SilphCo11Text3:: - text "Ah, ", $52, "!" + text "Ah, <PLAYER>!" line "So we meet again!" para "The PRESIDENT and" diff --git a/text/maps/underground_path_route_7_entrance_unused.asm b/text/maps/underground_path_route_7_entrance_unused.asm index 02c95a5c..4e0dc3ca 100644 --- a/text/maps/underground_path_route_7_entrance_unused.asm +++ b/text/maps/underground_path_route_7_entrance_unused.asm @@ -17,14 +17,17 @@ _UGPathRoute7EntranceUnusedText_5d778:: _UGPathRoute7EntranceUnusedText_5d77d:: text "You're here to" line "shop in CELADON?" + para "Just step outside" line "and head west!" done + _UGPathRoute7EntranceUnusedText_5d782:: text "The UNDERGROUND" line "PATH goes beneath" cont "SAFFRON and leads" cont "to LAVENDER." + para "If you're heading" line "to CERULEAN, go" cont "to the building" diff --git a/text/maps/vermilion_dock.asm b/text/maps/vermilion_dock.asm index 034de399..5d998e82 100644 --- a/text/maps/vermilion_dock.asm +++ b/text/maps/vermilion_dock.asm @@ -1,2 +1,3 @@ _VermilionDockText1:: - db $0, $57 + text "" + done @@ -2981,18 +2981,18 @@ wPlayerDirection:: ; d529 wTilesetBank:: ; d52a ds 1 -wTileSetBlocksPtr:: ; d52b +wTilesetBlocksPtr:: ; d52b ; maps blocks (4x4 tiles) to tiles ds 2 -wTilesetGFXPtr:: ; d52d +wTilesetGfxPtr:: ; d52d ds 2 wTilesetCollisionPtr:: ; d52f ; list of all walkable tiles ds 2 -wTileSetTalkingOverTiles:: ; d531 +wTilesetTalkingOverTiles:: ; d531 ds 3 wGrassTile:: ; d534 |