mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
Merge branch 'master' into texture_rework
This commit is contained in:
commit
0eb68177ca
13 changed files with 41 additions and 23 deletions
|
@ -390,7 +390,9 @@ bool SetTextureParms(F2DDrawer * drawer, DrawParms *parms, FGameTexture *img, do
|
|||
double srcwidth = img->GetDisplayWidth();
|
||||
double srcheight = img->GetDisplayHeight();
|
||||
int autoaspect = parms->fsscalemode;
|
||||
aspect = autoaspect == 0 || (srcwidth == 320 && srcheight == 200) || (srcwidth == 640 && srcheight == 400)? 1.333 : srcwidth / srcheight;
|
||||
if (srcheight == 200) aspect = srcwidth / 240.;
|
||||
else if (srcheight == 400) aspect = srcwidth / 480;
|
||||
else aspect = srcwidth / srcheight;
|
||||
parms->x = parms->y = 0;
|
||||
parms->keepratio = true;
|
||||
auto screenratio = ActiveRatio(GetWidth(), GetHeight());
|
||||
|
|
|
@ -720,6 +720,7 @@ void C_SetDefaultKeys(const char* baseconfig)
|
|||
ReadBindings(lump, true);
|
||||
}
|
||||
|
||||
lastlump = 0;
|
||||
while ((lump = fileSystem.FindLump("DEFBINDS", &lastlump)) != -1)
|
||||
{
|
||||
ReadBindings(lump, false);
|
||||
|
|
|
@ -73,7 +73,7 @@ static inline bool IsSeperator (int c)
|
|||
if (c == '/')
|
||||
return true;
|
||||
#ifdef _WIN32
|
||||
if (c == '\\' || c == ':')
|
||||
if (c == '\\')
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
|
|
|
@ -263,6 +263,8 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
|
|||
// Look for IWAD definition lump
|
||||
//
|
||||
//==========================================================================
|
||||
extern const char* iwad_folders[13];
|
||||
extern const char* iwad_reserved[12];
|
||||
|
||||
FIWadManager::FIWadManager(const char *firstfn, const char *optfn)
|
||||
{
|
||||
|
@ -281,10 +283,6 @@ FIWadManager::FIWadManager(const char *firstfn, const char *optfn)
|
|||
ParseIWadInfo("IWADINFO", (const char*)data.Data(), data.Size());
|
||||
}
|
||||
}
|
||||
if (mIWadNames.Size() == 0 || mIWadInfos.Size() == 0)
|
||||
{
|
||||
I_FatalError("No IWAD definitions found");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,7 +350,13 @@ int FIWadManager::CheckIWADInfo(const char* fn)
|
|||
{
|
||||
FileSystem check;
|
||||
|
||||
check.InitSingleFile(fn, true);
|
||||
LumpFilterInfo lfi;
|
||||
for (auto p : iwad_folders) lfi.reservedFolders.Push(p);
|
||||
for (auto p : iwad_reserved) lfi.requiredPrefixes.Push(p);
|
||||
|
||||
TArray<FString> filenames;
|
||||
filenames.Push(fn);
|
||||
check.InitMultipleFiles(filenames, true, &lfi);
|
||||
if (check.GetNumEntries() > 0)
|
||||
{
|
||||
int num = check.CheckNumForName("IWADINFO");
|
||||
|
|
|
@ -184,6 +184,9 @@ extern bool M_DemoNoPlay; // [RH] if true, then skip any demos in the loop
|
|||
extern bool insave;
|
||||
extern TDeletingArray<FLightDefaults *> LightDefaults;
|
||||
|
||||
const char* iwad_folders[13] = { "flats/", "textures/", "hires/", "sprites/", "voxels/", "colormaps/", "acs/", "maps/", "voices/", "patches/", "graphics/", "sounds/", "music/" };
|
||||
const char* iwad_reserved[12] = { "mapinfo", "zmapinfo", "gameinfo", "sndinfo", "sbarinfo", "menudef", "gldefs", "animdefs", "decorate", "zscript", "iwadinfo" "maps/" };
|
||||
|
||||
|
||||
CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL)
|
||||
{
|
||||
|
@ -1847,8 +1850,12 @@ static FString CheckGameInfo(TArray<FString> & pwads)
|
|||
{
|
||||
FileSystem check;
|
||||
|
||||
LumpFilterInfo lfi;
|
||||
for (auto p : iwad_folders) lfi.reservedFolders.Push(p);
|
||||
for (auto p : iwad_reserved) lfi.requiredPrefixes.Push(p);
|
||||
|
||||
// Open the entire list as a temporary file system and look for a GAMEINFO lump. The last one will automatically win.
|
||||
check.InitMultipleFiles(pwads, true);
|
||||
check.InitMultipleFiles(pwads, true, &lfi);
|
||||
if (check.GetNumEntries() > 0)
|
||||
{
|
||||
int num = check.CheckNumForName("GAMEINFO");
|
||||
|
@ -2957,11 +2964,8 @@ static int D_DoomMain_Internal (void)
|
|||
}
|
||||
lfi.gameTypeFilter.Push(FStringf("game-%s", GameTypeName()));
|
||||
|
||||
static const char* folders[] = { "flats/", "textures/", "hires/", "sprites/", "voxels/", "colormaps/", "acs/", "maps/", "voices/", "patches/", "graphics/", "sounds/", "music/" };
|
||||
for (auto p : folders) lfi.reservedFolders.Push(p);
|
||||
|
||||
static const char* reserved[] = { "mapinfo", "zmapinfo", "gameinfo", "sndinfo", "sbarinfo", "menudef", "gldefs", "animdefs", "decorate", "zscript", "maps/" };
|
||||
for (auto p : reserved) lfi.requiredPrefixes.Push(p);
|
||||
for (auto p : iwad_folders) lfi.reservedFolders.Push(p);
|
||||
for (auto p : iwad_reserved) lfi.requiredPrefixes.Push(p);
|
||||
|
||||
lfi.postprocessFunc = [&]()
|
||||
{
|
||||
|
|
|
@ -943,7 +943,8 @@ int MapLoader::Set3DFloor(line_t * line, int param, int param2, int alpha)
|
|||
// if flooding is used the floor must be non-solid and is automatically made shootthrough and seethrough
|
||||
if ((param2 & 128) && !(flags & FF_SOLID)) flags |= FF_FLOOD | FF_SEETHROUGH | FF_SHOOTTHROUGH;
|
||||
if (param2 & 512) flags |= FF_FADEWALLS;
|
||||
if (param2&1024) flags |= FF_RESET;
|
||||
if (param2 & 1024) flags |= FF_RESET;
|
||||
if (param2 & 2048) flags |= FF_NODAMAGE;
|
||||
FTextureID tex = line->sidedef[0]->GetTexture(side_t::top);
|
||||
if (!tex.Exists() && alpha < 255)
|
||||
{
|
||||
|
@ -970,7 +971,7 @@ int MapLoader::Set3DFloor(line_t * line, int param, int param2, int alpha)
|
|||
|
||||
void MapLoader::Spawn3DFloors ()
|
||||
{
|
||||
static int flagvals[] = {512, 2+512, 512+1024};
|
||||
static int flagvals[] = {512+2048, 2+512+2048, 512+1024+2048};
|
||||
|
||||
for (auto &line : Level->lines)
|
||||
{
|
||||
|
|
|
@ -504,7 +504,6 @@ unsigned FSavegameManager::ExtractSaveData(int index)
|
|||
{
|
||||
delete SavePic;
|
||||
SavePic = nullptr;
|
||||
SavePicData.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -536,7 +535,6 @@ void FSavegameManager::UnloadSaveData()
|
|||
|
||||
SaveCommentString = "";
|
||||
SavePic = nullptr;
|
||||
SavePicData.Clear();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FSavegameManager, UnloadSaveData)
|
||||
|
|
|
@ -72,7 +72,6 @@ private:
|
|||
FSaveGameNode NewSaveNode;
|
||||
int LastSaved = -1;
|
||||
int LastAccessed = -1;
|
||||
TArray<char> SavePicData;
|
||||
FGameTexture *SavePic = nullptr;
|
||||
|
||||
public:
|
||||
|
|
|
@ -220,7 +220,8 @@ void P_PlayerOnSpecial3DFloor(player_t* player)
|
|||
else
|
||||
{
|
||||
//Water and DEATH FOG!!! heh
|
||||
if (player->mo->Z() > rover->top.plane->ZatPoint(player->mo) ||
|
||||
if ((rover->flags & FF_NODAMAGE) ||
|
||||
player->mo->Z() > rover->top.plane->ZatPoint(player->mo) ||
|
||||
player->mo->Top() < rover->bottom.plane->ZatPoint(player->mo))
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ typedef enum
|
|||
FF_UPPERTEXTURE = 0x20000,
|
||||
FF_LOWERTEXTURE = 0x40000,
|
||||
FF_THINFLOOR = 0x80000, // EDGE
|
||||
FF_SCROLLY = 0x100000, // EDGE - not yet implemented!!!
|
||||
FF_NODAMAGE = 0x100000, // no damage transfers
|
||||
FF_FIX = 0x200000, // use floor of model sector as floor and floor of real sector as ceiling
|
||||
FF_INVERTSECTOR = 0x400000, // swap meaning of sector planes
|
||||
FF_DYNAMIC = 0x800000, // created by partitioning another 3D-floor due to overlap
|
||||
|
|
|
@ -3911,6 +3911,13 @@ int P_FindLineSpecial (const char *string, int *min_args, int *max_args)
|
|||
max = mid - 1;
|
||||
}
|
||||
}
|
||||
// Alias for ZScript. Check here to have universal support everywhere.
|
||||
if (!stricmp(string, "TeleportSpecial"))
|
||||
{
|
||||
if (min_args != NULL) *min_args = 1;
|
||||
if (max_args != NULL) *max_args = 3;
|
||||
return Teleport;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1251,7 +1251,7 @@ void HWSprite::ProcessParticle (HWDrawInfo *di, particle_t *particle, sector_t *
|
|||
z1=z-scalefac;
|
||||
z2=z+scalefac;
|
||||
|
||||
depth = FloatToFixed((x - vp.Pos.X) * vp.TanCos + (y - vp.Pos.Y) * vp.TanSin);
|
||||
depth = (float)((x - vp.Pos.X) * vp.TanCos + (y - vp.Pos.Y) * vp.TanSin);
|
||||
|
||||
actor=nullptr;
|
||||
this->particle=particle;
|
||||
|
|
|
@ -234,7 +234,8 @@ struct F3DFloor native play
|
|||
FF_UPPERTEXTURE = 0x20000,
|
||||
FF_LOWERTEXTURE = 0x40000,
|
||||
FF_THINFLOOR = 0x80000, // EDGE
|
||||
FF_SCROLLY = 0x100000, // EDGE - not yet implemented!!!
|
||||
FF_SCROLLY = 0x100000, // old leftover definition
|
||||
FF_NODAMAGE = 0x100000, // no damage transfers
|
||||
FF_FIX = 0x200000, // use floor of model sector as floor and floor of real sector as ceiling
|
||||
FF_INVERTSECTOR = 0x400000, // swap meaning of sector planes
|
||||
FF_DYNAMIC = 0x800000, // created by partitioning another 3D-floor due to overlap
|
||||
|
|
Loading…
Reference in a new issue