Identify more uses of wBuffer1-6
This commit is contained in:
@@ -10,17 +10,17 @@ _PlayerDecorationMenu:
|
||||
push af
|
||||
ld hl, .MenuHeader
|
||||
call LoadMenuHeader
|
||||
xor a
|
||||
ld [wBuffer5], a
|
||||
ld a, $1
|
||||
ld [wBuffer6], a
|
||||
xor a ; FALSE
|
||||
ld [wChangedDecorations], a
|
||||
ld a, $1 ; bed
|
||||
ld [wCurDecorationCategory], a
|
||||
.top_loop
|
||||
ld a, [wBuffer6]
|
||||
ld a, [wCurDecorationCategory]
|
||||
ld [wMenuCursorBuffer], a
|
||||
call .FindCategoriesWithOwnedDecos
|
||||
call DoNthMenu
|
||||
ld a, [wMenuCursorY]
|
||||
ld [wBuffer6], a
|
||||
ld [wCurDecorationCategory], a
|
||||
jr c, .exit_menu
|
||||
ld a, [wMenuSelection]
|
||||
ld hl, .pointers
|
||||
@@ -31,7 +31,7 @@ _PlayerDecorationMenu:
|
||||
call ExitMenu
|
||||
pop af
|
||||
ld [wWhichIndexSet], a
|
||||
ld a, [wBuffer5]
|
||||
ld a, [wChangedDecorations]
|
||||
ld c, a
|
||||
ret
|
||||
|
||||
@@ -71,7 +71,7 @@ _PlayerDecorationMenu:
|
||||
xor a
|
||||
ld [wWhichIndexSet], a
|
||||
call .ClearStringBuffer2
|
||||
call .FindOwndDecos
|
||||
call .FindOwnedDecos
|
||||
ld a, 7
|
||||
call .AppendToStringBuffer2
|
||||
ld hl, wStringBuffer2
|
||||
@@ -98,7 +98,7 @@ _PlayerDecorationMenu:
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.FindOwndDecos:
|
||||
.FindOwnedDecos:
|
||||
ld hl, .dw
|
||||
.loop
|
||||
ld a, [hli]
|
||||
@@ -642,12 +642,12 @@ DecoAction_putawaybigdoll:
|
||||
|
||||
DecoAction_TrySetItUp:
|
||||
ld a, [hl]
|
||||
ld [wBuffer1], a
|
||||
ld [wCurDecoration], a
|
||||
push hl
|
||||
call DecoAction_SetItUp
|
||||
jr c, .failed
|
||||
ld a, 1
|
||||
ld [wBuffer5], a
|
||||
ld a, TRUE
|
||||
ld [wChangedDecorations], a
|
||||
pop hl
|
||||
ld a, [wMenuSelection]
|
||||
ld [hl], a
|
||||
@@ -661,7 +661,7 @@ DecoAction_TrySetItUp:
|
||||
|
||||
DecoAction_SetItUp:
|
||||
; See if there's anything of the same type already out
|
||||
ld a, [wBuffer1]
|
||||
ld a, [wCurDecoration]
|
||||
and a
|
||||
jr z, .nothingthere
|
||||
; See if that item is already out
|
||||
@@ -673,7 +673,7 @@ DecoAction_SetItUp:
|
||||
ld a, [wMenuSelection]
|
||||
ld hl, wStringBuffer4
|
||||
call GetDecorationName
|
||||
ld a, [wBuffer1]
|
||||
ld a, [wCurDecoration]
|
||||
ld hl, wStringBuffer3
|
||||
call GetDecorationName
|
||||
ld hl, PutAwayAndSetUpText
|
||||
@@ -699,16 +699,16 @@ DecoAction_SetItUp:
|
||||
DecoAction_TryPutItAway:
|
||||
; If there is no item of that type already set, there is nothing to put away.
|
||||
ld a, [hl]
|
||||
ld [wBuffer1], a
|
||||
ld [wCurDecoration], a
|
||||
xor a
|
||||
ld [hl], a
|
||||
ld a, [wBuffer1]
|
||||
ld a, [wCurDecoration]
|
||||
and a
|
||||
jr z, .nothingthere
|
||||
; Put it away.
|
||||
ld a, $1
|
||||
ld [wBuffer5], a
|
||||
ld a, [wBuffer1]
|
||||
ld a, TRUE
|
||||
ld [wChangedDecorations], a
|
||||
ld a, [wCurDecoration]
|
||||
ld [wMenuSelection], a
|
||||
ld hl, wStringBuffer3
|
||||
call GetDecorationName
|
||||
@@ -729,8 +729,8 @@ DecoAction_setupornament:
|
||||
jr c, .cancel
|
||||
call DecoAction_SetItUp_Ornament
|
||||
jr c, .cancel
|
||||
ld a, $1
|
||||
ld [wBuffer5], a
|
||||
ld a, TRUE
|
||||
ld [wChangedDecorations], a
|
||||
jr DecoAction_FinishUp_Ornament
|
||||
|
||||
.cancel
|
||||
@@ -816,8 +816,8 @@ DecoAction_PutItAway_Ornament:
|
||||
jr z, .nothingthere
|
||||
ld hl, wStringBuffer3
|
||||
call GetDecorationName
|
||||
ld a, $1
|
||||
ld [wBuffer5], a
|
||||
ld a, TRUE
|
||||
ld [wChangedDecorations], a
|
||||
xor a
|
||||
ld [wSelectedDecoration], a
|
||||
ld hl, PutAwayTheDecoText
|
||||
@@ -843,9 +843,9 @@ DecoAction_AskWhichSide:
|
||||
call CopyMenuData
|
||||
jr c, .nope
|
||||
ld a, [wMenuCursorY]
|
||||
cp 3
|
||||
cp 3 ; cancel
|
||||
jr z, .nope
|
||||
ld [wBuffer2], a
|
||||
ld [wSelectedDecorationSide], a
|
||||
call QueryWhichSide
|
||||
ld a, [hl]
|
||||
ld [wSelectedDecoration], a
|
||||
@@ -861,9 +861,10 @@ DecoAction_AskWhichSide:
|
||||
QueryWhichSide:
|
||||
ld hl, wDecoRightOrnament
|
||||
ld de, wDecoLeftOrnament
|
||||
ld a, [wBuffer2]
|
||||
cp 1
|
||||
ld a, [wSelectedDecorationSide]
|
||||
cp 1 ; right side
|
||||
ret z
|
||||
; left side, swap hl and de
|
||||
push hl
|
||||
ld h, d
|
||||
ld l, e
|
||||
|
Reference in New Issue
Block a user