Typo fix.

This commit is contained in:
Steve 2019-10-23 18:43:19 +01:00
parent f7d1d3dadb
commit ca36f8163b
2 changed files with 22 additions and 21 deletions

View File

@ -1,6 +1,7 @@
Changelog Changelog
1.5.1 1.5.1
* Updated Catalan translation (thanks, oriolhub) * Updated Catalan translation (thanks, oriolhub)
* Misc bug and compile fixes. * Misc bug and compile fixes.

View File

@ -61,16 +61,16 @@ void initSDL(int argc, char *argv[])
/* done in src/plat/ */ /* done in src/plat/ */
createSaveFolder(); createSaveFolder();
loadConfig(argc, argv); loadConfig(argc, argv);
rendererFlags = SDL_RENDERER_ACCELERATED; rendererFlags = SDL_RENDERER_ACCELERATED;
if (app.vSync) if (app.vSync)
{ {
rendererFlags |= SDL_RENDERER_PRESENTVSYNC; rendererFlags |= SDL_RENDERER_PRESENTVSYNC;
} }
windowFlags = 0; windowFlags = 0;
if (app.fullscreen) if (app.fullscreen)
@ -148,9 +148,9 @@ void initGameSystem(void)
}; };
initAtlas(); initAtlas();
initInput(); initInput();
numInitFuns = sizeof(initFuncs) / sizeof(void*); numInitFuns = sizeof(initFuncs) / sizeof(void*);
for (i = 0 ; i < numInitFuns ; i++) for (i = 0 ; i < numInitFuns ; i++)
@ -162,7 +162,7 @@ void initGameSystem(void)
} }
/* /*
* Just in case the initial loading takes a while on the target machine. The rest of the loading a pretty quick by comparison. * Just in case the initial loading takes a while on the target machine. The rest of the loading is pretty quick by comparison.
*/ */
static void showLoadingStep(float step, float maxSteps) static void showLoadingStep(float step, float maxSteps)
{ {
@ -195,10 +195,10 @@ static void showLoadingStep(float step, float maxSteps)
static void loadConfig(int argc, char *argv[]) static void loadConfig(int argc, char *argv[])
{ {
char *configFilename; char *configFilename;
/* load default config first */ /* load default config first */
loadConfigFile("data/app/"CONFIG_FILENAME); loadConfigFile("data/app/"CONFIG_FILENAME);
/* load saved config */ /* load saved config */
configFilename = getSaveFilePath(CONFIG_FILENAME); configFilename = getSaveFilePath(CONFIG_FILENAME);
@ -206,13 +206,13 @@ static void loadConfig(int argc, char *argv[])
{ {
loadConfigFile(configFilename); loadConfigFile(configFilename);
} }
handleCommandLineConfig(argc, argv); handleCommandLineConfig(argc, argv);
/* don't go higher than 8K or lower than 1280 x 720 */ /* don't go higher than 8K or lower than 1280 x 720 */
app.winWidth = MIN(MAX(app.winWidth, 1280), 7680); app.winWidth = MIN(MAX(app.winWidth, 1280), 7680);
app.winHeight = MIN(MAX(app.winHeight, 720), 4320); app.winHeight = MIN(MAX(app.winHeight, 720), 4320);
/* so that the player doesn't get confused if this is a new game */ /* so that the player doesn't get confused if this is a new game */
saveConfig(); saveConfig();
} }
@ -233,7 +233,7 @@ static void loadConfigFile(char *filename)
app.musicVolume = cJSON_GetObjectItem(root, "musicVolume")->valueint; app.musicVolume = cJSON_GetObjectItem(root, "musicVolume")->valueint;
app.soundVolume = cJSON_GetObjectItem(root, "soundVolume")->valueint; app.soundVolume = cJSON_GetObjectItem(root, "soundVolume")->valueint;
app.vSync = getJSONValue(root, "vSync", 1); app.vSync = getJSONValue(root, "vSync", 1);
controlsJSON = cJSON_GetObjectItem(root, "controls"); controlsJSON = cJSON_GetObjectItem(root, "controls");
if (controlsJSON) if (controlsJSON)
{ {
@ -257,7 +257,7 @@ static void loadConfigFile(char *filename)
node = node->next; node = node->next;
} }
} }
gameplayJSON = cJSON_GetObjectItem(root, "gameplay"); gameplayJSON = cJSON_GetObjectItem(root, "gameplay");
if (gameplayJSON) if (gameplayJSON)
{ {
@ -305,7 +305,7 @@ void saveConfig(void)
cJSON_AddItemToObject(controlsJSON, "keys", keysJSON); cJSON_AddItemToObject(controlsJSON, "keys", keysJSON);
cJSON_AddItemToObject(controlsJSON, "mouse", mouseJSON); cJSON_AddItemToObject(controlsJSON, "mouse", mouseJSON);
cJSON_AddItemToObject(root, "controls", controlsJSON); cJSON_AddItemToObject(root, "controls", controlsJSON);
gameplayJSON = cJSON_CreateObject(); gameplayJSON = cJSON_CreateObject();
cJSON_AddNumberToObject(gameplayJSON, "friendlyFire", app.gameplay.friendlyFire); cJSON_AddNumberToObject(gameplayJSON, "friendlyFire", app.gameplay.friendlyFire);
cJSON_AddNumberToObject(gameplayJSON, "autoSwitchPlayerTarget", app.gameplay.autoSwitchPlayerTarget); cJSON_AddNumberToObject(gameplayJSON, "autoSwitchPlayerTarget", app.gameplay.autoSwitchPlayerTarget);
@ -327,7 +327,7 @@ void saveConfig(void)
static void handleCommandLineConfig(int argc, char *argv[]) static void handleCommandLineConfig(int argc, char *argv[])
{ {
int i; int i;
for (i = 1 ; i < argc ; i++) for (i = 1 ; i < argc ; i++)
{ {
if (strcmp(argv[i], "-size") == 0) if (strcmp(argv[i], "-size") == 0)
@ -366,17 +366,17 @@ void cleanup(void)
destroyWidgets(); destroyWidgets();
destroyResources(); destroyResources();
destroyFighterDatabase(); destroyFighterDatabase();
destroyFighterStats(); destroyFighterStats();
destroyCredits(); destroyCredits();
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Done"); SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, "Done");
SDL_DestroyRenderer(app.renderer); SDL_DestroyRenderer(app.renderer);
SDL_DestroyWindow(app.window); SDL_DestroyWindow(app.window);
TTF_Quit(); TTF_Quit();