Squashed commit of the following:

- Implement page string names for dialog lumps
    - Create special new GZDoom name space for ZSDF
    - add usdf_gzdoom spec document
    - fixed: restored original behavior with negative conversation id's for the original strife dialog lumps
    - reposition the binary strife fix in a more appropriate location
    - add compatibility fix for negative numbers in responses in USDF/ZSDF (don't know if it's actually necessary)
This commit is contained in:
Rachael Alexanderson 2019-02-13 23:26:15 -05:00 committed by Christoph Oelckers
commit 35e2d40641
5 changed files with 165 additions and 15 deletions

View file

@ -521,6 +521,11 @@ static void ParseReplies (const char *name, int pos, FStrifeDialogueReply **repl
// The next node to use when this reply is chosen.
reply->NextNode = rsp->Link;
if (reply->NextNode < 0)
{
reply->NextNode *= -1;
reply->CloseDialog = false;
}
// The message to record in the log for this reply.
reply->LogNumber = rsp->Log;
@ -1073,14 +1078,13 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
if (reply->NextNode != 0)
{
int rootnode = npc->ConversationRoot;
const bool isNegative = reply->NextNode < 0;
const unsigned next = (unsigned)(rootnode + (isNegative ? -1 : 1) * reply->NextNode - 1);
const unsigned next = (unsigned)(rootnode + reply->NextNode - 1);
if (next < Level->StrifeDialogues.Size())
{
npc->Conversation = Level->StrifeDialogues[next];
if (isNegative)
if (!(reply->CloseDialog))
{
if (gameaction != ga_slideshow)
{