1 /* DooM2D: Midnight on the Firing Line
2 * coded by Ketmar // Invisible Vector <ketmar@ketmar.no-ip.org>
3 * Understanding is not required. Only obedience.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //FIXME: change to functions
21 public const FLDW = 100;
22 public const FLDH = 100;
23 public const CELW = 8;
24 public const CELH = 8;
28 public const TILE_EMPTY = 0;
29 public const TILE_WALL = 1;
30 public const TILE_DOORC = 2; // closed door
31 public const TILE_DOORO = 3; // opened door
32 public const TILE_STEP = 4;
33 public const TILE_WATER = 5;
34 public const TILE_ACID1 = 6;
35 public const TILE_ACID2 = 7;
36 public const TILE_MBLOCK = 8; // just blocks monsters
37 public const TILE_LIFTU = 9;
38 public const TILE_LIFTD = 10;
39 public const TILE_ACTTRAP = 255;
42 // flags for vanilla switches
44 public const SWITCH_PLAYER_PRESS = 0b0000_0001;
45 public const SWITCH_MONSTER_PRESS = 0b0000_0010;
46 public const SWITCH_PLAYER_PROXIMITY = 0b0000_0100;
47 public const SWITCH_MONSTER_PROXIMITY = 0b0000_1000;
48 public const SWITCH_KEY_RED = 0b0001_0000;
49 public const SWITCH_KEY_GREEN = 0b0010_0000;
50 public const SWITCH_KEY_BLUE = 0b0100_0000;
55 //public extern void mapSetSize (uint width, uint height);
56 //public extern void mapSetName (string name);
57 //public extern void mapSetSky (string skyspr);
58 //public extern void mapSetMusic (string musicname);
61 public const LAYER_FRONT = 0;
62 public const LAYER_BACK = 1;
64 //public extern void mapSetRect (string texture, uint layer, int x0, int y0, int width, int height);
65 //public void mapSetTile (string texture, uint layer, int x, int y) { mapSetRect(texture, layer, x, y, 1, 1); }
68 //public extern void mapSetTypeRect (uint type, int x0, int y0, int width, int height);
69 //public void mapSetTypeTile (uint type, int x, int y) { mapSetTypeRect(type, x, y, 1, 1); }
73 // this puts "permanent" lights
74 // `radius` is [2..512]
76 //public Actor mapPutLightColorless (int x, int y, uint radius) { return mapPutLightRGB(x, y, radius, 0, 0, 0); }
77 //public extern Actor mapPutLightRGB (int x, int y, uint radius, uint r, uint g, uint b);
80 public extern int mapGetTypeTile (int x, int y) pure;
81 public extern int mapGetTile (uint layer, int x, int y) pure;
83 public extern void mapSetTypeTile (int x, int y, int tid);
84 public extern void mapSetTile (uint layer, int x, int y, int tid);
86 // [0..3] (0: not a water)
87 public extern int mapGetWaterTexture (int fg);
89 public extern int getMapViewHeight () pure;
90 public extern void setMapViewPos (int x, int y);