aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-12-22 02:13:13 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-12-22 02:13:13 -0700
commitad66d7ade0528829a48ac4426d952ec882ef4329 (patch)
treea5f2b6b4d74575b4718c84c99c8861d696cb2046 /src
parent18c26edd6bae8ce5bd26e0ab632086725f492871 (diff)
Started working on info screen
Diffstat (limited to 'src')
-rw-r--r--src/game.c7
-rw-r--r--src/game.h7
-rw-r--r--src/screens/infoScreen.c11
-rw-r--r--src/screens/infoScreen.h13
4 files changed, 36 insertions, 2 deletions
diff --git a/src/game.c b/src/game.c
index e39901e..a5bec7b 100644
--- a/src/game.c
+++ b/src/game.c
@@ -22,6 +22,9 @@ void initGame(Game * game) {
// How to play screen.
initHowToPlayScreen(game);
+ // Info screen.
+ initInfoScreen(game);
+
// Camera.
initCameras(game, game->cameras);
@@ -68,6 +71,10 @@ void updateGame(Game * game) {
break;
case HOW_TO_PLAY_SCREEN:
updateHowToPlayScreen(game);
+ break;
+ case INFO_SCREEN:
+ updateInfoScreen(game);
+ break;
default:
break;
}
diff --git a/src/game.h b/src/game.h
index e93afc9..b3094c2 100644
--- a/src/game.h
+++ b/src/game.h
@@ -1,6 +1,8 @@
#include "gameCommon.h"
#include "screens/mainMenu.h"
#include "screens/gameScreen.h"
+#include "screens/howToPlayScreen.h"
+#include "screens/infoScreen.h"
#include "cameras.h"
#include "entity.h"
#include "assets.h"
@@ -9,7 +11,6 @@
#include "bullets.h"
#include "levels.h"
#include "killLog.h"
-#include "screens/howToPlayScreen.h"
#ifndef GAME_H
#define GAME_H
@@ -17,7 +18,8 @@
typedef enum ScreenId {
SCREEN_MAIN_MENU,
SCREEN_GAME,
- HOW_TO_PLAY_SCREEN
+ HOW_TO_PLAY_SCREEN,
+ INFO_SCREEN
} ScreenId;
typedef struct Game {
@@ -25,6 +27,7 @@ typedef struct Game {
MainMenu mainMenu;
GameScreen gameScreen;
HowToPlayScreen howToPlayScreen;
+ InfoScreen infoScreen;
Cameras cameras;
Assets assets;
World world;
diff --git a/src/screens/infoScreen.c b/src/screens/infoScreen.c
new file mode 100644
index 0000000..8d991ed
--- /dev/null
+++ b/src/screens/infoScreen.c
@@ -0,0 +1,11 @@
+#include "infoScreen.h"
+#include "game.h"
+
+void initInfoScreen(Game * game) {
+}
+
+void updateInfoScreen(Game * game) {
+}
+
+void resizeInfoScreen(Game * game, InfoScreen * infoScreen) {
+}
diff --git a/src/screens/infoScreen.h b/src/screens/infoScreen.h
new file mode 100644
index 0000000..83a8059
--- /dev/null
+++ b/src/screens/infoScreen.h
@@ -0,0 +1,13 @@
+#include "gameCommon.h"
+
+#ifndef INFO_SCREEN_H
+#define INFO_SCREEN_H
+
+typedef struct InfoScreen {
+} InfoScreen;
+
+void initInfoScreen(Game * game);
+void updateInfoScreen(Game * game);
+void resizeInfoScreen(Game * game, InfoScreen * infoScreen);
+
+#endif