Implemented some basic UI
This commit is contained in:
40
src/model/Configuration.h
Normal file
40
src/model/Configuration.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Settings.h
|
||||
*
|
||||
* Created on: Nov 13, 2016
|
||||
* Author: tibi
|
||||
*/
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
namespace farmlands {
|
||||
namespace model {
|
||||
|
||||
struct KeyConfiguration
|
||||
{
|
||||
SDL_Scancode Right = SDL_SCANCODE_RIGHT;
|
||||
SDL_Scancode Up = SDL_SCANCODE_UP;
|
||||
SDL_Scancode Left = SDL_SCANCODE_LEFT;
|
||||
SDL_Scancode Down = SDL_SCANCODE_DOWN;
|
||||
|
||||
SDL_Scancode AltRight = SDL_SCANCODE_D;
|
||||
SDL_Scancode AltUp = SDL_SCANCODE_W;
|
||||
SDL_Scancode AltLeft = SDL_SCANCODE_A;
|
||||
SDL_Scancode AltDown = SDL_SCANCODE_S;
|
||||
|
||||
SDL_Scancode Action = SDL_SCANCODE_SPACE;
|
||||
SDL_Scancode Action2 = SDL_SCANCODE_LCTRL;
|
||||
SDL_Scancode Run = SDL_SCANCODE_LSHIFT;
|
||||
|
||||
SDL_Scancode Debug_ZoomIn = SDL_SCANCODE_KP_PLUS;
|
||||
SDL_Scancode Debug_ZoomOut = SDL_SCANCODE_KP_MINUS;
|
||||
};
|
||||
|
||||
struct Configuration
|
||||
{
|
||||
KeyConfiguration keys;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
31
src/model/Direction.h
Normal file
31
src/model/Direction.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Direction.h
|
||||
*
|
||||
* Created on: Nov 27, 2016
|
||||
* Author: tibi
|
||||
*/
|
||||
|
||||
#ifndef MODEL_DIRECTION_H_
|
||||
#define MODEL_DIRECTION_H_
|
||||
|
||||
namespace farmlands {
|
||||
namespace model {
|
||||
|
||||
enum Direction
|
||||
{
|
||||
East = 0,
|
||||
NorthEast = 1,
|
||||
North = 2,
|
||||
NorthWest = 3,
|
||||
West = 4,
|
||||
SouthWest = 5,
|
||||
South = 6,
|
||||
SouthEast = 7
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* MODEL_DIRECTION_H_ */
|
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Settings.h
|
||||
*
|
||||
* Created on: Nov 13, 2016
|
||||
* Author: tibi
|
||||
*/
|
||||
namespace farmlands {
|
||||
namespace model {
|
||||
|
||||
struct GameConfig
|
||||
{
|
||||
float graphics_Scale;
|
||||
float graphics_UiScale;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -16,6 +16,8 @@ namespace model {
|
||||
struct Player
|
||||
{
|
||||
float posX, posY;
|
||||
|
||||
int inventorySelection = -1;
|
||||
int inventory[PLAYER_INVENTORY_SIZE];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user