changed settings class to display class just naming
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef DISPLAY_H
|
||||||
|
#define DISPLAY_H
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
const char* name;
|
||||||
|
} Display;
|
||||||
|
|
||||||
|
#endif // DISPLAY_H
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#ifndef SETTINGS_H
|
|
||||||
#define SETTINGS_H
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int screenWidth;
|
|
||||||
int screenHeight;
|
|
||||||
const char* name;
|
|
||||||
} Settings;
|
|
||||||
|
|
||||||
#endif // SETTINGS_H
|
|
||||||
+6
-8
@@ -3,7 +3,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "engine/screen.h"
|
#include "engine/screen.h"
|
||||||
#include "engine/settings.h"
|
#include "engine/display.h"
|
||||||
#include "engine/applicationstate.h"
|
#include "engine/applicationstate.h"
|
||||||
#include "game/logo.h"
|
#include "game/logo.h"
|
||||||
#include "game/menu.h"
|
#include "game/menu.h"
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
State state;
|
State state;
|
||||||
Settings settings;
|
Display display;
|
||||||
LogoState logo;
|
LogoState logo;
|
||||||
GameState game;
|
GameState game;
|
||||||
MenuState menu;
|
MenuState menu;
|
||||||
@@ -23,13 +23,11 @@ int main(void)
|
|||||||
app.state.currentScreen = LOGO;
|
app.state.currentScreen = LOGO;
|
||||||
app.state.running = true;
|
app.state.running = true;
|
||||||
app.state.gameStarted = false;
|
app.state.gameStarted = false;
|
||||||
app.settings = (Settings){
|
app.display.name = "The Last Hive";
|
||||||
.name = "The Last Hive",
|
app.display.width = 1280;
|
||||||
.screenWidth = 1280,
|
app.display.height = 720;
|
||||||
.screenHeight = 720
|
|
||||||
};
|
|
||||||
|
|
||||||
InitWindow(app.settings.screenWidth, app.settings.screenHeight, app.settings.name);
|
InitWindow(app.display.width, app.display.height, app.display.name);
|
||||||
|
|
||||||
InitLogo(&app.logo);
|
InitLogo(&app.logo);
|
||||||
InitMenu(&app.menu);
|
InitMenu(&app.menu);
|
||||||
|
|||||||
Reference in New Issue
Block a user