2006-02-24 04:48:15 +00:00
|
|
|
#ifndef P_CONVERSATION_H
|
|
|
|
#define P_CONVERSATION_H 1
|
|
|
|
|
2010-08-20 12:20:51 +00:00
|
|
|
#include <tarray.h>
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2011-07-05 10:02:38 +00:00
|
|
|
#include "s_sound.h"
|
|
|
|
#include "textures/textures.h"
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
struct FStrifeDialogueReply;
|
|
|
|
class FTexture;
|
2006-08-31 00:16:12 +00:00
|
|
|
struct FBrokenLines;
|
2011-07-05 10:02:38 +00:00
|
|
|
struct PClass;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2010-08-20 12:20:51 +00:00
|
|
|
struct FStrifeDialogueItemCheck
|
|
|
|
{
|
|
|
|
const PClass *Item;
|
|
|
|
int Amount;
|
|
|
|
};
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
// FStrifeDialogueNode holds text an NPC says to the player
|
|
|
|
struct FStrifeDialogueNode
|
|
|
|
{
|
|
|
|
~FStrifeDialogueNode ();
|
2006-05-10 02:40:43 +00:00
|
|
|
const PClass *DropType;
|
2010-08-20 12:20:51 +00:00
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
2010-01-22 05:17:57 +00:00
|
|
|
int ThisNodeNum; // location of this node in StrifeDialogues
|
2006-02-24 04:48:15 +00:00
|
|
|
int ItemCheckNode; // index into StrifeDialogues
|
|
|
|
|
2006-05-10 02:40:43 +00:00
|
|
|
const PClass *SpeakerType;
|
2006-02-24 04:48:15 +00:00
|
|
|
char *SpeakerName;
|
2008-06-15 02:25:09 +00:00
|
|
|
FSoundID SpeakerVoice;
|
2008-06-15 18:36:26 +00:00
|
|
|
FTextureID Backdrop;
|
2006-02-24 04:48:15 +00:00
|
|
|
char *Dialogue;
|
|
|
|
|
|
|
|
FStrifeDialogueReply *Children;
|
|
|
|
};
|
|
|
|
|
|
|
|
// FStrifeDialogueReply holds responses the player can give to the NPC
|
|
|
|
struct FStrifeDialogueReply
|
|
|
|
{
|
|
|
|
~FStrifeDialogueReply ();
|
|
|
|
|
|
|
|
FStrifeDialogueReply *Next;
|
2006-05-10 02:40:43 +00:00
|
|
|
const PClass *GiveType;
|
2010-08-20 12:20:51 +00:00
|
|
|
int ActionSpecial;
|
|
|
|
int Args[5];
|
|
|
|
TArray<FStrifeDialogueItemCheck> ItemCheck;
|
2006-02-24 04:48:15 +00:00
|
|
|
char *Reply;
|
|
|
|
char *QuickYes;
|
|
|
|
int NextNode; // index into StrifeDialogues
|
|
|
|
int LogNumber;
|
2010-08-20 12:20:51 +00:00
|
|
|
char *LogString;
|
2006-02-24 04:48:15 +00:00
|
|
|
char *QuickNo;
|
|
|
|
bool NeedsGold;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern TArray<FStrifeDialogueNode *> StrifeDialogues;
|
|
|
|
|
2008-05-08 08:06:26 +00:00
|
|
|
struct MapData;
|
|
|
|
|
2010-08-20 12:20:51 +00:00
|
|
|
void SetStrifeType(int convid, const PClass *Class);
|
|
|
|
void SetConversation(int convid, const PClass *Class, int dlgindex);
|
|
|
|
const PClass *GetStrifeType (int typenum);
|
|
|
|
int GetConversation(int conv_id);
|
|
|
|
int GetConversation(FName classname);
|
|
|
|
|
|
|
|
bool LoadScriptFile (const char *name, bool include, int type = 0);
|
|
|
|
|
2008-05-08 08:06:26 +00:00
|
|
|
void P_LoadStrifeConversations (MapData *map, const char *mapname);
|
2006-02-24 04:48:15 +00:00
|
|
|
void P_FreeStrifeConversations ();
|
|
|
|
|
2006-07-29 01:26:24 +00:00
|
|
|
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveangle);
|
2006-02-24 04:48:15 +00:00
|
|
|
void P_ResumeConversation ();
|
|
|
|
|
2010-01-22 05:17:57 +00:00
|
|
|
void P_ConversationCommand (int netcode, int player, BYTE **stream);
|
2008-03-26 08:29:02 +00:00
|
|
|
|
2010-08-20 12:20:51 +00:00
|
|
|
class FileReader;
|
|
|
|
bool P_ParseUSDF(int lumpnum, FileReader *lump, int lumplen);
|
|
|
|
|
|
|
|
|
2006-06-03 12:30:11 +00:00
|
|
|
#endif
|