definitions verschoben

main
Jan 3 years ago
parent 152aff090c
commit f515432af0

@ -1,6 +1,5 @@
#include "button.h"
#include "../game.h"
#include "screenIDs.h"
#include "stdio.h"
#include "stdlib.h"
#include "raylib.h"
@ -33,7 +32,6 @@ void ButtonExecuteButton(Button *button, Game *game){
game->screen = SCREEN_GAME;
break;
case BUTTON_ID_EXIT:
// wahrscheinlich kein guter stil, es muss noch zeug freigegeben werden oder soos... keine Ahnung
game->screen = SCREEN_EXIT;
break;
case BUTTON_ID_START_GAME:

@ -4,15 +4,6 @@
#include "raylib.h"
#include "../game.h"
#define BUTTON_STATE_DEFAULT 0 // button is just there
#define BUTTON_STATE_HOVERED 1 // mouse is being hovered over the button
#define BUTTON_STATE_PRESSED 2 // left mouse button is down while hovering the button
#define BUTTON_STATE_RELEASED 3 // left mouse button is released while hovering the button, button code will be executed
#define BUTTON_ID_CONTINUE 0 // going to game screen, supposed to be used from pause screen
#define BUTTON_ID_EXIT 1 // closing the game using exit code 0
#define BUTTON_ID_START_GAME 2 // going to game screen, supposed to be used from mainmenu screen
typedef struct Button{
Texture2D textures[4]; // [0]: Normal [1]: Hovered [2]: Pressed [3]: Released
Vector2 position; // Linke obere Ecke des Buttons

@ -4,7 +4,6 @@
#include "../game.h"
#include "uiContainer.h"
#define DEBUG_FONT_SIZE 20 // Font size of the Debug window
// Drawed das Debug Fenster in die obere Linke Ecke
void DebugDraw(Game *game);

@ -1,13 +0,0 @@
#ifndef SCREENIDS_H_
#define SCREENIDS_H_
// Keinen Platz zwischen den IDs lassen! Jede Zahl nutzen!
#define SCREEN_AMOUNT 5 // AUCH IN GAME.H ÄNDERN!!!
#define SCREEN_EXIT 0 // Will exit the game using code 0
#define SCREEN_MAINMENU 1
#define SCREEN_OPTIONS 2
#define SCREEN_GAME 3
#define SCREEN_PAUSE 4
#endif

@ -4,11 +4,6 @@
#include "raylib.h"
#include "../game.h"
#define SELECTABLE_STATE_DEFAULT 0
#define SELECTABLE_STATE_HOVERED 1
#define SELECTABLE_STATE_SELECTED 2
#define SELECTABLE_ID_TEST 0
typedef struct Selectable{
Vector2 position; // Linke obere Ecke

@ -4,7 +4,6 @@
#include "raylib.h"
#include "stdlib.h"
#include "stdio.h"
#include "screenIDs.h"
static UiContainer * UiContainerInitEmptyUiContainer(){
UiContainer *uiContainer = malloc(sizeof(UiContainer));

@ -32,5 +32,33 @@
#define AN_ENTITY_DIE 2
// Definitions for Screen / View / Ui Stuff
#define DEBUG_FONT_SIZE 20
#define SCREEN_AMOUNT 5
#define SCREEN_EXIT 0 // Will exit the game using code 0
#define SCREEN_MAINMENU 1
#define SCREEN_OPTIONS 2
#define SCREEN_GAME 3
#define SCREEN_PAUSE 4
#define BUTTON_STATE_DEFAULT 0
#define BUTTON_STATE_HOVERED 1
#define BUTTON_STATE_PRESSED 2
#define BUTTON_STATE_RELEASED 3
#define BUTTON_ID_CONTINUE 0
#define BUTTON_ID_EXIT 1
#define BUTTON_ID_START_GAME 2
#define SELECTABLE_STATE_DEFAULT 0
#define SELECTABLE_STATE_HOVERED 1
#define SELECTABLE_STATE_SELECTED 2
#define SELECTABLE_ID_TEST 0
#endif

@ -6,7 +6,6 @@
#include "IsometricMap/isometricMap.h"
#include "Textures/textureatlas.h"
#include "stdio.h"
#include "Ui/screenIDs.h"
#include "Entity/entity.h"
#include "MapObject/mapobject.h"
#include "Ui/uiContainer.h"

@ -2,8 +2,8 @@
#define GAME_H_
#include "raylib.h"
#include "definitions.h"
#define SCREEN_AMOUNT 5 //AUCH IN SCREENIDS ÄNDERN
typedef struct Game{
Texture2D worker[8];

@ -8,7 +8,6 @@
#include "raymath.h"
#include "IsometricMap/isometricMap.h"
#include "game.h"
#include "Ui/screenIDs.h"
#include "Ui/button.h"
#include "Ui/uiContainer.h"
#include "Ui/debug.h"

Loading…
Cancel
Save