AM_MAP.H 3.5 KB

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