Increase touchscreen control size

This commit is contained in:
elasota
2020-10-13 10:02:17 -04:00
parent c13677122c
commit 780f4842b0
16 changed files with 75 additions and 75 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -82,7 +82,7 @@ void NewGame (short mode)
Rect tempRect; Rect tempRect;
PLError_t theErr; PLError_t theErr;
Boolean wasPlayMusicPref; Boolean wasPlayMusicPref;
gameOver = false; gameOver = false;
theMode = kPlayMode; theMode = kPlayMode;
if (isPlayMusicGame) if (isPlayMusicGame)
@@ -112,7 +112,7 @@ void NewGame (short mode)
SetHouseToFirstRoom(); SetHouseToFirstRoom();
DetermineRoomOpenings(); DetermineRoomOpenings();
NilSavedMaps(); NilSavedMaps();
gameFrame = 0L; gameFrame = 0L;
numBands = 0; numBands = 0;
demoIndex = 0; demoIndex = 0;
@@ -120,7 +120,7 @@ void NewGame (short mode)
otherPlayerEscaped = kNoOneEscaped; otherPlayerEscaped = kNoOneEscaped;
onePlayerLeft = false; onePlayerLeft = false;
playerSuicide = false; playerSuicide = false;
if (twoPlayerGame) // initialize glider(s) if (twoPlayerGame) // initialize glider(s)
{ {
InitGlider(&theGlider, kNewGameMode); InitGlider(&theGlider, kNewGameMode);
@@ -134,7 +134,7 @@ void NewGame (short mode)
LoadGraphic(glidSrcMap, kGliderPictID); LoadGraphic(glidSrcMap, kGliderPictID);
LoadGraphic(glid2SrcMap, kGliderFoilPictID); LoadGraphic(glid2SrcMap, kGliderFoilPictID);
} }
#if !BUILD_ARCADE_VERSION #if !BUILD_ARCADE_VERSION
// HideMenuBarOld(); // TEMP // HideMenuBarOld(); // TEMP
#endif #endif
@@ -146,7 +146,7 @@ void NewGame (short mode)
tempRect = thisMac.constrainedScreen; tempRect = thisMac.constrainedScreen;
tempRect.top = tempRect.bottom - 20; // thisMac.menuHigh tempRect.top = tempRect.bottom - 20; // thisMac.menuHigh
mainWindowSurface->FillRect(tempRect, blackColorMain); mainWindowSurface->FillRect(tempRect, blackColorMain);
#ifdef COMPILEQT #ifdef COMPILEQT
if ((thisMac.hasQT) && (hasMovie)) if ((thisMac.hasQT) && (hasMovie))
{ {
@@ -160,9 +160,9 @@ void NewGame (short mode)
// DissBitsChunky(&workSrcRect); // DissBitsChunky(&workSrcRect);
// else // else
// DissBits(&workSrcRect); // DissBits(&workSrcRect);
// DebugStr("\pIf screen isn't black, exit to shell."); // TEMP TEMP TEMP // DebugStr("\pIf screen isn't black, exit to shell."); // TEMP TEMP TEMP
ResetLocale(false); ResetLocale(false);
RefreshScoreboard(kNormalTitleMode); RefreshScoreboard(kNormalTitleMode);
// if (quickerTransitions) // if (quickerTransitions)
@@ -183,7 +183,7 @@ void NewGame (short mode)
{ {
DumpScreenOn(&justRoomsRect, false); DumpScreenOn(&justRoomsRect, false);
} }
InitGarbageRects(); InitGarbageRects();
StartGliderFadingIn(&theGlider); StartGliderFadingIn(&theGlider);
if (twoPlayerGame) if (twoPlayerGame)
@@ -194,11 +194,11 @@ void NewGame (short mode)
} }
InitTelephone(); InitTelephone();
wasPlayMusicPref = isPlayMusicGame; wasPlayMusicPref = isPlayMusicGame;
#ifdef CREATEDEMODATA #ifdef CREATEDEMODATA
SysBeep(1); SysBeep(1);
#endif #endif
#ifdef COMPILEQT #ifdef COMPILEQT
if ((thisMac.hasQT) && (hasMovie) && (tvInRoom)) if ((thisMac.hasQT) && (hasMovie) && (tvInRoom))
{ {
@@ -210,17 +210,17 @@ void NewGame (short mode)
} }
} }
#endif #endif
playing = true; // everything before this line is game set-up playing = true; // everything before this line is game set-up
PlayGame(); // everything following is after a game has ended PlayGame(); // everything following is after a game has ended
#ifdef CREATEDEMODATA #ifdef CREATEDEMODATA
DumpToResEditFile((Ptr)demoData, sizeof(demoType) * (long)demoIndex); DumpToResEditFile((Ptr)demoData, sizeof(demoType) * (long)demoIndex);
#endif #endif
isPlayMusicGame = wasPlayMusicPref; isPlayMusicGame = wasPlayMusicPref;
ZeroMirrorRegion(); ZeroMirrorRegion();
#ifdef COMPILEQT #ifdef COMPILEQT
if ((thisMac.hasQT) && (hasMovie) && (tvInRoom)) if ((thisMac.hasQT) && (hasMovie) && (tvInRoom))
{ {
@@ -228,7 +228,7 @@ void NewGame (short mode)
theMovie.m_playing = false; theMovie.m_playing = false;
} }
#endif #endif
twoPlayerGame = false; twoPlayerGame = false;
theMode = kSplashMode; theMode = kSplashMode;
InitCursor(); InitCursor();
@@ -253,7 +253,7 @@ void NewGame (short mode)
NilSavedMaps(); NilSavedMaps();
UpdateMenus(false); UpdateMenus(false);
if (!gameOver) if (!gameOver)
{ {
RedrawSplashScreen(); RedrawSplashScreen();
@@ -269,7 +269,7 @@ void DoDemoGame (void)
{ {
short wasHouseIndex; short wasHouseIndex;
Boolean whoCares; Boolean whoCares;
wasHouseIndex = thisHouseIndex; wasHouseIndex = thisHouseIndex;
whoCares = CloseHouse(); whoCares = CloseHouse();
thisHouseIndex = demoHouseIndex; thisHouseIndex = demoHouseIndex;
@@ -291,14 +291,14 @@ void DoDemoGame (void)
//-------------------------------------------------------------- InitGlider //-------------------------------------------------------------- InitGlider
void InitGlider (gliderPtr thisGlider, short mode) void InitGlider (gliderPtr thisGlider, short mode)
{ {
WhereDoesGliderBegin(&thisGlider->dest, mode); WhereDoesGliderBegin(&thisGlider->dest, mode);
if (mode == kResumeGameMode) if (mode == kResumeGameMode)
numStarsRemaining = smallGame.wasStarsLeft; numStarsRemaining = smallGame.wasStarsLeft;
else if (mode == kNewGameMode) else if (mode == kNewGameMode)
numStarsRemaining = CountStarsInHouse(); numStarsRemaining = CountStarsInHouse();
if (mode == kResumeGameMode) if (mode == kResumeGameMode)
{ {
theScore = smallGame.score; theScore = smallGame.score;
@@ -309,13 +309,13 @@ void InitGlider (gliderPtr thisGlider, short mode)
thisGlider->mode = smallGame.gliderState; thisGlider->mode = smallGame.gliderState;
thisGlider->facing = smallGame.facing; thisGlider->facing = smallGame.facing;
showFoil = smallGame.showFoil; showFoil = smallGame.showFoil;
switch (thisGlider->mode) switch (thisGlider->mode)
{ {
case kGliderBurning: case kGliderBurning:
FlagGliderBurning(thisGlider); FlagGliderBurning(thisGlider);
break; break;
default: default:
FlagGliderNormal(thisGlider); FlagGliderNormal(thisGlider);
break; break;
@@ -336,16 +336,16 @@ void InitGlider (gliderPtr thisGlider, short mode)
thisGlider->mask = gliderSrc[0]; thisGlider->mask = gliderSrc[0];
showFoil = false; showFoil = false;
} }
QSetRect(&thisGlider->destShadow, 0, 0, kGliderWide, kShadowHigh); QSetRect(&thisGlider->destShadow, 0, 0, kGliderWide, kShadowHigh);
QOffsetRect(&thisGlider->destShadow, thisGlider->dest.left, kShadowTop); QOffsetRect(&thisGlider->destShadow, thisGlider->dest.left, kShadowTop);
thisGlider->wholeShadow = thisGlider->destShadow; thisGlider->wholeShadow = thisGlider->destShadow;
thisGlider->hVel = 0; thisGlider->hVel = 0;
thisGlider->vVel = 0; thisGlider->vVel = 0;
thisGlider->hDesiredVel = 0; thisGlider->hDesiredVel = 0;
thisGlider->vDesiredVel = 0; thisGlider->vDesiredVel = 0;
thisGlider->tipped = false; thisGlider->tipped = false;
thisGlider->sliding = false; thisGlider->sliding = false;
thisGlider->dontDraw = false; thisGlider->dontDraw = false;
@@ -356,7 +356,7 @@ void InitGlider (gliderPtr thisGlider, short mode)
void SetHouseToFirstRoom (void) void SetHouseToFirstRoom (void)
{ {
short firstRoom; short firstRoom;
firstRoom = GetFirstRoomNumber(); firstRoom = GetFirstRoomNumber();
ForceThisRoom(firstRoom); ForceThisRoom(firstRoom);
} }
@@ -514,7 +514,7 @@ void HandleInGameEvents(void)
//-------------------------------------------------------------- ResetTouchScreenControlBounds //-------------------------------------------------------------- ResetTouchScreenControlBounds
static int16_t touchScreenControlSize = 32; static int16_t touchScreenControlSize = 64;
void ResetTouchScreenControlBounds (void) void ResetTouchScreenControlBounds (void)
{ {
@@ -601,14 +601,14 @@ void PlayGame (void)
gameFrame++; gameFrame++;
evenFrame = !evenFrame; evenFrame = !evenFrame;
if (doBackground) if (doBackground)
{ {
Delay(2, nil); Delay(2, nil);
} }
HandleTelephone(); HandleTelephone();
if (twoPlayerGame) if (twoPlayerGame)
{ {
HandleDynamics(); HandleDynamics();
@@ -660,7 +660,7 @@ void PlayGame (void)
HandleDynamicScoreboard(); HandleDynamicScoreboard();
} }
} }
if (gameOver) if (gameOver)
{ {
countDown--; countDown--;
@@ -668,22 +668,22 @@ void PlayGame (void)
{ {
HideGlider(&theGlider); HideGlider(&theGlider);
RefreshScoreboard(kNormalTitleMode); RefreshScoreboard(kNormalTitleMode);
#if BUILD_ARCADE_VERSION #if BUILD_ARCADE_VERSION
// Need to paint over the scoreboard black. // Need to paint over the scoreboard black.
boardSrcMap->SetForeColor(StdColors::Black()); boardSrcMap->SetForeColor(StdColors::Black());
boardSrcMap->FillRect(boardSrcRect); boardSrcMap->FillRect(boardSrcRect);
CopyBits((BitMap *)*GetGWorldPixMap(boardSrcMap), CopyBits((BitMap *)*GetGWorldPixMap(boardSrcMap),
GetPortBitMapForCopyBits(GetWindowPort(boardWindow)), GetPortBitMapForCopyBits(GetWindowPort(boardWindow)),
&boardSrcRect, &boardDestRect, srcCopy); &boardSrcRect, &boardDestRect, srcCopy);
{ {
Rect bounds; Rect bounds;
THandle<Picture> thePicture; THandle<Picture> thePicture;
SInt16 hOffset; SInt16 hOffset;
if (boardSrcRect.right >= 640) if (boardSrcRect.right >= 640)
hOffset = (RectWide(&boardSrcRect) - kMaxViewWidth) / 2; hOffset = (RectWide(&boardSrcRect) - kMaxViewWidth) / 2;
else else
@@ -700,7 +700,7 @@ void PlayGame (void)
#else #else
// ShowMenuBarOld(); // TEMP // ShowMenuBarOld(); // TEMP
#endif #endif
if (mortals < 0) if (mortals < 0)
DoDiedGameOver(); DoDiedGameOver();
else else
@@ -708,21 +708,21 @@ void PlayGame (void)
} }
} }
} }
#if BUILD_ARCADE_VERSION #if BUILD_ARCADE_VERSION
{ {
DrawSurface *wasCPort = GetGraphicsPort(); DrawSurface *wasCPort = GetGraphicsPort();
boardSrcMap->SetForeColor(StdColors::Black()); boardSrcMap->SetForeColor(StdColors::Black());
boardSrcMap->FillRect(boardSrcRect); boardSrcMap->FillRect(boardSrcRect);
CopyBits((BitMap *)*GetGWorldPixMap(boardSrcMap), CopyBits((BitMap *)*GetGWorldPixMap(boardSrcMap),
GetPortBitMapForCopyBits(GetWindowPort(boardWindow)), GetPortBitMapForCopyBits(GetWindowPort(boardWindow)),
&boardSrcRect, &boardDestRect, srcCopy); &boardSrcRect, &boardDestRect, srcCopy);
SetGraphicsPort(wasCPort); SetGraphicsPort(wasCPort);
} }
{ {
Rect bounds; Rect bounds;
THandle<Picture> thePicture; THandle<Picture> thePicture;
@@ -741,11 +741,11 @@ void PlayGame (void)
boardSrcMap->DrawPicture(thePicture, bounds); boardSrcMap->DrawPicture(thePicture, bounds);
thePicture.Dispose(); thePicture.Dispose();
} }
#else #else
// ShowMenuBarOld(); // TEMP // ShowMenuBarOld(); // TEMP
#endif #endif
} }
@@ -758,11 +758,11 @@ void SetObjectsToDefaults (void)
short r, i; short r, i;
char wasState; char wasState;
Boolean initState; Boolean initState;
thisHousePtr = *thisHouse; thisHousePtr = *thisHouse;
numRooms = thisHousePtr->nRooms; numRooms = thisHousePtr->nRooms;
for (r = 0; r < numRooms; r++) for (r = 0; r < numRooms; r++)
{ {
thisHousePtr->rooms[r].visited = false; thisHousePtr->rooms[r].visited = false;
@@ -781,10 +781,10 @@ void SetObjectsToDefaults (void)
case kGrecoVent: case kGrecoVent:
case kSewerBlower: case kSewerBlower:
case kLiftArea: case kLiftArea:
thisHousePtr->rooms[r].objects[i].data.a.state = thisHousePtr->rooms[r].objects[i].data.a.state =
thisHousePtr->rooms[r].objects[i].data.a.initial; thisHousePtr->rooms[r].objects[i].data.a.initial;
break; break;
case kRedClock: case kRedClock:
case kBlueClock: case kBlueClock:
case kYellowClock: case kYellowClock:
@@ -799,16 +799,16 @@ void SetObjectsToDefaults (void)
case kStar: case kStar:
case kSparkle: case kSparkle:
case kHelium: case kHelium:
thisHousePtr->rooms[r].objects[i].data.c.state = thisHousePtr->rooms[r].objects[i].data.c.state =
thisHousePtr->rooms[r].objects[i].data.c.initial; thisHousePtr->rooms[r].objects[i].data.c.initial;
break; break;
case kDeluxeTrans: case kDeluxeTrans:
initState = (thisHousePtr->rooms[r].objects[i].data.d.wide & 0xF0) >> 4; initState = (thisHousePtr->rooms[r].objects[i].data.d.wide & 0xF0) >> 4;
thisHousePtr->rooms[r].objects[i].data.d.wide &= 0xF0; thisHousePtr->rooms[r].objects[i].data.d.wide &= 0xF0;
thisHousePtr->rooms[r].objects[i].data.d.wide += initState; thisHousePtr->rooms[r].objects[i].data.d.wide += initState;
break; break;
case kCeilingLight: case kCeilingLight:
case kLightBulb: case kLightBulb:
case kTableLamp: case kTableLamp:
@@ -817,14 +817,14 @@ void SetObjectsToDefaults (void)
case kFlourescent: case kFlourescent:
case kTrackLight: case kTrackLight:
case kInvisLight: case kInvisLight:
thisHousePtr->rooms[r].objects[i].data.f.state = thisHousePtr->rooms[r].objects[i].data.f.state =
thisHousePtr->rooms[r].objects[i].data.f.initial; thisHousePtr->rooms[r].objects[i].data.f.initial;
break; break;
case kStereo: case kStereo:
thisHousePtr->rooms[r].objects[i].data.g.state = isPlayMusicGame; thisHousePtr->rooms[r].objects[i].data.g.state = isPlayMusicGame;
break; break;
case kShredder: case kShredder:
case kToaster: case kToaster:
case kMacPlus: case kMacPlus:
@@ -834,10 +834,10 @@ void SetObjectsToDefaults (void)
case kOutlet: case kOutlet:
case kVCR: case kVCR:
case kMicrowave: case kMicrowave:
thisHousePtr->rooms[r].objects[i].data.g.state = thisHousePtr->rooms[r].objects[i].data.g.state =
thisHousePtr->rooms[r].objects[i].data.g.initial; thisHousePtr->rooms[r].objects[i].data.g.initial;
break; break;
case kBalloon: case kBalloon:
case kCopterLf: case kCopterLf:
case kCopterRt: case kCopterRt:
@@ -846,10 +846,10 @@ void SetObjectsToDefaults (void)
case kBall: case kBall:
case kDrip: case kDrip:
case kFish: case kFish:
thisHousePtr->rooms[r].objects[i].data.h.state = thisHousePtr->rooms[r].objects[i].data.h.state =
thisHousePtr->rooms[r].objects[i].data.h.initial; thisHousePtr->rooms[r].objects[i].data.h.initial;
break; break;
} }
} }
} }
@@ -860,17 +860,17 @@ void SetObjectsToDefaults (void)
void HideGlider (gliderPtr thisGlider) void HideGlider (gliderPtr thisGlider)
{ {
Rect tempRect; Rect tempRect;
tempRect = thisGlider->whole; tempRect = thisGlider->whole;
QOffsetRect(&tempRect, playOriginH, playOriginV); QOffsetRect(&tempRect, playOriginH, playOriginV);
CopyRectWorkToMain(&tempRect); CopyRectWorkToMain(&tempRect);
if (hasMirror) if (hasMirror)
{ {
QOffsetRect(&tempRect, -20, -16); QOffsetRect(&tempRect, -20, -16);
CopyRectWorkToMain(&tempRect); CopyRectWorkToMain(&tempRect);
} }
tempRect = thisGlider->wholeShadow; tempRect = thisGlider->wholeShadow;
QOffsetRect(&tempRect, playOriginH, playOriginV); QOffsetRect(&tempRect, playOriginH, playOriginV);
CopyRectWorkToMain(&tempRect); CopyRectWorkToMain(&tempRect);
@@ -883,7 +883,7 @@ void InitTelephone (void)
thePhone.nextRing = RandomInt(kRingSpread) + kRingBaseDelay; thePhone.nextRing = RandomInt(kRingSpread) + kRingBaseDelay;
thePhone.rings = RandomInt(3) + 3; thePhone.rings = RandomInt(3) + 3;
thePhone.delay = kRingDelay; thePhone.delay = kRingDelay;
theChimes.nextRing = RandomInt(kChimeDelay) + 1; theChimes.nextRing = RandomInt(kChimeDelay) + 1;
} }
@@ -892,7 +892,7 @@ void InitTelephone (void)
void HandleTelephone (void) void HandleTelephone (void)
{ {
short delayTime; short delayTime;
if (!phoneBitSet) if (!phoneBitSet)
{ {
if (thePhone.nextRing == 0) if (thePhone.nextRing == 0)
@@ -915,7 +915,7 @@ void HandleTelephone (void)
thePhone.nextRing--; thePhone.nextRing--;
} }
// handle also the wind chimes (if they are present) // handle also the wind chimes (if they are present)
if (numChimes > 0) if (numChimes > 0)
{ {
if (theChimes.nextRing == 0) if (theChimes.nextRing == 0)
@@ -924,11 +924,11 @@ void HandleTelephone (void)
PlayPrioritySound(kChime1Sound, kChime1Priority); PlayPrioritySound(kChime1Sound, kChime1Priority);
else else
PlayPrioritySound(kChime2Sound, kChime2Priority); PlayPrioritySound(kChime2Sound, kChime2Priority);
delayTime = kChimeDelay / numChimes; delayTime = kChimeDelay / numChimes;
if (delayTime < 2) if (delayTime < 2)
delayTime = 2; delayTime = 2;
theChimes.nextRing = RandomInt(delayTime) + 1; theChimes.nextRing = RandomInt(delayTime) + 1;
} }
else else
@@ -948,19 +948,19 @@ void StrikeChime (void)
void RestoreEntireGameScreen (void) void RestoreEntireGameScreen (void)
{ {
Rect tempRect; Rect tempRect;
HideCursor(); HideCursor();
#if !BUILD_ARCADE_VERSION #if !BUILD_ARCADE_VERSION
// HideMenuBarOld(); // TEMP // HideMenuBarOld(); // TEMP
#endif #endif
DrawSurface *surface = mainWindow->GetDrawSurface(); DrawSurface *surface = mainWindow->GetDrawSurface();
tempRect = thisMac.constrainedScreen; tempRect = thisMac.constrainedScreen;
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black(); PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
surface->FillRect(tempRect, blackColor); surface->FillRect(tempRect, blackColor);
ResetLocale(false); ResetLocale(false);
RefreshScoreboard(kNormalTitleMode); RefreshScoreboard(kNormalTitleMode);
// if (quickerTransitions) // if (quickerTransitions)