to handle M4 and 5 in Doom and Heretic. - Added P_CheckMapData functions and replaced all calls to P_OpenMapData that only checked for a map's presence with it. - Added Martin Howe's player statusbar face submission. - Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap' but keeps all existing information in the default and just adds to it. This is needed because Hexen and Strife set some information in their base MAPINFO and using 'defaultmap' in a PWAD would override that. - Fixed: Using MAPINFO's f1 option could cause memory leaks. - Added option to load lumps by full name to several places: * Finale texts loaded from a text lump * Demos * Local SNDINFOs * Local SNDSEQs * Image names in FONTDEFS * intermission script names - Changed the STCFN121 handling. The character is not an 'I' but a '|' so instead of discarding it it should be inserted at position 124. - Renamed indexfont.fon to indexfont so that I could remove a special case from V_GetFont that was just added for this one font. - Added a 'dumpspawnedthings' CVAR that enables a listing of all things in the map and the actor type they spawned. SVN r882 (trunk)
99 lines
2.3 KiB
C++
99 lines
2.3 KiB
C++
// Emacs style mode select -*- C++ -*-
|
|
//-----------------------------------------------------------------------------
|
|
//
|
|
// $Id:$
|
|
//
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
//
|
|
// This source is available for distribution and/or modification
|
|
// only under the terms of the DOOM Source Code License as
|
|
// published by id Software. All rights reserved.
|
|
//
|
|
// The source is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
// for more details.
|
|
//
|
|
// DESCRIPTION:
|
|
// Setup a game, startup stuff.
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
#ifndef __P_SETUP__
|
|
#define __P_SETUP__
|
|
|
|
#include "w_wad.h"
|
|
#include "files.h"
|
|
#include "doomdata.h"
|
|
|
|
|
|
struct MapData
|
|
{
|
|
wadlump_t MapLumps[ML_MAX];
|
|
bool HasBehavior;
|
|
bool CloseOnDestruct;
|
|
bool Encrypted;
|
|
int lumpnum;
|
|
FileReader * file;
|
|
|
|
MapData()
|
|
{
|
|
memset(MapLumps, 0, sizeof(MapLumps));
|
|
file = NULL;
|
|
lumpnum = -1;
|
|
HasBehavior = false;
|
|
CloseOnDestruct = true;
|
|
Encrypted = false;
|
|
}
|
|
|
|
~MapData()
|
|
{
|
|
if (CloseOnDestruct && file != NULL) delete file;
|
|
file = NULL;
|
|
}
|
|
|
|
void Seek(unsigned int lumpindex)
|
|
{
|
|
if (lumpindex<countof(MapLumps))
|
|
{
|
|
file->Seek(MapLumps[lumpindex].FilePos, SEEK_SET);
|
|
}
|
|
}
|
|
|
|
void Read(unsigned int lumpindex, void * buffer)
|
|
{
|
|
if (lumpindex<countof(MapLumps))
|
|
{
|
|
file->Seek(MapLumps[lumpindex].FilePos, SEEK_SET);
|
|
file->Read(buffer, MapLumps[lumpindex].Size);
|
|
}
|
|
}
|
|
|
|
DWORD Size(unsigned int lumpindex)
|
|
{
|
|
if (lumpindex<countof(MapLumps))
|
|
{
|
|
return MapLumps[lumpindex].Size;
|
|
}
|
|
return 0;
|
|
}
|
|
};
|
|
|
|
MapData * P_OpenMapData(const char * mapname);
|
|
bool P_CheckMapData(const char * mapname);
|
|
|
|
// NOT called by W_Ticker. Fixme. [RH] Is that bad?
|
|
//
|
|
// [RH] The only parameter used is mapname, so I removed playermask and skill.
|
|
// On September 1, 1998, I added the position to indicate which set
|
|
// of single-player start spots should be spawned in the level.
|
|
void P_SetupLevel (char *mapname, int position);
|
|
|
|
void P_FreeLevelData();
|
|
void P_FreeExtraLevelData();
|
|
|
|
// Called by startup code.
|
|
void P_Init (void);
|
|
|
|
#endif
|