1 //---------------------------------------------------------------------------- 2 // EDGE Automap Functions 3 //---------------------------------------------------------------------------- 4 // 5 // Copyright (c) 1999-2009 The EDGE Team. 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of the GNU General Public License 9 // as published by the Free Software Foundation; either version 2 10 // of the License, or (at your option) any later version. 11 // 12 // This program is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 //---------------------------------------------------------------------------- 18 // 19 // Based on the DOOM source code, released by Id Software under the 20 // following copyright: 21 // 22 // Copyright (C) 1993-1996 by id Software, Inc. 23 // 24 //---------------------------------------------------------------------------- 25 26 #ifndef __AMMAP_H__ 27 #define __AMMAP_H__ 28 29 #include "ddf/types.h" 30 31 #include "dm_defs.h" 32 #include "e_event.h" 33 #include "p_mobj.h" 34 35 extern bool automapactive; 36 extern bool rotatemap; 37 38 // 39 // Automap drawing structs 40 // 41 typedef struct 42 { 43 float x, y; 44 } 45 mpoint_t; 46 47 typedef struct 48 { 49 mpoint_t a, b; 50 } 51 mline_t; 52 53 void AM_InitLevel(void); 54 55 // Called by main loop. 56 bool AM_Responder(event_t * ev); 57 58 // Called by main loop. 59 void AM_Ticker(void); 60 61 // Called by main loop, 62 // called instead of view drawer if automap active. 63 void AM_Drawer(float x, float y, float w, float h, mobj_t *focus); 64 65 // Called to force the automap to quit 66 // if the level is completed while it is up. 67 void AM_Stop(void); 68 69 70 // color setting API 71 72 // NOTE: these numbers here must match the COAL API script 73 typedef enum 74 { 75 AMCOL_Grid = 0, 76 77 AMCOL_Allmap, 78 AMCOL_Wall, 79 AMCOL_Step, 80 AMCOL_Ledge, 81 AMCOL_Ceil, 82 AMCOL_Secret, 83 84 AMCOL_Player, 85 AMCOL_Monster, 86 AMCOL_Corpse, 87 AMCOL_Item, 88 AMCOL_Missile, 89 AMCOL_Scenery, 90 91 AM_NUM_COLORS 92 } 93 automap_color_e; 94 95 void AM_SetColor(int which, rgbcol_t color); 96 97 98 // NOTE: the bit numbers here must match the COAL API script 99 typedef enum 100 { 101 AMST_Grid = (1 << 0), // draw the grid 102 AMST_Follow = (1 << 4), // follow the player 103 AMST_Rotate = (1 << 5), // rotate the map (disables grid) 104 105 AMST_Things = (1 << 3), // draw all objects 106 AMST_Walls = (1 << 2), // draw all walls (like IDDT) 107 AMST_Allmap = (1 << 1), // draw like Allmap powerup 108 } 109 automap_state_e; 110 111 void AM_GetState(int *state, float *zoom); 112 void AM_SetState(int state, float zoom); 113 114 #endif /* __AMMAP_H__ */ 115 116 //--- editor settings --- 117 // vi:ts=4:sw=4:noexpandtab 118