#include <frameout.h>
Public Member Functions | |
GfxFrameout (SegManager *segMan, GfxPalette32 *palette, GfxTransitions32 *transitions, GfxCursor32 *cursor) | |
void | clear () |
void | run () |
bool | isHiRes () const |
int16 | getScriptWidth () const |
int16 | getScriptHeight () const |
int16 | getScreenWidth () const |
int16 | getScreenHeight () const |
void | addScreenItem (ScreenItem &screenItem) const |
void | updateScreenItem (ScreenItem &screenItem) const |
void | deleteScreenItem (ScreenItem &screenItem) |
void | deleteScreenItem (ScreenItem &screenItem, Plane &plane) |
void | deleteScreenItem (ScreenItem &screenItem, const reg_t plane) |
void | kernelAddScreenItem (const reg_t object) |
void | kernelUpdateScreenItem (const reg_t object) |
void | kernelDeleteScreenItem (const reg_t object) |
bool | kernelSetNowSeen (const reg_t screenItemObject) const |
int16 | kernelObjectIntersect (const reg_t object1, const reg_t object2) const |
void | addPlane (Plane *plane) |
void | deletePlane (Plane &plane) |
void | deletePlanesForMacRestore () |
const PlaneList & | getPlanes () const |
const PlaneList & | getVisiblePlanes () const |
void | kernelAddPlane (const reg_t object) |
void | kernelUpdatePlane (const reg_t object) |
void | kernelDeletePlane (const reg_t object) |
void | kernelMovePlaneItems (const reg_t object, const int16 deltaX, const int16 deltaY, const bool scrollPics) |
int16 | kernelGetHighPlanePri () |
void | kernelAddPicAt (const reg_t planeObject, const GuiResourceId pictureId, const int16 pictureX, const int16 pictureY, const bool mirrorX, const bool deleteDuplicate) |
void | updateScreen (const int delta=0) |
void | setPixelFormat (const Graphics::PixelFormat &format) const |
const Buffer & | getCurrentBuffer () const |
void | kernelFrameOut (const bool showBits) |
void | throttle () |
void | frameOut (const bool shouldShowBits, const Common::Rect &eraseRect=Common::Rect()) |
void | palMorphFrameOut (const int8 *styleRanges, PlaneShowStyle *showStyle) |
void | directFrameOut (const Common::Rect &showRect) |
void | redrawGameScreen (const Common::Rect &skipRect) const |
void | alterVmap (const Palette &palette1, const Palette &palette2, const int8 style, const int8 *const styleRanges) |
int | getScreenCount () const |
void | shakeScreen (const int16 numShakes, const ShakeDirection direction) |
Plane * | getTopVisiblePlane () |
reg_t | kernelIsOnMe (const reg_t object, const Common::Point &position, const bool checkPixel) const |
void | printPlaneList (Console *con) const |
void | printVisiblePlaneList (Console *con) const |
void | printPlaneListInternal (Console *con, const PlaneList &planeList) const |
void | printPlaneItemList (Console *con, const reg_t planeObject) const |
void | printVisiblePlaneItemList (Console *con, const reg_t planeObject) const |
void | printPlaneItemListInternal (Console *con, const ScreenItemList &screenItemList) const |
Public Attributes | |
bool | _throttleKernelFrameOut |
bool | _palMorphIsOn |
Frameout class, kFrameOut and relevant functions for SCI32 games. Roughly equivalent to GraphicsMgr in SSCI.
|
inline |
Returns true if the game should render at a resolution greater than 320x240.
|
inline |
Gets the x-resolution used by game scripts.
|
inline |
Gets the y-resolution used by game scripts.
|
inline |
Gets the x-resolution of the output buffer.
|
inline |
Gets the y-resolution of the output buffer.
void Sci::GfxFrameout::addScreenItem | ( | ScreenItem & | screenItem | ) | const |
Adds a screen item.
void Sci::GfxFrameout::updateScreenItem | ( | ScreenItem & | screenItem | ) | const |
Updates a screen item.
void Sci::GfxFrameout::deleteScreenItem | ( | ScreenItem & | screenItem | ) |
Deletes a screen item.
void Sci::GfxFrameout::deleteScreenItem | ( | ScreenItem & | screenItem, |
Plane & | plane | ||
) |
Deletes a screen item from the given plane.
void Sci::GfxFrameout::deleteScreenItem | ( | ScreenItem & | screenItem, |
const reg_t | plane | ||
) |
Deletes a screen item from the given plane.
void Sci::GfxFrameout::addPlane | ( | Plane * | plane | ) |
Creates and adds a new plane to the plane list. Ownership of the passed object is transferred to GfxFrameout.
GraphicsMgr.screen
. void Sci::GfxFrameout::deletePlane | ( | Plane & | plane | ) |
Deletes a plane within the current plane list.
GraphicsMgr.screen
. void Sci::GfxFrameout::deletePlanesForMacRestore | ( | ) |
Deletes planes when restoring a Mac game.
void Sci::GfxFrameout::updateScreen | ( | const int | delta = 0 | ) |
Updates the hardware screen, no more than once per tick.
delta | An additional number of ticks that should elapse since the last time the screen was updated before it gets updated now. This is used for updating the screen within run_vm, where we normally expect that a call to kFrameOut will occur later during the current frame, but if it does not, then update the screen on the second frame anyway since the game is doing something bad. |
|
inline |
Resets the pixel format of the hardware surface to the given format.
void Sci::GfxFrameout::throttle | ( | ) |
Throttles the engine as necessary to maintain 60fps output.
void Sci::GfxFrameout::frameOut | ( | const bool | shouldShowBits, |
const Common::Rect & | eraseRect = Common::Rect() |
||
) |
Updates the internal screen buffer for the next frame. If shouldShowBits
is true, also sends the buffer to hardware. If eraseRect
is non-empty, it is added to the erase list for this frame.
void Sci::GfxFrameout::palMorphFrameOut | ( | const int8 * | styleRanges, |
PlaneShowStyle * | showStyle | ||
) |
TODO: Documentation
void Sci::GfxFrameout::directFrameOut | ( | const Common::Rect & | showRect | ) |
Draws the given rect from the internal screen buffer to hardware without processing any other graphics updates except for cursor changes.
void Sci::GfxFrameout::redrawGameScreen | ( | const Common::Rect & | skipRect | ) | const |
Redraws the game screen from the internal frame buffer to the system. Used after pixel format changes.
skipRect | An area of the screen that does not need to be redrawn. |
void Sci::GfxFrameout::alterVmap | ( | const Palette & | palette1, |
const Palette & | palette2, | ||
const int8 | style, | ||
const int8 *const | styleRanges | ||
) |
Modifies the raw pixel data for the next frame with new palette indexes based on matched style ranges.
void Sci::GfxFrameout::shakeScreen | ( | const int16 | numShakes, |
const ShakeDirection | direction | ||
) |
Shakes the screen.
bool Sci::GfxFrameout::_throttleKernelFrameOut |
Whether or not to throttle kFrameOut calls.
bool Sci::GfxFrameout::_palMorphIsOn |
Whether palMorphFrameOut
should be used instead of frameOut
for rendering. Used by kMorphOn
to explicitly enable palMorphFrameOut
for one frame.