diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-13 19:48:21 -0500 | 
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-13 19:48:21 -0500 | 
| commit | 205fd1ac81c2d1dcec010c478979bd6159edc72d (patch) | |
| tree | 00b70faa84c87265b6ee4e68f0df1fc4946afca2 /engine | |
| parent | b6ec1cd884e34cd67c18e6faae7054b5b30b6c9e (diff) | |
Identify hUILayoutFlags and hPikachuSpriteVRAMOffset
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/battle/core.asm | 12 | ||||
| -rw-r--r-- | engine/gfx/hp_bar.asm | 2 | ||||
| -rw-r--r-- | engine/gfx/sprite_oam.asm | 2 | ||||
| -rw-r--r-- | engine/items/item_effects.asm | 16 | ||||
| -rw-r--r-- | engine/link/cable_club.asm | 8 | ||||
| -rw-r--r-- | engine/menus/party_menu.asm | 8 | ||||
| -rw-r--r-- | engine/menus/pokedex.asm | 8 | ||||
| -rw-r--r-- | engine/menus/save.asm | 8 | ||||
| -rw-r--r-- | engine/pikachu/pikachu_emotions.asm | 4 | ||||
| -rw-r--r-- | engine/pikachu/pikachu_movement.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/learn_move.asm | 12 | ||||
| -rw-r--r-- | engine/pokemon/status_screen.asm | 2 | ||||
| -rw-r--r-- | engine/printer/printer2.asm | 8 | 
13 files changed, 46 insertions, 46 deletions
| diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 053d6a1e..79defa33 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2579,13 +2579,13 @@ MoveSelectionMenu:  .writemoves  	ld de, wMovesString -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	call PlaceString -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ret  .regularmenu @@ -2700,10 +2700,10 @@ SelectMenuItem:  	call AddNTimes  	ld [hl], "▷"  .select -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 1, [hl]  	call HandleMenuInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 1, [hl]  	bit BIT_D_UP, a  	jp nz, SelectMenuItem_CursorUp diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index b47b1fbd..fcbf1a29 100644 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -214,7 +214,7 @@ UpdateHPBar_PrintHPNumber:  	ld [wHPBarTempHP], a  	push hl  	ld de, $15 -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	bit 0, a  	jr z, .next  	ld de, $9 diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm index 85db1b53..3ffd995f 100644 --- a/engine/gfx/sprite_oam.asm +++ b/engine/gfx/sprite_oam.asm @@ -106,7 +106,7 @@ PrepareOAMData::  	cp $80  	jr c, .asm_4a1c  	ld b, a -	ldh a, [hFFFC] +	ldh a, [hPikachuSpriteVRAMOffset]  	add b  .asm_4a1c  	ld [de], a ; tile id diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 00a575f1..9b584e9b 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1168,15 +1168,15 @@ ItemUseMedicine:  	call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled  	ld a, SFX_HEAL_HP  	call PlaySoundWaitForCurrent -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ld a, $02  	ld [wHPBarType], a  	predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	pop af  	ld b, a ; store heal amount (1/5 of max HP)  	ld hl, wHPBarOldHP + 1 @@ -1323,15 +1323,15 @@ ItemUseMedicine:  	jr z, .playStatusAilmentCuringSound  	ld a, SFX_HEAL_HP  	call PlaySoundWaitForCurrent -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ld a, $02  	ld [wHPBarType], a  	predef UpdateHPBar2 ; animate the HP bar lengthening -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ld a, REVIVE_MSG  	ld [wPartyMenuTypeOrMessageID], a  	ld a, [wcf91] diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index c75ab200..5124c744 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -346,10 +346,10 @@ TradeCenter_SelectMon:  	ld a, 1  	ld [wTopMenuItemX], a  .enemyMonMenu_HandleInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 1, [hl]  	call HandleMenuInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 1, [hl]  	and a  	jp z, .getNewInput @@ -411,10 +411,10 @@ TradeCenter_SelectMon:  	lb bc, 6, 1  	call ClearScreenArea  .playerMonMenu_HandleInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 1, [hl]  	call HandleMenuInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 1, [hl]  	and a ; was anything pressed?  	jr nz, .playerMonMenu_SomethingPressed diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm index 32f47f6a..3af777a2 100644 --- a/engine/menus/party_menu.asm +++ b/engine/menus/party_menu.asm @@ -77,14 +77,14 @@ RedrawPartyMenu_::  	pop hl  	push hl  	ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	add hl, bc  	predef DrawHP2 ; draw HP bar and prints current / max HP -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 0, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	call SetPartyMenuHPBarColor ; color the HP bar (on SGB)  	pop hl  	jr .printLevel diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm index 8e4fef19..7b1a204a 100644 --- a/engine/menus/pokedex.asm +++ b/engine/menus/pokedex.asm @@ -676,13 +676,13 @@ Pokedex_PrepareDexEntryForPrinting:  	ld a, [wPrinterPokedexEntryTextPointer + 1]  	ld h, a  	bccoord 1, 1 -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 3, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	call Pokedex_PrintFlavorTextAtBC -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 3, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ret  ; draws a line of tiles diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 13fdf729..0c53f689 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -342,10 +342,10 @@ ChangeBox::  	call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM  	call DisplayChangeBoxMenu  	call UpdateSprites -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 1, [hl]  	call HandleMenuInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 1, [hl]  	bit 1, a ; pressed b  	ret nz @@ -429,12 +429,12 @@ DisplayChangeBoxMenu:  	hlcoord 11, 0  	lb bc, 12, 7  	call TextBoxBorder -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 2, [hl]  	ld de, BoxNames  	hlcoord 13, 1  	call PlaceString -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 2, [hl]  	ld a, [wCurrentBoxNum]  	and $7f diff --git a/engine/pikachu/pikachu_emotions.asm b/engine/pikachu/pikachu_emotions.asm index f4963f17..6647c4cc 100644 --- a/engine/pikachu/pikachu_emotions.asm +++ b/engine/pikachu/pikachu_emotions.asm @@ -414,7 +414,7 @@ INCLUDE "data/pikachu/pikachu_emotions.asm"  PikachuWalksToNurseJoy:  	ld a, $40 -	ldh [hFFFC], a +	ldh [hPikachuSpriteVRAMOffset], a  	call LoadPikachuSpriteIntoVRAM  	call .GetMovementData  	and a @@ -422,7 +422,7 @@ PikachuWalksToNurseJoy:  	call ApplyPikachuMovementData  .skip  	xor a -	ldh [hFFFC], a +	ldh [hPikachuSpriteVRAMOffset], a  	ret  .GetMovementData: diff --git a/engine/pikachu/pikachu_movement.asm b/engine/pikachu/pikachu_movement.asm index 91c16999..6a0877c8 100644 --- a/engine/pikachu/pikachu_movement.asm +++ b/engine/pikachu/pikachu_movement.asm @@ -958,7 +958,7 @@ LoadPikachuSpriteIntoVRAM:  	call CopyVideoDataAlternate  	ld de, PikachuSprite + $c * $10  	ld hl, vNPCSprites2 + $c * $10 -	ldh a, [hFFFC] +	ldh a, [hPikachuSpriteVRAMOffset]  	and a  	jr z, .load  	ld de, PikachuSprite + $c * $10 diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm index d365acd4..ff704003 100644 --- a/engine/pokemon/learn_move.asm +++ b/engine/pokemon/learn_move.asm @@ -125,13 +125,13 @@ TryingToLearn:  	call TextBoxBorder  	hlcoord 6, 8  	ld de, wMovesString -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	call PlaceString -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	ld hl, wTopMenuItemY  	ld a, 8  	ld [hli], a ; wTopMenuItemY @@ -145,10 +145,10 @@ TryingToLearn:  	ld a, A_BUTTON | B_BUTTON  	ld [hli], a ; wMenuWatchedKeys  	ld [hl], 0 ; wLastMenuItem -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	set 1, [hl]  	call HandleMenuInput -	ld hl, hFlagsFFFA +	ld hl, hUILayoutFlags  	res 1, [hl]  	push af  	call LoadScreenTilesFromBuffer1 diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index f1f3aa26..0adfc217 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -40,7 +40,7 @@ DrawHP_:  	push hl  	call DrawHPBar  	pop hl -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	bit 0, a  	jr z, .printFractionBelowBar  	ld bc, $9 ; right of bar diff --git a/engine/printer/printer2.asm b/engine/printer/printer2.asm index b257aff4..1f8ac975 100644 --- a/engine/printer/printer2.asm +++ b/engine/printer/printer2.asm @@ -84,13 +84,13 @@ Printer_GetMonStats:  	hlcoord 9, 8  	ld de, .Stats -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	set 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	call PlaceString -	ldh a, [hFlagsFFFA] +	ldh a, [hUILayoutFlags]  	res 2, a -	ldh [hFlagsFFFA], a +	ldh [hUILayoutFlags], a  	hlcoord 16, 8  	ld de, wLoadedMonAttack | 
