From 4271241628f35fd193f88d2c17d826666ae840d8 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Mon, 14 Dec 2020 15:42:45 +0800 Subject: [PATCH] Renamed MPClient folder to DebugEditor Renamed FalloutClient.exe to FalloutDebug.exe Fixed a crash bug in commit 82db339 when using the debug editor. --- {MPClient => DebugEditor}/DebugEditor.Designer.cs | 0 {MPClient => DebugEditor}/DebugEditor.cs | 0 {MPClient => DebugEditor}/DebugEditor.resx | 0 {MPClient => DebugEditor}/EditorConnection.cs | 0 {MPClient => DebugEditor}/EditorWindow.Designer.cs | 0 {MPClient => DebugEditor}/EditorWindow.cs | 0 {MPClient => DebugEditor}/EditorWindow.resx | 0 {MPClient => DebugEditor}/Program.cs | 3 ++- {MPClient => DebugEditor}/Properties/AssemblyInfo.cs | 0 {MPClient => DebugEditor}/README.md | 0 {MPClient => DebugEditor}/SfallDebugEditor.csproj | 8 ++++---- {MPClient => DebugEditor}/SfallDebugEditor.sln | 0 artifacts/ddraw.ini | 2 +- sfall/DebugEditor.cpp | 8 ++++---- 14 files changed, 11 insertions(+), 10 deletions(-) rename {MPClient => DebugEditor}/DebugEditor.Designer.cs (100%) rename {MPClient => DebugEditor}/DebugEditor.cs (100%) rename {MPClient => DebugEditor}/DebugEditor.resx (100%) rename {MPClient => DebugEditor}/EditorConnection.cs (100%) rename {MPClient => DebugEditor}/EditorWindow.Designer.cs (100%) rename {MPClient => DebugEditor}/EditorWindow.cs (100%) rename {MPClient => DebugEditor}/EditorWindow.resx (100%) rename {MPClient => DebugEditor}/Program.cs (88%) rename {MPClient => DebugEditor}/Properties/AssemblyInfo.cs (100%) rename {MPClient => DebugEditor}/README.md (100%) rename {MPClient => DebugEditor}/SfallDebugEditor.csproj (97%) rename {MPClient => DebugEditor}/SfallDebugEditor.sln (100%) diff --git a/MPClient/DebugEditor.Designer.cs b/DebugEditor/DebugEditor.Designer.cs similarity index 100% rename from MPClient/DebugEditor.Designer.cs rename to DebugEditor/DebugEditor.Designer.cs diff --git a/MPClient/DebugEditor.cs b/DebugEditor/DebugEditor.cs similarity index 100% rename from MPClient/DebugEditor.cs rename to DebugEditor/DebugEditor.cs diff --git a/MPClient/DebugEditor.resx b/DebugEditor/DebugEditor.resx similarity index 100% rename from MPClient/DebugEditor.resx rename to DebugEditor/DebugEditor.resx diff --git a/MPClient/EditorConnection.cs b/DebugEditor/EditorConnection.cs similarity index 100% rename from MPClient/EditorConnection.cs rename to DebugEditor/EditorConnection.cs diff --git a/MPClient/EditorWindow.Designer.cs b/DebugEditor/EditorWindow.Designer.cs similarity index 100% rename from MPClient/EditorWindow.Designer.cs rename to DebugEditor/EditorWindow.Designer.cs diff --git a/MPClient/EditorWindow.cs b/DebugEditor/EditorWindow.cs similarity index 100% rename from MPClient/EditorWindow.cs rename to DebugEditor/EditorWindow.cs diff --git a/MPClient/EditorWindow.resx b/DebugEditor/EditorWindow.resx similarity index 100% rename from MPClient/EditorWindow.resx rename to DebugEditor/EditorWindow.resx diff --git a/MPClient/Program.cs b/DebugEditor/Program.cs similarity index 88% rename from MPClient/Program.cs rename to DebugEditor/Program.cs index c670b671..4b13a202 100644 --- a/MPClient/Program.cs +++ b/DebugEditor/Program.cs @@ -15,7 +15,8 @@ namespace FalloutClient { if (args.Length == 1 && args[0] == "-debugedit") { Application.Run(new DebugEditor(new EditorConnection())); } else { - MessageBox.Show("The debug editor can only be run from the game.", + MessageBox.Show("The debug editor can only be run from the game.\n" + + "Use the key assigned to the DebugEditorKey option in ddraw.ini to run the debugger.", "sfall Debug Editor", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } diff --git a/MPClient/Properties/AssemblyInfo.cs b/DebugEditor/Properties/AssemblyInfo.cs similarity index 100% rename from MPClient/Properties/AssemblyInfo.cs rename to DebugEditor/Properties/AssemblyInfo.cs diff --git a/MPClient/README.md b/DebugEditor/README.md similarity index 100% rename from MPClient/README.md rename to DebugEditor/README.md diff --git a/MPClient/SfallDebugEditor.csproj b/DebugEditor/SfallDebugEditor.csproj similarity index 97% rename from MPClient/SfallDebugEditor.csproj rename to DebugEditor/SfallDebugEditor.csproj index 06709b9e..47e973b5 100644 --- a/MPClient/SfallDebugEditor.csproj +++ b/DebugEditor/SfallDebugEditor.csproj @@ -9,14 +9,13 @@ WinExe Properties FalloutClient - FalloutClient + FalloutDebug 3.5 v2.0 - false publish\ true Disk @@ -29,6 +28,7 @@ true 0 1.0.0.%2a + false false false @@ -42,14 +42,14 @@ 4 - pdbonly + none true bin\Release\ TRACE prompt 4 true - true + false diff --git a/MPClient/SfallDebugEditor.sln b/DebugEditor/SfallDebugEditor.sln similarity index 100% rename from MPClient/SfallDebugEditor.sln rename to DebugEditor/SfallDebugEditor.sln diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 3ef04288..3c12e1a5 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -207,7 +207,7 @@ FastMoveFromContainer=0 ;A key to press to open a debug game editor ;Set to 0 to disable, or a DX scancode otherwise -;Requires sfall debugging mode and FalloutClient.exe from the modders pack +;Requires sfall debugging mode and FalloutDebug.exe from the modders pack DebugEditorKey=0 ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/sfall/DebugEditor.cpp b/sfall/DebugEditor.cpp index 78ac28ba..7b509062 100644 --- a/sfall/DebugEditor.cpp +++ b/sfall/DebugEditor.cpp @@ -123,7 +123,7 @@ static void RunEditorInternal(SOCKET &s) { InternalSend(s, &numArrays, 4); InternalSend(s, &numCritters, 4); - sGlobalVar* sglobals=new sGlobalVar[numSGlobals]; + sGlobalVar* sglobals = new sGlobalVar[numSGlobals]; GetGlobals(sglobals); sArray* arrays = new sArray[numArrays]; @@ -147,12 +147,12 @@ static void RunEditorInternal(SOCKET &s) { case CODE_SET_GLOBAL: InternalRecv(s, &id, 4); InternalRecv(s, &val, 4); - *ptr_game_global_vars[id] = val; + (*ptr_game_global_vars)[id] = val; break; case CODE_SET_MAPVAR: InternalRecv(s, &id, 4); InternalRecv(s, &val, 4); - *ptr_map_global_vars[id] = val; + (*ptr_map_global_vars)[id] = val; break; case CODE_GET_CRITTER: InternalRecv(s, &id, 4); @@ -270,7 +270,7 @@ void RunDebugEditor() { si.cb = sizeof(si); - if (!CreateProcessA("FalloutClient.exe", "FalloutClient.exe -debugedit", 0, 0, false, 0, 0, 0, &si, &pi)) { + if (!CreateProcessA("FalloutDebug.exe", "FalloutDebug.exe -debugedit", 0, 0, false, 0, 0, 0, &si, &pi)) { closesocket(sock); WSACleanup(); return;