3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
15 #include "ivancommon.h"
23 static cfestring
&GetDefaultName () { return DefaultName
.Value
; }
24 static cfestring
&GetDefaultPetName () { return DefaultPetName
.Value
; }
25 static sLong
GetAutoSaveInterval () { return AutoSaveInterval
.Value
; }
26 static sLong
GetContrast () { return Contrast
.Value
; }
27 static truth
GetWarnAboutDanger () { return WarnAboutDanger
.Value
; }
28 static truth
GetAutoDropLeftOvers () { return AutoDropLeftOvers
.Value
; }
29 static truth
GetAutoDropBottles () { return AutoDropBottles
.Value
; }
30 static truth
GetAutoDropCans () { return AutoDropCans
.Value
; }
31 static truth
GetLookZoom () { return LookZoom
.Value
; }
32 static truth
GetUseAlternativeKeys () { return UseAlternativeKeys
.Value
; }
33 static truth
GetBeNice () { return BeNice
.Value
; }
34 static truth
GetFullScreenMode () { return FullScreenMode
.Value
; }
35 static sLong
GetDoubleResModifier () { return DoubleResModifier
.Value
; }
36 static void SwitchModeHandler ();
37 static truth
GetKickDownDoors () { return KickDownDoors
.Value
; }
38 static truth
GetAutoCenterMap () { return AutoCenterMap
.Value
; }
39 static truth
GetAutoCenterMapOnLook () { return AutoCenterMapOnLook
.Value
; }
40 static truth
GetPlaySounds () { return PlaySounds
.Value
; }
41 static sLong
GetSoundVolume () { return SoundVolume
.Value
; }
42 static truth
GetConfirmCorpses () { return ConfirmCorpses
.Value
; }
43 static int GetGoingDelay () { return GoingDelay
.Value
; }
44 static truth
GetStopOnCorpses () { return StopOnCorpses
.Value
; }
45 static truth
GetStopOnSeenItems () { return StopOnSeenItems
.Value
; }
46 static truth
GetStopOnSeenDoors () { return StopOnSeenDoors
.Value
; }
47 static truth
GetConfirmScrollReading () { return ConfirmScrollReading
.Value
; }
48 static truth
GetUseMaximumCompression () { return UseMaximumCompression
.Value
; }
49 static truth
GetShowFullItemDesc () { return ShowFullItemDesc
.Value
; }
50 static sLong
ApplyContrastTo (sLong
);
51 static void Save () { configsystem::Save(); }
52 static void Load () { configsystem::Load(); }
53 static void CalculateContrastLuminance ();
54 static col24
GetContrastLuminance () { return ContrastLuminance
; }
55 static void Initialize ();
58 static festring
GetMyDir ();
61 static v2
GetQuestionPos ();
62 static void AutoSaveIntervalDisplayer (const numberoption
*, festring
&);
63 static void ContrastDisplayer (const numberoption
*, festring
&);
64 static truth
DefaultNameChangeInterface (stringoption
*);
65 static truth
DefaultPetNameChangeInterface (stringoption
*);
66 static truth
AutoSaveIntervalChangeInterface (numberoption
*);
67 static truth
ContrastChangeInterface (numberoption
*);
68 static void AutoSaveIntervalChanger (numberoption
*, sLong
);
69 static void ContrastChanger (numberoption
*, sLong
);
70 static void FullScreenModeChanger (truthoption
*, truth
);
71 static void FastListChanger (truthoption
*, truth
);
72 static void ContrastHandler (sLong
);
73 static void BackGroundDrawer ();
75 static void ResModDisp (const numberoption
*O
, festring
&Entry
);
76 static truth
ResModChangeIntf (numberoption
*O
);
77 static void ResModChanger (numberoption
*O
, sLong What
);
78 static void ResModHandler (sLong Value
);
80 static void SoundVolumeDisplayer (const numberoption
*, festring
&);
81 static truth
SoundVolumeChangeInterface (numberoption
*);
82 static void SoundVolumeChanger (numberoption
*, sLong
);
83 static void SoundVolumeHandler (sLong
);
85 static void GoingDelayDisplayer (const numberoption
*O
, festring
&Entry
);
86 static truth
GoingDelayChangeInterface (numberoption
*O
);
87 static void GoingDelayChanger (numberoption
*O
, sLong What
);
90 static stringoption DefaultName
;
91 static stringoption DefaultPetName
;
92 static numberoption AutoSaveInterval
;
93 static scrollbaroption Contrast
;
94 static truthoption WarnAboutDanger
;
95 static truthoption AutoDropLeftOvers
;
96 static truthoption AutoDropBottles
;
97 static truthoption AutoDropCans
;
98 static truthoption LookZoom
;
99 static truthoption UseAlternativeKeys
;
100 static truthoption BeNice
;
101 static truthoption FullScreenMode
;
103 static scrollbaroption DoubleResModifier
;
104 static truthoption KickDownDoors
;
105 static truthoption AutoCenterMap
;
106 static truthoption AutoCenterMapOnLook
;
107 static truthoption FastListMode
;
108 static truthoption PlaySounds
;
109 static scrollbaroption SoundVolume
;
110 static truthoption ConfirmCorpses
;
111 static numberoption GoingDelay
;
112 static truthoption StopOnCorpses
;
113 static truthoption StopOnSeenItems
;
114 static truthoption StopOnSeenDoors
;
115 static truthoption ConfirmScrollReading
;
116 static truthoption UseMaximumCompression
;
117 static col24 ContrastLuminance
;
118 static truthoption ShowFullItemDesc
;
122 inline sLong
ivanconfig::ApplyContrastTo (sLong L
) {
123 sLong C
= Contrast
.Value
;
124 if (C
== 100) return L
;
125 return MakeRGB24(41*GetRed24(L
)*C
>>12, 41*GetGreen24(L
)*C
>>12, 41*GetBlue24(L
)*C
>>12);