remove args and windows logic from all set_up_apple_events
This commit is contained in:
@@ -27,8 +27,8 @@ extern bool change_made, ae_loading;
|
||||
//-(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*) sender;
|
||||
@end
|
||||
|
||||
void set_up_apple_events(int argc, char* argv[]); // Suppress "no prototype" warning
|
||||
void set_up_apple_events(int, char*[]) {
|
||||
void set_up_apple_events(); // Suppress "no prototype" warning
|
||||
void set_up_apple_events() {
|
||||
AppleEventHandler* aeHandler = [[AppleEventHandler alloc] init];
|
||||
[[NSApplication sharedApplication] setDelegate: aeHandler];
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ cScenario scenario;
|
||||
rectangle right_sbar_rect;
|
||||
extern rectangle terrain_buttons_rect;
|
||||
|
||||
extern void set_up_apple_events(int argc, char* argv[]);
|
||||
extern void set_up_apple_events();
|
||||
|
||||
// TODO: these should be members of some global entity instead of being here
|
||||
std::unordered_map<std::string, std::shared_ptr <iEventListener>> event_listeners;
|
||||
@@ -232,7 +232,7 @@ void init_scened(int argc, char* argv[]) {
|
||||
|
||||
cDialog::defaultBackground = cDialog::BG_LIGHT;
|
||||
cDialog::doAnimations = true;
|
||||
set_up_apple_events(argc, argv);
|
||||
set_up_apple_events();
|
||||
init_fileio();
|
||||
}
|
||||
|
||||
|
@@ -31,5 +31,5 @@ void update_edit_menu() {
|
||||
menu_ptr->update_edit_menu(undo_list);
|
||||
}
|
||||
|
||||
void set_up_apple_events(int argc, char* argv[]) {
|
||||
void set_up_apple_events() {
|
||||
}
|
||||
|
@@ -234,22 +234,5 @@ LRESULT CALLBACK menuProc(HWND handle, UINT message, WPARAM wParam, LPARAM lPara
|
||||
return CallWindowProc(reinterpret_cast<WNDPROC>(mainProc), handle, message, wParam, lParam);
|
||||
}
|
||||
|
||||
#include "fileio.hpp"
|
||||
#include "scen.actions.hpp"
|
||||
#include "scen.townout.hpp"
|
||||
|
||||
extern location cur_out;
|
||||
extern cOutdoors* current_terrain;
|
||||
extern bool change_made, ae_loading;
|
||||
void set_up_apple_events(int argc, char* argv[]) {
|
||||
if(argc > 1) {
|
||||
if(load_scenario(argv[1], scenario)) {
|
||||
set_current_town(scenario.last_town_edited);
|
||||
cur_out = scenario.last_out_edited;
|
||||
current_terrain = scenario.outdoors[cur_out.x][cur_out.y];
|
||||
change_made = false;
|
||||
ae_loading = true;
|
||||
set_up_main_screen();
|
||||
}
|
||||
}
|
||||
void set_up_apple_events() {
|
||||
}
|
||||
|
Reference in New Issue
Block a user