mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Clean out unused API
This commit is contained in:
@@ -152,7 +152,6 @@ void OpenCoordWindow (void)
|
||||
wm->PutWindowBehind(coordWindow, wm->GetPutInFrontSentinel());
|
||||
PortabilityLayer::WindowManager::GetInstance()->ShowWindow(coordWindow);
|
||||
// FlagWindowFloating(coordWindow); TEMP - use flaoting windows
|
||||
HiliteAllWindows();
|
||||
|
||||
coordH = -1;
|
||||
coordV = -1;
|
||||
|
@@ -92,7 +92,6 @@ void HandleMouseEvent (const GpMouseInputEvent &theEvent, uint32_t tick)
|
||||
GetWindowLeftTop(whichWindow, &isLinkH, &isLinkV);
|
||||
else if (whichWindow == coordWindow)
|
||||
GetWindowLeftTop(whichWindow, &isCoordH, &isCoordV);
|
||||
HiliteAllWindows();
|
||||
break;
|
||||
|
||||
case RegionIDs::kClose:
|
||||
@@ -507,28 +506,6 @@ void HandleEvent (void)
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- HiliteAllWindows
|
||||
|
||||
// Ugly kludge in order to keep "floating windows" (palettes) on top of<6F>
|
||||
// the main window.
|
||||
|
||||
void HiliteAllWindows (void)
|
||||
{
|
||||
PL_NotYetImplemented_TODO("DeleteMe");
|
||||
#if 0
|
||||
if (mainWindow != nil)
|
||||
HiliteWindow(mainWindow, true);
|
||||
if (mapWindow != nil)
|
||||
HiliteWindow(mapWindow, true);
|
||||
if (toolsWindow != nil)
|
||||
HiliteWindow(toolsWindow, true);
|
||||
if (coordWindow != nil)
|
||||
HiliteWindow(coordWindow, true);
|
||||
if (linkWindow != nil)
|
||||
HiliteWindow(linkWindow, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- IgnoreThisClick
|
||||
|
||||
// Another inelegant kludge designed to temporarily prevent an unwanted<65>
|
||||
|
@@ -162,7 +162,6 @@ void FillScreenRed (void);
|
||||
void DumpToResEditFile (Ptr, long);
|
||||
|
||||
void HandleEvent (void); // --- Event.c
|
||||
void HiliteAllWindows (void);
|
||||
void IgnoreThisClick (void);
|
||||
|
||||
short WhatsOurDepth (void); // --- Environs.c
|
||||
|
@@ -238,7 +238,6 @@ void OpenLinkWindow (void)
|
||||
GetWindowRect(linkWindow, &dest);
|
||||
PortabilityLayer::WindowManager::GetInstance()->ShowWindow(linkWindow);
|
||||
// FlagWindowFloating(linkWindow); TEMP - use flaoting windows
|
||||
HiliteAllWindows();
|
||||
|
||||
PortabilityLayer::WidgetBasicState basicState;
|
||||
basicState.m_rect = Rect::Create(5, 70, 25, 124);
|
||||
|
103
GpApp/Menu.cpp
103
GpApp/Menu.cpp
@@ -29,9 +29,6 @@ void UpdateMenusEditMode (void);
|
||||
void UpdateMenusNonEditMode (void);
|
||||
void UpdateMenusHouseOpen (void);
|
||||
void UpdateMenusHouseClosed (void);
|
||||
void UpdateResumeDialog (Dialog *);
|
||||
Boolean ResumeFilter (Dialog *, EventRecord *, short *);
|
||||
short QueryResumeGame (void);
|
||||
void HeyYourPissingAHighScore (void);
|
||||
|
||||
|
||||
@@ -666,106 +663,6 @@ void UpdateCoordinateCheckmark (Boolean checkIt)
|
||||
CheckMenuItem(houseMenu, iCoordinateWindow, checkIt);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- UpdateResumeDialog
|
||||
// Update function for Resume dialog (below).
|
||||
|
||||
void UpdateResumeDialog (Dialog *theDialog)
|
||||
{
|
||||
DrawDialog(theDialog);
|
||||
DrawDefaultButton(theDialog);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- ResumeFilter
|
||||
// Dialog filter for the Resume dialog (below).
|
||||
|
||||
Boolean ResumeFilter (Dialog *dial, EventRecord *event, short *item)
|
||||
{
|
||||
switch (event->what)
|
||||
{
|
||||
case keyDown:
|
||||
switch (event->message)
|
||||
{
|
||||
case PL_KEY_SPECIAL(kEnter):
|
||||
case PL_KEY_NUMPAD_SPECIAL(kEnter):
|
||||
FlashDialogButton(dial, kOkayButton);
|
||||
*item = kOkayButton;
|
||||
return(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
return(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case updateEvt:
|
||||
if ((WindowPtr)event->message == dial->GetWindow())
|
||||
{
|
||||
SetPortDialogPort(dial);
|
||||
UpdateResumeDialog(dial);
|
||||
EndUpdate(dial->GetWindow());
|
||||
event->what = nullEvent;
|
||||
}
|
||||
return(false);
|
||||
break;
|
||||
|
||||
default:
|
||||
return(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- QueryResumeGame
|
||||
// Dialog that asks user whether they want to resume a saved game or<6F>
|
||||
// begin a new one. It displays a little info on the state of their<69>
|
||||
// saved game (number of glider left, points, etc.).
|
||||
|
||||
short QueryResumeGame (void)
|
||||
{
|
||||
#define kResumeGameDial 1025
|
||||
Dialog *theDial;
|
||||
houseType *thisHousePtr;
|
||||
Str255 scoreStr, glidStr;
|
||||
long hadPoints;
|
||||
short hitWhat, hadGliders;
|
||||
char wasState;
|
||||
Boolean leaving;
|
||||
|
||||
// get score & num. gliders
|
||||
thisHousePtr = *thisHouse;
|
||||
hadPoints = thisHousePtr->savedGame.score;
|
||||
hadGliders = thisHousePtr->savedGame.numGliders;
|
||||
NumToString(hadPoints, scoreStr); // param text strings
|
||||
NumToString((long)hadGliders, glidStr);
|
||||
|
||||
DialogTextSubstitutions substitutions;
|
||||
if (hadGliders == 1)
|
||||
substitutions = DialogTextSubstitutions(glidStr, PSTR(""), scoreStr);
|
||||
else
|
||||
substitutions = DialogTextSubstitutions(glidStr, PSTR("s"), scoreStr);
|
||||
|
||||
// CenterDialog(kResumeGameDial);
|
||||
theDial = PortabilityLayer::DialogManager::GetInstance()->LoadDialog(kResumeGameDial, kPutInFront, &substitutions);
|
||||
if (theDial == nil)
|
||||
RedAlert(kErrDialogDidntLoad);
|
||||
SetPort(&theDial->GetWindow()->GetDrawSurface()->m_port);
|
||||
|
||||
ShowWindow(theDial->GetWindow());
|
||||
DrawDefaultButton(theDial);
|
||||
leaving = false;
|
||||
|
||||
while (!leaving)
|
||||
{
|
||||
ModalDialog(ResumeFilter, &hitWhat);
|
||||
if ((hitWhat == kSheWantsNewGame) || (hitWhat == kSheWantsResumeGame))
|
||||
{
|
||||
leaving = true;
|
||||
}
|
||||
}
|
||||
theDial->Destroy();
|
||||
|
||||
return (hitWhat);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- DoNotInDemo
|
||||
// Only compiled for "demo version" of Glider PRO. It brings up a<>
|
||||
// dialog that says, essentially, "x" feature is not implemented in<69>
|
||||
|
@@ -76,7 +76,7 @@ void UpdateLoadDialog (Dialog *theDialog)
|
||||
theWindow = theDialog->GetWindow();
|
||||
DrawSurface *surface = theWindow->GetDrawSurface();
|
||||
|
||||
GetWindowBounds(theWindow, kWindowContentRgn, &dialogRect);
|
||||
dialogRect = theWindow->GetDrawSurface()->m_port.GetRect();
|
||||
|
||||
ColorFrameWHRect(theDialog->GetWindow()->GetDrawSurface(), 8, 39, 413, 184, kRedOrangeColor8); // box around files
|
||||
|
||||
|
@@ -319,7 +319,6 @@ void OpenToolsWindow (void)
|
||||
wm->PutWindowBehind(toolsWindow, wm->GetPutInFrontSentinel());
|
||||
wm->ShowWindow(toolsWindow);
|
||||
// FlagWindowFloating(toolsWindow); TEMP - use flaoting windows
|
||||
HiliteAllWindows();
|
||||
|
||||
{
|
||||
PortabilityLayer::WidgetBasicState state;
|
||||
|
@@ -63,7 +63,7 @@ void GetLocalWindowRect (WindowPtr theWindow, Rect *bounds)
|
||||
if (theWindow != nil)
|
||||
{
|
||||
SetPortWindowPort(theWindow);
|
||||
GetWindowBounds(theWindow, kWindowContentRgn, bounds);
|
||||
*bounds = theWindow->GetDrawSurface()->m_port.GetRect();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user