* Routines for the game map window.
*/
-#ifndef MAP_H
-#define MAP_H
-
-#include "../common/yx_uint16.h" /* yx_uint16 struct */
-
-
-struct Map
-{
- struct yx_uint16 size; /* map's height/width in number of cells */
- char * cells; /* sequence of bytes encoding map cells */
-};
+#ifndef MAP_H_CLIENT
+#define MAP_H_CLIENT
#include <stdint.h> /* uint8_t, uint16_t */
#include <stdio.h> /* FILE */
#include <sys/types.h> /* time_t */
-#include "map.h" /* struct Map */
+#include "../common/map.h" /* struct Map */
#include "../common/yx_uint8.h" /* struct yx_uint8 */
#include "keybindings.h" /* stuct KeyBindingDB */
#include "command_db.h" /* struct CommandDB */
--- /dev/null
+/* src/common/map.h
+ *
+ * Game map.
+ */
+
+#ifndef MAP_H
+#define MAP_H
+
+#include "yx_uint16.h" /* yx_uint16 struct */
+
+
+struct Map
+{
+ struct yx_uint16 size; /* map's height/width in number of cells */
+ char * cells; /* sequence of bytes encoding map cells */
+};
+
+
+
+#endif
{
return (yx->y * world.map.size.x) + yx->x;
}
-
/* src/server/map.h
*
- * Struct for the game map and routines to create and navigate on it.
+ * Routines to create and navigate game map.
*/
-#ifndef MAP_H
-#define MAP_H
+#ifndef MAP_H_SERVER
+#define MAP_H_SERVER
#include <stdint.h> /* uint8_t, uint16_t */
#include "../common/yx_uint8.h" /* yx_uint8 struct */
-#include "../common/yx_uint16.h" /* yx_uint16 struct */
-
-
-
-struct Map
-{
- struct yx_uint16 size; /* Map's height/width (use max. 256x256)! */
- char * cells; /* Sequence of bytes encoding map cells. */
-};
#include <stdint.h> /* uint8_t, uint16_t, uint32_t */
#include <stdio.h> /* define FILE */
-#include "map.h" /* struct Map */
+#include "../common/map.h" /* struct Map */
struct MapObjDef;
struct MapObjAct;
struct MapObj;