1 /* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
5 * PrBoom a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
28 * Intermission screens.
30 *-----------------------------------------------------------------------------
46 // Data needed to add patches to full screen intermission pics.
47 // Patches are statistics messages, and animations.
48 // Loads of by-pixel layout and placement, offsets etc.
52 // Different vetween registered DOOM (1994) and
53 // Ultimate DOOM - Final edition (retail, 1995?).
54 // This is supposedly ignored for commercial
55 // release (aka DOOM II), which had 34 maps
56 // in one episode. So there.
63 //U #define PAUSELEN (TICRATE*2)
64 //U #define SCORESTEP 100
65 //U #define ANIMPERIOD 32
66 // pixel distance from "(YOU)" to "PLAYER N"
67 //U #define STARDIST 10
73 #define WI_SPACINGY 33
75 // SINGLE-PLAYER STUFF
80 // proff/nicolas 09/20/98 -- changed for hi-res
82 //#define SP_TIMEY (SCREENHEIGHT-32)
87 #define NG_STATSX (32 + V_NamePatchWidth(star)/2 + 32*!dofrags)
89 #define NG_SPACINGX 64
92 // Used to display the frags matrix at endgame
97 #define DM_SPACINGX 40
99 #define DM_TOTALSX 269
101 #define DM_KILLERSX 10
102 #define DM_KILLERSY 100
103 #define DM_VICTIMSX 5
104 #define DM_VICTIMSY 50
107 // These animation variables, structures, etc. are used for the
108 // DOOM/Ultimate DOOM intermission screen animations. This is
109 // totally different from any sprite or texture/flat animations
112 ANIM_ALWAYS
, // determined by patch entry
113 ANIM_RANDOM
, // occasional
114 ANIM_LEVEL
// continuous
119 int x
; // x/y coordinate pair structure
126 // There is another anim_t used in p_spec.
132 // period in tics between animations
135 // number of animation frames
138 // location of animation
142 // RANDOM: period deviation (<256),
147 // RANDOM: random base period,
151 /* actual graphics for frames of animations
156 // following must be initialized to zero before use!
158 // next value of bcnt (used in conjunction with period)
161 // last drawn animation frame
164 // next frame number to animate
167 // used by RANDOM and LEVEL when animating
172 static point_t lnodes
[NUMEPISODES
][NUMMAPS
] =
174 // Episode 0 World Map
176 { 185, 164 }, // location of level 0 (CJ)
177 { 148, 143 }, // location of level 1 (CJ)
178 { 69, 122 }, // location of level 2 (CJ)
179 { 209, 102 }, // location of level 3 (CJ)
180 { 116, 89 }, // location of level 4 (CJ)
181 { 166, 55 }, // location of level 5 (CJ)
182 { 71, 56 }, // location of level 6 (CJ)
183 { 135, 29 }, // location of level 7 (CJ)
184 { 71, 24 } // location of level 8 (CJ)
187 // Episode 1 World Map should go here
189 { 254, 25 }, // location of level 0 (CJ)
190 { 97, 50 }, // location of level 1 (CJ)
191 { 188, 64 }, // location of level 2 (CJ)
192 { 128, 78 }, // location of level 3 (CJ)
193 { 214, 92 }, // location of level 4 (CJ)
194 { 133, 130 }, // location of level 5 (CJ)
195 { 208, 136 }, // location of level 6 (CJ)
196 { 148, 140 }, // location of level 7 (CJ)
197 { 235, 158 } // location of level 8 (CJ)
200 // Episode 2 World Map should go here
202 { 156, 168 }, // location of level 0 (CJ)
203 { 48, 154 }, // location of level 1 (CJ)
204 { 174, 95 }, // location of level 2 (CJ)
205 { 265, 75 }, // location of level 3 (CJ)
206 { 130, 48 }, // location of level 4 (CJ)
207 { 279, 23 }, // location of level 5 (CJ)
208 { 198, 48 }, // location of level 6 (CJ)
209 { 140, 25 }, // location of level 7 (CJ)
210 { 281, 136 } // location of level 8 (CJ)
217 // Animation locations for episode 0 (1).
218 // Using patches saves a lot of space,
219 // as they replace 320x200 full screen frames.
221 static anim_t epsd0animinfo
[] =
223 { ANIM_ALWAYS
, TICRATE
/3, 3, { 224, 104 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
224 { ANIM_ALWAYS
, TICRATE
/3, 3, { 184, 160 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
225 { ANIM_ALWAYS
, TICRATE
/3, 3, { 112, 136 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
226 { ANIM_ALWAYS
, TICRATE
/3, 3, { 72, 112 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
227 { ANIM_ALWAYS
, TICRATE
/3, 3, { 88, 96 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
228 { ANIM_ALWAYS
, TICRATE
/3, 3, { 64, 48 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
229 { ANIM_ALWAYS
, TICRATE
/3, 3, { 192, 40 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
230 { ANIM_ALWAYS
, TICRATE
/3, 3, { 136, 16 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
231 { ANIM_ALWAYS
, TICRATE
/3, 3, { 80, 16 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
232 { ANIM_ALWAYS
, TICRATE
/3, 3, { 64, 24 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 }
235 static anim_t epsd1animinfo
[] =
237 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 1, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
238 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 2, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
239 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 3, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
240 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 4, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
241 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 5, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
242 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 6, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
243 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 7, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
244 { ANIM_LEVEL
, TICRATE
/3, 3, { 192, 144 }, 8, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
245 { ANIM_LEVEL
, TICRATE
/3, 1, { 128, 136 }, 8, 0, { 0, 0, 0 }, 0, 0, 0, 0 }
248 static anim_t epsd2animinfo
[] =
250 { ANIM_ALWAYS
, TICRATE
/3, 3, { 104, 168 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
251 { ANIM_ALWAYS
, TICRATE
/3, 3, { 40, 136 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
252 { ANIM_ALWAYS
, TICRATE
/3, 3, { 160, 96 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
253 { ANIM_ALWAYS
, TICRATE
/3, 3, { 104, 80 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
254 { ANIM_ALWAYS
, TICRATE
/3, 3, { 120, 32 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 },
255 { ANIM_ALWAYS
, TICRATE
/4, 3, { 40, 0 }, 0, 0, { 0, 0, 0 }, 0, 0, 0, 0 }
258 static int NUMANIMS
[NUMEPISODES
] =
260 sizeof(epsd0animinfo
)/sizeof(anim_t
),
261 sizeof(epsd1animinfo
)/sizeof(anim_t
),
262 sizeof(epsd2animinfo
)/sizeof(anim_t
)
265 static anim_t
*anims
[NUMEPISODES
] =
278 // Locally used stuff.
283 // States for single-player
289 #define SP_PAR ST_TIME
294 #define SHOWNEXTLOCDELAY 4
295 //#define SHOWLASTLOCDELAY SHOWNEXTLOCDELAY
298 // used to accelerate or skip a stage
299 int acceleratestage
; // killough 3/28/98: made global
304 // specifies current state
305 static stateenum_t state
;
307 // contains information passed into intermission
308 static wbstartstruct_t
* wbs
;
310 static wbplayerstruct_t
* plrs
; // wbs->plyr[]
312 // used for general timing
315 // used for timing of background animation
318 // signals to refresh everything for one frame
319 static int firstrefresh
;
322 static int cnt_total_time
;
324 static int cnt_pause
;
331 // You Are Here graphic
332 static const char* yah
[2] = { "WIURH0", "WIURH1" };
335 static const char* splat
= "WISPLAT";
338 static const char percent
[] = {"WIPCNT"};
339 static const char colon
[] = {"WICOLON"};
342 static const patch_t
* num
[10];
345 static const char wiminus
[] = {"WIMINUS"};
347 // "Finished!" graphics
348 static const char finished
[] = {"WIF"};
350 // "Entering" graphic
351 static const char entering
[] = {"WIENTER"};
354 static const char sp_secret
[] = {"WISCRT2"};
356 // "Kills", "Scrt", "Items", "Frags"
357 static const char kills
[] = {"WIOSTK"};
358 static const char secret
[] = {"WIOSTS"};
359 static const char items
[] = {"WIOSTI"};
360 static const char frags
[] = {"WIFRGS"};
363 static const char time1
[] = {"WITIME"};
364 static const char par
[] = {"WIPAR"};
365 static const char sucks
[] = {"WISUCKS"};
367 // "killers", "victims"
368 static const char killers
[] = {"WIKILRS"};
369 static const char victims
[] = {"WIVCTMS"};
371 // "Total", your face, your dead face
372 static const char total
[] = {"WIMSTT"};
373 static const char star
[] = {"STFST01"};
374 static const char bstar
[] = {"STFDEAD0"};
376 // "red P[1..MAXPLAYERS]"
377 static const char facebackp
[] = {"STPB0"};
384 static void WI_endDeathmatchStats(void);
385 static void WI_endNetgameStats(void);
386 void WI_unloadData(void);
387 #define WI_endStats WI_endNetgameStats
389 /* ====================================================================
391 * Purpore: Returns the name of the graphic lump containing the name of
393 * Args: Episode and level, and buffer (must by 9 chars) to write to
396 void WI_levelNameLump(int epis
, int map
, char* buf
, int bsize
)
398 if (gamemode
== commercial
) {
399 snprintf(buf
, bsize
,"CWILV%s%d",(map
/10>0?"":"0"), map
); //ANOTHER ROCKHACK "CWILV%2.2d"
400 //snprintf(buf,bsize, "CWILV%2.2d", map);
402 snprintf(buf
,bsize
, "WILV%d%d", epis
, map
);
406 // ====================================================================
408 // Purpose: Put the full-screen background up prior to patches
412 static void WI_slamBackground(void)
414 char name
[9]; // limited to 8 characters
416 if (gamemode
== commercial
|| (gamemode
== retail
&& wbs
->epsd
== 3))
417 strcpy(name
, "INTERPIC");
419 snprintf(name
, sizeof(name
), "WIMAP%d", wbs
->epsd
);
422 V_DrawNamePatch(0, 0, FB
, name
, CR_DEFAULT
, VPT_STRETCH
);
425 // ====================================================================
427 // Purpose: Draw animations on intermission background screen
428 // Args: ev -- event pointer, not actually used here.
429 // Returns: False -- dummy routine
431 // The ticker is used to detect keys
432 // because of timing issues in netgames.
433 boolean
WI_Responder(event_t
* ev
)
439 // ====================================================================
441 // Purpose: Draw the "Finished" level name before showing stats
451 /* cph - get the graphic lump name and use it */
452 WI_levelNameLump(wbs
->epsd
, wbs
->last
, lname
, sizeof(lname
));
453 // CPhipps - patch drawing updated
454 V_DrawNamePatch((320 - V_NamePatchWidth(lname
))/2, y
,
455 FB
, lname
, CR_DEFAULT
, VPT_STRETCH
);
458 y
+= (5*V_NamePatchHeight(lname
))/4;
460 // CPhipps - patch drawing updated
461 V_DrawNamePatch((320 - V_NamePatchWidth(finished
))/2, y
,
462 FB
, finished
, CR_DEFAULT
, VPT_STRETCH
);
465 // ====================================================================
467 // Purpose: Draw introductory "Entering" and level name
476 /* cph - get the graphic lump name */
477 WI_levelNameLump(wbs
->epsd
, wbs
->next
, lname
, sizeof(lname
));
480 // CPhipps - patch drawing updated
481 V_DrawNamePatch((320 - V_NamePatchWidth(entering
))/2,
482 y
, FB
, entering
, CR_DEFAULT
, VPT_STRETCH
);
485 y
+= (5*V_NamePatchHeight(lname
))/4;
487 // CPhipps - patch drawing updated
488 V_DrawNamePatch((320 - V_NamePatchWidth(lname
))/2, y
, FB
,
489 lname
, CR_DEFAULT
, VPT_STRETCH
);
493 /* ====================================================================
495 * Purpose: Draw patches at a location based on episode/map
496 * Args: n -- index to map# within episode
497 * c[] -- array of names of patches to be drawn
501 WI_drawOnLnode
// draw stuff at a location by episode/map#
503 const char* const c
[] )
506 boolean fits
= false;
515 int lump
= W_GetNumForName(c
[i
]);
516 const patch_t
* p
= W_CacheLumpNum(lump
);
518 left
= lnodes
[wbs
->epsd
][n
].x
- SHORT(p
->leftoffset
);
519 top
= lnodes
[wbs
->epsd
][n
].y
- SHORT(p
->topoffset
);
520 right
= left
+ SHORT(p
->width
);
521 bottom
= top
+ SHORT(p
->height
);
522 W_UnlockLumpNum(lump
);
535 } while (!fits
&& i
!=2);
539 // CPhipps - patch drawing updated
540 V_DrawNamePatch(lnodes
[wbs
->epsd
][n
].x
, lnodes
[wbs
->epsd
][n
].y
,
541 FB
, c
[i
], CR_DEFAULT
, VPT_STRETCH
);
546 //jff 8/3/98 use logical output routine
547 printf("Could not place patch on level %d", n
+1);
552 // ====================================================================
553 // WI_initAnimatedBack
554 // Purpose: Initialize pointers and styles for background animation
558 void WI_initAnimatedBack(void)
563 if (gamemode
== commercial
) // no animation for DOOM2
569 for (i
=0;i
<NUMANIMS
[wbs
->epsd
];i
++)
571 a
= &anims
[wbs
->epsd
][i
];
576 // specify the next time to draw it
577 if (a
->type
== ANIM_ALWAYS
)
578 a
->nexttic
= bcnt
+ 1 + (M_Random()%a
->period
);
580 if (a
->type
== ANIM_RANDOM
)
581 a
->nexttic
= bcnt
+ 1 + a
->data2
+(M_Random()%a
->data1
);
583 if (a
->type
== ANIM_LEVEL
)
584 a
->nexttic
= bcnt
+ 1;
589 // ====================================================================
590 // WI_updateAnimatedBack
591 // Purpose: Figure out what animation we do on this iteration
595 void WI_updateAnimatedBack(void)
600 if (gamemode
== commercial
)
606 for (i
=0;i
<NUMANIMS
[wbs
->epsd
];i
++)
608 a
= &anims
[wbs
->epsd
][i
];
610 if (bcnt
== a
->nexttic
)
615 if (++a
->ctr
>= a
->nanims
) a
->ctr
= 0;
616 a
->nexttic
= bcnt
+ a
->period
;
621 if (a
->ctr
== a
->nanims
)
624 a
->nexttic
= bcnt
+a
->data2
+(M_Random()%a
->data1
);
627 a
->nexttic
= bcnt
+ a
->period
;
631 // gawd-awful hack for level anims
632 if (!(state
== StatCount
&& i
== 7)
633 && wbs
->next
== a
->data1
)
636 if (a
->ctr
== a
->nanims
) a
->ctr
--;
637 a
->nexttic
= bcnt
+ a
->period
;
646 // ====================================================================
647 // WI_drawAnimatedBack
648 // Purpose: Actually do the animation (whew!)
652 void WI_drawAnimatedBack(void)
657 if (gamemode
==commercial
) //jff 4/25/98 Someone forgot commercial an enum
663 for (i
=0 ; i
<NUMANIMS
[wbs
->epsd
] ; i
++)
665 a
= &anims
[wbs
->epsd
][i
];
668 // CPhipps - patch drawing updated
669 V_DrawMemPatch(a
->loc
.x
, a
->loc
.y
, FB
, a
->p
[a
->ctr
], CR_DEFAULT
, VPT_STRETCH
);
674 // ====================================================================
676 // Purpose: Draws a number. If digits > 0, then use that many digits
677 // minimum, otherwise only use as many as necessary
678 // Args: x, y -- location
679 // n -- the number to be drawn
680 // digits -- number of digits minimum or zero
681 // Returns: new x position after drawing (note we are going to the left)
683 static int WI_drawNum (int x
, int y
, int n
, int digits
)
685 int fontwidth
= SHORT(num
[0]->width
);
693 // make variable-length zeros 1 digit long
698 // figure out # of digits in #
714 // if non-number, do not draw it
718 // draw the new number
722 // CPhipps - patch drawing updated
723 V_DrawMemPatch(x
, y
, FB
, num
[ n
% 10 ], CR_DEFAULT
, VPT_STRETCH
);
727 // draw a minus sign if necessary
729 // CPhipps - patch drawing updated
730 V_DrawNamePatch(x
-=8, y
, FB
, wiminus
, CR_DEFAULT
, VPT_STRETCH
);
736 // ====================================================================
738 // Purpose: Draws a percentage, really just a call to WI_drawNum
739 // after putting a percent sign out there
740 // Args: x, y -- location
741 // p -- the percentage value to be drawn, no negatives
744 static void WI_drawPercent(int x
, int y
, int p
)
749 // CPhipps - patch drawing updated
750 V_DrawNamePatch(x
, y
, FB
, percent
, CR_DEFAULT
, VPT_STRETCH
);
751 WI_drawNum(x
, y
, p
, -1);
755 // ====================================================================
757 // Purpose: Draws the level completion time or par time, or "Sucks"
759 // Args: x, y -- location
760 // t -- the time value to be drawn
764 // - largely rewritten to display hours and use slightly better algorithm
766 static void WI_drawTime(int x
, int y
, int t
)
777 x
= WI_drawNum(x
, y
, n
, (t
|| n
>9) ? 2 : 1) - V_NamePatchWidth(colon
);
781 // CPhipps - patch drawing updated
782 V_DrawNamePatch(x
, y
, FB
, colon
, CR_DEFAULT
, VPT_STRETCH
);
785 else // "sucks" (maybe should be "addicted", even I've never had a 100 hour game ;)
786 V_DrawNamePatch(x
- V_NamePatchWidth(sucks
),
787 y
, FB
, sucks
, CR_DEFAULT
, VPT_STRETCH
);
791 // ====================================================================
793 // Purpose: Unloads data structures (inverse of WI_Start)
802 WI_endDeathmatchStats();
804 WI_endNetgameStats();
810 // ====================================================================
812 // Purpose: Clear state, ready for end of level activity
816 void WI_initNoState(void)
824 // ====================================================================
826 // Purpose: Put the times on the screen
827 // Args: time, total time, par time, in seconds
830 // cph - pulled from WI_drawStats below
832 static void WI_drawTimeStats(int cnt_time
, int cnt_total_time
, int cnt_par
)
834 V_DrawNamePatch(SP_TIMEX
, SP_TIMEY
, FB
, time1
, CR_DEFAULT
, VPT_STRETCH
);
835 WI_drawTime(320/2 - SP_TIMEX
, SP_TIMEY
, cnt_time
);
837 V_DrawNamePatch(SP_TIMEX
, (SP_TIMEY
+200)/2, FB
, total
, CR_DEFAULT
, VPT_STRETCH
);
838 WI_drawTime(320/2 - SP_TIMEX
, (SP_TIMEY
+200)/2, cnt_total_time
);
840 // Ty 04/11/98: redid logic: should skip only if with pwad but
842 // killough 2/22/98: skip drawing par times on pwads
843 // Ty 03/17/98: unless pars changed with deh patch
845 if (!(modifiedgame
)) //&& !deh_pars))
849 V_DrawNamePatch(320/2 + SP_TIMEX
, SP_TIMEY
, FB
, par
, CR_DEFAULT
, VPT_STRETCH
);
850 WI_drawTime(320 - SP_TIMEX
, SP_TIMEY
, cnt_par
);
855 // ====================================================================
857 // Purpose: Cycle until end of level activity is done
861 void WI_updateNoState(void)
864 WI_updateAnimatedBack();
870 static boolean snl_pointeron
= false;
874 // ====================================================================
875 // WI_initShowNextLoc
876 // Purpose: Prepare to show the next level's location
880 void WI_initShowNextLoc(void)
882 if ((gamemode
!= commercial
) && (gamemap
== 8)) {
889 cnt
= SHOWNEXTLOCDELAY
* TICRATE
;
891 WI_initAnimatedBack();
894 // ====================================================================
895 // WI_updateShowNextLoc
896 // Purpose: Prepare to show the next level's location
900 void WI_updateShowNextLoc(void)
902 WI_updateAnimatedBack();
904 if (!--cnt
|| acceleratestage
)
907 snl_pointeron
= (cnt
& 31) < 20;
911 // ====================================================================
912 // WI_drawShowNextLoc
913 // Purpose: Show the next level's location on animated backgrounds
917 void WI_drawShowNextLoc(void)
924 // draw animated background
925 WI_drawAnimatedBack();
927 if ( gamemode
!= commercial
)
931 WI_drawEL(); // "Entering..." if not E1 or E2
935 last
= (wbs
->last
== 8) ? wbs
->next
- 1 : wbs
->last
;
937 // draw a splat on taken cities.
938 for (i
=0 ; i
<=last
; i
++)
939 WI_drawOnLnode(i
, &splat
);
941 // splat the secret level?
943 WI_drawOnLnode(8, &splat
);
947 WI_drawOnLnode(wbs
->next
, yah
);
950 // draws which level you are entering..
951 if ( (gamemode
!= commercial
)
952 || wbs
->next
!= 30) // check for MAP30 end game
956 // ====================================================================
958 // Purpose: Draw the pointer and next location
962 void WI_drawNoState(void)
964 snl_pointeron
= true;
965 WI_drawShowNextLoc();
969 // ====================================================================
971 // Purpose: Calculate frags for this player based on the current totals
972 // of all the other players. Subtract self-frags.
973 // Args: playernum -- the player to be calculated
974 // Returns: the total frags for this player
976 int WI_fragSum(int playernum
)
981 for (i
=0 ; i
<MAXPLAYERS
; i
++)
983 if (playeringame
[i
] // is this player playing?
984 && i
!=playernum
) // and it's not the player we're calculating
986 frags
+= plrs
[playernum
].frags
[i
];
991 // JDC hack - negative frags.
992 frags
-= plrs
[playernum
].frags
[playernum
];
999 // CPhipps - short, dynamically allocated
1000 static short int **dm_frags
; // frags matrix
1001 static short int *dm_totals
; // totals by player
1003 // ====================================================================
1004 // WI_initDeathmatchStats
1005 // Purpose: Set up to display DM stats at end of level. Calculate
1006 // frags for all players.
1010 void WI_initDeathmatchStats(void)
1012 int i
; // looping variables
1014 // CPhipps - allocate data structures needed
1015 dm_frags
= calloc(MAXPLAYERS
, sizeof(*dm_frags
));
1016 dm_totals
= calloc(MAXPLAYERS
, sizeof(*dm_totals
));
1018 state
= StatCount
; // We're doing stats
1019 acceleratestage
= 0;
1020 dm_state
= 1; // count how many times we've done a complete stat
1022 cnt_pause
= TICRATE
;
1024 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1026 if (playeringame
[i
])
1028 // CPhipps - allocate frags line
1029 dm_frags
[i
] = calloc(MAXPLAYERS
, sizeof(**dm_frags
)); // set all counts to zero
1034 WI_initAnimatedBack();
1038 // ====================================================================
1039 // CPhipps - WI_endDeathmatchStats
1040 // Purpose: Deallocate dynamically allocated DM stats data
1045 void WI_endDeathmatchStats(void)
1048 for (i
=0; i
<MAXPLAYERS
; i
++)
1051 free(dm_frags
); free(dm_totals
);
1054 // ====================================================================
1055 // WI_updateDeathmatchStats
1056 // Purpose: Advance Deathmatch stats screen animation. Calculate
1057 // frags for all players. Lots of noise and drama around
1058 // the presentation.
1062 void WI_updateDeathmatchStats(void)
1067 boolean stillticking
;
1069 WI_updateAnimatedBack();
1071 if (acceleratestage
&& dm_state
!= 4) // still ticking
1073 acceleratestage
= 0;
1075 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1077 if (playeringame
[i
])
1079 for (j
=0 ; j
<MAXPLAYERS
; j
++)
1080 if (playeringame
[j
])
1081 dm_frags
[i
][j
] = plrs
[i
].frags
[j
];
1083 dm_totals
[i
] = WI_fragSum(i
);
1088 S_StartSound(0, sfx_barexp
); // bang
1089 dm_state
= 4; // we're done with all 4 (or all we have to do)
1096 S_StartSound(0, sfx_pistol
); // noise while counting
1098 stillticking
= false;
1100 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1102 if (playeringame
[i
])
1104 for (j
=0 ; j
<MAXPLAYERS
; j
++)
1107 && dm_frags
[i
][j
] != plrs
[i
].frags
[j
])
1109 if (plrs
[i
].frags
[j
] < 0)
1114 if (dm_frags
[i
][j
] > 999) // Ty 03/17/98 3-digit frag count
1115 dm_frags
[i
][j
] = 999;
1117 if (dm_frags
[i
][j
] < -999)
1118 dm_frags
[i
][j
] = -999;
1120 stillticking
= true;
1123 dm_totals
[i
] = WI_fragSum(i
);
1125 if (dm_totals
[i
] > 999)
1128 if (dm_totals
[i
] < -999)
1129 dm_totals
[i
] = -999; // Ty 03/17/98 end 3-digit frag count
1135 S_StartSound(0, sfx_barexp
);
1139 else if (dm_state
== 4)
1141 if (acceleratestage
)
1143 S_StartSound(0, sfx_slop
);
1145 if ( gamemode
== commercial
)
1148 WI_initShowNextLoc();
1151 else if (dm_state
& 1)
1156 cnt_pause
= TICRATE
;
1162 // ====================================================================
1163 // WI_drawDeathmatchStats
1164 // Purpose: Draw the stats on the screen in a matrix
1168 // proff/nicolas 09/20/98 -- changed for hi-res
1169 // CPhipps - patch drawing updated
1170 void WI_drawDeathmatchStats(void)
1178 int lh
; // line height
1179 int halfface
= V_NamePatchWidth(facebackp
)/2;
1183 WI_slamBackground();
1185 // draw animated background
1186 WI_drawAnimatedBack();
1189 // draw stat titles (top line)
1190 V_DrawNamePatch(DM_TOTALSX
-V_NamePatchWidth(total
)/2,
1191 DM_MATRIXY
-WI_SPACINGY
+10, FB
, total
, CR_DEFAULT
, VPT_STRETCH
);
1193 V_DrawNamePatch(DM_KILLERSX
, DM_KILLERSY
, FB
, killers
, CR_DEFAULT
, VPT_STRETCH
);
1194 V_DrawNamePatch(DM_VICTIMSX
, DM_VICTIMSY
, FB
, victims
, CR_DEFAULT
, VPT_STRETCH
);
1197 x
= DM_MATRIXX
+ DM_SPACINGX
;
1200 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1202 if (playeringame
[i
]) {
1203 //int trans = playernumtotrans[i];
1204 V_DrawNamePatch(x
-halfface
, DM_MATRIXY
- WI_SPACINGY
,
1205 FB
, facebackp
, i
? CR_LIMIT
+i
: CR_DEFAULT
,
1206 VPT_STRETCH
| (i
? VPT_TRANS
: 0));
1207 V_DrawNamePatch(DM_MATRIXX
-halfface
, y
,
1208 FB
, facebackp
, i
? CR_LIMIT
+i
: CR_DEFAULT
,
1209 VPT_STRETCH
| (i
? VPT_TRANS
: 0));
1213 V_DrawNamePatch(x
-halfface
, DM_MATRIXY
- WI_SPACINGY
,
1214 FB
, bstar
, CR_DEFAULT
, VPT_STRETCH
);
1215 V_DrawNamePatch(DM_MATRIXX
-halfface
, y
,
1216 FB
, star
, CR_DEFAULT
, VPT_STRETCH
);
1225 w
= SHORT(num
[0]->width
);
1227 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1229 x
= DM_MATRIXX
+ DM_SPACINGX
;
1231 if (playeringame
[i
])
1233 for (j
=0 ; j
<MAXPLAYERS
; j
++)
1235 if (playeringame
[j
])
1236 WI_drawNum(x
+w
, y
, dm_frags
[i
][j
], 2);
1240 WI_drawNum(DM_TOTALSX
+w
, y
, dm_totals
[i
], 2);
1248 // Note: The term "Netgame" means a coop game
1250 static short *cnt_kills
;
1251 static short *cnt_items
;
1252 static short *cnt_secret
;
1253 static short *cnt_frags
;
1255 static int ng_state
;
1257 // ====================================================================
1258 // CPhipps - WI_endNetgameStats
1259 // Purpose: Clean up coop game stats
1263 static void WI_endNetgameStats(void)
1271 // ====================================================================
1272 // WI_initNetgameStats
1273 // Purpose: Prepare for coop game stats
1277 void WI_initNetgameStats(void)
1282 acceleratestage
= 0;
1285 cnt_pause
= TICRATE
;
1287 // CPhipps - allocate these dynamically, blank with calloc
1288 cnt_kills
= calloc(MAXPLAYERS
, sizeof(*cnt_kills
));
1289 cnt_items
= calloc(MAXPLAYERS
, sizeof(*cnt_items
));
1290 cnt_secret
= calloc(MAXPLAYERS
, sizeof(*cnt_secret
));
1291 cnt_frags
= calloc(MAXPLAYERS
, sizeof(*cnt_frags
));
1293 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1294 if (playeringame
[i
])
1295 dofrags
+= WI_fragSum(i
);
1297 dofrags
= !!dofrags
; // set to true or false - did we have frags?
1299 WI_initAnimatedBack();
1303 // ====================================================================
1304 // WI_updateNetgameStats
1305 // Purpose: Calculate coop stats as we display them with noise and fury
1308 // Comment: This stuff sure is complicated for what it does
1310 void WI_updateNetgameStats(void)
1315 boolean stillticking
;
1317 WI_updateAnimatedBack();
1319 if (acceleratestage
&& ng_state
!= 10)
1321 acceleratestage
= 0;
1323 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1325 if (!playeringame
[i
])
1328 cnt_kills
[i
] = (plrs
[i
].skills
* 100) / wbs
->maxkills
;
1329 cnt_items
[i
] = (plrs
[i
].sitems
* 100) / wbs
->maxitems
;
1331 // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
1332 cnt_secret
[i
] = wbs
->maxsecret
?
1333 (plrs
[i
].ssecret
* 100) / wbs
->maxsecret
: 100;
1335 cnt_frags
[i
] = WI_fragSum(i
); // we had frags
1337 S_StartSound(0, sfx_barexp
); // bang
1344 S_StartSound(0, sfx_pistol
); // pop
1346 stillticking
= false;
1348 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1350 if (!playeringame
[i
])
1355 if (cnt_kills
[i
] >= (plrs
[i
].skills
* 100) / wbs
->maxkills
)
1356 cnt_kills
[i
] = (plrs
[i
].skills
* 100) / wbs
->maxkills
;
1358 stillticking
= true; // still got stuff to tally
1363 S_StartSound(0, sfx_barexp
);
1367 else if (ng_state
== 4)
1370 S_StartSound(0, sfx_pistol
);
1372 stillticking
= false;
1374 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1376 if (!playeringame
[i
])
1380 if (cnt_items
[i
] >= (plrs
[i
].sitems
* 100) / wbs
->maxitems
)
1381 cnt_items
[i
] = (plrs
[i
].sitems
* 100) / wbs
->maxitems
;
1383 stillticking
= true;
1388 S_StartSound(0, sfx_barexp
);
1392 else if (ng_state
== 6)
1395 S_StartSound(0, sfx_pistol
);
1397 stillticking
= false;
1399 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1401 if (!playeringame
[i
])
1406 // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
1408 if (cnt_secret
[i
] >= (wbs
->maxsecret
? (plrs
[i
].ssecret
* 100) / wbs
->maxsecret
: compatibility_level
< lxdoom_1_compatibility
? 0 : 100))
1409 cnt_secret
[i
] = wbs
->maxsecret
? (plrs
[i
].ssecret
* 100) / wbs
->maxsecret
: 100;
1411 stillticking
= true;
1416 S_StartSound(0, sfx_barexp
);
1417 ng_state
+= 1 + 2*!dofrags
;
1420 else if (ng_state
== 8)
1423 S_StartSound(0, sfx_pistol
);
1425 stillticking
= false;
1427 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1429 if (!playeringame
[i
])
1434 if (cnt_frags
[i
] >= (fsum
= WI_fragSum(i
)))
1435 cnt_frags
[i
] = fsum
;
1437 stillticking
= true;
1442 S_StartSound(0, sfx_pldeth
);
1446 else if (ng_state
== 10)
1448 if (acceleratestage
)
1450 S_StartSound(0, sfx_sgcock
);
1451 if ( gamemode
== commercial
)
1454 WI_initShowNextLoc();
1457 else if (ng_state
& 1)
1462 cnt_pause
= TICRATE
;
1468 // ====================================================================
1469 // WI_drawNetgameStats
1470 // Purpose: Put the coop stats on the screen
1474 // proff/nicolas 09/20/98 -- changed for hi-res
1475 // CPhipps - patch drawing updated
1476 void WI_drawNetgameStats(void)
1481 int pwidth
= V_NamePatchWidth(percent
);
1482 int fwidth
= V_NamePatchWidth(facebackp
);
1484 WI_slamBackground();
1486 // draw animated background
1487 WI_drawAnimatedBack();
1491 // draw stat titles (top line)
1492 V_DrawNamePatch(NG_STATSX
+NG_SPACINGX
-V_NamePatchWidth(kills
),
1493 NG_STATSY
, FB
, kills
, CR_DEFAULT
, VPT_STRETCH
);
1495 V_DrawNamePatch(NG_STATSX
+2*NG_SPACINGX
-V_NamePatchWidth(items
),
1496 NG_STATSY
, FB
, items
, CR_DEFAULT
, VPT_STRETCH
);
1498 V_DrawNamePatch(NG_STATSX
+3*NG_SPACINGX
-V_NamePatchWidth(secret
),
1499 NG_STATSY
, FB
, secret
, CR_DEFAULT
, VPT_STRETCH
);
1502 V_DrawNamePatch(NG_STATSX
+4*NG_SPACINGX
-V_NamePatchWidth(frags
),
1503 NG_STATSY
, FB
, frags
, CR_DEFAULT
, VPT_STRETCH
);
1506 y
= NG_STATSY
+ V_NamePatchHeight(kills
);
1508 for (i
=0 ; i
<MAXPLAYERS
; i
++)
1510 //int trans = playernumtotrans[i];
1511 if (!playeringame
[i
])
1515 V_DrawNamePatch(x
-fwidth
, y
, FB
, facebackp
,
1516 i
? CR_LIMIT
+i
: CR_DEFAULT
,
1517 VPT_STRETCH
| (i
? VPT_TRANS
: 0));
1520 V_DrawNamePatch(x
-fwidth
, y
, FB
, star
, CR_DEFAULT
, VPT_STRETCH
);
1523 WI_drawPercent(x
-pwidth
, y
+10, cnt_kills
[i
]); x
+= NG_SPACINGX
;
1524 WI_drawPercent(x
-pwidth
, y
+10, cnt_items
[i
]); x
+= NG_SPACINGX
;
1525 WI_drawPercent(x
-pwidth
, y
+10, cnt_secret
[i
]); x
+= NG_SPACINGX
;
1528 WI_drawNum(x
, y
+10, cnt_frags
[i
], -1);
1534 // cph - show times in coop on the entering screen
1535 WI_drawTimeStats(plrs
[me
].stime
/ TICRATE
, wbs
->totaltimes
/ TICRATE
, wbs
->partime
/ TICRATE
);
1538 static int sp_state
;
1540 // ====================================================================
1542 // Purpose: Get ready for single player stats
1545 // Comment: Seems like we could do all these stats in a more generic
1546 // set of routines that weren't duplicated for dm, coop, sp
1548 void WI_initStats(void)
1551 acceleratestage
= 0;
1554 // CPhipps - allocate (awful code, I know, but saves changing it all) and initialise
1555 *(cnt_kills
= malloc(sizeof(*cnt_kills
))) =
1556 *(cnt_items
= malloc(sizeof(*cnt_items
))) =
1557 *(cnt_secret
= malloc(sizeof(*cnt_secret
))) = -1;
1558 cnt_time
= cnt_par
= cnt_total_time
= -1;
1559 cnt_pause
= TICRATE
;
1561 WI_initAnimatedBack();
1564 // ====================================================================
1566 // Purpose: Calculate solo stats
1570 void WI_updateStats(void)
1572 WI_updateAnimatedBack();
1574 if (acceleratestage
&& sp_state
!= 10)
1576 acceleratestage
= 0;
1577 cnt_kills
[0] = (plrs
[me
].skills
* 100) / wbs
->maxkills
;
1578 cnt_items
[0] = (plrs
[me
].sitems
* 100) / wbs
->maxitems
;
1580 // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
1581 cnt_secret
[0] = (wbs
->maxsecret
?
1582 (plrs
[me
].ssecret
* 100) / wbs
->maxsecret
: 100);
1584 cnt_total_time
= wbs
->totaltimes
/ TICRATE
;
1585 cnt_time
= plrs
[me
].stime
/ TICRATE
;
1586 cnt_par
= wbs
->partime
/ TICRATE
;
1587 S_StartSound(0, sfx_barexp
);
1596 S_StartSound(0, sfx_pistol
);
1598 if (cnt_kills
[0] >= (plrs
[me
].skills
* 100) / wbs
->maxkills
)
1600 cnt_kills
[0] = (plrs
[me
].skills
* 100) / wbs
->maxkills
;
1601 S_StartSound(0, sfx_barexp
);
1605 else if (sp_state
== 4)
1610 S_StartSound(0, sfx_pistol
);
1612 if (cnt_items
[0] >= (plrs
[me
].sitems
* 100) / wbs
->maxitems
)
1614 cnt_items
[0] = (plrs
[me
].sitems
* 100) / wbs
->maxitems
;
1615 S_StartSound(0, sfx_barexp
);
1619 else if (sp_state
== 6)
1624 S_StartSound(0, sfx_pistol
);
1626 // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
1627 if ((!wbs
->maxsecret
&& compatibility_level
< lxdoom_1_compatibility
) ||
1628 cnt_secret
[0] >= (wbs
->maxsecret
?
1629 (plrs
[me
].ssecret
* 100) / wbs
->maxsecret
: 100))
1631 cnt_secret
[0] = (wbs
->maxsecret
?
1632 (plrs
[me
].ssecret
* 100) / wbs
->maxsecret
: 100);
1633 S_StartSound(0, sfx_barexp
);
1637 else if (sp_state
== 8)
1640 S_StartSound(0, sfx_pistol
);
1644 if (cnt_time
>= plrs
[me
].stime
/ TICRATE
)
1645 cnt_time
= plrs
[me
].stime
/ TICRATE
;
1647 cnt_total_time
+= 3;
1649 if (cnt_total_time
>= wbs
->totaltimes
/ TICRATE
)
1650 cnt_total_time
= wbs
->totaltimes
/ TICRATE
;
1654 if (cnt_par
>= wbs
->partime
/ TICRATE
)
1656 cnt_par
= wbs
->partime
/ TICRATE
;
1658 if ((cnt_time
>= plrs
[me
].stime
/ TICRATE
) && (compatibility_level
< lxdoom_1_compatibility
|| cnt_total_time
>= wbs
->totaltimes
/ TICRATE
))
1660 S_StartSound(0, sfx_barexp
);
1665 else if (sp_state
== 10)
1667 if (acceleratestage
)
1669 S_StartSound(0, sfx_sgcock
);
1671 if (gamemode
== commercial
)
1674 WI_initShowNextLoc();
1677 else if (sp_state
& 1)
1682 cnt_pause
= TICRATE
;
1688 // ====================================================================
1690 // Purpose: Put the solo stats on the screen
1694 // proff/nicolas 09/20/98 -- changed for hi-res
1695 // CPhipps - patch drawing updated
1696 void WI_drawStats(void)
1701 lh
= (3*SHORT(num
[0]->height
))/2;
1703 WI_slamBackground();
1705 // draw animated background
1706 WI_drawAnimatedBack();
1710 V_DrawNamePatch(SP_STATSX
, SP_STATSY
, FB
, kills
, CR_DEFAULT
, VPT_STRETCH
);
1711 WI_drawPercent(320 - SP_STATSX
, SP_STATSY
, cnt_kills
[0]);
1713 V_DrawNamePatch(SP_STATSX
, SP_STATSY
+lh
, FB
, items
, CR_DEFAULT
, VPT_STRETCH
);
1714 WI_drawPercent(320 - SP_STATSX
, SP_STATSY
+lh
, cnt_items
[0]);
1716 V_DrawNamePatch(SP_STATSX
, SP_STATSY
+2*lh
, FB
, sp_secret
, CR_DEFAULT
, VPT_STRETCH
);
1717 WI_drawPercent(320 - SP_STATSX
, SP_STATSY
+2*lh
, cnt_secret
[0]);
1719 WI_drawTimeStats(cnt_time
, cnt_total_time
, cnt_par
);
1722 // ====================================================================
1723 // WI_checkForAccelerate
1724 // Purpose: See if the player has hit either the attack or use key
1725 // or mouse button. If so we set acceleratestage to 1 and
1726 // all those display routines above jump right to the end.
1730 void WI_checkForAccelerate(void)
1735 // check for button presses to skip delays
1736 for (i
=0, player
= players
; i
<MAXPLAYERS
; i
++, player
++)
1738 if (playeringame
[i
])
1740 if (player
->cmd
.buttons
& BT_ATTACK
)
1742 if (!player
->attackdown
)
1743 acceleratestage
= 1;
1744 player
->attackdown
= true;
1747 player
->attackdown
= false;
1749 if (player
->cmd
.buttons
& BT_USE
)
1751 if (!player
->usedown
)
1752 acceleratestage
= 1;
1753 player
->usedown
= true;
1756 player
->usedown
= false;
1761 // ====================================================================
1763 // Purpose: Do various updates every gametic, for stats, animation,
1764 // checking that intermission music is running, etc.
1768 void WI_Ticker(void)
1770 // counter for general background animation
1775 // intermission music
1776 if ( gamemode
== commercial
)
1777 S_ChangeMusic(mus_dm2int
, true);
1779 S_ChangeMusic(mus_inter
, true);
1782 WI_checkForAccelerate();
1787 if (deathmatch
) WI_updateDeathmatchStats();
1788 else if (netgame
) WI_updateNetgameStats();
1789 else WI_updateStats();
1793 WI_updateShowNextLoc();
1802 /* ====================================================================
1804 * Purpose: Initialize intermission data such as background graphics,
1805 * patches, map names, etc.
1809 * CPhipps - modified for new wad lump handling.
1810 * - no longer preload most graphics, other funcs can use
1814 void WI_loadData(void)
1818 char name
[9]; // limited to 8 characters
1821 if (gamemode
!= commercial
)
1825 for (j
=0;j
<NUMANIMS
[wbs
->epsd
];j
++)
1827 a
= &anims
[wbs
->epsd
][j
];
1828 for (i
=0;i
<a
->nanims
;i
++)
1831 if (wbs
->epsd
!= 1 || j
!= 8)
1834 snprintf(name
, sizeof(name
),"WIA%d%s%d%s%d", wbs
->epsd
, (j
/10>0?"":"0"), j
,(i
/10>0?"":"0"), i
); //ANOTHER ROCKHACK
1835 //snprintf(name, sizeof(name),"WIA%d%.2d%.2d", wbs->epsd, j, i);
1836 a
->p
[i
] = W_CacheLumpName(name
);
1841 a
->p
[i
] = anims
[1][4].p
[i
];
1851 snprintf(name
,sizeof(name
),"WINUM%d", i
);
1852 num
[i
] = W_CacheLumpName(name
);
1856 // ====================================================================
1858 // Purpose: Free up the space allocated during WI_loadData
1862 // CPhipps - reverse of WI_loadData, goes through the same lumps, but unlocking
1863 void WI_unloadData(void)
1866 char name
[9]; // limited to 8 characters
1868 // cph - unlock gamemode dependent stuff here
1869 if (gamemode
!= commercial
) {
1870 if (wbs
->epsd
< 3) {
1871 for (j
=0;j
<NUMANIMS
[wbs
->epsd
];j
++) {
1872 anim_t
* a
= &anims
[wbs
->epsd
][j
];
1873 for (i
=0; i
<a
->nanims
; i
++) {
1875 if (wbs
->epsd
!= 1 || j
!= 8) {
1877 snprintf(name
, sizeof(name
),"WIA%d%s%d%s%d", wbs
->epsd
, (j
/10>0?"":"0"), j
,(i
/10>0?"":"0"), i
); //ANOTHER ROCKHACK
1878 //snprintf(name,sizeof(name), "WIA%d%.2d%.2d", wbs->epsd, j, i);
1879 W_UnlockLumpName(name
);
1886 for (i
=0;i
<10;i
++) {
1888 snprintf(name
, sizeof(name
),"WINUM%d", i
);
1889 W_UnlockLumpName(name
);
1894 // ====================================================================
1896 // Purpose: Call the appropriate stats drawing routine depending on
1897 // what kind of game is being played (DM, coop, solo)
1901 void WI_Drawer (void)
1907 WI_drawDeathmatchStats();
1909 WI_drawNetgameStats();
1915 WI_drawShowNextLoc();
1924 // ====================================================================
1926 // Purpose: Initialize the intermission information structure
1927 // Note: wbstartstruct_t is defined in d_player.h
1928 // Args: wbstartstruct -- pointer to the structure with the data
1931 void WI_initVariables(wbstartstruct_t
* wbstartstruct
)
1934 wbs
= wbstartstruct
;
1936 #ifdef RANGECHECKING
1937 if (gamemode
!= commercial
)
1939 if ( gamemode
== retail
)
1940 RNGCHECK(wbs
->epsd
, 0, 3);
1942 RNGCHECK(wbs
->epsd
, 0, 2);
1946 RNGCHECK(wbs
->last
, 0, 8);
1947 RNGCHECK(wbs
->next
, 0, 8);
1949 RNGCHECK(wbs
->pnum
, 0, MAXPLAYERS
);
1950 RNGCHECK(wbs
->pnum
, 0, MAXPLAYERS
);
1953 acceleratestage
= 0;
1960 wbs
->maxkills
= 1; // probably only useful in MAP30
1965 if ( gamemode
!= retail
)
1970 // ====================================================================
1972 // Purpose: Call the various init routines
1973 // Note: wbstartstruct_t is defined in d_player.h
1974 // Args: wbstartstruct -- pointer to the structure with the
1975 // intermission data
1978 void WI_Start(wbstartstruct_t
* wbstartstruct
)
1980 WI_initVariables(wbstartstruct
);
1984 WI_initDeathmatchStats();
1986 WI_initNetgameStats();