mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-04-24 19:55:11 -06:00
Fix 32 bit / 64 bit multiplayer interop problem
- Fix gids to be calculated the same on 32 bit and 64 bit platforms. Previously they were byte offsets into a pointer array, which meant multiple of 4 on 32 bit platforms, and multiple of 8 on 64 bit platforms. Now they are indexes.
This commit is contained in:
parent
83a84abc08
commit
622b960b10
@ -1281,8 +1281,8 @@ Direction16 CalcDir16(int dx, int dy)
|
||||
// GobMgr implementation
|
||||
//
|
||||
|
||||
#define PpgobFromGid(gid) ((Gob **)((byte *)m_apgobMaster + (gid)))
|
||||
#define GidFromPpgob(ppgob) ((byte *)(ppgob) - (byte *)m_apgobMaster)
|
||||
#define PpgobFromGid(gid) (&m_apgobMaster[gid])
|
||||
#define GidFromPpgob(ppgob) ((ppgob) - m_apgobMaster)
|
||||
#define MakeUsedEntry(pw) (Gob **)((pword)(pw) & ~1)
|
||||
#define MakeFreeEntry(pw) (Gob *)((pword)(pw) | 1)
|
||||
#define IsFreeEntry(pw) ((pword)(pw) & 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user