- Added Gez's A_CheckCeiling submission.

- Fixed: AM_NewResolution crashed when called from outside a level.
- Added support for Quake PAK files.
- Improved warning messages for WAD files with incorrect marker usage.


SVN r1556 (trunk)
This commit is contained in:
Christoph Oelckers 2009-04-23 23:20:21 +00:00
commit 19c4e3caed
7 changed files with 226 additions and 26 deletions

View file

@ -1,14 +1,38 @@
/*
** w_wad.cpp
**
**---------------------------------------------------------------------------
** Copyright 1998-2009 Randy Heit
** Copyright 2005-2009 Christoph Oelckers
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**---------------------------------------------------------------------------
**
**
*/
//**************************************************************************
//**
//** w_wad.c : Heretic 2 : Raven Software, Corp.
//**
//** $RCSfile: w_wad.c,v $
//** $Revision: 1.6 $
//** $Date: 95/10/06 20:56:47 $
//** $Author: cjr $
//**
//**************************************************************************
// HEADER FILES ------------------------------------------------------------
@ -32,13 +56,6 @@
#include "doomerrors.h"
#include "resourcefiles/resourcefile.h"
extern "C" {
#include "Archive/7z/7zHeader.h"
#include "Archive/7z/7zExtract.h"
#include "Archive/7z/7zIn.h"
#include "7zCrc.h"
}
// MACROS ------------------------------------------------------------------
#define NULL_INDEX (0xffffffff)
@ -213,11 +230,12 @@ typedef FResourceFile * (*CheckFunc)(const char *filename, FileReader *file);
FResourceFile *CheckWad(const char *filename, FileReader *file);
FResourceFile *CheckGRP(const char *filename, FileReader *file);
FResourceFile *CheckRFF(const char *filename, FileReader *file);
FResourceFile *CheckPak(const char *filename, FileReader *file);
FResourceFile *CheckZip(const char *filename, FileReader *file);
FResourceFile *Check7Z(const char *filename, FileReader *file);
FResourceFile *CheckLump(const char *filename, FileReader *file);
static CheckFunc funcs[] = { CheckWad, CheckZip, Check7Z, CheckGRP, CheckRFF, CheckLump };
static CheckFunc funcs[] = { CheckWad, CheckZip, Check7Z, CheckPak, CheckGRP, CheckRFF, CheckLump };
void FWadCollection::AddFile (const char *filename, FileReader *wadinfo)