Skip to content

Commit

Permalink
Buy individual oxen and store it that way rather than yokes of oxen
Browse files Browse the repository at this point in the history
  • Loading branch information
samcan committed Jul 5, 2020
1 parent 019929c commit 5a6fbfa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions src/engine_logic_functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,10 @@ EndStoreGameState:
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
LDA storeoxen
CLC
ADC yokeoxen
STA yokeoxen
ADC oxen
STA oxen

; multiply food by 100
; (see http://wiki.nesdev.com/w/index.php/Multiplication_by_a_constant_integer)
Expand Down Expand Up @@ -1728,7 +1726,10 @@ EngineLogicTraveling:
@UpdateMileageEachDay:
;; increase mi traveled
; calc mi traveled
MultiplyPercentageDistance basemileage, yokeoxen, tempcalcb
LDA oxen
ROR A
STA temp
MultiplyPercentageDistance basemileage, temp, tempcalcb
LDA tempcalcb
STA tempcalca
MultiplyPercentageDistance tempcalca, pace, tempcalcb
Expand Down
8 changes: 4 additions & 4 deletions src/westward.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buttons1 .dsb 1 ; player 1 controller buttons pressed
miremaining .dsb 1 ; number of miles remaining (in curr. segment of map)
mitraveldy .dsb 1 ; number of miles traveled (curr. day)
mitraveled .dsb 2 ; number of miles traveled (total)
yokeoxen .dsb 1 ; number of yoke of oxen
oxen .dsb 1 ; number of oxen
pace .dsb 1 ; travel pace (steady, strenuous, grueling)
rations .dsb 1
occupation .dsb 1
Expand Down Expand Up @@ -499,9 +499,9 @@ SetInitialState:
LDA #MAX_MI_PER_DAY_A
STA basemileage

; set 3 yoke of oxen
LDA #$03
STA yokeoxen
; set 0 oxen (until you buy some)
LDA #$00
STA oxen

; set initial pace of STEADY
LDA #PACE_STEADY
Expand Down

0 comments on commit 5a6fbfa

Please sign in to comment.