tfv: can now re-enter spaceship

This commit is contained in:
Vince Weaver 2018-06-24 01:01:44 -04:00
parent ea2870e44d
commit 50aa0977cc
4 changed files with 20 additions and 5 deletions

View File

@ -69,10 +69,13 @@ title_loop:
/* Flying */
home();
back_to_flying:
flying();
/* World Map */
world_map();
result=world_map();
if (result!=0) goto back_to_flying;
/* Game Over, Man */
game_over();

View File

@ -14,3 +14,4 @@ extern unsigned char jc_rle[];
extern unsigned char jc_hallway_rle[];
extern unsigned char math_office_rle[];
extern unsigned char video_hr_rle[];
extern unsigned char mirror_lake_rle[];

View File

@ -93,8 +93,6 @@ struct map_info_type map_info[33] = {
},
[LANDING_SITE]={ // 5: LANDING_SITE
.name="Landing Site",
.num_locations=1,
// .locations
.ground_color=(COLOR_LIGHTGREEN|(COLOR_LIGHTGREEN<<4)),
.n_exit=ARCTIC_WOODS,
.s_exit=GRASSLAND,
@ -105,6 +103,13 @@ struct map_info_type map_info[33] = {
.land_type=LAND_GRASSLAND,
.entry_type=ENTRY_NORMAL, .entry_x=0, .entry_y=0,
.background_image=landing_rle,
.num_locations=1,
.location[0] = {
.name="Spaceship",
.x0 = 0, .x1 = 28,
.y0 = 0, .y1 = 29,
.type = LOCATION_SPACESHIP,
},
},
[NORTH_MOUNTAIN]={ // 6: NORTH_MOUNTAIN
.name="North Mountain",

View File

@ -132,7 +132,7 @@ int world_map(void) {
int direction=1;
int i,limit;
int newx=0,newy=0,moved;
int special_destination=NOEXIT;
int special_destination=NOEXIT,destination_type=LOCATION_PLACE;
/************************************************/
/* Landed */
@ -192,7 +192,12 @@ int world_map(void) {
}
if (ch==13) {
if (special_destination!=NOEXIT) {
if (destination_type==LOCATION_CONVERSATION) {
}
else if (destination_type==LOCATION_SPACESHIP) {
return LOCATION_SPACESHIP;
}
else if (special_destination!=NOEXIT) {
map_info[map_location].saved_x=tfv_x;
map_info[map_location].saved_y=tfv_y;
@ -515,6 +520,7 @@ done_entry:
move_and_print(map_info[map_location].location[i].name);
special_destination=map_info[map_location].location[i].destination;
destination_type=map_info[map_location].location[i].type;
break;
}