Skip to content

Commit

Permalink
Update cash to remaining amount of cash after visiting store
Browse files Browse the repository at this point in the history
  • Loading branch information
samcan committed Jul 4, 2020
1 parent e5291a7 commit 86fd779
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/engine_logic_functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,11 @@ DoneUpdatingStore:
SBC storepartpr+1
STA bcdNum+1

LDA bcdNum
STA cashremain
LDA bcdNum+1
STA cashremain+1

JSR SixteenBitHexToDec
LDA #$54
STA temp
Expand All @@ -806,6 +811,12 @@ DoneUpdatingStore:
EndStoreGameState:
; user is exiting store state, move remaining cash to cash, and all items to
; inventory

LDA cashremain
STA cash
LDA cashremain+1
STA cash+1

LDA storeoxen ; this is individual oxen, and I need yokes (I'll probably
; revise later to store individ. oxen)
ROR A
Expand Down
1 change: 1 addition & 0 deletions src/westward.asm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ weather .dsb 1 ; current weather status
food .dsb 2
clothes .dsb 1
cash .dsb 2
cashremain .dsb 2
bullets .dsb 2 ; individual number of bullets (100/box)
spareparts .dsb 1

Expand Down

0 comments on commit 86fd779

Please sign in to comment.