22 #ifndef DIRECTOR_DIRECTOR_H 23 #define DIRECTOR_DIRECTOR_H 25 #include "common/hash-ptr.h" 27 #include "graphics/macgui/macwindowmanager.h" 29 #include "director/types.h" 30 #include "director/util.h" 31 #include "director/detection.h" 35 class SeekableReadStream;
36 class SeekableReadStreamEndian;
41 class MacWindowManager;
43 struct WinCursorGroup;
125 PaletteV4() : id(), palette(
nullptr), length(0) {}
149 const int SCALE_THRESHOLD = 0x100;
158 DirectorGameGID getGameGID()
const;
159 const char *getGameId()
const;
160 uint16 getDescriptionVersion()
const;
161 uint16 getVersion()
const {
return _version; }
162 void setVersion(uint16 version);
165 uint32 getGameFlags()
const;
167 const char *getExtra();
173 Archive *getMainArchive()
const;
174 Lingo *getLingo()
const {
return _lingo; }
175 Window *getStage()
const {
return _stage; }
176 Window *getCurrentWindow()
const {
return _currentWindow; }
178 void forgetWindow(
Window *window);
179 void setCurrentWindow(
Window *window);
180 Window *getCursorWindow()
const {
return _cursorWindow; }
181 void setCursorWindow(
Window *window) { _cursorWindow = window; }
182 Movie *getCurrentMovie()
const;
183 void setCurrentMovie(
Movie *movie);
191 void addPalette(
CastMemberID &
id,
const byte *palette,
int length);
193 void setPalette(
const byte *palette, uint16 count);
194 void shiftPalette(
int startIndex,
int endIndex,
bool reverse);
195 void clearPalettes();
198 void loadDefaultPalettes();
202 const PaletteV4 &getLoaded4Palette() {
return _loaded4Palette; }
204 const Common::FSNode *getGameDataDir()
const {
return &_gameDataDir; }
205 const byte *getPalette()
const {
return _currentPalette; }
206 uint16 getPaletteColorCount()
const {
return _currentPaletteLength; }
211 uint32 transformColor(uint32 color);
213 void setCursor(DirectorCursor type);
217 uint32 getColorBlack();
218 uint32 getColorWhite();
221 void setMachineType(
int machineType);
222 Common::CodePage getPlatformEncoding();
235 bool desktopEnabled();
239 bool processEvents(
bool captureClick =
false,
bool skipWindowManager =
false);
240 void processEventQUIT();
246 void loadSlowdownCooloff(uint32 delay = 2000);
248 void delayMillis(uint32 delay);
255 uint32 _debugDraw = 0;
256 int _defaultVolume = 255;
262 bool _playbackPaused;
263 bool _skipFrameAdvance;
295 uint32 _loadSlowdownFactor;
296 uint32 _loadSlowdownCooldownTime;
299 byte _currentPalette[768];
300 uint16 _currentPaletteLength;
329 uint16 _framesRan = 0;
330 bool _noFatalLingoError =
false;
332 bool _firstMovie =
true;
347 SpriteType sprite = kInactiveSprite;
348 bool oneBitImage =
false;
349 InkType ink = kInkTypeCopy;
356 bool applyColor =
false;
359 void setApplyColor();
360 uint32 preprocessColor(uint32 src);
364 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) {
365 colorWhite = d->_wm->_colorWhite;
366 colorBlack = d->_wm->_colorBlack;
370 ink(old.ink), alpha(old.alpha),
371 backColor(old.backColor), foreColor(old.foreColor),
372 srf(old.srf), dst(old.dst),
373 destRect(old.destRect), srcPoint(old.srcPoint),
374 colorWhite(old.colorWhite), colorBlack(old.colorBlack),
375 applyColor(old.applyColor) {
Definition: managed_surface.h:51
Definition: director.h:100
EngineFeature
Definition: engine.h:253
Definition: debugger.h:66
Definition: director.h:108
Definition: macwindowmanager.h:147
Definition: primitives.h:29
Definition: director.h:119
Definition: director.h:142
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: director.h:128
Definition: macwindowmanager.h:117
Definition: director.h:114
Definition: director.h:151
Definition: detection.h:35
Definition: director.h:337
Language
Definition: language.h:45