Skip to content

Commit 699afc7

Browse files
committed
adjustments
1 parent c2261d8 commit 699afc7

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/Utils.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ namespace horrible {
5050

5151
// Default horrible categories
5252
namespace category {
53-
constexpr std::string_view playerlife = "Player Life";
54-
constexpr std::string_view jumpscares = "Jumpscares";
55-
constexpr std::string_view randoms = "Randoms";
56-
constexpr std::string_view chances = "Chances";
57-
constexpr std::string_view obstructive = "Obstructive";
58-
constexpr std::string_view misc = "Misc";
53+
inline constexpr const char* playerlife = "Player Life";
54+
inline constexpr const char* jumpscares = "Jumpscares";
55+
inline constexpr const char* randoms = "Randoms";
56+
inline constexpr const char* chances = "Chances";
57+
inline constexpr const char* obstructive = "Obstructive";
58+
inline constexpr const char* misc = "Misc";
5959
};
6060

6161
// Default horrible options

src/hooks/PlayLayer/Confetti.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
88
struct Fields {
99
bool enabled = options::get("confetti");
1010

11-
static constexpr auto confettis = std::to_array<std::string_view>({
11+
static constexpr auto confettis = std::to_array<const char*>({
1212
"diffIcon_02_btn_001.png",
1313
"explosionIcon_20_001.png",
1414
"GJ_duplicateObjectBtn2_001.png",
@@ -53,7 +53,7 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
5353

5454
void createConfetti() {
5555
if (m_fields->enabled) {
56-
auto conf = CCSprite::createWithSpriteFrameName(Fields::confettis[randng::get(Fields::confettis.size() - 1)].data());
56+
auto conf = CCSprite::createWithSpriteFrameName(Fields::confettis[randng::get(Fields::confettis.size() - 1)]);
5757
conf->setPosition({ 0.f, 0.f });
5858
conf->setScale(0.875f * randng::pc());
5959

src/hooks/PlayLayer/Friends.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class $modify(FriendsPlayLayer, PlayLayer) {
88
struct Fields {
99
bool enabled = options::get("friends");
1010

11-
static constexpr auto friends = std::to_array<std::string_view>({
11+
static constexpr auto friends = std::to_array<const char*>({
1212
"diffIcon_00_btn_001.png",
1313
"diffIcon_01_btn_001.png",
1414
"diffIcon_02_btn_001.png",
@@ -21,7 +21,7 @@ class $modify(FriendsPlayLayer, PlayLayer) {
2121
"diffIcon_09_btn_001.png",
2222
"diffIcon_10_btn_001.png",
2323
"diffIcon_auto_btn_001.png",
24-
});
24+
});
2525
};
2626

2727
void setupHasCompleted() {
@@ -50,7 +50,7 @@ class $modify(FriendsPlayLayer, PlayLayer) {
5050
float yA = getScaledContentHeight() * rA; // starting height pos
5151
float yB = getScaledContentHeight() * rB; // ending height pos
5252

53-
Ref<CCSprite> friendSpr = CCSprite::createWithSpriteFrameName(Fields::friends[randng::get(Fields::friends.size() - 1)].data());
53+
Ref<CCSprite> friendSpr = CCSprite::createWithSpriteFrameName(Fields::friends[randng::get(Fields::friends.size() - 1)]);
5454
friendSpr->setPosition({ xA, yA });
5555
friendSpr->setScale(1.25 * (rB + rA));
5656
friendSpr->setRotation(180.f * (yA * yB)); // random rotation

src/hooks/PlayLayer/Motivation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class $modify(MotivationPlayLayer, PlayLayer) {
88
struct Fields {
99
bool enabled = options::get("motivation");
1010

11-
static constexpr auto msgs = std::to_array<std::string_view>({
11+
static constexpr auto msgs = std::to_array<const char*>({
1212
"Surprised you haven't quit already.",
1313
"OW! I hit my knee on my desk.",
1414
"mrrp meow :3",
@@ -94,7 +94,7 @@ class $modify(MotivationPlayLayer, PlayLayer) {
9494
"Have you made it past 67% yet?",
9595
"I think you could use some ASMR.",
9696
"You gotta chill...",
97-
});
97+
});
9898
};
9999

100100
void setupHasCompleted() {
@@ -112,7 +112,7 @@ class $modify(MotivationPlayLayer, PlayLayer) {
112112

113113
void showMessage(float) {
114114
if (m_fields->enabled && !m_hasCompletedLevel) {
115-
auto label = CCLabelBMFont::create(Fields::msgs[randng::get(Fields::msgs.size())].data(), "bigFont.fnt", getScaledContentWidth() - 12.5f);
115+
auto label = CCLabelBMFont::create(Fields::msgs[randng::get(Fields::msgs.size())], "bigFont.fnt", getScaledContentWidth() - 12.5f);
116116
label->setAnchorPoint({ 0.5, 0 });
117117
label->setPosition({ getScaledContentWidth() / 2.f, -label->getScaledContentHeight() });
118118

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace horrible;
2222
log::info("Done registering {} options", defOpts.size());
2323

2424
defOpts.clear();
25-
log::debug("Cleaned up default option copies! Now at size {}", defOpts.size());
25+
log::debug("Cleaned up default option array!");
2626
} else {
2727
log::error("Failed to get OptionManager");
2828
};

src/menu/src/FloatingButton.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ bool FloatingButton::ccTouchBegan(CCTouch* touch, CCEvent* ev) {
124124
CCEaseExponentialOut::create(CCScaleTo::create(0.25f, m_impl->m_scale * 0.875f)),
125125
CCFadeTo::create(0.25f, 255)
126126
),
127-
CCCallFunc::create(this, callfunc_selector(FloatingButton::onScaleEnd)
128-
)));
127+
CCCallFunc::create(this, callfunc_selector(FloatingButton::onScaleEnd))
128+
));
129129

130130
return true; // swallow touch
131131
};

0 commit comments

Comments
 (0)