This commit is contained in:
Rachael Alexanderson 2016-10-26 22:06:25 -04:00
commit 9ed45c7e03
5 changed files with 39 additions and 11 deletions

View file

@ -1660,6 +1660,15 @@ if( APPLE )
endif()
endif()
if( WIN32 )
set( INSTALL_PATH . CACHE STRING "Directory where the zdoom executable will be placed during install." )
else()
set( INSTALL_PATH bin CACHE STRING "Directory where the zdoom executable will be placed during install." )
endif()
install(TARGETS zdoom
DESTINATION ${INSTALL_PATH}
COMPONENT "Game executable")
source_group("Assembly Files\\ia32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_ia32/.+")
source_group("Assembly Files\\x86_64" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_x86_64/.+")
source_group("Audio Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/.+")

View file

@ -292,7 +292,6 @@ void FIWadManager::ParseIWadInfos(const char *fn)
int FIWadManager::ScanIWAD (const char *iwad)
{
FResourceFile *iwadfile = FResourceFile::OpenResourceFile(iwad, NULL, true);
if (iwadfile == NULL) iwadfile = FResourceFile::OpenDirectory(iwad, true); //mxd. A directory can also work as an IWAD
if (iwadfile != NULL)
{
@ -345,7 +344,7 @@ int FIWadManager::CheckIWAD (const char *doomwaddir, WadStuff *wads)
iwad.Format ("%s%s%s", doomwaddir, slash, mIWadNames[i].GetChars());
FixPathSeperator (iwad);
if (DirEntryExists(iwad))
if (FileExists (iwad))
{
wads[i].Type = ScanIWAD (iwad);
if (wads[i].Type != -1)
@ -414,7 +413,7 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
}
else
{
if(FileExists(custwad)) DefaultExtension (custwad, ".wad"); //mxd. Don't treat folders as .wads
DefaultExtension (custwad, ".wad");
iwadparm = custwad;
mIWadNames[0] = custwad;
CheckIWAD ("", &wads[0]);

View file

@ -192,6 +192,7 @@ protected:
int UseType = TEX_Null;
bool Silent = false;
bool HasLine = false;
bool UseOffsets = false;
FScriptPosition sc;
};
@ -1141,11 +1142,7 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, TexInit &init)
}
else if (sc.Compare("useoffsets"))
{
if (part.Texture != NULL)
{
part.OriginX -= part.Texture->LeftOffset;
part.OriginY -= part.Texture->TopOffset;
}
init.UseOffsets = true;
}
}
}
@ -1343,7 +1340,7 @@ void FMultiPatchTexture::ResolvePatches()
else
{
// If it could be resolved, just print a developer warning.
DPrintf(DMSG_WARNING, "Resolved self-referencing texture by picking an older entry for %s", Inits[i].TexName.GetChars());
DPrintf(DMSG_WARNING, "Resolved self-referencing texture by picking an older entry for %s\n", Inits[i].TexName.GetChars());
}
}
@ -1360,6 +1357,11 @@ void FMultiPatchTexture::ResolvePatches()
Parts[i].Texture = TexMan[texno];
bComplex |= Parts[i].Texture->bComplex;
Parts[i].Texture->bKeepAround = true;
if (Inits[i].UseOffsets)
{
Parts[i].OriginX -= Parts[i].Texture->LeftOffset;
Parts[i].OriginY -= Parts[i].Texture->TopOffset;
}
}
}
for (int i = 0; i < NumParts; i++)

View file

@ -886,8 +886,6 @@ namespace
PalEntry FTexture::GetSkyCapColor(bool bottom)
{
PalEntry col;
int w;
int h;
if (!bSWSkyColorDone)
{