3 #include <BLIB/Engine/Configuration.hpp>
4 #include <BLIB/Resources.hpp>
5 #include <BLIB/Util/FileUtil.hpp>
12 const std::string DataDirectory = bl::util::FileUtil::getDataDirectory(
"Peoplemon");
13 const std::string ConfigFile = bl::util::FileUtil::joinPath(DataDirectory,
"configuration.cfg");
14 bool inEditor =
false;
18 const std::string WindowIconFile =
"Resources/Images/icon.png";
19 constexpr
int WindowWidth = 800;
20 constexpr
int WindowHeight = 600;
22 constexpr
int PixelsPerTile = 32;
23 constexpr
int ExtraRenderTiles = 10;
24 constexpr
int LightingWidth = 25;
25 constexpr
int LightingHeight = 19;
27 const std::string ImagePath =
"Resources/Images";
28 const std::string MenuImagePath =
"Resources/Images/Menus";
29 const std::string SpritesheetPath =
"Resources/Images/Spritesheets";
30 const std::string MusicPath =
"Resources/Audio/Music";
31 const std::string PlaylistPath =
"Resources/Audio/Playlists";
32 const std::string MenuFont =
"Resources/Fonts/Menu.ttf";
33 const std::string AnimationPath =
"Resources/Animations";
34 const std::string SoundPath =
"Resources/Audio/Sounds";
36 const std::string MapPath =
"Resources/Maps/Maps";
37 const std::string TilesetPath =
"Resources/Maps/Tilesets";
38 const std::string MapTilePath =
"Resources/Maps/Tiles/Sprites";
39 const std::string MapAnimationPath =
"Resources/Maps/Tiles/Animations";
41 const std::string ThunderSoundFile =
"Resources/Audio/Sounds/Weather/thunder.wav";
42 const std::string LightRainSoundFile =
"Resources/Audio/Sounds/Weather/lightRain.wav";
43 const std::string HardRainSoundFile =
"Resources/Audio/Sounds/Weather/hardRain.wav";
45 const std::string RainDropFile =
"Resources/Images/Weather/raindrop.png";
46 const std::string RainSplash1File =
"Resources/Images/Weather/rainSplash1.png";
47 const std::string RainSplash2File =
"Resources/Images/Weather/rainSplash2.png";
48 const std::string SnowFlakeFile =
"Resources/Images/Weather/snowflake.png";
49 const std::string FogFile =
"Resources/Images/Weather/fog.png";
50 const std::string SandPatchFile =
"Resources/Images/Weather/sandMain.png";
51 const std::string SandSwirlFile =
"Resources/Images/Weather/sandSwirl.png";
53 constexpr
float FrequentThunderMinInt = 8.f;
54 constexpr
float FrequentThunderMaxInt = 15.f;
55 constexpr
float InfrequentThunderMinInt = 15.f;
56 constexpr
float InfrequentThunderMaxInt = 40.f;
58 constexpr
unsigned int LightRainDropCount = 700;
59 constexpr
unsigned int HardRainDropCount = 1700;
60 constexpr
unsigned int LightSnowFlakeCount = 1500;
61 constexpr
unsigned int HardSnowFlakeCount = 4000;
63 constexpr
unsigned int ThickFogAlpha = 135;
64 constexpr
unsigned int ThinFogAlpha = 90;
66 constexpr
int LightRainLightModifier = 22;
67 constexpr
int HardRainLightModifier = 35;
68 constexpr
int LightSnowLightModifier = 15;
69 constexpr
int HardSnowLightModifier = 30;
70 constexpr
int ThinFogLightModifier = 20;
71 constexpr
int ThickFogLightModifier = 50;
72 constexpr
int SunnyLightModifier = 20;
73 constexpr
int SandstormLightModifier = 30;
75 const std::string NpcFileExtension =
"npc";
76 const std::string NpcPath =
"Resources/Characters/NPCs";
77 const std::string TrainerFileExtension =
"tnr";
78 const std::string TrainerPath =
"Resources/Characters/Trainers";
79 const std::string ConversationPath =
"Resources/Characters/Conversations";
80 const std::string ConversationFileExtension =
"conv";
81 const std::string LegacyPeoplemonPath =
"Resources/Characters/LegacyPeoplemon";
83 const std::string CharacterAnimationPath =
"Resources/Characters/Animations";
84 constexpr
float CharacterMoveSpeed = 81.f;
85 constexpr
float FastCharacterMoveSpeed = 205.f;
87 const std::string BoyPlayerAnims =
88 bl::util::FileUtil::joinPath(CharacterAnimationPath,
"BoyPlayer");
89 const std::string GirlPlayerAnims =
90 bl::util::FileUtil::joinPath(CharacterAnimationPath,
"GirlPlayer");
92 const float CharacterSpinPeriod = 1.75f;
94 const std::string ItemMetadataFile =
"Resources/Config/items.db";
95 const std::string ItemSprite =
"Resources/Images/item.png";
97 const float GhostWriterSpeed = 16.f;
98 const std::string TextboxFile =
"Resources/Images/Menus/HUD/messageBox.png";
99 const unsigned int HudFontSize = 20;
101 const std::string ScriptPath =
"Resources/Scripts";
103 constexpr
float ScreenFadePeriod = 2.f;
105 const std::string PeoplemonDBFile =
"Resources/Config/peoplemon.db";
106 const std::string MoveDBFile =
"Resources/Config/moves.db";
108 const std::string PeoplemonImageFolder =
"Resources/Images/Peoplemon";
110 constexpr
unsigned int WildPeoplemonChance = 15;
111 const std::string TrainerExclaimSound =
"Resources/Audio/Sounds/trainer.ogg";
112 const std::string TrainerExclaimImage =
"Resources/Images/trainer.png";
116 bl::resource::Ref<sf::VulkanFont> menuFont;
123 bl::engine::Configuration::set(
"blib.playlist.song_path", defaults::MusicPath);
124 bl::engine::Configuration::set(
"blib.animation.spritesheet_path", defaults::SpritesheetPath);
126 bl::engine::Configuration::set(
"core.window.icon", defaults::WindowIconFile);
127 bl::engine::Configuration::set(
"core.window.width", defaults::WindowWidth);
128 bl::engine::Configuration::set(
"core.window.height", defaults::WindowHeight);
130 bl::engine::Configuration::set(
"core.render.pixels_per_tile", defaults::PixelsPerTile);
131 bl::engine::Configuration::set(
"core.render.extra_render_tiles", defaults::ExtraRenderTiles);
132 bl::engine::Configuration::set(
"core.render.lighting_width", defaults::LightingWidth);
133 bl::engine::Configuration::set(
"core.render.lighting_height", defaults::LightingHeight);
135 bl::engine::Configuration::set(
"core.menu.image_path", defaults::MenuImagePath);
136 bl::engine::Configuration::set(
"core.menu.primary_font", defaults::MenuFont);
137 bl::engine::Configuration::set(
"core.music.path", defaults::MusicPath);
138 bl::engine::Configuration::set(
"core.music.playlist_path", defaults::PlaylistPath);
139 bl::engine::Configuration::set(
"core.anims.path", defaults::AnimationPath);
140 bl::engine::Configuration::set(
"core.imgs.path", defaults::ImagePath);
141 bl::engine::Configuration::set(
"core.audio.sound_path", defaults::SoundPath);
143 bl::engine::Configuration::set(
"core.map.path", defaults::MapPath);
144 bl::engine::Configuration::set(
"core.map.tileset_path", defaults::TilesetPath);
145 bl::engine::Configuration::set(
"core.map.tile_path", defaults::MapTilePath);
146 bl::engine::Configuration::set(
"core.map.anim_path", defaults::MapAnimationPath);
148 bl::engine::Configuration::set(
"core.weather.thunder", defaults::ThunderSoundFile);
149 bl::engine::Configuration::set(
"core.weather.lightrain", defaults::LightRainSoundFile);
150 bl::engine::Configuration::set(
"core.weather.hardrain", defaults::HardRainSoundFile);
152 bl::engine::Configuration::set(
"core.weather.raindrop", defaults::RainDropFile);
153 bl::engine::Configuration::set(
"core.weather.rainsplash1", defaults::RainSplash1File);
154 bl::engine::Configuration::set(
"core.weather.rainsplash2", defaults::RainSplash2File);
155 bl::engine::Configuration::set(
"core.weather.snowflake", defaults::SnowFlakeFile);
156 bl::engine::Configuration::set(
"core.weather.fog", defaults::FogFile);
157 bl::engine::Configuration::set(
"core.weather.sandpatch", defaults::SandPatchFile);
158 bl::engine::Configuration::set(
"core.weather.sandswirl", defaults::SandSwirlFile);
160 bl::engine::Configuration::set(
"core.weather.thunder.freq.min",
161 defaults::FrequentThunderMinInt);
162 bl::engine::Configuration::set(
"core.weather.thunder.freq.max",
163 defaults::FrequentThunderMaxInt);
164 bl::engine::Configuration::set(
"core.weather.thunder.infreq.min",
165 defaults::InfrequentThunderMinInt);
166 bl::engine::Configuration::set(
"core.weather.thunder.infreq.max",
167 defaults::InfrequentThunderMaxInt);
169 bl::engine::Configuration::set(
"core.weather.lightrain_particles",
170 defaults::LightRainDropCount);
171 bl::engine::Configuration::set(
"core.weather.hardrain_particles", defaults::HardRainDropCount);
172 bl::engine::Configuration::set(
"core.weather.lightsnow_particles",
173 defaults::LightSnowFlakeCount);
174 bl::engine::Configuration::set(
"core.weather.hardsnow_particles", defaults::HardSnowFlakeCount);
176 bl::engine::Configuration::set(
"core.weather.fog.thick_alpha", defaults::ThickFogAlpha);
177 bl::engine::Configuration::set(
"core.weather.fog.thin_alpha", defaults::ThinFogAlpha);
179 bl::engine::Configuration::set(
"core.weather.lightrain.light",
180 defaults::LightRainLightModifier);
181 bl::engine::Configuration::set(
"core.weather.hardrain.light", defaults::HardRainLightModifier);
182 bl::engine::Configuration::set(
"core.weather.lightsnow.light",
183 defaults::LightSnowLightModifier);
184 bl::engine::Configuration::set(
"core.weather.hardsnow.light", defaults::HardSnowLightModifier);
185 bl::engine::Configuration::set(
"core.weather.thinfog.light", defaults::ThinFogLightModifier);
186 bl::engine::Configuration::set(
"core.weather.thickfog.light", defaults::ThickFogLightModifier);
187 bl::engine::Configuration::set(
"core.weather.sunny.light", defaults::SunnyLightModifier);
188 bl::engine::Configuration::set(
"core.weather.sandstorm.light",
189 defaults::SandstormLightModifier);
191 bl::engine::Configuration::set(
"core.npc.extension", defaults::NpcFileExtension);
192 bl::engine::Configuration::set(
"core.npc.path", defaults::NpcPath);
193 bl::engine::Configuration::set(
"core.trainer.extension", defaults::TrainerFileExtension);
194 bl::engine::Configuration::set(
"core.trainer.path", defaults::TrainerPath);
195 bl::engine::Configuration::set(
"core.conversation.path", defaults::ConversationPath);
196 bl::engine::Configuration::set(
"core.conversation.extension",
197 defaults::ConversationFileExtension);
198 bl::engine::Configuration::set(
"core.trainer.pplpath", defaults::LegacyPeoplemonPath);
200 bl::engine::Configuration::set(
"core.character.animpath", defaults::CharacterAnimationPath);
201 bl::engine::Configuration::set(
"core.character.speed", defaults::CharacterMoveSpeed);
202 bl::engine::Configuration::set(
"core.character.fastspeed", defaults::FastCharacterMoveSpeed);
204 bl::engine::Configuration::set(
"core.player.boy_anims", defaults::BoyPlayerAnims);
205 bl::engine::Configuration::set(
"core.player.girl_anims", defaults::GirlPlayerAnims);
207 bl::engine::Configuration::set(
"core.character.spin_period", defaults::CharacterSpinPeriod);
209 bl::engine::Configuration::set(
"core.items.config", defaults::ItemMetadataFile);
210 bl::engine::Configuration::set(
"core.items.sprite", defaults::ItemSprite);
212 bl::engine::Configuration::set(
"blib.interface.ghost_speed", defaults::GhostWriterSpeed);
213 bl::engine::Configuration::set(
"core.hud.textbox_file", defaults::TextboxFile);
214 bl::engine::Configuration::set(
"core.hud.font_size", defaults::HudFontSize);
216 bl::engine::Configuration::set(
"blib.script.path", defaults::ScriptPath);
218 bl::engine::Configuration::set(
"game.main.fadeout", defaults::ScreenFadePeriod);
220 bl::engine::Configuration::set(
"core.pplmn.dbfile", defaults::PeoplemonDBFile);
221 bl::engine::Configuration::set(
"core.moves.dbfile", defaults::MoveDBFile);
223 bl::engine::Configuration::set(
"core.peoplemon.image_dir", defaults::PeoplemonImageFolder);
225 bl::engine::Configuration::set(
"core.wild.chance", defaults::WildPeoplemonChance);
226 bl::engine::Configuration::set(
"core.trainer.img", defaults::TrainerExclaimImage);
227 bl::engine::Configuration::set(
"core.trainer.sfx", defaults::TrainerExclaimSound);
229 if (!bl::engine::Configuration::load(ConfigFile)) {
230 BL_LOG_INFO <<
"Failed to load configuration file, using defaults";
232 bl::engine::Configuration::log();
236 FontManager::load(bl::engine::Configuration::get<std::string>(
"core.menu.primary_font"));
237 if (!menuFont)
return false;
245 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
246 "core.window.icon", defaults::WindowIconFile);
251 static const int val =
252 bl::engine::Configuration::getOrDefault<int>(
"core.window.width", defaults::WindowWidth);
257 static const int val =
258 bl::engine::Configuration::getOrDefault<int>(
"core.window.height", defaults::WindowHeight);
269 static const std::string d = bl::util::FileUtil::joinPath(DataDirectory,
"saves");
270 if (!bl::util::FileUtil::directoryExists(d)) { bl::util::FileUtil::createDirectory(d); }
275 static const std::string e =
"psf";
280 static const int val = bl::engine::Configuration::getOrDefault<int>(
281 "core.render.pixels_per_tile", defaults::PixelsPerTile);
286 static const int val = bl::engine::Configuration::getOrDefault<int>(
287 "core.render.extra_render_tiles", defaults::ExtraRenderTiles);
292 static const int val = bl::engine::Configuration::getOrDefault<int>(
293 "core.render.lighting_width", defaults::LightingWidth);
298 static const int val = bl::engine::Configuration::getOrDefault<int>(
299 "core.render.lighting_height", defaults::LightingHeight);
304 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
305 "core.menu.image_path", defaults::MenuImagePath);
310 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
311 "blib.animation.spritesheet_path", defaults::SpritesheetPath);
316 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
317 "core.music.path", defaults::MusicPath);
322 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
323 "core.music.playlist_path", defaults::PlaylistPath);
328 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
329 "core.anims.path", defaults::AnimationPath);
334 static const std::string val =
335 bl::engine::Configuration::getOrDefault<std::string>(
"core.imgs.path", defaults::ImagePath);
340 static const std::string val =
341 bl::engine::Configuration::getOrDefault<std::string>(
"core.map.path", defaults::MapPath);
346 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
347 "core.map.tileset_path", defaults::TilesetPath);
352 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
353 "core.map.tile_path", defaults::MapTilePath);
358 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
359 "core.map.anim_path", defaults::MapAnimationPath);
366 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
367 "core.weather.thunder", defaults::ThunderSoundFile);
372 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
373 "core.weather.lightrain", defaults::LightRainSoundFile);
378 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
379 "core.weather.hardrain", defaults::HardRainSoundFile);
384 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
385 "core.weather.raindrop", defaults::RainDropFile);
390 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
391 "core.weather.rainsplash1", defaults::RainSplash1File);
396 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
397 "core.weather.rainsplash2", defaults::RainSplash2File);
402 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
403 "core.weather.snowflake", defaults::SnowFlakeFile);
408 static const std::string val =
409 bl::engine::Configuration::getOrDefault<std::string>(
"core.weather.fog", defaults::FogFile);
414 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
415 "core.weather.sandpatch", defaults::SandPatchFile);
420 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
421 "core.weather.sandswirl", defaults::SandSwirlFile);
426 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.lightrain_particles",
427 defaults::LightRainDropCount);
431 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.hardrain_particles",
432 defaults::HardRainDropCount);
436 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.lightsnow_particles",
437 defaults::LightSnowFlakeCount);
441 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.hardsnow_particles",
442 defaults::HardSnowFlakeCount);
446 return bl::engine::Configuration::getOrDefault<float>(
"core.weather.thunder.freq.min",
447 defaults::FrequentThunderMinInt);
451 return bl::engine::Configuration::getOrDefault<float>(
"core.weather.thunder.freq.max",
452 defaults::FrequentThunderMaxInt);
456 return bl::engine::Configuration::getOrDefault<float>(
"core.weather.thunder.infreq.min",
457 defaults::InfrequentThunderMinInt);
461 return bl::engine::Configuration::getOrDefault<float>(
"core.weather.thunder.infreq.max",
462 defaults::InfrequentThunderMaxInt);
466 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.fog.thick_alpha",
467 defaults::ThickFogAlpha);
471 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.weather.fog.thin_alpha",
472 defaults::ThinFogAlpha);
476 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.lightrain.light",
477 defaults::LightRainLightModifier);
481 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.hardrain.light",
482 defaults::HardRainLightModifier);
486 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.lightsnow.light",
487 defaults::LightSnowLightModifier);
491 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.hardsnow.light",
492 defaults::HardSnowLightModifier);
496 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.thinfog.light",
497 defaults::ThinFogLightModifier);
501 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.thickfog.light",
502 defaults::ThickFogLightModifier);
506 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.sunny.light",
507 defaults::SunnyLightModifier);
511 return bl::engine::Configuration::getOrDefault<int>(
"core.weather.sandstorm.light",
512 defaults::SandstormLightModifier);
516 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
517 "core.npc.extension", defaults::NpcFileExtension);
522 static const std::string val =
523 bl::engine::Configuration::getOrDefault<std::string>(
"core.npc.path", defaults::NpcPath);
528 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
529 "core.trainer.extension", defaults::TrainerFileExtension);
534 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
535 "core.trainer.path", defaults::TrainerPath);
540 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
541 "core.conversation.path", defaults::ConversationPath);
546 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
547 "core.conversation.extension", defaults::ConversationFileExtension);
552 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
553 "core.trainer.pplpath", defaults::LegacyPeoplemonPath);
558 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
559 "core.character.animpath", defaults::CharacterAnimationPath);
564 return bl::engine::Configuration::getOrDefault<float>(
"core.character.speed",
565 defaults::CharacterMoveSpeed);
569 return bl::engine::Configuration::getOrDefault<float>(
"core.character.fastspeed",
570 defaults::FastCharacterMoveSpeed);
576 return bl::engine::Configuration::get<std::string>(
"core.player.boy_anims");
578 return bl::engine::Configuration::get<std::string>(
"core.player.girl_anims");
580 BL_LOG_ERROR <<
"Unknown player gender: " <<
static_cast<int>(g);
581 return defaults::BoyPlayerAnims;
586 return bl::engine::Configuration::getOrDefault<float>(
"core.character.spin_period",
587 defaults::CharacterSpinPeriod);
591 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
592 "core.items.config", defaults::ItemMetadataFile);
597 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
598 "core.items.sprite", defaults::ItemSprite);
603 return bl::engine::Configuration::getOrDefault<float>(
"blib.interface.ghost_speed",
604 defaults::GhostWriterSpeed);
608 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
609 "core.hud.textbox_file", defaults::TextboxFile);
614 return bl::engine::Configuration::getOrDefault<unsigned int>(
"core.hud.font_size",
615 defaults::HudFontSize);
619 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
620 "blib.script.path", defaults::ScriptPath);
625 static const float v = bl::engine::Configuration::getOrDefault<float>(
626 "game.main.fadeout", defaults::ScreenFadePeriod);
631 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
632 "core.pplmn.dbfile", defaults::PeoplemonDBFile);
637 static const std::string val = bl::engine::Configuration::getOrDefault<std::string>(
638 "core.moves.dbfile", defaults::MoveDBFile);
643 const float percent =
static_cast<float>(hp) /
static_cast<float>(maxHp);
648 if (percent > 0.5f)
return sf::Color(28, 201, 74);
649 if (percent > 0.25f)
return sf::Color(230, 222, 14);
650 return sf::Color(235, 33, 33);
654 static const auto join = bl::util::FileUtil::joinPath;
658 return join(
ImagePath(),
"Battle/annoy.png");
660 return join(
ImagePath(),
"Battle/frustrate.png");
662 return join(
ImagePath(),
"Battle/sticky.png");
664 return join(
ImagePath(),
"Battle/sleep.png");
666 return join(
ImagePath(),
"Battle/frozen.png");
673 static const std::string f = bl::engine::Configuration::getOrDefault<std::string>(
674 "core.peoplemon.image_dir", defaults::PeoplemonImageFolder);
679 static const unsigned int c = bl::engine::Configuration::getOrDefault<unsigned int>(
680 "core.wild.chance", defaults::WildPeoplemonChance);
685 static const std::string f = bl::engine::Configuration::getOrDefault<std::string>(
686 "core.trainer.img", defaults::TrainerExclaimImage);
691 static const std::string f = bl::engine::Configuration::getOrDefault<std::string>(
692 "core.trainer.sfx", defaults::TrainerExclaimSound);
697 static const std::string f = bl::engine::Configuration::getOrDefault<std::string>(
698 "core.audio.sound_path", defaults::SoundPath);
703 return bl::audio::AudioSystem::getOrLoadSound(
704 bl::util::FileUtil::joinPath(
SoundPath(),
"Menu/move.wav"));
708 return bl::audio::AudioSystem::getOrLoadSound(
709 bl::util::FileUtil::joinPath(
SoundPath(),
"Menu/moveFail.wav"));
713 return bl::audio::AudioSystem::getOrLoadSound(
714 bl::util::FileUtil::joinPath(
SoundPath(),
"Menu/back.wav"));
Ailment
Represents an ailment that a Peoplemon can have.
Gender
Possible genders for the player.
Core classes and functionality for both the editor and game.
static const std::string & MoveDBFile()
static int LightRainLightModifier()
static void save()
Saves the config to the data file.
static const std::string & AnimationPath()
static int SunnyLightModifier()
static const std::string & SandSwirlFile()
static const std::string & ItemSprite()
static const std::string & RainSplash2File()
static bl::audio::AudioSystem::Handle MenuMoveFailSound()
static const sf::VulkanFont & MenuFont()
static const std::string & NpcFileExtension()
static const std::string & MapAnimationPath()
static const std::string & TrainerPath()
static int HardRainLightModifier()
static int HardSnowLightModifier()
static const std::string & LightRainSoundFile()
static int SandstormLightModifier()
static const std::string & ConversationPath()
static const std::string & ScriptPath()
static bl::audio::AudioSystem::Handle MenuBackSound()
static float InfrequentThunderMaxInterval()
static int ThickFogLightModifier()
static const std::string & HardRainSoundFile()
static const std::string & MapPath()
static int PixelsPerTile()
static const std::string & ConversationFileExtension()
static unsigned int HardRainParticleCount()
static float CharacterSpinPeriod()
static const std::string & PeoplemonDBFile()
static std::string AilmentTexture(pplmn::Ailment ailment)
static const std::string & MusicPath()
static const std::string & ThunderSoundFile()
static const std::string & MapTilePath()
static const std::string & PlayerAnimations(player::Gender gender)
static unsigned int ThinFogAlpha()
static unsigned int LightSnowParticleCount()
static unsigned int WildPeoplemonChance()
static const std::string & SandPatchFile()
static float CharacterMoveSpeed()
static const std::string & NpcPath()
static float FrequentThunderMinInterval()
static const std::string & SoundPath()
static const std::string & TilesetPath()
static bl::audio::AudioSystem::Handle MenuMoveSound()
static const std::string & TrainerExclaimSound()
static float FrequentThunderMaxInterval()
static const std::string & FogFile()
static const std::string & MenuImagePath()
static sf::Vector2f WindowSize()
static const std::string & SpritesheetPath()
static const std::string & RainSplash1File()
static const std::string & CharacterAnimationPath()
static float InfrequentThunderMinInterval()
static const std::string & TextboxFile()
static int LightingWidthTiles()
static sf::Color HPBarColor(float percent)
static float FastCharacterMoveSpeed()
static int LightingHeightTiles()
static const std::string & TrainerFileExtension()
static int WindowHeight()
static int ExtraRenderTiles()
static const std::string & RainDropFile()
static float GhostWriterSpeed()
static const std::string & PlaylistPath()
static const std::string & ImagePath()
static unsigned int LightRainParticleCount()
static const std::string & SaveExtension()
static const std::string & ItemMetadataFile()
static unsigned int ThickFogAlpha()
static const std::string & SnowFlakeFile()
static bool load(bool inEditor)
Loads from the config file and sets defaults. Must be called before using any properties.
static const std::string & PeoplemonImageFolder()
static const std::string & LegacyPeoplemonPath()
static int ThinFogLightModifier()
static float ScreenFadePeriod()
static unsigned int HudFontSize()
static unsigned int HardSnowParticleCount()
static const std::string & SaveDirectory()
static const std::string & WindowIconFile()
static int LightSnowLightModifier()
static const std::string & TrainerExclaimImage()