Skip to content

Commit

Permalink
- Fixed issues spawning the queen bee and sniper rifle items via spaw…
Browse files Browse the repository at this point in the history
…n_item command

- Updated project for newer VS/SDK
  • Loading branch information
grimdoomer committed Mar 26, 2023
1 parent 43132f1 commit 8482525
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 25 deletions.
10 changes: 5 additions & 5 deletions DeadRisingEx/DeadRisingEx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,32 +102,32 @@
<ProjectGuid>{4372BE1E-F5FB-4C7E-A03A-958D1886422C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DeadRisingEx</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
Expand Down
22 changes: 19 additions & 3 deletions DeadRisingEx/DeadRisingEx/MtFramework/Item/uItemImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,25 @@ __int64 SpawnItem(WCHAR **argv, int argc)
ImGuiConsole::Instance()->ConsolePrint(L"Failed to force load object '%S'!\n", sItemPath.c_str());
return 0;
}

// Format the item class name using the item id.
snprintf(sItemClassName, sizeof(sItemClassName), "uOm%02x", itemFileId);

// Certain items have two DTI instances, one for static objects and one for item objects. Check the item id to see if
// we need to use the item DTI instance instead of the static object DTI.
switch (itemId)
{
case 69: // Queen bee
case 135: // Sniper rifle
{
// Format the item class name using the item id.
snprintf(sItemClassName, sizeof(sItemClassName), "uOm%02x_1", itemFileId);
break;
}
default:
{
// Format the item class name using the item id.
snprintf(sItemClassName, sizeof(sItemClassName), "uOm%02x", itemFileId);
break;
}
}

// If an item class name was provided then use that instead of the one we calculated.
if (argc >= 2)
Expand Down
12 changes: 6 additions & 6 deletions DeadRisingLauncher/App.config
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="DeadRisingLauncher.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="DeadRisingLauncher.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<userSettings>
<DeadRisingLauncher.Properties.Settings>
<setting name="UpdateFlavor" serializeAs="String">
<value />
<value/>
</setting>
<setting name="UpdateSettings" serializeAs="String">
<value>True</value>
</setting>
</DeadRisingLauncher.Properties.Settings>
</userSettings>
</configuration>
</configuration>
3 changes: 2 additions & 1 deletion DeadRisingLauncher/DeadRisingLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>DeadRisingLauncher</RootNamespace>
<AssemblyName>DeadRisingLauncher</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
Expand All @@ -27,6 +27,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down
4 changes: 2 additions & 2 deletions DeadRisingLauncher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[assembly: AssemblyCulture("")]

// Version informationr(
[assembly: AssemblyVersion("1.5.9.53")]
[assembly: AssemblyFileVersion("1.5.9.53")]
[assembly: AssemblyVersion("1.5.10.58")]
[assembly: AssemblyFileVersion("1.5.10.58")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

2 changes: 1 addition & 1 deletion DeadRisingLauncher/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DeadRisingLauncher/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DeadRisingLauncher/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ini-parser" version="2.5.2" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" requireReinstallation="true" />
</packages>
10 changes: 5 additions & 5 deletions LibMtFramework/LibMtFramework.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,32 @@
<ProjectGuid>{182F7A1A-DEA6-4800-A52F-2217450064D9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>LibMtFramework</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down

0 comments on commit 8482525

Please # to comment.