2006-02-24 04:48:15 +00:00
|
|
|
#ifndef P_CONVERSATION_H
|
|
|
|
#define P_CONVERSATION_H 1
|
|
|
|
|
|
|
|
// TODO: Generalize the conversation system to something NWN-like that
|
|
|
|
// users can edit as simple text files. Particularly useful would be
|
|
|
|
// the ability to call ACS functions to implement AppearsWhen properties
|
|
|
|
// and ACS scripts to implement ActionTaken properties.
|
|
|
|
// TODO: Make this work in multiplayer and in demos. Multiplayer probably
|
|
|
|
// isn't possible for Strife conversations, but demo playback should be.
|
|
|
|
|
|
|
|
struct FStrifeDialogueReply;
|
|
|
|
class FTexture;
|
|
|
|
struct brokenlines_t;
|
|
|
|
|
|
|
|
// FStrifeDialogueNode holds text an NPC says to the player
|
|
|
|
struct FStrifeDialogueNode
|
|
|
|
{
|
|
|
|
~FStrifeDialogueNode ();
|
2006-05-10 02:40:43 +00:00
|
|
|
const PClass *DropType;
|
|
|
|
const PClass *ItemCheck[3];
|
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;
|
|
|
|
int SpeakerVoice;
|
|
|
|
int Backdrop;
|
|
|
|
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;
|
|
|
|
const PClass *ItemCheck[3];
|
2006-02-24 04:48:15 +00:00
|
|
|
int ItemCheckAmount[3];
|
|
|
|
char *Reply;
|
|
|
|
char *QuickYes;
|
|
|
|
int NextNode; // index into StrifeDialogues
|
|
|
|
int LogNumber;
|
|
|
|
char *QuickNo;
|
|
|
|
bool NeedsGold;
|
|
|
|
|
|
|
|
brokenlines_t *ReplyLines;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern TArray<FStrifeDialogueNode *> StrifeDialogues;
|
|
|
|
|
|
|
|
// There were 344 types in Strife, and Strife conversations refer
|
|
|
|
// to their index in the mobjinfo table. This table indexes all
|
|
|
|
// the Strife actor types in the order Strife had them and is
|
|
|
|
// initialized as part of the actor's setup in infodefaults.cpp.
|
2006-05-19 21:31:25 +00:00
|
|
|
extern const PClass *StrifeTypes[999];
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void P_LoadStrifeConversations (const char *mapname);
|
|
|
|
void P_FreeStrifeConversations ();
|
|
|
|
|
2006-06-03 12:30:11 +00:00
|
|
|
void P_StartConversation (AActor *npc, AActor *pc, bool facetalker);
|
2006-02-24 04:48:15 +00:00
|
|
|
void P_ResumeConversation ();
|
|
|
|
|
2006-06-03 12:30:11 +00:00
|
|
|
#endif
|