Codechange: use separate pre and post callbacks for int settings

This commit is contained in:
rubidium42
2021-05-24 11:47:37 +02:00
committed by rubidium42
parent e2f5d9e561
commit 08308d808c
16 changed files with 272 additions and 416 deletions

View File

@@ -282,15 +282,13 @@ void GRFParameterInfo::Finalize()
/**
* Update the palettes of the graphics from the config file.
* Called when changing the default palette in advanced settings.
* @param p1 Unused.
* @return Always true.
* @param new_value Unused.
*/
bool UpdateNewGRFConfigPalette(int32 p1)
void UpdateNewGRFConfigPalette(int32 new_value)
{
for (GRFConfig *c = _grfconfig_newgame; c != nullptr; c = c->next) c->SetSuitablePalette();
for (GRFConfig *c = _grfconfig_static; c != nullptr; c = c->next) c->SetSuitablePalette();
for (GRFConfig *c = _all_grfs; c != nullptr; c = c->next) c->SetSuitablePalette();
return true;
}
/**