windmill-gint/src/game.hpp

94 lines
1.4 KiB
C++

#ifndef DEF_GAME
#define DEF_GAME
extern "C"
{
#define __BSD_VISIBLE 1
#include <openlibm.h>
//#include "MonochromeLib.h"
}
//#include "camera.hpp"
//#include "Structures.hpp"
#include "windmill.hpp"
//#include "Scene_Map.hpp"
//#include "Debug.hpp"
//#include "Toolbox.h"
#define MAP_EXTERIOR_LIMIT 1000
#define COL_NO 0
#define COL_GROUND 1
#define COL_WALL 2
#define COL_ON 3
#define COL_CARA 4
#define COL_BOUND 5
class Player
{
public:
Player();
void teleport(float _x, float _y, float _z, float _yaw, float _pitch);
float x, y, z, yaw, pitch;
bool moving, jumping, turning;
float height;
float total_height;
float belly;
float action_distance;
float translation_speed;
float rotation_speed;
float jump_speed;
float translation_speed_max;
float translation_acceleration;
float rotation_speed_max;
float jump_speed_max;
bool dissociate_camera;
bool can_move;
};
class Game
{
public:
Game();
void new_game();
// bool player_close_to(float x, float y);
// bool player_close_to(Object* object);
// bool player_contact_with(Object* object);
//Object* get_object(int id);
//Collision_flag collision(float* new_x, float* new_y, float* new_z);
//bool CollisionDroiteSeg(Vecteur wall, Vecteur player);
Map *map;
Player player;
float time_game;
bool* switchs[100];
float* variables[100];
//float time_map;
};
#endif