gzdoom/src/wi_stuff.h
Christoph Oelckers 5970040672 - fixed: The wbstartstruct that gets passed to the level summary screen needs to be static
This variable is needed long after the function which sets it up will be exited. So this either needs to be dynamically allocated or static, and in this case using a static variable is simpler.  However, unlike before, it is only being accessed in the one function that needs to initialize it and pass to the summary screen and nowhere else.
2019-02-18 00:43:40 +01:00

95 lines
2.3 KiB
C++

//-----------------------------------------------------------------------------
//
// Copyright 1993-1996 id Software
// Copyright 1999-2016 Randy Heit
// Copyright 2002-2016 Christoph Oelckers
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/
//
//-----------------------------------------------------------------------------
//
// DESCRIPTION:
// Intermission.
//
//-----------------------------------------------------------------------------
#ifndef __WI_STUFF__
#define __WI_STUFF__
#include "doomdef.h"
class FTexture;
struct FLevelLocals;
//
// INTERMISSION
// Structure passed e.g. to WI_Start(wb)
//
struct wbplayerstruct_t
{
// Player stats, kills, collected items etc.
int skills;
int sitems;
int ssecret;
int stime;
int frags[MAXPLAYERS];
int fragcount; // [RH] Cumulative frags for this player
};
struct wbstartstruct_t
{
int finished_ep;
int next_ep;
FString current; // [RH] Name of map just finished
FString next; // next level, [RH] actual map name
FString nextname; // printable name for next level.
FString thisname; // printable name for next level.
FTextureID LName0;
FTextureID LName1;
int maxkills;
int maxitems;
int maxsecret;
int maxfrags;
// the par time and sucktime
int partime; // in tics
int sucktime; // in minutes
// total time for the entire current game
int totaltime;
// index of this player in game
int pnum;
wbplayerstruct_t plyr[MAXPLAYERS];
};
// Intermission stats.
// Parameters for world map / intermission.
// Called by main loop, animate the intermission.
void WI_Ticker ();
// Called by main loop,
// draws the intermission directly into the screen buffer.
void WI_Drawer ();
// Setup for an intermission screen.
void WI_Start (wbstartstruct_t *wbstartstruct);
#endif