Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom

This commit is contained in:
Magnus Norddahl 2017-02-23 06:01:23 +01:00
commit 548aec01ec
13 changed files with 1973 additions and 1994 deletions

View file

@ -544,7 +544,6 @@ void FullGC()
void Barrier(DObject *pointing, DObject *pointed) void Barrier(DObject *pointing, DObject *pointed)
{ {
assert(pointed->GetClass() != nullptr);
assert(pointing == NULL || (pointing->IsBlack() && !pointing->IsDead())); assert(pointing == NULL || (pointing->IsBlack() && !pointing->IsDead()));
assert(pointed->IsWhite() && !pointed->IsDead()); assert(pointed->IsWhite() && !pointed->IsDead());
assert(State != GCS_Finalize && State != GCS_Pause); assert(State != GCS_Finalize && State != GCS_Pause);

View file

@ -53,6 +53,9 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, gametype)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, norandomplayerclass) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, norandomplayerclass)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, infoPages) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, infoPages)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mBackButton) DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mBackButton)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenMapNameFont)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenEnteringFont)
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenFinishedFont)
const char *GameNames[17] = const char *GameNames[17] =

View file

@ -411,7 +411,7 @@ static void ParseListMenuBody(FScanner &sc, DListMenuDescriptor *desc)
else if (args[i] == TypeTextureID) else if (args[i] == TypeTextureID)
{ {
auto f = TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch); auto f = TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch);
if (!f.isValid()) if (!f.Exists())
{ {
sc.ScriptError("Unknown texture %s", sc.String); sc.ScriptError("Unknown texture %s", sc.String);
} }

View file

@ -2821,6 +2821,8 @@ void FBehavior::StaticStartTypedScripts (WORD type, AActor *activator, bool alwa
"Unloading", "Unloading",
"Disconnect", "Disconnect",
"Return", "Return",
"Event",
"Kill",
"Reopen" "Reopen"
}; };
DPrintf(DMSG_NOTIFY, "Starting all scripts of type %d (%s)\n", type, DPrintf(DMSG_NOTIFY, "Starting all scripts of type %d (%s)\n", type,

View file

@ -568,16 +568,6 @@ FStrifeDialogueNode::~FStrifeDialogueNode ()
} }
} }
//============================================================================
//
// FStrifeDialogueReply :: ~FStrifeDialogueReply
//
//============================================================================
FStrifeDialogueReply::~FStrifeDialogueReply ()
{
}
//============================================================================ //============================================================================
// //
// FindNode // FindNode

View file

@ -20,19 +20,19 @@ struct FStrifeDialogueItemCheck
struct FStrifeDialogueNode struct FStrifeDialogueNode
{ {
~FStrifeDialogueNode (); ~FStrifeDialogueNode ();
PClassActor *DropType; PClassActor *DropType = nullptr;
TArray<FStrifeDialogueItemCheck> ItemCheck; TArray<FStrifeDialogueItemCheck> ItemCheck;
int ThisNodeNum; // location of this node in StrifeDialogues int ThisNodeNum = 0; // location of this node in StrifeDialogues
int ItemCheckNode; // index into StrifeDialogues int ItemCheckNode = 0; // index into StrifeDialogues
PClassActor *SpeakerType; PClassActor *SpeakerType = nullptr;
FString SpeakerName; FString SpeakerName;
FSoundID SpeakerVoice; FSoundID SpeakerVoice;
FString Backdrop; FString Backdrop;
FString Dialogue; FString Dialogue;
FString Goodbye; // must init to null for binary scripts to work as intended FString Goodbye; // must init to null for binary scripts to work as intended
FStrifeDialogueReply *Children; FStrifeDialogueReply *Children = nullptr;
FName MenuClassName; FName MenuClassName;
FString UserData; FString UserData;
}; };
@ -40,13 +40,11 @@ struct FStrifeDialogueNode
// FStrifeDialogueReply holds responses the player can give to the NPC // FStrifeDialogueReply holds responses the player can give to the NPC
struct FStrifeDialogueReply struct FStrifeDialogueReply
{ {
~FStrifeDialogueReply (); FStrifeDialogueReply *Next = nullptr;
PClassActor *GiveType = nullptr;
FStrifeDialogueReply *Next; int ActionSpecial = 0;
PClassActor *GiveType; int Args[5] = {};
int ActionSpecial; int PrintAmount = 0;
int Args[5];
int PrintAmount;
TArray<FStrifeDialogueItemCheck> ItemCheck; TArray<FStrifeDialogueItemCheck> ItemCheck;
TArray<FStrifeDialogueItemCheck> ItemCheckRequire; TArray<FStrifeDialogueItemCheck> ItemCheckRequire;
TArray<FStrifeDialogueItemCheck> ItemCheckExclude; TArray<FStrifeDialogueItemCheck> ItemCheckExclude;
@ -54,9 +52,9 @@ struct FStrifeDialogueReply
FString QuickYes; FString QuickYes;
FString QuickNo; FString QuickNo;
FString LogString; FString LogString;
int NextNode; // index into StrifeDialogues int NextNode = 0; // index into StrifeDialogues
int LogNumber; int LogNumber = 0;
bool NeedsGold; bool NeedsGold = false;
}; };
extern TArray<FStrifeDialogueNode *> StrifeDialogues; extern TArray<FStrifeDialogueNode *> StrifeDialogues;

View file

@ -121,7 +121,6 @@ class USDFParser : public UDMFParserBase
bool ParseChoice(FStrifeDialogueReply **&replyptr) bool ParseChoice(FStrifeDialogueReply **&replyptr)
{ {
FStrifeDialogueReply *reply = new FStrifeDialogueReply; FStrifeDialogueReply *reply = new FStrifeDialogueReply;
memset(reply, 0, sizeof(*reply));
reply->Next = *replyptr; reply->Next = *replyptr;
*replyptr = reply; *replyptr = reply;
@ -293,8 +292,6 @@ class USDFParser : public UDMFParserBase
{ {
FStrifeDialogueNode *node = new FStrifeDialogueNode; FStrifeDialogueNode *node = new FStrifeDialogueNode;
FStrifeDialogueReply **replyptr = &node->Children; FStrifeDialogueReply **replyptr = &node->Children;
memset(node, 0, sizeof(*node));
//node->ItemCheckCount[0] = node->ItemCheckCount[1] = node->ItemCheckCount[2] = -1;
node->ThisNodeNum = StrifeDialogues.Push(node); node->ThisNodeNum = StrifeDialogues.Push(node);
node->ItemCheckNode = -1; node->ItemCheckNode = -1;

View file

@ -315,9 +315,7 @@ do_stop:
do do
{ {
sc.MustGetString(); sc.MustGetString();
#ifdef DYNLIGHT
AddStateLight(&state, sc.String); AddStateLight(&state, sc.String);
#endif
} }
while (sc.CheckString(",")); while (sc.CheckString(","));
sc.MustGetStringName(")"); sc.MustGetStringName(")");

View file

@ -2562,7 +2562,7 @@ void ZCCCompiler::CompileStates()
state.Misc1 = IntConstFromNode(sl->Offset, c->Type()); state.Misc1 = IntConstFromNode(sl->Offset, c->Type());
state.Misc2 = IntConstFromNode(static_cast<ZCC_Expression *>(sl->Offset->SiblingNext), c->Type()); state.Misc2 = IntConstFromNode(static_cast<ZCC_Expression *>(sl->Offset->SiblingNext), c->Type());
} }
#ifdef DYNLIGHT
if (sl->Lights != nullptr) if (sl->Lights != nullptr)
{ {
auto l = sl->Lights; auto l = sl->Lights;
@ -2572,7 +2572,6 @@ void ZCCCompiler::CompileStates()
l = static_cast<decltype(l)>(l->SiblingNext); l = static_cast<decltype(l)>(l->SiblingNext);
} while (l != sl->Lights); } while (l != sl->Lights);
} }
#endif
if (sl->Action != nullptr) if (sl->Action != nullptr)
{ {

View file

@ -87,8 +87,6 @@ const char *GetVersionString();
// SVN revision ever got. // SVN revision ever got.
#define SAVEVER 4550 #define SAVEVER 4550
#define DYNLIGHT
// This is so that derivates can use the same savegame versions without worrying about engine compatibility // This is so that derivates can use the same savegame versions without worrying about engine compatibility
#define GAMESIG "QZDOOM" #define GAMESIG "QZDOOM"
#define BASEWAD "qzdoom.pk3" #define BASEWAD "qzdoom.pk3"

File diff suppressed because it is too large Load diff

View file

@ -290,6 +290,12 @@ struct CVar native
native int ResetToDefault(); native int ResetToDefault();
} }
struct GIFont
{
Name fontname;
Name color;
};
struct GameInfoStruct native struct GameInfoStruct native
{ {
// will be extended as needed. // will be extended as needed.
@ -301,6 +307,9 @@ struct GameInfoStruct native
native bool norandomplayerclass; native bool norandomplayerclass;
native Array<Name> infoPages; native Array<Name> infoPages;
native String mBackButton; native String mBackButton;
native GIFont mStatscreenMapNameFont;
native GIFont mStatscreenEnteringFont;
native GIFont mStatscreenFinishedFont;
} }
class Object native class Object native

View file

@ -2651,16 +2651,6 @@ flickerlight LGNTAIL
chance 0.8 chance 0.8
} }
object StrifeZap1
{
frame ZAP1A { light ARROWZAP1 }
frame ZAP1B { light ARROWZAP2 }
frame ZAP1C { light ARROWZAP3 }
frame ZAP1D { light ARROWZAP4 }
frame ZAP1E { light ARROWZAP5 }
frame ZAP1F { light ARROWZAP6 }
}
object SpectralLightningBase object SpectralLightningBase
{ {
frame ZAP1A { light ARROWZAP1 } frame ZAP1A { light ARROWZAP1 }