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:
aixxe 2016-12-21 16:24:35 +00:00
parent 3c4ad3d7ae
commit f94aaad6c3
4 changed files with 23 additions and 0 deletions

View File

@ -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();
}

View File

@ -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();

View File

@ -15,6 +15,11 @@ namespace GUI {
extern float Color[3];
}
namespace ASUS {
extern bool Enabled;
extern float Color[4];
}
void DrawFramerateCounter();
void DrawConfigurationWindow();

View File

@ -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);
}
}
}
}