22#ifndef SCUMM_SCRIPT_V7_H
23#define SCUMM_SCRIPT_V7_H
25#ifdef ENABLE_SCUMM_7_8
27#include "scumm/scumm_v6.h"
28#include "scumm/charset_v7.h"
29#include "scumm/insane/insane.h"
34#ifdef ENABLE_REBEL2_PSX
41class ScummEngine_v7 :
public ScummEngine_v6 {
42 friend class SmushPlayer;
44 friend class InsaneRebel1;
45 friend class InsaneRebel2;
46#ifdef ENABLE_REBEL2_PSX
47 friend class Rebel2PSX;
50 ScummEngine_v7(
OSystem *syst,
const DetectorResult &dr);
51 ~ScummEngine_v7()
override;
55 int _smushFrameRate = 0;
61 bool _smushVideoShouldFinish =
false;
63 bool _smushActive =
false;
65 Insane *_insane =
nullptr;
66#ifdef ENABLE_REBEL2_PSX
67 Rebel2PSX *_rebel2PSX =
nullptr;
71 void syncSoundSettings()
override;
74 SmushPlayer *_splayer;
77 struct LangIndexNode {
83 TextRenderer_v7 *_textV7;
86 bool _newTextRenderStyle =
false;
87 int _blastTextRectsQueue = 0;
89 int _verbLineSpacing = 0;
90 bool _existLanguageFile =
false;
91 char *_languageBuffer =
nullptr;
92 LangIndexNode *_languageIndex;
93 int _languageIndexSize = 0;
94 char _lastStringTag[12+1] = {};
96 struct SubtitleText : TextObject {
99 actorSpeechMsg = center = wrap =
false;
108 int _subtitleQueuePos;
109 SubtitleText _subtitleQueue[20];
112 void processSubtitleQueue();
113 void addSubtitleToQueue(
const byte *text,
const Common::Point &pos,
byte color,
byte charset,
bool center,
bool wrap);
114 void clearSubtitleQueue();
115 void displayDialog()
override;
116 bool isSmushActive()
override {
return _smushActive; }
117 bool isInsaneActive()
override {
return _insane ? _insane->isInsaneActive() :
false; }
118 Insane *getInsane() {
return _insane; }
119#ifdef ENABLE_REBEL2_PSX
120 Rebel2PSX *getRebel2PSX() {
return _rebel2PSX; }
122 void removeBlastTexts()
override;
123 void restoreBlastTextsRects();
127 void scummLoop_handleSound()
override;
128 void scummLoop_handleDrawing()
override;
129 void processInput()
override;
132 void setupScumm(
const Common::Path &macResourceFile)
override;
133 void resetScumm()
override;
135 void setupScummVars()
override;
136 void resetScummVars()
override;
138 void akos_processQueue()
override;
142 void readMAXS(
int blockSize)
override;
143 void readGlobalObjects()
override;
144 void readIndexBlock(uint32 blocktype, uint32 itemsize)
override;
146 void setCameraAt(
int pos_x,
int pos_y)
override;
147 void setCameraFollows(Actor *a,
bool setCamera =
false)
override;
148 void moveCamera()
override;
149 void panCameraTo(
int x,
int y)
override;
151 int getObjectIdFromOBIM(
const byte *obim)
override;
153 void createTextRenderer(GlyphRenderer_v7 *gr)
override;
154 void enqueueText(
const byte *text,
int x,
int y,
byte color,
byte charset, TextStyleFlags flags,
bool ttsVoiceText =
true,
bool ttsIsSubtitle =
false);
155 void drawTextImmediately(
const byte *text,
Common::Rect *clipRect,
int x,
int y,
byte color,
byte charset, TextStyleFlags flags);
156 void drawBlastTexts()
override;
157 void showMessageDialog(
const byte *msg)
override;
159 void actorTalk(
const byte *msg)
override;
160 void translateText(
const byte *text,
byte *trans_buff,
int transBufferSize)
override;
161 void loadLanguageBundle()
override;
162 void playSpeech(
const byte *ptr);
164 void queryQuit(
bool returnToLauncher)
override;
165 int getBannerColor(
int bannerId)
override;
166 const char *getGUIString(
int stringId)
override;
167 int getGUIStringHeight(
const char *str)
override;
168 int getGUIStringWidth(
const char *str)
override;
169 void drawGUIText(
const char *buttonString,
Common::Rect *clipRect,
int textXPos,
int textYPos,
int textColor,
bool centerFlag)
override;
170 int getMusicVolume()
override;
171 int getSpeechVolume()
override;
172 int getSFXVolume()
override;
173 void setMusicVolume(
int volume)
override;
174 void setSpeechVolume(
int volume)
override;
175 void setSFXVolume(
int volume)
override;
176 void toggleVoiceMode()
override;
177 void handleLoadDuringSmush()
override;
179 void setDefaultCursor()
override;
180 void updateCursor()
override;
181 void setCursorTransparency(
int a)
override;
182 void setCursorFromImg(uint img, uint room, uint imgindex)
override;
184 void drawVerb(
int verb,
int mode, Common::TextToSpeechManager::Action ttsAction = Common::TextToSpeechManager::INTERRUPT)
override;
186 void pauseEngineIntern(
bool pause)
override;
188 void o6_kernelSetFunctions()
override;
190 struct BlastText : TextObject {
192 TextStyleFlags flags;
199 this->TextObject::clear();
208 int _blastTextQueuePos;
209 BlastText _blastTextQueue[50];
211 byte *_guiStringTransBuff =
nullptr;
Definition: serializer.h:80
Definition: keyboard.h:294