Tested some island and unicode rendering.
This commit is contained in:
@@ -1,22 +1,35 @@
|
||||
#pragma once
|
||||
/**
|
||||
* Copyright (c) 2014, Miguel Angel Astor Romero. All rights reserved.
|
||||
* See the file LICENSE for more details.
|
||||
*/
|
||||
|
||||
#ifndef STATE_CONSTS_H
|
||||
#define STATE_CONSTS_H
|
||||
|
||||
static const int BAR_COLOR = 1;
|
||||
static const int BSC_COLOR = 2;
|
||||
static const int HLT_COLOR = 3;
|
||||
static const int OFF_COLOR = 4;
|
||||
static const int DIM_COLOR = 5;
|
||||
static const int LIT_COLOR = 6;
|
||||
static const int GUI_COLOR = 7;
|
||||
static const int EMP_COLOR = 8;
|
||||
#if defined(_WIN32) || defined(_WIN64) || defined(__MINGW32__)
|
||||
#define F_SEP "\\"
|
||||
#elif defined(__linux__) || defined(__GNUC__)
|
||||
#define F_SEP "/"
|
||||
#else
|
||||
#error "Unrecognized system."
|
||||
#endif
|
||||
|
||||
static const int INTRO_STATE = 0;
|
||||
static const int MENU_STATE = 1;
|
||||
static const int LOAD_STATE = 2;
|
||||
static const int SCORE_STATE = 3;
|
||||
static const int GAME_STATE = 4;
|
||||
|
||||
static const int QUIT_STATE = -1;
|
||||
enum COLORS {
|
||||
BAR_COLOR = 1,
|
||||
BSC_COLOR,
|
||||
HLT_COLOR,
|
||||
OFF_COLOR,
|
||||
DIM_COLOR,
|
||||
LIT_COLOR,
|
||||
GUI_COLOR,
|
||||
EMP_COLOR,
|
||||
DW_COLOR,
|
||||
SW_COLOR,
|
||||
SN_COLOR,
|
||||
GR_COLOR,
|
||||
FR_COLOR,
|
||||
HL_COLOR,
|
||||
MN_COLOR
|
||||
};
|
||||
|
||||
#endif
|
||||
|
22
include/game_state.h
Normal file
22
include/game_state.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2014, Miguel Angel Astor Romero. All rights reserved.
|
||||
* See the file LICENSE for more details.
|
||||
*/
|
||||
|
||||
#ifndef GAME_STATE_H
|
||||
#define GAME_STATE_H
|
||||
|
||||
static const int NUM_STATES = 4;
|
||||
|
||||
typedef enum GAME_STATE_NAMES { INTRO = 0, MENU = 1, IN_GAME = 2, GAME_OVER = 3 } gsname_t;
|
||||
|
||||
typedef struct GAME_STATE {
|
||||
gsname_t name;
|
||||
void (*input)();
|
||||
gsname_t (*update)();
|
||||
void (*render)(int, int);
|
||||
} gs_t;
|
||||
|
||||
extern void initStateArray(gs_t **);
|
||||
|
||||
#endif
|
13
include/in_game.h
Normal file
13
include/in_game.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) 2014, Miguel Angel Astor Romero. All rights reserved.
|
||||
* See the file LICENSE for more details.
|
||||
*/
|
||||
|
||||
#ifndef IN_GAME_H
|
||||
#define IN_GAME_H
|
||||
|
||||
#include "game_state.h"
|
||||
|
||||
extern void initInGameState(gs_t *);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user