home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Monsters now clash with and hit each other; more elaborate algorithms moved into...
[plomrogue]
/
src
/
roguelike.h
diff --git
a/src/roguelike.h
b/src/roguelike.h
index d82313e62d6aadcd81b7a3846651c9f78aaad95f..f6b266d3e72ca5a1bb7953d51d515fd57bd70822 100644
(file)
--- a/
src/roguelike.h
+++ b/
src/roguelike.h
@@
-1,3
+1,6
@@
+#ifndef ROGUELIKE_H
+#define ROGUELIKE_H
+
struct World {
char interactive;
struct KeyBinding * keybindings;
struct World {
char interactive;
struct KeyBinding * keybindings;
@@
-10,31
+13,33
@@
struct World {
struct Player * player; };
struct Map {
struct Player * player; };
struct Map {
- uint16_t width;
- uint16_t height;
- uint16_t offset_x;
- uint16_t offset_y;
+ struct yx_uint16 size;
+ struct yx_uint16 offset;
char * cells; };
struct Player {
char * cells; };
struct Player {
- uint16_t y;
- uint16_t x; };
+ struct yx_uint16 pos; };
struct Monster {
struct Monster {
- uint16_t y;
- uint16_t x; };
+ struct Monster * next;
+ char name;
+ struct yx_uint16 pos; };
uint16_t rrand(char, uint32_t);
uint16_t rrand(char, uint32_t);
-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);
struct Map init_map ();
struct Map init_map ();
-void map_scroll (struct Map *, char);
+void save_game(struct World *);
+void record_action (char);
+struct yx_uint16 mv_yx_in_dir (char, struct yx_uint16);
void next_turn (struct World *);
void update_log (struct World *, char *);
void next_turn (struct World *);
void update_log (struct World *, char *);
-char is_passable (struct Map *, uint16_t, uint16_t);
-void record_action (char);
+void move_monster (struct World *, struct Monster *);
void move_player (struct World *, char);
void move_player (struct World *, char);
+char is_passable (struct Map *, uint16_t, uint16_t);
void player_wait(struct World *);
void player_wait(struct World *);
+void toggle_window (struct WinMeta *, struct Win *);
+void scroll_pad (struct WinMeta *, char);
+void growshrink_active_window (struct WinMeta *, char);
+void map_scroll (struct Map *, char);
unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *);
unsigned char meta_keys(int, struct World *, struct WinMeta *, struct Win *, struct Win *, struct Win *, struct Win *);
+
+#endif