From ea35f4728e766d25aecac10ef5fa432794788ce4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 4 Jun 2021 00:54:17 +0200 Subject: [PATCH] SAGA2: Load image cursors from .exe, delete images.* --- engines/saga2/dispnode.cpp | 4 +- engines/saga2/document.cpp | 13 +- engines/saga2/grabinfo.cpp | 15 +- engines/saga2/grequest.cpp | 6 +- engines/saga2/images.cpp | 670 ------------------------------------- engines/saga2/images.h | 67 ---- engines/saga2/module.mk | 1 - engines/saga2/mouseimg.cpp | 98 +++--- engines/saga2/mouseimg.h | 26 ++ engines/saga2/saga2.cpp | 76 +++-- engines/saga2/tilemode.cpp | 18 +- engines/saga2/towerfta.cpp | 3 +- 12 files changed, 166 insertions(+), 831 deletions(-) delete mode 100644 engines/saga2/images.cpp delete mode 100644 engines/saga2/images.h diff --git a/engines/saga2/dispnode.cpp b/engines/saga2/dispnode.cpp index 2213ebe95b4..2703231e8a4 100644 --- a/engines/saga2/dispnode.cpp +++ b/engines/saga2/dispnode.cpp @@ -27,9 +27,9 @@ #include "saga2/std.h" #include "saga2/blitters.h" #include "saga2/spelshow.h" -#include "saga2/images.h" #include "saga2/player.h" #include "saga2/sensor.h" +#include "saga2/mouseimg.h" namespace Saga2 { @@ -808,7 +808,7 @@ void DisplayNode::drawObject(void) { if (flags & displayIndicator) { Point16 indicatorCoords; - gPixelMap &indicator = CenterActorIndicatorImage; + gPixelMap &indicator = *mouseCursors[kMouseCenterActorIndicatorImage]; indicatorCoords.x = hitBox.x + fineScroll.x + (hitBox.width - indicator.size.x) / 2; indicatorCoords.y = hitBox.y + fineScroll.y - indicator.size.y - 2; diff --git a/engines/saga2/document.cpp b/engines/saga2/document.cpp index 6f7148f58e1..67fe3a3ef15 100644 --- a/engines/saga2/document.cpp +++ b/engines/saga2/document.cpp @@ -29,7 +29,6 @@ #include "saga2/script.h" #include "saga2/intrface.h" #include "saga2/grequest.h" -#include "saga2/images.h" #include "saga2/mouseimg.h" #include "saga2/version.h" #include "saga2/fontlib.h" @@ -289,15 +288,15 @@ void CDocument::pointerMove(gPanelMessage &msg) { if (msg.inPanel && Rect16(0, 0, extent.width, extent.height).ptInside(pos)) { if (app.orientation == pageOrientVertical) { // find out which end of the book we're on - if (pos.y < extent.height / 2) setMouseImage(PgUpImage, -7, -7); - else setMouseImage(PgDownImage, -7, -7); + if (pos.y < extent.height / 2) setMouseImage(kMousePgUpImage, -7, -7); + else setMouseImage(kMousePgDownImage, -7, -7); } else { // find out which side of the book we're on - if (pos.x < extent.width / 2) setMouseImage(PgLeftImage, -7, -7); - else setMouseImage(PgRightImage, -7, -7); + if (pos.x < extent.width / 2) setMouseImage(kMousePgLeftImage, -7, -7); + else setMouseImage(kMousePgRightImage, -7, -7); } } else if (msg.pointerLeave) { - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); } notify(gEventMouseMove, 0); @@ -335,7 +334,7 @@ bool CDocument::pointerHit(gPanelMessage &msg) { ri->running = 0; ri->result = id; - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); } } diff --git a/engines/saga2/grabinfo.cpp b/engines/saga2/grabinfo.cpp index 245770ebc87..e0ce5f21419 100644 --- a/engines/saga2/grabinfo.cpp +++ b/engines/saga2/grabinfo.cpp @@ -26,7 +26,6 @@ #include "saga2/std.h" #include "saga2/gdraw.h" -#include "saga2/images.h" #include "saga2/objects.h" #include "saga2/contain.h" #include "saga2/mouseimg.h" @@ -235,30 +234,30 @@ void GrabInfo::setCursor(void) { // pointer has already been hidden. break; case WalkTo: - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); break; case Open: - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); break; case PickUp: - setMouseImage(GrabPtrImage, -7, -7); + setMouseImage(kMouseGrabPtrImage, -7, -7); break; case Drop: setMouseImage(pointerMap, pointerOffset.x, pointerOffset.y); break; case Use: - setMouseImage(UsePtrImage, -7, -7); + setMouseImage(kMouseUsePtrImage, -7, -7); break; case Attack: - setMouseImage(AttakPtrImage, -11, -11); + setMouseImage(kMouseAttakPtrImage, -11, -11); break; case Cast: - setMouseImage(AttakPtrImage, -11, -11); + setMouseImage(kMouseAttakPtrImage, -11, -11); break; } } else { // indicate current intention is not doable - setMouseImage(XPointerImage, -7, -7); + setMouseImage(kMouseXPointerImage, -7, -7); } } diff --git a/engines/saga2/grequest.cpp b/engines/saga2/grequest.cpp index a2aaf64e7fc..c7c08825112 100644 --- a/engines/saga2/grequest.cpp +++ b/engines/saga2/grequest.cpp @@ -27,7 +27,7 @@ #include "saga2/std.h" #include "saga2/grequest.h" #include "saga2/modal.h" -#include "saga2/images.h" +#include "saga2/mouseimg.h" namespace Saga2 { @@ -297,8 +297,8 @@ ModalRequestWindow::ModalRequestWindow( r.height - fontHeight - 8, width, fontHeight + 6), - CloseBx2Image, - CloseBx1Image, + *mouseCursors[kMouseCloseBx2Image], + *mouseCursors[kMouseCloseBx1Image], buttonStrings[ i ], i, handleRequestEvent); diff --git a/engines/saga2/images.cpp b/engines/saga2/images.cpp deleted file mode 100644 index a9acedb15ff..00000000000 --- a/engines/saga2/images.cpp +++ /dev/null @@ -1,670 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * 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 - * 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. - * - * - * Based on the original sources - * Faery Tale II -- The Halls of the Dead - * (c) 1993-1996 The Wyrmkeep Entertainment Co. - */ - -#include "saga2/std.h" -#include "saga2/gdraw.h" - -namespace Saga2 { - -static uint8 CloseBx1ImageData[] = { - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 0 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 1 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 2 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 3 - - 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x18, 0x18, 0x18, 0x0A, 0x0A, 0x0A, 0x18, // Row 4 - - 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x18, 0x18, 0x18, 0x0A, 0x0A, 0x0A, 0x18, // Row 5 - - 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x18, 0x18, 0x18, 0x0A, 0x0A, 0x0A, 0x18, // Row 6 - - 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x18, 0x18, 0x18, 0x0A, 0x0A, 0x0A, 0x18, // Row 7 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 8 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 9 - - 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, // Row 10 - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 11 - -}; - -gStaticImage CloseBx1Image(12, 12, CloseBx1ImageData); - -/* ===================================================================== * - Created from CloseBx2.bbm - Image Size: 12 Wide by 12 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 CloseBx2ImageData[] = { - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 0 - - 0x18, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x18, // Row 1 - - 0x18, 0x7B, 0x82, 0x82, 0x7B, 0x7B, 0x7B, 0x7B, 0x82, 0x82, 0x7B, 0x18, // Row 2 - - 0x18, 0x7B, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x7B, 0x18, // Row 3 - - 0x18, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x18, // Row 4 - - 0x18, 0x7B, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x7B, 0x18, // Row 5 - - 0x18, 0x7B, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x7B, 0x18, // Row 6 - - 0x18, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x18, // Row 7 - - 0x18, 0x7B, 0x82, 0x82, 0x82, 0x7B, 0x7B, 0x82, 0x82, 0x82, 0x7B, 0x18, // Row 8 - - 0x18, 0x7B, 0x82, 0x82, 0x7B, 0x7B, 0x7B, 0x7B, 0x82, 0x82, 0x7B, 0x18, // Row 9 - - 0x18, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x7B, 0x18, // Row 10 - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 11 - -}; - -gStaticImage CloseBx2Image(12, 12, CloseBx2ImageData); - -/* ===================================================================== * - Created from UsePtr.bbm - Image Size: 15 Wide by 15 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 UsePtrImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // Row 0 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, 0x00, // Row 1 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x00, 0x00, // Row 2 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x18, 0x00, 0x00, 0x00, // Row 3 - 0x00, 0x00, 0x00, - - 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 4 - 0x00, 0x18, 0x18, - - 0x18, 0x0A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 5 - 0x18, 0x0A, 0x18, - - 0x18, 0x0A, 0x0A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 6 - 0x0A, 0x0A, 0x18, - - 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, // Row 7 - 0x0A, 0x0A, 0x18, - - 0x18, 0x0A, 0x0A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 8 - 0x0A, 0x0A, 0x18, - - 0x18, 0x0A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 9 - 0x18, 0x0A, 0x18, - - 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 10 - 0x00, 0x18, 0x18, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x18, 0x00, 0x00, 0x00, // Row 11 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x0A, 0x0A, 0x18, 0x00, 0x00, // Row 12 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x18, 0x00, // Row 13 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // Row 14 - 0x00, 0x00, 0x00, -}; - -gStaticImage UsePtrImage(15, 15, UsePtrImageData); - -/* ===================================================================== * - Created from XPointer.bbm - Image Size: 15 Wide by 15 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 XPointerImageData[] = { - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 0 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x18, 0x81, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x81, // Row 1 - 0x18, 0x00, 0x00, - - 0x00, 0x18, 0x81, 0x82, 0x81, 0x18, 0x00, 0x00, 0x00, 0x18, 0x81, 0x82, // Row 2 - 0x81, 0x18, 0x00, - - 0x18, 0x81, 0x82, 0x82, 0x82, 0x81, 0x18, 0x00, 0x18, 0x81, 0x82, 0x82, // Row 3 - 0x82, 0x81, 0x18, - - 0x00, 0x18, 0x84, 0x82, 0x82, 0x82, 0x81, 0x18, 0x81, 0x82, 0x82, 0x82, // Row 4 - 0x84, 0x18, 0x00, - - 0x00, 0x00, 0x18, 0x84, 0x82, 0x82, 0x82, 0x81, 0x82, 0x82, 0x82, 0x84, // Row 5 - 0x18, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x84, 0x82, 0x82, 0x82, 0x82, 0x82, 0x84, 0x18, // Row 6 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x81, 0x82, 0x82, 0x82, 0x81, 0x18, 0x00, // Row 7 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x81, 0x82, 0x82, 0x82, 0x82, 0x82, 0x81, 0x18, // Row 8 - 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x18, 0x81, 0x82, 0x82, 0x82, 0x84, 0x82, 0x82, 0x82, 0x81, // Row 9 - 0x18, 0x00, 0x00, - - 0x00, 0x18, 0x81, 0x82, 0x82, 0x82, 0x84, 0x18, 0x84, 0x82, 0x82, 0x82, // Row 10 - 0x81, 0x18, 0x00, - - 0x18, 0x81, 0x82, 0x82, 0x82, 0x84, 0x18, 0x00, 0x18, 0x84, 0x82, 0x82, // Row 11 - 0x82, 0x81, 0x18, - - 0x00, 0x18, 0x84, 0x82, 0x84, 0x18, 0x00, 0x00, 0x00, 0x18, 0x84, 0x82, // Row 12 - 0x84, 0x18, 0x00, - - 0x00, 0x00, 0x18, 0x84, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x84, // Row 13 - 0x18, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 14 - 0x00, 0x00, 0x00, -}; - -gStaticImage XPointerImage(15, 15, XPointerImageData); - -/* ===================================================================== * - Created from Arrow.bbm - Image Size: 11 Wide by 17 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 ArrowImageData[] = { - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 0 - 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 1 - 0x18, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 2 - 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 3 - 0x18, 0x4E, 0x4C, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 4 - 0x18, 0x4E, 0x4C, 0x4C, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 5 - 0x18, 0x4E, 0x4C, 0x4C, 0x4C, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 6 - 0x18, 0x4E, 0x4C, 0x4C, 0x4C, 0x4C, 0x49, 0x18, 0x00, 0x00, 0x00, // Row 7 - 0x18, 0x4E, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x49, 0x18, 0x00, 0x00, // Row 8 - 0x18, 0x4E, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x49, 0x18, 0x00, // Row 9 - 0x18, 0x4E, 0x4C, 0x4E, 0x4C, 0x49, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 10 - 0x18, 0x4E, 0x4E, 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 11 - 0x18, 0x4E, 0x18, 0x00, 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, 0x00, // Row 12 - 0x18, 0x18, 0x00, 0x00, 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, 0x00, // Row 13 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, // Row 14 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x4E, 0x49, 0x18, 0x00, 0x00, // Row 15 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00, // Row 16 -}; - -gStaticImage ArrowImage(11, 17, ArrowImageData); - -/* ===================================================================== * - Created from GrabPtr.bbm - Image Size: 16 Wide by 13 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 GrabPtrImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 0 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x18, 0x18, 0x40, 0x40, 0x3C, 0x40, 0x3B, 0x18, 0x00, 0x00, // Row 1 - 0x00, 0x00, 0x00, 0x00, - - 0x18, 0x18, 0x40, 0x40, 0x40, 0x3C, 0x40, 0x3C, 0x40, 0x3B, 0x18, 0x00, // Row 2 - 0x00, 0x00, 0x00, 0x00, - - 0x18, 0x3C, 0x3C, 0x3C, 0x3C, 0x40, 0x3C, 0x40, 0x3C, 0x3E, 0x3B, 0x18, // Row 3 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x18, 0x18, 0x18, 0x3D, 0x3C, 0x40, 0x3C, 0x3C, 0x3B, 0x3C, 0x3B, // Row 4 - 0x18, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x3D, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, // Row 5 - 0x3B, 0x18, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3D, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, // Row 6 - 0x3B, 0x18, 0x00, 0x00, - - 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x3D, 0x3D, 0x3C, 0x3C, 0x3C, 0x3C, // Row 7 - 0x3C, 0x3B, 0x18, 0x00, - - 0x18, 0x3E, 0x3D, 0x18, 0x18, 0x3D, 0x3D, 0x3D, 0x3D, 0x3C, 0x3C, 0x3C, // Row 8 - 0x3C, 0x3C, 0x3B, 0x18, - - 0x00, 0x18, 0x3E, 0x3D, 0x3D, 0x3E, 0x3E, 0x3E, 0x3D, 0x3D, 0x3C, 0x3C, // Row 9 - 0x3C, 0x3C, 0x18, 0x00, - - 0x00, 0x00, 0x18, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3D, 0x3D, 0x3C, // Row 10 - 0x3C, 0x18, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3E, 0x3D, 0x3D, // Row 11 - 0x18, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, // Row 12 - 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage GrabPtrImage(16, 13, GrabPtrImageData); - -/* ===================================================================== * - Created from AttakPtr.bbm - Image Size: 23 Wide by 23 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 AttakPtrImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 0 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 1 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 2 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 3 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x5A, // Row 4 - 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x5A, 0x5A, // Row 5 - 0x5A, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x18, 0x5A, // Row 6 - 0x18, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x18, 0x5A, // Row 7 - 0x18, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x18, // Row 8 - 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 9 - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x18, 0x18, 0x18, 0x18, 0x5A, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 10 - 0x00, 0x00, 0x00, 0x18, 0x18, 0x5A, 0x18, 0x18, 0x18, 0x18, 0x00, - - 0x18, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x18, 0x00, 0x00, 0x00, // Row 11 - 0x00, 0x00, 0x18, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x18, - - 0x00, 0x18, 0x18, 0x18, 0x18, 0x5A, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 12 - 0x00, 0x00, 0x00, 0x18, 0x18, 0x5A, 0x18, 0x18, 0x18, 0x18, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, // Row 13 - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x18, // Row 14 - 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x18, 0x5A, // Row 15 - 0x18, 0x00, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x18, 0x18, 0x5A, // Row 16 - 0x18, 0x18, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, 0x5A, 0x5A, // Row 17 - 0x5A, 0x5A, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x5A, // Row 18 - 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 19 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 20 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5A, // Row 21 - 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 22 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage AttakPtrImage(23, 23, AttakPtrImageData); - -/* ===================================================================== * - Created from turn.bbm - Image Size: 9 Wide by 10 High. - Converted by iff2c. - * ===================================================================== */ - -uint8 CenterActorIndicatorImageData[] = { - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 0 - 0x18, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, // Row 1 - 0x18, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, // Row 2 - 0x00, 0x18, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x00, // Row 3 - 0x00, 0x18, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x00, // Row 4 - 0x00, 0x00, 0x18, 0x0a, 0x0a, 0x0a, 0x18, 0x00, 0x00, // Row 5 - 0x00, 0x00, 0x18, 0x0a, 0x0a, 0x0a, 0x18, 0x00, 0x00, // Row 6 - 0x00, 0x00, 0x00, 0x18, 0x0a, 0x18, 0x00, 0x00, 0x00, // Row 7 - 0x00, 0x00, 0x00, 0x18, 0x0a, 0x18, 0x00, 0x00, 0x00, // Row 8 - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, // Row 9 -}; - -gStaticImage CenterActorIndicatorImage(9, 9, CenterActorIndicatorImageData); - -/* ===================================================================== * - Created from PgUp.bbm - Image Size: 16 Wide by 16 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 PgUpImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 0 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5b, 0x18, 0x00, 0x00, // Row 1 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x5d, 0x5b, 0x18, 0x00, // Row 2 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x18, 0x18, 0x5d, 0x5b, 0x18, // Row 3 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x18, 0xc5, 0xc5, 0x18, 0x5d, 0x5b, // Row 4 - 0x18, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0x18, 0x5d, // Row 5 - 0x5b, 0x18, 0x00, 0x00, - - 0x00, 0x18, 0x5a, 0x5d, 0x18, 0x18, 0x18, 0xc5, 0xc5, 0x18, 0x18, 0x18, // Row 6 - 0x5d, 0x5b, 0x18, 0x00, - - 0x18, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x25, // Row 7 - 0x25, 0x25, 0x25, 0x18, - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 8 - 0x18, 0x18, 0x18, 0x18, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 9 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 10 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 11 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 12 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x25, 0x18, // Row 13 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5c, 0x25, 0x25, 0x25, 0x25, 0x25, 0x18, // Row 14 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 15 - 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage PgUpImage(16, 16, PgUpImageData); - -/* ===================================================================== * - Created from PgDown.bbm - Image Size: 16 Wide by 16 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 PgDownImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 0 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x59, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x18, // Row 1 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x25, 0x18, // Row 2 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 3 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 4 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 5 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 6 - 0x00, 0x00, 0x00, 0x00, - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x18, // Row 7 - 0x18, 0x18, 0x18, 0x18, - - 0x18, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x23, // Row 8 - 0x23, 0x23, 0x23, 0x18, - - 0x00, 0x18, 0x5b, 0x5d, 0x18, 0x18, 0x18, 0xc5, 0xc5, 0x18, 0x18, 0x18, // Row 9 - 0x25, 0x23, 0x18, 0x00, - - 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0x18, 0x25, // Row 10 - 0x23, 0x18, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x18, 0xc5, 0xc5, 0x18, 0x25, 0x23, // Row 11 - 0x18, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x18, 0x18, 0x25, 0x23, 0x18, // Row 12 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x25, 0x23, 0x18, 0x00, // Row 13 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x23, 0x18, 0x00, 0x00, // Row 14 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 15 - 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage PgDownImage(16, 16, PgDownImageData); - -/* ===================================================================== * - Created from PgLeft.bbm - Image Size: 16 Wide by 16 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 PgLeftImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 0 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0x00, 0x00, 0x00, // Row 1 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5a, 0x18, 0x00, 0x00, 0x00, // Row 2 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x5a, 0x18, 0x00, 0x00, 0x00, // Row 3 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x18, 0x5a, 0x18, 0x18, 0x18, 0x18, // Row 4 - 0x18, 0x18, 0x18, 0x18, - - 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x18, 0x18, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, // Row 5 - 0x5a, 0x5a, 0x5c, 0x18, - - 0x00, 0x18, 0x5a, 0x5d, 0x18, 0xc5, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 6 - 0x18, 0x18, 0x25, 0x18, - - 0x18, 0x5a, 0x5d, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, // Row 7 - 0xc5, 0x18, 0x25, 0x18, - - 0x18, 0x5b, 0x5d, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, // Row 8 - 0xc5, 0x18, 0x25, 0x18, - - 0x00, 0x18, 0x5b, 0x5d, 0x18, 0xc5, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, // Row 9 - 0x18, 0x18, 0x25, 0x18, - - 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x18, 0x18, 0x25, 0x25, 0x25, 0x25, 0x25, // Row 10 - 0x25, 0x25, 0x25, 0x18, - - 0x00, 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x18, 0x25, 0x18, 0x18, 0x18, 0x18, // Row 11 - 0x18, 0x18, 0x18, 0x18, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x5d, 0x25, 0x18, 0x00, 0x00, 0x00, // Row 12 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x25, 0x18, 0x00, 0x00, 0x00, // Row 13 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x25, 0x18, 0x00, 0x00, 0x00, // Row 14 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 15 - 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage PgLeftImage(16, 16, PgLeftImageData); - -/* ===================================================================== * - Created from PgRight.bbm - Image Size: 16 Wide by 16 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 PgRightImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 0 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x18, 0x00, 0x00, // Row 1 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5b, 0x18, 0x00, // Row 2 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x5d, 0x5b, 0x18, // Row 3 - 0x00, 0x00, 0x00, 0x00, - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x5a, 0x18, 0x5d, 0x5b, // Row 4 - 0x18, 0x00, 0x00, 0x00, - - 0x18, 0x59, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x18, 0x18, 0x5d, // Row 5 - 0x5b, 0x18, 0x00, 0x00, - - 0x18, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xc5, 0x18, // Row 6 - 0x5d, 0x5b, 0x18, 0x00, - - 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, // Row 7 - 0x18, 0x5d, 0x5b, 0x18, - - 0x18, 0x5a, 0x18, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, 0xc5, // Row 8 - 0x18, 0x25, 0x23, 0x18, - - 0x18, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xc5, 0x18, // Row 9 - 0x25, 0x23, 0x18, 0x00, - - 0x18, 0x5c, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x18, 0x18, 0x25, // Row 10 - 0x23, 0x18, 0x00, 0x00, - - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x23, 0x18, 0x25, 0x23, // Row 11 - 0x18, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x23, 0x25, 0x23, 0x18, // Row 12 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x23, 0x23, 0x18, 0x00, // Row 13 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x23, 0x18, 0x00, 0x00, // Row 14 - 0x00, 0x00, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // Row 15 - 0x00, 0x00, 0x00, 0x00, -}; - -gStaticImage PgRightImage(16, 16, PgRightImageData); - -/* ===================================================================== * - Created from AutoWalk.bbm - Image Size: 15 Wide by 15 High. - Converted by iff2c. - * ===================================================================== */ - -static uint8 AutoWalkImageData[] = { - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // Row 0 - 0x00, 0x00, 0x00, - - 0x00, 0x18, 0x18, 0x18, 0x18, 0xde, 0xde, 0xde, 0xde, 0xde, 0x18, 0x18, // Row 1 - 0x18, 0x18, 0x00, - - 0x00, 0x18, 0xe0, 0xe0, 0xe0, 0x18, 0xde, 0xde, 0xde, 0x18, 0xe0, 0xe0, // Row 2 - 0xe0, 0x18, 0x00, - - 0x00, 0x18, 0xe0, 0x18, 0x18, 0x18, 0x18, 0xde, 0x18, 0x18, 0x18, 0x18, // Row 3 - 0xe0, 0x18, 0x00, - - 0x18, 0x18, 0xe0, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, // Row 4 - 0xe0, 0x18, 0x18, - - 0x18, 0xde, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 5 - 0x18, 0xde, 0x18, - - 0x18, 0xde, 0xde, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 6 - 0xde, 0xde, 0x18, - - 0x18, 0xde, 0xde, 0xde, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xde, // Row 7 - 0xde, 0xde, 0x18, - - 0x18, 0xde, 0xde, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 8 - 0xde, 0xde, 0x18, - - 0x18, 0xde, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // Row 9 - 0x18, 0xde, 0x18, - - 0x18, 0x18, 0xe0, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, // Row 10 - 0xe0, 0x18, 0x18, - - 0x00, 0x18, 0xe0, 0x18, 0x18, 0x18, 0x18, 0xde, 0x18, 0x18, 0x18, 0x18, // Row 11 - 0xe0, 0x18, 0x00, - - 0x00, 0x18, 0xe0, 0xe0, 0xe0, 0x18, 0xde, 0xde, 0xde, 0x18, 0xe0, 0xe0, // Row 12 - 0xe0, 0x18, 0x00, - - 0x00, 0x18, 0x18, 0x18, 0x18, 0xde, 0xde, 0xde, 0xde, 0xde, 0x18, 0x18, // Row 13 - 0x18, 0x18, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, // Row 14 - 0x00, 0x00, 0x00, -}; - -gStaticImage AutoWalkImage(15, 15, AutoWalkImageData); - -} // end of namespace Saga2 diff --git a/engines/saga2/images.h b/engines/saga2/images.h deleted file mode 100644 index 347981597ed..00000000000 --- a/engines/saga2/images.h +++ /dev/null @@ -1,67 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * 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 - * 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. - * - * - * Based on the original sources - * Faery Tale II -- The Halls of the Dead - * (c) 1993-1996 The Wyrmkeep Entertainment Co. - */ - -#ifndef SAGA2_IMAGES_H -#define SAGA2_IMAGES_H - -namespace Saga2 { - -// unselected button image -extern gStaticImage CloseBx1Image; - -// selected button image -extern gStaticImage CloseBx2Image; - -// targeting mouse cursor image -extern gStaticImage UsePtrImage; - -// red X mouse cursor image -extern gStaticImage XPointerImage; - -// arrow mouse cursor image -extern gStaticImage ArrowImage; - -// grab mouse cursor image -extern gStaticImage GrabPtrImage; - -// attack mouse cursor image -extern gStaticImage AttakPtrImage; - -// center actor combat turn indicator -extern gStaticImage CenterActorIndicatorImage; - -// Auto-walk mousr cursor image -extern gStaticImage AutoWalkImage; - -// Cursor images for turning book pages -extern gStaticImage PgUpImage; -extern gStaticImage PgLeftImage; -extern gStaticImage PgDownImage; -extern gStaticImage PgRightImage; - -} // end of namespace Saga2 - -#endif diff --git a/engines/saga2/module.mk b/engines/saga2/module.mk index 884a7bdb710..5d9108a0997 100644 --- a/engines/saga2/module.mk +++ b/engines/saga2/module.mk @@ -32,7 +32,6 @@ MODULE_OBJS := \ gtextbox.o \ hresmgr.o \ imagcach.o \ - images.o \ input.o \ interp.o \ intrface.o \ diff --git a/engines/saga2/mouseimg.cpp b/engines/saga2/mouseimg.cpp index bb3d1c4c187..2d0268df960 100644 --- a/engines/saga2/mouseimg.cpp +++ b/engines/saga2/mouseimg.cpp @@ -28,7 +28,6 @@ #include "saga2/blitters.h" #include "saga2/fta.h" #include "saga2/mouseimg.h" -#include "saga2/images.h" #include "saga2/panel.h" namespace Saga2 { @@ -39,12 +38,24 @@ const int gaugeWidth = 46, gaugeOneThird = gaugeWidth / 3, gaugeTwoThirds = gaugeWidth * 2 / 3; -/* ===================================================================== * - Imports - * ===================================================================== */ - extern gFont *mainFont; +extern uint8 *closeBx1ImageData; +extern uint8 *closeBx2ImageData; +extern uint8 *usePtrImageData; +extern uint8 *xPointerImageData; +extern uint8 *arrowImageData; +extern uint8 *grabPtrImageData; +extern uint8 *attakPtrImageData; +extern uint8 *centerActorIndicatorImageData; +extern uint8 *pgUpImageData; +extern uint8 *pgDownImageData; +extern uint8 *pgLeftImageData; +extern uint8 *pgRightImageData; +extern uint8 *autoWalkImageData; +extern uint8 *gaugeImageData; + + /* ===================================================================== * Globals * ===================================================================== */ @@ -55,7 +66,7 @@ static char mouseText[ maxMouseTextLen ] = { "" }; // Current mouse te static Point16 mouseImageOffset; // Hotspot on mouse image -static gPixelMap *mouseImage = &ArrowImage; // Current mouse cursor image +static gPixelMap *mouseImage = mouseCursors[kMouseArrowImage]; // Current mouse cursor image static gStaticImage textImage(0, 0, NULL), // Current mouse text image combinedImage(0, 0, NULL); // Combine mouse text @@ -77,42 +88,31 @@ static uint8 gaugeColorMapArray[ 3 ][ 7 ] = { { 0x00, 0x18, 0x83, 0x81, 0x86, 0x72, 0x39 }, // Red }; -static uint8 gaugeImageData[ gaugeImageWidth * gaugeImageHeight ] = { - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, // Row 0 - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, - - - 0x01, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, // Row 1 - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, - - - 0x01, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, // Row 2 - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x02, 0x01, - - - 0x01, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, // Row 3 - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x01, - - - 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, // Row 4 - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, +static struct MouseCurosrs { + uint8 **data; + int w; + int h; +} mouseCursorData[] = { + { &closeBx1ImageData, 12, 12 }, + { &closeBx2ImageData, 12, 12 }, + { &usePtrImageData, 15, 15 }, + { &xPointerImageData, 15, 15 }, + { &arrowImageData, 11, 17 }, + { &grabPtrImageData, 16, 13 }, + { &attakPtrImageData, 23, 23 }, + { ¢erActorIndicatorImageData, 9, 9 }, + { &pgUpImageData, 16, 16 }, + { &pgDownImageData, 16, 16 }, + { &pgLeftImageData, 16, 16 }, + { &pgRightImageData, 16, 16 }, + { &autoWalkImageData, 15, 15 }, + { &gaugeImageData, gaugeImageWidth, gaugeImageHeight } }; +gStaticImage *mouseCursors[kMouseMax]; + static uint8 gaugeImageBuffer[ gaugeImageWidth * gaugeImageHeight ]; -static gStaticImage gaugeImage( - gaugeImageWidth, - gaugeImageHeight, - gaugeImageBuffer); +static gStaticImage gaugeImage(gaugeImageWidth, gaugeImageHeight, gaugeImageBuffer); static bool showGauge = FALSE; @@ -123,6 +123,17 @@ static bool showGauge = FALSE; //----------------------------------------------------------------------- // Create a new bitmap of several images stacked on top of each other +void initCursors() { + for (int i = 0; i < kMouseMax; i++) + mouseCursors[i] = new gStaticImage(mouseCursorData[i].w, mouseCursorData[i].h, *mouseCursorData[i].data); +} + +void freeCursors() { + for (int i = 0; i < kMouseMax; i++) + delete mouseCursors[i]; +} + + void createStackedImage( gPixelMap *newImage, int *newImageCenter, @@ -194,7 +205,8 @@ inline void disposeStackedImage(gPixelMap *image) { // image. void cleanupMousePointer(void) { - if (combinedImage.data != NULL) disposeStackedImage(&combinedImage); + if (combinedImage.data != NULL) + disposeStackedImage(&combinedImage); } void setupMousePointer(void) { @@ -242,6 +254,10 @@ void setupMousePointer(void) { //----------------------------------------------------------------------- // Setup a new mouse cursor image +void setMouseImage(int id, int16 x, int16 y) { + setMouseImage(*mouseCursors[id], x, y); +} + void setMouseImage(gPixelMap &img, int16 x, int16 y) { if (mouseImage != &img || mouseImageOffset.x != x @@ -393,7 +409,7 @@ void setMouseGauge(int numerator, int denominator) { gaugeMap = x < gaugePos + 1 ? gaugeColorMap : gaugeGrayMap; gaugeImageBuffer[ gaugeImageIndex ] = - gaugeMap[ gaugeImageData[ gaugeImageIndex ] ]; + gaugeMap[mouseCursors[kMouseGaugeImage]->data[gaugeImageIndex] ]; gaugeImageIndex++; } diff --git a/engines/saga2/mouseimg.h b/engines/saga2/mouseimg.h index f9127d98e96..e3f97b8d59e 100644 --- a/engines/saga2/mouseimg.h +++ b/engines/saga2/mouseimg.h @@ -29,6 +29,29 @@ namespace Saga2 { +enum { + kMouseCloseBx1Image = 0, + kMouseCloseBx2Image, + kMouseUsePtrImage, + kMouseXPointerImage, + kMouseArrowImage, + kMouseGrabPtrImage, + kMouseAttakPtrImage, + kMouseCenterActorIndicatorImage, + kMousePgUpImage, + kMousePgDownImage, + kMousePgLeftImage, + kMousePgRightImage, + kMouseAutoWalkImage, + kMouseGaugeImage, + kMouseMax +}; + +extern gStaticImage *mouseCursors[kMouseMax]; + +// Set a new image for the mouse pointer +void setMouseImage(int id, int16 x, int16 y); + // Set a new image for the mouse pointer void setMouseImage(gPixelMap &img, int16 x, int16 y); @@ -42,6 +65,9 @@ void setMouseGauge(int numerator, int denominator); // Turn off the gauge on the mouse pointer void clearMouseGauge(void); +void initCursors(); +void freeCursors(); + } // end of namespace Saga2 #endif diff --git a/engines/saga2/saga2.cpp b/engines/saga2/saga2.cpp index a3175ac78a5..3bc789fee65 100644 --- a/engines/saga2/saga2.cpp +++ b/engines/saga2/saga2.cpp @@ -36,6 +36,7 @@ #include "saga2/std.h" #include "saga2/gdraw.h" +#include "saga2/mouseimg.h" namespace Saga2 { @@ -155,6 +156,20 @@ uint8 *loadingWindowData; uint8 *ColorMapRanges; +uint8 *closeBx1ImageData; +uint8 *closeBx2ImageData; +uint8 *usePtrImageData; +uint8 *xPointerImageData; +uint8 *arrowImageData; +uint8 *grabPtrImageData; +uint8 *attakPtrImageData; +uint8 *centerActorIndicatorImageData; +uint8 *pgUpImageData; +uint8 *pgDownImageData; +uint8 *pgLeftImageData; +uint8 *pgRightImageData; +uint8 *autoWalkImageData; +uint8 *gaugeImageData; static void loadFont(Common::File &file, gFont *font, uint32 offset) { file.seek(offset); @@ -181,10 +196,30 @@ struct dataChunks { uint32 offset; uint32 size; } chunks[] = { - { &loadingWindowPalette,0x004A2600, 1024 }, - { &loadingWindowData, 0x004A2A00, 307200 }, - { &ColorMapRanges, 0x004EDC20, 1584 }, - { NULL, 0, 0 } + { (uint8 **)&Onyx10Font, 0x004F7258, 0 }, + { (uint8 **)&Plate18Font, 0x004F7EE0, 0 }, + { (uint8 **)&Helv11Font, 0x004F9F30, 0 }, + { (uint8 **)&Amber13Font, 0x004FAC60, 0 }, + { (uint8 **)&ThinFix8Font, 0x004FC210, 0 }, + { (uint8 **)&Script10Font, 0x004FCD18, 0 }, + { &loadingWindowPalette, 0x004A2600, 1024 }, + { &loadingWindowData, 0x004A2A00, 307200 }, + { &ColorMapRanges, 0x004EDC20, 1584 }, + { &closeBx1ImageData, 0x004EE2B8, 144 }, + { &closeBx2ImageData, 0x004EE348, 144 }, + { &usePtrImageData, 0x004EE3D8, 232 }, + { &xPointerImageData, 0x004EE4C0, 232 }, + { &arrowImageData, 0x004EE5A8, 192 }, + { &grabPtrImageData, 0x004EE668, 208 }, + { &attakPtrImageData, 0x004EE738, 536 }, + { ¢erActorIndicatorImageData,0x004EE950, 96 }, + { &pgUpImageData, 0x004EE9B0, 256 }, + { &pgDownImageData, 0x004EEAB0, 256 }, + { &pgLeftImageData, 0x004EEBB0, 256 }, + { &pgRightImageData, 0x004EECB0, 256 }, + { &autoWalkImageData, 0x004EEDB0, 228 }, + { &gaugeImageData, 0x004EF257, 241 }, + { NULL, 0, 0 } }; void Saga2Engine::loadExeResources() { @@ -197,32 +232,29 @@ void Saga2Engine::loadExeResources() { if (exe.size() != 1093120) error("Incorrect FTA2WIN.EXE file size. Expected is 1093120"); - loadFont(exe, &Onyx10Font, 0x004F7258 - offset); - loadFont(exe, &Plate18Font, 0x004F7EE0 - offset); - loadFont(exe, &Helv11Font, 0x004F9F30 - offset); - loadFont(exe, &Amber13Font, 0x004FAC60 - offset); - loadFont(exe, &ThinFix8Font, 0x004FC210 - offset); - loadFont(exe, &Script10Font, 0x004FCD18 - offset); - for (int i = 0; chunks[i].ptr; i++) { - *chunks[i].ptr = (uint8 *)malloc(chunks[i].size); - exe.seek(chunks[i].offset - offset); - exe.read(*chunks[i].ptr, chunks[i].size); + if (chunks[i].size == 0) { // Font + loadFont(exe, (gFont *)chunks[i].ptr, chunks[i].offset - offset); + } else { + *chunks[i].ptr = (uint8 *)malloc(chunks[i].size); + exe.seek(chunks[i].offset - offset); + exe.read(*chunks[i].ptr, chunks[i].size); + } } + initCursors(); + exe.close(); } void Saga2Engine::freeExeResources() { - free(Onyx10Font.fontdata); - free(Plate18Font.fontdata); - free(Helv11Font.fontdata); - free(Amber13Font.fontdata); - free(ThinFix8Font.fontdata); - free(Script10Font.fontdata); + for (int i = 0; chunks[i].ptr; i++) + if (chunks[i].size == 0) // Font + free(((gFont *)chunks[i].ptr)->fontdata); + else + free(*chunks[i].ptr); - free(loadingWindowPalette); - free(loadingWindowData); + freeCursors(); } } // End of namespace Saga2 diff --git a/engines/saga2/tilemode.cpp b/engines/saga2/tilemode.cpp index 2e492a5a0c5..406f1351d47 100644 --- a/engines/saga2/tilemode.cpp +++ b/engines/saga2/tilemode.cpp @@ -42,7 +42,6 @@ #include "saga2/intrface.h" #include "saga2/dispnode.h" #include "saga2/uidialog.h" -#include "saga2/images.h" #include "saga2/config.h" #include "saga2/contain.h" #include "saga2/savefile.h" @@ -503,7 +502,8 @@ static void evalMouseState(void) { // the intention to walk to the mouse pointer if (interruptable) { mouseInfo.setIntent(GrabInfo::WalkTo); - if (tileMapControl->isSticky()) setMouseImage(AutoWalkImage, -8, -8); + if (tileMapControl->isSticky()) + setMouseImage(kMouseAutoWalkImage, -8, -8); walkToPos = tilePickPos; } } @@ -513,7 +513,8 @@ static void evalMouseState(void) { // Set the intention to walk to the mouse // pointer mouseInfo.setIntent(GrabInfo::WalkTo); - if (tileMapControl->isSticky()) setMouseImage(AutoWalkImage, -8, -8); + if (tileMapControl->isSticky()) + setMouseImage(kMouseAutoWalkImage, -8, -8); walkToPos = tilePickPos; } } else @@ -568,7 +569,8 @@ static void evalMouseState(void) { // Simply set the intention to walk to the mouse // pointer mouseInfo.setIntent(GrabInfo::WalkTo); - if (tileMapControl->isSticky()) setMouseImage(AutoWalkImage, -8, -8); + if (tileMapControl->isSticky()) + setMouseImage(kMouseAutoWalkImage, -8, -8); walkToPos = tilePickPos; } } @@ -965,7 +967,7 @@ void TileModeHandleKey(int16 key, int16 qual) { if (tileMapControl->isSticky()) { tileMapControl->setSticky(FALSE); mousePressed = FALSE; - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); evalMouseState(); } MotionTask::wait(*a); @@ -1383,7 +1385,7 @@ static APPFUNC(cmdClickTileMap) { MotionTask::useTAI(*a, *pickedTAI); } else { tileMapControl->setSticky(TRUE); - setMouseImage(AutoWalkImage, -8, -8); + setMouseImage(kMouseAutoWalkImage, -8, -8); mousePressed = TRUE; } break; @@ -1506,7 +1508,7 @@ gStickyDragControl::gStickyDragControl(gPanelList &list, const Rect16 &box, } void gStickyDragControl::deactivate(void) { - if (sticky) setMouseImage(ArrowImage, 0, 0); + if (sticky) setMouseImage(kMouseArrowImage, 0, 0); sticky = FALSE; gGenericControl::deactivate(); } @@ -1517,7 +1519,7 @@ void gStickyDragControl::deactivate(void) { //} bool gStickyDragControl::pointerHit(gPanelMessage &msg) { - if (sticky) setMouseImage(ArrowImage, 0, 0); + if (sticky) setMouseImage(kMouseArrowImage, 0, 0); sticky = FALSE; return gGenericControl::pointerHit(msg); } diff --git a/engines/saga2/towerfta.cpp b/engines/saga2/towerfta.cpp index c2ec4d6e858..25b82b7f048 100644 --- a/engines/saga2/towerfta.cpp +++ b/engines/saga2/towerfta.cpp @@ -35,7 +35,6 @@ #include "saga2/palette.h" #include "saga2/intrface.h" #include "saga2/mouseimg.h" -#include "saga2/images.h" #include "saga2/patrol.h" #include "saga2/weapons.h" #include "saga2/loadsave.h" @@ -332,7 +331,7 @@ TERMINATOR(termGUIMessagers) { INITIALIZER(initMousePointer) { //pointer.hide(); - setMouseImage(ArrowImage, 0, 0); + setMouseImage(kMouseArrowImage, 0, 0); return pointer.init(640, 480); }