ScummVM API documentation
Ultima::Ultima4::Screen Class Reference
Inheritance diagram for Ultima::Ultima4::Screen:
Graphics::Screen Graphics::ManagedSurface

Public Member Functions

void init ()
 
void clear ()
 
void setMouseCursor (MouseCursor cursor)
 
void screenReInit ()
 
void screenWait (int numberOfAnimationFrames)
 
void screenDrawImage (const Common::String &name, int x=0, int y=0)
 
void screenDrawImageInMapArea (const Common::String &bkgd)
 
void screenFrame ()
 
void screenCycle ()
 
void screenEraseMapArea ()
 
void screenEraseTextArea (int x, int y, int width, int height)
 
void screenGemUpdate ()
 
void screenMessage (const char *fmt,...)
 
void screenPrompt ()
 
void screenRedrawMapArea ()
 
void screenRedrawTextArea (int x, int y, int width, int height)
 
void screenScrollMessageArea ()
 
void screenShake (int iterations)
 
void screenShowChar (int chr, int x, int y)
 
void screenTextAt (int x, int y, const char *fmt,...)
 
void screenTextColor (int color)
 
bool screenTileUpdate (TileView *view, const Coords &coords, bool redraw=true)
 
void screenUpdate (TileView *view, bool showmap, bool blackout)
 
void screenUpdateCursor ()
 
void screenUpdateMoons ()
 
void screenUpdateWind ()
 
Std::vector< MapTilescreenViewportTile (uint width, uint height, int x, int y, bool &focus)
 
void screenShowCursor ()
 
void screenHideCursor ()
 
void screenEnableCursor ()
 
void screenDisableCursor ()
 
void screenSetCursorPos (int x, int y)
 
int screenPointInMouseArea (int x, int y, const MouseArea *area)
 
ImagescreenScale (Image *src, int scale, int n, int filter)
 
ImagescreenScaleDown (Image *src, int scale)
 
- Public Member Functions inherited from Graphics::Screen
 Screen (int width, int height)
 
 Screen (int width, int height, PixelFormat pixelFormat)
 
bool isDirty () const
 
void makeAllDirty ()
 
virtual void clearDirtyRects ()
 
virtual void addDirtyRect (const Common::Rect &r)
 
virtual void update ()
 
virtual void updateScreen ()
 
void getPalette (byte palette[(256 *3)])
 
void getPalette (byte *palette, uint start, uint num)
 
void setPalette (const byte palette[(256 *3)])
 
void setPalette (const byte *palette, uint start, uint num)
 
void clearPalette ()
 
- Public Member Functions inherited from Graphics::ManagedSurface
bool clip (Common::Rect &srcBounds, Common::Rect &destBounds) const
 
 ManagedSurface ()
 
 ManagedSurface (const ManagedSurface &surf)
 
 ManagedSurface (int width, int height)
 
 ManagedSurface (int width, int height, const Graphics::PixelFormat &pixelFormat)
 
 ManagedSurface (ManagedSurface &surf, const Common::Rect &bounds)
 
 ManagedSurface (Surface *surf, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)
 
 ManagedSurface (const Surface *surf)
 
virtual ~ManagedSurface ()
 
 operator const Surface & () const
 
const SurfacerawSurface () const
 
SurfacesurfacePtr ()
 
ManagedSurfaceoperator= (const ManagedSurface &surf)
 
bool empty () const
 
DisposeAfterUse::Flag disposeAfterUse () const
 
uint32 getPixel (int x, int y) const
 
void setPixel (int x, int y, uint32 pixel)
 
const void * getBasePtr (int x, int y) const
 
void * getBasePtr (int x, int y)
 
void * getPixels ()
 
const void * getPixels () const
 
virtual void setPixels (void *newPixels)
 
virtual void create (int16 width, int16 height)
 
virtual void create (int16 width, int16 height, const PixelFormat &pixelFormat)
 
virtual void create (ManagedSurface &surf, const Common::Rect &bounds)
 
virtual void free ()
 
const Common::Point getOffsetFromOwner () const
 
const Common::Rect getBounds () const
 
void blitFrom (const Surface &src, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Point &destPos, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, const Palette *srcPalette=nullptr)
 
void blitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette=nullptr)
 
void blitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Rect &destRect)
 
void blitFrom (const ManagedSurface &src)
 
void blitFrom (const ManagedSurface &src, const Common::Point &destPos)
 
void blitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 
void transBlitFrom (const Surface &src, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, const ManagedSurface &mask, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Point &destPos, const Surface &mask, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette)
 
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false, const Palette *srcPalette=nullptr)
 
void transBlitFrom (const ManagedSurface &src, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, const ManagedSurface &mask)
 
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff)
 
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor=0, bool flipped=false, uint32 overrideColor=0, uint32 srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false)
 
void rawBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 
Common::Rect blendBlitTo (ManagedSurface &target, const int posX=0, const int posY=0, const int flipping=FLIP_NONE, const Common::Rect *srcRect=nullptr, const uint colorMod=(uint32)(((255)<< 24)|((255)<< 16)|((255)<< 8)|(255)), const int width=-1, const int height=-1, const TSpriteBlendMode blend=BLEND_NORMAL, const AlphaType alphaType=ALPHA_FULL)
 Renders this surface onto target. More...
 
Common::Rect blendBlitTo (Surface &target, const int posX=0, const int posY=0, const int flipping=FLIP_NONE, const Common::Rect *srcRect=nullptr, const uint colorMod=(uint32)(((255)<< 24)|((255)<< 16)|((255)<< 8)|(255)), const int width=-1, const int height=-1, const TSpriteBlendMode blend=BLEND_NORMAL, const AlphaType alphaType=ALPHA_FULL)
 
void clear (uint32 color=0)
 
void markAllDirty ()
 
void copyRectToSurface (const void *buffer, int srcPitch, int destX, int destY, int width, int height)
 
void copyRectToSurface (const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect)
 
void copyRectToSurfaceWithKey (const void *buffer, int srcPitch, int destX, int destY, int width, int height, uint32 key)
 
void copyRectToSurfaceWithKey (const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect, uint32 key)
 
void copyFrom (const ManagedSurface &surf)
 
void copyFrom (const Surface &surf)
 
void drawLine (int x0, int y0, int x1, int y1, uint32 color)
 
void drawThickLine (int x0, int y0, int x1, int y1, int penX, int penY, uint32 color)
 
void hLine (int x, int y, int x2, uint32 color)
 
void vLine (int x, int y, int y2, uint32 color)
 
void fillRect (Common::Rect r, uint32 color)
 
void frameRect (const Common::Rect &r, uint32 color)
 
Surface getSubArea (const Common::Rect &area)
 
void convertToInPlace (const PixelFormat &dstFormat)
 
void convertToInPlace (const PixelFormat &dstFormat, const byte *palette, uint16 paletteCount)
 
uint getTransparentColor () const
 
void setTransparentColor (uint32 color)
 
void clearTransparentColor ()
 
bool hasTransparentColor () const
 
void clearPalette ()
 
bool hasPalette () const
 
void grabPalette (byte *colors, uint start, uint num) const
 
void setPalette (const byte *colors, uint start, uint num)
 

Public Attributes

Std::vector< Common::String_gemLayoutNames
 
Std::vector< Common::String_filterNames
 
Std::vector< Common::String_lineOfSightStyles
 
int _currentCycle
 
TileAnimSet_tileAnims
 
Std::vector< Layout * > _layouts
 
Scaler _filterScaler
 
- Public Attributes inherited from Graphics::ManagedSurface
int16 & w
 
int16 & h
 
int32 & pitch
 
PixelFormatformat
 

Additional Inherited Members

- Static Public Member Functions inherited from Graphics::ManagedSurface
static bool isBlendBlitPixelFormatSupported (const PixelFormat &src, const PixelFormat &dst)
 
- Protected Member Functions inherited from Graphics::Screen
void mergeDirtyRects ()
 
bool unionRectangle (Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2)
 
- Protected Member Functions inherited from Graphics::ManagedSurface
void blitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, const Palette *srcPalette)
 
void transBlitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint32 transColor, bool flipped, uint32 overrideColor, uint32 srcAlpha, const Palette *srcPalette, const Palette *dstPalette, const Surface *mask, bool maskOnly)
 
- Protected Attributes inherited from Graphics::Screen
Common::List< Common::Rect_dirtyRects
 

Member Function Documentation

◆ clear()

void Ultima::Ultima4::Screen::clear ( )

Reset the screen

◆ setMouseCursor()

void Ultima::Ultima4::Screen::setMouseCursor ( MouseCursor  cursor)

Sets a given mouse cursor

◆ screenReInit()

void Ultima::Ultima4::Screen::screenReInit ( )

Re-initializes the screen and implements any changes made in settings

◆ screenDrawImage()

void Ultima::Ultima4::Screen::screenDrawImage ( const Common::String name,
int  x = 0,
int  y = 0 
)

Draw an image or subimage on the screen.

◆ screenScrollMessageArea()

void Ultima::Ultima4::Screen::screenScrollMessageArea ( )

Scroll the text in the message area up one position.

◆ screenShake()

void Ultima::Ultima4::Screen::screenShake ( int  iterations)

Do the tremor spell effect where the screen shakes.

◆ screenShowChar()

void Ultima::Ultima4::Screen::screenShowChar ( int  chr,
int  x,
int  y 
)

Draw a character from the charset onto the screen.

◆ screenTextColor()

void Ultima::Ultima4::Screen::screenTextColor ( int  color)

Change the current text color

◆ screenUpdate()

void Ultima::Ultima4::Screen::screenUpdate ( TileView view,
bool  showmap,
bool  blackout 
)

Redraw the screen. If showmap is set, the normal map is drawn in the map area. If blackout is set, the map area is blacked out. If neither is set, the map area is left untouched.

◆ screenPointInMouseArea()

int Ultima::Ultima4::Screen::screenPointInMouseArea ( int  x,
int  y,
const MouseArea area 
)

Determine if the given point is within a mouse area.

◆ screenScale()

Image* Ultima::Ultima4::Screen::screenScale ( Image src,
int  scale,
int  n,
int  filter 
)

Scale an image up. The resulting image will be scale * the original dimensions. The original image is no longer deleted. n is the number of tiles in the image; each tile is filtered separately. filter determines whether or not to filter the resulting image.

◆ screenScaleDown()

Image* Ultima::Ultima4::Screen::screenScaleDown ( Image src,
int  scale 
)

Scale an image down. The resulting image will be 1/scale * the original dimensions. The original image is no longer deleted.


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