summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Level.h2
-rw-r--r--src/LuaApi.h2
-rw-r--r--src/MessageBox.h7
-rw-r--r--src/linux/res.h9
-rw-r--r--src/windows/res.h3
5 files changed, 10 insertions, 13 deletions
diff --git a/src/Level.h b/src/Level.h
index f0cec68..a0b571e 100644
--- a/src/Level.h
+++ b/src/Level.h
@@ -45,7 +45,7 @@ struct Pos {
int x;
int y;
sf::RectangleShape sprite;
-} typedef Pos;
+};
class Level {
diff --git a/src/LuaApi.h b/src/LuaApi.h
index 43bd50f..9da5c0a 100644
--- a/src/LuaApi.h
+++ b/src/LuaApi.h
@@ -36,7 +36,7 @@ struct LState {
lua_State *onintro;
lua_State *onwin;
lua_State *onloss;
-} typedef LState;
+};
const char *ON_KEYPRESS = "onKeyPress";
const char *ON_UPDATE = "onUpdate";
diff --git a/src/MessageBox.h b/src/MessageBox.h
index def138c..e1608a7 100644
--- a/src/MessageBox.h
+++ b/src/MessageBox.h
@@ -30,8 +30,8 @@
#include "SFML/Graphics/RectangleShape.hpp"
#include "SFML/Graphics/Text.hpp"
#include "SfmlUtils.h"
-#include <vector>
#include <limits>
+#include <vector>
const int LARGE_TEXT = 54;
const int MEDIUM_TEXT = 36;
@@ -42,13 +42,12 @@ struct MessageBox {
std::vector<sf::Text> msgs;
sf::RectangleShape box;
-
-} typedef MessageBox;
+};
struct DisplayText {
std::string msg;
int textSize;
-} typedef DisplayText;
+};
inline MessageBox initializeMessageBox(const std::vector<DisplayText> &strs,
const sf::Font &font,
diff --git a/src/linux/res.h b/src/linux/res.h
index 34ded54..3c61d1a 100644
--- a/src/linux/res.h
+++ b/src/linux/res.h
@@ -39,12 +39,9 @@ struct Res {
std::filesystem::path defaultsFile;
std::filesystem::path fontFile;
+};
-} typedef Res;
-
-inline const char* to_str(std::filesystem::path file) {
- return file.c_str();
-}
+inline const char *to_str(std::filesystem::path file) { return file.c_str(); }
inline Res get_resources() {
using namespace std::filesystem;
@@ -78,4 +75,6 @@ inline Res get_resources() {
return res;
}
+inline Res discover_levels() {}
+
#endif // DNG_RES_H \ No newline at end of file
diff --git a/src/windows/res.h b/src/windows/res.h
index 06b3209..9f8def3 100644
--- a/src/windows/res.h
+++ b/src/windows/res.h
@@ -40,8 +40,7 @@ struct Res {
std::filesystem::path defaultsFile;
std::filesystem::path fontFile;
-
-} typedef Res;
+};
inline const char *to_str(const std::filesystem::path &file) {
std::setlocale(LC_ALL, "en_US.utf8"); // TODO more support?