Elin Decompiled Documentation EA 23.183 Nightly Patch 1
Loading...
Searching...
No Matches
SourcePref Class Reference
Inheritance diagram for SourcePref:
EClass SourcePrefCard SourcePrefTile

Public Member Functions

void OnAfterDeserialize ()
 
void OnBeforeSerialize ()
 
void Validate ()
 
void WriteIni (string path)
 

Static Public Member Functions

static SourcePref ReadFromIni (string path)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Public Attributes

int[] ints = new int[25]
 
BitArray32 _bits1
 

Properties

int test [get]
 
PrefFlag flags [get, set]
 
int shadow [get, set]
 
float height [get, set]
 
int liquidMod [get, set]
 
int liquidModMax [get, set]
 
float hatY [get, set]
 
float stackX [get, set]
 
float x [get, set]
 
float y [get, set]
 
float z [get, set]
 
int pivotX [get, set]
 
int pivotY [get, set]
 
int shadowX [get, set]
 
int shadowY [get, set]
 
int shadowRX [get, set]
 
int shadowRY [get, set]
 
int shadowBX [get, set]
 
int shadowBY [get, set]
 
int shadowBRX [get, set]
 
int shadowBRY [get, set]
 
int equipX [get, set]
 
int equipY [get, set]
 
int scaleIcon [get, set]
 
bool bypassShadow [get, set]
 
bool UsePref [get]
 
bool Float [get]
 
bool Surface [get]
 
bool FloatUnderwater [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 10 of file SourcePref.cs.

Member Function Documentation

◆ OnAfterDeserialize()

void SourcePref.OnAfterDeserialize ( )
inline

Definition at line 322 of file SourcePref.cs.

323 {
324 if (ints.Length >= 25)
325 {
326 _bits1.SetInt(ints[22]);
327 }
328 else
329 {
330 Validate();
331 }
332 }
int[] ints
Definition: SourcePref.cs:13
BitArray32 _bits1
Definition: SourcePref.cs:15
void Validate()
Definition: SourcePref.cs:339
void SetInt(int i)
Definition: BitArray32.cs:89

References _bits1, ints, BitArray32.SetInt(), and Validate().

◆ OnBeforeSerialize()

void SourcePref.OnBeforeSerialize ( )
inline

Definition at line 334 of file SourcePref.cs.

335 {
336 ints[22] = _bits1.ToInt();
337 }
int ToInt()
Definition: BitArray32.cs:84

References _bits1, ints, and BitArray32.ToInt().

◆ ReadFromIni()

static SourcePref SourcePref.ReadFromIni ( string  path)
inlinestatic

Definition at line 373 of file SourcePref.cs.

374 {
375 SourcePref sourcePref = new SourcePref();
376 IniData iniData = new FileIniDataParser().ReadFile(path, Encoding.UTF8);
377 sourcePref.ints[4] = iniData.Global["x"].ToInt();
378 sourcePref.ints[5] = iniData.Global["y"].ToInt();
379 sourcePref.ints[2] = iniData.Global["z"].ToInt();
380 sourcePref.pivotX = iniData.Global["pivotX"].ToInt();
381 sourcePref.pivotY = iniData.Global["pivotY"].ToInt();
382 sourcePref.shadow = iniData.Global["shadow"].ToInt();
383 sourcePref.shadowX = iniData.Global["shadowX"].ToInt();
384 sourcePref.shadowY = iniData.Global["shadowY"].ToInt();
385 sourcePref.ints[3] = iniData.Global["height"].ToInt();
386 sourcePref.scaleIcon = iniData.Global["scaleIcon"].ToInt();
387 sourcePref.liquidMod = iniData.Global["liquidMod"].ToInt();
388 sourcePref.ints[23] = iniData.Global["hatY"].ToInt();
389 sourcePref.ints[1] = iniData.Global["flags"].ToInt();
390 return sourcePref;
391 }

References ints.

Referenced by SpriteData.LoadPref().

◆ Validate()

void SourcePref.Validate ( )
inline

Definition at line 339 of file SourcePref.cs.

340 {
341 if (ints.Length < 25)
342 {
343 Array.Resize(ref ints, 25);
344 }
345 }

References ints.

Referenced by OnAfterDeserialize(), RenderRow.SetImage(), SourceBlock.ValidatePref(), SourceChara.ValidatePref(), SourceFloor.ValidatePref(), and SourceObj.ValidatePref().

◆ WriteIni()

void SourcePref.WriteIni ( string  path)
inline

Definition at line 347 of file SourcePref.cs.

348 {
349 FileIniDataParser fileIniDataParser = new FileIniDataParser();
350 if (File.Exists(path))
351 {
352 EClass.ui.Say("Ini file already exists.");
353 return;
354 }
355 File.CreateText(path).Close();
356 IniData iniData = fileIniDataParser.ReadFile(path, Encoding.UTF8);
357 iniData.Global["x"] = ints[4].ToString() ?? "";
358 iniData.Global["y"] = ints[5].ToString() ?? "";
359 iniData.Global["z"] = ints[2].ToString() ?? "";
360 iniData.Global["pivotX"] = pivotX.ToString() ?? "";
361 iniData.Global["pivotY"] = pivotY.ToString() ?? "";
362 iniData.Global["shadow"] = shadow.ToString() ?? "";
363 iniData.Global["shadowX"] = shadowX.ToString() ?? "";
364 iniData.Global["shadowY"] = shadowY.ToString() ?? "";
365 iniData.Global["height"] = ints[3].ToString() ?? "";
366 iniData.Global["scaleIcon"] = scaleIcon.ToString() ?? "";
367 iniData.Global["liquidMod"] = liquidMod.ToString() ?? "";
368 iniData.Global["hatY"] = ints[23].ToString() ?? "";
369 iniData.Global["flags"] = ints[1].ToString() ?? "";
370 fileIniDataParser.WriteFile(path, iniData);
371 }
Definition: EClass.cs:5
static UI ui
Definition: EClass.cs:16
int liquidMod
Definition: SourcePref.cs:63
int scaleIcon
Definition: SourcePref.cs:291
int shadow
Definition: SourcePref.cs:39

References ints, liquidMod, pivotX, pivotY, scaleIcon, shadow, shadowX, shadowY, and EClass.ui.

Member Data Documentation

◆ _bits1

BitArray32 SourcePref._bits1

Definition at line 15 of file SourcePref.cs.

Referenced by OnAfterDeserialize(), and OnBeforeSerialize().

◆ ints

int [] SourcePref.ints = new int[25]

Definition at line 13 of file SourcePref.cs.

Referenced by OnAfterDeserialize(), OnBeforeSerialize(), ReadFromIni(), Validate(), and WriteIni().

Property Documentation

◆ bypassShadow

bool SourcePref.bypassShadow
getset

Definition at line 302 of file SourcePref.cs.

303 {
304 get
305 {
306 return _bits1[0];
307 }
308 set
309 {
310 _bits1[0] = value;
311 }
312 }

Referenced by BaseTileMap.DrawTile().

◆ equipX

int SourcePref.equipX
getset

Definition at line 266 of file SourcePref.cs.

267 {
268 get
269 {
270 return ints[18];
271 }
272 set
273 {
274 ints[18] = value;
275 }
276 }

Referenced by CharaRenderer.DrawHat(), CharaRenderer.DrawHeld(), and CharaActorPCC.OnRender().

◆ equipY

int SourcePref.equipY
getset

Definition at line 278 of file SourcePref.cs.

279 {
280 get
281 {
282 return ints[19];
283 }
284 set
285 {
286 ints[19] = value;
287 }
288 }

Referenced by CharaRenderer.DrawHat(), CharaRenderer.DrawHeld(), and CharaActorPCC.OnRender().

◆ flags

PrefFlag SourcePref.flags
getset

Definition at line 26 of file SourcePref.cs.

27 {
28 get
29 {
30 return ints[1].ToEnum<PrefFlag>();
31 }
32 set
33 {
34 ints[1] = (int)value;
35 }
36 }
PrefFlag
Definition: PrefFlag.cs:5

Referenced by SourcePrefInspector.ToggleUsePref().

◆ Float

bool SourcePref.Float
get

◆ FloatUnderwater

bool SourcePref.FloatUnderwater
get

Definition at line 320 of file SourcePref.cs.

Referenced by BaseTileMap.DrawTile().

◆ hatY

float SourcePref.hatY
getset

Definition at line 86 of file SourcePref.cs.

87 {
88 get
89 {
90 return (float)ints[23] * 0.01f;
91 }
92 set
93 {
94 ints[23] = (int)(value * 100f);
95 }
96 }

Referenced by CharaRenderer.Draw(), and CharaRenderer.DrawHat().

◆ height

float SourcePref.height
getset

Definition at line 50 of file SourcePref.cs.

51 {
52 get
53 {
54 return (float)ints[3] * 0.01f;
55 }
56 set
57 {
58 ints[3] = (int)(value * 100f);
59 }
60 }

Referenced by BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Cell.GetSurfaceHeight(), BaseTileMap.GetThingPosition(), and CoreDebug.UpdateInput().

◆ liquidMod

int SourcePref.liquidMod
getset

Definition at line 62 of file SourcePref.cs.

63 {
64 get
65 {
66 return ints[16];
67 }
68 set
69 {
70 ints[16] = value;
71 }
72 }

Referenced by BaseTileMap.DrawTile(), and WriteIni().

◆ liquidModMax

int SourcePref.liquidModMax
getset

Definition at line 74 of file SourcePref.cs.

75 {
76 get
77 {
78 return ints[21];
79 }
80 set
81 {
82 ints[21] = value;
83 }
84 }

Referenced by BaseTileMap.DrawTile().

◆ pivotX

int SourcePref.pivotX
getset

Definition at line 146 of file SourcePref.cs.

147 {
148 get
149 {
150 return ints[6];
151 }
152 set
153 {
154 ints[6] = value;
155 }
156 }

Referenced by RenderRow.SetImage(), and WriteIni().

◆ pivotY

int SourcePref.pivotY
getset

Definition at line 158 of file SourcePref.cs.

159 {
160 get
161 {
162 return ints[7];
163 }
164 set
165 {
166 ints[7] = value;
167 }
168 }

Referenced by RenderRow.SetImage(), and WriteIni().

◆ scaleIcon

int SourcePref.scaleIcon
getset

Definition at line 290 of file SourcePref.cs.

291 {
292 get
293 {
294 return ints[20];
295 }
296 set
297 {
298 ints[20] = value;
299 }
300 }

Referenced by RenderRow.SetImage(), and WriteIni().

◆ shadow

int SourcePref.shadow
getset

Definition at line 38 of file SourcePref.cs.

39 {
40 get
41 {
42 return ints[0];
43 }
44 set
45 {
46 ints[0] = value;
47 }
48 }

Referenced by CardRenderer.Draw(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), GrowSystem.OnRenderTileMap(), and WriteIni().

◆ shadowBRX

int SourcePref.shadowBRX
getset

Definition at line 242 of file SourcePref.cs.

243 {
244 get
245 {
246 return ints[14];
247 }
248 set
249 {
250 ints[14] = value;
251 }
252 }

Referenced by MeshPass.AddShadow().

◆ shadowBRY

int SourcePref.shadowBRY
getset

Definition at line 254 of file SourcePref.cs.

255 {
256 get
257 {
258 return ints[15];
259 }
260 set
261 {
262 ints[15] = value;
263 }
264 }

Referenced by MeshPass.AddShadow().

◆ shadowBX

int SourcePref.shadowBX
getset

Definition at line 218 of file SourcePref.cs.

219 {
220 get
221 {
222 return ints[12];
223 }
224 set
225 {
226 ints[12] = value;
227 }
228 }

Referenced by MeshPass.AddShadow().

◆ shadowBY

int SourcePref.shadowBY
getset

Definition at line 230 of file SourcePref.cs.

231 {
232 get
233 {
234 return ints[13];
235 }
236 set
237 {
238 ints[13] = value;
239 }
240 }

Referenced by MeshPass.AddShadow().

◆ shadowRX

int SourcePref.shadowRX
getset

Definition at line 194 of file SourcePref.cs.

195 {
196 get
197 {
198 return ints[10];
199 }
200 set
201 {
202 ints[10] = value;
203 }
204 }

◆ shadowRY

int SourcePref.shadowRY
getset

Definition at line 206 of file SourcePref.cs.

207 {
208 get
209 {
210 return ints[11];
211 }
212 set
213 {
214 ints[11] = value;
215 }
216 }

◆ shadowX

int SourcePref.shadowX
getset

Definition at line 170 of file SourcePref.cs.

171 {
172 get
173 {
174 return ints[8];
175 }
176 set
177 {
178 ints[8] = value;
179 }
180 }

Referenced by MeshPass.AddShadow(), and WriteIni().

◆ shadowY

int SourcePref.shadowY
getset

Definition at line 182 of file SourcePref.cs.

183 {
184 get
185 {
186 return ints[9];
187 }
188 set
189 {
190 ints[9] = value;
191 }
192 }

Referenced by MeshPass.AddShadow(), and WriteIni().

◆ stackX

float SourcePref.stackX
getset

Definition at line 98 of file SourcePref.cs.

99 {
100 get
101 {
102 return (float)ints[17] * 0.01f;
103 }
104 set
105 {
106 ints[17] = (int)(value * 100f);
107 }
108 }

◆ Surface

bool SourcePref.Surface
get

Definition at line 318 of file SourcePref.cs.

Referenced by Chara._Move(), and Cell.GetSurfaceHeight().

◆ test

int SourcePref.test
get

Definition at line 17 of file SourcePref.cs.

18 {
19 get
20 {
21 Validate();
22 return ints[0];
23 }
24 }

◆ UsePref

bool SourcePref.UsePref
get

Definition at line 314 of file SourcePref.cs.

Referenced by CardRow.GetPref().

◆ x

float SourcePref.x
getset

Definition at line 110 of file SourcePref.cs.

111 {
112 get
113 {
114 return (float)ints[4] * 0.01f;
115 }
116 set
117 {
118 ints[4] = (int)(value * 100f);
119 }
120 }

Referenced by CharaRenderer.DrawHeld().

◆ y

float SourcePref.y
getset

Definition at line 122 of file SourcePref.cs.

123 {
124 get
125 {
126 return (float)ints[5] * 0.01f;
127 }
128 set
129 {
130 ints[5] = (int)(value * 100f);
131 }
132 }

Referenced by CardRenderer.Draw(), BaseTileMap.DrawTile(), and GrowSystem.OnRenderTileMap().

◆ z

float SourcePref.z
getset

Definition at line 134 of file SourcePref.cs.

135 {
136 get
137 {
138 return (float)ints[2] * 0.01f;
139 }
140 set
141 {
142 ints[2] = (int)(value * 100f);
143 }
144 }

Referenced by BaseTileMap.DrawTile(), BaseTileMap.GetThingPosition(), and GrowSystem.OnRenderTileMap().


The documentation for this class was generated from the following file: