Files
itgmania212121/stepmania/src/PrefsManager.h
T

189 lines
5.6 KiB
C++
Raw Normal View History

#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
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
2002-02-28 19:40:40 +00:00
Chris Danford
Chris Gomez
2002-02-28 19:40:40 +00:00
-----------------------------------------------------------------------------
*/
#include "PlayerNumber.h"
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)
bool m_bWindowed;
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;
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;
int m_iNumBackgrounds;
float m_fBGBrightness;
bool m_bHiddenSongs;
bool m_bVsync;
bool m_bInterlaced;
#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 ;
#endif
2003-04-18 23:55:20 +00:00
bool m_bDelayedTextureDelete;
bool m_bTexturePreload;
bool m_bDelayedScreenLoad;
bool m_bBannerCache;
2002-07-11 19:02:26 +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;
float m_fJudgeWindowScale;
float m_fLifeDifficultyScale;
float m_fJudgeWindowMarvelousSeconds;
float m_fJudgeWindowPerfectSeconds;
float m_fJudgeWindowGreatSeconds;
float m_fJudgeWindowGoodSeconds;
float m_fJudgeWindowBooSeconds;
float m_fJudgeWindowOKSeconds;
2003-11-10 01:03:47 +00:00
float m_fJudgeWindowMineSeconds;
2003-11-17 05:26:29 +00:00
float m_fJudgeWindowAttackSeconds;
2003-11-11 07:36:28 +00:00
float m_fLifeDeltaMarvelousPercentChange;
float m_fLifeDeltaPerfectPercentChange;
float m_fLifeDeltaGreatPercentChange;
float m_fLifeDeltaGoodPercentChange;
float m_fLifeDeltaBooPercentChange;
float m_fLifeDeltaMissPercentChange;
float m_fLifeDeltaOKPercentChange;
float m_fLifeDeltaNGPercentChange;
float m_fLifeDeltaMinePercentChange;
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;
bool m_bAutoPlay;
bool m_bDelayedEscape;
bool m_bInstructions, m_bShowDontDie, m_bShowSelectGroup;
2003-05-20 04:41:47 +00:00
bool m_bShowNative;
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;
bool m_bEasterEggs;
int m_iMarvelousTiming;
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;
bool m_bPickExtraStage;
bool m_bComboContinuesBetweenSongs;
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;
bool m_bSoloSingle;
bool m_bDancePointsForOni; //DDR-Extreme style dance points instead of max2 percent
2003-10-05 05:18:48 +00:00
bool m_bPercentageScoring;
2003-03-07 04:47:04 +00:00
bool m_bTimestamping;
bool m_bShowLyrics;
bool m_bAutogenMissingTypes;
bool m_bAutogenGroupCourses;
bool m_bBreakComboToGetItem;
enum CharacterOption { CO_OFF = 0, CO_RANDOM = 1, CO_SELECT = 2};
CharacterOption m_ShowDancingCharacters;
bool m_bUseUnlockSystem;
bool m_bFirstRun;
bool m_bAutoMapOnJoyChange;
float m_fGlobalOffsetSeconds;
bool m_bForceLogFlush;
bool m_bLogging;
bool m_bShowLogOutput;
bool m_bTenFooterInRed;
2003-07-29 12:42:38 +00:00
int m_iProgressiveLifebar;
2003-07-31 15:07:48 +00:00
int m_iProgressiveStageLifebar;
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-11-01 22:04:43 +00:00
CString m_sDefaultMachineProfileID[NUM_PLAYERS];
CString m_sMemoryCardDir[NUM_PLAYERS];
CString m_sMemoryCardMountCommand[NUM_PLAYERS];
2003-10-11 07:47:34 +00:00
int m_iCenterImageTranslateX;
int m_iCenterImageTranslateY;
float m_fCenterImageScaleX;
float m_fCenterImageScaleY;
2003-10-12 19:45:28 +00:00
bool m_bAttractSound;
2003-10-22 11:40:04 +00:00
bool m_bDemonstrationSound;
2003-10-17 08:03:46 +00:00
bool m_bAllowExtraStage;
2003-01-26 03:51:59 +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;
bool m_bMoveRandomToEnd;
enum GetRankingName { RANKING_OFF, RANKING_ON, RANKING_LIST } m_iGetRankingName;
// 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-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;
CString m_sLastSeenInputDevices;
#if defined(WIN32)
int m_iLastSeenMemory;
#endif
2003-06-05 19:29:27 +00:00
CString m_sVideoRenderers;
bool m_bAntiAliasing;
CString m_sSoundDrivers;
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;
bool m_bSoundPreloadAll;
2003-09-25 01:37:56 +00:00
int m_iSoundResampleQuality;
bool m_bAllowUnacceleratedRenderer;
2003-07-13 20:21:04 +00:00
bool m_bThreadedInput;
2002-12-13 22:06:30 +00:00
2003-07-07 03:51:20 +00:00
CString m_sIgnoredMessageWindows;
CString m_sCoursesToShowRanking;
/* Game-specific prefs: */
2003-06-25 05:02:42 +00:00
CString m_sDefaultModifiers;
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
#endif