mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Clean up language so we can bundle source without getting dinged on age rating.
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
#include "WindowManager.h"
|
#include "WindowManager.h"
|
||||||
|
|
||||||
|
|
||||||
short BitchAboutColorDepth (void);
|
|
||||||
void HandleMouseEvent (const GpMouseInputEvent &, uint32_t);
|
void HandleMouseEvent (const GpMouseInputEvent &, uint32_t);
|
||||||
void HandleKeyEvent (const KeyDownStates &keyStates, const GpKeyboardInputEvent &);
|
void HandleKeyEvent (const KeyDownStates &keyStates, const GpKeyboardInputEvent &);
|
||||||
void HandleUpdateEvent (EventRecord *);
|
void HandleUpdateEvent (EventRecord *);
|
||||||
@@ -45,20 +44,6 @@ extern Boolean autoRoomEdit, newRoomNow, isPlayMusicIdle;
|
|||||||
|
|
||||||
|
|
||||||
//============================================================== Functions
|
//============================================================== Functions
|
||||||
//-------------------------------------------------------------- BitchAboutColorDepth
|
|
||||||
// Display a dialog that alerts the user that they have switched the bit<69>
|
|
||||||
// depth of the monitor under our noses. They must return it to previous.
|
|
||||||
|
|
||||||
short BitchAboutColorDepth (void)
|
|
||||||
{
|
|
||||||
#define kColorSwitchedAlert 1042
|
|
||||||
short sheSaid;
|
|
||||||
|
|
||||||
// CenterAlert(kColorSwitchedAlert);
|
|
||||||
sheSaid = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kColorSwitchedAlert, nullptr);
|
|
||||||
|
|
||||||
return (sheSaid);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------- HandleMouseEvent
|
//-------------------------------------------------------------- HandleMouseEvent
|
||||||
// Handle a mouse click event.
|
// Handle a mouse click event.
|
||||||
|
@@ -118,7 +118,7 @@ typedef struct
|
|||||||
Boolean wasEscPauseKey;
|
Boolean wasEscPauseKey;
|
||||||
Boolean wasDoAutoDemo, wasAutoScale;
|
Boolean wasDoAutoDemo, wasAutoScale;
|
||||||
Boolean wasDoBackground, wasHouseChecks;
|
Boolean wasDoBackground, wasHouseChecks;
|
||||||
Boolean wasPrettyMap, wasBitchDialogs;
|
Boolean wasPrettyMap, wasComplainDialogs;
|
||||||
Boolean wasUseICCProfile;
|
Boolean wasUseICCProfile;
|
||||||
} prefsInfo;
|
} prefsInfo;
|
||||||
|
|
||||||
|
@@ -461,7 +461,6 @@ void DumpTriggerSound (void);
|
|||||||
void InitSound (void);
|
void InitSound (void);
|
||||||
void KillSound (void);
|
void KillSound (void);
|
||||||
void TellHerNoSounds (void);
|
void TellHerNoSounds (void);
|
||||||
void BitchAboutSM3 (void);
|
|
||||||
|
|
||||||
void InitScoreboardMap (void); // --- StructuresInit.c
|
void InitScoreboardMap (void); // --- StructuresInit.c
|
||||||
void InitGliderMap (void);
|
void InitGliderMap (void);
|
||||||
|
@@ -71,7 +71,7 @@ extern Boolean isMusicOn, isSoundOn, isPlayMusicIdle, isHouseChecks;
|
|||||||
extern Boolean houseOpen, isDoColorFade, isEscPauseKey;
|
extern Boolean houseOpen, isDoColorFade, isEscPauseKey;
|
||||||
extern Boolean autoRoomEdit, doAutoDemo, doBackground;
|
extern Boolean autoRoomEdit, doAutoDemo, doBackground;
|
||||||
extern Boolean isMapOpen, isToolsOpen, isCoordOpen;
|
extern Boolean isMapOpen, isToolsOpen, isCoordOpen;
|
||||||
extern Boolean doPrettyMap, doBitchDialogs;
|
extern Boolean doPrettyMap, doComplainDialogs;
|
||||||
//extern Boolean didValidation;
|
//extern Boolean didValidation;
|
||||||
|
|
||||||
THandle<void> globalModulePrefs;
|
THandle<void> globalModulePrefs;
|
||||||
@@ -159,7 +159,7 @@ void ReadInPrefs (void)
|
|||||||
isUseICCProfile = thePrefs.wasUseICCProfile;
|
isUseICCProfile = thePrefs.wasUseICCProfile;
|
||||||
doBackground = thePrefs.wasDoBackground;
|
doBackground = thePrefs.wasDoBackground;
|
||||||
doPrettyMap = thePrefs.wasPrettyMap;
|
doPrettyMap = thePrefs.wasPrettyMap;
|
||||||
doBitchDialogs = thePrefs.wasBitchDialogs;
|
doComplainDialogs = thePrefs.wasComplainDialogs;
|
||||||
|
|
||||||
if (modulePrefs)
|
if (modulePrefs)
|
||||||
ApplyModulePrefs(&modulePrefs);
|
ApplyModulePrefs(&modulePrefs);
|
||||||
@@ -244,7 +244,7 @@ void ReadInPrefs (void)
|
|||||||
isUseICCProfile = true;
|
isUseICCProfile = true;
|
||||||
doBackground = false;
|
doBackground = false;
|
||||||
doPrettyMap = false;
|
doPrettyMap = false;
|
||||||
doBitchDialogs = true;
|
doComplainDialogs = true;
|
||||||
|
|
||||||
IGpDisplayDriver *displayDriver = PortabilityLayer::HostDisplayDriver::GetInstance();
|
IGpDisplayDriver *displayDriver = PortabilityLayer::HostDisplayDriver::GetInstance();
|
||||||
if (!displayDriver->IsFullScreen())
|
if (!displayDriver->IsFullScreen())
|
||||||
@@ -345,7 +345,7 @@ void WriteOutPrefs (void)
|
|||||||
thePrefs.wasUseICCProfile = isUseICCProfile;
|
thePrefs.wasUseICCProfile = isUseICCProfile;
|
||||||
thePrefs.wasDoBackground = doBackground;
|
thePrefs.wasDoBackground = doBackground;
|
||||||
thePrefs.wasPrettyMap = doPrettyMap;
|
thePrefs.wasPrettyMap = doPrettyMap;
|
||||||
thePrefs.wasBitchDialogs = doBitchDialogs;
|
thePrefs.wasComplainDialogs = doComplainDialogs;
|
||||||
|
|
||||||
THandle<void> modulePrefs;
|
THandle<void> modulePrefs;
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ short isMapH, isMapV, mapRoomsHigh, mapRoomsWide;
|
|||||||
short mapLeftRoom, mapTopRoom;
|
short mapLeftRoom, mapTopRoom;
|
||||||
Boolean isMapOpen, doPrettyMap;
|
Boolean isMapOpen, doPrettyMap;
|
||||||
|
|
||||||
extern Boolean doBitchDialogs;
|
extern Boolean doComplainDialogs;
|
||||||
|
|
||||||
|
|
||||||
//============================================================== Functions
|
//============================================================== Functions
|
||||||
@@ -651,7 +651,7 @@ void HandleMapClick (const GpMouseInputEvent &theEvent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (doBitchDialogs)
|
if (doComplainDialogs)
|
||||||
{
|
{
|
||||||
if (QueryNewRoom())
|
if (QueryNewRoom())
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ short numberRooms, thisRoomNumber, previousRoom;
|
|||||||
short leftThresh, rightThresh, lastBackground;
|
short leftThresh, rightThresh, lastBackground;
|
||||||
Boolean autoRoomEdit, newRoomNow, noRoomAtAll;
|
Boolean autoRoomEdit, newRoomNow, noRoomAtAll;
|
||||||
Boolean leftOpen, rightOpen, topOpen, bottomOpen;
|
Boolean leftOpen, rightOpen, topOpen, bottomOpen;
|
||||||
Boolean doBitchDialogs;
|
Boolean doComplainDialogs;
|
||||||
|
|
||||||
extern short tempTiles[];
|
extern short tempTiles[];
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ void UpdateOriginalArt (Dialog *);
|
|||||||
int16_t OriginalArtFilter (void *context, Dialog *dialog, const TimeTaggedVOSEvent *evt);
|
int16_t OriginalArtFilter (void *context, Dialog *dialog, const TimeTaggedVOSEvent *evt);
|
||||||
Boolean PictIDExists (short);
|
Boolean PictIDExists (short);
|
||||||
short GetFirstPICT (void);
|
short GetFirstPICT (void);
|
||||||
void BitchAboutPICTNotFound (void);
|
void ComplainAboutPICTNotFound (void);
|
||||||
|
|
||||||
|
|
||||||
Rect tileSrc, tileDest, tileSrcRect, editTETextBox;
|
Rect tileSrc, tileDest, tileSrcRect, editTETextBox;
|
||||||
@@ -441,7 +441,7 @@ void DoRoomInfo(void)
|
|||||||
// SetPort((GrafPtr)tileSrcMap);
|
// SetPort((GrafPtr)tileSrcMap);
|
||||||
if ((tempBack > kStars) && (!PictIDExists(tempBack)))
|
if ((tempBack > kStars) && (!PictIDExists(tempBack)))
|
||||||
{
|
{
|
||||||
BitchAboutPICTNotFound();
|
ComplainAboutPICTNotFound();
|
||||||
tempBack = kSimpleRoom;
|
tempBack = kSimpleRoom;
|
||||||
}
|
}
|
||||||
if ((tempBack == 2002) || (tempBack == 2011) ||
|
if ((tempBack == 2002) || (tempBack == 2011) ||
|
||||||
@@ -869,10 +869,10 @@ short GetFirstPICT (void)
|
|||||||
return resID;
|
return resID;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- BitchAboutPICTNotFound
|
//-------------------------------------------------------------- ComplainAboutPICTNotFound
|
||||||
|
|
||||||
#ifndef COMPILEDEMO
|
#ifndef COMPILEDEMO
|
||||||
void BitchAboutPICTNotFound (void)
|
void ComplainAboutPICTNotFound (void)
|
||||||
{
|
{
|
||||||
short hitWhat;
|
short hitWhat;
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
#define kDoBackgroundCheck 11
|
#define kDoBackgroundCheck 11
|
||||||
#define kDoErrorCheck 12
|
#define kDoErrorCheck 12
|
||||||
#define kDoPrettyMapCheck 13
|
#define kDoPrettyMapCheck 13
|
||||||
#define kDoBitchDlgsCheck 14
|
#define kDoComplainDlgsCheck 14
|
||||||
|
|
||||||
|
|
||||||
void SetBrainsToDefaults (Dialog *);
|
void SetBrainsToDefaults (Dialog *);
|
||||||
@@ -98,7 +98,7 @@ void SetAllDefaults (void);
|
|||||||
void FlashSettingsButton (DrawSurface *, short);
|
void FlashSettingsButton (DrawSurface *, short);
|
||||||
void UpdateSettingsMain (Dialog *);
|
void UpdateSettingsMain (Dialog *);
|
||||||
int16_t PrefsFilter(void *context, Dialog *dialog, const TimeTaggedVOSEvent *evt);
|
int16_t PrefsFilter(void *context, Dialog *dialog, const TimeTaggedVOSEvent *evt);
|
||||||
void BitchAboutChanges (void);
|
void ComplainAboutChanges (void);
|
||||||
void WriteOutPrefs (void);
|
void WriteOutPrefs (void);
|
||||||
|
|
||||||
|
|
||||||
@@ -109,11 +109,11 @@ long tempLeftMap, tempRightMap, tempBattMap, tempBandMap;
|
|||||||
short whichCtrl, wasDepthPref;
|
short whichCtrl, wasDepthPref;
|
||||||
Boolean wasFade, wasIdle, wasPlay, wasTransit, wasZooms, wasBackground;
|
Boolean wasFade, wasIdle, wasPlay, wasTransit, wasZooms, wasBackground;
|
||||||
Boolean wasEscPauseKey, wasDemos, wasAutoScale, wasUseICCProfile, nextRestartChange, wasErrorCheck, wasFullscreenPref, needResolutionReset;
|
Boolean wasEscPauseKey, wasDemos, wasAutoScale, wasUseICCProfile, nextRestartChange, wasErrorCheck, wasFullscreenPref, needResolutionReset;
|
||||||
Boolean wasPrettyMap, wasBitchDialogs;
|
Boolean wasPrettyMap, wasComplainDialogs;
|
||||||
|
|
||||||
extern short numNeighbors, isDepthPref, maxFiles, willMaxFiles;
|
extern short numNeighbors, isDepthPref, maxFiles, willMaxFiles;
|
||||||
extern Boolean isDoColorFade, isPlayMusicIdle, isAutoScale, isUseICCProfile;
|
extern Boolean isDoColorFade, isPlayMusicIdle, isAutoScale, isUseICCProfile;
|
||||||
extern Boolean isHouseChecks, doBitchDialogs;
|
extern Boolean isHouseChecks, doComplainDialogs;
|
||||||
extern Boolean isEscPauseKey, failedMusic, isSoundOn, doBackground;
|
extern Boolean isEscPauseKey, failedMusic, isSoundOn, doBackground;
|
||||||
extern Boolean isMusicOn, quickerTransitions, doAutoDemo;
|
extern Boolean isMusicOn, quickerTransitions, doAutoDemo;
|
||||||
extern Boolean changeLockStateOfHouse, saveHouseLocked, doPrettyMap;
|
extern Boolean changeLockStateOfHouse, saveHouseLocked, doPrettyMap;
|
||||||
@@ -135,14 +135,14 @@ void SetBrainsToDefaults (Dialog *theDialog)
|
|||||||
wasBackground = false;
|
wasBackground = false;
|
||||||
wasErrorCheck = true;
|
wasErrorCheck = true;
|
||||||
wasPrettyMap = true;
|
wasPrettyMap = true;
|
||||||
wasBitchDialogs = true;
|
wasComplainDialogs = true;
|
||||||
SetDialogItemValue(theDialog, kQuickTransitCheck, (short)wasTransit);
|
SetDialogItemValue(theDialog, kQuickTransitCheck, (short)wasTransit);
|
||||||
SetDialogItemValue(theDialog, kDoZoomsCheck, (short)wasZooms);
|
SetDialogItemValue(theDialog, kDoZoomsCheck, (short)wasZooms);
|
||||||
SetDialogItemValue(theDialog, kDoDemoCheck, (short)wasDemos);
|
SetDialogItemValue(theDialog, kDoDemoCheck, (short)wasDemos);
|
||||||
SetDialogItemValue(theDialog, kDoBackgroundCheck, (short)wasBackground);
|
SetDialogItemValue(theDialog, kDoBackgroundCheck, (short)wasBackground);
|
||||||
SetDialogItemValue(theDialog, kDoErrorCheck, (short)wasErrorCheck);
|
SetDialogItemValue(theDialog, kDoErrorCheck, (short)wasErrorCheck);
|
||||||
SetDialogItemValue(theDialog, kDoPrettyMapCheck, (short)wasPrettyMap);
|
SetDialogItemValue(theDialog, kDoPrettyMapCheck, (short)wasPrettyMap);
|
||||||
SetDialogItemValue(theDialog, kDoBitchDlgsCheck, (short)wasBitchDialogs);
|
SetDialogItemValue(theDialog, kDoComplainDlgsCheck, (short)wasComplainDialogs);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- UpdateSettingsBrains
|
//-------------------------------------------------------------- UpdateSettingsBrains
|
||||||
@@ -238,7 +238,7 @@ void DoBrainsPrefs (void)
|
|||||||
wasBackground = doBackground;
|
wasBackground = doBackground;
|
||||||
wasErrorCheck = isHouseChecks;
|
wasErrorCheck = isHouseChecks;
|
||||||
wasPrettyMap = doPrettyMap;
|
wasPrettyMap = doPrettyMap;
|
||||||
wasBitchDialogs = doBitchDialogs;
|
wasComplainDialogs = doComplainDialogs;
|
||||||
|
|
||||||
SetDialogItemValue(prefDlg, kQuickTransitCheck, (short)wasTransit);
|
SetDialogItemValue(prefDlg, kQuickTransitCheck, (short)wasTransit);
|
||||||
SetDialogItemValue(prefDlg, kDoZoomsCheck, (short)wasZooms);
|
SetDialogItemValue(prefDlg, kDoZoomsCheck, (short)wasZooms);
|
||||||
@@ -246,7 +246,7 @@ void DoBrainsPrefs (void)
|
|||||||
SetDialogItemValue(prefDlg, kDoBackgroundCheck, (short)wasBackground);
|
SetDialogItemValue(prefDlg, kDoBackgroundCheck, (short)wasBackground);
|
||||||
SetDialogItemValue(prefDlg, kDoErrorCheck, (short)wasErrorCheck);
|
SetDialogItemValue(prefDlg, kDoErrorCheck, (short)wasErrorCheck);
|
||||||
SetDialogItemValue(prefDlg, kDoPrettyMapCheck, (short)wasPrettyMap);
|
SetDialogItemValue(prefDlg, kDoPrettyMapCheck, (short)wasPrettyMap);
|
||||||
SetDialogItemValue(prefDlg, kDoBitchDlgsCheck, (short)wasBitchDialogs);
|
SetDialogItemValue(prefDlg, kDoComplainDlgsCheck, (short)wasComplainDialogs);
|
||||||
|
|
||||||
UpdateSettingsBrains(prefDlg);
|
UpdateSettingsBrains(prefDlg);
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ void DoBrainsPrefs (void)
|
|||||||
doBackground = wasBackground;
|
doBackground = wasBackground;
|
||||||
isHouseChecks = wasErrorCheck;
|
isHouseChecks = wasErrorCheck;
|
||||||
doPrettyMap = wasPrettyMap;
|
doPrettyMap = wasPrettyMap;
|
||||||
doBitchDialogs = wasBitchDialogs;
|
doComplainDialogs = wasComplainDialogs;
|
||||||
leaving = true;
|
leaving = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -315,9 +315,9 @@ void DoBrainsPrefs (void)
|
|||||||
SetDialogItemValue(prefDlg, kDoPrettyMapCheck, (short)wasPrettyMap);
|
SetDialogItemValue(prefDlg, kDoPrettyMapCheck, (short)wasPrettyMap);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kDoBitchDlgsCheck:
|
case kDoComplainDlgsCheck:
|
||||||
wasBitchDialogs = !wasBitchDialogs;
|
wasComplainDialogs = !wasComplainDialogs;
|
||||||
SetDialogItemValue(prefDlg, kDoBitchDlgsCheck, (short)wasBitchDialogs);
|
SetDialogItemValue(prefDlg, kDoComplainDlgsCheck, (short)wasComplainDialogs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1121,7 +1121,7 @@ void SetAllDefaults (void)
|
|||||||
doBackground = false;
|
doBackground = false;
|
||||||
isHouseChecks = true;
|
isHouseChecks = true;
|
||||||
doPrettyMap = true;
|
doPrettyMap = true;
|
||||||
doBitchDialogs = true;
|
doComplainDialogs = true;
|
||||||
// Default control settings
|
// Default control settings
|
||||||
PasStringCopy(PSTR("lf arrow"), leftName);
|
PasStringCopy(PSTR("lf arrow"), leftName);
|
||||||
PasStringCopy(PSTR("rt arrow"), rightName);
|
PasStringCopy(PSTR("rt arrow"), rightName);
|
||||||
@@ -1340,7 +1340,7 @@ void DoSettingsMain (void)
|
|||||||
|
|
||||||
if (nextRestartChange)
|
if (nextRestartChange)
|
||||||
{
|
{
|
||||||
BitchAboutChanges();
|
ComplainAboutChanges();
|
||||||
nextRestartChange = false;
|
nextRestartChange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1363,9 +1363,9 @@ void DoSettingsMain (void)
|
|||||||
WriteOutPrefs();
|
WriteOutPrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- BitchAboutChanges
|
//-------------------------------------------------------------- ComplainAboutChanges
|
||||||
|
|
||||||
void BitchAboutChanges (void)
|
void ComplainAboutChanges (void)
|
||||||
{
|
{
|
||||||
#define kChangesEffectAlert 1040
|
#define kChangesEffectAlert 1040
|
||||||
short hitWhat;
|
short hitWhat;
|
||||||
|
@@ -378,17 +378,6 @@ void TellHerNoSounds (void)
|
|||||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMemForSoundsAlert, nullptr);
|
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoMemForSoundsAlert, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------- BitchAboutSM3
|
|
||||||
|
|
||||||
void BitchAboutSM3 (void)
|
|
||||||
{
|
|
||||||
#define kNoSoundManager3Alert 1030
|
|
||||||
short hitWhat;
|
|
||||||
|
|
||||||
// CenterAlert(kNoSoundManager3Alert);
|
|
||||||
hitWhat = PortabilityLayer::DialogManager::GetInstance()->DisplayAlert(kNoSoundManager3Alert, nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------- ParseAndConvertSound
|
//-------------------------------------------------------------- ParseAndConvertSound
|
||||||
|
@@ -52,7 +52,7 @@ bool LZWDecompressor::ReadBytes(void *dest, size_t numBytes)
|
|||||||
symbolcounter++;
|
symbolcounter++;
|
||||||
if (symbol == 256 && blockmode)
|
if (symbol == 256 && blockmode)
|
||||||
{
|
{
|
||||||
// Skip garbage data after a clear. God damn, this is dumb.
|
// Skip garbage data after a clear.
|
||||||
int symbolsize = LZWSuggestedSymbolSize(lzw);
|
int symbolsize = LZWSuggestedSymbolSize(lzw);
|
||||||
if (symbolcounter % 8)
|
if (symbolcounter % 8)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user