mirror of
https://github.com/softdorothy/GliderPRO.git
synced 2024-11-26 02:49:20 +00:00
1 line
34 KiB
C
1 line
34 KiB
C
|
//============================================================================
//----------------------------------------------------------------------------
// Settings.c
//----------------------------------------------------------------------------
//============================================================================
#include <Sound.h>
#include <TextUtils.h>
#include "DialogUtils.h"
#include "Externs.h"
#include "Environ.h"
#include "House.h"
#define kMainPrefsDialID 1012
#define kDisplayPrefsDialID 1017
#define kSoundPrefsDialID 1018
#define kControlPrefsDialID 1023
#define kBrainsPrefsDialID 1024
#define kDisplayButton 3
#define kSoundButton 4
#define kControlsButton 5
#define kBrainsButton 6
#define kDisplay1Item 3
#define kDisplay3Item 4
#define kDisplay9Item 5
#define kDoColorFadeItem 9
#define kCurrentDepth 10
#define k256Depth 11
#define k16Depth 12
#define kDispDefault 15
#define kUseQDItem 16
#define kUseScreen2Item 17
#define kSofterItem 4
#define kLouderItem 5
#define kVolNumberItem 7
#define kIdleMusicItem 8
#define kPlayMusicItem 9
#define kSoundDefault 13
#define kRightControl 5
#define kLeftControl 6
#define kBattControl 7
#define kBandControl 8
#define kControlDefaults 13
#define kESCPausesRadio 14
#define kTABPausesRadio 15
#define kMaxFilesItem 5
#define kQuickTransitCheck 7
#define kDoZoomsCheck 8
#define kBrainsDefault 9
#define kDoDemoCheck 10
#define kDoBackgroundCheck 11
#define kDoErrorCheck 12
#define kDoPrettyMapCheck 13
#define kDoBitchDlgsCheck 14
void SetBrainsToDefaults (DialogPtr);
void UpdateSettingsBrains (DialogPtr);
pascal Boolean BrainsFilter (DialogPtr, EventRecord *, short *);
void DoBrainsPrefs (void);
void SetControlsToDefaults (DialogPtr);
void UpdateControlKeyName (DialogPtr);
void UpdateSettingsControl (DialogPtr);
pascal Boolean ControlFilter (DialogPtr, EventRecord *, short *);
void DoControlPrefs (void);
void SoundDefaults (DialogPtr);
void UpdateSettingsSound (DialogPtr);
void HandleSoundMusicChange (short, Boolean);
pascal Boolean SoundFilter (DialogPtr, EventRecord *, short *);
void DoSoundPrefs (void);
void DisplayDefaults (void);
void FrameDisplayIcon (DialogPtr);
void DisplayUpdate (DialogPtr);
pascal Boolean DisplayFilter (DialogPtr, EventRecord *, short *);
void DoDisplayPrefs (void);
void SetAllDefaults (void);
void FlashSettingsButton (short);
void UpdateSettingsMain (DialogPtr);
pascal Boolean PrefsFilter (DialogPtr, EventRecord *, short *);
void BitchAboutChanges (void);
Rect prefButton[4], controlRects[4];
Str15 leftName, rightName, batteryName, bandName;
Str15 tempLeftStr, tempRightStr, tempBattStr, tempBandStr;
long tempLeftMap, tempRightMap, tempBattMap, tempBandMap;
short whichCtrl, wasDepthPref;
Boolean wasFade, wasIdle, wasPlay, wasTransit, wasZooms, wasBackground;
Boolean wasEscPauseKey, wasDemos, wasScreen2, nextRestartChange, wasErrorCheck;
Boolean wasPrettyMap, wasBitchDialogs;
extern short numNeighbors, isDepthPref, maxFiles, willMaxFiles;
extern Boolean isDoColorFade, isPlayMusicIdle, isUseSecondScreen;
extern Boolean isHouseChecks, doBitchDialogs;
extern Boolean isEscPauseKey, failedMusic, isSoundOn, doBackground;
extern Boolean isMusicOn, quickerTransitions, doAutoDemo;
extern Boolean changeLockStateOfHouse, saveHouseLocked, doPrettyMap;
//============================================================== Functions
//-------------------------------------------------------------- SetBrainsToDefaults
void SetBrainsToDefaults (DialogPtr theDialog)
{
SetDialogNumToStr(theDialog, kMaxFilesItem, 24L);
#ifdef powerc
wasTransit = false;
#else
wasTransit = true;
#endif
wasZooms = true;
wasDemos = true;
wasBackground = false;
wasErrorCheck = true;
wasPrettyMap = true;
wasBitchDialogs = true;
SetDialogItemValue(theDialog, kQuickTransitCheck, (short)wasTransit);
SetDialogItemValue(theDialog, kDoZoomsCheck, (short)wasZooms);
SetDialogItemValue(theDialog, kDoDemoCheck, (short)wasDemos);
SetDialogItemValue(theDialog, kDoBackgroundCh
|