public void TestTexmapsBitmapAdapter() { var factory = new TexmapFactory(Install, Container); var texmap = factory.GetTexmap <Bitmap>(1); Guard.RequireIsNotNull(texmap, "Texmap 0 was not found."); }
public void TestTexmapsWriteableBitmapAdapter() { TexmapFactory factory = new TexmapFactory(Install, Container); ImageSource texmap = factory.GetTexmap <ImageSource>(1); Guard.AssertIsNotNull(texmap, "Texmap 0 was not found."); }
public void TestTexmapsBitmapAdapter() { TexmapFactory factory = new TexmapFactory(Install, Container); Bitmap texmap = factory.GetTexmap <Bitmap>(1); Guard.AssertIsNotNull(texmap, "Texmap 0 was not found."); }
public OpenUOSDK(string path = "") { if (_ClientData == null && (path != "" || path != null)) { if (Directory.Exists(path)) { _ClientData = path; } } IoCContainer container = new IoCContainer(); container.RegisterModule <UltimaSDKCoreModule>(); container.RegisterModule <UltimaSDKBitmapModule>(); InstallLocation location = (_ClientData == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)_ClientData); if (!Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } _animationDataFactory = new AnimationDataFactory(location, container); _animationFactory = new AnimationFactory(location, container); _artworkFactory = new ArtworkFactory(location, container); _asciiFontFactory = new ASCIIFontFactory(location, container); _clilocFactory = new ClilocFactory(location, container); _gumpFactory = new GumpFactory(location, container); _skillsFactory = new SkillsFactory(location, container); _soundFactory = new SoundFactory(location, container); _texmapFactory = new TexmapFactory(location, container); _unicodeFontFactory = new UnicodeFontFactory(location, container); }
private static void InnerInit() { MapMaperSdk = new MakeMapSDK(); Container.RegisterModule <UltimaSDKCoreModule>(); Container.RegisterModule <OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); ArtworkFactory = new ArtworkFactory(InstallLocation, Container); TexmapFactory = new TexmapFactory(InstallLocation, Container); innerInit = true; }
private static void InnerInit() { MapMaperSdk = new MakeMapSDK(); Container.RegisterModule<UltimaSDKCoreModule>(); Container.RegisterModule<OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); ArtworkFactory = new ArtworkFactory(InstallLocation, Container); TexmapFactory = new TexmapFactory(InstallLocation, Container); innerInit = true; }
public MainWindow() { InitializeComponent(); Container = new IoCContainer(); InstallLocation = InstallationLocator.Locate().First(); SDK = new TilesCategorySDKModule(InstallLocation); Container.RegisterModule <UltimaSDKCoreModule>(); Container.RegisterModule <OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); FactoryArt = new ArtworkFactory(InstallLocation, Container); FactoryTex = new TexmapFactory(InstallLocation, Container); DataContext = SDK; }
public MainWindow() { InitializeComponent(); Container = new IoCContainer(); InstallLocation = InstallationLocator.Locate().First(); SDK = new TilesCategorySDKModule(InstallLocation); Container.RegisterModule<UltimaSDKCoreModule>(); Container.RegisterModule<OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); FactoryArt = new ArtworkFactory(InstallLocation, Container); FactoryTex = new TexmapFactory(InstallLocation,Container); DataContext = SDK; }
public override void Start() { base.Start(); var dataDirectory = Settings.UltimaOnline.DataDirectory; if (string.IsNullOrEmpty(dataDirectory) || !Directory.Exists(dataDirectory)) { using (var form = new SelectInstallForm("CoreAdapterTests")) { if (form.ShowDialog() == DialogResult.Cancel) { //TODO: End game } var version = form.SelectedInstall.Version; Settings.UltimaOnline.DataDirectory = dataDirectory = form.SelectedInstall.Directory; Settings.UltimaOnline.ClientVersion = version.ToString(); } } var install = new InstallLocation(dataDirectory); _spriteBatch = new SpriteBatch(GraphicsDevice) { VirtualResolution = new Vector3(_virtualResolution, 1) }; _artworkFactory = new ArtworkFactory(install, _container); _texmapFactory = new TexmapFactory(install, _container); _animationFactory = new AnimationFactory(install, _container); _gumpFactory = new GumpFactory(install, _container); _asciiFontFactory = new ASCIIFontFactory(install, _container); _unicodeFontFactory = new UnicodeFontFactory(install, _container); // register the renderer in the pipeline var scene = SceneSystem.SceneInstance.Scene; var compositor = ((SceneGraphicsCompositorLayers)scene.Settings.GraphicsCompositor); compositor.Master.Renderers.Add(new ClearRenderFrameRenderer()); compositor.Master.Renderers.Add(new SceneDelegateRenderer(RenderQuad)); }
private void buttonLoadFolder_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(textBoxFolder.Text)) { try { InstallLocation = new InstallLocation(textBoxFolder.Text); SDK = new TilesCategorySDKModule(InstallLocation); Container = new IoCContainer(); Container.RegisterModule <UltimaSDKCoreModule>(); Container.RegisterModule <OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); FactoryArt = new ArtworkFactory(InstallLocation, Container); FactoryTex = new TexmapFactory(InstallLocation, Container); } catch (Exception) { } } }
public OpenUOSDK(string path = "") { if (ClientDataPath == null && !String.IsNullOrWhiteSpace(path)) { if (Directory.Exists(path)) { ClientDataPath = path; } } var container = new Container(); container.RegisterModule <UltimaSDKCoreModule>(); container.RegisterModule <UltimaSDKBitmapModule>(); InstallLocation location = (ClientDataPath == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)ClientDataPath); if (location == null || String.IsNullOrWhiteSpace(location) || !Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } AnimationDataFactory = new AnimationDataFactory(location, container); AnimationFactory = new AnimationFactory(location, container); ArtFactory = new ArtworkFactory(location, container); AsciiFontFactory = new ASCIIFontFactory(location, container); ClilocFactory = new ClilocFactory(location, container); GumpFactory = new GumpFactory(location, container); SkillsFactory = new SkillsFactory(location, container); SoundFactory = new SoundFactory(location, container); TexmapFactory = new TexmapFactory(location, container); UnicodeFontFactory = new UnicodeFontFactory(location, container); }
public OpenUOSDK(string path = "") { if (ClientDataPath == null && !String.IsNullOrWhiteSpace(path)) { if (Directory.Exists(path)) { ClientDataPath = path; } } Container container = new Container(); container.RegisterModule<UltimaSDKCoreModule>(); container.RegisterModule<UltimaSDKBitmapModule>(); InstallLocation location = (ClientDataPath == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)ClientDataPath); if (location == null || String.IsNullOrWhiteSpace(location) || !Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } AnimationDataFactory = new AnimationDataFactory(location, container); AnimationFactory = new AnimationFactory(location, container); ArtFactory = new ArtworkFactory(location, container); AsciiFontFactory = new ASCIIFontFactory(location, container); ClilocFactory = new ClilocFactory(location, container); GumpFactory = new GumpFactory(location, container); SkillsFactory = new SkillsFactory(location, container); SoundFactory = new SoundFactory(location, container); TexmapFactory = new TexmapFactory(location, container); UnicodeFontFactory = new UnicodeFontFactory(location, container); }
public OpenUOSDK(string path = "") { if (_ClientData == null && (path != "" || path != null)) { if (Directory.Exists(path)) _ClientData = path; } IoCContainer container = new IoCContainer(); container.RegisterModule<UltimaSDKCoreModule>(); container.RegisterModule<UltimaSDKBitmapModule>(); InstallLocation location = (_ClientData == null ? InstallationLocator.Locate().FirstOrDefault() : (InstallLocation)_ClientData); if (!Directory.Exists(location.ToString())) { Utility.PushColor(ConsoleColor.Red); Console.WriteLine("OpenUO Error: Client files not found."); Utility.PopColor(); } _animationDataFactory = new AnimationDataFactory(location, container); _animationFactory = new AnimationFactory(location, container); _artworkFactory = new ArtworkFactory(location, container); _asciiFontFactory = new ASCIIFontFactory(location, container); _clilocFactory = new ClilocFactory(location, container); _gumpFactory = new GumpFactory(location, container); _skillsFactory = new SkillsFactory(location, container); _soundFactory = new SoundFactory(location, container); _texmapFactory = new TexmapFactory(location, container); _unicodeFontFactory = new UnicodeFontFactory(location, container); }
public void TestTexmapsBitmapAdapter() { TexmapFactory factory = new TexmapFactory(Install, Container); Bitmap texmap = factory.GetTexmap<Bitmap>(1); Guard.AssertIsNotNull(texmap, "Texmap 0 was not found."); }
public override void Start() { base.Start(); var installs = InstallationLocator.Locate(); _spriteBatch = new SpriteBatch(GraphicsDevice) { VirtualResolution = new Vector3(_virtualResolution, 1) }; _artworkFactory = new ArtworkFactory(installs.First(), _container); _texmapFactory = new TexmapFactory(installs.First(), _container); _animationFactory = new AnimationFactory(installs.First(), _container); _gumpFactory = new GumpFactory(installs.First(), _container); _asciiFontFactory = new ASCIIFontFactory(installs.First(), _container); _unicodeFontFactory = new UnicodeFontFactory(installs.First(), _container); // register the renderer in the pipeline var scene = SceneSystem.SceneInstance.Scene; var compositor = ((SceneGraphicsCompositorLayers)scene.Settings.GraphicsCompositor); compositor.Master.Renderers.Add(new ClearRenderFrameRenderer()); compositor.Master.Renderers.Add(new SceneDelegateRenderer(RenderQuad)); }
public void TestTexmapsWriteableBitmapAdapter() { TexmapFactory factory = new TexmapFactory(Install, Container); ImageSource texmap = factory.GetTexmap<ImageSource>(0); Guard.AssertIsNotNull(texmap, "Texmap 0 was not found."); }
public void TestTexmapsWriteableBitmapAdapter() { var factory = new TexmapFactory(Install, Container); var texmap = factory.GetTexmap<ImageSource>(1); Guard.RequireIsNotNull(texmap, "Texmap 0 was not found."); }
public override void Start() { base.Start(); var dataDirectory = Settings.UltimaOnline.DataDirectory; if (string.IsNullOrEmpty(dataDirectory) || !Directory.Exists(dataDirectory)) { using (var form = new SelectInstallForm("CoreAdapterTests")) { if (form.ShowDialog() == DialogResult.Cancel) { //TODO: End game } var version = form.SelectedInstall.Version; Settings.UltimaOnline.DataDirectory = dataDirectory = form.SelectedInstall.Directory; Settings.UltimaOnline.ClientVersion = version.ToString(); } } var install = new InstallLocation(dataDirectory); _spriteBatch = new SpriteBatch(GraphicsDevice) {VirtualResolution = new Vector3(_virtualResolution, 1)}; _artworkFactory = new ArtworkFactory(install, _container); _texmapFactory = new TexmapFactory(install, _container); _animationFactory = new AnimationFactory(install, _container); _gumpFactory = new GumpFactory(install, _container); _asciiFontFactory = new ASCIIFontFactory(install, _container); _unicodeFontFactory = new UnicodeFontFactory(install, _container); // register the renderer in the pipeline var scene = SceneSystem.SceneInstance.Scene; var compositor = ((SceneGraphicsCompositorLayers) scene.Settings.GraphicsCompositor); compositor.Master.Renderers.Add(new ClearRenderFrameRenderer()); compositor.Master.Renderers.Add(new SceneDelegateRenderer(RenderQuad)); }
private void buttonLoadFolder_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(textBoxFolder.Text)) { try { InstallLocation = new InstallLocation(textBoxFolder.Text); SDK = new TilesCategorySDKModule(InstallLocation); Container = new IoCContainer(); Container.RegisterModule<UltimaSDKCoreModule>(); Container.RegisterModule<OpenUO.Ultima.PresentationFramework.UltimaSDKImageSourceModule>(); FactoryArt = new ArtworkFactory(InstallLocation, Container); FactoryTex = new TexmapFactory(InstallLocation,Container); } catch (Exception) { } } }