initial commit

This commit is contained in:
Arneth
2022-01-20 17:32:17 -05:00
parent f570a902d9
commit 07448bc23d
446 changed files with 53095 additions and 60 deletions
@@ -0,0 +1,252 @@
using System;
using System.Collections.Generic;
using Qoo.Memory;
namespace Qoo.Param
{
// Token: 0x0200001D RID: 29
public class GameParam
{
// Token: 0x1700001D RID: 29
// (get) Token: 0x060000BB RID: 187 RVA: 0x000047B8 File Offset: 0x000029B8
public int Num
{
get
{
return this.m_Param.Count;
}
}
// Token: 0x060000BC RID: 188 RVA: 0x000047C8 File Offset: 0x000029C8
public void Clear()
{
this.m_Param.Clear();
}
// Token: 0x060000BD RID: 189 RVA: 0x000047D8 File Offset: 0x000029D8
public bool Attach(string name, string init, int index = 0, bool IsString = true)
{
if (this.m_Param.ContainsKey(name))
{
return false;
}
this.m_Param.Add(name, new PARAM_DATA(init, IsString, index));
return true;
}
// Token: 0x060000BE RID: 190 RVA: 0x00004810 File Offset: 0x00002A10
public void Init()
{
foreach (KeyValuePair<string, PARAM_DATA> keyValuePair in this.m_Param)
{
keyValuePair.Value.Init();
}
}
// Token: 0x060000BF RID: 191 RVA: 0x0000487C File Offset: 0x00002A7C
public void Copy(GameParam param)
{
this.Clear();
foreach (KeyValuePair<string, PARAM_DATA> keyValuePair in param.m_Param)
{
this.m_Param.Add(keyValuePair.Key, new PARAM_DATA(keyValuePair.Value));
}
}
// Token: 0x060000C0 RID: 192 RVA: 0x00004900 File Offset: 0x00002B00
public string Get(string name)
{
if (!this.m_Param.ContainsKey(name))
{
return string.Empty;
}
return this.m_Param[name].param;
}
// Token: 0x060000C1 RID: 193 RVA: 0x00004938 File Offset: 0x00002B38
public int GetIndex(string name)
{
if (!this.m_Param.ContainsKey(name))
{
return 0;
}
return this.m_Param[name].index;
}
// Token: 0x060000C2 RID: 194 RVA: 0x0000496C File Offset: 0x00002B6C
public int GetInt(string name)
{
if (!this.m_Param.ContainsKey(name))
{
Debug.Print("Get Param Int :" + name + " is none");
return 0;
}
int num = int.Parse(this.Get(name));
Debug.Print(string.Concat(new object[]
{
"Get Param Int :",
name,
" is ",
num
}));
return num;
}
// Token: 0x060000C3 RID: 195 RVA: 0x000049DC File Offset: 0x00002BDC
public bool Set(string name, string param_)
{
if (!this.m_Param.ContainsKey(name))
{
return false;
}
this.m_Param[name].Set(param_);
return true;
}
// Token: 0x060000C4 RID: 196 RVA: 0x00004A10 File Offset: 0x00002C10
public bool SetInt(string name, int param_)
{
if (!this.m_Param.ContainsKey(name))
{
return false;
}
this.m_Param[name].Set(param_.ToString());
return true;
}
// Token: 0x060000C5 RID: 197 RVA: 0x00004A4C File Offset: 0x00002C4C
public bool AddInt(string name, int add_param)
{
return this.m_Param.ContainsKey(name) && this.SetInt(name, this.GetInt(name) + add_param);
}
// Token: 0x060000C6 RID: 198 RVA: 0x00004A7C File Offset: 0x00002C7C
public bool IsString(string name)
{
return this.m_Param.ContainsKey(name) && this.m_Param[name].IsString;
}
// Token: 0x060000C7 RID: 199 RVA: 0x00004AB0 File Offset: 0x00002CB0
public int GetIndexNum(int iNo)
{
Debug.Assert(iNo >= 0 && iNo < this.m_Param.Count, "パラメータの範囲外です。\n");
Dictionary<string, PARAM_DATA>.Enumerator enumerator = this.m_Param.GetEnumerator();
for (int i = 0; i <= iNo; i++)
{
enumerator.MoveNext();
}
int num = 1;
while (enumerator.MoveNext())
{
KeyValuePair<string, PARAM_DATA> keyValuePair = enumerator.Current;
if (keyValuePair.Value.index == 0)
{
break;
}
num++;
}
return num;
}
// Token: 0x060000C8 RID: 200 RVA: 0x00004B3C File Offset: 0x00002D3C
public int SearchZeroIndex(string name)
{
Dictionary<string, PARAM_DATA>.Enumerator enumerator = this.m_Param.GetEnumerator();
if (this.m_Param.Count > 0)
{
int num = 0;
while (enumerator.MoveNext())
{
KeyValuePair<string, PARAM_DATA> keyValuePair = enumerator.Current;
if (keyValuePair.Key.IndexOf(name) == 0)
{
KeyValuePair<string, PARAM_DATA> keyValuePair2 = enumerator.Current;
if (keyValuePair2.Value.index == 0)
{
return num;
}
}
num++;
}
}
return -1;
}
// Token: 0x060000C9 RID: 201 RVA: 0x00004BB4 File Offset: 0x00002DB4
public string GetParamString(int index)
{
Dictionary<string, PARAM_DATA>.Enumerator enumerator = this.m_Param.GetEnumerator();
if (this.m_Param.Count > 0)
{
for (int num = 0; num != index; num++)
{
enumerator.MoveNext();
}
KeyValuePair<string, PARAM_DATA> keyValuePair = enumerator.Current;
if (keyValuePair.Value != null)
{
KeyValuePair<string, PARAM_DATA> keyValuePair2 = enumerator.Current;
return keyValuePair2.Value.param;
}
}
return string.Empty;
}
// Token: 0x060000CA RID: 202 RVA: 0x00004C28 File Offset: 0x00002E28
internal void SetParam(int index, int value)
{
Dictionary<string, PARAM_DATA>.Enumerator enumerator = this.m_Param.GetEnumerator();
if (this.m_Param.Count > 0)
{
for (int num = 0; num != index; num++)
{
enumerator.MoveNext();
}
KeyValuePair<string, PARAM_DATA> keyValuePair = enumerator.Current;
keyValuePair.Value.Set(value.ToString());
}
}
// Token: 0x060000CB RID: 203 RVA: 0x00004C88 File Offset: 0x00002E88
public void Save(MemFile mem)
{
mem.SetInt32(this.Num);
for (int num = 0; num != this.Num; num++)
{
string name = this.GetName(num);
mem.SetStringUtf16(name);
this.m_Param[name].Save(mem);
}
}
// Token: 0x060000CC RID: 204 RVA: 0x00004CDC File Offset: 0x00002EDC
public void Load(MemFile mem)
{
this.Clear();
int @int = mem.GetInt32();
for (int num = 0; num != @int; num++)
{
string stringUtf = mem.GetStringUtf16();
PARAM_DATA param_DATA = new PARAM_DATA(string.Empty, false, 0);
param_DATA.Load(mem);
this.m_Param.Add(stringUtf, param_DATA);
}
}
// Token: 0x060000CD RID: 205 RVA: 0x00004D30 File Offset: 0x00002F30
public string GetName(int index)
{
Dictionary<string, PARAM_DATA>.Enumerator enumerator = this.m_Param.GetEnumerator();
enumerator.MoveNext();
for (int num = 0; num != index; num++)
{
enumerator.MoveNext();
}
KeyValuePair<string, PARAM_DATA> keyValuePair = enumerator.Current;
return keyValuePair.Key;
}
// Token: 0x040000FE RID: 254
private Dictionary<string, PARAM_DATA> m_Param = new Dictionary<string, PARAM_DATA>();
}
}
@@ -0,0 +1,134 @@
using System;
using System.Collections.Generic;
using Qoo.Memory;
namespace Qoo.Param
{
// Token: 0x0200001E RID: 30
public class Look
{
// Token: 0x060000CF RID: 207 RVA: 0x00004DA8 File Offset: 0x00002FA8
public bool Add(string name)
{
if (!this.m_FileTbl.ContainsKey(name))
{
int count = this.m_FileTbl.Count;
this.m_FileTbl.Add(name, count);
this.m_PosTbl.Add(count, name);
this.m_LookTbl.Add(false);
}
return true;
}
// Token: 0x060000D0 RID: 208 RVA: 0x00004DFC File Offset: 0x00002FFC
public void Clear()
{
this.m_FileTbl.Clear();
this.m_PosTbl.Clear();
this.m_LookTbl.Clear();
}
// Token: 0x060000D1 RID: 209 RVA: 0x00004E20 File Offset: 0x00003020
public void Init()
{
this.SetAll(false);
}
// Token: 0x060000D2 RID: 210 RVA: 0x00004E2C File Offset: 0x0000302C
public void SetAll(bool Is = true)
{
for (int num = 0; num != this.m_LookTbl.Count; num++)
{
this.m_LookTbl[num] = Is;
}
}
// Token: 0x060000D3 RID: 211 RVA: 0x00004E64 File Offset: 0x00003064
public int Get(string name)
{
Debug.Assert(this.m_FileTbl.ContainsKey(name), string.Format("リストに登録されていない名前です{0}", name));
if (!this.m_FileTbl.ContainsKey(name))
{
return -1;
}
return this.m_FileTbl[name];
}
// Token: 0x060000D4 RID: 212 RVA: 0x00004EAC File Offset: 0x000030AC
public string Get(int pos)
{
Debug.Assert(this.m_PosTbl.ContainsKey(pos), string.Format("リストに登録されていないインデックスです{0}", pos));
return this.m_PosTbl[pos];
}
// Token: 0x060000D5 RID: 213 RVA: 0x00004EDC File Offset: 0x000030DC
public bool Set(string name, bool IsLook = true)
{
if (this.m_FileTbl.ContainsKey(name))
{
this.m_LookTbl[this.Get(name)] = IsLook;
return IsLook;
}
return false;
}
// Token: 0x060000D6 RID: 214 RVA: 0x00004F14 File Offset: 0x00003114
public bool Set(int pos, bool IsLook = true)
{
if (this.m_PosTbl.ContainsKey(pos))
{
this.m_LookTbl[pos] = IsLook;
return IsLook;
}
return false;
}
// Token: 0x060000D7 RID: 215 RVA: 0x00004F44 File Offset: 0x00003144
public bool IsLook(string name)
{
int num = this.Get(name);
return num != -1 && this.m_LookTbl[this.Get(name)];
}
// Token: 0x060000D8 RID: 216 RVA: 0x00004F74 File Offset: 0x00003174
public bool IsLook(int pos)
{
return this.m_LookTbl[pos];
}
// Token: 0x060000D9 RID: 217 RVA: 0x00004F84 File Offset: 0x00003184
public bool Save(MemFile mem)
{
mem.SetInt32(this.m_LookTbl.Count);
foreach (bool @bool in this.m_LookTbl)
{
mem.SetBool(@bool);
}
return true;
}
// Token: 0x060000DA RID: 218 RVA: 0x00004FFC File Offset: 0x000031FC
public bool Load(MemFile mem)
{
int @int = mem.GetInt32();
if (@int == this.m_LookTbl.Count)
{
for (int num = 0; num != this.m_LookTbl.Count; num++)
{
this.m_LookTbl[num] = mem.GetBool();
}
return true;
}
return false;
}
// Token: 0x040000FF RID: 255
private Dictionary<string, int> m_FileTbl = new Dictionary<string, int>();
// Token: 0x04000100 RID: 256
private Dictionary<int, string> m_PosTbl = new Dictionary<int, string>();
// Token: 0x04000101 RID: 257
private List<bool> m_LookTbl = new List<bool>();
}
}
@@ -0,0 +1,69 @@
using System;
using Qoo.Memory;
namespace Qoo.Param
{
// Token: 0x0200001C RID: 28
public class PARAM_DATA
{
// Token: 0x060000B4 RID: 180 RVA: 0x00004664 File Offset: 0x00002864
public PARAM_DATA(PARAM_DATA other)
{
this.param = other.param;
this.init_param = other.init_param;
this.IsString = other.IsString;
this.index = other.index;
}
// Token: 0x060000B5 RID: 181 RVA: 0x000046C0 File Offset: 0x000028C0
public PARAM_DATA(string s = "", bool b = false, int index_ = 0)
{
this.param = s;
this.init_param = s;
this.IsString = b;
this.index = index_;
}
// Token: 0x060000B6 RID: 182 RVA: 0x00004708 File Offset: 0x00002908
public void Init()
{
this.param = this.init_param;
}
// Token: 0x060000B7 RID: 183 RVA: 0x00004718 File Offset: 0x00002918
public void Set(string param_)
{
this.param = param_;
}
// Token: 0x060000B8 RID: 184 RVA: 0x00004724 File Offset: 0x00002924
public void Save(MemFile mem)
{
mem.SetStringUtf16(this.param);
mem.SetStringUtf16(this.init_param);
mem.SetBool(this.IsString);
mem.SetInt32(this.index);
}
// Token: 0x060000B9 RID: 185 RVA: 0x00004764 File Offset: 0x00002964
public void Load(MemFile mem)
{
this.param = mem.GetStringUtf16();
this.init_param = mem.GetStringUtf16();
this.IsString = mem.GetBool();
this.index = mem.GetInt32();
}
// Token: 0x040000FA RID: 250
public string param = string.Empty;
// Token: 0x040000FB RID: 251
public string init_param = string.Empty;
// Token: 0x040000FC RID: 252
public bool IsString;
// Token: 0x040000FD RID: 253
public int index;
}
}
@@ -0,0 +1,148 @@
using System;
using Qoo.Memory;
namespace Qoo.Param
{
// Token: 0x0200001F RID: 31
public class Read
{
// Token: 0x1700001E RID: 30
// (get) Token: 0x060000DC RID: 220 RVA: 0x0000506C File Offset: 0x0000326C
public short[] Data
{
get
{
return this.m_Pos;
}
}
// Token: 0x060000DD RID: 221 RVA: 0x00005074 File Offset: 0x00003274
public void Init()
{
for (int i = 0; i < this.m_Pos.GetLength(0); i++)
{
this.m_Pos[i] = 0;
}
}
// Token: 0x060000DE RID: 222 RVA: 0x000050A8 File Offset: 0x000032A8
public void Copy(Read other)
{
for (int i = 0; i < this.m_Pos.GetLength(0); i++)
{
this.m_Pos[i] = other.m_Pos[i];
}
}
// Token: 0x060000DF RID: 223 RVA: 0x000050E4 File Offset: 0x000032E4
public bool IsRead(int nKs, int nLabel, int nTag = 0)
{
if (!this.IsRengeKs(nKs))
{
return false;
}
if (this.IsRengeLabel(nLabel))
{
return (int)this.m_Pos[nKs * 200 + nLabel] > nTag;
}
if (nLabel < 0)
{
int num = 0;
for (int num2 = 0; num2 != 200; num2++)
{
num += (int)this.m_Pos[nKs * 200 + num2];
}
return num > nTag;
}
return false;
}
// Token: 0x060000E0 RID: 224 RVA: 0x00005158 File Offset: 0x00003358
public bool Set(int nKs, int nLabel, int nNo)
{
if (!this.IsRenge(nKs, nLabel))
{
return false;
}
this.m_Pos[nKs * 200 + nLabel] = (short)nNo;
return true;
}
// Token: 0x060000E1 RID: 225 RVA: 0x00005188 File Offset: 0x00003388
public bool Add(int nKs, int nLabel, int nNo)
{
if (!this.IsRenge(nKs, nLabel))
{
return false;
}
if ((int)this.m_Pos[nKs * 200 + nLabel] <= nNo)
{
this.m_Pos[nKs * 200 + nLabel] = (short)nNo;
}
return true;
}
// Token: 0x060000E2 RID: 226 RVA: 0x000051D0 File Offset: 0x000033D0
public int Get(int nKs, int nLabel)
{
if (!this.IsRenge(nKs, nLabel))
{
return 0;
}
return (int)this.m_Pos[nKs * 200 + nLabel];
}
// Token: 0x060000E3 RID: 227 RVA: 0x000051F4 File Offset: 0x000033F4
private bool IsRenge(int nKs, int nLabel)
{
return this.IsRengeKs(nKs) && this.IsRengeLabel(nLabel);
}
// Token: 0x060000E4 RID: 228 RVA: 0x0000520C File Offset: 0x0000340C
private bool IsRengeKs(int nKs)
{
return nKs >= 0 && nKs < 1000;
}
// Token: 0x060000E5 RID: 229 RVA: 0x00005220 File Offset: 0x00003420
private bool IsRengeLabel(int nLabel)
{
return nLabel >= 0 && nLabel < 200;
}
// Token: 0x060000E6 RID: 230 RVA: 0x00005234 File Offset: 0x00003434
public void SetAll()
{
for (int i = 0; i < this.m_Pos.GetLength(0); i++)
{
this.m_Pos[i] = 16383;
}
}
// Token: 0x060000E7 RID: 231 RVA: 0x0000526C File Offset: 0x0000346C
public bool Save(MemFile mem)
{
mem.SetInt32(this.m_Pos.GetLength(0));
mem.SetInt16Array(this.m_Pos);
return true;
}
// Token: 0x060000E8 RID: 232 RVA: 0x00005290 File Offset: 0x00003490
public bool Load(MemFile mem)
{
int @int = mem.GetInt32();
if (this.m_Pos.GetLength(0) == @int)
{
for (int num = 0; num != this.m_Pos.GetLength(0); num++)
{
this.m_Pos[num] = mem.GetInt16();
}
return true;
}
return false;
}
// Token: 0x04000102 RID: 258
private short[] m_Pos = new short[200000];
}
}