Use PointerToID() for sound-event ID in CSoundObject::Play()/Stop()

so that code should be 64bit-clean now.
This commit is contained in:
Daniel Gibson 2016-04-20 17:35:47 +02:00
parent 23b6374e9a
commit b437abf10d
2 changed files with 3 additions and 5 deletions

View File

@ -60,7 +60,7 @@ public:
TIME pe_tmTick; TIME pe_tmTick;
ULONG pe_ulEntityID; ULONG pe_ulEntityID;
ULONG pe_ulTypeID; ULONG pe_ulTypeID;
ULONG pe_ulEventID; // FIXME: make this void* or uintptr_t/size_t ULONG pe_ulEventID;
CPredictedEvent(void); CPredictedEvent(void);
void Clear(void) {}; void Clear(void) {};

View File

@ -213,8 +213,7 @@ void CSoundObject::Play(CSoundData *pCsdLink, SLONG slFlags)
//CPrintF("PLAY: '%s'", (const char*)pCsdLink->GetName().FileName()); //CPrintF("PLAY: '%s'", (const char*)pCsdLink->GetName().FileName());
// get prediction tail // get prediction tail
STUBBED("64-bit issue"); CSoundObject *psoTail = GetPredictionTail(EVENT_SOUNDPLAY, PointerToID(pCsdLink));
CSoundObject *psoTail = GetPredictionTail(EVENT_SOUNDPLAY, (ULONG)(size_t)pCsdLink);
// if the event is predicted // if the event is predicted
if (psoTail==NULL) { if (psoTail==NULL) {
// do nothing; // do nothing;
@ -350,8 +349,7 @@ void CSoundObject::Stop(void)
CSoundObject *psoTail = this; CSoundObject *psoTail = this;
// get prediction tail // get prediction tail
STUBBED("64-bit issue"); psoTail = GetPredictionTail(EVENT_SOUNDSTOP, PointerToID(so_pCsdLink));
psoTail = GetPredictionTail(EVENT_SOUNDSTOP, (ULONG)(size_t)so_pCsdLink);
// if the event is predicted // if the event is predicted
if (psoTail==NULL) { if (psoTail==NULL) {
// do nothing; // do nothing;