index e36dc0fa7198855f98da49d8caed3ac1cb263925..cb6055228c1080ec4e58d9f4953fd6e39b2b82d4 100644 (file)
-/* Copyright (C) Doom 2D: Forever Developers\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, version 3 of the License ONLY.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-\r
-#pragma once\r
-\r
-#include <stdint.h>\r
-\r
-#define MAP_MAGIC "MAP\x01"\r
-\r
-enum {\r
- MBLK_NONE = 0,\r
- MBLK_TEXTURES = 1,\r
- MBLK_PANELS = 2,\r
- MBLK_HEADER = 7,\r
-};\r
-\r
-enum {\r
- PANEL_NONE = 0, // 0\r
- PANEL_WALL, // 1\r
- PANEL_BACK, // 2\r
- PANEL_FORE, // 4\r
- PANEL_WATER, // 8\r
- PANEL_ACID1, // 16\r
- PANEL_ACID2, // 32\r
- PANEL_STEP, // 64\r
- PANEL_LIFTUP, // 128\r
- PANEL_LIFTDOWN, // 256\r
- PANEL_OPENDOOR, // 512\r
- PANEL_CLOSEDOOR, // 1024\r
- PANEL_BLOCKMON, // 2048\r
- PANEL_LIFTLEFT, // 4096\r
- PANEL_LIFTRIGHT, // 8192\r
-\r
- PANEL_NUMTYPES\r
-};\r
-\r
-enum {\r
- PFLAG_HIDE = 2,\r
- PFLAG_WATERTEXTURES = 4,\r
-};\r
-\r
-#pragma pack(push, 1)\r
-\r
-typedef struct {\r
- char name[32];\r
- char author[32];\r
- char desc[256];\r
- char music[64];\r
- char sky[64];\r
- uint16_t width;\r
- uint16_t height;\r
-} map_header_t;\r
-\r
-typedef struct {\r
- char resname[64];\r
- uint8_t anim;\r
-} map_texture_t;\r
-\r
-typedef struct {\r
- int32_t x, y;\r
- uint16_t w, h;\r
- uint16_t texid;\r
- uint16_t type;\r
- uint8_t alpha;\r
- uint8_t flags;\r
-} map_panel_t;\r
-\r
-typedef struct {\r
- uint8_t type;\r
- uint32_t reserved;\r
- uint32_t size;\r
-} map_block_t;\r
-\r
-#pragma pack(pop)\r
+/* Copyright (C) Doom 2D: Forever Developers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+
+#define MAP_MAGIC "MAP\x01"
+
+enum {
+ MBLK_NONE = 0,
+ MBLK_TEXTURES = 1,
+ MBLK_PANELS = 2,
+ MBLK_HEADER = 7,
+};
+
+enum {
+ PANEL_NONE = 0, // 0
+ PANEL_WALL, // 1
+ PANEL_BACK, // 2
+ PANEL_FORE, // 4
+ PANEL_WATER, // 8
+ PANEL_ACID1, // 16
+ PANEL_ACID2, // 32
+ PANEL_STEP, // 64
+ PANEL_LIFTUP, // 128
+ PANEL_LIFTDOWN, // 256
+ PANEL_OPENDOOR, // 512
+ PANEL_CLOSEDOOR, // 1024
+ PANEL_BLOCKMON, // 2048
+ PANEL_LIFTLEFT, // 4096
+ PANEL_LIFTRIGHT, // 8192
+
+ PANEL_NUMTYPES
+};
+
+enum {
+ PFLAG_HIDE = 2,
+ PFLAG_WATERTEXTURES = 4,
+};
+
+#pragma pack(push, 1)
+
+typedef struct {
+ char name[32];
+ char author[32];
+ char desc[256];
+ char music[64];
+ char sky[64];
+ uint16_t width;
+ uint16_t height;
+} map_header_t;
+
+typedef struct {
+ char resname[64];
+ uint8_t anim;
+} map_texture_t;
+
+typedef struct {
+ int32_t x, y;
+ uint16_t w, h;
+ uint16_t texid;
+ uint16_t type;
+ uint8_t alpha;
+ uint8_t flags;
+} map_panel_t;
+
+typedef struct {
+ uint8_t type;
+ uint32_t reserved;
+ uint32_t size;
+} map_block_t;
+
+#pragma pack(pop)