peasant: get rid of hgr_partial_save

not needed anymore now that we always keep background in page1
This commit is contained in:
Vince Weaver 2021-12-28 17:56:28 -05:00
parent b9a3f2ac3a
commit 07af48da44
9 changed files with 49 additions and 35 deletions

View File

@ -128,7 +128,6 @@ qload.inc: generate_common QLOAD
./generate_common -a 0xb00 -s hgr_partial_restore qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_partial_restore qload.lst >> qload.inc
./generate_common -a 0xb00 -s clear_bottom qload.lst >> qload.inc ./generate_common -a 0xb00 -s clear_bottom qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_input qload.lst >> qload.inc ./generate_common -a 0xb00 -s hgr_input qload.lst >> qload.inc
./generate_common -a 0xb00 -s hgr_partial_save qload.lst >> qload.inc
./generate_common -a 0xb00 -s draw_box qload.lst >> qload.inc ./generate_common -a 0xb00 -s draw_box qload.lst >> qload.inc
./generate_common -a 0xb00 -s disp_put_string qload.lst >> qload.inc ./generate_common -a 0xb00 -s disp_put_string qload.lst >> qload.inc
./generate_common -a 0xb00 -s disp_one_line qload.lst >> qload.inc ./generate_common -a 0xb00 -s disp_one_line qload.lst >> qload.inc

View File

@ -38,6 +38,7 @@ peasant2 18302
18012 -- hook up more of archery 18012 -- hook up more of archery
18120 -- finish hooking up archery 18120 -- finish hooking up archery
17941 -- after most of text hooked up (more code was moved to qload) 17941 -- after most of text hooked up (more code was moved to qload)
17929 -- after redoing so background is always in PAGE1
partial save, can we fit in 4k? partial save, can we fit in 4k?
102 lines ; inventory was 115? 102 lines ; inventory was 115?

View File

@ -13,6 +13,7 @@ TODO:
General: General:
~~~~~~~~ ~~~~~~~~
+ wait for screen refresh on IIe/IIc/IIgs
+ make text every 9th row so descenders don't interfere? + make text every 9th row so descenders don't interfere?
+ background priority mask not working when at far top of screen + background priority mask not working when at far top of screen
+ fix issue where walking stops when you cross to screen w priority + fix issue where walking stops when you cross to screen w priority

View File

@ -4,6 +4,7 @@
; loads from $40 ; loads from $40
; save to $20 ; save to $20
; only save from row in P2 to P2+P4 ; only save from row in P2 to P2+P4
.if 0
hgr_partial_save: hgr_partial_save:
clc clc
@ -13,7 +14,6 @@ hgr_partial_save:
ldx BOX_Y2 ldx BOX_Y2
stx SAVED_Y2 stx SAVED_Y2
.if 0
partial_save_yloop: partial_save_yloop:
lda hposn_low,X lda hposn_low,X
@ -38,9 +38,9 @@ psx_smc2:
dex dex
cpx BOX_Y1 cpx BOX_Y1
bcs partial_save_yloop bcs partial_save_yloop
.endif
rts
rts
.endif
;======================= ;=======================

View File

@ -38,7 +38,14 @@ skip_box_save_smc:
lda #1 lda #1
beq skip_box_save beq skip_box_save
jsr hgr_partial_save lda BOX_Y1
sta SAVED_Y1
ldx BOX_Y2
stx SAVED_Y2
; jsr hgr_partial_save
skip_box_save: skip_box_save:
jsr draw_box jsr draw_box

View File

@ -15,10 +15,12 @@ show_inventory:
lda #20 lda #20
sta BOX_Y1 sta BOX_Y1
sta SAVED_Y1
lda #135 lda #135
sta BOX_Y2 sta BOX_Y2
sta SAVED_Y2
jsr hgr_partial_save ; jsr hgr_partial_save
;==================== ;====================

View File

@ -159,15 +159,18 @@ save_memset:
lda #0 lda #0
sta INVENTORY_Y sta INVENTORY_Y
;================= ;==========================
; save bg ; save bg range to restore
lda #20 lda #20
sta BOX_Y1 sta BOX_Y1
sta SAVED_Y1
lda #135 lda #135
sta BOX_Y2 sta BOX_Y2
sta SAVED_Y2
jsr hgr_partial_save ; jsr hgr_partial_save
;==================== ;====================

View File

@ -1150,6 +1150,7 @@ print_text_message:
lda #24 ; always 24 lda #24 ; always 24
sta BOX_Y1 sta BOX_Y1
sta SAVED_Y1
lda #253 ; always 253 lda #253 ; always 253
sta BOX_X2L sta BOX_X2L
@ -1167,8 +1168,9 @@ print_text_message:
adc #46 adc #46
sta BOX_Y2 sta BOX_Y2
sta SAVED_Y2
jsr hgr_partial_save ; jsr hgr_partial_save
jsr draw_box jsr draw_box

View File

@ -3,39 +3,38 @@ sector_write =$0c63
requested_sector =$0d17 requested_sector =$0d17
decompress_lzsa2_fast =$0de6 decompress_lzsa2_fast =$0de6
getsrc_smc =$0edc getsrc_smc =$0edc
hgr2 =$1844 hgr2 =$183f
hgr_make_tables =$15bd hgr_make_tables =$15b3
hgr_put_string =$0ee9 hgr_put_string =$0ee9
save_bg_1x28 =$1421 save_bg_1x28 =$1421
restore_bg_1x28 =$1442 restore_bg_1x28 =$1442
hgr_draw_sprite_1x28 =$13ba hgr_draw_sprite_1x28 =$13ba
input_buffer =$1595 input_buffer =$158b
hgr_text_box =$1633 hgr_text_box =$1629
hgr_text_box_nosave =$16c5 hgr_text_box_nosave =$16c0
hgr_partial_restore =$150b hgr_partial_restore =$1501
clear_bottom =$1819 clear_bottom =$1814
hgr_input =$153b hgr_input =$1531
hgr_partial_save =$1501
draw_box =$126b draw_box =$126b
disp_put_string =$1669 disp_put_string =$1664
disp_one_line =$167d disp_one_line =$1678
invert_smc1 =$0f61 invert_smc1 =$0f61
disp_put_string_cursor =$1679 disp_put_string_cursor =$1674
hgr_put_char_cursor =$0f15 hgr_put_char_cursor =$0f15
vgi_simple_rectangle =$12ec vgi_simple_rectangle =$12ec
peasant_text =$1f77 peasant_text =$1f73
save_menu =$18f7 save_menu =$18f2
load_menu =$18ec load_menu =$18e7
location_names_l =$1c23 location_names_l =$1c1f
location_names_h =$1c42 location_names_h =$1c3e
wait_until_keypress =$1e62 wait_until_keypress =$1e5e
random16 =$1e6b random16 =$1e67
score_points =$1ef0 score_points =$1eec
print_score =$1ea0 print_score =$1e9c
update_score =$1eab update_score =$1ea7
speaker_beep =$1f5e speaker_beep =$1f5a
speaker_duration =$1f75 speaker_duration =$1f71
speaker_frequency =$1f76 speaker_frequency =$1f72
hposn_high = $BA00 hposn_high = $BA00
hposn_low = $BB00 hposn_low = $BB00
driveoff = $A22 driveoff = $A22