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;
130 PaletteV4() : id(), palette(
nullptr), length(0) {}
154 const int SCALE_THRESHOLD = 0x100;
163 DirectorGameGID getGameGID()
const;
164 const char *getGameId()
const;
165 uint16 getDescriptionVersion()
const;
166 uint16 getVersion()
const {
return _version; }
167 void setVersion(uint16 version);
170 uint32 getGameFlags()
const;
172 const char *getExtra();
178 Lingo *getLingo()
const {
return _lingo; }
179 Window *getStage()
const {
return _stage; }
180 Window *getCurrentWindow()
const {
return _currentWindow; }
182 void forgetWindow(
Window *window);
183 void setCurrentWindow(
Window *window);
184 Window *getCursorWindow()
const {
return _cursorWindow; }
185 void setCursorWindow(
Window *window) { _cursorWindow = window; }
186 Movie *getCurrentMovie()
const;
187 void setCurrentMovie(
Movie *movie);
188 Archive *getMainArchive()
const {
return _mainArchive; }
189 void setMainArchive(
Archive *archive) { _mainArchive = archive; }
197 void addPalette(
CastMemberID &
id,
const byte *palette,
int length);
199 void setPalette(
const byte *palette, uint16 count);
200 void shiftPalette(
int startIndex,
int endIndex,
bool reverse);
202 void clearPalettes();
205 void loadDefaultPalettes();
209 const PaletteV4 &getLoaded4Palette() {
return _loaded4Palette; }
211 const Common::FSNode *getGameDataDir()
const {
return &_gameDataDir; }
212 const byte *getPalette()
const {
return _currentPalette; }
213 uint16 getPaletteColorCount()
const {
return _currentPaletteLength; }
218 uint32 transformColor(uint32 color);
220 void setCursor(DirectorCursor type);
224 uint32 getColorBlack();
225 uint32 getColorWhite();
228 void setMachineType(
int machineType);
229 Common::CodePage getPlatformEncoding();
242 bool desktopEnabled();
246 bool processEvents(
bool captureClick =
false,
bool skipWindowManager =
false);
247 void processEventQUIT();
253 void loadSlowdownCooloff(uint32 delay = 2000);
255 void delayMillis(uint32 delay);
262 uint32 _debugDraw = 0;
263 int _defaultVolume = 255;
269 bool _playbackPaused;
270 bool _skipFrameAdvance;
303 uint32 _loadSlowdownFactor;
304 uint32 _loadSlowdownCooldownTime;
307 byte _currentPalette[768];
308 uint16 _currentPaletteLength;
309 bool _gammaCorrection;
338 uint16 _framesRan = 0;
339 bool _noFatalLingoError =
false;
341 bool _firstMovie =
true;
356 SpriteType sprite = kInactiveSprite;
357 bool oneBitImage =
false;
358 InkType ink = kInkTypeCopy;
365 bool applyColor =
false;
368 void setApplyColor();
369 uint32 preprocessColor(uint32 src);
373 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) {
374 colorWhite = d->_wm->_colorWhite;
375 colorBlack = d->_wm->_colorBlack;
379 ink(old.ink), alpha(old.alpha),
380 backColor(old.backColor), foreColor(old.foreColor),
381 srf(old.srf), dst(old.dst),
382 destRect(old.destRect), srcPoint(old.srcPoint),
383 colorWhite(old.colorWhite), colorBlack(old.colorBlack),
384 applyColor(old.applyColor) {
Definition: managed_surface.h:51
Definition: director.h:105
EngineFeature
Definition: engine.h:253
Definition: debugger.h:66
Definition: director.h:113
Definition: macwindowmanager.h:147
Definition: primitives.h:29
Definition: director.h:124
Definition: director.h:147
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: director.h:133
Definition: macwindowmanager.h:117
Definition: director.h:119
Definition: director.h:156
Definition: detection.h:35
Definition: director.h:346
Language
Definition: language.h:45