public ACMDFile OpenFile(string Filepath, ACMDType type) { DataSource source = new DataSource(FileMap.FromFile(Filepath)); if (*(buint *)source.Address != 0x41434D44) // ACMD { MessageBox.Show("Not an ACMD file:\n" + Filepath); return(null); } if (*(byte *)(source.Address + 0x04) == 0x02) { Runtime.WorkingEndian = Endianness.Little; } else if ((*(byte *)(source.Address + 0x04) == 0x00)) { Runtime.WorkingEndian = Endianness.Big; } else { return(null); } return(new ACMDFile(source) { Type = type }); }
public ACMDFile this[ACMDType type] { get { switch (type) { case ACMDType.Main: return(Main); case ACMDType.GFX: return(GFX); case ACMDType.SFX: return(SFX); case ACMDType.Expression: return(Expression); default: return(null); } } set { switch (type) { case ACMDType.Main: Main = value; break; case ACMDType.GFX: GFX = value; break; case ACMDType.SFX: SFX = value; break; case ACMDType.Expression: Expression = value; break; } } }
public ACMDFile OpenFile(string Filepath, ACMDType type) { DataSource source = new DataSource(FileMap.FromFile(Filepath)); if (*(byte *)(source.Address + 0x04) == 0x02) { Runtime.WorkingEndian = Endianness.Little; } else if ((*(byte *)(source.Address + 0x04) == 0x00)) { Runtime.WorkingEndian = Endianness.Big; } else { return(null); } return(new ACMDFile(source, Runtime.WorkingEndian) { Type = type }); }
public ITSCodeBox this[ACMDType type] { get { return((ITSCodeBox)tabControl1.TabPages[(int)type].Controls[0]); } }
public ACMDFile this[ACMDType type] { get { switch (type) { case ACMDType.Main: return Main; case ACMDType.GFX: return GFX; case ACMDType.SFX: return SFX; case ACMDType.Expression: return Expression; default: return null; } } set { switch (type) { case ACMDType.Main: Main = value; break; case ACMDType.GFX: GFX = value; break; case ACMDType.SFX: SFX = value; break; case ACMDType.Expression: Expression = value; break; } } }
public ACMDFile OpenFile(string Filepath, ACMDType type) { DataSource source = new DataSource(FileMap.FromFile(Filepath)); if (*(byte*)(source.Address + 0x04) == 0x02) Runtime.WorkingEndian = Endianness.Little; else if ((*(byte*)(source.Address + 0x04) == 0x00)) Runtime.WorkingEndian = Endianness.Big; else return null; return new ACMDFile(source, Runtime.WorkingEndian) { Type = type }; }