2002-11-16 08:07:38 +00:00
|
|
|
#ifndef PREFSMANAGER_H
|
|
|
|
|
#define PREFSMANAGER_H
|
2002-02-28 19:40:40 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: PrefsManager
|
|
|
|
|
|
2002-07-23 01:41:40 +00:00
|
|
|
Desc: Holds user-chosen preferences that are saved between sessions.
|
2002-02-28 19:40:40 +00:00
|
|
|
|
2003-02-01 05:39:48 +00:00
|
|
|
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
|
2002-02-28 19:40:40 +00:00
|
|
|
Chris Danford
|
2003-02-01 05:39:48 +00:00
|
|
|
Chris Gomez
|
2002-02-28 19:40:40 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
2003-09-08 03:26:58 +00:00
|
|
|
#include "PlayerNumber.h"
|
2004-01-20 03:32:48 +00:00
|
|
|
#include "Grade.h" // for NUM_GRADE_TIERS
|
2002-06-24 22:04:31 +00:00
|
|
|
|
2002-02-28 19:40:40 +00:00
|
|
|
class PrefsManager
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
PrefsManager();
|
|
|
|
|
~PrefsManager();
|
|
|
|
|
|
2002-07-11 19:02:26 +00:00
|
|
|
// GameOptions (ARE saved between sessions)
|
2002-09-22 18:18:50 +00:00
|
|
|
bool m_bWindowed;
|
2002-11-11 04:53:31 +00:00
|
|
|
int m_iDisplayWidth;
|
|
|
|
|
int m_iDisplayHeight;
|
|
|
|
|
int m_iDisplayColorDepth;
|
|
|
|
|
int m_iTextureColorDepth;
|
2003-07-09 02:28:56 +00:00
|
|
|
int m_iMovieColorDepth;
|
2003-01-11 20:15:00 +00:00
|
|
|
int m_iMaxTextureResolution;
|
2002-11-12 09:23:50 +00:00
|
|
|
int m_iRefreshRate;
|
2002-09-22 18:18:50 +00:00
|
|
|
bool m_bShowStats;
|
2003-11-13 00:39:36 +00:00
|
|
|
bool m_bShowBanners;
|
2003-09-28 07:13:12 +00:00
|
|
|
enum BackgroundModes { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_MOVIEVIS, BGMODE_RANDOMMOVIES } m_BackgroundMode;
|
2003-05-28 04:33:55 +00:00
|
|
|
int m_iNumBackgrounds;
|
2002-09-22 18:18:50 +00:00
|
|
|
float m_fBGBrightness;
|
|
|
|
|
bool m_bHiddenSongs;
|
|
|
|
|
bool m_bVsync;
|
2003-08-12 19:08:07 +00:00
|
|
|
bool m_bInterlaced;
|
2003-08-03 06:41:52 +00:00
|
|
|
#ifdef _XBOX
|
|
|
|
|
bool m_bPAL;
|
2003-11-13 00:39:36 +00:00
|
|
|
float m_fScreenPosX ;
|
|
|
|
|
float m_fScreenPosY ;
|
|
|
|
|
float m_fScreenWidth ;
|
|
|
|
|
float m_fScreenHeight ;
|
2003-08-03 06:41:52 +00:00
|
|
|
#endif
|
2003-04-18 23:55:20 +00:00
|
|
|
bool m_bDelayedTextureDelete;
|
2003-10-19 07:30:06 +00:00
|
|
|
bool m_bTexturePreload;
|
2003-04-25 03:41:38 +00:00
|
|
|
bool m_bDelayedScreenLoad;
|
2003-11-25 22:56:48 +00:00
|
|
|
enum BannerCacheMode { BNCACHE_OFF, BNCACHE_LOW_RES, BNCACHE_FULL };
|
|
|
|
|
BannerCacheMode m_BannerCache;
|
2003-12-31 09:32:21 +00:00
|
|
|
bool m_bFastLoad;
|
2002-07-11 19:02:26 +00:00
|
|
|
|
2002-09-22 18:18:50 +00:00
|
|
|
bool m_bOnlyDedicatedMenuButtons;
|
|
|
|
|
bool m_bMenuTimer;
|
|
|
|
|
bool m_bShowDanger;
|
|
|
|
|
int m_iNumArcadeStages;
|
2003-04-19 19:05:25 +00:00
|
|
|
bool m_bEventMode;
|
2004-01-11 23:33:56 +00:00
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
float m_fJudgeWindowScale;
|
2004-01-20 07:09:44 +00:00
|
|
|
float m_fJudgeWindowSecondsMarvelous;
|
|
|
|
|
float m_fJudgeWindowSecondsPerfect;
|
|
|
|
|
float m_fJudgeWindowSecondsGreat;
|
|
|
|
|
float m_fJudgeWindowSecondsGood;
|
|
|
|
|
float m_fJudgeWindowSecondsBoo;
|
|
|
|
|
float m_fJudgeWindowSecondsOK;
|
|
|
|
|
float m_fJudgeWindowSecondsMine;
|
|
|
|
|
float m_fJudgeWindowSecondsAttack;
|
|
|
|
|
|
2002-09-22 18:18:50 +00:00
|
|
|
float m_fLifeDifficultyScale;
|
2004-01-20 07:09:44 +00:00
|
|
|
float m_fLifeDeltaPercentChangeMarvelous;
|
|
|
|
|
float m_fLifeDeltaPercentChangePerfect;
|
|
|
|
|
float m_fLifeDeltaPercentChangeGreat;
|
|
|
|
|
float m_fLifeDeltaPercentChangeGood;
|
|
|
|
|
float m_fLifeDeltaPercentChangeBoo;
|
|
|
|
|
float m_fLifeDeltaPercentChangeMiss;
|
|
|
|
|
float m_fLifeDeltaPercentChangeHitMine;
|
|
|
|
|
float m_fLifeDeltaPercentChangeOK;
|
|
|
|
|
float m_fLifeDeltaPercentChangeNG;
|
2004-01-11 23:33:56 +00:00
|
|
|
|
|
|
|
|
// tug meter used in rave
|
2004-01-20 07:09:44 +00:00
|
|
|
float m_fTugMeterPercentChangeMarvelous;
|
|
|
|
|
float m_fTugMeterPercentChangePerfect;
|
|
|
|
|
float m_fTugMeterPercentChangeGreat;
|
|
|
|
|
float m_fTugMeterPercentChangeGood;
|
|
|
|
|
float m_fTugMeterPercentChangeBoo;
|
|
|
|
|
float m_fTugMeterPercentChangeMiss;
|
|
|
|
|
float m_fTugMeterPercentChangeHitMine;
|
|
|
|
|
float m_fTugMeterPercentChangeOK;
|
|
|
|
|
float m_fTugMeterPercentChangeNG;
|
|
|
|
|
|
|
|
|
|
// Whoever added these: Please add a comment saying what they do. -Chris
|
2003-10-13 00:06:49 +00:00
|
|
|
int m_iRegenComboAfterFail;
|
|
|
|
|
int m_iRegenComboAfterMiss;
|
|
|
|
|
int m_iMaxRegenComboAfterFail;
|
|
|
|
|
int m_iMaxRegenComboAfterMiss;
|
2003-10-13 03:20:05 +00:00
|
|
|
bool m_bTwoPlayerRecovery;
|
2004-01-20 07:09:44 +00:00
|
|
|
bool m_bMercifulDrain; // negative life deltas are scaled by the players life percentage
|
2004-01-11 23:33:56 +00:00
|
|
|
|
2004-01-20 07:09:44 +00:00
|
|
|
// percent score (the number that is shown on the screen and saved to memory card)
|
|
|
|
|
int m_iPercentScoreWeightMarvelous;
|
|
|
|
|
int m_iPercentScoreWeightPerfect;
|
|
|
|
|
int m_iPercentScoreWeightGreat;
|
|
|
|
|
int m_iPercentScoreWeightGood;
|
|
|
|
|
int m_iPercentScoreWeightBoo;
|
|
|
|
|
int m_iPercentScoreWeightMiss;
|
|
|
|
|
int m_iPercentScoreWeightHitMine;
|
|
|
|
|
int m_iPercentScoreWeightOK;
|
|
|
|
|
int m_iPercentScoreWeightNG;
|
2004-01-11 23:33:56 +00:00
|
|
|
|
2004-01-20 07:09:44 +00:00
|
|
|
// grades are calculated based on a percentage, but might have different weights than the percent score
|
|
|
|
|
int m_iGradeWeightMarvelous;
|
|
|
|
|
int m_iGradeWeightPerfect;
|
|
|
|
|
int m_iGradeWeightGreat;
|
|
|
|
|
int m_iGradeWeightGood;
|
|
|
|
|
int m_iGradeWeightBoo;
|
|
|
|
|
int m_iGradeWeightMiss;
|
|
|
|
|
int m_iGradeWeightHitMine;
|
|
|
|
|
int m_iGradeWeightOK;
|
|
|
|
|
int m_iGradeWeightNG;
|
|
|
|
|
|
|
|
|
|
float m_fGradePercentTier[NUM_GRADE_TIERS]; // the minimum percent necessary achieve a grade
|
|
|
|
|
bool m_bGradeTier02IsAllPerfects; // DDR special case. If true, m_fGradePercentTier[GRADE_TIER_2] is ignored
|
|
|
|
|
|
|
|
|
|
float m_fSuperMeterPercentChangeMarvelous;
|
|
|
|
|
float m_fSuperMeterPercentChangePerfect;
|
|
|
|
|
float m_fSuperMeterPercentChangeGreat;
|
|
|
|
|
float m_fSuperMeterPercentChangeGood;
|
|
|
|
|
float m_fSuperMeterPercentChangeBoo;
|
|
|
|
|
float m_fSuperMeterPercentChangeMiss;
|
|
|
|
|
float m_fSuperMeterPercentChangeHitMine;
|
|
|
|
|
float m_fSuperMeterPercentChangeOK;
|
|
|
|
|
float m_fSuperMeterPercentChangeNG;
|
|
|
|
|
bool m_bMercifulSuperMeter; // negative super deltas are scaled by the players life percentage
|
2004-01-11 23:33:56 +00:00
|
|
|
|
2002-09-22 18:18:50 +00:00
|
|
|
bool m_bAutoPlay;
|
|
|
|
|
bool m_bDelayedEscape;
|
2003-01-11 08:55:21 +00:00
|
|
|
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
|
2003-05-20 04:41:47 +00:00
|
|
|
bool m_bShowNative;
|
2002-09-22 18:18:50 +00:00
|
|
|
bool m_bArcadeOptionsNavigation;
|
2003-09-28 07:13:12 +00:00
|
|
|
enum MusicWheelUsesSections { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
|
2003-01-21 06:51:35 +00:00
|
|
|
int m_iMusicWheelSwitchSpeed;
|
2003-01-11 08:55:21 +00:00
|
|
|
bool m_bEasterEggs;
|
2003-07-25 08:05:29 +00:00
|
|
|
int m_iMarvelousTiming;
|
2003-04-13 04:50:08 +00:00
|
|
|
int m_iCoinMode;
|
2003-01-19 04:44:22 +00:00
|
|
|
int m_iCoinsPerCredit;
|
2003-11-09 08:55:21 +00:00
|
|
|
enum Premium { NO_PREMIUM, DOUBLES_PREMIUM, JOINT_PREMIUM };
|
2003-11-09 01:09:35 +00:00
|
|
|
Premium m_Premium;
|
2003-02-01 05:39:48 +00:00
|
|
|
bool m_bPickExtraStage;
|
2003-09-06 04:18:08 +00:00
|
|
|
bool m_bComboContinuesBetweenSongs;
|
2003-02-10 05:30:12 +00:00
|
|
|
float m_fLongVerSongSeconds;
|
|
|
|
|
float m_fMarathonVerSongSeconds;
|
2003-04-21 22:36:45 +00:00
|
|
|
enum Maybe { ASK = -1, NO = 0, YES = 1 };
|
|
|
|
|
Maybe m_ShowSongOptions;
|
2003-02-27 10:56:37 +00:00
|
|
|
bool m_bSoloSingle;
|
2003-04-11 01:49:57 +00:00
|
|
|
bool m_bDancePointsForOni; //DDR-Extreme style dance points instead of max2 percent
|
2003-10-05 05:18:48 +00:00
|
|
|
bool m_bPercentageScoring;
|
2003-12-10 11:49:44 +00:00
|
|
|
float m_fMinPercentageForHighScore;
|
2003-03-20 10:59:09 +00:00
|
|
|
bool m_bShowLyrics;
|
2004-02-10 21:10:23 +00:00
|
|
|
bool m_bAutogenSteps;
|
2003-03-27 01:56:21 +00:00
|
|
|
bool m_bAutogenGroupCourses;
|
2003-04-11 01:49:57 +00:00
|
|
|
bool m_bBreakComboToGetItem;
|
2004-01-21 01:33:29 +00:00
|
|
|
bool m_bLockCourseDifficulties;
|
2003-08-27 02:48:32 +00:00
|
|
|
enum CharacterOption { CO_OFF = 0, CO_RANDOM = 1, CO_SELECT = 2};
|
|
|
|
|
CharacterOption m_ShowDancingCharacters;
|
2003-05-09 05:56:05 +00:00
|
|
|
bool m_bUseUnlockSystem;
|
2003-05-26 09:18:44 +00:00
|
|
|
bool m_bFirstRun;
|
2003-10-03 03:20:50 +00:00
|
|
|
bool m_bAutoMapOnJoyChange;
|
2003-07-05 05:28:23 +00:00
|
|
|
float m_fGlobalOffsetSeconds;
|
2003-07-29 12:42:38 +00:00
|
|
|
int m_iProgressiveLifebar;
|
2003-07-31 15:07:48 +00:00
|
|
|
int m_iProgressiveStageLifebar;
|
2003-07-30 17:01:04 +00:00
|
|
|
int m_iProgressiveNonstopLifebar;
|
2003-08-20 09:17:56 +00:00
|
|
|
bool m_bShowBeginnerHelper;
|
2003-09-29 12:32:12 +00:00
|
|
|
bool m_bEndlessBreakEnabled;
|
|
|
|
|
int m_iEndlessNumStagesUntilBreak;
|
|
|
|
|
int m_iEndlessBreakLength;
|
2003-08-19 08:01:15 +00:00
|
|
|
CString m_sLanguage;
|
2003-12-19 08:51:47 +00:00
|
|
|
CString m_sMemoryCardProfileSubdir; // if set, always use the device that mounts to this point
|
2003-12-07 08:19:10 +00:00
|
|
|
CString m_sDefaultLocalProfileID[NUM_PLAYERS];
|
2003-12-19 08:51:47 +00:00
|
|
|
CString m_sMemoryCardOsMountPoint[NUM_PLAYERS]; // if set, always use the device that mounts to this point
|
2003-12-15 07:35:40 +00:00
|
|
|
int m_iMemoryCardUsbBus[NUM_PLAYERS]; // take the first storage device on this usb bus
|
|
|
|
|
int m_iMemoryCardUsbPort[NUM_PLAYERS]; // take the first storage device on this usb bus
|
2003-10-11 07:47:34 +00:00
|
|
|
int m_iCenterImageTranslateX;
|
|
|
|
|
int m_iCenterImageTranslateY;
|
|
|
|
|
float m_fCenterImageScaleX;
|
|
|
|
|
float m_fCenterImageScaleY;
|
2003-12-28 19:46:50 +00:00
|
|
|
int m_iAttractSoundFrequency; // 0 = never, 1 = every time
|
2003-10-17 08:03:46 +00:00
|
|
|
bool m_bAllowExtraStage;
|
2004-02-15 04:47:32 +00:00
|
|
|
|
2004-02-15 06:10:21 +00:00
|
|
|
// If true, then signatures created when writing profile data
|
|
|
|
|
// and verified when reading profile data. Leave this false if
|
|
|
|
|
// you want to use a profile on different machines that don't
|
|
|
|
|
// have the same key, or else the profile's data will be discarded.
|
|
|
|
|
bool m_bSignProfileData;
|
2003-01-26 03:51:59 +00:00
|
|
|
|
2004-01-23 08:25:00 +00:00
|
|
|
/* Editor prefs: */
|
|
|
|
|
bool m_bEditorShowBGChangesPlay;
|
|
|
|
|
|
2003-07-27 14:10:47 +00:00
|
|
|
// course ranking
|
2003-09-28 07:13:12 +00:00
|
|
|
enum CourseSortOrders { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder;
|
2003-08-12 23:18:19 +00:00
|
|
|
bool m_bMoveRandomToEnd;
|
2003-11-03 10:14:13 +00:00
|
|
|
enum GetRankingName { RANKING_OFF, RANKING_ON, RANKING_LIST } m_iGetRankingName;
|
2003-07-27 14:10:47 +00:00
|
|
|
|
2003-08-11 09:58:18 +00:00
|
|
|
// scoring type; SCORING_MAX2 should always be first
|
2003-09-28 07:13:12 +00:00
|
|
|
enum ScoringTypes { SCORING_MAX2, SCORING_5TH } m_iScoringType;
|
2003-08-11 09:58:18 +00:00
|
|
|
|
2003-01-18 04:26:25 +00:00
|
|
|
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
|
|
|
|
int m_iBoostAppPriority;
|
|
|
|
|
|
2003-04-01 19:31:27 +00:00
|
|
|
CStringArray m_asAdditionalSongFolders;
|
|
|
|
|
CString m_DWIPath;
|
2002-05-27 08:23:27 +00:00
|
|
|
|
2003-05-31 21:34:07 +00:00
|
|
|
CString m_sLastSeenVideoDriver;
|
2003-10-03 03:20:50 +00:00
|
|
|
CString m_sLastSeenInputDevices;
|
2003-06-10 23:50:31 +00:00
|
|
|
#if defined(WIN32)
|
|
|
|
|
int m_iLastSeenMemory;
|
|
|
|
|
#endif
|
2003-06-05 19:29:27 +00:00
|
|
|
CString m_sVideoRenderers;
|
2003-12-20 21:29:55 +00:00
|
|
|
bool m_bSmoothLines;
|
2003-01-19 21:51:46 +00:00
|
|
|
CString m_sSoundDrivers;
|
2003-12-02 20:52:10 +00:00
|
|
|
int m_iSoundWriteAhead;
|
2003-09-02 04:51:36 +00:00
|
|
|
CString m_sMovieDrivers;
|
2003-11-16 04:45:12 +00:00
|
|
|
CString m_sLightsDriver;
|
2003-01-11 04:03:21 +00:00
|
|
|
float m_fSoundVolume;
|
2003-03-31 21:21:23 +00:00
|
|
|
bool m_bSoundPreloadAll;
|
2003-09-25 01:37:56 +00:00
|
|
|
int m_iSoundResampleQuality;
|
2003-05-27 01:03:21 +00:00
|
|
|
bool m_bAllowUnacceleratedRenderer;
|
2003-07-13 20:21:04 +00:00
|
|
|
bool m_bThreadedInput;
|
2003-12-18 21:16:43 +00:00
|
|
|
bool m_bScreenTestMode;
|
2002-12-13 22:06:30 +00:00
|
|
|
|
2003-07-07 03:51:20 +00:00
|
|
|
CString m_sIgnoredMessageWindows;
|
|
|
|
|
|
2003-09-09 02:54:34 +00:00
|
|
|
CString m_sCoursesToShowRanking;
|
|
|
|
|
|
2003-11-24 00:23:18 +00:00
|
|
|
/* Debug: */
|
|
|
|
|
bool m_bLogging;
|
|
|
|
|
bool m_bForceLogFlush;
|
|
|
|
|
bool m_bShowLogOutput;
|
|
|
|
|
bool m_bTimestamping;
|
2004-01-17 23:22:08 +00:00
|
|
|
bool m_bLogSkips;
|
2003-11-24 00:23:18 +00:00
|
|
|
bool m_bLogCheckpoints;
|
|
|
|
|
|
2003-02-22 00:12:45 +00:00
|
|
|
/* Game-specific prefs: */
|
2003-06-25 05:02:42 +00:00
|
|
|
CString m_sDefaultModifiers;
|
2003-02-22 00:12:45 +00:00
|
|
|
|
2003-10-08 08:01:41 +00:00
|
|
|
void ReadGlobalPrefsFromDisk();
|
2003-10-05 05:18:48 +00:00
|
|
|
void SaveGlobalPrefsToDisk() const;
|
2002-05-27 08:23:27 +00:00
|
|
|
|
|
|
|
|
|
2002-07-23 01:41:40 +00:00
|
|
|
void ReadGamePrefsFromDisk();
|
|
|
|
|
void SaveGamePrefsToDisk();
|
2002-02-28 19:40:40 +00:00
|
|
|
};
|
|
|
|
|
|
2003-10-16 08:55:32 +00:00
|
|
|
/* This is global, because it can be accessed by crash handlers and error handlers
|
|
|
|
|
* that are run after PREFSMAN shuts down (and probably don't want to deref tht
|
|
|
|
|
* pointer anyway). */
|
|
|
|
|
extern bool g_bAutoRestart;
|
2002-02-28 19:40:40 +00:00
|
|
|
|
2002-05-27 08:23:27 +00:00
|
|
|
extern PrefsManager* PREFSMAN; // global and accessable from anywhere in our program
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|