Last resort logo

SWAT 3 - LAST RESORT GAME MODIFICATION


Spam Prevention - PLEASE READ !! (23 Apr 2021)

Due to a problem with spammers the rules for posting in the forums have changed for new users.

Newly registered users won't have their posts published until a moderator approves them.

DgVoodoo creator discusses Swat 3

More
2 years 2 months ago - 2 years 2 months ago #2668 by Slippery Jim
Just a quick look with Ghidra (I don't really know how to use it) at some of the important Swat 3 calls.

"DirectDrawEnumerateA" - this gathers information about the system of what valid resolutions there are
"DirectDrawCreate"

Information about DirectDraw and what we are up against.
Also this reference page about DirectDraw.




Some Windows calls:

"CreateWindowExA" (link to syntax and paramaters )
"SetWindowPos" (link to syntax and paramaters )



Strangely this error message was in memory:

"This program requires DirectX 6.1 or higher"

I am wondering if this is left over from an early build?

Update:  yup here are the original specs

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #2670 by Copy-Cat
Damn son, seems you really want this 32 bit to be a realization. I haven't seen SJ so excited in a long time.

Interesting read, gonna bookmark those pages for references.

The setwindowpos is dead on in  the swat 3 code, I have found multiple references to window size and pos. The position is hard coded 0, 0. but there are ways around that. we cant add integers because we only have 4 bites to work with "push 0"

At some point today we need to agree on the loading screens, please read my second to last post and respond, pliz.

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago #2672 by Slippery Jim
I would be happy with 24 bit colours :)

Going to read your post now.

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #2674 by Slippery Jim
Just reading the direct draw reference page for "DirectDrawCreate".

One of the return values is "DDERR_GENERIC". Sound familiar? 

The dreaded start up/movie crash.

Update:  I also see a reference to SetPixelFormat on these pages.  Loading up Ghidra to see if Swat 3 uses this.  Nope

Right now everything I am doing is stabbing in the dark out of ignorance.  The more logical approach would be to look for an old book about DirectDraw and start reading.

I think a lot of the window creation calls also involve USER32.dll such as:
CreateWindowExA
GetWindowRect
SetRec
SetWindowPos

Update 2:   Got 2 books.  "DirectDraw programming" by Bret Timmins and "Windows Graphics Programming: Win32 and DirectDraw" by Feng Yuan.
 

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #2675 by Copy-Cat
If they are not too expensive. I will get a copy also. Where you purchase them from?

second thought, might go with different books to collaborate findings.

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #2676 by Slippery Jim
Wink wink.

I did a bit of quick reading last night of the first book.   Depending how they did things it probably is more difficult than a simple hack.

One command that may be of use to us is SetDisplayMode.   You can take an existing DirectDraw object and change it by height, width, and colour depth.   RestoreDisplayMode will change it back to what it was before you made the call.

Please Log in or Create an account to join the conversation.

Moderators: DarkSynopsis
Time to create page: 0.512 seconds
Powered by Kunena Forum