summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asset_defs.h11
-rw-r--r--include/guns.h7
-rw-r--r--include/math_helper.h1
-rw-r--r--include/overlay.h8
-rw-r--r--include/players.h6
5 files changed, 29 insertions, 4 deletions
diff --git a/include/asset_defs.h b/include/asset_defs.h
new file mode 100644
index 0000000..9e50895
--- /dev/null
+++ b/include/asset_defs.h
@@ -0,0 +1,11 @@
+#ifndef INCLUDE_ASSET_DEFS
+#define INCLUDE_ASSET_DEFS
+
+#include <projectbase/project_base.h>
+
+font* fnt_24;
+font* fnt_20;
+
+void load_assets();
+
+#endif \ No newline at end of file
diff --git a/include/guns.h b/include/guns.h
index 62d43df..0363cae 100644
--- a/include/guns.h
+++ b/include/guns.h
@@ -11,6 +11,7 @@ typedef enum t_gun_type {
typedef struct t_gun {
gun_type type;
+ char* name;
int magazine_size;
int max_ammunition;
float bullet_spread;
@@ -19,9 +20,9 @@ typedef struct t_gun {
} gun;
gun guns[GUN_ALL] = {
- {GUN_DESERTEAGLE, 8, 64, 0.0f, 1, 4.0f},
- {GUN_MP5, 30, 120, 0.1f, 1, 10.0f},
- {GUN_NOVA, 12, 80, 0.2f, 3, 1.2f},
+ {GUN_DESERTEAGLE, "Desert Eagle", 8, 64, 0.0f, 1, 4.0f},
+ {GUN_MP5, "MP5", 30, 120, 0.1f, 1, 10.0f},
+ {GUN_NOVA, "Nova", 12, 80, 0.2f, 3, 1.2f},
};
gun get_gun_by_type(gun_type type);
diff --git a/include/math_helper.h b/include/math_helper.h
index 7040086..b3a6cfe 100644
--- a/include/math_helper.h
+++ b/include/math_helper.h
@@ -10,6 +10,7 @@
#define MAP_RENDER_DEPTH renderer->set_render_depth(1);
#define BULLET_RENDER_DEPTH(_h) renderer->set_render_depth(5 + ceil(_h));
#define OBJECT_RENDER_DEPTH(_h) renderer->set_render_depth(5 + ceil(_h));
+#define OVERLAY_RENDER_DEPTH() renderer->set_render_depth(100);
bool onSegment(vec2f p, vec2f q, vec2f r);
int orientation(vec2f p, vec2f q, vec2f r);
diff --git a/include/overlay.h b/include/overlay.h
new file mode 100644
index 0000000..7441003
--- /dev/null
+++ b/include/overlay.h
@@ -0,0 +1,8 @@
+#ifndef INCLUDE_OVERLAY
+#define INCLUDE_OVERLAY
+
+#include <projectbase/project_base.h>
+
+void draw_overlay(platform_window* window);
+
+#endif \ No newline at end of file
diff --git a/include/players.h b/include/players.h
index 4e148c9..258a1fb 100644
--- a/include/players.h
+++ b/include/players.h
@@ -18,12 +18,16 @@ typedef struct t_player {
float gunx;
float guny;
float gun_height;
+ int total_ammo;
+ int ammo_in_mag;
gun_type guntype;
} player;
#include "protocol.h"
-u32 my_id = 1;
+u32 my_id = -1;
+
+camera _next_camera_pos;
int max_players = 10;
player players[10] = {0};