ScummVM API documentation
Sci::GfxScreen Class Reference

#include <screen.h>

Public Member Functions

 GfxScreen (ResourceManager *resMan, Common::RenderMode renderMode)
 
uint16 getWidth ()
 
uint16 getHeight ()
 
uint16 getScriptWidth ()
 
uint16 getScriptHeight ()
 
uint16 getDisplayWidth ()
 
uint16 getDisplayHeight ()
 
byte getColorWhite ()
 
byte getColorDefaultVectorData ()
 
void clearForRestoreGame ()
 
void copyToScreen ()
 
void kernelSyncWithFramebuffer ()
 
void copyRectToScreen (const Common::Rect &rect)
 
void copyHiResRectToScreen (const byte *srcBuffer, int pitch, int x, int y, int w, int h, const byte *colorMap)
 
void copyRectToScreen (const Common::Rect &rect, int16 x, int16 y)
 
void bakCreateBackup ()
 
void bakCopyRectToScreen (const Common::Rect &rect, int16 x, int16 y)
 
void bakDiscard ()
 
void copyVideoFrameToScreen (const byte *buffer, int pitch, const Common::Rect &rect)
 
void vectorAdjustLineCoordinates (int16 *left, int16 *top, int16 *right, int16 *bottom, byte drawMask, byte color, byte priority, byte control)
 
byte vectorIsFillMatch (int16 x, int16 y, byte screenMask, byte checkForColor, byte checkForPriority, byte checkForControl, bool isEGA)
 
byte getDrawingMask (byte color, byte prio, byte control)
 
void drawLine (Common::Point startPoint, Common::Point endPoint, byte color, byte prio, byte control)
 
void drawLine (int16 left, int16 top, int16 right, int16 bottom, byte color, byte prio, byte control)
 
GfxScreenUpscaledMode getUpscaledHires () const
 
bool isUnditheringEnabled () const
 
void enableUndithering (bool flag)
 
void putMacChar (const Graphics::Font *commonFont, int16 x, int16 y, uint16 chr, byte color)
 
void putKanjiChar (Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color)
 
void putHangulChar (Graphics::FontKorean *commonFont, int16 x, int16 y, uint16 chr, byte color)
 
int bitsGetDataSize (Common::Rect rect, byte mask)
 
void bitsSave (Common::Rect rect, byte mask, byte *memoryPtr)
 
void bitsGetRect (const byte *memoryPtr, Common::Rect *destRect)
 
void bitsRestore (const byte *memoryPtr)
 
void scale2x (const SciSpan< const byte > &src, SciSpan< byte > &dst, int16 srcWidth, int16 srcHeight, byte bytesPerPixel=1)
 
void adjustToUpscaledCoordinates (int16 &y, int16 &x)
 
void adjustBackUpscaledCoordinates (int16 &y, int16 &x)
 
void dither (bool addToFlag)
 
void ditherForceDitheredColor (byte color)
 
int16 * unditherGetDitheredBgColors ()
 
void debugShowMap (int mapNo)
 
int16 kernelPicNotValid (int16 newPicNotValid)
 
void kernelShakeScreen (uint16 shakeCount, uint16 direction)
 
void setFontIsUpscaled (bool isUpscaled)
 
bool fontIsUpscaled () const
 
void grabPalette (byte *buffer, uint start, uint num) const
 
void setPalette (const byte *buffer, uint start, uint num, bool update=true)
 
byte getCurPaletteMapValue () const
 
void setCurPaletteMapValue (byte val)
 
void setPaletteMods (const PaletteMod *mods, unsigned int count)
 
bool paletteModsEnabled () const
 
GfxDrivergfxDriver () const
 
void putPixel (int16 x, int16 y, byte drawMask, byte color, byte priority, byte control)
 
void putPixel480x300 (int16 x, int16 y, byte drawMask, byte color, byte priority, byte control)
 
void putPixel480x300Worker (int16 x, int16 y, int offset, byte *screen, byte byteToSet)
 
void vectorPutPixel (int16 x, int16 y, byte drawMask, byte color, byte priority, byte control)
 
void putPixelOnDisplay (int16 x, int16 y, byte color)
 
void putScaledPixelOnDisplay (int16 x, int16 y, byte color)
 
void putFontPixel (int16 startingY, int16 x, int16 y, byte color)
 
byte getPixel (byte *screen, int16 x, int16 y)
 
byte getVisual (int16 x, int16 y)
 
byte getPriority (int16 x, int16 y)
 
byte getControl (int16 x, int16 y)
 
byte vectorGetPixel (byte *screen, int16 x, int16 y)
 
byte vectorGetVisual (int16 x, int16 y)
 
byte vectorGetPriority (int16 x, int16 y)
 
byte vectorGetControl (int16 x, int16 y)
 
void vectorAdjustCoordinate (int16 *x, int16 *y)
 
bool hasActiveHiresView () const
 
void toggleActiveHiresView (bool toggle)
 

Public Attributes

int _picNotValid
 
int _picNotValidSci11
 

Detailed Description

Screen class, actually creates 3 (4) screens internally:

  • visual/display (for the user),
  • priority (contains priority information) and
  • control (contains control information). Handles all operations to it and copies parts of visual/display screen to the actual screen, so the user can really see it.

Member Function Documentation

◆ putPixelOnDisplay()

void Sci::GfxScreen::putPixelOnDisplay ( int16  x,
int16  y,
byte  color 
)
inline

This will just change a pixel directly on displayscreen. It is supposed to be only used on upscaled-Hires games where hires content needs to get drawn ONTO the upscaled display screen (like japanese fonts, hires portraits, etc.).

◆ putFontPixel()

void Sci::GfxScreen::putFontPixel ( int16  startingY,
int16  x,
int16  y,
byte  color 
)
inline

This is used to put font pixels onto the screen - we adjust differently, so that we won't do triple pixel lines in any case on upscaled hires. That way the font will not get distorted Sierra SCI didn't do this


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