22 #ifndef BLADERUNNER_SUBTITLES_H 23 #define BLADERUNNER_SUBTITLES_H 25 #include "bladerunner/bladerunner.h" 27 #include "bladerunner/color.h" 28 #include "common/str.h" 29 #include "common/ustr.h" 37 class BladeRunnerEngine;
46 static const uint kPreferedLine = 2;
47 static const int kMarginBottom = 12;
48 static const int kMarginTop = 12;
49 static const int kTextMaxWidth = 610;
50 static const int kMaxTextResourceEntries = 27;
51 static const int kMaxLanguageSelectionNum = 1024;
52 static const uint32 kMinDuration = 1000;
54 static const char *SUBTITLES_FILENAME_PREFIXES[kMaxTextResourceEntries];
55 static const char *SUBTITLES_FONT_FILENAME_EXTERNAL;
56 static const char *SUBTITLES_VERSION_TRENAME;
57 static const char *EXTRA_TRENAME;
61 static const int kNumOfSubtitleRoles = 2;
63 static const int kxcLineCount = 22;
64 static const int kxcStringCount = 14;
69 int _xcLineTimeouts[kxcLineCount];
70 int _xcLineOffsets[kxcLineCount];
75 enum SubtitlesFontType {
76 kSubtitlesFontTypeInternal,
80 struct SubtitlesInfo {
85 SubtitlesFontType fontType;
88 SubtitlesInfo() : versionStr(
""), dateOfCompile(
""), languageMode(
""), credits(
""), fontName(
"") { fontType = kSubtitlesFontTypeInternal; };
91 struct SubtitlesData {
93 bool forceShowWhenNoSpeech;
109 SubtitlesData() : isVisible(
false), forceShowWhenNoSpeech(
false) { };
112 struct SubtitlesQueueEntry {
119 SubtitlesQueueEntry() : timeStarted(0), duration(kMinDuration), started(
false) { };
122 SubtitlesInfo _subtitlesInfo;
123 TextResource *_vqaSubsTextResourceEntries[kMaxTextResourceEntries];
135 bool _gameSubsResourceEntriesFound[kMaxTextResourceEntries];
136 bool _isSystemActive;
142 bool isSystemActive()
const {
return _isSystemActive; }
145 SubtitlesInfo getSubtitlesInfo()
const;
146 void loadInGameSubsText(
int actorId,
int speech_id);
147 void loadOuttakeSubsText(
const Common::String &outtakesName,
int frame);
149 void setGameSubsText(
int subsRole,
Common::String dbgQuote,
bool force);
150 void addGameSubsTextToQueue(
Common::String dbgQuote, uint32 duration);
153 bool show(
int subsRole);
154 bool hide(
int subsRole);
159 const char *getGoVib()
const {
return _goVib.c_str(); }
161 bool isVisible(
int subsRole)
const;
177 bool isNotEmptyCurrentSubsText(
int subsRole);
178 void mergeSubtitleQuotes(
int actorId,
int quoteFirst,
int quoteSecond);
183 #endif // BLADERUNNER_SUBTITLES_H
Definition: subtitles.h:40
Definition: formatinfo.h:28
Definition: debugger.h:56
Definition: kia_section_settings.h:42
Definition: text_resource.h:32
Definition: bladerunner.h:113