8 =============================================================================
\r
12 =============================================================================
\r
15 #define sc_Question 0x35
\r
18 =============================================================================
\r
22 =============================================================================
\r
25 boolean madenoise; // true when shooting or screaming
\r
31 objtype objlist[MAXACTORS],*new,*obj,*player,*lastobj,
\r
32 *objfreelist,*killerobj;
\r
34 unsigned farmapylookup[MAPSIZE];
\r
35 byte *nearmapylookup[MAPSIZE];
\r
37 boolean singlestep,godmode,noclip;
\r
40 byte tilemap[MAPSIZE][MAPSIZE]; // wall values only
\r
41 byte spotvis[MAPSIZE][MAPSIZE];
\r
42 objtype *actorat[MAPSIZE][MAPSIZE];
\r
45 // replacing refresh manager
\r
47 unsigned mapwidth,mapheight,tics;
\r
48 boolean compatability;
\r
50 unsigned mapwidthtable[64];
\r
51 unsigned uwidthtable[UPDATEHIGH];
\r
52 unsigned blockstarts[UPDATEWIDE*UPDATEHIGH];
\r
53 //uso: replace: byte update[UPDATESIZE];
\r
54 //uso: is needed? byte update[UPDATEHIGH][UPDATEWIDE];
\r
59 boolean mouseenabled,joystickenabled,joypadenabled,joystickprogressive;
\r
61 int dirscan[4] = {sc_UpArrow,sc_RightArrow,sc_DownArrow,sc_LeftArrow};
\r
62 int buttonscan[NUMBUTTONS] =
\r
63 {sc_Control,sc_Alt,sc_RShift,sc_Space,sc_1,sc_2,sc_3,sc_4};
\r
64 int buttonmouse[4]={bt_attack,bt_strafe,bt_use,bt_nobutton};
\r
65 int buttonjoy[4]={bt_attack,bt_strafe,bt_use,bt_run};
\r
69 boolean buttonheld[NUMBUTTONS];
\r
71 boolean demorecord,demoplayback;
\r
72 char far *demoptr, far *lastdemoptr;
\r
76 // curent user input
\r
78 int controlx,controly; // range from -100 to 100 per tic
\r
79 boolean buttonstate[NUMBUTTONS];
\r
83 //===========================================================================
\r
86 void CenterWindow(word w,word h);
\r
87 void InitObjList (void);
\r
88 void RemoveObj (objtype *gone);
\r
89 void PollControls (void);
\r
90 void StopMusic(void);
\r
91 void StartMusic(void);
\r
92 void PlayLoop (void);
\r
95 =============================================================================
\r
99 =============================================================================
\r
106 // LIST OF SONGS FOR EACH VERSION
\r
123 WARMARCH_MUS, // Boss level
\r
124 CORNER_MUS, // Secret level
\r
138 WARMARCH_MUS, // Boss level
\r
139 DUNGEON_MUS, // Secret level
\r
153 ULTIMATE_MUS, // Boss level
\r
154 PACMAN_MUS, // Secret level
\r
168 WARMARCH_MUS, // Boss level
\r
169 CORNER_MUS, // Secret level
\r
183 WARMARCH_MUS, // Boss level
\r
184 DUNGEON_MUS, // Secret level
\r
198 ULTIMATE_MUS, // Boss level
\r
199 FUNKYOU_MUS // Secret level
\r
202 //////////////////////////////////////////////////////////////
\r
204 // SPEAR OF DESTINY TRACKS
\r
206 //////////////////////////////////////////////////////////////
\r
210 XGETYOU_MUS, // DON'T KNOW
\r
211 ULTIMATE_MUS, // Trans Gr
\94sse
\r
217 ULTIMATE_MUS, // Barnacle Wilhelm BOSS
\r
224 ULTIMATE_MUS, // Super Mutant BOSS
\r
227 ULTIMATE_MUS, // Death Knight BOSS
\r
229 XJAZNAZI_MUS, // Secret level
\r
230 XFUNKIE_MUS, // Secret level (DON'T KNOW)
\r
232 XEVIL_MUS // Angel of Death BOSS
\r
239 =============================================================================
\r
243 =============================================================================
\r
247 #define BASEMOVE 35
\r
249 #define BASETURN 35
\r
255 ===================
\r
257 = PollKeyboardButtons
\r
259 ===================
\r
262 void PollKeyboardButtons (void)
\r
266 for (i=0;i<NUMBUTTONS;i++)
\r
267 if (Keyboard[buttonscan[i]])
\r
268 buttonstate[i] = true;
\r
273 ===================
\r
277 ===================
\r
280 void PollMouseButtons (void)
\r
284 buttons = IN_MouseButtons ();
\r
287 buttonstate[buttonmouse[0]] = true;
\r
289 buttonstate[buttonmouse[1]] = true;
\r
291 buttonstate[buttonmouse[2]] = true;
\r
297 ===================
\r
299 = PollJoystickButtons
\r
301 ===================
\r
304 void PollJoystickButtons (void)
\r
308 buttons = IN_JoyButtons ();
\r
310 if (joystickport && !joypadenabled)
\r
313 buttonstate[buttonjoy[0]] = true;
\r
315 buttonstate[buttonjoy[1]] = true;
\r
320 buttonstate[buttonjoy[0]] = true;
\r
322 buttonstate[buttonjoy[1]] = true;
\r
326 buttonstate[buttonjoy[2]] = true;
\r
328 buttonstate[buttonjoy[3]] = true;
\r
335 ===================
\r
339 ===================
\r
342 void PollKeyboardMove (void)
\r
344 if (buttonstate[bt_run])
\r
346 if (Keyboard[dirscan[di_north]])
\r
347 controly -= RUNMOVE*tics;
\r
348 if (Keyboard[dirscan[di_south]])
\r
349 controly += RUNMOVE*tics;
\r
350 if (Keyboard[dirscan[di_west]])
\r
351 controlx -= RUNMOVE*tics;
\r
352 if (Keyboard[dirscan[di_east]])
\r
353 controlx += RUNMOVE*tics;
\r
357 if (Keyboard[dirscan[di_north]])
\r
358 controly -= BASEMOVE*tics;
\r
359 if (Keyboard[dirscan[di_south]])
\r
360 controly += BASEMOVE*tics;
\r
361 if (Keyboard[dirscan[di_west]])
\r
362 controlx -= BASEMOVE*tics;
\r
363 if (Keyboard[dirscan[di_east]])
\r
364 controlx += BASEMOVE*tics;
\r
370 ===================
\r
374 ===================
\r
377 void PollMouseMove (void)
\r
379 int mousexmove,mouseymove;
\r
385 controlx += mousexmove*10/(13-mouseadjustment);
\r
386 controly += mouseymove*20/(13-mouseadjustment);
\r
392 ===================
\r
396 ===================
\r
399 void PollJoystickMove (void)
\r
403 INL_GetJoyDelta(joystickport,&joyx,&joyy);
\r
405 if (joystickprogressive)
\r
408 controlx += (joyx-64)*JOYSCALE*tics;
\r
409 else if (joyx < -64)
\r
410 controlx -= (-joyx-64)*JOYSCALE*tics;
\r
412 controlx += (joyy-64)*JOYSCALE*tics;
\r
413 else if (joyy < -64)
\r
414 controly -= (-joyy-64)*JOYSCALE*tics;
\r
416 else if (buttonstate[bt_run])
\r
419 controlx += RUNMOVE*tics;
\r
420 else if (joyx < -64)
\r
421 controlx -= RUNMOVE*tics;
\r
423 controly += RUNMOVE*tics;
\r
424 else if (joyy < -64)
\r
425 controly -= RUNMOVE*tics;
\r
430 controlx += BASEMOVE*tics;
\r
431 else if (joyx < -64)
\r
432 controlx -= BASEMOVE*tics;
\r
434 controly += BASEMOVE*tics;
\r
435 else if (joyy < -64)
\r
436 controly -= BASEMOVE*tics;
\r
442 ===================
\r
446 = Gets user or demo input, call once each frame
\r
448 = controlx set between -100 and 100 per tic
\r
450 = buttonheld[] the state of the buttons LAST frame
\r
451 = buttonstate[] the state of the buttons THIS frame
\r
453 ===================
\r
456 void PollControls (void)
\r
462 // get timing info for last frame
\r
466 while (TimeCount<lasttimecount+DEMOTICS)
\r
468 TimeCount = lasttimecount + DEMOTICS;
\r
469 lasttimecount += DEMOTICS;
\r
472 else if (demorecord) // demo recording and playback needs
\r
473 { // to be constant
\r
475 // take DEMOTICS or more tics, and modify Timecount to reflect time taken
\r
477 while (TimeCount<lasttimecount+DEMOTICS)
\r
479 TimeCount = lasttimecount + DEMOTICS;
\r
480 lasttimecount += DEMOTICS;
\r
488 memcpy (buttonheld,buttonstate,sizeof(buttonstate));
\r
489 memset (buttonstate,0,sizeof(buttonstate));
\r
494 // read commands from demo buffer
\r
496 buttonbits = *demoptr++;
\r
497 for (i=0;i<NUMBUTTONS;i++)
\r
499 buttonstate[i] = buttonbits&1;
\r
503 controlx = *demoptr++;
\r
504 controly = *demoptr++;
\r
506 if (demoptr == lastdemoptr)
\r
507 playstate = ex_completed; // demo is done
\r
509 controlx *= (int)tics;
\r
510 controly *= (int)tics;
\r
517 // get button states
\r
519 PollKeyboardButtons ();
\r
522 PollMouseButtons ();
\r
524 if (joystickenabled)
\r
525 PollJoystickButtons ();
\r
530 PollKeyboardMove ();
\r
535 if (joystickenabled)
\r
536 PollJoystickMove ();
\r
539 // bound movement to a maximum
\r
543 if (controlx > max)
\r
545 else if (controlx < min)
\r
548 if (controly > max)
\r
550 else if (controly < min)
\r
556 // save info out to demo buffer
\r
558 controlx /= (int)tics;
\r
559 controly /= (int)tics;
\r
563 for (i=NUMBUTTONS-1;i>=0;i--)
\r
566 if (buttonstate[i])
\r
570 *demoptr++ = buttonbits;
\r
571 *demoptr++ = controlx;
\r
572 *demoptr++ = controly;
\r
574 if (demoptr >= lastdemoptr)
\r
575 Quit ("Demo buffer overflowed!");
\r
577 controlx *= (int)tics;
\r
578 controly *= (int)tics;
\r
584 //==========================================================================
\r
588 ///////////////////////////////////////////////////////////////////////////
\r
590 // CenterWindow() - Generates a window of a given width & height in the
\r
591 // middle of the screen
\r
593 ///////////////////////////////////////////////////////////////////////////
\r
598 void CenterWindow(word w,word h)
\r
601 US_DrawWindow(((MAXX / 8) - w) / 2,((MAXY / 8) - h) / 2,w,h);
\r
604 //===========================================================================
\r
608 =====================
\r
612 =====================
\r
615 void CheckKeys (void)
\r
622 if (screenfaded || demoplayback) // don't do anything with a faded screen
\r
630 // SECRET CHEAT CODE: TAB-G-F10
\r
632 if (Keyboard[sc_Tab] &&
\r
639 Message ("God mode OFF");
\r
640 SD_PlaySound (NOBONUSSND);
\r
644 Message ("God mode ON");
\r
645 SD_PlaySound (ENDBONUS2SND);
\r
650 DrawAllPlayBorderSides ();
\r
651 IN_ClearKeysDown();
\r
658 // SECRET CHEAT CODE: 'MLI'
\r
660 if (Keyboard[sc_M] &&
\r
664 gamestate.health = 100;
\r
665 gamestate.ammo = 99;
\r
666 gamestate.keys = 3;
\r
667 gamestate.score = 0;
\r
668 gamestate.TimeCount += 42000L;
\r
669 GiveWeapon (wp_chaingun);
\r
678 CA_CacheGrChunk (STARTFONT+1);
\r
680 VW_ScreenToScreen (displayofs,bufferofs,80,160);
\r
682 Message(STR_CHEATER1"\n"
\r
688 UNCACHEGRCHUNK(STARTFONT+1);
\r
689 PM_CheckMainMem ();
\r
690 IN_ClearKeysDown();
\r
693 DrawAllPlayBorder ();
\r
697 // OPEN UP DEBUG KEYS
\r
700 if (Keyboard[sc_BackSpace] &&
\r
701 Keyboard[sc_LShift] &&
\r
702 Keyboard[sc_Alt] &&
\r
703 MS_CheckParm("goobers"))
\r
705 if (Keyboard[sc_BackSpace] &&
\r
706 Keyboard[sc_LShift] &&
\r
707 Keyboard[sc_Alt] &&
\r
708 MS_CheckParm("debugmode"))
\r
712 CA_CacheGrChunk (STARTFONT+1);
\r
714 VW_ScreenToScreen (displayofs,bufferofs,80,160);
\r
716 Message("Debugging keys are\nnow available!");
\r
717 UNCACHEGRCHUNK(STARTFONT+1);
\r
718 PM_CheckMainMem ();
\r
719 IN_ClearKeysDown();
\r
722 DrawAllPlayBorderSides ();
\r
727 // TRYING THE KEEN CHEAT CODE!
\r
729 if (Keyboard[sc_B] &&
\r
734 CA_CacheGrChunk (STARTFONT+1);
\r
736 VW_ScreenToScreen (displayofs,bufferofs,80,160);
\r
738 Message("Commander Keen is also\n"
\r
739 "available from Apogee, but\n"
\r
740 "then, you already know\n"
\r
741 "that - right, Cheatmeister?!");
\r
743 UNCACHEGRCHUNK(STARTFONT+1);
\r
744 PM_CheckMainMem ();
\r
745 IN_ClearKeysDown();
\r
748 DrawAllPlayBorder ();
\r
752 // pause key weirdness can't be checked as a scan code
\r
756 bufferofs = displayofs;
\r
757 LatchDrawPic (20-4,80-2*8,PAUSEDPIC);
\r
760 IN_ClearKeysDown ();
\r
764 Mouse(MDelta); // Clear accumulated mouse movement
\r
770 // F1-F7/ESC to enter control panel
\r
778 scan == sc_F8) // pop up quit dialog
\r
782 VW_ScreenToScreen (displayofs,bufferofs,80,160);
\r
783 US_ControlPanel(scan);
\r
785 DrawAllPlayBorderSides ();
\r
790 PM_CheckMainMem ();
\r
791 SETFONTCOLOR(0,15);
\r
792 IN_ClearKeysDown();
\r
796 if ( (scan >= sc_F1 && scan <= sc_F9) || scan == sc_Escape)
\r
802 US_ControlPanel(scan);
\r
804 SETFONTCOLOR(0,15);
\r
805 IN_ClearKeysDown();
\r
807 if (!startgame && !loadedgame)
\r
813 playstate = ex_abort;
\r
814 lasttimecount = TimeCount;
\r
816 Mouse(MDelta); // Clear accumulated mouse movement
\r
817 PM_CheckMainMem ();
\r
822 // TAB-? debug keys
\r
824 if (Keyboard[sc_Tab] && DebugOk)
\r
826 CA_CacheGrChunk (STARTFONT);
\r
828 SETFONTCOLOR(0,15);
\r
831 Mouse(MDelta); // Clear accumulated mouse movement
\r
832 lasttimecount = TimeCount;
\r
839 //===========================================================================
\r
842 #############################################################################
\r
844 The objlist data structure
\r
846 #############################################################################
\r
848 objlist containt structures for every actor currently playing. The structure
\r
849 is accessed as a linked list starting at *player, ending when ob->next ==
\r
850 NULL. GetNewObj inserts a new object at the end of the list, meaning that
\r
851 if an actor spawn another actor, the new one WILL get to think and react the
\r
852 same frame. RemoveObj unlinks the given object and returns it to the free
\r
853 list, but does not damage the objects ->next pointer, so if the current object
\r
854 removes itself, a linked list following loop can still safely get to the
\r
857 <backwardly linked free list>
\r
859 #############################################################################
\r
864 =========================
\r
868 = Call to clear out the actor object lists returning them all to the free
\r
869 = list. Allocates a special spot for the player.
\r
871 =========================
\r
876 void InitActorList (void)
\r
881 // init the actor lists
\r
883 for (i=0;i<MAXACTORS;i++)
\r
885 objlist[i].prev = &objlist[i+1];
\r
886 objlist[i].next = NULL;
\r
889 objlist[MAXACTORS-1].prev = NULL;
\r
891 objfreelist = &objlist[0];
\r
897 // give the player the first free spots
\r
904 //===========================================================================
\r
907 =========================
\r
911 = Sets the global variable new to point to a free spot in objlist.
\r
912 = The free spot is inserted at the end of the liked list
\r
914 = When the object list is full, the caller can either have it bomb out ot
\r
915 = return a dummy object pointer that will never get used
\r
917 =========================
\r
920 void GetNewActor (void)
\r
923 Quit ("GetNewActor: No free spots in objlist!");
\r
926 objfreelist = new->prev;
\r
927 memset (new,0,sizeof(*new));
\r
930 lastobj->next = new;
\r
931 new->prev = lastobj; // new->next is allready NULL from memset
\r
933 new->active = false;
\r
939 //===========================================================================
\r
942 =========================
\r
946 = Add the given object back into the free list, and unlink it from it's
\r
949 =========================
\r
952 void RemoveObj (objtype *gone)
\r
956 if (gone == player)
\r
957 Quit ("RemoveObj: Tried to remove the player!");
\r
959 gone->state = NULL;
\r
962 // fix the next object's back link
\r
964 if (gone == lastobj)
\r
965 lastobj = (objtype *)gone->prev;
\r
967 gone->next->prev = gone->prev;
\r
970 // fix the previous object's forward link
\r
972 gone->prev->next = gone->next;
\r
975 // add it back in to the free list
\r
977 gone->prev = objfreelist;
\r
978 objfreelist = gone;
\r
984 =============================================================================
\r
988 =============================================================================
\r
1000 void StopMusic(void)
\r
1005 for (i = 0;i < LASTMUSIC;i++)
\r
1006 if (audiosegs[STARTMUSIC + i])
\r
1008 MM_SetPurge(&((memptr)audiosegs[STARTMUSIC + i]),3);
\r
1009 MM_SetLock(&((memptr)audiosegs[STARTMUSIC + i]),false);
\r
1013 //==========================================================================
\r
1024 void StartMusic(void)
\r
1029 chunk = songs[gamestate.mapon+gamestate.episode*10];
\r
1031 // if ((chunk == -1) || (MusicMode != smm_AdLib))
\r
1032 //DEBUG control panel return;
\r
1034 MM_BombOnError (false);
\r
1035 CA_CacheAudioChunk(STARTMUSIC + chunk);
\r
1036 MM_BombOnError (true);
\r
1041 MM_SetLock(&((memptr)audiosegs[STARTMUSIC + chunk]),true);
\r
1042 SD_StartMusic((MusicGroup far *)audiosegs[STARTMUSIC + chunk]);
\r
1048 =============================================================================
\r
1050 PALETTE SHIFTING STUFF
\r
1052 =============================================================================
\r
1055 #define NUMREDSHIFTS 6
\r
1056 #define REDSTEPS 8
\r
1058 #define NUMWHITESHIFTS 3
\r
1059 #define WHITESTEPS 20
\r
1060 #define WHITETICS 6
\r
1063 byte far redshifts[NUMREDSHIFTS][768];
\r
1064 byte far whiteshifts[NUMREDSHIFTS][768];
\r
1066 int damagecount,bonuscount;
\r
1067 boolean palshifted;
\r
1069 extern byte far gamepal;
\r
1072 =====================
\r
1076 =====================
\r
1079 void InitRedShifts (void)
\r
1081 byte far *workptr, far *baseptr;
\r
1086 // fade through intermediate frames
\r
1088 for (i=1;i<=NUMREDSHIFTS;i++)
\r
1090 workptr = (byte far *)&redshifts[i-1][0];
\r
1091 baseptr = &gamepal;
\r
1093 for (j=0;j<=255;j++)
\r
1095 delta = 64-*baseptr;
\r
1096 *workptr++ = *baseptr++ + delta * i / REDSTEPS;
\r
1097 delta = -*baseptr;
\r
1098 *workptr++ = *baseptr++ + delta * i / REDSTEPS;
\r
1099 delta = -*baseptr;
\r
1100 *workptr++ = *baseptr++ + delta * i / REDSTEPS;
\r
1104 for (i=1;i<=NUMWHITESHIFTS;i++)
\r
1106 workptr = (byte far *)&whiteshifts[i-1][0];
\r
1107 baseptr = &gamepal;
\r
1109 for (j=0;j<=255;j++)
\r
1111 delta = 64-*baseptr;
\r
1112 *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
\r
1113 delta = 62-*baseptr;
\r
1114 *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
\r
1115 delta = 0-*baseptr;
\r
1116 *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
\r
1123 =====================
\r
1125 = ClearPaletteShifts
\r
1127 =====================
\r
1130 void ClearPaletteShifts (void)
\r
1132 bonuscount = damagecount = 0;
\r
1137 =====================
\r
1141 =====================
\r
1144 void StartBonusFlash (void)
\r
1146 bonuscount = NUMWHITESHIFTS*WHITETICS; // white shift palette
\r
1151 =====================
\r
1153 = StartDamageFlash
\r
1155 =====================
\r
1158 void StartDamageFlash (int damage)
\r
1160 damagecount += damage;
\r
1165 =====================
\r
1167 = UpdatePaletteShifts
\r
1169 =====================
\r
1172 void UpdatePaletteShifts (void)
\r
1178 white = bonuscount/WHITETICS +1;
\r
1179 if (white>NUMWHITESHIFTS)
\r
1180 white = NUMWHITESHIFTS;
\r
1181 bonuscount -= tics;
\r
1182 if (bonuscount < 0)
\r
1191 red = damagecount/10 +1;
\r
1192 if (red>NUMREDSHIFTS)
\r
1193 red = NUMREDSHIFTS;
\r
1195 damagecount -= tics;
\r
1196 if (damagecount < 0)
\r
1205 VL_SetPalette (redshifts[red-1]);
\r
1206 palshifted = true;
\r
1211 VL_SetPalette (whiteshifts[white-1]);
\r
1212 palshifted = true;
\r
1214 else if (palshifted)
\r
1217 VL_SetPalette (&gamepal); // back to normal
\r
1218 palshifted = false;
\r
1224 =====================
\r
1226 = FinishPaletteShifts
\r
1228 = Resets palette to normal if needed
\r
1230 =====================
\r
1233 void FinishPaletteShifts (void)
\r
1239 VL_SetPalette (&gamepal);
\r
1245 =============================================================================
\r
1249 =============================================================================
\r
1254 =====================
\r
1258 =====================
\r
1261 void DoActor (objtype *ob)
\r
1263 void (*think)(objtype *);
\r
1265 if (!ob->active && !areabyplayer[ob->areanumber])
\r
1268 if (!(ob->flags&(FL_NONMARK|FL_NEVERMARK)) )
\r
1269 actorat[ob->tilex][ob->tiley] = NULL;
\r
1272 // non transitional object
\r
1275 if (!ob->ticcount)
\r
1277 think = ob->state->think;
\r
1288 if (ob->flags&FL_NEVERMARK)
\r
1291 if ( (ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley])
\r
1294 actorat[ob->tilex][ob->tiley] = ob;
\r
1299 // transitional object
\r
1301 ob->ticcount-=tics;
\r
1302 while ( ob->ticcount <= 0)
\r
1304 think = ob->state->action; // end of state action
\r
1315 ob->state = ob->state->next;
\r
1323 if (!ob->state->tictime)
\r
1329 ob->ticcount += ob->state->tictime;
\r
1336 think = ob->state->think;
\r
1347 if (ob->flags&FL_NEVERMARK)
\r
1350 if ( (ob->flags&FL_NONMARK) && actorat[ob->tilex][ob->tiley])
\r
1353 actorat[ob->tilex][ob->tiley] = ob;
\r
1356 //==========================================================================
\r
1360 ===================
\r
1364 ===================
\r
1366 long funnyticount;
\r
1369 void PlayLoop (void)
\r
1374 playstate = TimeCount = lasttimecount = 0;
\r
1380 memset (buttonstate,0,sizeof(buttonstate));
\r
1381 ClearPaletteShifts ();
\r
1384 Mouse(MDelta); // Clear accumulated mouse movement
\r
1391 if (virtualreality)
\r
1393 helmetangle = peek (0x40,0xf0);
\r
1394 player->angle += helmetangle;
\r
1395 if (player->angle >= ANGLES)
\r
1396 player->angle -= ANGLES;
\r
1405 madenoise = false;
\r
1410 for (obj = player;obj;obj = obj->next)
\r
1413 UpdatePaletteShifts ();
\r
1418 // MAKE FUNNY FACE IF BJ DOESN'T MOVE FOR AWHILE
\r
1421 funnyticount += tics;
\r
1422 if (funnyticount > 30l*70)
\r
1425 StatusDrawPic (17,4,BJWAITING1PIC+(US_RndT()&1));
\r
1430 gamestate.TimeCount+=tics;
\r
1433 UpdateSoundLoc(); // JAB
\r
1446 lasttimecount = TimeCount;
\r
1449 VW_WaitVBL(extravbls);
\r
1453 if (IN_CheckAck ())
\r
1455 IN_ClearKeysDown ();
\r
1456 playstate = ex_abort;
\r
1461 if (virtualreality)
\r
1463 player->angle -= helmetangle;
\r
1464 if (player->angle < 0)
\r
1465 player->angle += ANGLES;
\r
1468 }while (!playstate && !startgame);
\r
1470 if (playstate != ex_died)
\r
1471 FinishPaletteShifts ();
\r