/
Utils.h
42 lines (34 loc) · 1.34 KB
/
Utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) 2013 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#ifndef HG_UTILS
#define HG_UTILS
#include <string>
#include <sstream>
#include <unordered_set>
#include <jsoncpp/json.h>
#include <jsoncpp/reader.h>
#include <SFML/Graphics.hpp>
#include <SSVStart/SSVStart.h>
#include "SSVOpenHexagon/Data/LevelData.h"
#include "SSVOpenHexagon/Data/ProfileData.h"
#include "SSVOpenHexagon/Data/MusicData.h"
#include "SSVOpenHexagon/Data/StyleData.h"
namespace hg
{
namespace Utils
{
sf::Color getColorFromHue(double mHue);
sf::Color getColorDarkened(sf::Color mColor, float mMultiplier);
sf::Color getColorFromJsonArray(Json::Value mArray);
LevelData loadLevelFromJson(Json::Value mRoot);
MusicData loadMusicFromJson(const Json::Value& mRoot);
StyleData loadStyleFromJson(Json::Value mRoot);
ProfileData loadProfileFromJson(const Json::Value& mRoot);
std::string getLocalValidator(const std::string& mId, float mDifficultyMult);
void shakeCamera(ssvu::TimelineManager& mTimelineManager, ssvs::Camera& mCamera);
std::unordered_set<std::string> getIncludedLuaFileNames(const std::string& mLuaScript);
void recursiveFillIncludedLuaFileNames(std::unordered_set<std::string>& mLuaScriptNames, const std::string& mPackPath, const std::string& mLuaScript);
}
}
#endif