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