The Sims - some hacks

Trent Waddington trent.waddington at gmail.com
Wed Sep 5 04:56:18 CDT 2007


Attached is a patch for some hacks that will get The Sims to run and
not crash (for a while).

First, there's the easy problem of the cursors not working.  This is
because Sims.exe calls LoadCursorFromFile on a bunch of files that
contain icons, not cursors.  As the only difference between the two is
that the cursor has a hotspot in front of it, I added some code to
treat the icon as a cursor with no hotspot.  Other programs may
benefit from this patch, as it seems it is something you can get away
with on Windows.

Then there's the problem of the actual crash.  This is caused by
CreateSurface in ddraw returning an error and Sims.exe doesn't check
for the error.  It is returning an error because Sims.exe is trying to
create a depth buffer without specifying a valid pixelformat.  Note
that it actually does pass a pixelformat, it's just all zeros, except
for the dwSize member.  Again, this appears to be something you can
get away with on Windows.. the pixelformat defaults to the current
screen format.

Once these patches are applied there are significant problems with the game.

Minor: the company logo flashes and won't go away without a mouse click.
Minor: the scrolling text of pointless terms sometimes overlaps itself
Annoyance: there seems to be some blitting error on the "neighborhood"
screen that results in parts of the splash screen not being
overwritten.
Major: the characters in the game are not redrawn correctly, and
eventually, it will crash.

Overall result: not playable.

If someone with a better understanding of wined3d code could have a
look, I'd love to receive some hints on what could be causing these
issues.

Thanks,

Trent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: the_sims_hacks.patch
Type: application/octet-stream
Size: 3808 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070905/36d914ed/the_sims_hacks-0001.obj


More information about the wine-devel mailing list