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

@ -17,6 +17,10 @@ void GUI::DrawConfigurationWindow() {
ImGui::Checkbox("No sky", &GUI::NoSky::Enabled); ImGui::Checkbox("No sky", &GUI::NoSky::Enabled);
ImGui::ColorEdit3("##No sky color", GUI::NoSky::Color); ImGui::ColorEdit3("##No sky color", GUI::NoSky::Color);
ImGui::Spacing(); ImGui::Spacing();
ImGui::Checkbox("ASUS walls", &GUI::ASUS::Enabled);
ImGui::ColorEdit4("##ASUS walls color", GUI::ASUS::Color, true);
ImGui::Spacing();
ImGui::PopItemWidth(); ImGui::PopItemWidth();
ImGui::End(); ImGui::End();

View File

@ -7,6 +7,9 @@ bool GUI::BunnyHop::Enabled = true;
bool GUI::NoSky::Enabled = true; bool GUI::NoSky::Enabled = true;
float GUI::NoSky::Color[3] = {0, 0, 0.275}; 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() { void GUI::Render() {
// Draw various global components. // Draw various global components.
GUI::DrawFramerateCounter(); GUI::DrawFramerateCounter();

View File

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

View File

@ -21,6 +21,17 @@ void Hooks::FrameStageNotify(IBaseClientDLL* thisptr, ClientFrameStage_t stage)
continue; 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);
}
}
} }
} }