aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.hpp10
-rw-r--r--include/entities.hpp2
-rw-r--r--include/world.hpp13
3 files changed, 23 insertions, 2 deletions
diff --git a/include/common.hpp b/include/common.hpp
index 2abd9db..c9837dd 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -180,7 +180,13 @@ extern float VOLUME_SFX;
*/
#define DEBUG_printf( message, ...) DEBUG_prints(__FILE__, __LINE__, message, __VA_ARGS__ )
-void C(std::string m);
+
+#ifdef SEGFAULT
+#define C(x) std::cout << m << std::endl
+#else
+#define C(x)
+#endif
+
/**
* Defines pi for calculations that need it.
*/
@@ -241,7 +247,7 @@ void safeSetColorA(int r,int g,int b,int a);
unsigned int millis(void);
#endif // __WIN32__
-int getdir(const char *dir, std::vector<std::string> &files);
+int getdir(std::string dir, std::vector<std::string> &files);
void strVectorSortAlpha(std::vector<std::string> *v);
const char *readFile(const char *path);
diff --git a/include/entities.hpp b/include/entities.hpp
index e7864d0..7c1a254 100644
--- a/include/entities.hpp
+++ b/include/entities.hpp
@@ -177,6 +177,8 @@ public:
Texturec *tex;
Texturec *ntex;
+ float targetx;
+
unsigned int randDialog;
void draw(void);
diff --git a/include/world.hpp b/include/world.hpp
index d086687..40e4a38 100644
--- a/include/world.hpp
+++ b/include/world.hpp
@@ -17,12 +17,16 @@
#define GROUND_HILLINESS 10
+#define PLAYER_SPEED_CONSTANT 0.15f
+
/**
* Defines how many game ticks it takes for a day to elapse.
*/
#define DAY_CYCLE 12000
+#define Indoorp(x) ((IndoorWorld *)x)
+
/**
* The background type enum.
* This enum contains all different possibilities for world backgrounds; used
@@ -485,6 +489,7 @@ class IndoorWorld : public World {
private:
std::vector<std::vector<float>> floor;
+ std::vector<float> fstart;
void singleDetect( Entity *e );
@@ -493,6 +498,11 @@ public:
~IndoorWorld(void);
void addFloor( unsigned int width );
+ void addFloor( unsigned int width, unsigned int start );
+ bool moveToFloor( Entity *e, unsigned int _floor );
+
+ bool isFloorAbove( Entity *e );
+ bool isFloorBelow( Entity *e );
void draw(Player *p); // Draws the world (ignores layers)
};
@@ -537,6 +547,9 @@ public:
World *exitArena( Player *p );
};
+bool isCurrentWorldIndoors( void );
+float getIndoorWorldFloorHeight( void );
+
std::string getWorldWeatherStr( WorldWeather ww );
/**