Skip to content

Commit

Permalink
game/sound: fix cosmetic todo
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Nov 5, 2024
1 parent 0f01993 commit d2d296c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
11 changes: 8 additions & 3 deletions docs/tr2/progress.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions src/tr2/game/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
11 changes: 8 additions & 3 deletions src/tr2/global/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d2d296c

Please sign in to comment.