diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/battle/battle_transitions.asm | 2 | ||||
| -rw-r--r-- | engine/battle/wild_encounters.asm | 2 | ||||
| -rw-r--r-- | engine/events/card_key.asm | 4 | ||||
| -rw-r--r-- | engine/events/hidden_objects/safari_game.asm | 2 | ||||
| -rw-r--r-- | engine/events/pick_up_item.asm | 4 | ||||
| -rw-r--r-- | engine/events/poison.asm | 4 | ||||
| -rw-r--r-- | engine/events/prize_menu.asm | 21 | ||||
| -rw-r--r-- | engine/items/item_effects.asm | 7 | ||||
| -rw-r--r-- | engine/menus/display_text_id_init.asm | 2 | ||||
| -rw-r--r-- | engine/overworld/push_boulder.asm | 6 |
10 files changed, 26 insertions, 28 deletions
diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 16311f48..5956d875 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -11,7 +11,7 @@ BattleTransition: ; Determine which OAM block is being used by the enemy trainer sprite (if there ; is one). ld hl, wSpritePlayerStateData1ImageIndex - ldh a, [hSpriteIndexOrTextID] ; enemy trainer sprite index (0 if wild battle) + ldh a, [hSpriteIndex] ; enemy trainer sprite index (0 if wild battle) ld c, a ld b, 0 ld de, $10 diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm index ea451bcf..b5cf9f51 100644 --- a/engine/battle/wild_encounters.asm +++ b/engine/battle/wild_encounters.asm @@ -90,7 +90,7 @@ TryDoWildEncounter: .lastRepelStep ld [wRepelRemainingSteps], a ld a, TEXT_REPEL_WORE_OFF - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a call EnableAutoTextBoxDrawing call DisplayTextID .CantEncounter2 diff --git a/engine/events/card_key.asm b/engine/events/card_key.asm index b052d3e2..1597e12b 100644 --- a/engine/events/card_key.asm +++ b/engine/events/card_key.asm @@ -28,7 +28,7 @@ PrintCardKeyText: call GetCoordsInFrontOfPlayer push de tx_pre_id CardKeySuccessText - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a call PrintPredefTextID pop de srl d @@ -55,7 +55,7 @@ PrintCardKeyText: jp PlaySound .noCardKey tx_pre_id CardKeyFailText - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a jp PrintPredefTextID INCLUDE "data/events/card_key_maps.asm" diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm index 6fac1afa..fc014ce0 100644 --- a/engine/events/hidden_objects/safari_game.asm +++ b/engine/events/hidden_objects/safari_game.asm @@ -41,7 +41,7 @@ SafariZoneGameOver: cp SFX_SAFARI_ZONE_PA jr nz, .waitForMusicToPlay ld a, TEXT_SAFARI_GAME_OVER - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a call DisplayTextID xor a ld [wPlayerMovingDirection], a diff --git a/engine/events/pick_up_item.asm b/engine/events/pick_up_item.asm index 548db5be..8fbdcfa2 100644 --- a/engine/events/pick_up_item.asm +++ b/engine/events/pick_up_item.asm @@ -1,7 +1,7 @@ PickUpItem: call EnableAutoTextBoxDrawing - ldh a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] ld b, a ld hl, wMissableObjectList .missableObjectsListLoop @@ -18,7 +18,7 @@ PickUpItem: ldh [hMissableObjectIndex], a ld hl, wMapSpriteExtraData - ldh a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] dec a add a ld d, 0 diff --git a/engine/events/poison.asm b/engine/events/poison.asm index 513d08a7..121bdc19 100644 --- a/engine/events/poison.asm +++ b/engine/events/poison.asm @@ -53,7 +53,7 @@ ApplyOutOfBattlePoisonDamage: ld [wJoyIgnore], a call EnableAutoTextBoxDrawing ld a, TEXT_MON_FAINTED - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a call DisplayTextID pop de pop hl @@ -100,7 +100,7 @@ ApplyOutOfBattlePoisonDamage: jr nz, .noBlackOut call EnableAutoTextBoxDrawing ld a, TEXT_BLACKED_OUT - ldh [hSpriteIndexOrTextID], a + ldh [hTextID], a call DisplayTextID ld hl, wStatusFlags4 set BIT_BATTLE_OVER_OR_BLACKOUT, [hl] diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm index 4603b582..f99cdaaa 100644 --- a/engine/events/prize_menu.asm +++ b/engine/events/prize_menu.asm @@ -56,17 +56,14 @@ WhichPrizeTextPtr: text_end GetPrizeMenuId: -; determine which one among the three -; prize-texts has been selected -; using the text ID (stored in [hSpriteIndexOrTextID]) -; load the three prizes at wd13d-wd13f -; load the three prices at wd141-wd146 -; display the three prizes' names -; (distinguishing between Pokemon names -; and Items (specifically TMs) names) - ldh a, [hSpriteIndexOrTextID] - sub 3 ; prize-texts' id are 3, 4 and 5 - ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2) +; determine which one among the three prize texts has been selected using the text ID (stored in [hTextID]) +; prize texts' IDs are TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_1-TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_3 +; load the three prizes at wPrize1-wPrice3 +; load the three prices at wPrize1Price-wPrize3Price +; display the three prizes' names, distinguishing between Pokemon names and item names (specifically TMs) + ldh a, [hTextID] + sub TEXT_GAMECORNERPRIZEROOM_PRIZE_VENDOR_1 + ld [wWhichPrizeWindow], a ; prize texts' relative ID (i.e. 0-2) add a add a ld d, 0 @@ -88,7 +85,7 @@ GetPrizeMenuId: ld bc, 6 call CopyData ld a, [wWhichPrizeWindow] - cp 2 ;is TM_menu? + cp 2 ; is TM_menu? jr nz, .putMonName ld a, [wPrize1] ld [wd11e], a diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 5b41516f..df050b03 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -688,11 +688,11 @@ ItemUseSurfboard: jp PrintText .tryToStopSurfing xor a - ldh [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a ld d, 16 ; talking range in pixels (normal range) call IsSpriteInFrontOfPlayer2 res 7, [hl] - ldh a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] and a ; is there a sprite in the way? jr nz, .cannotStopSurfing ld hl, TilePairCollisionsWater @@ -2512,9 +2512,10 @@ GetMaxPP: and %11000000 ; get PP Up count pop bc or b ; place normal max PP in 6 lower bits of a + assert wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP ld h, d ld l, e - inc hl ; hl = wcd73 + inc hl ; hl = wPPUpCountAndMaxPP ld [hl], a xor a ; add the bonus for the existing PP Up count ld [wUsingPPUp], a diff --git a/engine/menus/display_text_id_init.asm b/engine/menus/display_text_id_init.asm index 7f2c1a59..a89696fb 100644 --- a/engine/menus/display_text_id_init.asm +++ b/engine/menus/display_text_id_init.asm @@ -5,7 +5,7 @@ DisplayTextIDInit:: ld a, [wAutoTextBoxDrawingControl] bit 0, a jr nz, .skipDrawingTextBoxBorder - ldh a, [hSpriteIndexOrTextID] ; text ID (or sprite ID) + ldh a, [hTextID] and a jr nz, .notStartMenu ; if text ID is 0 (i.e. the start menu) diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm index 7eee844c..ff481439 100644 --- a/engine/overworld/push_boulder.asm +++ b/engine/overworld/push_boulder.asm @@ -6,15 +6,15 @@ TryPushingBoulder:: bit BIT_BOULDER_DUST, a ret nz xor a - ldh [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a call IsSpriteInFrontOfPlayer - ldh a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] ld [wBoulderSpriteIndex], a and a jp z, ResetBoulderPushFlags ld hl, wSpritePlayerStateData1MovementStatus ld d, $0 - ldh a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] swap a ld e, a add hl, de |
