121 lines
3.0 KiB
C++
121 lines
3.0 KiB
C++
/* ************************************************************************** */
|
||
/* _____ */
|
||
/* CEngine.hpp | ___| _ ____ ___ */
|
||
/* Project : C-Engine | |_ | | | __| / _ \ */
|
||
/* | _| | | | |= | __/ */
|
||
/* By: Fife <wasabifife@gmail.com> |_| |_| |_| \___| */
|
||
/* */
|
||
/* */
|
||
/* ************************************************************************** */
|
||
|
||
#ifndef CENGINE_HPP
|
||
#define CENGINE_HPP
|
||
|
||
extern "C" // Ajout des librairies externes au C-Engine
|
||
{
|
||
#include <fxlib.h>
|
||
#include <stdio.h>
|
||
#include <stdlib.h>
|
||
#include <string.h>
|
||
|
||
#include "otherlib/input.h"
|
||
#include "otherlib/MonochromeLib.h"
|
||
#include "otherlib/FonctionC.h"
|
||
}
|
||
|
||
#define rand_int(M) (rand() % (M))
|
||
#define rand_int_ab(m, M) ((rand() % ((M) - (m)) + (m))
|
||
#define abs(A) ((A) > 0 ? (A) : -(A))
|
||
#define sgn(A) ((A) > 0 ? 1 : -1)
|
||
#define deg2rad(V) ((V) * 3.1415 / 180)
|
||
#define rad2deg(V) ((V) * 180 / 3.1415)
|
||
|
||
//#define CE_ALL
|
||
#define CE_BASIC
|
||
#define CE_MAP
|
||
//#define CE_RPG
|
||
//#define CE_PLATEFORME
|
||
//#define CE_NETWORK
|
||
|
||
#ifdef CE_ALL
|
||
#define CE_BASIC
|
||
#define CE_RPG
|
||
#define CE_PLATEFORME
|
||
#define CE_NETWORK
|
||
#define CE_MAP
|
||
#endif
|
||
|
||
//*********Declaration**********//
|
||
|
||
#ifdef CE_BASIC
|
||
|
||
class Engine;
|
||
class Object;
|
||
|
||
class Transform;
|
||
class RigidBody;
|
||
class Render;
|
||
class Animation;
|
||
class Sprite;
|
||
class Script;
|
||
|
||
struct MassData
|
||
{
|
||
float mass;
|
||
float inv_mass;
|
||
};
|
||
|
||
struct Vec2
|
||
{
|
||
double x;
|
||
double y;
|
||
};
|
||
|
||
struct AABB
|
||
{
|
||
Vec2 min;
|
||
Vec2 max;
|
||
};
|
||
|
||
struct Body
|
||
{
|
||
Transform * transform;
|
||
MassData mass_data;
|
||
Vec2 velocity;
|
||
Vec2 acceleration;
|
||
Vec2 force;
|
||
};
|
||
#endif
|
||
|
||
#ifdef CE_MAP
|
||
|
||
class Level;
|
||
class World;
|
||
|
||
#endif
|
||
|
||
//********Include**********//
|
||
|
||
#ifdef CE_BASIC
|
||
#include "include\Engine.hpp"
|
||
#include "include\Object.hpp"
|
||
|
||
#include "include\Components\Transform.hpp" //Les composants de la class Object.
|
||
#include "include\Components\RigidBody.hpp"
|
||
#include "include\Components\Render.hpp"
|
||
#include "include\Components\Animation.hpp"
|
||
#include "include\Components\Sprite.hpp"
|
||
#include "include\Components\Script.hpp"
|
||
|
||
#endif
|
||
|
||
#ifdef CE_MAP
|
||
|
||
#include "include\Map\World.hpp" //Les diff<66>rents composant du d<>cor du jeu
|
||
#include "include\Map\Level.hpp"
|
||
|
||
#endif
|
||
|
||
|
||
#endif /* CENGINE_HPP */
|