mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
Merge branch 'master' into 2D_Refactor
This commit is contained in:
commit
3671fd7f97
9 changed files with 59 additions and 58 deletions
|
@ -348,13 +348,6 @@ int FIWadManager::CheckIWADInfo(const char *fn)
|
|||
FIWADInfo result;
|
||||
ParseIWadInfo(resfile->Filename, (const char*)lmp->CacheLump(), lmp->LumpSize, &result);
|
||||
delete resfile;
|
||||
for (auto &wadinf : mIWadInfos)
|
||||
{
|
||||
if (wadinf.Name == result.Name)
|
||||
{
|
||||
return -1; // do not show the same one twice.
|
||||
}
|
||||
}
|
||||
return mIWadInfos.Push(result);
|
||||
}
|
||||
catch (CRecoverableError &err)
|
||||
|
@ -519,28 +512,39 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
|||
|
||||
if (iwadparm)
|
||||
{
|
||||
// Check if the given IWAD has an absolute path, in which case the search path will be ignored.
|
||||
custwad = iwadparm;
|
||||
FixPathSeperator(custwad);
|
||||
DefaultExtension(custwad, ".wad");
|
||||
bool isAbsolute = (custwad[0] == '/');
|
||||
const char* const extensions[] = { ".wad", ".pk3", ".iwad", ".ipk3", ".ipk7" };
|
||||
|
||||
for (auto ext : extensions)
|
||||
{
|
||||
// Check if the given IWAD has an absolute path, in which case the search path will be ignored.
|
||||
custwad = iwadparm;
|
||||
FixPathSeperator(custwad);
|
||||
DefaultExtension(custwad, ext);
|
||||
bool isAbsolute = (custwad[0] == '/');
|
||||
#ifdef WINDOWS
|
||||
isAbsolute |= (custwad.Len() >= 2 && custwad[1] == ':');
|
||||
isAbsolute |= (custwad.Len() >= 2 && custwad[1] == ':');
|
||||
#endif
|
||||
if (isAbsolute)
|
||||
{
|
||||
if (FileExists(custwad)) mFoundWads.Push({ custwad, "", -1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto &dir : mSearchPaths)
|
||||
if (isAbsolute)
|
||||
{
|
||||
FStringf fullpath("%s/%s", dir.GetChars(), custwad.GetChars());
|
||||
if (FileExists(fullpath))
|
||||
if (FileExists(custwad)) mFoundWads.Push({ custwad, "", -1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto &dir : mSearchPaths)
|
||||
{
|
||||
mFoundWads.Push({ fullpath, "", -1 });
|
||||
FStringf fullpath("%s/%s", dir.GetChars(), custwad.GetChars());
|
||||
if (FileExists(fullpath))
|
||||
{
|
||||
mFoundWads.Push({ fullpath, "", -1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mFoundWads.Size() != numFoundWads)
|
||||
{
|
||||
// Found IWAD with guessed extension
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// -iwad not found or not specified. Revert back to standard behavior.
|
||||
|
|
|
@ -6765,7 +6765,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_SetSize)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_FLOAT(newradius);
|
||||
PARAM_FLOAT_DEF(newradius);
|
||||
PARAM_FLOAT_DEF(newheight);
|
||||
PARAM_BOOL_DEF(testpos);
|
||||
|
||||
|
|
|
@ -8317,15 +8317,15 @@ DEFINE_ACTION_FUNCTION(AActor, Vec2To)
|
|||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_OBJECT_NOT_NULL(t, AActor)
|
||||
ACTION_RETURN_VEC2(self->Vec2To(t));
|
||||
ACTION_RETURN_VEC2(self->Vec2To(t));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, Vec3Angle)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_FLOAT(length)
|
||||
PARAM_ANGLE(angle);
|
||||
PARAM_FLOAT(z);
|
||||
PARAM_ANGLE(angle);
|
||||
PARAM_FLOAT_DEF(z);
|
||||
PARAM_BOOL_DEF(absolute);
|
||||
ACTION_RETURN_VEC3(self->Vec3Angle(length, angle, z, absolute));
|
||||
}
|
||||
|
|
|
@ -1204,8 +1204,8 @@ DEFINE_ACTION_FUNCTION(FStringStruct, AppendFormat)
|
|||
DEFINE_ACTION_FUNCTION(FStringStruct, Mid)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
PARAM_UINT(pos);
|
||||
PARAM_UINT(len);
|
||||
PARAM_UINT_DEF(pos);
|
||||
PARAM_UINT_DEF(len);
|
||||
FString s = self->Mid(pos, len);
|
||||
ACTION_RETURN_STRING(s);
|
||||
}
|
||||
|
|
|
@ -579,7 +579,6 @@ NERVETEXT =
|
|||
"\n"
|
||||
"THIS RIDE IS CLOSED.\n";
|
||||
|
||||
|
||||
// Cast list (must appear in this order)
|
||||
CC_ZOMBIE = "ZOMBIEMAN";
|
||||
CC_SHOTGUN = "SHOTGUN GUY";
|
||||
|
@ -1299,7 +1298,6 @@ TXT_IMITEMS = "ITEMS";
|
|||
TXT_IMSECRETS = "SECRETS";
|
||||
TXT_IMTIME = "TIME";
|
||||
|
||||
|
||||
RAVENQUITMSG = "ARE YOU SURE YOU WANT TO QUIT?";
|
||||
|
||||
// Hexen strings
|
||||
|
@ -1459,7 +1457,6 @@ TXT_MAULER = "You picked up the mauler.";
|
|||
TXT_GLAUNCHER = "You picked up the Grenade launcher.";
|
||||
TXT_SIGIL = "You picked up the SIGIL.";
|
||||
|
||||
|
||||
TXT_BASEKEY = "You picked up the Base Key.";
|
||||
TXT_GOVSKEY = "You picked up the Govs Key.";
|
||||
TXT_PASSCARD = "You picked up the Passcard.";
|
||||
|
@ -1567,6 +1564,7 @@ TXT_GOAWAY = "Go away!";
|
|||
TXT_COMM0 = "Incoming Message";
|
||||
TXT_COMM1 = "Incoming Message from BlackBird";
|
||||
|
||||
TXT_TRADE = " for %u";
|
||||
|
||||
AMMO_CLIP = "Bullets";
|
||||
AMMO_SHELLS = "Shotgun Shells";
|
||||
|
@ -2471,12 +2469,10 @@ OPTSTR_NOINTERPOLATION = "No interpolation";
|
|||
OPTSTR_SPLINE = "Spline";
|
||||
OPTSTR_OPENAL = "OpenAL";
|
||||
|
||||
|
||||
NOTSET = "Not set";
|
||||
SAFEMESSAGE = "Do you really want to do this?";
|
||||
MNU_COLORPICKER = "SELECT COLOR";
|
||||
|
||||
|
||||
WI_FINISHED = "finished";
|
||||
WI_ENTERING = "Now entering:";
|
||||
|
||||
|
@ -2852,7 +2848,6 @@ DSPLYMNU_TCOPT = "TrueColor Options";
|
|||
|
||||
TCMNU_TITLE = "TRUECOLOR OPTIONS";
|
||||
|
||||
|
||||
TCMNU_TRUECOLOR = "True color output";
|
||||
TCMNU_MINFILTER = "Linear filter when downscaling";
|
||||
TCMNU_MAGFILTER = "Linear filter when upscaling";
|
||||
|
|
|
@ -1646,6 +1646,8 @@ TXT_GOAWAY = "Allez-vous en!";
|
|||
TXT_COMM0 = "Message reçu.";
|
||||
TXT_COMM1 = "Message reçu de BlackBird";
|
||||
|
||||
TXT_TRADE = " pour %u";
|
||||
|
||||
AMMO_CLIP = "Balles";
|
||||
AMMO_SHELLS = "Cartouches";
|
||||
AMMO_ROCKETS = "Roquettes";
|
||||
|
|
|
@ -1145,7 +1145,7 @@ class Actor : Thinker native
|
|||
native bool A_CopySpriteFrame(int from, int to, int flags = 0);
|
||||
native bool A_SetVisibleRotation(double anglestart = 0, double angleend = 0, double pitchstart = 0, double pitchend = 0, int flags = 0, int ptr = AAPTR_DEFAULT);
|
||||
native void A_SetTranslation(name transname);
|
||||
native bool A_SetSize(double newradius, double newheight = -1, bool testpos = false);
|
||||
native bool A_SetSize(double newradius = -1, double newheight = -1, bool testpos = false);
|
||||
native void A_SprayDecal(String name, double dist = 172);
|
||||
native void A_SetMugshotState(String name);
|
||||
|
||||
|
|
|
@ -671,31 +671,31 @@ struct StringTable native
|
|||
// Most are handled at load time and are omitted here.
|
||||
struct DehInfo native
|
||||
{
|
||||
native int MaxSoulsphere;
|
||||
native uint8 ExplosionStyle;
|
||||
native double ExplosionAlpha;
|
||||
native int NoAutofreeze;
|
||||
native int BFGCells;
|
||||
native int BlueAC;
|
||||
native readonly int MaxSoulsphere;
|
||||
native readonly uint8 ExplosionStyle;
|
||||
native readonly double ExplosionAlpha;
|
||||
native readonly int NoAutofreeze;
|
||||
native readonly int BFGCells;
|
||||
native readonly int BlueAC;
|
||||
}
|
||||
|
||||
struct State native
|
||||
{
|
||||
native State NextState;
|
||||
native int sprite;
|
||||
native int16 Tics;
|
||||
native uint16 TicRange;
|
||||
native uint8 Frame;
|
||||
native uint8 UseFlags;
|
||||
native int Misc1;
|
||||
native int Misc2;
|
||||
native uint16 bSlow;
|
||||
native uint16 bFast;
|
||||
native bool bFullbright;
|
||||
native bool bNoDelay;
|
||||
native bool bSameFrame;
|
||||
native bool bCanRaise;
|
||||
native bool bDehacked;
|
||||
native readonly State NextState;
|
||||
native readonly int sprite;
|
||||
native readonly int16 Tics;
|
||||
native readonly uint16 TicRange;
|
||||
native readonly uint8 Frame;
|
||||
native readonly uint8 UseFlags;
|
||||
native readonly int Misc1;
|
||||
native readonly int Misc2;
|
||||
native readonly uint16 bSlow;
|
||||
native readonly uint16 bFast;
|
||||
native readonly bool bFullbright;
|
||||
native readonly bool bNoDelay;
|
||||
native readonly bool bSameFrame;
|
||||
native readonly bool bCanRaise;
|
||||
native readonly bool bDehacked;
|
||||
|
||||
native int DistanceTo(state other);
|
||||
native bool ValidateSpriteFrame();
|
||||
|
|
|
@ -137,7 +137,7 @@ class ConversationMenu : Menu
|
|||
mShowGold |= reply.NeedsGold;
|
||||
|
||||
let ReplyText = Stringtable.Localize(reply.Reply);
|
||||
if (reply.NeedsGold) ReplyText.AppendFormat(" for %u", reply.PrintAmount);
|
||||
if (reply.NeedsGold) ReplyText.AppendFormat(Stringtable.Localize("$TXT_TRADE"), reply.PrintAmount);
|
||||
|
||||
let ReplyLines = SmallFont.BreakLines (ReplyText, ReplyWidth);
|
||||
|
||||
|
|
Loading…
Reference in a new issue