21 #ifndef PELROCK_DIALOG_H 22 #define PELROCK_DIALOG_H 24 #include "common/scummsys.h" 25 #include "common/stack.h" 26 #include "graphics/managed_surface.h" 27 #include "graphics/screen.h" 29 #include "pelrock/events.h" 30 #include "pelrock/fonts/large_font.h" 31 #include "pelrock/fonts/small_font.h" 32 #include "pelrock/graphics.h" 33 #include "pelrock/types.h" 38 const byte kCtrlSpace = 0x20;
39 const byte kCtrlSpeakerId = 0x08;
40 const byte kCtrlEndText = 0xFD;
41 const byte kCtrlTextTerminator = 0xFC;
42 const byte kCtrlDialogueMarker = 0xF1;
43 const byte kCtrlDialogueMarkerOneoff = 0xFB;
44 const byte kCtrlDisabledChoice = 0xFA;
45 const byte kCtrlPageBreakConv = 0xF9;
46 const byte kCtrlActionAndEnd = 0xF8;
47 const byte kCtrlActionAndContinue = 0xEB;
48 const byte kCtrlEndBranch = 0xF7;
49 const byte kCtrlLineContinue = 0xF6;
50 const byte kCtrlAltEndMarker1 = 0xF5;
51 const byte kCtrlEndConversation = 0xF4;
52 const byte kCtrlGoBack = 0xF0;
53 const byte kCtrlAltSpeakerRoot = 0xFE;
55 const int kChoiceHeight = 16;
56 const int kMaxCharsPerLine = 47;
57 const int kMaxLines = 5;
62 int currentChoiceLevel;
75 const static int kArrowWidth = 8;
76 const static int kChoicePadding = 16;
82 Sprite *_curSprite =
nullptr;
88 uint32 readTextBlock(
const byte *data, uint32 dataSize, uint32 startPos,
Common::String &outText, byte &outSpeakerId);
90 void setCurSprite(
int index);
91 bool checkAllSubBranchesExhausted(
const byte *data, uint32 dataSize, uint32 startPos,
int currentChoiceLevel);
93 uint32 skipControlBytes(
const byte *data, uint32 dataSize, uint32 position);
94 uint32 peekNextMeaningfulByte(
const byte *data, uint32 dataSize, uint32 position);
95 ConversationState initializeConversation(
const byte *data, uint32 dataSize, byte npcIndex);
97 uint32 readAndDisplayDialogue(
const byte *data, uint32 dataSize, uint32 position);
98 ConversationEndResult checkConversationEnd(
const byte *data, uint32 dataSize, uint32 position,
int currentRoot = -1);
109 void startConversation(
const byte *conversationData, uint32 dataSize, byte npcIndex,
Sprite *alfredAnimSet =
nullptr);
110 uint32 findRoot(
int npc,
int ¤tRoot, uint32 position, uint32 dataSize,
const byte *conversationData);
111 uint32 findSpeaker(byte npcIndex, uint32 dataSize,
const byte *conversationData);
124 bool _goodbyeDisabled =
false;
127 bool _dialogActive =
false;
128 bool _dismissDialog =
false;
129 bool _disableClickToAdvance =
false;
130 bool _isNPCTalking =
false;
137 #endif // PELROCK_DIALOG_H Definition: managed_surface.h:51
Center the text.
Definition: font.h:52
TextAlign
Definition: font.h:48
Definition: graphics.h:36