91 lines
1.5 KiB
C
91 lines
1.5 KiB
C
/*
|
|
* DESCRIPTION:
|
|
* Global variable and constants.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "engine/event.h"
|
|
#include "engine/font.h"
|
|
#include "engine/io.h"
|
|
#include "engine/glyph.h"
|
|
#include "engine/keyboard.h"
|
|
#include "engine/mouse.h"
|
|
#include "engine/music.h"
|
|
#include "engine/renderer.h"
|
|
#include "engine/sound.h"
|
|
#include "engine/tick.h"
|
|
#include "engine/window.h"
|
|
|
|
#include "game/ecs/ECS_TYPES.h"
|
|
#include "game/state/STATE_TYPES.h"
|
|
|
|
#define TEXTURE_COUNT TEXTURE_LOGO + 1
|
|
enum TextureType
|
|
{
|
|
TEXTURE_PLAYER,
|
|
TEXTURE_FOLLOWER,
|
|
TEXTURE_ENEMY,
|
|
TEXTURE_PARTICLE,
|
|
TEXTURE_WARNING,
|
|
TEXTURE_LOGO
|
|
};
|
|
|
|
#define SOUND_COUNT SOUND_SELECT + 1
|
|
enum SoundType
|
|
{
|
|
SOUND_COLLIDE,
|
|
SOUND_HURT,
|
|
SOUND_LEVEL,
|
|
SOUND_WARNING,
|
|
SOUND_HOVER,
|
|
SOUND_SELECT
|
|
};
|
|
|
|
#define MUSIC_COUNT MUSIC_ETHNICA + 1
|
|
enum MusicType
|
|
{
|
|
MUSIC_ETHNICA
|
|
};
|
|
|
|
#define SHADER_COUNT SHADER_TEXTURE_QUAD + 1
|
|
enum ShaderType
|
|
{
|
|
SHADER_TEXTURE_QUAD
|
|
};
|
|
|
|
#define FONT_COUNT FONT_BIG + 1
|
|
enum FontType
|
|
{
|
|
FONT_SMALL,
|
|
FONT_BIG
|
|
};
|
|
|
|
struct Game
|
|
{
|
|
enum StateType state;
|
|
struct Camera camera;
|
|
struct ECS ecs;
|
|
struct Event event;
|
|
struct Keyboard keyboard;
|
|
struct Mouse mouse;
|
|
struct Renderer renderer;
|
|
struct Sound sounds[SOUND_COUNT];
|
|
struct Texture textures[TEXTURE_COUNT];
|
|
struct Music music[MUSIC_COUNT];
|
|
struct Shader shaders[SHADER_COUNT];
|
|
struct Font fonts[FONT_COUNT];
|
|
struct Tick tick;
|
|
struct Window window;
|
|
struct Play play;
|
|
struct Menu menu;
|
|
struct Results results;
|
|
u32 score;
|
|
vec4 bounds;
|
|
bool isQuit;
|
|
bool isPaused;
|
|
bool isMute;
|
|
};
|
|
|
|
extern struct Game game;
|