GameEngine/include/engine.h

90 lines
1.6 KiB
C

#ifndef ENGINE_H
# define ENGINE_H
#include <render.h>
#include <event.h>
#include <entity.h>
#include <damage.h>
#include <item.h>
#include <quest.h>
#include <skill.h>
#include <player.h>
typedef enum {
CRITICAL_FAIL,
FAIL,
SUCCESS,
CRITICAL_SUCCESS,
} CHECK_STATE;
typedef enum {
SPLASH_SCREEN,
GAMELOOP_SCREEN,
CREDIT_SCREEN,
GAMEOVER_SCREEN,
SERVER_SCREEN,
SECRET_SCREEN,
DEBUG_SCREEN,
} ENGINE_STATE_E;
typedef struct {
int key[4];//should be the number of action in PLAYER_ACTION
union {
int key;
int pad;
int mouse;
} press;
Vector2 mouse_pos;
Vector2 mouse_delta;
//int mouse_pressed[2];
} Input;
typedef struct {
int state;
Player player;
Assets assets;
} Context;
//cities
//hideout
//tiles
//level
//npc
//clan
//army
//team
//typedef struct {
// EVENT_TYPE trigger;
// ACTIVITY_STATE required_state;
// bool (*condition)(int e, Event ev);
// void *(*effect)(int e, Event ev);
//} virtualRule;
//typedef struct {
// EVENT_TYPE trigger;
// ACTIVITY_STATE required_state;
// bool (*condition)(int e, Event ev);
// void *(*effect)(int e, Event ev);
//} physicalRule;
//Render
Assets LoadAssets(void);
void UnloadAssets(const Assets *assets);
void LoadPipeline();
void UnloadPipeline();
void RenderingDeferred3D(const Scene* scene, const ModelRegistry *models, const AnimationRegistry *animations, const TextureRegistry *textures, const FontRegistry *fonts);
//UI
void UserInterface(const Player *player);
//void Menu();
void EngineStateSwitch(ENGINE_STATE_E engine_state);
void GameLoop(const double tick_time);
//other stuff here
#endif