Update hardware.inc to 5.1.0

This commit is contained in:
Rangi42
2025-06-29 15:53:34 -04:00
committed by Rangi
parent 8f5a8c5b5b
commit 5abf8d01fb
84 changed files with 845 additions and 696 deletions

View File

@@ -240,10 +240,10 @@ DebugColorMain:
jr nc, .no_start_select
ld hl, hJoyLast
ld a, [hl]
and SELECT
and PAD_SELECT
jr nz, .NextMon
ld a, [hl]
and START
and PAD_START
jr nz, .PreviousMon
.no_start_select
@@ -546,10 +546,10 @@ DebugColor_PrintHexColor:
DebugColor_Joypad:
ldh a, [hJoyLast]
and B_BUTTON
and PAD_B
jr nz, .tmhm
ldh a, [hJoyLast]
and A_BUTTON
and PAD_A
jr nz, .toggle_shiny
ld a, [wDebugColorRGBJumptableIndex]
@@ -598,13 +598,13 @@ DebugColor_Joypad:
DebugColor_SelectColorBox:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugColor_NextRGBColor
ld a, [hl]
and D_LEFT
and PAD_LEFT
jr nz, .light
ld a, [hl]
and D_RIGHT
and PAD_RIGHT
jr nz, .dark
ret
@@ -625,10 +625,10 @@ DebugColor_SelectColorBox:
DebugColor_ChangeRedValue:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugColor_NextRGBColor
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugColor_PreviousRGBColor
ld hl, wDebugRedChannel
jr DebugColor_UpdateRGBColor
@@ -636,10 +636,10 @@ DebugColor_ChangeRedValue:
DebugColor_ChangeGreenValue:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugColor_NextRGBColor
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugColor_PreviousRGBColor
ld hl, wDebugGreenChannel
jr DebugColor_UpdateRGBColor
@@ -647,17 +647,17 @@ DebugColor_ChangeGreenValue:
DebugColor_ChangeBlueValue:
ld hl, hJoyLast
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugColor_PreviousRGBColor
ld hl, wDebugBlueChannel
; fallthrough
DebugColor_UpdateRGBColor:
ldh a, [hJoyLast]
and D_RIGHT
and PAD_RIGHT
jr nz, .increment
ldh a, [hJoyLast]
and D_LEFT
and PAD_LEFT
jr nz, .decrement
ret
@@ -708,7 +708,7 @@ DebugColor_InitTMHM:
DebugColor_TMHMJoypad:
ld hl, hJoyPressed
ld a, [hl]
and B_BUTTON
and PAD_B
jr nz, .cancel
call .scroll
ret
@@ -726,10 +726,10 @@ DebugColor_TMHMJoypad:
.scroll:
ld hl, hJoyLast
ld a, [hl]
and D_UP
and PAD_UP
jr nz, .up
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, .down
ret
@@ -1188,10 +1188,10 @@ DebugTileset_LoadPalettes:
DebugColorMain2: ; unreferenced
ld hl, hJoyLast
ld a, [hl]
and SELECT
and PAD_SELECT
jr nz, .next_palette
ld a, [hl]
and B_BUTTON
and PAD_B
jr nz, .cancel
call DebugTileset_Joypad
ret
@@ -1306,13 +1306,13 @@ DebugTileset_Joypad:
DebugTileset_SelectColorBox:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugTileset_NextRGBColor
ld a, [hl]
and D_LEFT
and PAD_LEFT
jr nz, .left
ld a, [hl]
and D_RIGHT
and PAD_RIGHT
jr nz, .right
ret
@@ -1341,10 +1341,10 @@ DebugTileset_SelectColorBox:
DebugTileset_ChangeRedValue:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugTileset_NextRGBColor
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugTileset_PreviousRGBColor
ld hl, wDebugRedChannel
jr DebugTileset_UpdateRGBColor
@@ -1352,10 +1352,10 @@ DebugTileset_ChangeRedValue:
DebugTileset_ChangeGreenValue:
ld hl, hJoyLast
ld a, [hl]
and D_DOWN
and PAD_DOWN
jr nz, DebugTileset_NextRGBColor
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugTileset_PreviousRGBColor
ld hl, wDebugGreenChannel
jr DebugTileset_UpdateRGBColor
@@ -1363,17 +1363,17 @@ DebugTileset_ChangeGreenValue:
DebugTileset_ChangeBlueValue:
ld hl, hJoyLast
ld a, [hl]
and D_UP
and PAD_UP
jr nz, DebugTileset_PreviousRGBColor
ld hl, wDebugBlueChannel
; fallthrough
DebugTileset_UpdateRGBColor:
ldh a, [hJoyLast]
and D_RIGHT
and PAD_RIGHT
jr nz, .increment
ldh a, [hJoyLast]
and D_LEFT
and PAD_LEFT
jr nz, .decrement
ret

View File

@@ -31,8 +31,8 @@ DEF DEBUGROOMMENU_NUM_PAGES EQU const_value
_DebugRoom:
ldh a, [hJoyDown]
and SELECT | START
cp SELECT | START
and PAD_SELECT | PAD_START
cp PAD_SELECT | PAD_START
ret nz
ldh a, [hDebugRoomMenuPage]
push af
@@ -58,10 +58,10 @@ _DebugRoom:
.wait
call GetScrollingMenuJoypad
ld a, [wMenuJoypad]
and A_BUTTON | B_BUTTON
and PAD_A | PAD_B
jr z, .wait
call CloseWindow
cp B_BUTTON
cp PAD_B
jr z, .done
ld a, [wMenuSelection]
ld hl, .Jumptable
@@ -607,24 +607,24 @@ DebugRoom_EditPagedValues:
call DelayFrame
call JoyTextDelay
ldh a, [hJoyLast]
bit B_BUTTON_F, a
bit B_PAD_B, a
jr nz, .done
ld hl, .continue
push hl
rra ; A_BUTTON_F?
rra ; B_PAD_A?
jr c, DebugRoom_PagedValuePressedA
rra ; skip B_BUTTON_F
rra ; SELECT_F?
rra ; skip B_PAD_B
rra ; B_PAD_SELECT?
jr c, DebugRoom_PagedValuePressedSelect
rra ; START_F?
rra ; B_PAD_START?
jr c, DebugRoom_PagedValuePressedStart
rra ; D_RIGHT_F?
rra ; B_PAD_RIGHT?
jp c, DebugRoom_IncrementPagedValue
rra ; D_LEFT_F?
rra ; B_PAD_LEFT?
jp c, DebugRoom_DecrementPagedValue
rra ; D_UP_F?
rra ; B_PAD_UP?
jp c, DebugRoom_PrevPagedValue
rra ; D_DOWN_F?
rra ; B_PAD_DOWN?
jp c, DebugRoom_NextPagedValue
pop hl
.continue
@@ -999,7 +999,7 @@ DebugRoom_JoyWaitABSelect:
.loop
call GetJoypad
ldh a, [hJoyPressed]
and A_BUTTON | B_BUTTON | SELECT
and PAD_A | PAD_B | PAD_SELECT
jr z, .loop
ret