Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- namespace Gemini.Datasets
- {
- public class SceneObjInfo114 : BinaryMap
- {
- public static readonly int BlockSize = 0x114;
- #region Game properties
- //1 +
- [Field(0x04)]
- public int ID = 0;
- //2 +
- [Field(0x08, 0x48)]
- public string Name1 = "0";
- //3 +
- [Field(0x6C, 0x2C)]
- public string Name2 = "0";
- //4
- [Field(0x93)]
- public byte Unknown1 = 0;
- //5 - is it string or float-array??
- [Field(0xB0, 0x0C)]
- public string Unknown2 = "0";
- //6 +
- [Field(0xBC)]
- public int Unknown3 = 0;
- //7
- //8
- //9
- //10 +
- [Field(0x98)]
- public int Unknown4 = 0;
- //11
- //12
- //13
- #endregion
- public SceneObjInfo114()
- {
- RawData = new byte[BlockSize];
- }
- public bool checkThirdField(string s)
- {
- for (int i=0;i<s.length();i++)
- {
- if (Convert.ToByte(s[i]) == '205')
- return false;
- }
- return true;
- }
- public override void Compile()
- {
- base.Compile();
- Buffer.BlockCopy(BitConverter.GetBytes(1.0f), 0, RawData, 0x84, 4);
- Buffer.BlockCopy(BitConverter.GetBytes(1.0f), 0, RawData, 0x88, 4);
- Buffer.BlockCopy(BitConverter.GetBytes(-1.0f), 0, RawData, 0x8C, 4);
- Buffer.BlockCopy(new byte[] { 0xFF, 0xFF, 0xFF }, 0, RawData, 0x90, 3);
- }
- public override string ToString()
- {
- StringBuilder stringBuilder = new StringBuilder();
- // Ugly but working (and simple) string building
- if (checkThirdField(Unknown2.ToString()))
- {
- stringBuilder.Append("+++");
- }
- else
- {
- stringBuilder.Append("---");
- }
- return stringBuilder.ToString();
- }
- }
- }
Add Comment
Please, Sign In to add comment