tfv: implement help screen

This commit is contained in:
Vince Weaver 2017-11-18 15:17:28 -05:00
parent 294d0da64c
commit 36695657c0
6 changed files with 109 additions and 12 deletions

View File

@ -32,15 +32,38 @@ void print_help(void) {
text();
home();
htab(1);
vtab(1);
move_cursor();
// htab(1);
// vtab(1);
// move_cursor();
print("ARROW KEYS AND WASD MOVE\n");
print("SPACE BAR ACTION\n");
print("I INVENTORY\n");
print("M MAP\n");
print("Q QUITS\n");
/*
***************************************
* HELP *
* *
* ARROWS - MOVE *
* W/A/S/D - MOVE *
* Z/X - SPEED UP / SLOW DOWN *
* SPACE - STOP *
* RETURN - LAND / ENTER / ACTION *
* I - INVENTORY *
* M - MAP *
* ESC - QUIT *
* *
***************************************
*/
ram[CV]=1;
ram[CH]=18;
move_and_print("HELP");
ram[CV]=3;
ram[CH]=4; move_and_print("ARROWS - MOVE");
ram[CV]++; move_and_print("W/A/S/D - MOVE");
ram[CV]++; move_and_print("Z/X - SPEED UP / SLOW DOWN");
ram[CV]++; move_and_print("SPACE - STOP");
ram[CV]++; move_and_print("RETURN - LAND / ENTER / ACTION");
ram[CV]++; move_and_print("I - INVENTORY");
ram[CV]++; move_and_print("M - MAP");
ram[CV]++; move_and_print("ESC - QUIT");
page_flip();

View File

@ -1,8 +1,7 @@
short term:
print_both_pages, print must land on grass message
finish drawing bottom ocean boundary
draw scatter/trees
put screenshot of being on giant bird
map
help message

View File

@ -294,6 +294,8 @@ check_help:
; HELP
;=====
jsr print_help
check_done:
;================

View File

@ -1,3 +1,55 @@
game_over:
rts
print_help:
lda #$a0
jsr clear_top_a
bit SET_TEXT
lda #1
sta CV
lda #18
sta CH
lda #>(help1)
sta OUTH
lda #<(help1)
sta OUTL
jsr move_and_print
jsr point_to_end_string
lda #3
sta CV
lda #4
sta CH
help_loop:
jsr move_and_print
jsr point_to_end_string
inc CV
lda #11
cmp CV
bne help_loop
jsr page_flip
jsr wait_until_keypressed
bit SET_GR ; set graphics
rts
help1: .asciiz "HELP"
help2: .asciiz "ARROWS - MOVE"
help3: .asciiz "W/A/S/D - MOVE"
help4: .asciiz "Z/X - SPEED UP / SLOW DOWN"
help5: .asciiz "SPACE - STOP"
help6: .asciiz "RETURN - LAND / ENTER / ACTION"
help7: .asciiz "I - INVENTORY"
help8: .asciiz "M - MAP"
help9: .asciiz "ESC - QUIT"

View File

@ -470,6 +470,22 @@ print_string_loop:
done_print_string:
rts
;====================
; point_to_end_string
;====================
point_to_end_string:
iny
tya
clc
adc OUTL
sta OUTL
lda #0
adc OUTH
sta OUTH
rts
;================================
; print_both_pages
;================================
@ -659,12 +675,17 @@ hlin_single_bottom_loop:
rts
;=============================
; clear_top
;=============================
clear_top:
lda #$00
;=============================
; clear_top_a
;=============================
clear_top_a:
sta COLOR
; VLIN Y, V2 AT A

View File

@ -142,7 +142,7 @@ worldmap_handle_help:
cmp #('H')
bne worldmap_handle_battle
; jsr print_help
jsr print_help
worldmap_handle_battle:
cmp #('B')