23 void tick(uint64_t dt);
37 void print (std::string_view msg);
39 void drawMsg (Tempest::Painter& p,
int offsetY);
42 void keyUpEvent (Tempest::KeyEvent& event)
override;
45 void paintEvent (Tempest::PaintEvent& e)
override;
56 const Tempest::Texture2d* tex =
nullptr;
57 const Tempest::Texture2d* ambient=
nullptr;
62 bool output (
Npc& npc, std::string_view text)
override;
63 bool outputSvm(
Npc& npc, std::string_view text)
override;
64 bool outputOv (
Npc& npc, std::string_view text)
override;
65 bool printScr (
Npc& npc,
int time, std::string_view msg,
int x,
int y, std::string_view font)
override;
67 bool close()
override;
68 bool isFinished()
override;
78 enum class State : uint8_t {
103 bool onStart(
Npc& pl,
Npc& other);
107 bool aiOutput (
Npc& npc, std::string_view msg);
108 bool aiPrintScr(
Npc& npc,
int time, std::string_view msg,
int x,
int y, std::string_view font);
111 bool haveToWaitOutput()
const;
112 bool hasPrintMsg()
const;
113 bool haveToShowSubtitles(
bool isPl)
const;
115 void drawTextMultiline(Tempest::Painter& p,
int x,
int y,
int w,
int h, std::string_view txt,
bool isPl);
116 Tempest::Size processTextMultiline(Tempest::Painter* p,
int x,
int y,
int w,
int h, std::string_view txt,
bool isPl);
124 Tempest::SoundDevice soundDevice;
126 std::vector<GameScript::DlgChoice> choice;
132 std::vector<uint32_t> except;
134 State state=State::Idle;
136 Tempest::SoundEffect currentSnd;
137 bool curentIsPl=
false;
139 int32_t mobsiState=-1;
141 std::vector<PScreen> pscreen;
142 PScreen printMsg[MAX_PRINT];
145 bool dlgAnimation =
true;
146 bool showSubtitles =
true;
147 bool showSubtitlesPlayer =
true;
148 uint64_t choiceAnimTime = 0;