22#ifndef SCI_GRAPHICS_FRAMEOUT_H
23#define SCI_GRAPHICS_FRAMEOUT_H
25#include "common/system.h"
26#include "engines/util.h"
28#include "sci/graphics/plane32.h"
29#include "sci/graphics/screen_item32.h"
36class GfxTransitions32;
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);
222 if (!format->isCLUT8())
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);
296 inline int getScreenCount()
const {
303 void shakeScreen(
const int16 numShakes,
const ShakeDirection direction);
305 Plane *getTopVisiblePlane();
311 uint32 _lastScreenUpdateTick;
316 uint8 _throttleState;
353 int _overdrawThreshold;
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
426 reg_t kernelIsOnMe(
const reg_t
object,
const Common::Point &position,
const bool checkPixel)
const;
429 void updateMousePositionForRendering()
const {
437 g_sci->getEventManager()->getSciEvent(kSciEventPeek);
444 bool isOnMe(
const ScreenItem &screenItem,
const Plane &plane,
const Common::Point &position,
const bool checkPixel)
const;
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;
454 void printPlaneItemListInternal(Console *con,
const ScreenItemList &screenItemList)
const;
Definition: display_client.h:113
void push_back(const t_T &element)
Definition: list.h:174
Definition: cursor32.h:34
Definition: frameout.h:43
bool setPixelFormat(const Graphics::PixelFormat *format) const
Definition: frameout.h:214
void addScreenItem(ScreenItem &screenItem) const
void deletePlanesForMacRestore()
void frameOut(const bool shouldShowBits, const Common::Rect &eraseRect=Common::Rect())
void palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *showStyle)
void alterVmap(const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges)
bool _throttleKernelFrameOut
Definition: frameout.h:232
int16 getScriptWidth() const
Definition: frameout.h:62
bool _palMorphIsOn
Definition: frameout.h:239
void deleteScreenItem(ScreenItem &screenItem, Plane &plane)
void deleteScreenItem(ScreenItem &screenItem, const reg_t plane)
void redrawGameScreen(const Common::Rect &skipRect) const
int16 getScriptHeight() const
Definition: frameout.h:67
void directFrameOut(const Common::Rect &showRect)
int16 getScreenWidth() const
Definition: frameout.h:72
void updateScreenItem(ScreenItem &screenItem) const
bool isHiRes() const
Definition: frameout.h:57
void shakeScreen(const int16 numShakes, const ShakeDirection direction)
int16 getScreenHeight() const
Definition: frameout.h:77
void deletePlane(Plane &plane)
void deleteScreenItem(ScreenItem &screenItem)
void addPlane(Plane *plane)
void updateScreen(const int delta=0)
Definition: palette32.h:234
Definition: transitions32.h:215
Definition: plane32.h:103
Definition: plane32.h:479
Definition: screen_item32.h:53
Definition: seg_manager.h:48
void initGraphics(int width, int height)
Definition: helpers.h:247
Definition: transitions32.h:53
Definition: vm_types.h:39