add play intro config setting

This commit is contained in:
IntelOrca 2014-05-04 19:59:24 +01:00
parent ff992e1fc0
commit c062992e78
3 changed files with 5 additions and 2 deletions

View File

@ -228,6 +228,7 @@ static void config_create_default(char *path)
fprintf(fp, "[general]\n");
fprintf(fp, "game_path = %s\n", gConfig.game_path);
fprintf(fp, "screenshot_format = PNG\n");
fprintf(fp, "play_intro = false\n");
fclose(fp);
}
@ -256,6 +257,8 @@ static void config_parse_settings(FILE *fp)
} else {
gConfig.screenshot_format = SCREENSHOT_FORMAT_BMP;
}
} else if (strcmp(setting, "play_intro") == 0) {
gConfig.play_intro = (strcmp(value, "true") == 0);
}
}
}

View File

@ -81,6 +81,7 @@ void config_save();
// New config format
typedef struct configuration {
uint8 play_intro;
uint8 screenshot_format;
char game_path[MAX_PATH];
} configuration_t;

View File

@ -142,8 +142,7 @@ void rct2_init()
title_load();
gfx_clear(RCT2_ADDRESS(RCT2_ADDRESS_SCREEN_DPI, rct_drawpixelinfo), 10);
// RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, int) = 8;
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, int) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_RUN_INTRO_TICK_PART, int) = gConfig.play_intro ? 8 : 0;
}
// rct2: 0x00683499