mirror of
https://gitlab.com/raylibtemplates/rt.git
synced 2026-06-28 11:15:21 -04:00
Separate constants into new file
This commit is contained in:
7
src/consts.c
Normal file
7
src/consts.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "consts.h"
|
||||
|
||||
const int SCREEN_WIDTH = 320;
|
||||
const int SCREEN_HEIGHT = 240;
|
||||
|
||||
const int WIN_WIDTH = 1280;
|
||||
const int WIN_HEIGHT = 720;
|
||||
5
src/consts.h
Normal file
5
src/consts.h
Normal file
@@ -0,0 +1,5 @@
|
||||
extern const int SCREEN_WIDTH;
|
||||
extern const int SCREEN_HEIGHT;
|
||||
|
||||
extern const int WIN_WIDTH;
|
||||
extern const int WIN_HEIGHT;
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "consts.h"
|
||||
#include "raylib.h"
|
||||
#include "raymath.h"
|
||||
#include <math.h>
|
||||
@@ -9,11 +10,6 @@
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#define SCREEN_WIDTH (320)
|
||||
#define SCREEN_HEIGHT (240)
|
||||
#define WIN_WIDTH (1280)
|
||||
#define WIN_HEIGHT (720)
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user