From 47291cbf1df0747d68defd9ad5da1c5e4a657f02 Mon Sep 17 00:00:00 2001 From: elasota Date: Sun, 7 Jun 2020 19:36:53 -0400 Subject: [PATCH] Support custom pause and banner graphics --- GpApp/Banner.cpp | 10 +++++----- GpApp/Input.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GpApp/Banner.cpp b/GpApp/Banner.cpp index d9c1a74..0a6f813 100644 --- a/GpApp/Banner.cpp +++ b/GpApp/Banner.cpp @@ -62,17 +62,17 @@ void DrawBanner (Point *topLeft) topLeft->v = wholePage.top; partPage = wholePage; partPage.bottom = partPage.top + 190; - LoadScaledGraphic(workSrcMap, kBannerPageTopPICT, &partPage); + LoadScaledGraphicCustom(workSrcMap, kBannerPageTopPICT, &partPage); partPage = wholePage; partPage.top = partPage.bottom - 30; mapBounds = partPage; ZeroRectCorner(&mapBounds); theErr = CreateOffScreenGWorld(&tempMap, &mapBounds, kPreferredPixelFormat); - LoadGraphic(tempMap, kBannerPageBottomPICT); + LoadGraphicCustom(tempMap, kBannerPageBottomPICT); theErr = CreateOffScreenGWorld(&tempMask, &mapBounds, GpPixelFormats::kBW1); - LoadGraphic(tempMask, kBannerPageBottomMask); + LoadGraphicCustom(tempMask, kBannerPageBottomMask); CopyMask((BitMap *)*GetGWorldPixMap(tempMap), (BitMap *)*GetGWorldPixMap(tempMask), @@ -232,10 +232,10 @@ void DisplayStarsRemaining(void) NumToString((long)numStarsRemaining, theStr); if (numStarsRemaining < 2) - LoadScaledGraphic(surface, kStarRemainingPICT, &bounds); + LoadScaledGraphicCustom(surface, kStarRemainingPICT, &bounds); else { - LoadScaledGraphic(surface, kStarsRemainingPICT, &bounds); + LoadScaledGraphicCustom(surface, kStarsRemainingPICT, &bounds); const Point textPoint = Point::Create(bounds.left + 102 - (appFont->MeasurePStr(theStr) / 2), bounds.top + 23); ColorText(surface, textPoint, theStr, 4L, appFont); } diff --git a/GpApp/Input.cpp b/GpApp/Input.cpp index 3bec75c..9631903 100644 --- a/GpApp/Input.cpp +++ b/GpApp/Input.cpp @@ -88,9 +88,9 @@ void DoPause (void) QSetRect(&bounds, 0, 0, 214, 54); CenterRectInRect(&bounds, &houseRect); if (isEscPauseKey) - LoadScaledGraphic(surface, kEscPausePictID, &bounds); + LoadScaledGraphicCustom(surface, kEscPausePictID, &bounds); else - LoadScaledGraphic(surface, kTabPausePictID, &bounds); + LoadScaledGraphicCustom(surface, kTabPausePictID, &bounds); const KeyDownStates *theKeys = nullptr;