diff options
Diffstat (limited to 'engines/avalanche/graphics.h')
-rw-r--r-- | engines/avalanche/graphics.h | 64 |
1 files changed, 56 insertions, 8 deletions
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index 636ae6fdf9..7e0ed64b5f 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -38,6 +38,7 @@ namespace Avalanche { class AvalancheEngine; class AnimationType; struct SpriteType; +struct ChunkBlock; typedef byte FontType[256][16]; typedef byte ManiType[2049]; @@ -58,6 +59,10 @@ public: void loadDigits(); void loadMouse(byte which); + void drawRectangle(Common::Rect rect, Color color); + void drawFilledRectangle(Common::Rect rect, Color color); + void blackOutScreen(); + void drawDot(int x, int y, Color color); void drawLine(int x1, int y1, int x2, int y2, int penX, int penY, Color color); Common::Point drawScreenArc(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); void drawPieSlice(int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color); @@ -79,8 +84,6 @@ public: void drawDebugLines(); // For the mini-game "Nim". - void drawFilledRectangle(Common::Rect rect, Color color); - void drawRectangle(Common::Rect rect, Color color); void nimLoad(); void nimDrawStone(int x, int y); void nimDrawInitials(); @@ -90,6 +93,41 @@ public: // Used in wobble() void shiftScreen(); + // Used in winning() + void drawWinningPic(); + + // Ghostroom's functions: + void ghostDrawGhost(byte ghostArr[2][66][26], uint16 destX, int16 destY); // Very similar to loadPictureSign(). TODO: Unify the two later if possible. + void ghostDrawGlerk(byte glerkArr[4][35][9], uint16 destX, uint16 destY); // Very similar to ghostDrawGhost(), but not enough to unify the two. + Graphics::Surface ghostLoadPicture(Common::File &file, Common::Point &coord); + void ghostDrawPicture(const Graphics::Surface &picture, uint16 destX, uint16 destY); + void ghostDrawBackgroundItems(Common::File &file); + + // Help's function: + void helpDrawButton(int y, byte which); + void helpDrawHighlight(byte which, Color color); + void helpDrawBigText(const Common::String text, int16 x, int16 y, Color color); // Very similar to drawText. TODO: Try to unify the two. + + // Shoot em' up's functions: + void seuDrawTitle(); + void seuLoad(); + void seuFree(); + void seuDrawPicture(int x, int y, byte which); + void seuDrawCameo(int destX, int destY, byte w1, byte w2); + uint16 seuGetPicWidth(int which); + uint16 seuGetPicHeight(int which); + + // Main Menu's functions: + // The main menu uses a different screen height (350) from the game itself (200 * 2) + // so it needs it's own graphic functions on that matter. + void menuRefreshScreen(); + void menuInitialize(); + void menuFree(); + void menuRestoreScreen(); + void menuLoadPictures(); + void menuDrawBigText(FontType font, uint16 x, uint16 y, Common::String text, Color color); + void menuDrawIndicator(int x); + void clearAlso(); void clearTextBar(); void setAlsoLine(int x1, int y1, int x2, int y2, Color color); @@ -104,6 +142,8 @@ public: void drawToolbar(); void drawCursor(byte pos); void drawReadyLight(Color color); + void drawSoundLight(bool state); + void drawErrorLight(bool state); void drawSign(Common::String name, int16 xl, int16 yl, int16 y); void drawIcon(int16 x, int16 y, byte which); void drawScreenLine(int16 x, int16 y, int16 x2, int16 y2, Color color); @@ -128,6 +168,7 @@ private: static const byte kEgaPaletteIndex[16]; static const byte kBackgroundHeight = 8 * 12080 / kScreenWidth; // With 640 width it's 151. // The 8 = number of bits in a byte, and 12080 comes from Lucerna::load(). + static const uint16 kMenuScreenHeight = 350; Graphics::Surface _background; Graphics::Surface _backup; @@ -137,21 +178,28 @@ 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 _menu; // For the mini-game "Nim". - Graphics::Surface _nimStone; + Graphics::Surface _nimStone; Graphics::Surface _nimInitials[3]; Graphics::Surface _nimLogo; + // For the mini-game "Shoot em' up". + Graphics::Surface _seuPictures[99]; + byte _egaPalette[64][3]; AvalancheEngine *_vm; + void skipDifference(int size, const Graphics::Surface &picture, Common::File &file); + // 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. - + Graphics::Surface loadPictureSign(Common::File &file, uint16 width, uint16 height); // 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 drawBigText(Graphics::Surface &surface, const Common::String text, FontType font, byte fontHeight, int16 x, int16 y, Color color); // Very similar to drawText. TODO: Try to unify the two. 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. |