22 #ifndef SCI_GRAPHICS_FRAMEOUT_H 23 #define SCI_GRAPHICS_FRAMEOUT_H 25 #include "common/system.h" 26 #include "engines/util.h" 27 #include "sci/event.h" 28 #include "sci/graphics/plane32.h" 29 #include "sci/graphics/screen_item32.h" 36 class GfxTransitions32;
37 struct PlaneShowStyle;
57 inline bool isHiRes()
const {
return _isHiRes; }
94 int16 _scriptWidth, _scriptHeight;
100 bool detectHiRes()
const;
103 #pragma mark Screen items 130 void kernelAddScreenItem(
const reg_t object);
131 void kernelUpdateScreenItem(
const reg_t object);
132 void kernelDeleteScreenItem(
const reg_t object);
133 bool kernelSetNowSeen(
const reg_t screenItemObject)
const;
134 int16 kernelObjectIntersect(
const reg_t object1,
const reg_t object2)
const;
137 void remapMarkRedraw();
168 const PlaneList &getVisiblePlanes()
const {
169 return _visiblePlanes;
171 void kernelAddPlane(
const reg_t object);
172 void kernelUpdatePlane(
const reg_t object);
173 void kernelDeletePlane(
const reg_t object);
174 void kernelMovePlaneItems(
const reg_t object,
const int16 deltaX,
const int16 deltaY,
const bool scrollPics);
175 int16 kernelGetHighPlanePri();
189 void updatePlane(
Plane &plane);
194 void kernelAddPicAt(
const reg_t planeObject,
const GuiResourceId pictureId,
const int16 pictureX,
const int16 pictureY,
const bool mirrorX,
const bool deleteDuplicate);
197 #pragma mark Rendering 216 initGraphics(_currentBuffer.w, _currentBuffer.h, format);
224 initGraphics(_currentBuffer.w, _currentBuffer.h, formatList);
225 return g_system->getScreenFormat() == *format;
241 inline const Buffer &getCurrentBuffer()
const {
242 return _currentBuffer;
245 void kernelFrameOut(
const bool showBits);
287 void alterVmap(
const Palette &palette1,
const Palette &palette2,
const int8 style,
const int8 *
const styleRanges);
296 inline int getScreenCount()
const {
303 void shakeScreen(
const int16 numShakes,
const ShakeDirection direction);
305 Plane *getTopVisiblePlane();
311 uint32 _lastScreenUpdateTick;
316 uint8 _throttleState;
345 ScreenItemListList _screenItemLists;
353 int _overdrawThreshold;
371 void calcLists(ScreenItemListList &drawLists, EraseListList &eraseLists,
const Common::Rect &eraseRect =
Common::Rect());
379 void drawEraseList(
const RectList &eraseList,
const Plane &plane);
385 void drawScreenItemList(
const DrawList &screenItemList);
392 void mergeToShowList(
const Common::Rect &drawRect,
RectList &showList,
const int overdrawThreshold);
405 inline bool validZeroStyle(
const uint8 style,
const int i)
const {
412 switch (
g_sci->getGameId()) {
414 case GID_PHANTASMAGORIA:
416 return (i > 71 && i < 104);
424 #pragma mark Mouse cursor 429 void updateMousePositionForRendering()
const {
437 g_sci->getEventManager()->getSciEvent(kSciEventPeek);
447 #pragma mark Debugging 449 void printPlaneList(
Console *con)
const;
450 void printVisiblePlaneList(
Console *con)
const;
451 void printPlaneListInternal(
Console *con,
const PlaneList &planeList)
const;
452 void printPlaneItemList(
Console *con,
const reg_t planeObject)
const;
453 void printVisiblePlaneItemList(
Console *con,
const reg_t planeObject)
const;
459 #endif // SCI_GRAPHICS_FRAMEOUT_H void updateScreenItem(ScreenItem &screenItem) const
int16 getScriptWidth() const
Definition: frameout.h:62
bool setPixelFormat(const Graphics::PixelFormat *format) const
Definition: frameout.h:214
Definition: frameout.h:43
bool isHiRes() const
Definition: frameout.h:57
void directFrameOut(const Common::Rect &showRect)
void redrawGameScreen(const Common::Rect &skipRect) const
Definition: screen_item32.h:359
void addScreenItem(ScreenItem &screenItem) const
int16 getScriptHeight() const
Definition: frameout.h:67
Definition: plane32.h:103
void addPlane(Plane *plane)
int16 getScreenWidth() const
Definition: frameout.h:72
void updateScreen(const int delta=0)
void shakeScreen(const int16 numShakes, const ShakeDirection direction)
void deleteScreenItem(ScreenItem &screenItem)
Definition: palette32.h:234
void frameOut(const bool shouldShowBits, const Common::Rect &eraseRect=Common::Rect())
int16 getScreenHeight() const
Definition: frameout.h:77
Definition: seg_manager.h:48
void deletePlane(Plane &plane)
Definition: transitions32.h:215
void initGraphics(int width, int height)
void palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *showStyle)
Definition: transitions32.h:53
Definition: display_client.h:113
bool _throttleKernelFrameOut
Definition: frameout.h:232
Definition: plane32.h:479
Definition: screen_item32.h:53
bool _palMorphIsOn
Definition: frameout.h:239
Definition: helpers.h:247
void alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges)
void push_back(const t_T &element)
Definition: list.h:174
void deletePlanesForMacRestore()
Definition: vm_types.h:39
Definition: cursor32.h:34