aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.hpp10
-rw-r--r--include/entities.hpp4
-rw-r--r--include/ui.hpp1
-rw-r--r--include/world.hpp13
4 files changed, 25 insertions, 3 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 f53f8e6..3bc2f98 100644
--- a/include/entities.hpp
+++ b/include/entities.hpp
@@ -147,10 +147,10 @@ public:
bool near; // Causes name to display
bool canMove; // Enables movement
- bool canJape; // Enables world leaving
bool right,left; // Direction faced by Entity
bool alive;
bool hit;
+ bool forcedMove;
unsigned char ground; // Shows how the Entity is grounded (if it is)
/*
@@ -173,6 +173,8 @@ public:
Texturec *tex;
Texturec *ntex;
+ float targetx;
+
unsigned int randDialog;
void draw(void);
diff --git a/include/ui.hpp b/include/ui.hpp
index 0ab76de..0142f6f 100644
--- a/include/ui.hpp
+++ b/include/ui.hpp
@@ -154,6 +154,7 @@ namespace ui {
void merchantBox();
void closeBox();
void waitForDialog(void);
+ bool pageExists( void );
void drawPage( std::string path );
/*
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 );
/**