mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
fix edit command line function
This commit is contained in:
@@ -118,7 +118,7 @@ static int cmdline_for_edit(const char **argv, int argc)
|
||||
{
|
||||
gOpenRCT2StartupAction = STARTUP_ACTION_EDIT;
|
||||
if (argc >= 1)
|
||||
strcpy(gOpenRCT2StartupActionPath, argv[1]);
|
||||
strcpy(gOpenRCT2StartupActionPath, argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -164,29 +164,28 @@ bool openrct2_initialise()
|
||||
void openrct2_launch()
|
||||
{
|
||||
if (openrct2_initialise()) {
|
||||
switch (gOpenRCT2StartupAction) {
|
||||
case STARTUP_ACTION_INTRO:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 8;
|
||||
break;
|
||||
case STARTUP_ACTION_TITLE:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO;
|
||||
break;
|
||||
case STARTUP_ACTION_OPEN:
|
||||
assert(gOpenRCT2StartupActionPath != NULL);
|
||||
rct2_open_file(gOpenRCT2StartupActionPath);
|
||||
switch (gOpenRCT2StartupAction) {
|
||||
case STARTUP_ACTION_INTRO:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 8;
|
||||
break;
|
||||
case STARTUP_ACTION_TITLE:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO;
|
||||
break;
|
||||
case STARTUP_ACTION_OPEN:
|
||||
assert(gOpenRCT2StartupActionPath != NULL);
|
||||
rct2_open_file(gOpenRCT2StartupActionPath);
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
break;
|
||||
case STARTUP_ACTION_EDIT:
|
||||
if (strlen(gOpenRCT2StartupActionPath) == 0) {
|
||||
editor_load();
|
||||
} else {
|
||||
editor_load_landscape(gOpenRCT2StartupActionPath);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_PLAYING;
|
||||
break;
|
||||
case STARTUP_ACTION_EDIT:
|
||||
if (strlen(gOpenRCT2StartupActionPath) == 0) {
|
||||
editor_load();
|
||||
} else {
|
||||
editor_load_landscape(gOpenRCT2StartupActionPath);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
openrct2_loop();
|
||||
}
|
||||
openrct2_dispose();
|
||||
|
||||
@@ -124,7 +124,6 @@ int rct2_init()
|
||||
title_load();
|
||||
|
||||
gfx_clear(RCT2_ADDRESS(RCT2_ADDRESS_SCREEN_DPI, rct_drawpixelinfo), 10);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8) = gConfigGeneral.play_intro ? 8 : 255;
|
||||
}
|
||||
|
||||
log_verbose("initialising game finished");
|
||||
|
||||
Reference in New Issue
Block a user