mirror of
https://github.com/pret/pokered.git
synced 2024-10-23 06:58:24 +00:00
Identify hUILayoutFlags
This commit is contained in:
parent
83f7d224c8
commit
95353fdefa
11 changed files with 38 additions and 38 deletions
|
@ -2472,13 +2472,13 @@ MoveSelectionMenu:
|
||||||
|
|
||||||
.writemoves
|
.writemoves
|
||||||
ld de, wMovesString
|
ld de, wMovesString
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
set 2, a
|
set 2, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
res 2, a
|
res 2, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.regularmenu
|
.regularmenu
|
||||||
|
@ -2598,10 +2598,10 @@ SelectMenuItem:
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld [hl], "▷"
|
ld [hl], "▷"
|
||||||
.select
|
.select
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
bit BIT_D_UP, a
|
bit BIT_D_UP, a
|
||||||
jp nz, SelectMenuItem_CursorUp
|
jp nz, SelectMenuItem_CursorUp
|
||||||
|
|
|
@ -213,7 +213,7 @@ UpdateHPBar_PrintHPNumber:
|
||||||
ld a, [wHPBarOldHP + 1]
|
ld a, [wHPBarOldHP + 1]
|
||||||
ld [wHPBarTempHP], a
|
ld [wHPBarTempHP], a
|
||||||
push hl
|
push hl
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr z, .asm_fb15
|
jr z, .asm_fb15
|
||||||
ld de, $9
|
ld de, $9
|
||||||
|
|
|
@ -1051,15 +1051,15 @@ ItemUseMedicine:
|
||||||
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
|
call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled
|
||||||
ld a, SFX_HEAL_HP
|
ld a, SFX_HEAL_HP
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
set 0, a
|
set 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
ld a, $02
|
ld a, $02
|
||||||
ld [wHPBarType], a
|
ld [wHPBarType], a
|
||||||
predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled
|
predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
res 0, a
|
res 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
pop af
|
pop af
|
||||||
ld b, a ; store heal amount (1/5 of max HP)
|
ld b, a ; store heal amount (1/5 of max HP)
|
||||||
ld hl, wHPBarOldHP + 1
|
ld hl, wHPBarOldHP + 1
|
||||||
|
@ -1201,15 +1201,15 @@ ItemUseMedicine:
|
||||||
jr z, .playStatusAilmentCuringSound
|
jr z, .playStatusAilmentCuringSound
|
||||||
ld a, SFX_HEAL_HP
|
ld a, SFX_HEAL_HP
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
set 0, a
|
set 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
ld a, $02
|
ld a, $02
|
||||||
ld [wHPBarType], a
|
ld [wHPBarType], a
|
||||||
predef UpdateHPBar2 ; animate the HP bar lengthening
|
predef UpdateHPBar2 ; animate the HP bar lengthening
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
res 0, a
|
res 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
ld a, REVIVE_MSG
|
ld a, REVIVE_MSG
|
||||||
ld [wPartyMenuTypeOrMessageID], a
|
ld [wPartyMenuTypeOrMessageID], a
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
|
|
|
@ -338,10 +338,10 @@ TradeCenter_SelectMon:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wTopMenuItemX], a
|
ld [wTopMenuItemX], a
|
||||||
.enemyMonMenu_HandleInput
|
.enemyMonMenu_HandleInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
and a
|
and a
|
||||||
jp z, .getNewInput
|
jp z, .getNewInput
|
||||||
|
@ -403,10 +403,10 @@ TradeCenter_SelectMon:
|
||||||
lb bc, 6, 1
|
lb bc, 6, 1
|
||||||
call ClearScreenArea
|
call ClearScreenArea
|
||||||
.playerMonMenu_HandleInput
|
.playerMonMenu_HandleInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
and a ; was anything pressed?
|
and a ; was anything pressed?
|
||||||
jr nz, .playerMonMenu_SomethingPressed
|
jr nz, .playerMonMenu_SomethingPressed
|
||||||
|
|
|
@ -69,14 +69,14 @@ RedrawPartyMenu_::
|
||||||
pop hl
|
pop hl
|
||||||
push hl
|
push hl
|
||||||
ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column
|
ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
set 0, a
|
set 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
add hl, bc
|
add hl, bc
|
||||||
predef DrawHP2 ; draw HP bar and prints current / max HP
|
predef DrawHP2 ; draw HP bar and prints current / max HP
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
res 0, a
|
res 0, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
call SetPartyMenuHPBarColor ; color the HP bar (on SGB)
|
call SetPartyMenuHPBarColor ; color the HP bar (on SGB)
|
||||||
pop hl
|
pop hl
|
||||||
jr .printLevel
|
jr .printLevel
|
||||||
|
|
|
@ -351,10 +351,10 @@ ChangeBox::
|
||||||
call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM
|
call z, EmptyAllSRAMBoxes ; if so, empty all boxes in SRAM
|
||||||
call DisplayChangeBoxMenu
|
call DisplayChangeBoxMenu
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
bit 1, a ; pressed b
|
bit 1, a ; pressed b
|
||||||
ret nz
|
ret nz
|
||||||
|
@ -445,12 +445,12 @@ DisplayChangeBoxMenu:
|
||||||
ld b, 12
|
ld b, 12
|
||||||
ld c, 7
|
ld c, 7
|
||||||
call TextBoxBorder
|
call TextBoxBorder
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
ld de, BoxNames
|
ld de, BoxNames
|
||||||
hlcoord 13, 1
|
hlcoord 13, 1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
ld a, [wCurrentBoxNum]
|
ld a, [wCurrentBoxNum]
|
||||||
and $7f
|
and $7f
|
||||||
|
|
|
@ -126,13 +126,13 @@ TryingToLearn:
|
||||||
call TextBoxBorder
|
call TextBoxBorder
|
||||||
hlcoord 6, 8
|
hlcoord 6, 8
|
||||||
ld de, wMovesString
|
ld de, wMovesString
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
set 2, a
|
set 2, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
res 2, a
|
res 2, a
|
||||||
ldh [hFlagsFFF6], a
|
ldh [hUILayoutFlags], a
|
||||||
ld hl, wTopMenuItemY
|
ld hl, wTopMenuItemY
|
||||||
ld a, 8
|
ld a, 8
|
||||||
ld [hli], a ; wTopMenuItemY
|
ld [hli], a ; wTopMenuItemY
|
||||||
|
@ -146,10 +146,10 @@ TryingToLearn:
|
||||||
ld a, A_BUTTON | B_BUTTON
|
ld a, A_BUTTON | B_BUTTON
|
||||||
ld [hli], a ; wMenuWatchedKeys
|
ld [hli], a ; wMenuWatchedKeys
|
||||||
ld [hl], 0 ; wLastMenuItem
|
ld [hl], 0 ; wLastMenuItem
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
call HandleMenuInput
|
call HandleMenuInput
|
||||||
ld hl, hFlagsFFF6
|
ld hl, hUILayoutFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
push af
|
push af
|
||||||
call LoadScreenTilesFromBuffer1
|
call LoadScreenTilesFromBuffer1
|
||||||
|
|
|
@ -40,7 +40,7 @@ DrawHP_:
|
||||||
push hl
|
push hl
|
||||||
call DrawHPBar
|
call DrawHPBar
|
||||||
pop hl
|
pop hl
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr z, .printFractionBelowBar
|
jr z, .printFractionBelowBar
|
||||||
ld bc, $9 ; right of bar
|
ld bc, $9 ; right of bar
|
||||||
|
|
|
@ -62,7 +62,7 @@ PlaceNextChar::
|
||||||
cp "<NEXT>"
|
cp "<NEXT>"
|
||||||
jr nz, .NotNext
|
jr nz, .NotNext
|
||||||
ld bc, 2 * SCREEN_WIDTH
|
ld bc, 2 * SCREEN_WIDTH
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
bit 2, a
|
bit 2, a
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
ld bc, SCREEN_WIDTH
|
ld bc, SCREEN_WIDTH
|
||||||
|
|
|
@ -136,7 +136,7 @@ PlaceMenuCursor::
|
||||||
and a ; was the previous menu id 0?
|
and a ; was the previous menu id 0?
|
||||||
jr z, .checkForArrow1
|
jr z, .checkForArrow1
|
||||||
push af
|
push af
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
bit 1, a ; is the menu double spaced?
|
bit 1, a ; is the menu double spaced?
|
||||||
jr z, .doubleSpaced1
|
jr z, .doubleSpaced1
|
||||||
ld bc, 20
|
ld bc, 20
|
||||||
|
@ -162,7 +162,7 @@ PlaceMenuCursor::
|
||||||
and a
|
and a
|
||||||
jr z, .checkForArrow2
|
jr z, .checkForArrow2
|
||||||
push af
|
push af
|
||||||
ldh a, [hFlagsFFF6]
|
ldh a, [hUILayoutFlags]
|
||||||
bit 1, a ; is the menu double spaced?
|
bit 1, a ; is the menu double spaced?
|
||||||
jr z, .doubleSpaced2
|
jr z, .doubleSpaced2
|
||||||
ld bc, 20
|
ld bc, 20
|
||||||
|
|
2
hram.asm
2
hram.asm
|
@ -391,7 +391,7 @@ hClearLetterPrintingDelayFlags:: db
|
||||||
|
|
||||||
; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
|
; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
|
||||||
; bit 1: menu is double spaced
|
; bit 1: menu is double spaced
|
||||||
hFlagsFFF6:: db
|
hUILayoutFlags:: db
|
||||||
|
|
||||||
hFieldMoveMonMenuTopMenuItemX:: db
|
hFieldMoveMonMenuTopMenuItemX:: db
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue