aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjacob janzen <53062115+JacobJanzen@users.noreply.github.com>2024-02-14 15:52:57 -0600
committerGitHub <noreply@github.com>2024-02-14 21:52:57 +0000
commitb57c21da92563eed58867a9a6b02c201006cbc57 (patch)
treeb42a7654223d228c140870ef711b6f8e499de118 /include
parent7e249ef2644071ca56bdbf7820ca9a66fef23d3c (diff)
Automake (#2)
* gnu autotools build * ignore dist
Diffstat (limited to 'include')
-rw-r--r--include/cavegen.h26
-rw-r--r--include/common.h9
-rw-r--r--include/display.h43
-rw-r--r--include/entity.h13
-rw-r--r--include/ht.h29
5 files changed, 0 insertions, 120 deletions
diff --git a/include/cavegen.h b/include/cavegen.h
deleted file mode 100644
index b6ed1e4..0000000
--- a/include/cavegen.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef CAVEGEN_H_
-#define CAVEGEN_H_
-
-#include "common.h"
-
-#define HEIGHT 100
-#define WIDTH 180
-
-enum tile_type {
- WALL,
- GROUND,
- UP_STAIR,
- DOWN_STAIR,
-};
-
-struct map {
- enum tile_type *map;
- struct point entry_point;
-
- int width;
- int height;
-};
-
-void create_cave(struct map *map);
-
-#endif // CAVEGEN_H_
diff --git a/include/common.h b/include/common.h
deleted file mode 100644
index 11b11d4..0000000
--- a/include/common.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef COMMON_H_
-#define COMMON_H_
-
-struct point {
- int x;
- int y;
-};
-
-#endif // COMMON_H_
diff --git a/include/display.h b/include/display.h
deleted file mode 100644
index d9c66bb..0000000
--- a/include/display.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef DISPLAY_H_
-#define DISPLAY_H_
-
-#include <stdbool.h>
-
-#include "cavegen.h"
-#include "entity.h"
-#include "ht.h"
-
-#define MAIN_PANEL_WIDTH 100
-#define MAIN_PANEL_HEIGHT 41
-#define INSTRUCTION_PANEL_WIDTH 32
-#define INSTRUCTION_PANEL_HEIGHT 39
-#define MESSAGE_PANEL_WIDTH 100
-#define MESSAGE_PANEL_HEIGHT 3
-#define STATUS_PANEL_WIDTH 32
-#define STATUS_PANEL_HEIGHT 5
-
-typedef struct windows display_t;
-
-enum action {
- ACTION_NONE,
- ACTION_EXIT,
- ACTION_DOWN,
- ACTION_UP,
- ACTION_LEFT,
- ACTION_RIGHT,
- ACTION_STAIR_DOWN,
- ACTION_STAIR_UP,
- NUM_ACTIONS,
-};
-
-display_t *display_init(void);
-void display_destroy(display_t *disp);
-
-void display_map(display_t *disp, struct map *map, ht_t *entities);
-void display_instructions(display_t *disp);
-void display_message(display_t *disp, char *msg);
-void display_status(display_t *disp, struct entity *entity);
-
-enum action display_process_input(void);
-
-#endif // DISPLAY_H_
diff --git a/include/entity.h b/include/entity.h
deleted file mode 100644
index b003efe..0000000
--- a/include/entity.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef ENTITY_H_
-#define ENTITY_H_
-
-#include "common.h"
-
-struct entity {
- struct point p;
- char *disp_ch;
- bool solid;
- bool visible;
-};
-
-#endif // ENTITY_H_
diff --git a/include/ht.h b/include/ht.h
deleted file mode 100644
index ef15540..0000000
--- a/include/ht.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef HT_H_
-#define HT_H_
-
-#include <stdbool.h>
-
-typedef struct hash_table ht_t;
-
-struct kvp {
- char *key;
- void *val;
-};
-
-// construct and destructor
-ht_t *ht_create(int size);
-void ht_destroy(ht_t *h);
-
-// accessors
-void *ht_find(ht_t *h, char *key);
-void ht_insert(ht_t *h, char *key, void *val);
-void ht_delete(ht_t *h, char *key);
-
-// queries
-int ht_size(ht_t *h);
-
-// iterator
-void ht_iter_init(ht_t *h);
-struct kvp ht_iter_next(ht_t *h);
-
-#endif // HT_H_