public Dictionary <byte, OpCode> GetVocabOpcodes() { if (_opcodes != null) { return(_opcodes); } var data = GetContent(false); ushort count = Helpers.GetUShortBE(data, 0); Dictionary <byte, OpCode> opcodes = new Dictionary <byte, OpCode>(); for (byte i = 0; i < count; i++) { ushort addr = Helpers.GetUShortBE(data, i * 2 + 2); ushort len = Helpers.GetUShortBE(data, addr); ushort type = Helpers.GetUShortBE(data, addr + 2); string name = GameEncoding.GetStringEscape(data, addr + 4, len - 2); opcodes.Add(i, new OpCode(type, name)); } return(_opcodes = opcodes); }
public string[] GetVocabNames() { if (_vocabNames != null) { return(_vocabNames); } var data = GetContent(false); ushort count = Helpers.GetUShortBE(data, 0); string[] names = new string[count]; for (int i = 0; i < count; i++) { ushort addr = Helpers.GetUShortBE(data, i * 2 + 2); ushort len = Helpers.GetUShortBE(data, addr); string name = GameEncoding.GetStringEscape(data, addr + 2, len); names[i] = name; } return(_vocabNames = names); }
public string GetStringEscape() => GameEncoding.GetStringEscape(Bytes);