tfv: make help properly redraw sky when done

This commit is contained in:
Vince Weaver 2017-11-26 17:59:27 -05:00
parent fa8553aeb9
commit b72d12eea8
5 changed files with 20 additions and 3 deletions

View File

@ -1419,6 +1419,16 @@ int collision(int xx, int yy, int ground_color) {
return collide;
}
void clear_top_a(void) {
int i;
ram[COLOR]=a;
for(i=0;i<40;i+=2) {
hlin_double(ram[DRAW_PAGE],0,40,i);
}
}
void clear_top(int page) {
int i;

View File

@ -32,6 +32,7 @@ void soft_switch(unsigned short address);
int soft_switch_read(unsigned short address);
int vlin(int y1, int y2, int at);
int collision(int xx, int yy, int ground_color);
void clear_top_a(void);
void clear_top(int page);
void clear_bottom(int page);
void vtab(int ypos);

View File

@ -972,6 +972,7 @@ int flying(void) {
cycles.flying+=5;
if (ch=='h') {
print_help();
ram[DRAW_SKY]=2;
}
cycles.flying+=5;
/* Ending */

View File

@ -29,8 +29,10 @@ void game_over(void) {
}
void print_help(void) {
text();
home();
a=0xa0;
clear_top_a();
soft_switch(TXTSET);
// htab(1);
// vtab(1);
@ -69,7 +71,7 @@ void print_help(void) {
repeat_until_keypressed();
gr();
soft_switch(TXTCLR);
}
void show_map(void) {

View File

@ -268,6 +268,9 @@ check_help:
jsr print_help
lda #2
sta DRAW_SKY
check_done:
;================