ScummVM API documentation
Sci::GfxFrameout Class Reference

#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 PlaneListgetPlanes () const
 
const PlaneListgetVisiblePlanes () 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 BuffergetCurrentBuffer () 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)
 
PlanegetTopVisiblePlane ()
 
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
 

Detailed Description

Frameout class, kFrameOut and relevant functions for SCI32 games. Roughly equivalent to GraphicsMgr in SSCI.

Member Function Documentation

◆ isHiRes()

bool Sci::GfxFrameout::isHiRes ( ) const
inline

Returns true if the game should render at a resolution greater than 320x240.

◆ getScriptWidth()

int16 Sci::GfxFrameout::getScriptWidth ( ) const
inline

Gets the x-resolution used by game scripts.

◆ getScriptHeight()

int16 Sci::GfxFrameout::getScriptHeight ( ) const
inline

Gets the y-resolution used by game scripts.

◆ getScreenWidth()

int16 Sci::GfxFrameout::getScreenWidth ( void  ) const
inline

Gets the x-resolution of the output buffer.

◆ getScreenHeight()

int16 Sci::GfxFrameout::getScreenHeight ( void  ) const
inline

Gets the y-resolution of the output buffer.

◆ addScreenItem()

void Sci::GfxFrameout::addScreenItem ( ScreenItem screenItem) const

Adds a screen item.

◆ updateScreenItem()

void Sci::GfxFrameout::updateScreenItem ( ScreenItem screenItem) const

Updates a screen item.

◆ deleteScreenItem() [1/3]

void Sci::GfxFrameout::deleteScreenItem ( ScreenItem screenItem)

Deletes a screen item.

◆ deleteScreenItem() [2/3]

void Sci::GfxFrameout::deleteScreenItem ( ScreenItem screenItem,
Plane plane 
)

Deletes a screen item from the given plane.

◆ deleteScreenItem() [3/3]

void Sci::GfxFrameout::deleteScreenItem ( ScreenItem screenItem,
const reg_t  plane 
)

Deletes a screen item from the given plane.

◆ addPlane()

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.

Note
This method is on Screen in SSCI, but it is only ever called on GraphicsMgr.screen.

◆ deletePlane()

void Sci::GfxFrameout::deletePlane ( Plane plane)

Deletes a plane within the current plane list.

Note
This method is on Screen in SSCI, but it is only ever called on GraphicsMgr.screen.

◆ deletePlanesForMacRestore()

void Sci::GfxFrameout::deletePlanesForMacRestore ( )

Deletes planes when restoring a Mac game.

◆ updateScreen()

void Sci::GfxFrameout::updateScreen ( const int  delta = 0)

Updates the hardware screen, no more than once per tick.

Parameters
deltaAn 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.

◆ setPixelFormat()

void Sci::GfxFrameout::setPixelFormat ( const Graphics::PixelFormat format) const
inline

Resets the pixel format of the hardware surface to the given format.

◆ throttle()

void Sci::GfxFrameout::throttle ( )

Throttles the engine as necessary to maintain 60fps output.

◆ frameOut()

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.

◆ palMorphFrameOut()

void Sci::GfxFrameout::palMorphFrameOut ( const int8 *  styleRanges,
PlaneShowStyle showStyle 
)

TODO: Documentation

◆ directFrameOut()

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.

◆ redrawGameScreen()

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.

Parameters
skipRectAn area of the screen that does not need to be redrawn.

◆ alterVmap()

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.

◆ shakeScreen()

void Sci::GfxFrameout::shakeScreen ( const int16  numShakes,
const ShakeDirection  direction 
)

Shakes the screen.

Member Data Documentation

◆ _throttleKernelFrameOut

bool Sci::GfxFrameout::_throttleKernelFrameOut

Whether or not to throttle kFrameOut calls.

◆ _palMorphIsOn

bool Sci::GfxFrameout::_palMorphIsOn

Whether palMorphFrameOut should be used instead of frameOut for rendering. Used by kMorphOn to explicitly enable palMorphFrameOut for one frame.


The documentation for this class was generated from the following file: