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 39 class SeekableReadStream;
40 class SeekableReadStreamEndian;
45 class MacWindowManager;
47 struct WinCursorGroup;
102 GF_TRUECOLOR = 1 << 2,
131 PaletteV4() : id(), palette(
nullptr), length(0) {}
155 const int SCALE_THRESHOLD = 0x100;
164 DirectorGameGID getGameGID()
const;
165 const char *getGameId()
const;
166 uint16 getDescriptionVersion()
const;
167 uint16 getVersion()
const {
return _version; }
168 void setVersion(uint16 version);
171 uint32 getGameFlags()
const;
174 const char *getExtra();
180 Lingo *getLingo()
const {
return _lingo; }
181 Window *getStage()
const {
return _stage; }
182 Window *getCurrentWindow()
const {
return _currentWindow; }
184 void forgetWindow(
Window *window);
185 bool isWindowRegistered(
Window *window)
const;
186 void setCurrentWindow(
Window *window);
187 Window *getCursorWindow()
const {
return _cursorWindow; }
188 void setCursorWindow(
Window *window) { _cursorWindow = window; }
189 Movie *getCurrentMovie()
const;
190 void setCurrentMovie(
Movie *movie);
200 void addPalette(
CastMemberID &
id,
const byte *palette,
int length);
202 void setPalette(
const byte *palette, uint16 count);
203 void shiftPalette(
int startIndex,
int endIndex,
bool reverse);
205 void clearPalettes();
208 void loadDefaultPalettes();
212 const PaletteV4 &getLoaded4Palette() {
return _loaded4Palette; }
214 const Common::FSNode *getGameDataDir()
const {
return &_gameDataDir; }
215 const byte *getPalette()
const {
return _currentPalette; }
216 uint16 getPaletteColorCount()
const {
return _currentPaletteLength; }
221 uint32 transformColor(uint32 color);
223 void setCursor(DirectorCursor type);
227 uint32 getColorBlack();
228 uint32 getColorWhite();
231 void setMachineType(
int machineType);
232 Common::CodePage getPlatformEncoding();
245 bool desktopEnabled();
249 bool processSysEvents(
bool captureClick =
false,
bool skipWindowManager =
false);
250 void processEventQUIT();
256 void loadSlowdownCooloff(uint32 delay = 2000);
258 void delayMillis(uint32 delay);
265 uint32 _debugDraw = 0;
266 int _defaultVolume = 255;
278 bool _emulateMultiButtonMouse;
307 uint32 _loadSlowdownFactor;
308 uint32 _loadSlowdownCooldownTime;
310 bool _vfwPaletteHack;
317 byte _currentPalette[768];
318 uint16 _currentPaletteLength;
319 bool _gammaCorrection;
348 uint16 _framesRan = 0;
349 bool _noFatalLingoError =
false;
351 bool _firstMovie =
true;
367 SpriteType sprite = kInactiveSprite;
368 bool oneBitImage =
false;
369 InkType ink = kInkTypeCopy;
376 bool applyColor =
false;
379 void setApplyColor();
380 uint32 preprocessColor(uint32 src);
384 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) {
385 colorWhite = d->_wm->_colorWhite;
386 colorBlack = d->_wm->_colorBlack;
390 ink(old.ink), alpha(old.alpha),
391 backColor(old.backColor), foreColor(old.foreColor),
392 srf(old.srf), dst(old.dst),
393 destRect(old.destRect), srcPoint(old.srcPoint),
394 colorWhite(old.colorWhite), colorBlack(old.colorBlack),
395 applyColor(old.applyColor) {
Definition: managed_surface.h:51
Definition: director.h:106
EngineFeature
Definition: engine.h:282
Definition: debugger.h:67
Definition: director.h:114
Definition: macwindowmanager.h:149
Definition: primitives.h:29
Definition: director.h:125
Definition: director.h:148
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: director.h:134
Definition: macwindowmanager.h:117
Definition: director.h:120
Definition: director.h:157
Definition: detection.h:35
Definition: director.h:356
Language
Definition: language.h:45