public bool ClaimStoryFile(IStoryFile storyFile) { var sig = Encoding.ASCII.GetBytes(Signature); var magic = storyFile.ReadBytes(0, (uint)sig.Length); return sig.SequenceEqual(magic); }
private static UInt16 ReadZint(IStoryFile storyFile, uint offset) { var b0 = storyFile.ReadByte(offset); var b1 = storyFile.ReadByte(offset + 1); return((UInt16)((b0 << 8) | b1)); }
private static UInt16 ReadZint(IStoryFile storyFile, uint offset) { var b0 = storyFile.ReadByte(offset); var b1 = storyFile.ReadByte(offset + 1); return (UInt16)((b0 << 8) | b1); }
public bool ClaimStoryFile(IStoryFile storyFile) { var sig = Encoding.ASCII.GetBytes(Signature); var magic = storyFile.ReadBytes(0, (uint)sig.Length); return(sig.SequenceEqual(magic)); }
public bool ClaimStoryFile(IStoryFile storyFile) { uint indexTemp; if (storyFile.Extent < 16 || !storyFile.TryIndexOf("FORM", 0, 4, out indexTemp) || !storyFile.TryIndexOf("IFRS", 8, 8 + 4, out indexTemp)) { return false; } return true; }
public bool ClaimStoryFile(IStoryFile storyFile) { uint indexTemp; if (storyFile.Extent < 16 || !storyFile.TryIndexOf("FORM", 0, 4, out indexTemp) || !storyFile.TryIndexOf("IFRS", 8, 8 + 4, out indexTemp)) { return(false); } return(true); }
public bool ClaimStoryFile(IStoryFile storyFile) { byte ver = storyFile.ReadByte(0); if (storyFile.Extent < 0x3c || ver < 1 || ver > 8) { return(false); } for (uint i = 4; i <= 14; i += 2) { var j = ReadZint(storyFile, i); if (j > storyFile.Extent || j < 0x40) { return(false); } } return(true); }
public bool ClaimStoryFile(IStoryFile storyFile) { byte ver = storyFile.ReadByte(0); if (storyFile.Extent < 0x3c || ver < 1 || ver > 8) { return false; } for (uint i = 4; i <= 14; i += 2) { var j = ReadZint(storyFile, i); if (j > storyFile.Extent || j < 0x40) { return false; } } return true; }
public GlulxHandler(ITreatyProvider provider, IStoryFile storyFile) : base(provider, storyFile) { }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return(new GlulxHandler(this, storyFile)); }
public TreatyStoryFileHandlerBase(ITreatyProvider provider, IStoryFile storyFile) { this.Provider = provider; this.StoryFile = storyFile; }
public Tads2Handler(ITreatyProvider provider, IStoryFile storyFile) : base(provider, storyFile) { }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return(new Tads2Handler(this, storyFile)); }
public BlorbHandler(ITreatyProvider provider, IStoryFile storyFile) : base(provider, storyFile) { this.reader = new BlorbReader(storyFile.Stream, false); }
public ZcodeHandler(ITreatyProvider provider, IStoryFile storyFile) : base(provider, storyFile) { }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return new BlorbHandler(this, storyFile); }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return new Tads2Handler(this, storyFile); }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return(new BlorbHandler(this, storyFile)); }
public IStoryFileHandler GetStoryFileHandler(IStoryFile storyFile) { return new GlulxHandler(this, storyFile); }