diff --git a/src/assets/bg_view_supply_screen.bin b/src/assets/bg_view_supply_screen.bin index 05493a2..cedd11c 100644 Binary files a/src/assets/bg_view_supply_screen.bin and b/src/assets/bg_view_supply_screen.bin differ diff --git a/src/display_new_screen_functions.asm b/src/display_new_screen_functions.asm index 65f93bd..19031ea 100644 --- a/src/display_new_screen_functions.asm +++ b/src/display_new_screen_functions.asm @@ -1036,7 +1036,68 @@ DisplayViewSupplyScreen: LoadRLEScreen bg_view_supply_screen, $00 - ; load numbers here into screen + ; TODO I want to load the numbers into the background + ; rather than drawing sprites. However, for ease right + ; now, I'm going to do it as sprites. + + ; display cash + LDA cash + STA bcdNum + LDA cash+1 + STA bcdNum+1 + JSR SixteenBitHexToDec + + LDA #$04 + STA temp + DisplayNumberThousands temp, bcdResult+3, bcdResult+2, bcdResult+1, bcdResult, #VIEW_CASH_X, #VIEW_CASH_Y, %00000001 + + ; display oxen + LDA oxen + STA htd_in + JSR EightBitHexToDec + LDA #$14 + STA temp + DisplayNumberHundreds temp, htd_out+1, htd_out, #VIEW_OXEN_X, #VIEW_OXEN_Y, %00000001 + + ; display food + LDA food + STA bcdNum + LDA food+1 + STA bcdNum+1 + JSR SixteenBitHexToDec + + LDA #$20 + STA temp + DisplayNumberThousands temp, bcdResult+3, bcdResult+2, bcdResult+1, bcdResult, #VIEW_FOOD_X, #VIEW_FOOD_Y, %00000001 + + ; display clothes + LDA clothes + STA htd_in + JSR EightBitHexToDec + LDA #$30 + STA temp + DisplayNumberHundreds temp, htd_out+1, htd_out, #VIEW_CLOTHES_X, #VIEW_CLOTHES_Y, %00000001 + + ; display bullets + LDA bullets + STA bcdNum + LDA bullets+1 + STA bcdNum+1 + JSR SixteenBitHexToDec + + LDA #$3C + STA temp + DisplayNumberThousands temp, bcdResult+3, bcdResult+2, bcdResult+1, bcdResult, #VIEW_BULLETS_X, #VIEW_BULLETS_Y, %00000001 + + ; display spare parts + LDA spareparts + STA htd_in + JSR EightBitHexToDec + LDA #$4C + STA temp + DisplayNumberHundreds temp, htd_out+1, htd_out, #VIEW_SPAREPARTS_X, #VIEW_SPAREPARTS_Y, %00000001 + + JMP FinishLoadNewScreen DisplayTravelingScreen: diff --git a/src/westward.asm b/src/westward.asm index 63dd19b..f52d2e6 100644 --- a/src/westward.asm +++ b/src/westward.asm @@ -246,6 +246,20 @@ BULLETS_MAX = 100 SPAREPARTS_INC = $01 SPAREPARTS_MAX = 99 +; view supply screen +VIEW_CASH_X = 208 +VIEW_CASH_Y = 40 +VIEW_OXEN_X = 216 +VIEW_OXEN_Y = 64 +VIEW_FOOD_X = 208 +VIEW_FOOD_Y = 88 +VIEW_CLOTHES_X = 216 +VIEW_CLOTHES_Y = 112 +VIEW_BULLETS_X = 208 +VIEW_BULLETS_Y = 136 +VIEW_SPAREPARTS_X = 216 +VIEW_SPAREPARTS_Y = 160 + ; start-month screen MONTH_CURSOR_SPR = $3F MONTH_X = $70