mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 21:11:52 +00:00
- merged the Hacx extra stuff into zd_extra.pk3 and added the ability to inject data into the resource directory after the IWAD so that the base resources can provide content that can override IWAD data if broken or not usable.
Hacx in particular needs this to fix a handful of buggy actors and to override the IWAD's MAPINFO which is not localizable.
This commit is contained in:
parent
8177583e2f
commit
7916cebdc1
5 changed files with 39 additions and 5 deletions
|
@ -408,7 +408,6 @@ add_subdirectory( wadsrc )
|
|||
add_subdirectory( wadsrc_bm )
|
||||
add_subdirectory( wadsrc_lights )
|
||||
add_subdirectory( wadsrc_extra )
|
||||
add_subdirectory( wadsrc_hacxextra )
|
||||
add_subdirectory( src )
|
||||
|
||||
if( NOT CMAKE_CROSSCOMPILING )
|
||||
|
|
|
@ -147,6 +147,7 @@ void FWadCollection::InitMultipleFiles (TArray<FString> &filenames, const TArray
|
|||
int baselump = NumLumps;
|
||||
AddFile (filenames[i]);
|
||||
}
|
||||
MoveIWadModifiers();
|
||||
|
||||
NumLumps = LumpInfo.Size();
|
||||
if (NumLumps == 0)
|
||||
|
@ -1053,6 +1054,43 @@ void FWadCollection::FixMacHexen()
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// MoveIWadModifiers
|
||||
//
|
||||
// Moves all content from the after_iwad subfolder of the internal
|
||||
// resources to the first positions in the lump directory after the IWAD.
|
||||
// Used to allow modifying content in the base files, this is needed
|
||||
// so that Hacx and Harmony can override some content that clashes
|
||||
// with localization.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FWadCollection::MoveIWadModifiers()
|
||||
{
|
||||
TArray<LumpRecord> lumpsToMove;
|
||||
|
||||
unsigned i;
|
||||
for (i = 0; i < LumpInfo.Size(); i++)
|
||||
{
|
||||
auto& li = LumpInfo[i];
|
||||
if (li.wadnum >= GetIwadNum()) break;
|
||||
if (li.lump->FullName.Left(11).CompareNoCase("after_iwad/") == 0)
|
||||
{
|
||||
lumpsToMove.Push(li);
|
||||
LumpInfo.Delete(i--);
|
||||
}
|
||||
}
|
||||
if (lumpsToMove.Size() == 0) return;
|
||||
for (; i < LumpInfo.Size() && LumpInfo[i].wadnum <= Wads.GetMaxIwadNum(); i++);
|
||||
for (auto& li : lumpsToMove)
|
||||
{
|
||||
li.lump->LumpNameSetup(li.lump->FullName.Mid(11));
|
||||
li.wadnum = Wads.GetMaxIwadNum(); // pretend this comes from the IWAD itself.
|
||||
LumpInfo.Insert(i++, li);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// W_FindLump
|
||||
|
|
|
@ -221,6 +221,7 @@ private:
|
|||
void RenameNerve();
|
||||
void FixMacHexen();
|
||||
void DeleteAll();
|
||||
void MoveIWadModifiers();
|
||||
FileReader * GetFileReader(int wadnum); // Gets a FileReader object to the entire WAD
|
||||
};
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ IWad
|
|||
Mapinfo = "mapinfo/hacx.txt"
|
||||
MustContain = "MAP01", "HACX-R"
|
||||
BannerColors = "00 00 a8", "a8 a8 a8"
|
||||
Load = ":hacx_gzdoom_stuff.pk3"
|
||||
DeleteLumps = "FONTDEFS"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
add_pk3(hacx_gzdoom_stuff.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static)
|
Loading…
Reference in a new issue