AM_MAP.H 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #ifndef __AMMAP_H__
  2. #define __AMMAP_H__
  3. #pragma once
  4. // For use if I do walls with outsides/insides
  5. #define REDS 12*8
  6. #define REDRANGE 1//16
  7. #define BLUES (256-4*16+8)
  8. #define BLUERANGE 1//8
  9. #define GREENS (33*8)
  10. #define GREENRANGE 1//16
  11. #define GRAYS (5*8)
  12. #define GRAYSRANGE 1//16
  13. #define BROWNS (14*8)
  14. #define BROWNRANGE 1//16
  15. #define YELLOWS 10*8
  16. #define YELLOWRANGE 1
  17. #define BLACK 0
  18. #define WHITE 4*8
  19. #define PARCH 13*8-1
  20. #define BLOODRED 150
  21. #define BLUEKEY 197
  22. #define YELLOWKEY 144
  23. #define GREENKEY 220
  24. // Automap colors
  25. #define BACKGROUND PARCH
  26. #define YOURCOLORS WHITE
  27. #define YOURRANGE 0
  28. #define WALLCOLORS REDS
  29. #define WALLRANGE REDRANGE
  30. #define TSWALLCOLORS GRAYS
  31. #define TSWALLRANGE GRAYSRANGE
  32. #define FDWALLCOLORS BROWNS
  33. #define FDWALLRANGE BROWNRANGE
  34. #define CDWALLCOLORS YELLOWS
  35. #define CDWALLRANGE YELLOWRANGE
  36. #define THINGCOLORS GREENS
  37. #define THINGRANGE GREENRANGE
  38. #define SECRETWALLCOLORS WALLCOLORS
  39. #define SECRETWALLRANGE WALLRANGE
  40. #define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
  41. #define GRIDRANGE 0
  42. #define XHAIRCOLORS GRAYS
  43. // drawing stuff
  44. #define FB 0
  45. #define KEY_TAB 9
  46. #define AM_PANDOWNKEY KEY_DOWNARROW
  47. #define AM_PANUPKEY KEY_UPARROW
  48. #define AM_PANRIGHTKEY KEY_RIGHTARROW
  49. #define AM_PANLEFTKEY KEY_LEFTARROW
  50. //#define AM_PANDOWNKEY SC_DOWNARROW
  51. //#define AM_PANUPKEY SC_UPARROW
  52. //#define AM_PANRIGHTKEY SC_RIGHTARROW
  53. //#define AM_PANLEFTKEY SC_LEFTARROW
  54. #define AM_ZOOMINKEY '='
  55. //#define AM_ZOOMINKEY 13
  56. //#define AM_ZOOMOUTKEY 12
  57. #define AM_ZOOMOUTKEY '-'
  58. #define AM_STARTKEY KEY_TAB
  59. #define AM_ENDKEY KEY_TAB
  60. #define AM_GOBIGKEY '0'
  61. //#define AM_GOBIGKEY 11
  62. //#define AM_FOLLOWKEY 33
  63. //#define AM_GRIDKEY 34
  64. #define AM_FOLLOWKEY 'f'
  65. #define AM_GRIDKEY 'g'
  66. #define AM_NUMMARKPOINTS 10
  67. #define AM_MSGHEADER (('a'<<24)+('m'<<16))
  68. #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
  69. #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
  70. #define INITSCALEMTOF (.2*FRACUNIT) // scale on entry
  71. // how much the automap moves window per tic in frame-buffer coordinates
  72. #define F_PANINC 4 // moves 140 pixels in 1 second
  73. // how much zoom-in per tic
  74. #define M_ZOOMIN ((int) (1.02*FRACUNIT)) // goes to 2x in 1 second
  75. // how much zoom-out per tic
  76. #define M_ZOOMOUT ((int) (FRACUNIT/1.02)) // pulls out to 0.5x in 1 second
  77. // translates between frame-buffer and map distances
  78. #define FTOM(x) FixedMul(((x)<<16),scale_ftom)
  79. #define MTOF(x) (FixedMul((x),scale_mtof)>>16)
  80. // translates between frame-buffer and map coordinates
  81. #define CXMTOF(x) (f_x + MTOF((x)-m_x))
  82. #define CYMTOF(y) (f_y + (f_h - MTOF((y)-m_y)))
  83. // the following is crap
  84. #define LINE_NEVERSEE ML_DONTDRAW
  85. typedef struct
  86. {
  87. int x, y;
  88. } fpoint_t;
  89. typedef struct
  90. {
  91. fpoint_t a, b;
  92. } fline_t;
  93. typedef vertex_t mpoint_t;
  94. typedef struct
  95. {
  96. mpoint_t a, b;
  97. } mline_t;
  98. typedef struct
  99. {
  100. fixed_t slp, islp;
  101. } islope_t;
  102. // extern int f_x, f_y, f_w, f_h;
  103. #endif