constructs.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  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. memset(::g, 0, sizeof(*::g));
  21. // am_map.constructs begin //
  22. ::g->cheating = 0;
  23. ::g->grid = 0;
  24. ::g->leveljuststarted = 1; // kluge until AM_LevelInit() is called
  25. ::g->automapactive = false;
  26. ::g->finit_width = SCREENWIDTH;
  27. ::g->finit_height = SCREENHEIGHT - (32 * GLOBAL_IMAGE_SCALER);
  28. ::g->scale_mtof = (fixed_t)INITSCALEMTOF;
  29. ::g->markpointnum = 0; // next point to be assigned
  30. ::g->followplayer = 1; // specifies whether to follow the player around
  31. ::g->stopped = true;
  32. ::g->lastlevel = -1;
  33. ::g->lastepisode = -1;
  34. ::g->cheatstate=0;
  35. ::g->bigstate=0;
  36. ::g->nexttic = 0;
  37. ::g->litelevelscnt = 0;
  38. // am_map.constructs end //
  39. // doomstat.constructs begin //
  40. ::g->gamemode = indetermined;
  41. ::g->gamemission = doom;
  42. ::g->language = english;
  43. // doomstat.constructs end //
  44. // d_main.constructs begin //
  45. ::g->singletics = false; // debug flag to cancel adaptiveness
  46. ::g->oldgamestate = (gamestate_t)-1;
  47. ::g->wipegamestate = GS_DEMOSCREEN;
  48. ::g->viewactivestate = false;
  49. ::g->menuactivestate = false;
  50. ::g->inhelpscreensstate = false;
  51. ::g->fullscreen = false;
  52. ::g->wipe = false;
  53. ::g->wipedone = true;
  54. // d_main.constructs end //
  55. // d_net.constructs begin //
  56. doomcom_t temp_doomcom = {
  57. 0
  58. };
  59. memcpy( &::g->doomcom, &temp_doomcom, sizeof(temp_doomcom) );
  60. // d_net.constructs end //
  61. // f_wipe.constructs begin //
  62. ::g->go = 0;
  63. // f_wipe.constructs end //
  64. // g_game.constructs begin //
  65. ::g->precache = true; // if true, load all graphics at start
  66. fixed_t temp_forwardmove[2] = {
  67. 0x19, 0x32
  68. };
  69. memcpy( ::g->forwardmove, temp_forwardmove, sizeof(temp_forwardmove) );
  70. fixed_t temp_sidemove[2] = {
  71. 0x18, 0x28
  72. };
  73. memcpy( ::g->sidemove, temp_sidemove, sizeof(temp_sidemove) );
  74. fixed_t temp_angleturn[3] = {
  75. 640, 1280, 320 // + slow turn
  76. };
  77. memcpy( ::g->angleturn, temp_angleturn, sizeof(temp_angleturn) );
  78. ::g->mousebuttons = &::g->mousearray[1]; // allow [-1]
  79. ::g->joybuttons = &::g->joyarray[1]; // allow [-1]
  80. // g_game.constructs end //
  81. // hu_lib.constructs begin //
  82. ::g->lastautomapactive = true;
  83. // hu_lib.constructs end //
  84. // hu_stuff.constructs begin //
  85. ::g->always_off = false;
  86. ::g->headsupactive = false;
  87. ::g->head = 0;
  88. ::g->tail = 0;
  89. ::g->shiftdown = false;
  90. ::g->altdown = false;
  91. ::g->num_nobrainers = 0;
  92. // hu_stuff.constructs end //
  93. // i_input.constructs begin //
  94. // i_input.constructs end //
  95. // i_system.constructs begin //
  96. ::g->mb_used = 2;
  97. ::g->current_time = 0;
  98. // i_system.constructs end //
  99. // m_cheat.constructs begin //
  100. ::g->firsttime = 1;
  101. ::g->usedcheatbuffer = 0;
  102. // m_cheat.constructs end //
  103. // m_menu.constructs begin //
  104. menuitem_t temp_QuitMenu[3] = {
  105. {1,"M_ACPT", M_ExitGame,'a'},
  106. {1,"M_CAN", M_CancelExit,'c'},
  107. {1,"M_CHG", M_GameSelection,'g'}
  108. };
  109. memcpy( ::g->QuitMenu, temp_QuitMenu, sizeof(temp_QuitMenu) );
  110. menu_t temp_QuitDef = {
  111. qut_end, // # of menu items
  112. &::g->MainDef, // previous menu
  113. ::g->QuitMenu, // menuitem_t ->
  114. M_DrawQuit, // drawing routine ->
  115. 48,63, // x,y
  116. g_accept // lastOn
  117. };
  118. memcpy( &::g->QuitDef, &temp_QuitDef, sizeof(temp_QuitDef) );
  119. menuitem_t temp_MainMenu[5]=
  120. {
  121. {1,"M_NGAME",M_NewGame,'n'},
  122. {1,"M_OPTION",M_Options,'o'},
  123. {1,"M_LOADG",M_LoadGame,'l'},
  124. {1,"M_SAVEG",M_SaveGame,'m'},
  125. // Another hickup with Special edition.
  126. //{1,"M_RDTHIS",M_ReadThis,'r'},
  127. {1,"M_QUITG",M_QuitDOOM,'q'}
  128. };
  129. memcpy( &::g->MainMenu, temp_MainMenu, sizeof(temp_MainMenu) );
  130. menu_t temp_MainDef = {
  131. main_end,
  132. NULL,
  133. ::g->MainMenu,
  134. M_DrawMainMenu,
  135. 97,64,
  136. 0
  137. };
  138. memcpy( &::g->MainDef, &temp_MainDef, sizeof(temp_MainDef) );
  139. menuitem_t temp_EpisodeMenu[4] = {
  140. {1,"M_EPI1", M_Episode,'k'},
  141. {1,"M_EPI2", M_Episode,'t'},
  142. {1,"M_EPI3", M_Episode,'i'},
  143. {1,"M_EPI4", M_Episode,'t'}
  144. };
  145. memcpy( ::g->EpisodeMenu, temp_EpisodeMenu, sizeof(temp_EpisodeMenu) );
  146. menu_t temp_EpiDef = {
  147. ep_end, // # of menu items
  148. &::g->MainDef, // previous menu
  149. ::g->EpisodeMenu, // menuitem_t ->
  150. M_DrawEpisode, // drawing routine ->
  151. 48,63, // x,y
  152. ep1 // lastOn
  153. };
  154. memcpy( &::g->EpiDef, &temp_EpiDef, sizeof(temp_EpiDef) );
  155. menuitem_t temp_ExpansionMenu[2] = {
  156. {1,"M_EPI1", M_Expansion,'h'},
  157. {1,"M_EPI2", M_Expansion,'n'},
  158. };
  159. memcpy( ::g->ExpansionMenu, temp_ExpansionMenu, sizeof(temp_ExpansionMenu) );
  160. menu_t temp_ExpDef = {
  161. ex_end, // # of menu items
  162. &::g->MainDef, // previous menu
  163. ::g->ExpansionMenu, // menuitem_t ->
  164. M_DrawEpisode, // drawing routine ->
  165. 48,63, // x,y
  166. ex1 // lastOn
  167. };
  168. memcpy( &::g->ExpDef, &temp_ExpDef, sizeof(temp_ExpDef) );
  169. menuitem_t temp_LoadExpMenu[2] = {
  170. {1,"M_EPI1", M_LoadExpansion,'h'},
  171. {1,"M_EPI2", M_LoadExpansion,'n'},
  172. };
  173. memcpy( ::g->LoadExpMenu, temp_LoadExpMenu, sizeof(temp_LoadExpMenu) );
  174. menu_t temp_LoadExpDef = {
  175. ex_end, // # of menu items
  176. &::g->MainDef, // previous menu
  177. ::g->LoadExpMenu, // menuitem_t ->
  178. M_DrawEpisode, // drawing routine ->
  179. 48,63, // x,y
  180. ex1 // lastOn
  181. };
  182. memcpy( &::g->LoadExpDef, &temp_LoadExpDef, sizeof(temp_LoadExpDef) );
  183. menuitem_t temp_NewGameMenu[5] = {
  184. {1,"M_JKILL", M_ChooseSkill, 'i'},
  185. {1,"M_ROUGH", M_ChooseSkill, 'h'},
  186. {1,"M_HURT", M_ChooseSkill, 'h'},
  187. {1,"M_ULTRA", M_ChooseSkill, 'u'},
  188. {1,"M_NMARE", M_ChooseSkill, 'n'}
  189. };
  190. memcpy( ::g->NewGameMenu, temp_NewGameMenu, sizeof(temp_NewGameMenu) );
  191. menu_t temp_NewDef = {
  192. newg_end, // # of menu items
  193. &::g->EpiDef, // previous menu
  194. ::g->NewGameMenu, // menuitem_t ->
  195. M_DrawNewGame, // drawing routine ->
  196. 48,63, // x,y
  197. hurtme // lastOn
  198. };
  199. memcpy( &::g->NewDef, &temp_NewDef, sizeof(temp_NewDef) );
  200. menuitem_t temp_OptionsMenu[8] = {
  201. {1,"M_GDHIGH", M_FullScreen,'f'},
  202. {1,"M_SCRNSZ", M_ChangeGPad,'m'},
  203. {1,"M_MESSG", M_ChangeMessages,'m'},
  204. //{1,"M_DETAIL", M_ChangeDetail,'g'},
  205. //{2,"M_SCRNSZ", M_SizeDisplay,'s'},
  206. {-1,"",0},
  207. {2,"M_MSENS", M_ChangeSensitivity,'m'},
  208. {-1,"",0},
  209. {1,"M_SVOL", M_Sound,'s'}
  210. };
  211. memcpy( ::g->OptionsMenu, temp_OptionsMenu, sizeof(temp_OptionsMenu) );
  212. menu_t temp_OptionsDef = {
  213. opt_end,
  214. &::g->MainDef,
  215. ::g->OptionsMenu,
  216. M_DrawOptions,
  217. 60,37,
  218. 0
  219. };
  220. memcpy( &::g->OptionsDef, &temp_OptionsDef, sizeof(temp_OptionsDef) );
  221. menuitem_t temp_SoundMenu[4] = {
  222. {2,"M_SFXVOL",M_SfxVol,'s'},
  223. {-1,"",0},
  224. {2,"M_MUSVOL",M_MusicVol,'m'},
  225. {-1,"",0}
  226. };
  227. memcpy( ::g->SoundMenu, temp_SoundMenu, sizeof(temp_SoundMenu) );
  228. menu_t temp_SoundDef = {
  229. sound_end,
  230. &::g->OptionsDef,
  231. ::g->SoundMenu,
  232. M_DrawSound,
  233. 80,64,
  234. 0
  235. };
  236. memcpy( &::g->SoundDef, &temp_SoundDef, sizeof(temp_SoundDef) );
  237. menuitem_t temp_LoadMenu[6] = {
  238. {1,"", M_LoadSelect,'1'},
  239. {1,"", M_LoadSelect,'2'},
  240. {1,"", M_LoadSelect,'3'},
  241. {1,"", M_LoadSelect,'4'},
  242. {1,"", M_LoadSelect,'5'},
  243. {1,"", M_LoadSelect,'6'}
  244. };
  245. memcpy( ::g->LoadMenu, temp_LoadMenu, sizeof(temp_LoadMenu) );
  246. menu_t temp_LoadDef = {
  247. load_end,
  248. &::g->MainDef,
  249. ::g->LoadMenu,
  250. M_DrawLoad,
  251. 80,54,
  252. 0
  253. };
  254. memcpy( &::g->LoadDef, &temp_LoadDef, sizeof(temp_LoadDef) );
  255. menuitem_t temp_SaveMenu[6] = {
  256. {1,"", M_SaveSelect,'1'},
  257. {1,"", M_SaveSelect,'2'},
  258. {1,"", M_SaveSelect,'3'},
  259. {1,"", M_SaveSelect,'4'},
  260. {1,"", M_SaveSelect,'5'},
  261. {1,"", M_SaveSelect,'6'}
  262. };
  263. memcpy( ::g->SaveMenu, temp_SaveMenu, sizeof(temp_SaveMenu) );
  264. menu_t temp_SaveDef = {
  265. load_end,
  266. &::g->MainDef,
  267. ::g->SaveMenu,
  268. M_DrawSave,
  269. 80,54,
  270. 0
  271. };
  272. memcpy( &::g->SaveDef, &temp_SaveDef, sizeof(temp_SaveDef) );
  273. int temp_quitsounds[8] = {
  274. sfx_pldeth,
  275. sfx_dmpain,
  276. sfx_popain,
  277. sfx_slop,
  278. sfx_telept,
  279. sfx_posit1,
  280. sfx_posit3,
  281. sfx_sgtatk
  282. };
  283. memcpy( ::g->quitsounds, temp_quitsounds, sizeof(temp_quitsounds) );
  284. int temp_quitsounds2[8] = {
  285. sfx_vilact,
  286. sfx_getpow,
  287. sfx_boscub,
  288. sfx_slop,
  289. sfx_skeswg,
  290. sfx_kntdth,
  291. sfx_bspact,
  292. sfx_sgtatk
  293. };
  294. memcpy( ::g->quitsounds2, temp_quitsounds2, sizeof(temp_quitsounds2) );
  295. ::g->joywait = 0;
  296. ::g->mousewait = 0;
  297. ::g->mmenu_mousey = 0;
  298. ::g->lasty = 0;
  299. ::g->mmenu_mousex = 0;
  300. ::g->lastx = 0;
  301. // m_menu.constructs end //
  302. // m_misc.constructs begin //
  303. ::g->g_pszSaveFile = "\\save.dat";
  304. ::g->g_pszImagePath = "d:\\saveimage.xbx";
  305. ::g->g_pszImageMeta = "saveimage.xbx";
  306. extern const char* const temp_chat_macros[];
  307. for (int i = 0; i < 10; i++)
  308. {
  309. chat_macros[i] = temp_chat_macros[i];
  310. }
  311. default_t temp_defaults[35] = {
  312. default_t( "mouse_sensitivity",&::g->mouseSensitivity, 7 ),
  313. default_t( "show_messages",&::g->showMessages, 1 ),
  314. default_t( "key_right",&::g->key_right, KEY_RIGHTARROW ),
  315. default_t( "key_left",&::g->key_left, KEY_LEFTARROW ),
  316. default_t( "key_up",&::g->key_up, KEY_UPARROW ),
  317. default_t( "key_down",&::g->key_down, KEY_DOWNARROW ),
  318. default_t( "key_strafeleft",&::g->key_strafeleft, ',' ),
  319. default_t( "key_straferight",&::g->key_straferight, '.' ),
  320. default_t( "key_fire",&::g->key_fire, KEY_RCTRL ),
  321. default_t( "key_use",&::g->key_use, ' ' ),
  322. default_t( "key_strafe",&::g->key_strafe, KEY_RALT ),
  323. default_t( "key_speed",&::g->key_speed, KEY_RSHIFT ),
  324. default_t( "use_mouse",&::g->usemouse, 1 ),
  325. default_t( "mouseb_fire",&::g->mousebfire,0 ),
  326. default_t( "mouseb_strafe",&::g->mousebstrafe,1 ),
  327. default_t( "mouseb_forward",&::g->mousebforward,2 ),
  328. default_t( "use_joystick",&::g->usejoystick, 0 ),
  329. default_t( "joyb_fire",&::g->joybfire,0 ),
  330. default_t( "joyb_strafe",&::g->joybstrafe,1 ),
  331. default_t( "joyb_use",&::g->joybuse,3 ),
  332. default_t( "joyb_speed",&::g->joybspeed,2 ),
  333. default_t( "screenblocks",&::g->screenblocks, 10 ),
  334. default_t( "detaillevel",&::g->detailLevel, 0 ),
  335. default_t( "snd_channels",&::g->numChannels, S_NUMCHANNELS ),
  336. default_t( "usegamma",&::g->usegamma, 0 ),
  337. default_t( "chatmacro0", &::g->chat_macros[0], HUSTR_CHATMACRO0 ),
  338. default_t( "chatmacro1", &::g->chat_macros[1], HUSTR_CHATMACRO1 ),
  339. default_t( "chatmacro2", &::g->chat_macros[2], HUSTR_CHATMACRO2 ),
  340. default_t( "chatmacro3", &::g->chat_macros[3], HUSTR_CHATMACRO3 ),
  341. default_t( "chatmacro4", &::g->chat_macros[4], HUSTR_CHATMACRO4 ),
  342. default_t( "chatmacro5", &::g->chat_macros[5], HUSTR_CHATMACRO5 ),
  343. default_t( "chatmacro6", &::g->chat_macros[6], HUSTR_CHATMACRO6 ),
  344. default_t( "chatmacro7", &::g->chat_macros[7], HUSTR_CHATMACRO7 ),
  345. default_t( "chatmacro8", &::g->chat_macros[8], HUSTR_CHATMACRO8 ),
  346. default_t( "chatmacro9", &::g->chat_macros[9], HUSTR_CHATMACRO9 )
  347. };
  348. memcpy( ::g->defaults, temp_defaults, sizeof(temp_defaults) );
  349. // m_misc.constructs end //
  350. // m_random.constructs begin //
  351. ::g->rndindex = 0;
  352. ::g->prndindex = 0;
  353. // m_random.constructs end //
  354. // p_enemy.constructs begin //
  355. ::g->TRACEANGLE = 0xc000000;
  356. ::g->easy = 0;
  357. // p_enemy.constructs end //
  358. // r_bsp.constructs begin //
  359. int temp_checkcoord[12][4] = {
  360. {3,0,2,1},
  361. {3,0,2,0},
  362. {3,1,2,0},
  363. {0},
  364. {2,0,2,1},
  365. {0,0,0,0},
  366. {3,1,3,0},
  367. {0},
  368. {2,0,3,1},
  369. {2,1,3,1},
  370. {2,1,3,0}
  371. };
  372. memcpy( ::g->checkcoord, temp_checkcoord, sizeof(temp_checkcoord) );
  373. // r_bsp.constructs end //
  374. // r_draw.constructs begin //
  375. int temp_fuzzoffset[FUZZTABLE] = {
  376. FUZZOFF,-FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,
  377. FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,
  378. FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,
  379. FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,
  380. FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,
  381. FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,
  382. FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF
  383. };
  384. memcpy( ::g->fuzzoffset, temp_fuzzoffset, sizeof(temp_fuzzoffset) );
  385. ::g->fuzzpos = 0;
  386. // r_draw.constructs end //
  387. // r_main.constructs begin //
  388. ::g->validcount = 1;
  389. // r_main.constructs end //
  390. // sounds.constructs begin //
  391. musicinfo_t temp_S_music[80] = {
  392. { 0 },
  393. { "e1m1", 0 },
  394. { "e1m2", 0 },
  395. { "e1m3", 0 },
  396. { "e1m4", 0 },
  397. { "e1m5", 0 },
  398. { "e1m6", 0 },
  399. { "e1m7", 0 },
  400. { "e1m8", 0 },
  401. { "e1m9", 0 },
  402. { "e2m1", 0 },
  403. { "e2m2", 0 },
  404. { "e2m3", 0 },
  405. { "e2m4", 0 },
  406. { "e2m5", 0 },
  407. { "e2m6", 0 },
  408. { "e2m7", 0 },
  409. { "e2m8", 0 },
  410. { "e2m9", 0 },
  411. { "e3m1", 0 },
  412. { "e3m2", 0 },
  413. { "e3m3", 0 },
  414. { "e3m4", 0 },
  415. { "e3m5", 0 },
  416. { "e3m6", 0 },
  417. { "e3m7", 0 },
  418. { "e3m8", 0 },
  419. { "e3m9", 0 },
  420. { "inter", 0 },
  421. { "intro", 0 },
  422. { "bunny", 0 },
  423. { "victor", 0 },
  424. { "introa", 0 },
  425. { "runnin", 0 },
  426. { "stalks", 0 },
  427. { "countd", 0 },
  428. { "betwee", 0 },
  429. { "doom", 0 },
  430. { "the_da", 0 },
  431. { "shawn", 0 },
  432. { "ddtblu", 0 },
  433. { "in_cit", 0 },
  434. { "dead", 0 },
  435. { "stlks2", 0 },
  436. { "theda2", 0 },
  437. { "doom2", 0 },
  438. { "ddtbl2", 0 },
  439. { "runni2", 0 },
  440. { "dead2", 0 },
  441. { "stlks3", 0 },
  442. { "romero", 0 },
  443. { "shawn2", 0 },
  444. { "messag", 0 },
  445. { "count2", 0 },
  446. { "ddtbl3", 0 },
  447. { "ampie", 0 },
  448. { "theda3", 0 },
  449. { "adrian", 0 },
  450. { "messg2", 0 },
  451. { "romer2", 0 },
  452. { "tense", 0 },
  453. { "shawn3", 0 },
  454. { "openin", 0 },
  455. { "evil", 0 },
  456. { "ultima", 0 },
  457. { "read_m", 0 },
  458. { "dm2ttl", 0 },
  459. { "dm2int", 0 }
  460. };
  461. memcpy( ::g->S_music, temp_S_music, sizeof(temp_S_music) );
  462. // sounds.constructs end //
  463. // st_stuff.constructs begin //
  464. ::g->veryfirsttime = 1;
  465. ::g->st_msgcounter=0;
  466. ::g->st_oldhealth = -1;
  467. ::g->st_facecount = 0;
  468. ::g->st_faceindex = 0;
  469. ::g->oldhealth = -1;
  470. ::g->lastattackdown = -1;
  471. ::g->priority = 0;
  472. ::g->largeammo = 1994; // means "n/a"
  473. ::g->st_palette = 0;
  474. ::g->st_stopped = true;
  475. // st_stuff.constructs end //
  476. // s_sound.constructs begin //
  477. ::g->mus_playing=0;
  478. // s_sound.constructs end //
  479. // wi_stuff.constructs begin //
  480. int temp_NUMANIMS[NUMEPISODES] = {
  481. sizeof(epsd0animinfo)/sizeof(anim_t),
  482. sizeof(epsd1animinfo)/sizeof(anim_t),
  483. sizeof(epsd2animinfo)/sizeof(anim_t)
  484. };
  485. memcpy( ::g->NUMANIMS, temp_NUMANIMS, sizeof(temp_NUMANIMS) );
  486. ::g->snl_pointeron = false;
  487. extern const anim_t temp_epsd0animinfo[10];
  488. extern const anim_t temp_epsd1animinfo[9];
  489. extern const anim_t temp_epsd2animinfo[6];
  490. memcpy(::g->epsd0animinfo, temp_epsd0animinfo, sizeof(temp_epsd0animinfo));
  491. memcpy(::g->epsd1animinfo, temp_epsd1animinfo, sizeof(temp_epsd1animinfo));
  492. memcpy(::g->epsd2animinfo, temp_epsd2animinfo, sizeof(temp_epsd2animinfo));
  493. wi_stuff_anims[0] = ::g->epsd0animinfo;
  494. wi_stuff_anims[1] = ::g->epsd1animinfo;
  495. wi_stuff_anims[2] = ::g->epsd2animinfo;
  496. // wi_stuff.constructs end //
  497. // z_zone.constructs begin //
  498. ::g->zones[NUM_ZONES] = NULL;
  499. ::g->NumAlloc = 0;
  500. // z_zone.constructs end //
  501. // info constructs begin //
  502. extern const state_t tempStates[NUMSTATES];
  503. memcpy(::g->states, tempStates, sizeof(tempStates));
  504. // info constructs end //
  505. // p_local begin //
  506. ::g->rejectmatrix = NULL;
  507. // p_local end //
  508. // r_data begin //]
  509. ::g->s_numtextures = 0;
  510. // r_data end //