diff options
author | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-06-17 00:03:18 +0200 |
---|---|---|
committer | Anna (navi) Figueiredo Gomes <navi@vlhl.dev> | 2024-06-17 00:03:18 +0200 |
commit | 6543fecd7b45cc0232aa4148d0a7be125f4c49ea (patch) | |
tree | a35a4a20f7d7a091169b3927846bcdf317887b28 /include/content.h | |
parent | 79b3a25865a1ee444fa32698670320f87dbc45a7 (diff) | |
download | silly_game-6543fecd7b45cc0232aa4148d0a7be125f4c49ea.tar.xz |
*: restructure into subdirectoires and add REUSE
Diffstat (limited to 'include/content.h')
-rw-r--r-- | include/content.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/content.h b/include/content.h new file mode 100644 index 0000000..ac20e7e --- /dev/null +++ b/include/content.h @@ -0,0 +1,49 @@ +// SPDX-FileCopyrightText: 2024 Lizzy Fleckenstein <lizzy@vlhl.dev> +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +#ifndef CONTENT_H +#define CONTENT_H + +typedef enum { + N_VALLEY_FLOWER, + N_MOUNTAIN_FLOWER, + N_BIG_TREE, + N_NEEDLE_TREE, + N_ROCK, + N_WATER, + N_PLANK, + N_PATH, +} node_type; + +typedef struct { + uint8_t r, g, b; +} color; + +typedef struct { + bool present; + node_type type; + int8_t z; // for rocks, indicates rock level + color col; +} node; + +typedef enum { + MOVE_UP, + MOVE_DOWN, + MOVE_LEFT, + MOVE_RIGHT, +} move_dir; + +typedef enum { + CPKT_HI, // len motd + CPKT_PLAYERS, // len + CPKT_MOVE, // player_id remove x y z + CPKT_NODES, // z x y w h [node] +} client_pkt; + +typedef enum { + SPKT_HI, // len name len password + SPKT_MOVE, // move_dir +} server_pkt; + +#endif |