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.
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.