From ad9c247ae3e5650581451e6a6edf13b33caf9085 Mon Sep 17 00:00:00 2001 From: uruk Date: Tue, 17 Dec 2013 11:07:05 +0100 Subject: AVALANCHE: Implement picture loading/drawing in Nim. --- engines/avalanche/graphics.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'engines/avalanche/graphics.h') diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index 0df91de67f..d54160229a 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -78,9 +78,12 @@ public: void drawDebugLines(); // For the mini-game "Nim". - void blackOutScreen(); - void loadNimStone(); + void drawFilledRectangle(Common::Rect rect, Color color); + void drawRectangle(Common::Rect rect, Color color); + void loadNim(); void drawNimStone(int x, int y); + void drawNimInitials(); + void drawNimLogo(); void clearAlso(); void clearTextBar(); @@ -88,12 +91,10 @@ public: byte getAlsoColor(int x1, int y1, int x2, int y2); byte getScreenColor(Common::Point pos); - // The caller has to .free() the returned Surfaces!!! - // Further information about these two: http://www.shikadi.net/moddingwiki/Raw_EGA_data + // Further information about this: http://www.shikadi.net/moddingwiki/Raw_EGA_data Graphics::Surface loadPictureRaw(Common::File &file, uint16 width, uint16 height); void drawSprite(AnimationType *sprite, byte picnum, int16 x, int16 y); - void drawPicture(Graphics::Surface &target, const Graphics::Surface picture, uint16 destX, uint16 destY); void drawThinkPic(Common::String filename, int id); void drawToolbar(); void drawCursor(byte pos); @@ -130,14 +131,23 @@ private: Graphics::Surface _screen; // Only used in refreshScreen() to make it more optimized. (No recreation of it at every call of the function.) Graphics::Surface _scrolls; Graphics::Surface _surface; - Graphics::Surface _nimStone; // For the mini-game "Nim". + + // For the mini-game "Nim". + Graphics::Surface _nimStone; + Graphics::Surface _nimInitials[3]; + Graphics::Surface _nimLogo; + byte _egaPalette[64][3]; AvalancheEngine *_vm; + // Further information about these two: http://www.shikadi.net/moddingwiki/Raw_EGA_data Graphics::Surface loadPictureGraphic(Common::File &file); // Reads Graphic-planar EGA data. Graphics::Surface loadPictureSign(Common::File &file, int xl, int yl); // Reads a tricky type of picture used for the "game over"/"about" scrolls and in the mini-game Nim. + void drawText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color); + void drawPicture(Graphics::Surface &target, const Graphics::Surface picture, uint16 destX, uint16 destY); + // Taken from Free Pascal's Procedure InternalEllipseDefault. Used to replace Pascal's procedure arc. // Returns the end point of the arc. (Needed in Clock.) // TODO: Make it more accurate later. -- cgit v1.2.3