92 lines
2.6 KiB
C++
92 lines
2.6 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_RPG
|
|
//#define CE_PLATEFORME
|
|
//#define CE_NETWORK
|
|
|
|
#ifdef CE_ALL
|
|
#define CE_BASIC
|
|
#define CE_RPG
|
|
#define CE_PLATEFORME
|
|
#define CE_NETWORK
|
|
#endif
|
|
|
|
#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 Body
|
|
{
|
|
Transform * transform;
|
|
MassData mass_data;
|
|
Vec2 velocity;
|
|
Vec2 acceleration;
|
|
Vec2 force;
|
|
};
|
|
|
|
#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
|
|
|
|
#endif /* CENGINE_HPP */
|