defs.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. /*
  2. ===========================================================================
  3. Doom 3 BFG Edition GPL Source Code
  4. Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
  6. Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 BFG Edition Source Code 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.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. // am_map.defs begin //
  21. #define REDS (256-5*16)
  22. #define REDRANGE 16
  23. #define BLUES (256-4*16+8)
  24. #define BLUERANGE 8
  25. #define GREENS (7*16)
  26. #define GREENRANGE 16
  27. #define GRAYS (6*16)
  28. #define GRAYSRANGE 16
  29. #define BROWNS (4*16)
  30. #define BROWNRANGE 16
  31. #define YELLOWS (256-32+7)
  32. #define YELLOWRANGE 1
  33. #define BLACK 0
  34. #define WHITE (256-47)
  35. #define BACKGROUND BLACK
  36. #define YOURCOLORS WHITE
  37. #define YOURRANGE 0
  38. #define WALLCOLORS REDS
  39. #define WALLRANGE REDRANGE
  40. #define TSWALLCOLORS GRAYS
  41. #define TSWALLRANGE GRAYSRANGE
  42. #define FDWALLCOLORS BROWNS
  43. #define FDWALLRANGE BROWNRANGE
  44. #define CDWALLCOLORS YELLOWS
  45. #define CDWALLRANGE YELLOWRANGE
  46. #define THINGCOLORS GREENS
  47. #define THINGRANGE GREENRANGE
  48. #define SECRETWALLCOLORS WALLCOLORS
  49. #define SECRETWALLRANGE WALLRANGE
  50. #define GRIDCOLORS (GRAYS + GRAYSRANGE/2)
  51. #define GRIDRANGE 0
  52. #define XHAIRCOLORS GRAYS
  53. #define FB 0
  54. #define AM_PANDOWNKEY KEY_DOWNARROW
  55. #define AM_PANUPKEY KEY_UPARROW
  56. #define AM_PANRIGHTKEY KEY_RIGHTARROW
  57. #define AM_PANLEFTKEY KEY_LEFTARROW
  58. #define AM_ZOOMINKEY K_EQUALS
  59. #define AM_ZOOMOUTKEY K_MINUS
  60. #define AM_STARTKEY KEY_TAB
  61. #define AM_ENDKEY KEY_TAB
  62. #define AM_GOBIGKEY K_0
  63. #define AM_FOLLOWKEY K_F
  64. #define AM_GRIDKEY K_G
  65. #define AM_MARKKEY K_M
  66. #define AM_CLEARMARKKEY K_C
  67. #define AM_NUMMARKPOINTS 10
  68. #define INITSCALEMTOF (.2*FRACUNIT)
  69. #define F_PANINC 4
  70. #define M_ZOOMIN ((int) (1.02*FRACUNIT))
  71. #define M_ZOOMOUT ((int) (FRACUNIT/1.02))
  72. #define FTOM(x) FixedMul(((x)<<16),::g->scale_ftom)
  73. #define MTOF(x) (FixedMul((x),::g->scale_mtof)>>16)
  74. #define CXMTOF(x) (::g->f_x + MTOF((x)-::g->m_x))
  75. #define CYMTOF(y) (::g->f_y + (::g->f_h - MTOF((y)-::g->m_y)))
  76. #define LINE_NEVERSEE ML_DONTDRAW
  77. #define NUMPLYRLINES (sizeof(player_arrow)/sizeof(mline_t))
  78. #define NUMCHEATPLYRLINES (sizeof(cheat_player_arrow)/sizeof(mline_t))
  79. #define NUMTRIANGLEGUYLINES (sizeof(triangle_guy)/sizeof(mline_t))
  80. #define NUMTHINTRIANGLEGUYLINES (sizeof(thintriangle_guy)/sizeof(mline_t))
  81. #define DOOUTCODE(oc, mx, my) \
  82. (oc) = 0; \
  83. if ((my) < 0) (oc) |= TOP; \
  84. else if ((my) >= ::g->f_h) (oc) |= BOTTOM; \
  85. if ((mx) < 0) (oc) |= LEFT; \
  86. else if ((mx) >= ::g->f_w) (oc) |= RIGHT;
  87. #define PUTDOT(xx,yy,cc) ::g->fb[(yy)*::g->f_w+(xx)]=(cc)
  88. // am_map.defs end //
  89. // d_main.defs begin //
  90. #define BGCOLOR 7
  91. #define FGCOLOR 8
  92. #define DOOMWADDIR "wads/"
  93. // d_main.defs end //
  94. // d_net.defs begin //
  95. #define NCMD_EXIT 0x80000000
  96. #define NCMD_RETRANSMIT 0x40000000
  97. #define NCMD_SETUP 0x20000000
  98. #define NCMD_KILL 0x10000000 // kill game
  99. #define NCMD_CHECKSUM 0x0fffffff
  100. #define RESENDCOUNT 10
  101. #define PL_DRONE 0x80 // bit flag in doomdata->player
  102. // d_net.defs end //
  103. // f_finale.defs begin //
  104. #define TEXTSPEED 3
  105. #define TEXTWAIT 250
  106. // f_finale.defs end //
  107. // g_game.defs begin //
  108. #define SAVESTRINGSIZE 64
  109. #define MAXPLMOVE (::g->forwardmove[1])
  110. #define TURBOTHRESHOLD 0x32
  111. #define SLOWTURNTICS 6
  112. #define NUMKEYS 256
  113. #define BODYQUESIZE 32
  114. #define VERSIONSIZE 16
  115. #define DEMOMARKER 0x80
  116. // g_game.defs end //
  117. // hu_lib.defs begin //
  118. #define noterased ::g->viewwindowx
  119. // hu_lib.defs end //
  120. // hu_stuff.defs begin //
  121. #define HU_TITLE (mapnames[(::g->gameepisode-1)*9+::g->gamemap-1])
  122. #define HU_TITLE2 (mapnames2[::g->gamemap-1])
  123. #define HU_TITLEP (mapnamesp[::g->gamemap-1])
  124. #define HU_TITLET (mapnamest[::g->gamemap-1])
  125. #define HU_TITLEHEIGHT 1
  126. #define HU_TITLEX 0
  127. #define HU_TITLEY (167 - SHORT(::g->hu_font[0]->height))
  128. #define HU_INPUTTOGGLE K_T
  129. #define HU_INPUTX HU_MSGX
  130. #define HU_INPUTY (HU_MSGY + HU_MSGHEIGHT*(SHORT(::g->hu_font[0]->height) +1))
  131. #define HU_INPUTWIDTH 64
  132. #define HU_INPUTHEIGHT 1
  133. #define QUEUESIZE 128
  134. // hu_stuff.defs end //
  135. // i_net.defs begin //
  136. // SMF
  137. /*
  138. #define ntohl(x) \
  139. ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
  140. (((unsigned long int)(x) & 0x0000ff00U) << 8) | \
  141. (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
  142. (((unsigned long int)(x) & 0xff000000U) >> 24)))
  143. #define ntohs(x) \
  144. ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
  145. (((unsigned short int)(x) & 0xff00) >> 8))) \
  146. #define htonl(x) ntohl(x)
  147. #define htons(x) ntohs(x)
  148. // i_net.defs end //
  149. // i_net_xbox.defs begin //
  150. #define ntohl(x) \
  151. ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
  152. (((unsigned long int)(x) & 0x0000ff00U) << 8) | \
  153. (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
  154. (((unsigned long int)(x) & 0xff000000U) >> 24)))
  155. #define ntohs(x) \
  156. ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
  157. (((unsigned short int)(x) & 0xff00) >> 8))) \
  158. #define htonl(x) ntohl(x)
  159. #define htons(x) ntohs(x)
  160. */
  161. #define IPPORT_USERRESERVED 5000
  162. // i_net_xbox.defs end //
  163. // i_sound_xbox.defs begin //
  164. #define SAMPLECOUNT 512
  165. #define NUM_SOUNDBUFFERS 64
  166. #define BUFMUL 4
  167. #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
  168. // i_sound_xbox.defs end //
  169. // i_video_xbox.defs begin //
  170. //#define TEXTUREWIDTH 512
  171. //#define TEXTUREHEIGHT 256
  172. // i_video_xbox.defs end //
  173. // mus2midi.defs begin //
  174. #define MUSEVENT_KEYOFF 0
  175. #define MUSEVENT_KEYON 1
  176. #define MUSEVENT_PITCHWHEEL 2
  177. #define MUSEVENT_CHANNELMODE 3
  178. #define MUSEVENT_CONTROLLERCHANGE 4
  179. #define MUSEVENT_END 6
  180. #define MIDI_MAXCHANNELS 16
  181. #define MIDIHEADERSIZE 14
  182. // mus2midi.defs end //
  183. // m_menu.defs begin //
  184. #define SAVESTRINGSIZE 64
  185. #define SKULLXOFF -32
  186. #define LINEHEIGHT 16
  187. // m_menu.defs end //
  188. // p_enemy.defs begin //
  189. #define MAXSPECIALCROSS 8
  190. #define FATSPREAD (ANG90/8)
  191. #define SKULLSPEED (20*FRACUNIT)
  192. // p_enemy.defs end //
  193. // p_inter.defs begin //
  194. #define BONUSADD 6
  195. // p_inter.defs end //
  196. // p_map.defs begin //
  197. #define MAXSPECIALCROSS 8
  198. // p_map.defs end //
  199. // p_mobj.defs begin //
  200. #define STOPSPEED 0x1000
  201. #define FRICTION 0xe800
  202. // p_mobj.defs end //
  203. // p_pspr.defs begin //
  204. #define LOWERSPEED FRACUNIT*6
  205. #define RAISESPEED FRACUNIT*6
  206. #define WEAPONBOTTOM 128*FRACUNIT
  207. #define WEAPONTOP 32*FRACUNIT
  208. #define BFGCELLS 40
  209. // p_pspr.defs end //
  210. // p_saveg.defs begin //
  211. #define PADSAVEP() ::g->save_p += (4 - ((int) ::g->save_p & 3)) & 3
  212. // p_saveg.defs end //
  213. // p_setup.defs begin //
  214. #define MAX_DEATHMATCH_STARTS 10
  215. // p_setup.defs end //
  216. // p_spec.defs begin //
  217. #define MAXANIMS 32
  218. #define MAXLINEANIMS 64
  219. #define MAX_ADJOINING_SECTORS 20
  220. // p_spec.defs end //
  221. // p_user.defs begin //
  222. #define INVERSECOLORMAP 32
  223. // DHM - NERVE :: MAXBOB reduced 25%
  224. //#define MAXBOB 0x100000
  225. #define MAXBOB 0xC0000
  226. #define ANG5 (ANG90/18)
  227. // p_user.defs end //
  228. // r_bsp.defs begin //
  229. #define MAXSEGS 32
  230. // r_bsp.defs end //
  231. // r_draw.defs begin //
  232. //#define MAXWIDTH 1120
  233. //#define MAXHEIGHT 832
  234. #define SBARHEIGHT 32 * GLOBAL_IMAGE_SCALER
  235. #define FUZZTABLE 50
  236. #define FUZZOFF (SCREENWIDTH)
  237. // r_draw.defs end //
  238. // r_main.defs begin //
  239. #define FIELDOFVIEW 2048
  240. #define DISTMAP 2
  241. // r_main.defs end //
  242. // r_plane.defs begin //
  243. //#define MAXVISPLANES 128
  244. #define MAXVISPLANES 384
  245. #define MAXOPENINGS SCREENWIDTH*64
  246. // r_plane.defs end //
  247. // r_segs.defs begin //
  248. #define HEIGHTBITS 12
  249. #define HEIGHTUNIT (1<<HEIGHTBITS)
  250. // r_segs.defs end //
  251. // r_things.defs begin //
  252. #define MINZ (FRACUNIT*4)
  253. #define BASEYCENTER 100
  254. // r_things.defs end //
  255. // st_stuff.defs begin //
  256. #define STARTREDPALS 1
  257. #define STARTBONUSPALS 9
  258. #define NUMREDPALS 8
  259. #define NUMBONUSPALS 4
  260. #define RADIATIONPAL 13
  261. #define ST_FACEPROBABILITY 96
  262. #define ST_TOGGLECHAT KEY_ENTER
  263. #define ST_X 0
  264. #define ST_X2 104
  265. #define ST_FX 143
  266. #define ST_FY 169
  267. #define ST_TALLNUMWIDTH (::g->tallnum[0]->width)
  268. #define ST_NUMPAINFACES 5
  269. #define ST_NUMSTRAIGHTFACES 3
  270. #define ST_NUMTURNFACES 2
  271. #define ST_NUMSPECIALFACES 3
  272. #define ST_FACESTRIDE \
  273. (ST_NUMSTRAIGHTFACES+ST_NUMTURNFACES+ST_NUMSPECIALFACES)
  274. #define ST_NUMEXTRAFACES 2
  275. #define ST_NUMFACES \
  276. (ST_FACESTRIDE*ST_NUMPAINFACES+ST_NUMEXTRAFACES)
  277. #define ST_TURNOFFSET (ST_NUMSTRAIGHTFACES)
  278. #define ST_OUCHOFFSET (ST_TURNOFFSET + ST_NUMTURNFACES)
  279. #define ST_EVILGRINOFFSET (ST_OUCHOFFSET + 1)
  280. #define ST_RAMPAGEOFFSET (ST_EVILGRINOFFSET + 1)
  281. #define ST_GODFACE (ST_NUMPAINFACES*ST_FACESTRIDE)
  282. #define ST_DEADFACE (ST_GODFACE+1)
  283. #define ST_FACESX 143
  284. #define ST_FACESY 168
  285. #define ST_EVILGRINCOUNT (2*TICRATE)
  286. #define ST_STRAIGHTFACECOUNT (TICRATE/2)
  287. #define ST_TURNCOUNT (1*TICRATE)
  288. #define ST_OUCHCOUNT (1*TICRATE)
  289. #define ST_RAMPAGEDELAY (2*TICRATE)
  290. #define ST_MUCHPAIN 20
  291. #define ST_AMMOWIDTH 3
  292. #define ST_AMMOX 44
  293. #define ST_AMMOY 171
  294. #define ST_HEALTHWIDTH 3
  295. #define ST_HEALTHX 90
  296. #define ST_HEALTHY 171
  297. #define ST_ARMSX 111
  298. #define ST_ARMSY 172
  299. #define ST_ARMSBGX 104
  300. #define ST_ARMSBGY 168
  301. #define ST_ARMSXSPACE 12
  302. #define ST_ARMSYSPACE 10
  303. #define ST_FRAGSX 138
  304. #define ST_FRAGSY 171
  305. #define ST_FRAGSWIDTH 2
  306. #define ST_ARMORWIDTH 3
  307. #define ST_ARMORX 221
  308. #define ST_ARMORY 171
  309. #define ST_KEY0WIDTH 8
  310. #define ST_KEY0HEIGHT 5
  311. #define ST_KEY0X 239
  312. #define ST_KEY0Y 171
  313. #define ST_KEY1WIDTH ST_KEY0WIDTH
  314. #define ST_KEY1X 239
  315. #define ST_KEY1Y 181
  316. #define ST_KEY2WIDTH ST_KEY0WIDTH
  317. #define ST_KEY2X 239
  318. #define ST_KEY2Y 191
  319. #define ST_AMMO0WIDTH 3
  320. #define ST_AMMO0HEIGHT 6
  321. #define ST_AMMO0X 288
  322. #define ST_AMMO0Y 173
  323. #define ST_AMMO1WIDTH ST_AMMO0WIDTH
  324. #define ST_AMMO1X 288
  325. #define ST_AMMO1Y 179
  326. #define ST_AMMO2WIDTH ST_AMMO0WIDTH
  327. #define ST_AMMO2X 288
  328. #define ST_AMMO2Y 191
  329. #define ST_AMMO3WIDTH ST_AMMO0WIDTH
  330. #define ST_AMMO3X 288
  331. #define ST_AMMO3Y 185
  332. #define ST_MAXAMMO0WIDTH 3
  333. #define ST_MAXAMMO0HEIGHT 5
  334. #define ST_MAXAMMO0X 314
  335. #define ST_MAXAMMO0Y 173
  336. #define ST_MAXAMMO1WIDTH ST_MAXAMMO0WIDTH
  337. #define ST_MAXAMMO1X 314
  338. #define ST_MAXAMMO1Y 179
  339. #define ST_MAXAMMO2WIDTH ST_MAXAMMO0WIDTH
  340. #define ST_MAXAMMO2X 314
  341. #define ST_MAXAMMO2Y 191
  342. #define ST_MAXAMMO3WIDTH ST_MAXAMMO0WIDTH
  343. #define ST_MAXAMMO3X 314
  344. #define ST_MAXAMMO3Y 185
  345. #define ST_WEAPON0X 110
  346. #define ST_WEAPON0Y 172
  347. #define ST_WEAPON1X 122
  348. #define ST_WEAPON1Y 172
  349. #define ST_WEAPON2X 134
  350. #define ST_WEAPON2Y 172
  351. #define ST_WEAPON3X 110
  352. #define ST_WEAPON3Y 181
  353. #define ST_WEAPON4X 122
  354. #define ST_WEAPON4Y 181
  355. #define ST_WEAPON5X 134
  356. #define ST_WEAPON5Y 181
  357. #define ST_WPNSX 109
  358. #define ST_WPNSY 191
  359. #define ST_DETHX 109
  360. #define ST_DETHY 191
  361. #define ST_MSGTEXTX 0
  362. #define ST_MSGTEXTY 0
  363. #define ST_MSGWIDTH 52
  364. #define ST_MSGHEIGHT 1
  365. #define ST_OUTTEXTX 0
  366. #define ST_OUTTEXTY 6
  367. #define ST_OUTWIDTH 52
  368. #define ST_OUTHEIGHT 1
  369. #define ST_MAPWIDTH \
  370. (strlen(mapnames[(::g->gameepisode-1)*9+(::g->gamemap-1)]))
  371. #define ST_MAPTITLEX \
  372. (SCREENWIDTH - ST_MAPWIDTH * ST_CHATFONTWIDTH)
  373. #define ST_MAPTITLEY 0
  374. #define ST_MAPHEIGHT 1
  375. // st_stuff.defs end //
  376. // s_sound.defs begin //
  377. #define S_MAX_VOLUME 127
  378. #define S_CLIPPING_DIST (1200*0x10000)
  379. #define S_CLOSE_DIST (160*0x10000)
  380. #define S_ATTENUATOR ((S_CLIPPING_DIST-S_CLOSE_DIST)>>FRACBITS)
  381. #define NORM_VOLUME snd_MaxVolume
  382. #define NORM_PITCH 128
  383. #define NORM_PRIORITY 64
  384. #define NORM_SEP 128
  385. #define S_PITCH_PERTURB 1
  386. #define S_STEREO_SWING (96*0x10000)
  387. #define S_IFRACVOL 30
  388. #define NA 0
  389. #define S_NUMCHANNELS 256
  390. // s_sound.defs end //
  391. // wi_stuff.defs begin //
  392. #define NUMEPISODES 4
  393. #define NUMMAPS 9
  394. #define WI_TITLEY 2
  395. #define WI_SPACINGY 33
  396. #define SP_STATSX 50
  397. #define SP_STATSY 50
  398. #define SP_TIMEX 16
  399. #define SP_TIMEY (ORIGINAL_HEIGHT-32)
  400. #define NG_STATSY 50
  401. #define NG_STATSX (32 + SHORT(::g->star->width)/2 + 32*!::g->dofrags)
  402. #define NG_SPACINGX 64
  403. #define DM_MATRIXX 42
  404. #define DM_MATRIXY 68
  405. #define DM_SPACINGX 40
  406. #define DM_TOTALSX 269
  407. #define DM_KILLERSX 10
  408. #define DM_KILLERSY 100
  409. #define DM_VICTIMSX 5
  410. #define DM_VICTIMSY 50
  411. #define FB 0
  412. #define SP_KILLS 0
  413. #define SP_ITEMS 2
  414. #define SP_SECRET 4
  415. #define SP_FRAGS 6
  416. #define SP_TIME 8
  417. #define SP_PAR ST_TIME
  418. #define SP_PAUSE 1
  419. #define SHOWNEXTLOCDELAY 4
  420. // wi_stuff.defs end //
  421. // w_wad.defs begin //
  422. // w_wad.defs end //
  423. // z_zone.defs begin //
  424. #define ZONEID 0x1d4a11
  425. #define NUM_ZONES 11
  426. #define MINFRAGMENT 64
  427. #define NO_SHARE_LUMPS
  428. // z_zone.defs end //