X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Froguelike.h;h=a72b7cada8a82ff0c0a3b6387740a2cd531504d4;hb=5ab44c9fcd8d0186ec42e5523437a36e47a19673;hp=357a4c8e85da54a281c4109cc572c7a425610014;hpb=185061fb1588422463ea6a03c3ed3c175ab24151;p=plomrogue
diff --git a/src/roguelike.h b/src/roguelike.h
index 357a4c8..a72b7ca 100644
--- a/src/roguelike.h
+++ b/src/roguelike.h
@@ -1,6 +1,14 @@
#ifndef ROGUELIKE_H
#define ROGUELIKE_H
+#include
+#include "yx_uint16.h"
+
+struct WinMeta;
+struct Win;
+struct KeyBinding;
+struct KeysWinData;
+
struct World {
char interactive;
struct KeyBinding * keybindings;
@@ -9,6 +17,7 @@ struct World {
uint32_t turn;
char * log;
struct Map * map;
+ struct Item * item;
struct Monster * monster;
struct Player * player; };
@@ -17,33 +26,24 @@ struct Map {
struct yx_uint16 offset;
char * cells; };
-struct Player {
- struct yx_uint16 pos; };
-
-struct Monster {
- struct Monster * next;
+struct Item {
+ struct Item * next;
char name;
struct yx_uint16 pos; };
-uint16_t rrand(char, uint32_t);
-void update_log (struct World *, char *);
-
-struct Map init_map ();
-void map_scroll (struct Map *, char);
+extern uint16_t rrand(char, uint32_t);
+extern void update_log (struct World *, char *);
-void turn_over (struct World *, char);
-void save_game(struct World *);
+extern struct Map init_map ();
+extern void map_scroll (struct Map *, char);
-char is_passable (struct Map *, uint16_t, uint16_t);
-struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16);
-void move_monster (struct World *, struct Monster *);
-void move_player (struct World *, char);
-void player_wait(struct World *);
+extern void turn_over (struct World *, char);
+extern void save_game(struct World *);
-void toggle_window (struct WinMeta *, struct Win *);
-void scroll_pad (struct WinMeta *, char);
-void growshrink_active_window (struct WinMeta *, char);
+extern void toggle_window (struct WinMeta *, struct Win *);
+extern void scroll_pad (struct WinMeta *, char);
+extern void growshrink_active_window (struct WinMeta *, char);
-unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *);
+extern unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *);
#endif