make map behavior all the same
This commit is contained in:
@@ -1178,8 +1178,7 @@ bool handle_action(const sf::Event& event, cFramerateLimiter& fps_limiter) {
|
||||
break;
|
||||
|
||||
case TOOLBAR_SCROLL: case TOOLBAR_MAP:
|
||||
if(overall_mode == MODE_OUTDOORS || overall_mode == MODE_TOWN)
|
||||
display_map();
|
||||
display_map();
|
||||
break;
|
||||
|
||||
case TOOLBAR_BAG: case TOOLBAR_HAND:
|
||||
@@ -2077,8 +2076,7 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
show_dialog_action("help-debug");
|
||||
break;
|
||||
case 'a': // Show automap
|
||||
if(overall_mode == MODE_TOWN || overall_mode == MODE_OUTDOORS)
|
||||
display_map();
|
||||
display_map();
|
||||
break;
|
||||
|
||||
case 'u': // Use space
|
||||
@@ -3310,15 +3308,4 @@ void handle_rename_pc() {
|
||||
pick_pc_name(choice,nullptr);
|
||||
put_pc_screen();
|
||||
put_item_screen(stat_window);
|
||||
}
|
||||
|
||||
void handle_menu_automap() {
|
||||
if(recording){
|
||||
record_action("handle_menu_automap", "");
|
||||
}
|
||||
if(!prime_time()) {
|
||||
ASB("Finish what you're doing first.");
|
||||
print_buf();
|
||||
} else display_map(false);
|
||||
set_cursor(sword_curs);
|
||||
}
|
@@ -58,6 +58,5 @@ void handle_give_item(short item_hit, bool& did_something, bool& need_redraw);
|
||||
void show_dialog_action(std::string xml_file);
|
||||
void handle_new_pc_graphic();
|
||||
void handle_rename_pc();
|
||||
void handle_menu_automap();
|
||||
|
||||
#endif
|
||||
|
@@ -385,8 +385,8 @@ static void replay_next_action() {
|
||||
tip_of_day();
|
||||
}else if(t == "showWelcome"){
|
||||
showWelcome();
|
||||
}else if(t == "handle_menu_automap"){
|
||||
handle_menu_automap();
|
||||
}else if(t == "display_map"){
|
||||
display_map();
|
||||
}else if(t == "handle_help_toc"){
|
||||
handle_help_toc();
|
||||
}else if(t == "menu_give_help"){
|
||||
@@ -824,7 +824,7 @@ void handle_menu_choice(eMenu item_hit) {
|
||||
queue_fake_event(dummyEvent);
|
||||
break;
|
||||
case eMenu::ACTIONS_AUTOMAP:
|
||||
handle_menu_automap();
|
||||
display_map();
|
||||
break;
|
||||
case eMenu::HELP_TOC:
|
||||
handle_help_toc();
|
||||
|
@@ -41,6 +41,7 @@ extern sf::RenderWindow mainPtr;
|
||||
extern short store_current_pc,current_ground;
|
||||
extern eGameMode store_pre_shop_mode,store_pre_talk_mode;
|
||||
extern std::queue<pending_special_type> special_queue;
|
||||
extern bool prime_time();
|
||||
|
||||
extern bool map_visible;
|
||||
extern sf::RenderWindow mini_map;
|
||||
@@ -1542,11 +1543,17 @@ bool is_door(location destination) {
|
||||
}
|
||||
|
||||
|
||||
void display_map(bool record) {
|
||||
if(record && recording){
|
||||
void display_map() {
|
||||
if(recording){
|
||||
record_action("display_map", "");
|
||||
}
|
||||
|
||||
if(!prime_time()) {
|
||||
ASB("Finish what you're doing first.");
|
||||
print_buf();
|
||||
return;
|
||||
}
|
||||
|
||||
// Show the automap if it's not already visible
|
||||
if(map_visible) return;
|
||||
give_help(62,0);
|
||||
|
@@ -29,6 +29,6 @@ bool does_location_have_special(cOutdoors& sector, location loc, eTerSpec type);
|
||||
void clear_map();
|
||||
void draw_map(bool need_refresh);
|
||||
bool is_door(location destination);
|
||||
void display_map(bool record = true);
|
||||
void display_map();
|
||||
void check_done();
|
||||
bool quadrant_legal(short i, short j) ;
|
||||
|
Reference in New Issue
Block a user