mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-19 05:26:13 +00:00
Allow configuration of bloom settings from config files in snowballs
This commit is contained in:
parent
dfb302dafb
commit
5cd89b050e
1 changed files with 16 additions and 0 deletions
|
@ -179,6 +179,8 @@ void releaseIngame();
|
|||
void releaseOnline();
|
||||
void releaseOffline();
|
||||
void cbGraphicsDriver(CConfigFile::CVar &var);
|
||||
void cbSquareBloom(CConfigFile::CVar &var);
|
||||
void cbDensityBloom(CConfigFile::CVar &var);
|
||||
|
||||
//
|
||||
// Functions
|
||||
|
@ -362,6 +364,8 @@ void initIngame()
|
|||
CBloomEffect::instance().setDriver(Driver);
|
||||
CBloomEffect::instance().setScene(Scene);
|
||||
CBloomEffect::instance().init(ConfigFile->getVar("OpenGL").asInt() == 1);
|
||||
CConfiguration::setAndCallback("SquareBloom", cbSquareBloom);
|
||||
CConfiguration::setAndCallback("DensityBloom", cbDensityBloom);
|
||||
|
||||
// Init the landscape using the previously created UScene
|
||||
displayLoadingState("Initialize Landscape");
|
||||
|
@ -562,6 +566,8 @@ void releaseIngame()
|
|||
MouseListener = NULL;
|
||||
|
||||
// release bloom effect
|
||||
CConfiguration::dropCallback("SquareBloom");
|
||||
CConfiguration::dropCallback("DensityBloom");
|
||||
CBloomEffect::instance().releaseInstance();
|
||||
|
||||
Driver->deleteScene(Scene);
|
||||
|
@ -884,6 +890,16 @@ void cbGraphicsDriver(CConfigFile::CVar &var)
|
|||
NextGameState = GameStateReset;
|
||||
}
|
||||
|
||||
void cbSquareBloom(CConfigFile::CVar &var)
|
||||
{
|
||||
CBloomEffect::instance().setSquareBloom(var.asBool());
|
||||
}
|
||||
|
||||
void cbDensityBloom(CConfigFile::CVar &var)
|
||||
{
|
||||
CBloomEffect::instance().setDensityBloom((uint8)(var.asInt() & 0xFF));
|
||||
}
|
||||
|
||||
//
|
||||
// Loading state procedure
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue