GPSnoopy / BelgianChocolateDuke3D

Chocolate Duke Nukem 3D
35 stars 9 forks source link

Fixed compatibility between 32-bit and 64-bit savegames #1

Closed GPSnoopy closed 4 years ago

GPSnoopy commented 4 years ago

Quite a lot of work here.

Most of the engine is not actually pointer size dependent, except for a small part of the script engine that used to store pointers into int32_t. What it really wants to do is to store the index, not the pointer. I've borrowed the encode/decodeptr() methods from JonoF's Duke Nukem 3D Port.

The other suspicious part was player_struct containing a pointer the the palette. I don't think it needs saving, but I've added padding just to make that one bit work.