diff --git a/Intersect.Client/.gitignore b/Intersect.Client.Core/.gitignore similarity index 100% rename from Intersect.Client/.gitignore rename to Intersect.Client.Core/.gitignore diff --git a/Intersect.Client/Core/Audio.cs b/Intersect.Client.Core/Core/Audio.cs similarity index 100% rename from Intersect.Client/Core/Audio.cs rename to Intersect.Client.Core/Core/Audio.cs diff --git a/Intersect.Client/Core/Bootstrapper.cs b/Intersect.Client.Core/Core/Bootstrapper.cs similarity index 100% rename from Intersect.Client/Core/Bootstrapper.cs rename to Intersect.Client.Core/Core/Bootstrapper.cs diff --git a/Intersect.Client/Core/ClientCommandLineOptions.cs b/Intersect.Client.Core/Core/ClientCommandLineOptions.cs similarity index 100% rename from Intersect.Client/Core/ClientCommandLineOptions.cs rename to Intersect.Client.Core/Core/ClientCommandLineOptions.cs diff --git a/Intersect.Client/Core/ClientContext.cs b/Intersect.Client.Core/Core/ClientContext.cs similarity index 100% rename from Intersect.Client/Core/ClientContext.cs rename to Intersect.Client.Core/Core/ClientContext.cs diff --git a/Intersect.Client/Core/Controls/ControlEnum.cs b/Intersect.Client.Core/Core/Controls/ControlEnum.cs similarity index 100% rename from Intersect.Client/Core/Controls/ControlEnum.cs rename to Intersect.Client.Core/Core/Controls/ControlEnum.cs diff --git a/Intersect.Client/Core/Controls/ControlMap.cs b/Intersect.Client.Core/Core/Controls/ControlMap.cs similarity index 100% rename from Intersect.Client/Core/Controls/ControlMap.cs rename to Intersect.Client.Core/Core/Controls/ControlMap.cs diff --git a/Intersect.Client/Core/Controls/ControlValue.cs b/Intersect.Client.Core/Core/Controls/ControlValue.cs similarity index 100% rename from Intersect.Client/Core/Controls/ControlValue.cs rename to Intersect.Client.Core/Core/Controls/ControlValue.cs diff --git a/Intersect.Client/Core/Controls/Controls.cs b/Intersect.Client.Core/Core/Controls/Controls.cs similarity index 100% rename from Intersect.Client/Core/Controls/Controls.cs rename to Intersect.Client.Core/Core/Controls/Controls.cs diff --git a/Intersect.Client/Core/Fade.cs b/Intersect.Client.Core/Core/Fade.cs similarity index 100% rename from Intersect.Client/Core/Fade.cs rename to Intersect.Client.Core/Core/Fade.cs diff --git a/Intersect.Client/Core/Graphics.cs b/Intersect.Client.Core/Core/Graphics.cs similarity index 100% rename from Intersect.Client/Core/Graphics.cs rename to Intersect.Client.Core/Core/Graphics.cs diff --git a/Intersect.Client/Core/IClientContext.cs b/Intersect.Client.Core/Core/IClientContext.cs similarity index 100% rename from Intersect.Client/Core/IClientContext.cs rename to Intersect.Client.Core/Core/IClientContext.cs diff --git a/Intersect.Client/Core/IPlatformRunner.cs b/Intersect.Client.Core/Core/IPlatformRunner.cs similarity index 100% rename from Intersect.Client/Core/IPlatformRunner.cs rename to Intersect.Client.Core/Core/IPlatformRunner.cs diff --git a/Intersect.Client/Core/Input.cs b/Intersect.Client.Core/Core/Input.cs similarity index 100% rename from Intersect.Client/Core/Input.cs rename to Intersect.Client.Core/Core/Input.cs diff --git a/Intersect.Client/Core/Main.cs b/Intersect.Client.Core/Core/Main.cs similarity index 100% rename from Intersect.Client/Core/Main.cs rename to Intersect.Client.Core/Core/Main.cs diff --git a/Intersect.Client/Core/Sounds/MapSound.cs b/Intersect.Client.Core/Core/Sounds/MapSound.cs similarity index 100% rename from Intersect.Client/Core/Sounds/MapSound.cs rename to Intersect.Client.Core/Core/Sounds/MapSound.cs diff --git a/Intersect.Client/Core/Sounds/Sound.cs b/Intersect.Client.Core/Core/Sounds/Sound.cs similarity index 100% rename from Intersect.Client/Core/Sounds/Sound.cs rename to Intersect.Client.Core/Core/Sounds/Sound.cs diff --git a/Intersect.Client/Entities/Animation.cs b/Intersect.Client.Core/Entities/Animation.cs similarity index 100% rename from Intersect.Client/Entities/Animation.cs rename to Intersect.Client.Core/Entities/Animation.cs diff --git a/Intersect.Client/Entities/ChatBubble.cs b/Intersect.Client.Core/Entities/ChatBubble.cs similarity index 100% rename from Intersect.Client/Entities/ChatBubble.cs rename to Intersect.Client.Core/Entities/ChatBubble.cs diff --git a/Intersect.Client/Entities/Critter.cs b/Intersect.Client.Core/Entities/Critter.cs similarity index 100% rename from Intersect.Client/Entities/Critter.cs rename to Intersect.Client.Core/Entities/Critter.cs diff --git a/Intersect.Client/Entities/Dash.cs b/Intersect.Client.Core/Entities/Dash.cs similarity index 100% rename from Intersect.Client/Entities/Dash.cs rename to Intersect.Client.Core/Entities/Dash.cs diff --git a/Intersect.Client/Entities/Entity.cs b/Intersect.Client.Core/Entities/Entity.cs similarity index 100% rename from Intersect.Client/Entities/Entity.cs rename to Intersect.Client.Core/Entities/Entity.cs diff --git a/Intersect.Client/Entities/Events/Dialog.cs b/Intersect.Client.Core/Entities/Events/Dialog.cs similarity index 100% rename from Intersect.Client/Entities/Events/Dialog.cs rename to Intersect.Client.Core/Entities/Events/Dialog.cs diff --git a/Intersect.Client/Entities/Events/Event.cs b/Intersect.Client.Core/Entities/Events/Event.cs similarity index 100% rename from Intersect.Client/Entities/Events/Event.cs rename to Intersect.Client.Core/Entities/Events/Event.cs diff --git a/Intersect.Client/Entities/FriendInstance.cs b/Intersect.Client.Core/Entities/FriendInstance.cs similarity index 100% rename from Intersect.Client/Entities/FriendInstance.cs rename to Intersect.Client.Core/Entities/FriendInstance.cs diff --git a/Intersect.Client/Entities/HotbarInstance.cs b/Intersect.Client.Core/Entities/HotbarInstance.cs similarity index 100% rename from Intersect.Client/Entities/HotbarInstance.cs rename to Intersect.Client.Core/Entities/HotbarInstance.cs diff --git a/Intersect.Client/Entities/PartyMember.cs b/Intersect.Client.Core/Entities/PartyMember.cs similarity index 100% rename from Intersect.Client/Entities/PartyMember.cs rename to Intersect.Client.Core/Entities/PartyMember.cs diff --git a/Intersect.Client/Entities/Player.cs b/Intersect.Client.Core/Entities/Player.cs similarity index 100% rename from Intersect.Client/Entities/Player.cs rename to Intersect.Client.Core/Entities/Player.cs diff --git a/Intersect.Client/Entities/Projectiles/Projectile.cs b/Intersect.Client.Core/Entities/Projectiles/Projectile.cs similarity index 100% rename from Intersect.Client/Entities/Projectiles/Projectile.cs rename to Intersect.Client.Core/Entities/Projectiles/Projectile.cs diff --git a/Intersect.Client/Entities/Projectiles/ProjectileSpawns.cs b/Intersect.Client.Core/Entities/Projectiles/ProjectileSpawns.cs similarity index 100% rename from Intersect.Client/Entities/Projectiles/ProjectileSpawns.cs rename to Intersect.Client.Core/Entities/Projectiles/ProjectileSpawns.cs diff --git a/Intersect.Client/Entities/Resource.cs b/Intersect.Client.Core/Entities/Resource.cs similarity index 100% rename from Intersect.Client/Entities/Resource.cs rename to Intersect.Client.Core/Entities/Resource.cs diff --git a/Intersect.Client/Entities/Status.cs b/Intersect.Client.Core/Entities/Status.cs similarity index 100% rename from Intersect.Client/Entities/Status.cs rename to Intersect.Client.Core/Entities/Status.cs diff --git a/Intersect.Client/General/Globals.cs b/Intersect.Client.Core/General/Globals.cs similarity index 100% rename from Intersect.Client/General/Globals.cs rename to Intersect.Client.Core/General/Globals.cs diff --git a/Intersect.Client/General/Time.cs b/Intersect.Client.Core/General/Time.cs similarity index 100% rename from Intersect.Client/General/Time.cs rename to Intersect.Client.Core/General/Time.cs diff --git a/Intersect.Client.Core/GlobalSuppressions.cs b/Intersect.Client.Core/GlobalSuppressions.cs new file mode 100644 index 0000000000..c04a503d3a --- /dev/null +++ b/Intersect.Client.Core/GlobalSuppressions.cs @@ -0,0 +1,21 @@ +[assembly: + System.Diagnostics.CodeAnalysis.SuppressMessage( + "Style", "IDE1005:Delegate invocation can be simplified.", + Justification = "if-null is more readable for newer programmers.", Scope = "member", + Target = + "~M:Intersect_Client.Classes.UI.Game.BanMuteBox.okayBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" + )] +[assembly: + System.Diagnostics.CodeAnalysis.SuppressMessage( + "Style", "IDE1005:Delegate invocation can be simplified.", + Justification = "if-null is more readable for newer programmers.", Scope = "member", + Target = + "~M:Intersect_Client.Classes.UI.Game.InputBox.cancelBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" + )] +[assembly: + System.Diagnostics.CodeAnalysis.SuppressMessage( + "Style", "IDE1005:Delegate invocation can be simplified.", + Justification = "if-null is more readable for newer programmers.", Scope = "member", + Target = + "~M:Intersect_Client.Classes.UI.Game.InputBox.okayBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" + )] diff --git a/Intersect.Client/Interface/Debugging/DebugWindow.cs b/Intersect.Client.Core/Interface/Debugging/DebugWindow.cs similarity index 100% rename from Intersect.Client/Interface/Debugging/DebugWindow.cs rename to Intersect.Client.Core/Interface/Debugging/DebugWindow.cs diff --git a/Intersect.Client/Interface/Game/Admin/AdminWindow.cs b/Intersect.Client.Core/Interface/Game/Admin/AdminWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Admin/AdminWindow.cs rename to Intersect.Client.Core/Interface/Game/Admin/AdminWindow.cs diff --git a/Intersect.Client/Interface/Game/Admin/BanMuteBox.cs b/Intersect.Client.Core/Interface/Game/Admin/BanMuteBox.cs similarity index 100% rename from Intersect.Client/Interface/Game/Admin/BanMuteBox.cs rename to Intersect.Client.Core/Interface/Game/Admin/BanMuteBox.cs diff --git a/Intersect.Client/Interface/Game/AnnouncementWindow.cs b/Intersect.Client.Core/Interface/Game/AnnouncementWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/AnnouncementWindow.cs rename to Intersect.Client.Core/Interface/Game/AnnouncementWindow.cs diff --git a/Intersect.Client/Interface/Game/Bag/BagItem.cs b/Intersect.Client.Core/Interface/Game/Bag/BagItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Bag/BagItem.cs rename to Intersect.Client.Core/Interface/Game/Bag/BagItem.cs diff --git a/Intersect.Client/Interface/Game/Bag/BagWindow.cs b/Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Bag/BagWindow.cs rename to Intersect.Client.Core/Interface/Game/Bag/BagWindow.cs diff --git a/Intersect.Client/Interface/Game/Bank/BankItem.cs b/Intersect.Client.Core/Interface/Game/Bank/BankItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Bank/BankItem.cs rename to Intersect.Client.Core/Interface/Game/Bank/BankItem.cs diff --git a/Intersect.Client/Interface/Game/Bank/BankWindow.cs b/Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Bank/BankWindow.cs rename to Intersect.Client.Core/Interface/Game/Bank/BankWindow.cs diff --git a/Intersect.Client/Interface/Game/Character/CharacterWindow.cs b/Intersect.Client.Core/Interface/Game/Character/CharacterWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Character/CharacterWindow.cs rename to Intersect.Client.Core/Interface/Game/Character/CharacterWindow.cs diff --git a/Intersect.Client/Interface/Game/Character/EquipmentItem.cs b/Intersect.Client.Core/Interface/Game/Character/EquipmentItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Character/EquipmentItem.cs rename to Intersect.Client.Core/Interface/Game/Character/EquipmentItem.cs diff --git a/Intersect.Client/Interface/Game/Chat/Chatbox.cs b/Intersect.Client.Core/Interface/Game/Chat/Chatbox.cs similarity index 100% rename from Intersect.Client/Interface/Game/Chat/Chatbox.cs rename to Intersect.Client.Core/Interface/Game/Chat/Chatbox.cs diff --git a/Intersect.Client/Interface/Game/Chat/ChatboxMsg.cs b/Intersect.Client.Core/Interface/Game/Chat/ChatboxMsg.cs similarity index 100% rename from Intersect.Client/Interface/Game/Chat/ChatboxMsg.cs rename to Intersect.Client.Core/Interface/Game/Chat/ChatboxMsg.cs diff --git a/Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs b/Intersect.Client.Core/Interface/Game/Crafting/CraftingWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Crafting/CraftingWindow.cs rename to Intersect.Client.Core/Interface/Game/Crafting/CraftingWindow.cs diff --git a/Intersect.Client/Interface/Game/Crafting/RecipeItem.cs b/Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Crafting/RecipeItem.cs rename to Intersect.Client.Core/Interface/Game/Crafting/RecipeItem.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/Components/ComponentBase.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/ComponentBase.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/Components/ComponentBase.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/ComponentBase.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/Components/DescriptionComponent.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/DescriptionComponent.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/Components/DescriptionComponent.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/DescriptionComponent.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/Components/DividerComponent.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/DividerComponent.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/Components/DividerComponent.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/DividerComponent.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/Components/HeaderComponent.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/HeaderComponent.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/Components/HeaderComponent.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/HeaderComponent.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/Components/RowContainerComponent.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/RowContainerComponent.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/Components/RowContainerComponent.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/Components/RowContainerComponent.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/DescriptionWindowBase.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/DescriptionWindowBase.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/DescriptionWindowBase.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/DescriptionWindowBase.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/ItemDescriptionWindow.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/ItemDescriptionWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/ItemDescriptionWindow.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/ItemDescriptionWindow.cs diff --git a/Intersect.Client/Interface/Game/DescriptionWindows/SpellDescriptionWindow.cs b/Intersect.Client.Core/Interface/Game/DescriptionWindows/SpellDescriptionWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/DescriptionWindows/SpellDescriptionWindow.cs rename to Intersect.Client.Core/Interface/Game/DescriptionWindows/SpellDescriptionWindow.cs diff --git a/Intersect.Client/Interface/Game/Draggable.cs b/Intersect.Client.Core/Interface/Game/Draggable.cs similarity index 100% rename from Intersect.Client/Interface/Game/Draggable.cs rename to Intersect.Client.Core/Interface/Game/Draggable.cs diff --git a/Intersect.Client/Interface/Game/EntityPanel/EntityBox.cs b/Intersect.Client.Core/Interface/Game/EntityPanel/EntityBox.cs similarity index 100% rename from Intersect.Client/Interface/Game/EntityPanel/EntityBox.cs rename to Intersect.Client.Core/Interface/Game/EntityPanel/EntityBox.cs diff --git a/Intersect.Client/Interface/Game/EntityPanel/PlayerStatusWindow.cs b/Intersect.Client.Core/Interface/Game/EntityPanel/PlayerStatusWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/EntityPanel/PlayerStatusWindow.cs rename to Intersect.Client.Core/Interface/Game/EntityPanel/PlayerStatusWindow.cs diff --git a/Intersect.Client/Interface/Game/EntityPanel/SpellStatus.cs b/Intersect.Client.Core/Interface/Game/EntityPanel/SpellStatus.cs similarity index 100% rename from Intersect.Client/Interface/Game/EntityPanel/SpellStatus.cs rename to Intersect.Client.Core/Interface/Game/EntityPanel/SpellStatus.cs diff --git a/Intersect.Client/Interface/Game/EscapeMenu.cs b/Intersect.Client.Core/Interface/Game/EscapeMenu.cs similarity index 100% rename from Intersect.Client/Interface/Game/EscapeMenu.cs rename to Intersect.Client.Core/Interface/Game/EscapeMenu.cs diff --git a/Intersect.Client/Interface/Game/EventWindow.cs b/Intersect.Client.Core/Interface/Game/EventWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/EventWindow.cs rename to Intersect.Client.Core/Interface/Game/EventWindow.cs diff --git a/Intersect.Client/Interface/Game/Friends/FriendsRow.cs b/Intersect.Client.Core/Interface/Game/Friends/FriendsRow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Friends/FriendsRow.cs rename to Intersect.Client.Core/Interface/Game/Friends/FriendsRow.cs diff --git a/Intersect.Client/Interface/Game/Friends/FriendsWindow.cs b/Intersect.Client.Core/Interface/Game/Friends/FriendsWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Friends/FriendsWindow.cs rename to Intersect.Client.Core/Interface/Game/Friends/FriendsWindow.cs diff --git a/Intersect.Client/Interface/Game/GameInterface.cs b/Intersect.Client.Core/Interface/Game/GameInterface.cs similarity index 100% rename from Intersect.Client/Interface/Game/GameInterface.cs rename to Intersect.Client.Core/Interface/Game/GameInterface.cs diff --git a/Intersect.Client/Interface/Game/GuildWindow.cs b/Intersect.Client.Core/Interface/Game/GuildWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/GuildWindow.cs rename to Intersect.Client.Core/Interface/Game/GuildWindow.cs diff --git a/Intersect.Client/Interface/Game/Hotbar/HotBar.cs b/Intersect.Client.Core/Interface/Game/Hotbar/HotBar.cs similarity index 100% rename from Intersect.Client/Interface/Game/Hotbar/HotBar.cs rename to Intersect.Client.Core/Interface/Game/Hotbar/HotBar.cs diff --git a/Intersect.Client/Interface/Game/Hotbar/HotbarItem.cs b/Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Hotbar/HotbarItem.cs rename to Intersect.Client.Core/Interface/Game/Hotbar/HotbarItem.cs diff --git a/Intersect.Client/Interface/Game/Inventory/InventoryItem.cs b/Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Inventory/InventoryItem.cs rename to Intersect.Client.Core/Interface/Game/Inventory/InventoryItem.cs diff --git a/Intersect.Client/Interface/Game/Inventory/InventoryWindow.cs b/Intersect.Client.Core/Interface/Game/Inventory/InventoryWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Inventory/InventoryWindow.cs rename to Intersect.Client.Core/Interface/Game/Inventory/InventoryWindow.cs diff --git a/Intersect.Client/Interface/Game/MapItem/MapItemIcon.cs b/Intersect.Client.Core/Interface/Game/MapItem/MapItemIcon.cs similarity index 100% rename from Intersect.Client/Interface/Game/MapItem/MapItemIcon.cs rename to Intersect.Client.Core/Interface/Game/MapItem/MapItemIcon.cs diff --git a/Intersect.Client/Interface/Game/MapItem/MapItemWindow.cs b/Intersect.Client.Core/Interface/Game/MapItem/MapItemWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/MapItem/MapItemWindow.cs rename to Intersect.Client.Core/Interface/Game/MapItem/MapItemWindow.cs diff --git a/Intersect.Client/Interface/Game/Menu.cs b/Intersect.Client.Core/Interface/Game/Menu.cs similarity index 100% rename from Intersect.Client/Interface/Game/Menu.cs rename to Intersect.Client.Core/Interface/Game/Menu.cs diff --git a/Intersect.Client/Interface/Game/PartyWindow.cs b/Intersect.Client.Core/Interface/Game/PartyWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/PartyWindow.cs rename to Intersect.Client.Core/Interface/Game/PartyWindow.cs diff --git a/Intersect.Client/Interface/Game/PictureWindow.cs b/Intersect.Client.Core/Interface/Game/PictureWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/PictureWindow.cs rename to Intersect.Client.Core/Interface/Game/PictureWindow.cs diff --git a/Intersect.Client/Interface/Game/QuestOfferWindow.cs b/Intersect.Client.Core/Interface/Game/QuestOfferWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/QuestOfferWindow.cs rename to Intersect.Client.Core/Interface/Game/QuestOfferWindow.cs diff --git a/Intersect.Client/Interface/Game/QuestsWindow.cs b/Intersect.Client.Core/Interface/Game/QuestsWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/QuestsWindow.cs rename to Intersect.Client.Core/Interface/Game/QuestsWindow.cs diff --git a/Intersect.Client/Interface/Game/Shop/ShopItem.cs b/Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Shop/ShopItem.cs rename to Intersect.Client.Core/Interface/Game/Shop/ShopItem.cs diff --git a/Intersect.Client/Interface/Game/Shop/ShopWindow.cs b/Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Shop/ShopWindow.cs rename to Intersect.Client.Core/Interface/Game/Shop/ShopWindow.cs diff --git a/Intersect.Client/Interface/Game/SimplifiedEscapeMenu.cs b/Intersect.Client.Core/Interface/Game/SimplifiedEscapeMenu.cs similarity index 100% rename from Intersect.Client/Interface/Game/SimplifiedEscapeMenu.cs rename to Intersect.Client.Core/Interface/Game/SimplifiedEscapeMenu.cs diff --git a/Intersect.Client/Interface/Game/Spells/SpellItem.cs b/Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Spells/SpellItem.cs rename to Intersect.Client.Core/Interface/Game/Spells/SpellItem.cs diff --git a/Intersect.Client/Interface/Game/Spells/SpellsWindow.cs b/Intersect.Client.Core/Interface/Game/Spells/SpellsWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Spells/SpellsWindow.cs rename to Intersect.Client.Core/Interface/Game/Spells/SpellsWindow.cs diff --git a/Intersect.Client/Interface/Game/Trades/TradeItem.cs b/Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs similarity index 100% rename from Intersect.Client/Interface/Game/Trades/TradeItem.cs rename to Intersect.Client.Core/Interface/Game/Trades/TradeItem.cs diff --git a/Intersect.Client/Interface/Game/Trades/TradeSegment.cs b/Intersect.Client.Core/Interface/Game/Trades/TradeSegment.cs similarity index 100% rename from Intersect.Client/Interface/Game/Trades/TradeSegment.cs rename to Intersect.Client.Core/Interface/Game/Trades/TradeSegment.cs diff --git a/Intersect.Client/Interface/Game/Trades/TradingWindow.cs b/Intersect.Client.Core/Interface/Game/Trades/TradingWindow.cs similarity index 100% rename from Intersect.Client/Interface/Game/Trades/TradingWindow.cs rename to Intersect.Client.Core/Interface/Game/Trades/TradingWindow.cs diff --git a/Intersect.Client/Interface/Game/Typewriting/Typewriter.cs b/Intersect.Client.Core/Interface/Game/Typewriting/Typewriter.cs similarity index 100% rename from Intersect.Client/Interface/Game/Typewriting/Typewriter.cs rename to Intersect.Client.Core/Interface/Game/Typewriting/Typewriter.cs diff --git a/Intersect.Client/Interface/Interface.cs b/Intersect.Client.Core/Interface/Interface.cs similarity index 100% rename from Intersect.Client/Interface/Interface.cs rename to Intersect.Client.Core/Interface/Interface.cs diff --git a/Intersect.Client/Interface/Menu/CreateCharacterWindow.cs b/Intersect.Client.Core/Interface/Menu/CreateCharacterWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/CreateCharacterWindow.cs rename to Intersect.Client.Core/Interface/Menu/CreateCharacterWindow.cs diff --git a/Intersect.Client/Interface/Menu/CreditsParser.cs b/Intersect.Client.Core/Interface/Menu/CreditsParser.cs similarity index 100% rename from Intersect.Client/Interface/Menu/CreditsParser.cs rename to Intersect.Client.Core/Interface/Menu/CreditsParser.cs diff --git a/Intersect.Client/Interface/Menu/CreditsWindow.cs b/Intersect.Client.Core/Interface/Menu/CreditsWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/CreditsWindow.cs rename to Intersect.Client.Core/Interface/Menu/CreditsWindow.cs diff --git a/Intersect.Client/Interface/Menu/ForgotPasswordWindow.cs b/Intersect.Client.Core/Interface/Menu/ForgotPasswordWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/ForgotPasswordWindow.cs rename to Intersect.Client.Core/Interface/Menu/ForgotPasswordWindow.cs diff --git a/Intersect.Client/Interface/Menu/IMainMenuWindow.cs b/Intersect.Client.Core/Interface/Menu/IMainMenuWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/IMainMenuWindow.cs rename to Intersect.Client.Core/Interface/Menu/IMainMenuWindow.cs diff --git a/Intersect.Client/Interface/Menu/LoginWindow.cs b/Intersect.Client.Core/Interface/Menu/LoginWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/LoginWindow.cs rename to Intersect.Client.Core/Interface/Menu/LoginWindow.cs diff --git a/Intersect.Client/Interface/Menu/MainMenu.cs b/Intersect.Client.Core/Interface/Menu/MainMenu.cs similarity index 100% rename from Intersect.Client/Interface/Menu/MainMenu.cs rename to Intersect.Client.Core/Interface/Menu/MainMenu.cs diff --git a/Intersect.Client/Interface/Menu/MainMenuWindow.Designer.cs b/Intersect.Client.Core/Interface/Menu/MainMenuWindow.Designer.cs similarity index 100% rename from Intersect.Client/Interface/Menu/MainMenuWindow.Designer.cs rename to Intersect.Client.Core/Interface/Menu/MainMenuWindow.Designer.cs diff --git a/Intersect.Client/Interface/Menu/MainMenuWindow.cs b/Intersect.Client.Core/Interface/Menu/MainMenuWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/MainMenuWindow.cs rename to Intersect.Client.Core/Interface/Menu/MainMenuWindow.cs diff --git a/Intersect.Client/Interface/Menu/MenuGuiBase.cs b/Intersect.Client.Core/Interface/Menu/MenuGuiBase.cs similarity index 100% rename from Intersect.Client/Interface/Menu/MenuGuiBase.cs rename to Intersect.Client.Core/Interface/Menu/MenuGuiBase.cs diff --git a/Intersect.Client/Interface/Menu/RegistrationWindow.cs b/Intersect.Client.Core/Interface/Menu/RegistrationWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/RegistrationWindow.cs rename to Intersect.Client.Core/Interface/Menu/RegistrationWindow.cs diff --git a/Intersect.Client/Interface/Menu/ResetPasswordWindow.cs b/Intersect.Client.Core/Interface/Menu/ResetPasswordWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/ResetPasswordWindow.cs rename to Intersect.Client.Core/Interface/Menu/ResetPasswordWindow.cs diff --git a/Intersect.Client/Interface/Menu/SelectCharacterWindow.cs b/Intersect.Client.Core/Interface/Menu/SelectCharacterWindow.cs similarity index 100% rename from Intersect.Client/Interface/Menu/SelectCharacterWindow.cs rename to Intersect.Client.Core/Interface/Menu/SelectCharacterWindow.cs diff --git a/Intersect.Client/Interface/MutableInterface.cs b/Intersect.Client.Core/Interface/MutableInterface.cs similarity index 100% rename from Intersect.Client/Interface/MutableInterface.cs rename to Intersect.Client.Core/Interface/MutableInterface.cs diff --git a/Intersect.Client/Interface/Shared/ErrorWindow.cs b/Intersect.Client.Core/Interface/Shared/ErrorWindow.cs similarity index 100% rename from Intersect.Client/Interface/Shared/ErrorWindow.cs rename to Intersect.Client.Core/Interface/Shared/ErrorWindow.cs diff --git a/Intersect.Client/Interface/Shared/InputBox.cs b/Intersect.Client.Core/Interface/Shared/InputBox.cs similarity index 100% rename from Intersect.Client/Interface/Shared/InputBox.cs rename to Intersect.Client.Core/Interface/Shared/InputBox.cs diff --git a/Intersect.Client/Interface/Shared/SettingsWindow.cs b/Intersect.Client.Core/Interface/Shared/SettingsWindow.cs similarity index 100% rename from Intersect.Client/Interface/Shared/SettingsWindow.cs rename to Intersect.Client.Core/Interface/Shared/SettingsWindow.cs diff --git a/Intersect.Client/Interface/Window.cs b/Intersect.Client.Core/Interface/Window.cs similarity index 100% rename from Intersect.Client/Interface/Window.cs rename to Intersect.Client.Core/Interface/Window.cs diff --git a/Intersect.Client.Core/Intersect.Client.Core.csproj b/Intersect.Client.Core/Intersect.Client.Core.csproj new file mode 100644 index 0000000000..1cff05557b --- /dev/null +++ b/Intersect.Client.Core/Intersect.Client.Core.csproj @@ -0,0 +1,95 @@ + + + + true + Library + + + + AscensionGameDev.Intersect.Client.Core + Game Client Core - Part of the Intersect 2D Game Creation Suite + LICENSE.md + Intersect.Client + Intersect Client Core + Properties + 512 + + + + + <_Parameter1>Intersect.Tests.Client + + + <_Parameter1>Intersect.SinglePlayer + + + <_Parameter1>Intersect Client + + + + + + + + + + + + + + + + + + + Resources\MonoGame.Framework.dll + + + Resources\libopenal.so.1 + + + Resources\libopenal.1.dylib + + + Resources\x64\soft_oal.dll + + + Resources\libSDL2-2.0.so.0 + + + Resources\libSDL2.dylib + + + Resources\x64\SDL2.dll + + + + + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Intersect.Client/Items/Item.cs b/Intersect.Client.Core/Items/Item.cs similarity index 100% rename from Intersect.Client/Items/Item.cs rename to Intersect.Client.Core/Items/Item.cs diff --git a/Intersect.Client/Items/MapItemInstance.cs b/Intersect.Client.Core/Items/MapItemInstance.cs similarity index 100% rename from Intersect.Client/Items/MapItemInstance.cs rename to Intersect.Client.Core/Items/MapItemInstance.cs diff --git a/Intersect.Client.Core/LICENSE.md b/Intersect.Client.Core/LICENSE.md new file mode 100644 index 0000000000..375feb9e74 --- /dev/null +++ b/Intersect.Client.Core/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Ascension Game Dev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Intersect.Client/Localization/Strings.cs b/Intersect.Client.Core/Localization/Strings.cs similarity index 99% rename from Intersect.Client/Localization/Strings.cs rename to Intersect.Client.Core/Localization/Strings.cs index 99c1465581..bf4e191df0 100644 --- a/Intersect.Client/Localization/Strings.cs +++ b/Intersect.Client.Core/Localization/Strings.cs @@ -96,8 +96,8 @@ private static void SynchronizeConfigurableStrings() private static void PostLoad() { - Program.OpenGLLink = Errors.OpenGlLink.ToString(); - Program.OpenALLink = Errors.OpenAllLink.ToString(); + Intersect.Client.Core.Program.OpenGLLink = Errors.OpenGlLink.ToString(); + Intersect.Client.Core.Program.OpenALLink = Errors.OpenAllLink.ToString(); } public static void Load() diff --git a/Intersect.Client/Maps/ActionMessage.cs b/Intersect.Client.Core/Maps/ActionMessage.cs similarity index 100% rename from Intersect.Client/Maps/ActionMessage.cs rename to Intersect.Client.Core/Maps/ActionMessage.cs diff --git a/Intersect.Client/Maps/MapAnimation.cs b/Intersect.Client.Core/Maps/MapAnimation.cs similarity index 100% rename from Intersect.Client/Maps/MapAnimation.cs rename to Intersect.Client.Core/Maps/MapAnimation.cs diff --git a/Intersect.Client/Maps/MapGrid.cs b/Intersect.Client.Core/Maps/MapGrid.cs similarity index 100% rename from Intersect.Client/Maps/MapGrid.cs rename to Intersect.Client.Core/Maps/MapGrid.cs diff --git a/Intersect.Client/Maps/MapInstance.cs b/Intersect.Client.Core/Maps/MapInstance.cs similarity index 99% rename from Intersect.Client/Maps/MapInstance.cs rename to Intersect.Client.Core/Maps/MapInstance.cs index b52ee8cf6c..c5bee65123 100644 --- a/Intersect.Client/Maps/MapInstance.cs +++ b/Intersect.Client.Core/Maps/MapInstance.cs @@ -1,4 +1,4 @@ -using System.Diagnostics; +using System.Diagnostics; using System.Collections.Concurrent; using Intersect.Client.Core; @@ -801,7 +801,7 @@ public void DrawItemNames() var rarity = itemBase.Rarity; if (tileItems[index].Quantity > 1) { - name = Localization.Strings.General.MapItemStackable.ToString(name, Strings.FormatQuantityAbbreviated(quantity)); + name = Strings.General.MapItemStackable.ToString(name, Strings.FormatQuantityAbbreviated(quantity)); } var color = CustomColors.Items.MapRarities.ContainsKey(rarity) ? CustomColors.Items.MapRarities[rarity] diff --git a/Intersect.Client/Maps/WeatherParticle.cs b/Intersect.Client.Core/Maps/WeatherParticle.cs similarity index 100% rename from Intersect.Client/Maps/WeatherParticle.cs rename to Intersect.Client.Core/Maps/WeatherParticle.cs diff --git a/Intersect.Client/MonoGame/Audio/MonoAudioInstance.cs b/Intersect.Client.Core/MonoGame/Audio/MonoAudioInstance.cs similarity index 100% rename from Intersect.Client/MonoGame/Audio/MonoAudioInstance.cs rename to Intersect.Client.Core/MonoGame/Audio/MonoAudioInstance.cs diff --git a/Intersect.Client/MonoGame/Audio/MonoMusicInstance.cs b/Intersect.Client.Core/MonoGame/Audio/MonoMusicInstance.cs similarity index 100% rename from Intersect.Client/MonoGame/Audio/MonoMusicInstance.cs rename to Intersect.Client.Core/MonoGame/Audio/MonoMusicInstance.cs diff --git a/Intersect.Client/MonoGame/Audio/MonoMusicSource.cs b/Intersect.Client.Core/MonoGame/Audio/MonoMusicSource.cs similarity index 100% rename from Intersect.Client/MonoGame/Audio/MonoMusicSource.cs rename to Intersect.Client.Core/MonoGame/Audio/MonoMusicSource.cs diff --git a/Intersect.Client/MonoGame/Audio/MonoSoundInstance.cs b/Intersect.Client.Core/MonoGame/Audio/MonoSoundInstance.cs similarity index 100% rename from Intersect.Client/MonoGame/Audio/MonoSoundInstance.cs rename to Intersect.Client.Core/MonoGame/Audio/MonoSoundInstance.cs diff --git a/Intersect.Client/MonoGame/Audio/MonoSoundSource.cs b/Intersect.Client.Core/MonoGame/Audio/MonoSoundSource.cs similarity index 100% rename from Intersect.Client/MonoGame/Audio/MonoSoundSource.cs rename to Intersect.Client.Core/MonoGame/Audio/MonoSoundSource.cs diff --git a/Intersect.Client/MonoGame/Database/MonoDatabase.cs b/Intersect.Client.Core/MonoGame/Database/MonoDatabase.cs similarity index 100% rename from Intersect.Client/MonoGame/Database/MonoDatabase.cs rename to Intersect.Client.Core/MonoGame/Database/MonoDatabase.cs diff --git a/Intersect.Client/MonoGame/File Management/MonoContentManager.cs b/Intersect.Client.Core/MonoGame/File Management/MonoContentManager.cs similarity index 100% rename from Intersect.Client/MonoGame/File Management/MonoContentManager.cs rename to Intersect.Client.Core/MonoGame/File Management/MonoContentManager.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoFont.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoFont.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoFont.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoFont.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoRenderTexture.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoRenderTexture.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoRenderTexture.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoRenderTexture.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoRenderer.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoRenderer.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoRenderer.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoRenderer.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoShader.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoShader.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoShader.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoShader.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoTexture.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoTexture.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoTexture.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoTexture.cs diff --git a/Intersect.Client/MonoGame/Graphics/MonoTileBuffer.cs b/Intersect.Client.Core/MonoGame/Graphics/MonoTileBuffer.cs similarity index 100% rename from Intersect.Client/MonoGame/Graphics/MonoTileBuffer.cs rename to Intersect.Client.Core/MonoGame/Graphics/MonoTileBuffer.cs diff --git a/Intersect.Client/MonoGame/Input/MonoClipboard.cs b/Intersect.Client.Core/MonoGame/Input/MonoClipboard.cs similarity index 100% rename from Intersect.Client/MonoGame/Input/MonoClipboard.cs rename to Intersect.Client.Core/MonoGame/Input/MonoClipboard.cs diff --git a/Intersect.Client/MonoGame/Input/MonoInput.cs b/Intersect.Client.Core/MonoGame/Input/MonoInput.cs similarity index 100% rename from Intersect.Client/MonoGame/Input/MonoInput.cs rename to Intersect.Client.Core/MonoGame/Input/MonoInput.cs diff --git a/Intersect.Client/MonoGame/IntersectGame.cs b/Intersect.Client.Core/MonoGame/IntersectGame.cs similarity index 100% rename from Intersect.Client/MonoGame/IntersectGame.cs rename to Intersect.Client.Core/MonoGame/IntersectGame.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/DllLoader.cs b/Intersect.Client.Core/MonoGame/NativeInterop/DllLoader.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/DllLoader.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/DllLoader.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/FunctionLoader.cs b/Intersect.Client.Core/MonoGame/NativeInterop/FunctionLoader.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/FunctionLoader.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/FunctionLoader.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/KnownLibrary.cs b/Intersect.Client.Core/MonoGame/NativeInterop/KnownLibrary.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/KnownLibrary.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/KnownLibrary.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/Platform.cs b/Intersect.Client.Core/MonoGame/NativeInterop/Platform.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/Platform.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/Platform.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/PlatformHelper.cs b/Intersect.Client.Core/MonoGame/NativeInterop/PlatformHelper.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/PlatformHelper.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/PlatformHelper.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/Sdl2.Rect.cs b/Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.Rect.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/Sdl2.Rect.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.Rect.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/Sdl2.Video.cs b/Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.Video.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/Sdl2.Video.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.Video.cs diff --git a/Intersect.Client/MonoGame/NativeInterop/Sdl2.cs b/Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.cs similarity index 100% rename from Intersect.Client/MonoGame/NativeInterop/Sdl2.cs rename to Intersect.Client.Core/MonoGame/NativeInterop/Sdl2.cs diff --git a/Intersect.Client/MonoGame/Network/MonoSocket.cs b/Intersect.Client.Core/MonoGame/Network/MonoSocket.cs similarity index 99% rename from Intersect.Client/MonoGame/Network/MonoSocket.cs rename to Intersect.Client.Core/MonoGame/Network/MonoSocket.cs index 7fefa5eaa5..390e083e9b 100644 --- a/Intersect.Client/MonoGame/Network/MonoSocket.cs +++ b/Intersect.Client.Core/MonoGame/Network/MonoSocket.cs @@ -1,4 +1,4 @@ -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Net; diff --git a/Intersect.Client/Networking/Network.cs b/Intersect.Client.Core/Networking/Network.cs similarity index 100% rename from Intersect.Client/Networking/Network.cs rename to Intersect.Client.Core/Networking/Network.cs diff --git a/Intersect.Client/Networking/NetworkStatus.cs b/Intersect.Client.Core/Networking/NetworkStatus.cs similarity index 100% rename from Intersect.Client/Networking/NetworkStatus.cs rename to Intersect.Client.Core/Networking/NetworkStatus.cs diff --git a/Intersect.Client/Networking/PacketHandler.cs b/Intersect.Client.Core/Networking/PacketHandler.cs similarity index 100% rename from Intersect.Client/Networking/PacketHandler.cs rename to Intersect.Client.Core/Networking/PacketHandler.cs diff --git a/Intersect.Client/Networking/PacketSender.cs b/Intersect.Client.Core/Networking/PacketSender.cs similarity index 100% rename from Intersect.Client/Networking/PacketSender.cs rename to Intersect.Client.Core/Networking/PacketSender.cs diff --git a/Intersect.Client/Networking/UnconnectedPacketHandlers/ServerStatusResponsePacketHandler.cs b/Intersect.Client.Core/Networking/UnconnectedPacketHandlers/ServerStatusResponsePacketHandler.cs similarity index 100% rename from Intersect.Client/Networking/UnconnectedPacketHandlers/ServerStatusResponsePacketHandler.cs rename to Intersect.Client.Core/Networking/UnconnectedPacketHandlers/ServerStatusResponsePacketHandler.cs diff --git a/Intersect.Client/Plugins/Audio/AudioManager.cs b/Intersect.Client.Core/Plugins/Audio/AudioManager.cs similarity index 100% rename from Intersect.Client/Plugins/Audio/AudioManager.cs rename to Intersect.Client.Core/Plugins/Audio/AudioManager.cs diff --git a/Intersect.Client/Plugins/Contexts/ClientPluginContext.cs b/Intersect.Client.Core/Plugins/Contexts/ClientPluginContext.cs similarity index 100% rename from Intersect.Client/Plugins/Contexts/ClientPluginContext.cs rename to Intersect.Client.Core/Plugins/Contexts/ClientPluginContext.cs diff --git a/Intersect.Client/Plugins/Helpers/ClientLifecycleHelper.cs b/Intersect.Client.Core/Plugins/Helpers/ClientLifecycleHelper.cs similarity index 100% rename from Intersect.Client/Plugins/Helpers/ClientLifecycleHelper.cs rename to Intersect.Client.Core/Plugins/Helpers/ClientLifecycleHelper.cs diff --git a/Intersect.Client/Plugins/Helpers/ClientNetworkHelper.cs b/Intersect.Client.Core/Plugins/Helpers/ClientNetworkHelper.cs similarity index 100% rename from Intersect.Client/Plugins/Helpers/ClientNetworkHelper.cs rename to Intersect.Client.Core/Plugins/Helpers/ClientNetworkHelper.cs diff --git a/Intersect.Client/Plugins/Helpers/PluginPacketSender.cs b/Intersect.Client.Core/Plugins/Helpers/PluginPacketSender.cs similarity index 100% rename from Intersect.Client/Plugins/Helpers/PluginPacketSender.cs rename to Intersect.Client.Core/Plugins/Helpers/PluginPacketSender.cs diff --git a/Intersect.Client.Core/Program.cs b/Intersect.Client.Core/Program.cs new file mode 100644 index 0000000000..83c3a9f9c9 --- /dev/null +++ b/Intersect.Client.Core/Program.cs @@ -0,0 +1,310 @@ +using Intersect.Logging; +using Intersect.Utilities; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using System.Resources; +using Intersect.Client.ThirdParty; +using Intersect.Configuration; +using Intersect.Extensions; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Graphics; + +namespace Intersect.Client.Core; + +/// +/// The main class. +/// +static class Program +{ + public static string OpenALLink { get; set; }= string.Empty; + + public static string OpenGLLink { get; set; }= string.Empty; + + /// + /// The main entry point for the application. + /// + [STAThread] + internal static void Main(string[] args) + { + var waitForDebugger = args.Contains("--debugger"); + + while (waitForDebugger && !Debugger.IsAttached) + { + System.Console.WriteLine("Waiting for debugger, sleeping 5000ms..."); + Thread.Sleep(5000); + } + + CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); + + ExportDependencies(); + Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "MonoGame.Framework.Client.dll")); + + try + { + var type = Type.GetType("Intersect.Client.Core.Bootstrapper", true); + Debug.Assert(type != null, "type != null"); + var method = type.GetMethod("Start"); + Debug.Assert(method != null, "method != null"); + method.Invoke(null, new object[] { args }); + } + catch (NoSuitableGraphicsDeviceException noSuitableGraphicsDeviceException) + { + try + { + var message = noSuitableGraphicsDeviceException.AsFullStackString(); + Console.Error.WriteLine(message); + File.WriteAllText("graphics-error.txt", message); + } + catch (Exception exception) + { + Console.Error.WriteLine(exception); + } + finally + { + if (!string.IsNullOrEmpty(OpenGLLink)) + { + BrowserUtils.Open(OpenGLLink); + } + + Environment.Exit(-1); + } + } + catch (NoAudioHardwareException noAudioHardwareException) + { + try + { + var message = noAudioHardwareException.AsFullStackString(); + Console.Error.WriteLine(message); + File.WriteAllText("audio-error.txt", message); + } + catch (Exception exception) + { + Console.Error.WriteLine(exception); + } + finally + { + if (!string.IsNullOrEmpty(OpenALLink)) + { + BrowserUtils.Open(OpenALLink); + } + + Environment.Exit(-1); + } + } + catch (Exception exception) + { + ClientContext.DispatchUnhandledException(exception, true, true); + } + } + + private static void ClearDlls() + { + //Delete any files that exist + DeleteIfExists("libopenal.so.1"); + DeleteIfExists("libSDL2-2.0.so.0"); + DeleteIfExists("SDL2.dll"); + DeleteIfExists("soft_oal.dll"); + DeleteIfExists("libopenal.1.dylib"); + DeleteIfExists("libSDL2-2.0.0.dylib"); + DeleteIfExists("openal32.dll"); + DeleteIfExists("MonoGame.Framework.Client.dll.config"); + DeleteIfExists("MonoGame.Framework.Client.dll"); + + DeleteIfExists("libsdkencryptedappticket.dylib"); + DeleteIfExists("libsteam_api.dylib"); + DeleteIfExists("libsdkencryptedappticket.so"); + DeleteIfExists("libsteam_api.so"); + DeleteIfExists("sdkencryptedappticket64.dll"); + DeleteIfExists("steam_api64.dll"); + } + + private static string ReadProcessOutput(string name) + { + Debug.Assert(name != null, "name != null"); + var processStartInfo = new ProcessStartInfo + { + UseShellExecute = false, + RedirectStandardOutput = true, + FileName = name + }; + + try + { + + using (var p = new Process { StartInfo = processStartInfo }) + { + p.Start(); + + // Do not wait for the child process to exit before + // reading to the end of its redirected stream. + // p.WaitForExit(); + // Read the output stream first and then wait. + var output = p.StandardOutput.ReadToEnd(); + p.WaitForExit(); + output = output.Trim(); + + return output; + } + } + catch (Exception exception) + { + Log.Warn(exception); + return string.Empty; + } + } + + private static void ExportDependencies() + { + // Delete any files that exist + ClearDlls(); + + var os = Environment.OSVersion; + var platformId = os.Platform; + if (platformId == PlatformID.Unix) + { + var unixName = ReadProcessOutput("uname"); + if (unixName?.Contains("Darwin") ?? false) + { + platformId = PlatformID.MacOSX; + } + } + + if (!Environment.Is64BitProcess) + { + throw new PlatformNotSupportedException("x86 (32-bit) systems are not supported."); + } + + switch (platformId) + { + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + ExportDependency("SDL2.dll", "x64"); + ExportDependency("soft_oal.dll", "x64"); + if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) + { + ExportDependency("sdkencryptedappticket64.dll", "runtimes/win-x64/native"); + ExportDependency("steam_api64.dll", "runtimes/win-x64/native"); + } + break; + + case PlatformID.MacOSX: + ExportDependency("libopenal.1.dylib"); + ExportDependency("libSDL2.dylib"); + ExportDependency("openal32.dll"); + ExportDependency("MonoGame.Framework.dll.config", nameoverride: "MonoGame.Framework.Client.dll.config"); + if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) + { + ExportDependency("libsdkencryptedappticket.dylib", "runtimes/osx/native"); + ExportDependency("libsteam_api.dylib", "runtimes/osx/native"); + } + break; + + case PlatformID.Xbox: + break; + + case PlatformID.Unix: + default: + ExportDependency("libopenal.so.1"); + ExportDependency("libSDL2-2.0.so.0"); + ExportDependency("openal32.dll"); + ExportDependency("MonoGame.Framework.dll.config", nameoverride: "MonoGame.Framework.Client.dll.config"); + if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) + { + ExportDependency("libsdkencryptedappticket.so", "runtimes/linux-x64/native"); + ExportDependency("libsteam_api.so", "runtimes/linux-x64/native"); + } + break; + } + + ExportDependency("MonoGame.Framework.dll", "", "MonoGame.Framework.Client.dll"); + } + + private static void ExportDependency(string filename, string? folder = default, string? nameoverride = default) + { + /* If it failed it means the file already exists and can't be deleted for whatever reason. */ + var path = string.IsNullOrEmpty(nameoverride) ? filename : nameoverride; + if (!DeleteIfExists(path)) + { + return; + } + + Debug.Assert(filename != null, "filename != null"); + + var assembly = Assembly.GetExecutingAssembly(); + var cleanFolder = folder?.Trim().Replace('/', '.').Replace('\\', '.').Replace('-', '_') ?? string.Empty; + if (cleanFolder.Length > 0) + { + cleanFolder += '.'; + } + var resourceName = $"Intersect.Client.Resources.{cleanFolder}{filename}"; + + if (assembly.GetManifestResourceNames().Contains(resourceName)) + { + Console.WriteLine($@"Resource: {resourceName}"); + using var resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName); + Debug.Assert(resourceStream != null, "resourceStream != null"); + using var fileStream = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite); + var data = new byte[resourceStream.Length]; + resourceStream.Read(data, 0, (int)resourceStream.Length); + fileStream.Write(data, 0, data.Length); + } + else + { + Log.Warn($"Was looking for '{resourceName}' but only the following resources were found:\n{string.Join("\n\t", assembly.GetManifestResourceNames())}"); + var resourceStream = assembly.GetManifestResourceStream("Intersect Client.g.resources"); + Debug.Assert(resourceStream != null, "resourceStream != null"); + var resources = new ResourceSet(resourceStream); + + path = Path.Combine(ClientConfiguration.ResourcesDirectory, folder, filename.Split('.')[0].Split('-')[0]); + + path = path.ToLower(); + + var enumerator = resources.GetEnumerator(); + while (enumerator.MoveNext()) + { + Console.WriteLine(enumerator.Key); + if (enumerator.Key == null || enumerator.Key.ToString().Trim() != path.Trim()) + { + continue; + } + + using var fs = new FileStream( + string.IsNullOrEmpty(nameoverride) ? filename : nameoverride, FileMode.OpenOrCreate, + FileAccess.ReadWrite + ); + var memoryStream = (UnmanagedMemoryStream)enumerator.Value; + if (memoryStream == null) + { + continue; + } + + var data = new byte[memoryStream.Length]; + var read = memoryStream.Read(data, 0, (int)memoryStream.Length); + Debug.Assert(read == memoryStream.Length); + fs.Write(data, 0, read); + } + } + } + + private static bool DeleteIfExists(string filename) + { + try + { + Debug.Assert(filename != null, "filename != null"); + if (File.Exists(filename)) + { + File.Delete(filename); + } + + return true; + } + catch + { + return false; + } + } + +} diff --git a/Intersect.Client/Resources/MonoGame.Framework.dll.config b/Intersect.Client.Core/Resources/MonoGame.Framework.dll.config similarity index 100% rename from Intersect.Client/Resources/MonoGame.Framework.dll.config rename to Intersect.Client.Core/Resources/MonoGame.Framework.dll.config diff --git a/Intersect.Client/Resources/Shaders/radialgradient.xnb b/Intersect.Client.Core/Resources/Shaders/radialgradient.xnb similarity index 100% rename from Intersect.Client/Resources/Shaders/radialgradient.xnb rename to Intersect.Client.Core/Resources/Shaders/radialgradient.xnb diff --git a/Intersect.Client/Resources/openal32.dll b/Intersect.Client.Core/Resources/openal32.dll similarity index 100% rename from Intersect.Client/Resources/openal32.dll rename to Intersect.Client.Core/Resources/openal32.dll diff --git a/Intersect.Client/Resources/runtimes/.gitignore b/Intersect.Client.Core/Resources/runtimes/.gitignore similarity index 100% rename from Intersect.Client/Resources/runtimes/.gitignore rename to Intersect.Client.Core/Resources/runtimes/.gitignore diff --git a/Intersect.Client/Spells/Spell.cs b/Intersect.Client.Core/Spells/Spell.cs similarity index 100% rename from Intersect.Client/Spells/Spell.cs rename to Intersect.Client.Core/Spells/Spell.cs diff --git a/Intersect.Client/ThirdParty/Steam.Attributes.cs b/Intersect.Client.Core/ThirdParty/Steam.Attributes.cs similarity index 100% rename from Intersect.Client/ThirdParty/Steam.Attributes.cs rename to Intersect.Client.Core/ThirdParty/Steam.Attributes.cs diff --git a/Intersect.Client/ThirdParty/Steam.NativeInterop.cs b/Intersect.Client.Core/ThirdParty/Steam.NativeInterop.cs similarity index 100% rename from Intersect.Client/ThirdParty/Steam.NativeInterop.cs rename to Intersect.Client.Core/ThirdParty/Steam.NativeInterop.cs diff --git a/Intersect.Client/ThirdParty/Steam.cs b/Intersect.Client.Core/ThirdParty/Steam.cs similarity index 100% rename from Intersect.Client/ThirdParty/Steam.cs rename to Intersect.Client.Core/ThirdParty/Steam.cs diff --git a/Intersect.Client/Utilities/MathHelper.cs b/Intersect.Client.Core/Utilities/MathHelper.cs similarity index 100% rename from Intersect.Client/Utilities/MathHelper.cs rename to Intersect.Client.Core/Utilities/MathHelper.cs diff --git a/Intersect.Client/GlobalSuppressions.cs b/Intersect.Client/GlobalSuppressions.cs index c04a503d3a..5f282702bb 100644 --- a/Intersect.Client/GlobalSuppressions.cs +++ b/Intersect.Client/GlobalSuppressions.cs @@ -1,21 +1 @@ -[assembly: - System.Diagnostics.CodeAnalysis.SuppressMessage( - "Style", "IDE1005:Delegate invocation can be simplified.", - Justification = "if-null is more readable for newer programmers.", Scope = "member", - Target = - "~M:Intersect_Client.Classes.UI.Game.BanMuteBox.okayBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" - )] -[assembly: - System.Diagnostics.CodeAnalysis.SuppressMessage( - "Style", "IDE1005:Delegate invocation can be simplified.", - Justification = "if-null is more readable for newer programmers.", Scope = "member", - Target = - "~M:Intersect_Client.Classes.UI.Game.InputBox.cancelBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" - )] -[assembly: - System.Diagnostics.CodeAnalysis.SuppressMessage( - "Style", "IDE1005:Delegate invocation can be simplified.", - Justification = "if-null is more readable for newer programmers.", Scope = "member", - Target = - "~M:Intersect_Client.Classes.UI.Game.InputBox.okayBtn_Clicked(IntersectClientExtras.Gwen.Control.Base,IntersectClientExtras.Gwen.Control.EventArguments.ClickedEventArgs)" - )] + \ No newline at end of file diff --git a/Intersect.Client/Intersect.Client.csproj b/Intersect.Client/Intersect.Client.csproj index f3ad896af8..f02b132405 100644 --- a/Intersect.Client/Intersect.Client.csproj +++ b/Intersect.Client/Intersect.Client.csproj @@ -1,119 +1,49 @@ - + - true WinExe - - true - true - true - - - - AscensionGameDev.Intersect.Client - Game Client - Part of the Intersect 2D Game Creation Suite - LICENSE.md - Intersect.Client - Intersect Client - Properties - app.manifest - 512 - - - - - <_Parameter1>Intersect.Tests.Client - - - <_Parameter1>Intersect.SinglePlayer - - - - - - - - - - - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - Icon.bmp - - - - - - - - - - Resources\MonoGame.Framework.dll - - - Resources\libopenal.so.1 - - - Resources\libopenal.1.dylib - - - Resources\x64\soft_oal.dll - - - Resources\libSDL2-2.0.so.0 - - - Resources\libSDL2.dylib - - - Resources\x64\SDL2.dll - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + true + true + true + + + + AscensionGameDev.Intersect.Client + Game Client - Part of the Intersect 2D Game Creation Suite + LICENSE.md + Intersect.Client + Intersect Client + Properties + app.manifest + 512 + + + + + + + + + Icon.bmp + + + + + + Resources.resx + True + True + + + + + + Resources.Designer.cs + ResXFileCodeGenerator + + + + diff --git a/Intersect.Client/Program.cs b/Intersect.Client/Program.cs index ac9163f45f..c4fa176aa7 100644 --- a/Intersect.Client/Program.cs +++ b/Intersect.Client/Program.cs @@ -1,311 +1 @@ -using Intersect.Logging; -using Intersect.Utilities; -using System.Diagnostics; -using System.Globalization; -using System.Reflection; -using System.Resources; -using Intersect.Client.Core; -using Intersect.Client.ThirdParty; -using Intersect.Configuration; -using Intersect.Extensions; -using Microsoft.Xna.Framework.Audio; -using Microsoft.Xna.Framework.Graphics; - -namespace Intersect.Client; - -/// -/// The main class. -/// -static class Program -{ - public static string OpenALLink { get; set; }= string.Empty; - - public static string OpenGLLink { get; set; }= string.Empty; - - /// - /// The main entry point for the application. - /// - [STAThread] - internal static void Main(string[] args) - { - var waitForDebugger = args.Contains("--debugger"); - - while (waitForDebugger && !Debugger.IsAttached) - { - System.Console.WriteLine("Waiting for debugger, sleeping 5000ms..."); - Thread.Sleep(5000); - } - - CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); - - ExportDependencies(); - Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, "MonoGame.Framework.Client.dll")); - - try - { - var type = Type.GetType("Intersect.Client.Core.Bootstrapper", true); - Debug.Assert(type != null, "type != null"); - var method = type.GetMethod("Start"); - Debug.Assert(method != null, "method != null"); - method.Invoke(null, new object[] { args }); - } - catch (NoSuitableGraphicsDeviceException noSuitableGraphicsDeviceException) - { - try - { - var message = noSuitableGraphicsDeviceException.AsFullStackString(); - Console.Error.WriteLine(message); - File.WriteAllText("graphics-error.txt", message); - } - catch (Exception exception) - { - Console.Error.WriteLine(exception); - } - finally - { - if (!string.IsNullOrEmpty(OpenGLLink)) - { - BrowserUtils.Open(OpenGLLink); - } - - Environment.Exit(-1); - } - } - catch (NoAudioHardwareException noAudioHardwareException) - { - try - { - var message = noAudioHardwareException.AsFullStackString(); - Console.Error.WriteLine(message); - File.WriteAllText("audio-error.txt", message); - } - catch (Exception exception) - { - Console.Error.WriteLine(exception); - } - finally - { - if (!string.IsNullOrEmpty(OpenALLink)) - { - BrowserUtils.Open(OpenALLink); - } - - Environment.Exit(-1); - } - } - catch (Exception exception) - { - ClientContext.DispatchUnhandledException(exception, true, true); - } - } - - private static void ClearDlls() - { - //Delete any files that exist - DeleteIfExists("libopenal.so.1"); - DeleteIfExists("libSDL2-2.0.so.0"); - DeleteIfExists("SDL2.dll"); - DeleteIfExists("soft_oal.dll"); - DeleteIfExists("libopenal.1.dylib"); - DeleteIfExists("libSDL2-2.0.0.dylib"); - DeleteIfExists("openal32.dll"); - DeleteIfExists("MonoGame.Framework.Client.dll.config"); - DeleteIfExists("MonoGame.Framework.Client.dll"); - - DeleteIfExists("libsdkencryptedappticket.dylib"); - DeleteIfExists("libsteam_api.dylib"); - DeleteIfExists("libsdkencryptedappticket.so"); - DeleteIfExists("libsteam_api.so"); - DeleteIfExists("sdkencryptedappticket64.dll"); - DeleteIfExists("steam_api64.dll"); - } - - private static string ReadProcessOutput(string name) - { - Debug.Assert(name != null, "name != null"); - var processStartInfo = new ProcessStartInfo - { - UseShellExecute = false, - RedirectStandardOutput = true, - FileName = name - }; - - try - { - - using (var p = new Process { StartInfo = processStartInfo }) - { - p.Start(); - - // Do not wait for the child process to exit before - // reading to the end of its redirected stream. - // p.WaitForExit(); - // Read the output stream first and then wait. - var output = p.StandardOutput.ReadToEnd(); - p.WaitForExit(); - output = output.Trim(); - - return output; - } - } - catch (Exception exception) - { - Log.Warn(exception); - return string.Empty; - } - } - - private static void ExportDependencies() - { - // Delete any files that exist - ClearDlls(); - - var os = Environment.OSVersion; - var platformId = os.Platform; - if (platformId == PlatformID.Unix) - { - var unixName = ReadProcessOutput("uname"); - if (unixName?.Contains("Darwin") ?? false) - { - platformId = PlatformID.MacOSX; - } - } - - if (!Environment.Is64BitProcess) - { - throw new PlatformNotSupportedException("x86 (32-bit) systems are not supported."); - } - - switch (platformId) - { - case PlatformID.Win32NT: - case PlatformID.Win32S: - case PlatformID.Win32Windows: - case PlatformID.WinCE: - ExportDependency("SDL2.dll", "x64"); - ExportDependency("soft_oal.dll", "x64"); - if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) - { - ExportDependency("sdkencryptedappticket64.dll", "runtimes/win-x64/native"); - ExportDependency("steam_api64.dll", "runtimes/win-x64/native"); - } - break; - - case PlatformID.MacOSX: - ExportDependency("libopenal.1.dylib"); - ExportDependency("libSDL2.dylib"); - ExportDependency("openal32.dll"); - ExportDependency("MonoGame.Framework.dll.config", nameoverride: "MonoGame.Framework.Client.dll.config"); - if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) - { - ExportDependency("libsdkencryptedappticket.dylib", "runtimes/osx/native"); - ExportDependency("libsteam_api.dylib", "runtimes/osx/native"); - } - break; - - case PlatformID.Xbox: - break; - - case PlatformID.Unix: - default: - ExportDependency("libopenal.so.1"); - ExportDependency("libSDL2-2.0.so.0"); - ExportDependency("openal32.dll"); - ExportDependency("MonoGame.Framework.dll.config", nameoverride: "MonoGame.Framework.Client.dll.config"); - if (Steam.SupportedAttribute.IsPresent(typeof(Program).Assembly)) - { - ExportDependency("libsdkencryptedappticket.so", "runtimes/linux-x64/native"); - ExportDependency("libsteam_api.so", "runtimes/linux-x64/native"); - } - break; - } - - ExportDependency("MonoGame.Framework.dll", "", "MonoGame.Framework.Client.dll"); - } - - private static void ExportDependency(string filename, string? folder = default, string? nameoverride = default) - { - /* If it failed it means the file already exists and can't be deleted for whatever reason. */ - var path = string.IsNullOrEmpty(nameoverride) ? filename : nameoverride; - if (!DeleteIfExists(path)) - { - return; - } - - Debug.Assert(filename != null, "filename != null"); - - var assembly = Assembly.GetExecutingAssembly(); - var cleanFolder = folder?.Trim().Replace('/', '.').Replace('\\', '.').Replace('-', '_') ?? string.Empty; - if (cleanFolder.Length > 0) - { - cleanFolder += '.'; - } - var resourceName = $"Intersect.Client.Resources.{cleanFolder}{filename}"; - - if (assembly.GetManifestResourceNames().Contains(resourceName)) - { - Console.WriteLine($@"Resource: {resourceName}"); - using var resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName); - Debug.Assert(resourceStream != null, "resourceStream != null"); - using var fileStream = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite); - var data = new byte[resourceStream.Length]; - resourceStream.Read(data, 0, (int)resourceStream.Length); - fileStream.Write(data, 0, data.Length); - } - else - { - Log.Warn($"Was looking for '{resourceName}' but only the following resources were found:\n{string.Join("\n\t", assembly.GetManifestResourceNames())}"); - var resourceStream = assembly.GetManifestResourceStream("Intersect Client.g.resources"); - Debug.Assert(resourceStream != null, "resourceStream != null"); - var resources = new ResourceSet(resourceStream); - - path = Path.Combine(ClientConfiguration.ResourcesDirectory, folder, filename.Split('.')[0].Split('-')[0]); - - path = path.ToLower(); - - var enumerator = resources.GetEnumerator(); - while (enumerator.MoveNext()) - { - Console.WriteLine(enumerator.Key); - if (enumerator.Key == null || enumerator.Key.ToString().Trim() != path.Trim()) - { - continue; - } - - using var fs = new FileStream( - string.IsNullOrEmpty(nameoverride) ? filename : nameoverride, FileMode.OpenOrCreate, - FileAccess.ReadWrite - ); - var memoryStream = (UnmanagedMemoryStream)enumerator.Value; - if (memoryStream == null) - { - continue; - } - - var data = new byte[memoryStream.Length]; - var read = memoryStream.Read(data, 0, (int)memoryStream.Length); - Debug.Assert(read == memoryStream.Length); - fs.Write(data, 0, read); - } - } - } - - private static bool DeleteIfExists(string filename) - { - try - { - Debug.Assert(filename != null, "filename != null"); - if (File.Exists(filename)) - { - File.Delete(filename); - } - - return true; - } - catch - { - return false; - } - } - -} +Intersect.Client.Core.Program.Main(args); \ No newline at end of file diff --git a/Intersect.Client/Properties/Resources.Designer.cs b/Intersect.Client/Properties/Resources.Designer.cs index a9d6e04676..e2d351a74a 100644 --- a/Intersect.Client/Properties/Resources.Designer.cs +++ b/Intersect.Client/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// O código foi gerado por uma ferramenta. +// Versão de Tempo de Execução:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se +// o código for gerado novamente. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace Intersect.Client.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Uma classe de recurso de tipo de alta segurança, para pesquisar cadeias de caracteres localizadas etc. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + // Essa classe foi gerada automaticamente pela classe StronglyTypedResourceBuilder + // através de uma ferramenta como ResGen ou Visual Studio. + // Para adicionar ou remover um associado, edite o arquivo .ResX e execute ResGen novamente + // com a opção /str, ou recrie o projeto do VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Retorna a instância de ResourceManager armazenada em cache usada por essa classe. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Substitui a propriedade CurrentUICulture do thread atual para todas as + /// pesquisas de recursos que usam essa classe de recurso de tipo de alta segurança. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { diff --git a/Intersect.Client/Resources/runtimes/linux-x64/native/.gitkeep b/Intersect.Client/Resources/runtimes/linux-x64/native/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Intersect.Client/Resources/runtimes/osx/native/.gitkeep b/Intersect.Client/Resources/runtimes/osx/native/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Intersect.Client/Resources/runtimes/win-x64/native/.gitkeep b/Intersect.Client/Resources/runtimes/win-x64/native/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Intersect.SinglePlayer/Intersect.SinglePlayer.csproj b/Intersect.SinglePlayer/Intersect.SinglePlayer.csproj index 1aa7177646..b2567021c1 100644 --- a/Intersect.SinglePlayer/Intersect.SinglePlayer.csproj +++ b/Intersect.SinglePlayer/Intersect.SinglePlayer.csproj @@ -8,7 +8,7 @@ - + diff --git a/Intersect.SinglePlayer/Program.cs b/Intersect.SinglePlayer/Program.cs index 7b68cf2758..7441d18641 100644 --- a/Intersect.SinglePlayer/Program.cs +++ b/Intersect.SinglePlayer/Program.cs @@ -1,4 +1,4 @@ -using System.Security.Cryptography; +using System.Security.Cryptography; using System.Text; using Intersect; using Intersect.Client.Core; @@ -57,7 +57,7 @@ Thread serverThread = new(args => Bootstrapper.Start(args as string[])); serverThread.Start(args.Append("--migrate-automatically").Distinct().ToArray()); - Intersect.Client.Program.Main(args); + Intersect.Client.Core.Program.Main(args); } finally { diff --git a/Intersect.Tests.Client/Intersect.Tests.Client.csproj b/Intersect.Tests.Client/Intersect.Tests.Client.csproj index 509d2401b3..68c23f3dc0 100644 --- a/Intersect.Tests.Client/Intersect.Tests.Client.csproj +++ b/Intersect.Tests.Client/Intersect.Tests.Client.csproj @@ -12,9 +12,9 @@ Intersect.Tests.Client - - - + + + diff --git a/Intersect.sln b/Intersect.sln index 203d495b53..cb622e34d2 100644 --- a/Intersect.sln +++ b/Intersect.sln @@ -4,7 +4,9 @@ VisualStudioVersion = 17.1.32228.430 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intersect.Core", "Intersect (Core)\Intersect.Core.csproj", "{BC304B43-1F2C-4454-9EDC-48F47357CA94}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intersect.Client", "Intersect.Client\Intersect.Client.csproj", "{2240F3DD-3694-4606-B181-F204CBBCB971}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intersect.Client", "Intersect.Client\Intersect.Client.csproj", "{250CFACD-95A8-438F-B66E-987279B89576}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intersect.Client.Core", "Intersect.Client.Core\Intersect.Client.Core.csproj", "{1456C77A-D0F6-4DAE-8D32-59BF335F5165}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intersect.Client.Framework", "Intersect.Client.Framework\Intersect.Client.Framework.csproj", "{40973F13-3339-4548-9008-FF76A0C8CD79}" EndProject @@ -97,12 +99,18 @@ Global {BC304B43-1F2C-4454-9EDC-48F47357CA94}.NoFody|Any CPU.Build.0 = Debug|Any CPU {BC304B43-1F2C-4454-9EDC-48F47357CA94}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC304B43-1F2C-4454-9EDC-48F47357CA94}.Release|Any CPU.Build.0 = Release|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.NoFody|Any CPU.ActiveCfg = Debug|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.NoFody|Any CPU.Build.0 = Debug|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2240F3DD-3694-4606-B181-F204CBBCB971}.Release|Any CPU.Build.0 = Release|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.Debug|Any CPU.Build.0 = Debug|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.NoFody|Any CPU.ActiveCfg = Debug|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.NoFody|Any CPU.Build.0 = Debug|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.Release|Any CPU.ActiveCfg = Release|Any CPU + {250CFACD-95A8-438F-B66E-987279B89576}.Release|Any CPU.Build.0 = Release|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.NoFody|Any CPU.ActiveCfg = Debug|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.NoFody|Any CPU.Build.0 = Debug|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1456C77A-D0F6-4DAE-8D32-59BF335F5165}.Release|Any CPU.Build.0 = Release|Any CPU {40973F13-3339-4548-9008-FF76A0C8CD79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {40973F13-3339-4548-9008-FF76A0C8CD79}.Debug|Any CPU.Build.0 = Debug|Any CPU {40973F13-3339-4548-9008-FF76A0C8CD79}.NoFody|Any CPU.ActiveCfg = Debug|Any CPU