qzdoom/src/p_conversation.h

79 lines
1.8 KiB
C
Raw Normal View History

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
{
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 = nullptr;
2016-03-01 15:47:10 +00:00
TArray<FStrifeDialogueItemCheck> ItemCheck;
int ThisNodeNum = 0; // location of this node in StrifeDialogues
int ItemCheckNode = 0; // index into StrifeDialogues
FString ThisNodeName = nullptr;
FString ItemCheckNodeName = nullptr;
2016-03-01 15:47:10 +00:00
PClassActor *SpeakerType = nullptr;
FString SpeakerName;
2016-03-01 15:47:10 +00:00
FSoundID SpeakerVoice;
FString Backdrop;
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 = nullptr;
FName MenuClassName = NAME_None;
FString UserData;
2016-03-01 15:47:10 +00:00
};
// FStrifeDialogueReply holds responses the player can give to the NPC
struct FStrifeDialogueReply
{
FStrifeDialogueReply *Next = nullptr;
PClassActor *GiveType = nullptr;
int ActionSpecial = 0;
int Args[5] = {};
int PrintAmount = 0;
2016-03-01 15:47:10 +00:00
TArray<FStrifeDialogueItemCheck> ItemCheck;
TArray<FStrifeDialogueItemCheck> ItemCheckRequire;
TArray<FStrifeDialogueItemCheck> ItemCheckExclude;
FString Reply;
FString QuickYes;
FString QuickNo;
FString LogString;
int NextNode = 0; // index into StrifeDialogues
int LogNumber = 0;
FString NextNodeName = nullptr;
bool NeedsGold = false;
bool CloseDialog = true;
2016-03-01 15:47:10 +00:00
};
struct MapData;
PClassActor *GetStrifeType (int typenum);
void P_FreeStrifeConversations ();
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveangle);
void P_ResumeConversation ();
void P_ConversationCommand (int netcode, int player, uint8_t **stream);
2016-03-01 15:47:10 +00:00
2018-03-11 17:32:00 +00:00
class FileReader;
2016-03-01 15:47:10 +00:00
#endif