Add ASUS walls via AlphaModulate and ColorModulate.
* Again, should really call this somewhere else. Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
parent
3c4ad3d7ae
commit
f94aaad6c3
|
@ -18,6 +18,10 @@ void GUI::DrawConfigurationWindow() {
|
|||
ImGui::ColorEdit3("##No sky color", GUI::NoSky::Color);
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::Checkbox("ASUS walls", &GUI::ASUS::Enabled);
|
||||
ImGui::ColorEdit4("##ASUS walls color", GUI::ASUS::Color, true);
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::End();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@ bool GUI::BunnyHop::Enabled = true;
|
|||
bool GUI::NoSky::Enabled = true;
|
||||
float GUI::NoSky::Color[3] = {0, 0, 0.275};
|
||||
|
||||
bool GUI::ASUS::Enabled = true;
|
||||
float GUI::ASUS::Color[4] = {1, 1, 1, 0.75};
|
||||
|
||||
void GUI::Render() {
|
||||
// Draw various global components.
|
||||
GUI::DrawFramerateCounter();
|
||||
|
|
|
@ -15,6 +15,11 @@ namespace GUI {
|
|||
extern float Color[3];
|
||||
}
|
||||
|
||||
namespace ASUS {
|
||||
extern bool Enabled;
|
||||
extern float Color[4];
|
||||
}
|
||||
|
||||
void DrawFramerateCounter();
|
||||
void DrawConfigurationWindow();
|
||||
|
||||
|
|
|
@ -21,6 +21,17 @@ void Hooks::FrameStageNotify(IBaseClientDLL* thisptr, ClientFrameStage_t stage)
|
|||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(material->GetTextureGroupName(), TEXTURE_GROUP_WORLD)) {
|
||||
// ASUS walls.
|
||||
if (GUI::ASUS::Enabled) {
|
||||
material->ColorModulate(GUI::ASUS::Color[0], GUI::ASUS::Color[1], GUI::ASUS::Color[2]);
|
||||
material->AlphaModulate(GUI::ASUS::Color[3]);
|
||||
} else {
|
||||
material->ColorModulate(1, 1, 1);
|
||||
material->AlphaModulate(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue