This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
Submodule gd.hpp
updated
4 files
+1 −0 | include/dash/bindings/GJBaseGameLayer.hpp | |
+36 −0 | include/dash/hook/PlayLayer.hpp | |
+43 −0 | include/dash/hook/cocos/CCDrawNode.hpp | |
+3 −0 | include/dash/mappings/2204.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "hooks.hpp" | ||
#include "../../shared/hacks/hitboxes/hitboxes.hpp" | ||
|
||
#include <dash/hook/cocos/CCDrawNode.hpp> | ||
|
||
namespace openhack::hooks::CCDrawNode { | ||
|
||
bool drawPolygon(cocos2d::CCDrawNode *self, gd::cocos2d::CCPoint *verts, unsigned int count, const cocos2d::ccColor4F &fillColor, | ||
float borderWidth, const cocos2d::ccColor4F &borderColor) { | ||
hacks::Hitboxes::modifyDraw((gui::Color &) fillColor, borderWidth, (gui::Color &) borderColor); | ||
return hook::CCDrawNode::drawPolygon(self, verts, count, fillColor, borderWidth, borderColor); | ||
} | ||
|
||
bool drawCircle(cocos2d::CCDrawNode *self, cocos2d::CCPoint const &position, float radius, cocos2d::_ccColor4F const &color, | ||
float borderWidth, cocos2d::_ccColor4F const &borderColor, unsigned int segments) { | ||
hacks::Hitboxes::modifyDraw((gui::Color &) color, borderWidth, (gui::Color &) borderColor); | ||
return hook::CCDrawNode::drawCircle(self, position, radius, color, borderWidth, borderColor, segments); | ||
} | ||
|
||
void installHooks() { | ||
LOG_HOOK(CCDrawNode, drawPolygon); | ||
LOG_HOOK(CCDrawNode, drawCircle); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e89f01d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?? Show hitboxes was a geode only feature?