Skip to content

Instantly share code, notes, and snippets.

@rlaphoenix
Last active September 1, 2023 14:26
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rlaphoenix/c8cab577272bc8d848cafe5ea905777c to your computer and use it in GitHub Desktop.
Save rlaphoenix/c8cab577272bc8d848cafe5ea905777c to your computer and use it in GitHub Desktop.
Simpsons Hit & Run SRC Compiling

Simpsons Hit & Run SRC Compiling

TODO: Cleanup, improve, support other platforms and such.

  • All information in this is a community effort and I do not take credit for any of it.
  • SHA256: EA72121D29CE40EBD9F6B5BA2E337CEE02B812BB07ED67797F37E382FE075A85
  • Ensure the full path of the src has absolutely no spaces or characters that would need escaping.

Compiling for PC with the original VS 2002 Solution

Requirements

Steps

  1. Copy all the files from game/build/win32/Backup into game/build/win32 as the non-backup files were messed with and broken.
  2. Open SRR2.sln in Visual Studio .NET 2002 and build the solution.
  3. Go to game/cd/PC and the newly built game distribution should be there.

Notes/WIP

Updating to VS 2019

The following changes fixes the respective library or project to compile in VS 2019:

radmovie
    Properties
        C/C++
            Code Generation
                Smaller Type Check: Change from /RTCc to No

radsound
    system.cpp
        IID_IDirectSound8 to IID_IDirectSound
    Properties
        C/C++
            General
                Additional Include Directories: Add "..\..\src\pch"
            Code Generation
                Smaller Type Check: Change from /RTCc to No

Pure3D
    platform.cpp
        #include <fstream.h>  -> #include <fstream>
        #include <strstrea.h> -> #include <strstream>

Currently problematic libraries or projects:

  • pddidx8 won't build because VS is reading the .vsh files (shader files) and throwing a syntax error
  • SRR2 won't build due to the above failing, but also has it's own errors
@Hendo16
Copy link

Hendo16 commented Feb 17, 2023

About to take a crack at this - potentially any further advancements since it was last updated?

@rlaphoenix
Copy link
Author

There very likely was, but I never kept up with it at all. I would look into asking about this on Simpsons Hit & Run modding discords. I remember one about Donut mods or something along the lines of that, that worked on trying to improve the building for this source.

@UndeadAlex
Copy link

Got everything but the .vsh issue solved, did anyone else get an issue with the ref<> class ?

@palmerj
Copy link

palmerj commented May 23, 2023

@UndeadAlex do you have a patch to date to get it compiled under VS 2019?

@Pyroglyph
Copy link

Got everything but the .vsh issue solved, did anyone else get an issue with the ref<> class ?

I haven't had the .vsh issue (yet), but I also had an issue with the ref<> stuff. I also couldn't compile the pddidx8 project because of a bunch of errors winnt.h and some other files.
Many of winnt.h errors looked like this:

winnt.h(426, 27): [C2146] syntax error: missing ';' before identifier 'PVOID64'
winnt.h(426, 34): [C4430] missing type specifier - int assumed. Note: C++ does not support default-int
winnt.h(14502, 13): [C3646] 'Buffer': unknown override specifier

I read somewhere online that changing an include from winnt.h to windows.h would fix it, but nothing changed for me.

Some of the other errors looked like this: (replace ABC and XYZ with various different things)

ABCshader.cpp(33, 5): [C4867] 'd3dShader::XYZ': non-standard syntax; use '&' to create a pointer to member

I'm no C/C++ developer, so these could be easy fixes for all I know.
For reference, I'm on Win11 64-bit, using the Windows SDK version 10.0.22621.0 and platform toolkit v143.

@invisy
Copy link

invisy commented Jul 2, 2023

@Pyroglyph "ref<> stuff" can be fixed just by renaming ref to something else, I`ve renamed it to "reference<>"

@luizfernandonb
Copy link

Any solution to solve the .vsh files issue?

@cursedUs64-git
Copy link

Any solution to solve the .vsh files issue?

still not, i also get the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment