Public Member Functions | |
| Graphics (StarTrekEngine *vm) | |
| void | setBackgroundImage (Common::String imageName) |
| void | drawBitmapToBackground (const Common::Rect &origRect, const Common::Rect &drawRect, Bitmap *bitmap) |
| void | fillBackgroundRect (const Common::Rect &rect, byte color) |
| byte * | getBackgroundPixels () |
| byte * | lockScreenPixels () |
| void | unlockScreenPixels () |
| void | clearScreenAndPriBuffer () |
| void | loadPalette (const String &paletteFile) |
| void | copyRectBetweenBitmaps (Bitmap *destBitmap, int destX, int destY, Bitmap *srcBitmap, int srcX, int srcY, int width, int height) |
| void | fadeinScreen () |
| void | fadeoutScreen () |
| void | setPaletteFadeLevel (byte *palData, int fadeLevel) |
| void | incPaletteFadeLevel () |
| void | decPaletteFadeLevel () |
| void | loadPri (const Common::String &priFile) |
| void | clearPri () |
| void | setPri (byte val) |
| byte | getPriValue (int x, int y) |
| Common::Point | getMousePos () |
| void | setMouseBitmap (Common::String bitmapName) |
| void | popMouseBitmap () |
| void | toggleMouse (bool visible) |
| void | lockMousePosition (int16 x, int16 y) |
| void | unlockMousePosition () |
| void | warpMouse (int16 x, int16 y) |
| void | drawSprite (const Sprite &sprite, ::Graphics::Surface *surface) |
| void | drawSprite (const Sprite &sprite, ::Graphics::Surface *surface, const Common::Rect &rect, int rectLeft=0, int rectTop=0) |
| void | drawAllSprites (bool updateScreenFlag=true) |
| void | drawAllSpritesInRectToSurface (const Common::Rect &rect, ::Graphics::Surface *surface) |
| void | forceDrawAllSprites (bool updateScreenFlag=true) |
| void | updateScreen () |
| Sprite * | getSpriteAt (int16 x, int16 y) |
| Sprite * | getSpriteAt (Common::Point p) |
| void | addSprite (Sprite *sprite) |
| void | delSprite (Sprite *sprite) |
| void | pushSprites () |
| void | popSprites () |
| byte * | getFontGfx (char c) |
| void | copyBackgroundScreen () |
| void | loadEGAData (const char *egaFile) |
| void | drawBackgroundImage (const char *filename) |
Public Attributes | |
| Font * | _font |
| void StarTrek::Graphics::drawBitmapToBackground | ( | const Common::Rect & | origRect, |
| const Common::Rect & | drawRect, | ||
| Bitmap * | bitmap | ||
| ) |
| origRect | The rectangle containing the original bitmap (must contain the whole bitmap, even if some is outside the drawable space) |
| drawRect | The clipped rectangle to draw at (must be within the drawable space) |
| void StarTrek::Graphics::loadPalette | ( | const String & | paletteFile | ) |
Note: this doesn't flush the palette to the screen (must call "setPaletteFadeLevel")
| void StarTrek::Graphics::setPaletteFadeLevel | ( | byte * | palData, |
| int | fadeLevel | ||
| ) |
This flushes the palette to the screen. fadeLevel ranges from 0-100.
| void StarTrek::Graphics::setMouseBitmap | ( | Common::String | bitmapName | ) |
Changes the mouse bitmap. The change won't take effect until drawAllSprites is called again.
| void StarTrek::Graphics::lockMousePosition | ( | int16 | x, |
| int16 | y | ||
| ) |
This function is a workaround for when the mouse position needs to be locked in a set position (used in the action menu). This only affects the position it is drawn at; the sprite's "real" position is still updated normally.
This does not call updateScreen.
| void StarTrek::Graphics::drawSprite | ( | const Sprite & | sprite, |
| ::Graphics::Surface * | surface, | ||
| const Common::Rect & | rect, | ||
| int | rectLeft = 0, |
||
| int | rectTop = 0 |
||
| ) |
| sprite | The sprite to draw |
| surface | The surface to draw to |
| rect | The part of the sprite to draw (only draw the part of the sprite that intersects with it) @ |
| rectLeft | X-offset to subtract before drawing to surface. @ |
| rectTop | Y-offset to subtract before drawing to surface. |
| void StarTrek::Graphics::drawAllSpritesInRectToSurface | ( | const Common::Rect & | rect, |
| ::Graphics::Surface * | surface | ||
| ) |
This function should only be called after "drawAllSprites" (so that sprite rects are updated).
| void StarTrek::Graphics::forceDrawAllSprites | ( | bool | updateScreenFlag = true | ) |
Sets "bitmapChanged" to true on all sprites before calling drawAllSprites.
| void StarTrek::Graphics::updateScreen | ( | ) |
Flushes the screen. Usually called by "drawAllSprites".
| Sprite* StarTrek::Graphics::getSpriteAt | ( | int16 | x, |
| int16 | y | ||
| ) |
Returns the sprite at the given position (ignores mouse).