@@ -34,7 +34,6 @@ game = executable(
'src/game/SinglePlayer.c',
'src/game/game_common.c',
'src/game/pong.c',
- 'src/game/screen.c',
common_src,
include_directories: [
common_include
@@ -6,7 +6,7 @@
#include "cglm/vec3.h"
#include "MainMenu.h"
-#include "screen.h"
+#include "game_common.h"
MainMenu MainMenu_alloc(const unsigned int screen_w, const unsigned int screen_h) {
MainMenu mm;
@@ -2,7 +2,7 @@
#include "scufeng/Shape.h"
typedef struct {
SEMesh title_text;
@@ -3,7 +3,7 @@
#include "scufeng/Scene.h"
#include "SinglePlayer.h"
SinglePlayer SinglePlayer_alloc(
unsigned int screen_w,
#include "game.h"
unsigned int screen_w;
@@ -4,6 +4,8 @@
#include "game_common.h"
+Screen current_screen = PONG_MAIN_MENU;
+
static void pos_convert(
vec3 render_pos,
const vec3 state_pos,
@@ -4,6 +4,14 @@
+typedef enum {
+ PONG_MAIN_MENU,
+ PONG_SINGLEPLAYER,
+ PONG_MULTIPLAYER,
+} Screen;
+extern Screen current_screen;
SEMesh paddle_l;
SEMesh paddle_r;
@@ -1,7 +1,6 @@
#include "scufeng/engine.h"
#include "scufeng/text.h"
#include "MultiPlayer.h"
@@ -1,3 +0,0 @@
-
-Screen current_screen = PONG_MAIN_MENU;
@@ -1,9 +0,0 @@
-#pragma once
-typedef enum {
- PONG_MAIN_MENU,
- PONG_SINGLEPLAYER,
- PONG_MULTIPLAYER,
-} Screen;
-extern Screen current_screen;