/// <summary>Get the state based on an <see cref="Asset"/> within the game.</summary> /// <param name="asset"></param> /// <returns></returns> public static State Get(Asset asset) { AlexandriaManager manager = (AlexandriaManager)asset.Manager; FileManager fileManager = asset.LoadFileManager; string path = Path.GetDirectoryName(Path.GetDirectoryName(asset.PathName)); Type gameType; if (fileManager.Exists(path + "/uw.exe")) { gameType = typeof(GameUltimaUnderworld); } else if (fileManager.Exists(path + "/uw2.exe")) { gameType = typeof(GameUltimaUnderworld2); } else if (fileManager.Exists(path + "/sshock.exe")) { gameType = typeof(GameSystemShock); } else { throw new Exception(string.Format("No game executable could be found in '{0}'.", path)); } Game game = (Game)manager.GetGame(gameType); return((State)((AlexandriaManager)asset.Manager).GetPathState(game, fileManager, path)); }
/// <summary> /// Initialise the state. /// </summary> /// <param name="manager"></param> /// <param name="rootPath"></param> /// <param name="fileManager"></param> /// <param name="archive"></param> public State(AlexandriaManager manager, string rootPath, FileManager fileManager, Archive archive = null) : base(manager, rootPath, fileManager) { if (archive != null) ArchivesMutable.Add(archive); foreach(var path in Directory.EnumerateFiles(RootPath, "*.bhd5")) { } }
/// <summary> /// Initialise the state. /// </summary> /// <param name="manager"></param> /// <param name="rootPath"></param> /// <param name="fileManager"></param> /// <param name="archive"></param> public State(AlexandriaManager manager, string rootPath, FileManager fileManager, Archive archive = null) : base(manager, rootPath, fileManager) { if (archive != null) { ArchivesMutable.Add(archive); } foreach (var path in Directory.EnumerateFiles(RootPath, "*.bhd5")) { } }
static void Main(string[] args) { //new FbxReader(new BinaryReader(File.OpenRead(@"D:\f**k.fbx"))); AlexandriaManager manager = new AlexandriaManager(); manager.LoadPlugins(); var window = new MainWindow(manager); window.Show(); window.FormClosed += (sender, e) => { System.Environment.Exit(0); }; System.Windows.Forms.Application.Run(); }
/// <summary> /// Initialise the window with the asset manager. /// </summary> /// <param name="manager">The asset manager to use.</param> public MainWindow(AlexandriaManager manager) { Manager = manager; InitializeComponent(); debuggModeToolStripMenuItem.Checked = manager.DebuggingEnabled; BackgroundOperationWorker = new BackgroundWorker() { WorkerReportsProgress = true, }; BackgroundOperationWorker.ProgressChanged += BackgroundOperationProgressChanged; BackgroundOperationWorker.DoWork += BackgroundOperationWork; BackgroundOperationWorker.RunWorkerAsync(); }
public State2(AlexandriaManager manager, string rootPath, FileManager fileManager, string iniFileName) : base(manager, rootPath, fileManager) { IniFile = new IniFile(RootPath + iniFileName); IniFileSection section = IniFile["Core.System"]; List <string> paths = section.GetMultiple("Paths"); paths.AddRange(section.GetMultiple("Paths__t")); // Thief 3: Deadly Shadows foreach (var path in paths) { var fullPath = RootPath + "System/" + path; var simplePath = Path.GetFullPath(Path.GetDirectoryName(fullPath)) + "\\" + Path.GetFileName(fullPath); AddPackagePath(simplePath); } }
/// <summary>Initialise the state.</summary> /// <param name="manager"></param> /// <param name="rootPath"></param> /// <param name="fileManager"></param> public State(AlexandriaManager manager, string rootPath, FileManager fileManager) : base(manager, rootPath, fileManager) { PackagePaths = new List<string>(); Packages = new List<Package>(); string Core = "Core", Class = "Class"; RegisterTypes(Core, Class, typeof(BoolProperty), typeof(Brush), typeof(ByteProperty), typeof(ClassProperty), typeof(Const), typeof(Alexandria.Engines.Unreal.Core.Enum), typeof(FloatProperty), typeof(Function), typeof(IntProperty), typeof(InterpolationPoint), typeof(Level), typeof(LevelInfo), typeof(LevelSummary), typeof(Light), typeof(Model), typeof(NameProperty), typeof(ObjectProperty), typeof(Polys), typeof(Struct), typeof(StructProperty), typeof(StrProperty), typeof(TextBuffer), typeof(ZoneInfo)); RegisterStateFrames(Core, Class, "AmbientSound", "Camera", "ElectricityEmitter", "HidePoint", "PathNode", "PatrolPoint", "PlayerStart", "Teleporter"); RegisterStateFrames(Core, Class, "ATM", "Candybar", "CeilingFan", "CeilingFanMotor", "Chair1", "CigaretteMachine", "Cigarettes", "ComputerPublic", "DXLogo", "DXText", "DeusExLevelInfo", "DeusExMover", "Flowers", "EidosLogo", "IonStormLogo", "JordanShea", "MedKit", "NathanMadison", "Plant2", "SandraRenton", "Sodacan", "SoyFood", "Trashcan2"); }
/// <summary>Initialise the state.</summary> /// <param name="manager"></param> /// <param name="rootPath"></param> /// <param name="fileManager"></param> public State(AlexandriaManager manager, string rootPath, FileManager fileManager) : base(manager, rootPath, fileManager) { PackagePaths = new List <string>(); Packages = new List <Package>(); string Core = "Core", Class = "Class"; RegisterTypes(Core, Class, typeof(BoolProperty), typeof(Brush), typeof(ByteProperty), typeof(ClassProperty), typeof(Const), typeof(Alexandria.Engines.Unreal.Core.Enum), typeof(FloatProperty), typeof(Function), typeof(IntProperty), typeof(InterpolationPoint), typeof(Level), typeof(LevelInfo), typeof(LevelSummary), typeof(Light), typeof(Model), typeof(NameProperty), typeof(ObjectProperty), typeof(Polys), typeof(Struct), typeof(StructProperty), typeof(StrProperty), typeof(TextBuffer), typeof(ZoneInfo)); RegisterStateFrames(Core, Class, "AmbientSound", "Camera", "ElectricityEmitter", "HidePoint", "PathNode", "PatrolPoint", "PlayerStart", "Teleporter"); RegisterStateFrames(Core, Class, "ATM", "Candybar", "CeilingFan", "CeilingFanMotor", "Chair1", "CigaretteMachine", "Cigarettes", "ComputerPublic", "DXLogo", "DXText", "DeusExLevelInfo", "DeusExMover", "Flowers", "EidosLogo", "IonStormLogo", "JordanShea", "MedKit", "NathanMadison", "Plant2", "SandraRenton", "Sodacan", "SoyFood", "Trashcan2"); }
public State2(AlexandriaManager manager, string rootPath, FileManager fileManager, string iniFileName) : base(manager, rootPath, fileManager) { IniFile = new IniFile(RootPath + iniFileName); IniFileSection section = IniFile["Core.System"]; List<string> paths = section.GetMultiple("Paths"); paths.AddRange(section.GetMultiple("Paths__t")); // Thief 3: Deadly Shadows foreach (var path in paths) { var fullPath = RootPath + "System/" + path; var simplePath = Path.GetFullPath(Path.GetDirectoryName(fullPath)) + "\\" + Path.GetFileName(fullPath); AddPackagePath(simplePath); } }
public State(AlexandriaManager manager, string rootPath, FileManager fileManager) : base(manager, rootPath, fileManager) { palettes = new PathStateAsset(this, "data/pals.dat"); }
/// <summary>Initialise the controls.</summary> /// <param name="manager"></param> public GameInstanceManager(AlexandriaManager manager) { InitializeComponent(); Manager = manager; }