summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/protocol.h12
-rw-r--r--include/zombies.h8
2 files changed, 16 insertions, 4 deletions
diff --git a/include/protocol.h b/include/protocol.h
index f02e873..a49aaab 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -13,6 +13,7 @@ typedef enum t_network_message_type
MESSAGE_ZOMBIE_LIST,
MESSAGE_USER_SHOOT,
MESSAGE_BULLET_LIST,
+ MESSAGE_DROP_LIST,
} network_message_type;
typedef struct t_protocol_generic_client_message
@@ -45,12 +46,20 @@ typedef struct t_protocol_user_list
player players[10];
} protocol_user_list;
+#include "zombies.h"
typedef struct t_protocol_zombie_list
{
network_message_type type;
- zombie zombies[20];
+ zombie zombies[MAX_ZOMBIES];
} protocol_zombie_list;
+#include "drops.h"
+typedef struct t_protocol_drop_list
+{
+ network_message_type type;
+ drop drops[MAX_DROPS];
+} protocol_drop_list;
+
typedef enum t_protocol_move_type
{
MOVE_UP,
@@ -100,6 +109,7 @@ network_message create_protocol_user_look(u32 id, float gunx, float guny);
network_message create_protocol_user_shoot(u32 id, float dirx, float diry);
network_message create_protocol_zombie_list();
network_message create_protocol_bullets_list();
+network_message create_protocol_drop_list();
array messages_received_on_server;
array messages_received_on_client;
diff --git a/include/zombies.h b/include/zombies.h
index df5e629..c99063e 100644
--- a/include/zombies.h
+++ b/include/zombies.h
@@ -24,14 +24,16 @@ typedef struct t_spawner {
float sec_since_last_spawn;
} spawner;
+#define MAX_SPAWNERS (3)
// data data that is stored on disk
-spawner spawner_tiles[2] = {
+spawner spawner_tiles[MAX_SPAWNERS] = {
{15, 5, 999},
{3, 8, 999},
+ {11, 18, 999},
};
-zombie zombies[20] = {0};
-int max_zombies = 20;
+#define MAX_ZOMBIES (50)
+zombie zombies[MAX_ZOMBIES] = {0};
void draw_spawners(platform_window* window);
void draw_zombies(platform_window* window);