Browse Source

Move the rest of the stuff to common.c

rexim 1 week ago
parent
commit
48fa39f5d2
3 changed files with 8 additions and 21 deletions
  1. 7 0
      common.c
  2. 0 17
      main.c
  3. 1 4
      main_rgfw.c

+ 7 - 0
common.c

@@ -1,5 +1,12 @@
+#include "./digits.h"
+
+#ifdef PENGER
+#include "./penger_walk_sheet.h"
+#endif
+
 #include <math.h>
 
+#define FPS 60
 #define COLON_INDEX 10
 #define SPRITE_CHAR_WIDTH (300 / 2)
 #define SPRITE_CHAR_HEIGHT (380 / 2)

+ 0 - 17
main.c

@@ -7,23 +7,6 @@
 
 #include <SDL2/SDL.h>
 
-#include "./digits.h"
-
-#ifdef PENGER
-#include "./penger_walk_sheet.h"
-#endif
-
-#define FPS 60
-//#define DELTA_TIME (1.0f / FPS)
-#define SPRITE_CHAR_WIDTH (300 / 2)
-#define SPRITE_CHAR_HEIGHT (380 / 2)
-#define CHAR_WIDTH (300 / 2)
-#define CHAR_HEIGHT (380 / 2)
-#define CHARS_COUNT 8
-#define TEXT_WIDTH (CHAR_WIDTH * CHARS_COUNT)
-#define TEXT_HEIGHT (CHAR_HEIGHT)
-#define COLON_INDEX 10
-
 #include "common.c"
 
 void secc(int code)

+ 1 - 4
main_rgfw.c

@@ -4,12 +4,9 @@
 #include "RGFW.h"
 #define GL_GLEXT_PROTOTYPES
 #include <GL/glext.h>
-
-#include "digits.h"
-#include "penger_walk_sheet.h"
+#include "glextloader.c"
 
 #include "common.c"
-#include "glextloader.c"
 
 const char *vert_shader =
     "#version 330\n"