Skip to content

Commit

Permalink
Hi Boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
lcm7341 committed Aug 18, 2023
1 parent 41175f6 commit 012f2c8
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 118 deletions.
107 changes: 71 additions & 36 deletions src/GUI/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,8 @@ static int selected_playback = 0; // Index of "Both" option (auto selected)
static int selected_autoclicker_player = 2; // Index of "Both" option (auto selected)
static int selected_inverse_click = 0; // Index of "Both" option (auto selected)

static int selected_hitbox_color = 0;

std::map<std::string, std::shared_ptr<Convertible>> options = {
{"TASBot", std::make_shared<TASBot>()},
{"Mega Hack Replay JSON", std::make_shared<MHRJSON>()},
Expand Down Expand Up @@ -1798,6 +1800,75 @@ void GUI::tools() {
}
CHECK_KEYBIND("noEsc");

bool open_layout_modal = true;

if (ImGui::Button("Layout Mode Settings###layout_settings", ImVec2(ImGui::GetContentRegionMax().x * 0.5, 0))) {
ImGui::OpenPopup("Layout Settings###layoutsettings2");
}

if (ImGui::BeginPopupModal("Layout Settings###layoutsettings2", &open_layout_modal, ImGuiWindowFlags_AlwaysAutoResize)) {

ImGui::Checkbox("Layout Mode", &logic.hacks.layoutMode);
ImGui::ColorEdit3("Background Color", logic.hacks.backgroundColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Block Color", logic.hacks.blocksColor, ImGuiColorEditFlags_NoInputs);
ImGui::EndPopup();
}

ImGui::SameLine();

bool open_hitbox_modal = true;
if (ImGui::Button("Hitbox Settings###notboxsettings", ImVec2(ImGui::GetContentRegionAvail().x, 0))) {
ImGui::OpenPopup("Hitbox Settings###boxsettings");
}

if (ImGui::BeginPopupModal("Hitbox Settings###boxsettings", &open_hitbox_modal, ImGuiWindowFlags_AlwaysAutoResize)) {

ImGui::Checkbox("Show Hitboxes", &logic.hacks.showHitboxes); ImGui::SameLine();
ImGui::Checkbox("Show Modifiers", &logic.hacks.showDecorations);
ImGui::Checkbox("Hitbox Trail", &logic.hacks.hitboxTrail); ImGui::SameLine();
ImGui::Checkbox("Fill Hitboxes", &logic.hacks.fillHitboxes);
ImGui::PushItemWidth(200);
ImGui::InputFloat("Hitbox Thickness", &logic.hacks.hitboxThickness);
ImGui::InputFloat("Trail Length", &logic.hacks.hitboxTrailLength);

const char* colors[] = { "Solids", "Slopes", "Hazards", "Portals", "Pads", "Rings", "Collectibles", "Modifiers", "Rotated Hitbox", "Center Hitbox", "Player" };

if (ImGui::BeginCombo("##dropdown_hitbox_color", colors[selected_hitbox_color]))
{
for (int i = 0; i < IM_ARRAYSIZE(colors); i++)
{
const bool isSelected = (selected_hitbox_color == i);
if (ImGui::Selectable(colors[i], isSelected))
selected_hitbox_color = i;

if (isSelected) {
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
} ImGui::PopItemWidth();

ImGui::SameLine();

switch (selected_hitbox_color)
{
case 0: ImGui::ColorEdit4("###color1", logic.hacks.solidHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 1: ImGui::ColorEdit4("###color2", logic.hacks.slopeHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 2: ImGui::ColorEdit4("###color3", logic.hacks.hazardHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 3: ImGui::ColorEdit4("###color4", logic.hacks.portalHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 4: ImGui::ColorEdit4("###color5", logic.hacks.padHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 5: ImGui::ColorEdit4("###color6", logic.hacks.ringHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 6: ImGui::ColorEdit4("###color7", logic.hacks.collectibleHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 7: ImGui::ColorEdit4("###color8", logic.hacks.modifierHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 8: ImGui::ColorEdit4("###color9", logic.hacks.rotatedHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 9: ImGui::ColorEdit4("###color10", logic.hacks.centerHitboxColor, ImGuiColorEditFlags_NoInputs); break;
case 10: ImGui::ColorEdit4("###color11", logic.hacks.playerHitboxColor, ImGuiColorEditFlags_NoInputs); break;
default: break;
}

ImGui::EndPopup();
}

ImGui::Separator();

ImGui::Checkbox("Enable Autoclicker", &logic.autoclicker);
Expand Down Expand Up @@ -2555,42 +2626,6 @@ void GUI::main() {

ImGui::Text("Macro Size: %i", logic.get_inputs().size());

ImGui::Checkbox("Layout Mode", &logic.hacks.layoutMode); ImGui::SameLine();
ImGui::Checkbox("Show Hitboxes", &logic.hacks.showHitboxes);

bool open_hitbox_modal = true;
if (ImGui::Button("Hitbox Settings###notboxsettings")) {
ImGui::OpenPopup("Hitbox Settings###boxsettings");
}

if (ImGui::BeginPopupModal("Hitbox Settings###boxsettings", &open_hitbox_modal, ImGuiWindowFlags_AlwaysAutoResize)) {

ImGui::Checkbox("Show Trajectory", &logic.hacks.trajectory);
ImGui::InputInt("Trajectory Accuracy", &logic.hacks.trajectoryAccuracy);

ImGui::Checkbox("Show Hitboxes", &logic.hacks.showHitboxes);
ImGui::InputFloat("Hitbox Thickness", &logic.hacks.hitboxThickness);
ImGui::Checkbox("Show Modifiers", &logic.hacks.showDecorations);
ImGui::Checkbox("Hitbox Trail", &logic.hacks.hitboxTrail);
ImGui::InputFloat("Trail Length", &logic.hacks.hitboxTrailLength);
ImGui::InputInt("Hitbox Opacity", &logic.hacks.hitboxOpacity);
ImGui::InputInt("Hitbox Border Opacity", &logic.hacks.borderOpacity);

ImGui::Text("Color Settings");
ImGui::ColorEdit3("Solids", logic.hacks.solidHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Slopes", logic.hacks.slopeHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Hazards", logic.hacks.hazardHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Portals", logic.hacks.portalHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Pads", logic.hacks.padHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Rings", logic.hacks.ringHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Collectibles", logic.hacks.collectibleHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Modifiers", logic.hacks.modifierHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Rotated Hitbox", logic.hacks.rotatedHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Center Hitbox", logic.hacks.centerHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::ColorEdit3("Player", logic.hacks.playerHitboxColor, ImGuiColorEditFlags_NoInputs);
ImGui::EndPopup();
}

ImGui::PushItemFlag(ImGuiItemFlags_NoTabStop, true);
ImGui::SetNextItemWidth(150);
if (ImGui::DragFloat("###fps", &input_fps, 0.1, 1.f))
Expand Down
101 changes: 41 additions & 60 deletions src/Hack/hitboxnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ HitboxNode* HitboxNode::getInstance()

void HitboxNode::drawPolygonHitbox(std::vector<cocos2d::CCPoint> const& points, cocos2d::ccColor4B col)
{
col.a = hacks.borderOpacity;
auto color1 = ccc4FFromccc4B(col);
auto colorA = (ccc4(col.r, col.g, col.b, hacks.hitboxOpacity));
auto prev_a = col.a;
auto borderColor = ccc4FFromccc4B(col);
col.a = max(0, col.a - 150);
auto fillColor = (ccc4(col.r, col.g, col.b, Logic::get().hacks.fillHitboxes ? col.a : 0));

this->drawPolygon(const_cast<cocos2d::CCPoint*>(points.data()), points.size(), ccc4FFromccc4B(colorA),
hacks.hitboxThickness, color1);
this->drawPolygon(const_cast<cocos2d::CCPoint*>(points.data()), points.size(), ccc4FFromccc4B(fillColor),
hacks.hitboxThickness, borderColor);
}

void HitboxNode::drawRectangleHitbox(cocos2d::CCRect const& rect, cocos2d::ccColor4B col)
Expand Down Expand Up @@ -91,11 +92,11 @@ void HitboxNode::addToPlayer2Queue(CCRect const& rect)
void HitboxNode::drawForPlayer1(gd::PlayerObject* obj)
{
const ccColor4B playersolid = { (GLubyte)(Logic::get().hacks.playerHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.playerHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.playerHitboxColor[2] * 255.f) };
const ccColor4B playerrotated = { (GLubyte)(Logic::get().hacks.rotatedHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.rotatedHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.rotatedHitboxColor[2] * 255.f) };
const ccColor4B playercenter = { (GLubyte)(Logic::get().hacks.centerHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.centerHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.centerHitboxColor[2] * 255.f) };
(GLubyte)(Logic::get().hacks.playerHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.playerHitboxColor[3] * 255.f) };
const ccColor4B playerrotated = { (GLubyte)(hacks.rotatedHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.rotatedHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.rotatedHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.rotatedHitboxColor[3] * 255.f) };
const ccColor4B playercenter = { (GLubyte)(hacks.centerHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.centerHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.centerHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.centerHitboxColor[3] * 255.f) };
if (boo1.size() <= 0)
this->drawRectangleHitbox(obj->getObjectRect(), playersolid);
else
Expand All @@ -119,11 +120,11 @@ void HitboxNode::drawForPlayer1(gd::PlayerObject* obj)
void HitboxNode::drawForPlayer2(gd::PlayerObject* obj)
{
const ccColor4B playersolid = { (GLubyte)(Logic::get().hacks.playerHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.playerHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.playerHitboxColor[2] * 255.f) };
(GLubyte)(Logic::get().hacks.playerHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.playerHitboxColor[3] * 255.f) };
const ccColor4B playerrotated = { (GLubyte)(hacks.rotatedHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.rotatedHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.rotatedHitboxColor[2] * 255.f) };
(GLubyte)(Logic::get().hacks.rotatedHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.rotatedHitboxColor[3] * 255.f) };
const ccColor4B playercenter = { (GLubyte)(hacks.centerHitboxColor[0] * 255.f), (GLubyte)(Logic::get().hacks.centerHitboxColor[1] * 255.f),
(GLubyte)(Logic::get().hacks.centerHitboxColor[2] * 255.f) };
(GLubyte)(Logic::get().hacks.centerHitboxColor[2] * 255.f), (GLubyte)(Logic::get().hacks.centerHitboxColor[3] * 255.f) };
if (boo2.size() <= 0)
this->drawRectangleHitbox(obj->getObjectRect(), playersolid);
else
Expand Down Expand Up @@ -224,15 +225,17 @@ void HitboxNode::drawForObject(gd::GameObject* obj)
{
case gd::GameObjectType::kGameObjectTypeSolid:
color = { (GLubyte)(hacks.solidHitboxColor[0] * 255.f), (GLubyte)(hacks.solidHitboxColor[1] * 255.f),
(GLubyte)(hacks.solidHitboxColor[2] * 255.f) };
(GLubyte)(hacks.solidHitboxColor[2] * 255.f), (GLubyte)(hacks.solidHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeDecoration:
if (hacks.showDecorations)
color = ccc4(127, 127, 255, 255);
color = { (GLubyte)(hacks.modifierHitboxColor[0] * 255.f), (GLubyte)(hacks.modifierHitboxColor[1] * 255.f),
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f), (GLubyte)(hacks.modifierHitboxColor[3] * 255.f) };
switch (obj->m_nObjectID)
{
case 749:
color = ccc4(255, 127, 0, 255);
color = { (GLubyte)(hacks.modifierHitboxColor[0] * 255.f), (GLubyte)(hacks.modifierHitboxColor[1] * 255.f),
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f), (GLubyte)(hacks.modifierHitboxColor[3] * 255.f) };
break;
default:
if (!hacks.showDecorations)
Expand All @@ -255,61 +258,49 @@ void HitboxNode::drawForObject(gd::GameObject* obj)
case gd::GameObjectType::kGameObjectTypeRobotPortal:
case gd::GameObjectType::kGameObjectTypeSpiderPortal:
case gd::GameObjectType::kGameObjectTypeTeleportPortal:
color = { (GLubyte)(hacks.portalHitboxColor[0] * 255.f), (GLubyte)(hacks.portalHitboxColor[1] * 255.f),(GLubyte)(hacks.portalHitboxColor[2] * 255.f) };
color = { (GLubyte)(hacks.portalHitboxColor[0] * 255.f), (GLubyte)(hacks.portalHitboxColor[1] * 255.f),(GLubyte)(hacks.portalHitboxColor[2] * 255.f),(GLubyte)(hacks.portalHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeModifier:
switch (obj->m_nObjectID)
{
case 200:
case 201:
case 202:
case 203:
case 1334:
if (hacks.showDecorations) {
color = { (GLubyte)(hacks.modifierHitboxColor[0] * 255.f), (GLubyte)(hacks.modifierHitboxColor[1] * 255.f),
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f) };
break;
default:
if (!hacks.showDecorations)
return;
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f), (GLubyte)(hacks.modifierHitboxColor[3] * 255.f) };
}
break;
case gd::GameObjectType::kGameObjectTypeSlope:
color = { (GLubyte)(hacks.slopeHitboxColor[0] * 255.f), (GLubyte)(hacks.slopeHitboxColor[1] * 255.f),
(GLubyte)(hacks.slopeHitboxColor[2] * 255.f) };
(GLubyte)(hacks.slopeHitboxColor[2] * 255.f), (GLubyte)(hacks.slopeHitboxColor[3] * 255.f) };
this->drawPolygonHitbox(this->triangleForObject(obj), color);
return;
case gd::GameObjectType::kGameObjectTypeHazard:
color = { (GLubyte)(hacks.hazardHitboxColor[0] * 255.f), (GLubyte)(hacks.hazardHitboxColor[1] * 255.f),
(GLubyte)(hacks.hazardHitboxColor[2] * 255.f) };
(GLubyte)(hacks.hazardHitboxColor[2] * 255.f), (GLubyte)(hacks.hazardHitboxColor[3] * 255.f) };
break;

case gd::GameObjectType::kGameObjectTypeYellowJumpPad:
case gd::GameObjectType::kGameObjectTypePinkJumpPad:
case gd::GameObjectType::kGameObjectTypeGravityPad:
case gd::GameObjectType::kGameObjectTypeRedJumpPad:
case gd::GameObjectType::kGameObjectTypeYellowJumpRing:
color = { (GLubyte)(hacks.padHitboxColor[0] * 255.f), (GLubyte)(hacks.padHitboxColor[1] * 255.f),
(GLubyte)(hacks.padHitboxColor[2] * 255.f) };
(GLubyte)(hacks.padHitboxColor[2] * 255.f), (GLubyte)(hacks.padHitboxColor[3] * 255.f) };
break;

case gd::GameObjectType::kGameObjectTypePinkJumpRing:
case gd::GameObjectType::kGameObjectTypeYellowJumpRing:
case gd::GameObjectType::kGameObjectTypeDropRing:
case gd::GameObjectType::kGameObjectTypeGravityRing:
case gd::GameObjectType::kGameObjectTypeRedJumpRing:
case gd::GameObjectType::kGameObjectTypeGreenRing:
case gd::GameObjectType::kGameObjectTypeDashRing:
case gd::GameObjectType::kGameObjectTypeGravityDashRing:
color = { (GLubyte)(hacks.ringHitboxColor[0] * 255.f), (GLubyte)(hacks.ringHitboxColor[1] * 255.f),
(GLubyte)(hacks.ringHitboxColor[2] * 255.f) };
(GLubyte)(hacks.ringHitboxColor[2] * 255.f), (GLubyte)(hacks.ringHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeSecretCoin:
case gd::GameObjectType::kGameObjectTypeUserCoin:
case gd::GameObjectType::kGameObjectTypeCustomRing:
case gd::GameObjectType::kGameObjectTypeCollectible:
color = { (GLubyte)(hacks.collectibleHitboxColor[0] * 255.f), (GLubyte)(hacks.collectibleHitboxColor[1] * 255.f),
(GLubyte)(hacks.collectibleHitboxColor[2] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeDropRing:
color = ccc4(31, 31, 31, 255);
(GLubyte)(hacks.collectibleHitboxColor[2] * 255.f), (GLubyte)(hacks.collectibleHitboxColor[3] * 255.f) };
break;
default:
if (!hacks.showDecorations)
Expand Down Expand Up @@ -364,20 +355,12 @@ void HitboxNode::drawObjectWithRotation(gd::GameObject* obj)
{
case gd::GameObjectType::kGameObjectTypeSolid:
color = { (GLubyte)(hacks.solidHitboxColor[0] * 255.f), (GLubyte)(hacks.solidHitboxColor[1] * 255.f),
(GLubyte)(hacks.solidHitboxColor[2] * 255.f) };
(GLubyte)(hacks.solidHitboxColor[2] * 255.f), (GLubyte)(hacks.solidHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeDecoration:
if (hacks.showDecorations)
color = ccc4(127, 127, 255, 255);
switch (obj->m_nObjectID)
{
case 749:
color = ccc4(255, 127, 0, 255);
break;
default:
if (!hacks.showDecorations)
return;
}
color = { (GLubyte)(hacks.modifierHitboxColor[0] * 255.f), (GLubyte)(hacks.modifierHitboxColor[1] * 255.f),
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f), (GLubyte)(hacks.modifierHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeInverseGravityPortal:
case gd::GameObjectType::kGameObjectTypeInverseMirrorPortal:
Expand All @@ -395,7 +378,7 @@ void HitboxNode::drawObjectWithRotation(gd::GameObject* obj)
case gd::GameObjectType::kGameObjectTypeRobotPortal:
case gd::GameObjectType::kGameObjectTypeSpiderPortal:
case gd::GameObjectType::kGameObjectTypeTeleportPortal:color = { (GLubyte)(hacks.portalHitboxColor[0] * 255.f), (GLubyte)(hacks.portalHitboxColor[1] * 255.f),
(GLubyte)(hacks.portalHitboxColor[2] * 255.f) };
(GLubyte)(hacks.portalHitboxColor[2] * 255.f), (GLubyte)(hacks.portalHitboxColor[3] * 255.f) };

break;
case gd::GameObjectType::kGameObjectTypeModifier:
Expand All @@ -407,7 +390,7 @@ void HitboxNode::drawObjectWithRotation(gd::GameObject* obj)
case 203:
case 1334:
color = { (GLubyte)(hacks.modifierHitboxColor[0] * 255.f), (GLubyte)(hacks.modifierHitboxColor[1] * 255.f),
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f) };
(GLubyte)(hacks.modifierHitboxColor[2] * 255.f), (GLubyte)(hacks.modifierHitboxColor[3] * 255.f) };
break;
default:
if (!hacks.showDecorations)
Expand All @@ -416,41 +399,39 @@ void HitboxNode::drawObjectWithRotation(gd::GameObject* obj)
break;
case gd::GameObjectType::kGameObjectTypeSlope:
color = { (GLubyte)(hacks.slopeHitboxColor[0] * 255.f), (GLubyte)(hacks.slopeHitboxColor[1] * 255.f),
(GLubyte)(hacks.slopeHitboxColor[2] * 255.f) };
(GLubyte)(hacks.slopeHitboxColor[2] * 255.f), (GLubyte)(hacks.slopeHitboxColor[3] * 255.f) };
this->drawPolygonHitbox(this->triangleForObject(obj), color);
return;
case gd::GameObjectType::kGameObjectTypeHazard:
color = { (GLubyte)(hacks.hazardHitboxColor[0] * 255.f), (GLubyte)(hacks.hazardHitboxColor[1] * 255.f),
(GLubyte)(hacks.hazardHitboxColor[2] * 255.f) };
(GLubyte)(hacks.hazardHitboxColor[2] * 255.f), (GLubyte)(hacks.hazardHitboxColor[3] * 255.f) };
break;

case gd::GameObjectType::kGameObjectTypeYellowJumpPad:
case gd::GameObjectType::kGameObjectTypePinkJumpPad:
case gd::GameObjectType::kGameObjectTypeGravityPad:
case gd::GameObjectType::kGameObjectTypeRedJumpPad:
case gd::GameObjectType::kGameObjectTypeYellowJumpRing:
color = { (GLubyte)(hacks.padHitboxColor[0] * 255.f), (GLubyte)(hacks.padHitboxColor[1] * 255.f),
(GLubyte)(hacks.padHitboxColor[2] * 255.f) };
(GLubyte)(hacks.padHitboxColor[2] * 255.f), (GLubyte)(hacks.padHitboxColor[3] * 255.f) };
break;

case gd::GameObjectType::kGameObjectTypePinkJumpRing:
case gd::GameObjectType::kGameObjectTypeYellowJumpRing:
case gd::GameObjectType::kGameObjectTypeGravityRing:
case gd::GameObjectType::kGameObjectTypeRedJumpRing:
case gd::GameObjectType::kGameObjectTypeGreenRing:
case gd::GameObjectType::kGameObjectTypeDashRing:
case gd::GameObjectType::kGameObjectTypeGravityDashRing:
case gd::GameObjectType::kGameObjectTypeDropRing:
color = { (GLubyte)(hacks.ringHitboxColor[0] * 255.f), (GLubyte)(hacks.ringHitboxColor[1] * 255.f),
(GLubyte)(hacks.ringHitboxColor[2] * 255.f) };
(GLubyte)(hacks.ringHitboxColor[2] * 255.f), (GLubyte)(hacks.ringHitboxColor[3] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeSecretCoin:
case gd::GameObjectType::kGameObjectTypeUserCoin:
case gd::GameObjectType::kGameObjectTypeCustomRing:
case gd::GameObjectType::kGameObjectTypeCollectible:
color = { (GLubyte)(hacks.collectibleHitboxColor[0] * 255.f), (GLubyte)(hacks.collectibleHitboxColor[1] * 255.f),
(GLubyte)(hacks.collectibleHitboxColor[2] * 255.f) };
break;
case gd::GameObjectType::kGameObjectTypeDropRing:
color = ccc4(31, 31, 31, 255);
(GLubyte)(hacks.collectibleHitboxColor[2] * 255.f), (GLubyte)(hacks.collectibleHitboxColor[3] * 255.f) };
break;
default:
if (!hacks.showDecorations)
Expand Down
Loading

0 comments on commit 012f2c8

Please sign in to comment.