diff --git a/docs/tr2/progress.txt b/docs/tr2/progress.txt index 5b9153a00..5296bf434 100644 --- a/docs/tr2/progress.txt +++ b/docs/tr2/progress.txt @@ -1003,9 +1003,14 @@ typedef struct __unaligned { } GAME_VECTOR; typedef struct __unaligned { - int32_t x; - int32_t y; - int32_t z; + union { + struct __unaligned { + int32_t x; + int32_t y; + int32_t z; + }; + XYZ_32 pos; + }; int16_t data; int16_t flags; } OBJECT_VECTOR; diff --git a/src/tr2/game/sound.c b/src/tr2/game/sound.c index 23e6e0a31..470d2e0fa 100644 --- a/src/tr2/game/sound.c +++ b/src/tr2/game/sound.c @@ -165,9 +165,7 @@ void __cdecl Sound_UpdateEffects(void) OBJECT_VECTOR *sound = &g_SoundEffects[i]; if ((g_FlipStatus && (sound->flags & SF_FLIP)) || (!g_FlipStatus && (sound->flags & SF_UNFLIP))) { - Sound_Effect( - sound->data, (XYZ_32 *)sound, - SPM_NORMAL); // TODO: use proper pointer for this + Sound_Effect(sound->data, &sound->pos, SPM_NORMAL); } } diff --git a/src/tr2/global/types.h b/src/tr2/global/types.h index 8aaa9da3e..aab2f0b2d 100644 --- a/src/tr2/global/types.h +++ b/src/tr2/global/types.h @@ -693,9 +693,14 @@ typedef struct __unaligned { } GAME_VECTOR; typedef struct __unaligned { - int32_t x; - int32_t y; - int32_t z; + union { + struct __unaligned { + int32_t x; + int32_t y; + int32_t z; + }; + XYZ_32 pos; + }; int16_t data; int16_t flags; } OBJECT_VECTOR;