2016-03-01 15:47:10 +00:00
|
|
|
#ifndef P_CONVERSATION_H
|
|
|
|
#define P_CONVERSATION_H 1
|
|
|
|
|
|
|
|
#include <tarray.h>
|
|
|
|
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "textures/textures.h"
|
|
|
|
|
|
|
|
struct FStrifeDialogueReply;
|
|
|
|
class FTexture;
|
|
|
|
struct FBrokenLines;
|
|
|
|
|
|
|
|
struct FStrifeDialogueItemCheck
|
|
|
|
{
|
2017-02-08 17:11:23 +00:00
|
|
|
PClassActor *Item;
|
2016-03-01 15:47:10 +00:00
|
|
|
int Amount;
|
|
|
|
};
|
|
|
|
|
|
|
|
// FStrifeDialogueNode holds text an NPC says to the player
|
|
|
|
struct FStrifeDialogueNode
|
|
|
|
{
|
|
|
|
~FStrifeDialogueNode ();
|
|
|
|
PClassActor *DropType;
|
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
|
|
|
int ThisNodeNum; // location of this node in StrifeDialogues
|
|
|
|
int ItemCheckNode; // index into StrifeDialogues
|
|
|
|
|
|
|
|
PClassActor *SpeakerType;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString SpeakerName;
|
2016-03-01 15:47:10 +00:00
|
|
|
FSoundID SpeakerVoice;
|
2017-02-19 13:21:49 +00:00
|
|
|
FString Backdrop;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString Dialogue;
|
|
|
|
FString Goodbye; // must init to null for binary scripts to work as intended
|
2016-03-01 15:47:10 +00:00
|
|
|
|
|
|
|
FStrifeDialogueReply *Children;
|
2017-02-19 13:21:49 +00:00
|
|
|
FName MenuClassName;
|
|
|
|
FString UserData;
|
2016-03-01 15:47:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// FStrifeDialogueReply holds responses the player can give to the NPC
|
|
|
|
struct FStrifeDialogueReply
|
|
|
|
{
|
|
|
|
~FStrifeDialogueReply ();
|
|
|
|
|
|
|
|
FStrifeDialogueReply *Next;
|
|
|
|
PClassActor *GiveType;
|
|
|
|
int ActionSpecial;
|
|
|
|
int Args[5];
|
2017-02-19 00:11:52 +00:00
|
|
|
int PrintAmount;
|
2016-03-01 15:47:10 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
2016-10-28 11:42:37 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheckRequire;
|
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheckExclude;
|
2017-02-19 00:11:52 +00:00
|
|
|
FString Reply;
|
|
|
|
FString QuickYes;
|
|
|
|
FString QuickNo;
|
|
|
|
FString LogString;
|
2016-03-01 15:47:10 +00:00
|
|
|
int NextNode; // index into StrifeDialogues
|
|
|
|
int LogNumber;
|
|
|
|
bool NeedsGold;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern TArray<FStrifeDialogueNode *> StrifeDialogues;
|
|
|
|
|
|
|
|
struct MapData;
|
|
|
|
|
|
|
|
void SetStrifeType(int convid, PClassActor *Class);
|
|
|
|
void SetConversation(int convid, PClassActor *Class, int dlgindex);
|
|
|
|
PClassActor *GetStrifeType (int typenum);
|
|
|
|
int GetConversation(int conv_id);
|
|
|
|
int GetConversation(FName classname);
|
|
|
|
|
|
|
|
bool LoadScriptFile (const char *name, bool include, int type = 0);
|
|
|
|
|
|
|
|
void P_LoadStrifeConversations (MapData *map, const char *mapname);
|
|
|
|
void P_FreeStrifeConversations ();
|
|
|
|
|
|
|
|
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveangle);
|
|
|
|
void P_ResumeConversation ();
|
|
|
|
|
|
|
|
void P_ConversationCommand (int netcode, int player, BYTE **stream);
|
|
|
|
|
|
|
|
class FileReader;
|
|
|
|
bool P_ParseUSDF(int lumpnum, FileReader *lump, int lumplen);
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|