22#ifndef DIRECTOR_DIRECTOR_H
23#define DIRECTOR_DIRECTOR_H
25#include "common/hash-ptr.h"
26#include "common/gui_options.h"
28#include "graphics/macgui/macwindowmanager.h"
30#include "director/types.h"
31#include "director/util.h"
32#include "director/detection.h"
34#define GAMEOPTION_GAMMA_CORRECTION GUIO_GAMEOPTIONS1
35#define GAMEOPTION_TRUE_COLOR GUIO_GAMEOPTIONS2
39class SeekableReadStream;
40class SeekableReadStreamEndian;
45class MacWindowManager;
103 GF_TRUECOLOR = 1 << 2,
132 PaletteV4() : id(), palette(
nullptr), length(0) {}
156const int SCALE_THRESHOLD = 0x100;
165 DirectorGameGID getGameGID()
const;
166 const char *getGameId()
const;
167 uint16 getDescriptionVersion()
const;
168 uint16 getVersion()
const {
return _version; }
169 void setVersion(uint16 version);
172 uint32 getGameFlags()
const;
175 const char *getExtra();
181 Lingo *getLingo()
const {
return _lingo; }
182 Window *getStage()
const {
return _stage; }
183 Window *getCurrentWindow()
const {
return _currentWindow; }
185 void forgetWindow(
Window *window);
186 bool isWindowRegistered(
Window *window)
const;
187 void setCurrentWindow(
Window *window);
188 Window *getCursorWindow()
const {
return _cursorWindow; }
189 void setCursorWindow(
Window *window) { _cursorWindow = window; }
190 Movie *getCurrentMovie()
const;
191 void setCurrentMovie(
Movie *movie);
201 void addPalette(
CastMemberID &
id,
const byte *palette,
int length);
203 void setPalette(
const byte *palette, uint16 count);
204 void shiftPalette(
int startIndex,
int endIndex,
bool reverse);
206 void clearPalettes();
209 void loadDefaultPalettes();
213 const PaletteV4 &getLoaded4Palette() {
return _loaded4Palette; }
215 const Common::FSNode *getGameDataDir()
const {
return &_gameDataDir; }
216 const byte *getPalette()
const {
return _currentPalette; }
217 uint16 getPaletteColorCount()
const {
return _currentPaletteLength; }
220 Picture *getTile(
int num);
222 uint32 transformColor(uint32 color);
224 void setCursor(DirectorCursor type);
228 uint32 getColorBlack();
229 uint32 getColorWhite();
232 void setMachineType(
int machineType);
233 Common::CodePage getPlatformEncoding();
235 Archive *createArchive();
246 bool desktopEnabled();
250 bool processSysEvents(
bool captureClick =
false,
bool skipWindowManager =
false);
251 void processEventQUIT();
258 void loadSlowdownCooloff(uint32 delay = 2000);
260 void delayMillis(uint32 delay);
267 uint32 _debugDraw = 0;
268 int _defaultVolume = 255;
280 bool _emulateMultiButtonMouse;
309 uint32 _loadSlowdownFactor;
310 uint32 _loadSlowdownCooldownTime;
312 bool _vfwPaletteHack;
321 byte _currentPalette[768];
322 uint16 _currentPaletteLength;
323 bool _gammaCorrection;
352 uint16 _framesRan = 0;
353 bool _noFatalLingoError =
false;
355 bool _firstMovie =
true;
371 SpriteType sprite = kInactiveSprite;
372 bool oneBitImage =
false;
373 InkType ink = kInkTypeCopy;
380 bool applyColor =
false;
383 void setApplyColor();
384 uint32 preprocessColor(uint32 src);
388 DirectorPlotData(
DirectorEngine *d_, SpriteType s, InkType i,
int a, uint32 b, uint32 f) : d(d_), sprite(s), ink(i), alpha(a), backColor(b), foreColor(f) {
389 colorWhite = d->_wm->_colorWhite;
390 colorBlack = d->_wm->_colorBlack;
394 ink(old.ink), alpha(old.alpha),
395 backColor(old.backColor), foreColor(old.foreColor),
396 srf(old.srf), dst(old.dst),
397 destRect(old.destRect), srcPoint(old.srcPoint),
398 colorWhite(old.colorWhite), colorBlack(old.colorBlack),
399 applyColor(old.applyColor) {
Definition: debugger.h:70
Definition: director.h:158
bool hasFeature(EngineFeature f) const override
Common::Error run() override
Definition: lingo-profiler.h:51
const Common::String _targetName
Definition: engine.h:186
EngineFeature
Definition: engine.h:282
Definition: macwindowmanager.h:149
Definition: managed_surface.h:51
Definition: primitives.h:29
Language
Definition: language.h:45
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: detection.h:35
Definition: director.h:360
Definition: director.h:135
Definition: director.h:107
Definition: director.h:126
Definition: director.h:149
Definition: director.h:115
Definition: director.h:121
Definition: macwindowmanager.h:117