diff options
| author | Sylvie <35663410+Rangi42@users.noreply.github.com> | 2024-07-16 13:02:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 13:02:54 -0400 |
| commit | 8fafca714c07500d1d87bba224f12cf9cc2c8789 (patch) | |
| tree | 273ca88fcfcd80df9c318c9cb8d17a1f7aa240cb /engine/events | |
| parent | Build with RGBDS 0.8.0, though it is not yet required (diff) | |
| download | pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.gz pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.xz pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.zip | |
Identify various flag labels and bit constants (#454)
Diffstat (limited to 'engine/events')
| -rw-r--r-- | engine/events/black_out.asm | 12 | ||||
| -rw-r--r-- | engine/events/cinnabar_lab.asm | 8 | ||||
| -rw-r--r-- | engine/events/diploma.asm | 8 | ||||
| -rw-r--r-- | engine/events/display_pokedex.asm | 8 | ||||
| -rw-r--r-- | engine/events/hidden_objects/bills_house_pc.asm | 8 | ||||
| -rw-r--r-- | engine/events/hidden_objects/school_blackboard.asm | 24 | ||||
| -rw-r--r-- | engine/events/hidden_objects/town_map.asm | 8 | ||||
| -rw-r--r-- | engine/events/in_game_trades.asm | 6 | ||||
| -rw-r--r-- | engine/events/poison.asm | 9 | ||||
| -rw-r--r-- | engine/events/pokecenter.asm | 8 | ||||
| -rw-r--r-- | engine/events/prize_menu.asm | 10 | ||||
| -rw-r--r-- | engine/events/vending_machine.asm | 8 |
12 files changed, 59 insertions, 58 deletions
diff --git a/engine/events/black_out.asm b/engine/events/black_out.asm index 16d2081f..5b0459e2 100644 --- a/engine/events/black_out.asm +++ b/engine/events/black_out.asm @@ -8,7 +8,7 @@ ResetStatusAndHalveMoneyOnBlackout:: ld [wNPCMovementScriptFunctionNum], a ldh [hJoyHeld], a ld [wNPCMovementScriptPointerTableNum], a - ld [wFlags_0xcd60], a + ld [wMiscFlags], a ldh [hMoney], a ldh [hMoney + 1], a @@ -37,10 +37,10 @@ ResetStatusAndHalveMoneyOnBlackout:: ld [wPlayerMoney + 2], a .lostmoney - ld hl, wd732 - set 2, [hl] - res 3, [hl] - set 6, [hl] - ld a, %11111111 + ld hl, wStatusFlags6 + set BIT_FLY_OR_DUNGEON_WARP, [hl] + res BIT_FLY_WARP, [hl] + set BIT_ESCAPE_WARP, [hl] + ld a, A_BUTTON | B_BUTTON | SELECT | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ld [wJoyIgnore], a predef_jump HealParty diff --git a/engine/events/cinnabar_lab.asm b/engine/events/cinnabar_lab.asm index 545baf13..eb82a5b1 100644 --- a/engine/events/cinnabar_lab.asm +++ b/engine/events/cinnabar_lab.asm @@ -1,6 +1,6 @@ GiveFossilToCinnabarLab:: - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] xor a ld [wCurrentMenuItem], a ld a, A_BUTTON | B_BUTTON @@ -24,8 +24,8 @@ GiveFossilToCinnabarLab:: call TextBoxBorder call UpdateSprites call PrintFossilsInBag - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call HandleMenuInput bit BIT_B_BUTTON, a jr nz, .cancelledGivingFossil diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index e08b1f24..900e3782 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -6,8 +6,8 @@ DisplayDiploma:: call ClearScreen xor a ld [wUpdateSpritesEnabled], a - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] call DisableLCD ld hl, CircleTile ld de, vChars2 tile CIRCLE_TILE_ID @@ -65,8 +65,8 @@ DisplayDiploma:: ld a, $90 ldh [rOBP0], a call WaitForTextScrollButtonPress - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call GBPalWhiteOutWithDelay3 call RestoreScreenTilesAndReloadTilePatterns call Delay3 diff --git a/engine/events/display_pokedex.asm b/engine/events/display_pokedex.asm index d657ea85..68d48bb3 100644 --- a/engine/events/display_pokedex.asm +++ b/engine/events/display_pokedex.asm @@ -1,9 +1,9 @@ _DisplayPokedex:: - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] predef ShowPokedexData - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call ReloadMapData ld c, 10 call DelayFrames diff --git a/engine/events/hidden_objects/bills_house_pc.asm b/engine/events/hidden_objects/bills_house_pc.asm index 6147387a..b4c0256d 100644 --- a/engine/events/hidden_objects/bills_house_pc.asm +++ b/engine/events/hidden_objects/bills_house_pc.asm @@ -82,8 +82,8 @@ BillsHousePokemonList:: ld a, 1 ld [wTopMenuItemX], a .billsPokemonLoop - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] hlcoord 0, 0 ld b, 10 ld c, 9 @@ -113,8 +113,8 @@ BillsHousePokemonList:: call LoadScreenTilesFromBuffer2 jr .billsPokemonLoop .cancel - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call LoadScreenTilesFromBuffer2 jp TextScriptEnd diff --git a/engine/events/hidden_objects/school_blackboard.asm b/engine/events/hidden_objects/school_blackboard.asm index fd3c0b8f..4839af37 100644 --- a/engine/events/hidden_objects/school_blackboard.asm +++ b/engine/events/hidden_objects/school_blackboard.asm @@ -24,8 +24,8 @@ LinkCableHelp:: ld a, 1 ld [wTopMenuItemX], a .linkHelpLoop - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] hlcoord 0, 0 ld b, 8 ld c, 13 @@ -41,8 +41,8 @@ LinkCableHelp:: ld a, [wCurrentMenuItem] cp 3 ; pressed a on "STOP READING" jr z, .exit - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] ld hl, LinkCableInfoTexts add a ld d, 0 @@ -54,8 +54,8 @@ LinkCableHelp:: call PrintText jp .linkHelpLoop .exit - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd @@ -108,8 +108,8 @@ ViridianSchoolBlackboard:: ld a, 1 ld [wTopMenuItemX], a .blackboardLoop - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] hlcoord 0, 0 lb bc, 6, 10 call TextBoxBorder @@ -158,8 +158,8 @@ ViridianSchoolBlackboard:: jr z, .exitBlackboard ; we must have pressed a on a status condition ; so print the text - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] ld hl, ViridianBlackboardStatusPointers add a ld d, 0 @@ -171,8 +171,8 @@ ViridianSchoolBlackboard:: call PrintText jp .blackboardLoop .exitBlackboard - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call LoadScreenTilesFromBuffer1 jp TextScriptEnd diff --git a/engine/events/hidden_objects/town_map.asm b/engine/events/hidden_objects/town_map.asm index 4284214f..11f7cbc7 100644 --- a/engine/events/hidden_objects/town_map.asm +++ b/engine/events/hidden_objects/town_map.asm @@ -4,8 +4,8 @@ TownMapText:: text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] call GBPalWhiteOutWithDelay3 xor a ldh [hWY], a @@ -13,8 +13,8 @@ TownMapText:: ldh [hAutoBGTransferEnabled], a call LoadFontTilePatterns farcall DisplayTownMap - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] ld de, TextScriptEnd push de ldh a, [hLoadedROMBank] diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm index c6951615..54588e7d 100644 --- a/engine/events/in_game_trades.asm +++ b/engine/events/in_game_trades.asm @@ -108,7 +108,7 @@ InGameTrade_DoTrade: ld bc, wPartyMon2 - wPartyMon1 call AddNTimes ld a, [hl] - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ld hl, wCompletedInGameTradeFlags ld a, [wWhichTrade] ld c, a @@ -118,13 +118,13 @@ InGameTrade_DoTrade: call PrintText ld a, [wWhichPokemon] push af - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] push af call LoadHpBarAndStatusTilePatterns call InGameTrade_PrepareTradeData predef InternalClockTradeAnim pop af - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a pop af ld [wWhichPokemon], a ld a, [wInGameTradeReceiveMonSpecies] diff --git a/engine/events/poison.asm b/engine/events/poison.asm index 8bb756b5..513d08a7 100644 --- a/engine/events/poison.asm +++ b/engine/events/poison.asm @@ -1,6 +1,7 @@ ApplyOutOfBattlePoisonDamage: - ld a, [wd730] - add a + ld a, [wStatusFlags5] + assert BIT_SCRIPTED_MOVEMENT_STATE == 7 + add a ; overflows bit 7 into carry flag jp c, .noBlackOut ; no black out if joypad states are being simulated ld a, [wPartyCount] and a @@ -101,8 +102,8 @@ ApplyOutOfBattlePoisonDamage: ld a, TEXT_BLACKED_OUT ldh [hSpriteIndexOrTextID], a call DisplayTextID - ld hl, wd72e - set 5, [hl] + ld hl, wStatusFlags4 + set BIT_BATTLE_OVER_OR_BLACKOUT, [hl] ld a, $ff jr .done .noBlackOut diff --git a/engine/events/pokecenter.asm b/engine/events/pokecenter.asm index 97dbcd53..e52c8f5e 100644 --- a/engine/events/pokecenter.asm +++ b/engine/events/pokecenter.asm @@ -2,10 +2,10 @@ DisplayPokemonCenterDialogue_:: call SaveScreenTilesToBuffer1 ; save screen ld hl, PokemonCenterWelcomeText call PrintText - ld hl, wd72e - bit 2, [hl] - set 1, [hl] - set 2, [hl] + ld hl, wStatusFlags4 + bit BIT_USED_POKECENTER, [hl] + set BIT_UNKNOWN_4_1, [hl] + set BIT_USED_POKECENTER, [hl] jr nz, .skipShallWeHealYourPokemon ld hl, ShallWeHealYourPokemonText call PrintText diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm index bc3aab9a..c1e93c36 100644 --- a/engine/events/prize_menu.asm +++ b/engine/events/prize_menu.asm @@ -5,8 +5,8 @@ CeladonPrizeMenu:: ld hl, RequireCoinCaseTextPtr jp PrintText .havingCoinCase - ld hl, wd730 - set 6, [hl] ; disable letter-printing delay + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] ld hl, ExchangeCoinsForPrizesTextPtr call PrintText ; the following are the menu settings @@ -38,8 +38,8 @@ CeladonPrizeMenu:: jr z, .noChoice call HandlePrizeChoice .noChoice - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] ret RequireCoinCaseTextPtr: @@ -298,7 +298,7 @@ GetPrizeMonLevel: jr .loop .matchFound ld a, [hl] - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a ret INCLUDE "data/events/prize_mon_levels.asm" diff --git a/engine/events/vending_machine.asm b/engine/events/vending_machine.asm index 980a45c5..1530b994 100644 --- a/engine/events/vending_machine.asm +++ b/engine/events/vending_machine.asm @@ -15,8 +15,8 @@ VendingMachineMenu:: ld [wTopMenuItemY], a ld a, 1 ld [wTopMenuItemX], a - ld hl, wd730 - set 6, [hl] + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] hlcoord 0, 3 ld b, 8 ld c, 12 @@ -28,8 +28,8 @@ VendingMachineMenu:: hlcoord 9, 6 ld de, DrinkPriceText call PlaceString - ld hl, wd730 - res 6, [hl] + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] call HandleMenuInput bit BIT_B_BUTTON, a jr nz, .notThirsty |
