|
@@ -1597,13 +1597,9 @@ const SettingDesc *GetPatchFromName(cons
|
|
|
}
|
|
|
|
|
|
/* Those 2 functions need to be here, else we have to make some stuff non-static
|
|
|
* and besides, it is also better to keep stuff like this at the same place
|
|
|
* XXX - Perhaps back to console[_cmds].c? They are console functions after all */
|
|
|
extern bool GetArgumentInteger(uint32 *value, const char *arg);
|
|
|
|
|
|
void IConsoleSetPatchSetting(const char *name, const char *value)
|
|
|
* and besides, it is also better to keep stuff like this at the same place */
|
|
|
void IConsoleSetPatchSetting(const char *name, int32 value)
|
|
|
{
|
|
|
int32 val;
|
|
|
uint index;
|
|
|
const SettingDesc *sd = GetPatchFromName(name, &index);
|
|
|
const Patches *patches_ptr;
|
|
@@ -1614,13 +1610,11 @@ void IConsoleSetPatchSetting(const char
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!GetArgumentInteger(&val, value)) return;
|
|
|
|
|
|
patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches;
|
|
|
ptr = ini_get_variable(&sd->save, patches_ptr);
|
|
|
|
|
|
SetPatchValue(index, patches_ptr, val);
|
|
|
if (sd->desc.proc != NULL) sd->desc.proc(val);
|
|
|
SetPatchValue(index, patches_ptr, value);
|
|
|
if (sd->desc.proc != NULL) sd->desc.proc(value);
|
|
|
}
|
|
|
|
|
|
void IConsoleGetPatchSetting(const char *name)
|