22
33#include < Horrible.hpp>
44
5- #include < classes/Jumpscares.hpp>
6- #include < classes/Menu.hpp>
7- #include < classes/Options.hpp>
8- #include < classes/Randng.hpp>
5+ #include < util/Jumpscares.hpp>
6+ #include < util/Menu.hpp>
7+ #include < util/Options.hpp>
8+ #include < util/Randng.hpp>
9+ #include < util/Themes.hpp>
910
10- #include < classes /ui/MathQuiz.hpp>
11- #include < classes /ui/RandomAd.hpp>
12- #include < classes /ui/SpamChallenge.hpp>
11+ #include < util /ui/MathQuiz.hpp>
12+ #include < util /ui/RandomAd.hpp>
13+ #include < util /ui/SpamChallenge.hpp>
1314
1415#include < cocos2d.h>
1516
@@ -27,7 +28,7 @@ namespace horrible {
2728 *
2829 * @param chance The chance setting number
2930 */
30- inline float chanceToDelayPct (int chance) {
31+ inline float chanceToDelayPct (int chance) noexcept {
3132 if (chance <= 0 ) chance = 1 ;
3233 if (chance > 100 ) chance = 100 ;
3334
@@ -40,66 +41,7 @@ namespace horrible {
4041 * @param name Name of the audio file
4142 */
4243 inline void playSfx (const char * file) {
43- if (auto fmod = FMODAudioEngine::sharedEngine ()) fmod->playEffectAsync (file);
44- };
45-
46- // Get the current theme's sprites and colors
47- namespace theme {
48- inline constexpr auto square = " square02_001.png" ;
49-
50- // Theme options
51- namespace enums {
52- inline constexpr auto Blue = " Blue" ;
53- inline constexpr auto Green = " Green" ;
54- inline constexpr auto Dark = " Dark" ;
55- inline constexpr auto Light = " Light" ;
56- inline constexpr auto Dim = " Dim" ;
57- inline constexpr auto Girlypop = " Girlypop" ;
58- inline constexpr auto Aqua = " Aqua" ;
59- inline constexpr auto Geode = " Geode" ;
60- };
61-
62- // Get the current theme's background sprite name
63- inline const char * getBackgroundSprite (std::string_view theme) {
64- if (theme == enums::Blue) return " GJ_square02.png" ;
65- if (theme == enums::Green) return " GJ_square03.png" ;
66- if (theme == enums::Dark) return " geode.loader/GE_square02.png" ;
67- if (theme == enums::Light) return " geode.loader/white-square.png" ;
68- if (theme == enums::Dim) return " GJ_square05.png" ;
69- if (theme == enums::Girlypop) return " GJ_square04.png" ;
70- if (theme == enums::Aqua) return " geode.loader/GE_square03.png" ;
71- if (theme == enums::Geode) return " geode.loader/GE_square01.png" ;
72-
73- return " GJ_square01.png" ;
74- };
75-
76- // Get the current theme's circle base color enum
77- inline geode::CircleBaseColor getCircleBaseColor (std::string_view theme) {
78- if (theme == enums::Blue) return geode::CircleBaseColor::Blue;
79- if (theme == enums::Green) return geode::CircleBaseColor::Green;
80- if (theme == enums::Dark) return geode::CircleBaseColor::Gray;
81- if (theme == enums::Light) return geode::CircleBaseColor::Gray;
82- if (theme == enums::Dim) return geode::CircleBaseColor::Gray;
83- if (theme == enums::Girlypop) return geode::CircleBaseColor::Pink;
84- if (theme == enums::Aqua) return geode::CircleBaseColor::DarkAqua;
85- if (theme == enums::Geode) return geode::CircleBaseColor::DarkPurple;
86-
87- return geode::CircleBaseColor::Green;
88- };
89-
90- // Get the current theme's square button sprite name
91- inline const char * getButtonSquareSprite (std::string_view theme) {
92- if (theme == enums::Blue) return " GJ_button_02.png" ;
93- if (theme == enums::Green) return " GJ_button_01.png" ;
94- if (theme == enums::Dark) return " GJ_button_05.png" ;
95- if (theme == enums::Light) return " GJ_button_04.png" ;
96- if (theme == enums::Dim) return " GJ_button_04.png" ;
97- if (theme == enums::Girlypop) return " GJ_button_03.png" ;
98- if (theme == enums::Aqua) return " geode.loader/GE_button_05.png" ;
99- if (theme == enums::Geode) return " geode.loader/GE_button_05.png" ;
100-
101- return " GJ_button_01.png" ;
102- };
44+ if (auto fmod = FMODAudioEngine::sharedEngine ()) (void )fmod->playEffectAsync (file);
10345 };
10446
10547 namespace str = geode::utils::string; // Shortcut for geode::utils::string
0 commit comments