Skip to content

Commit 13daf52

Browse files
JoshSanchSquareMan
authored andcommitted
Add and implement weak xSndPlay3D function in zAssetTypes.h
1 parent cf0f959 commit 13daf52

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

src/SB/Core/x/xSnd.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ U32 xSndPlay(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, U32 parentID,
128128
sound_category category, F32 delay);
129129
U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, xEnt* parent, F32 innerRadius,
130130
F32 outerRadius, sound_category category, F32 delay);
131-
U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, const xVec3* pos, F32 radius,
132-
sound_category category, F32 delay);
133131
U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, const xVec3* pos,
134132
F32 innerRadius, F32 outerRadius, sound_category category, F32 delay);
135133
U32 xSndPlayInternal(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, U32 parentID,

src/SB/Game/zAssetTypes.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,10 @@ U8 dummyEffectCB(U32, xAnimActiveEffect*, xAnimSingle*, void*)
7373
{
7474
return 0;
7575
}
76+
77+
78+
U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags,
79+
xEnt* ent, F32 radius, sound_category category, F32 delay)
80+
{
81+
return xSndPlay3D(id, vol, pitch, priority, flags, ent, radius / 4.0f, radius, category, delay);
82+
}

src/SB/Game/zAssetTypes.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <types.h>
55
#include <rwcore.h>
66
#include <rpworld.h>
7+
#include "xSnd.h"
78

89
#include "xJSP.h"
910

@@ -16,4 +17,7 @@ struct RwMemory
1617
void FootstepHackSceneEnter();
1718
void jsp_shadow_hack(xJSPHeader* param_1);
1819

20+
U32 xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, xEnt* pos, F32 radius,
21+
sound_category category, F32 delay);
22+
1923
#endif

src/SB/Game/zLasso.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33

44
#include "xMath3.h"
55
#include "xModel.h"
6-
#include "xSnd.h"
76
#include "xString.h"
7+
#include "zEnt.h"
88

99
struct zLasso
1010
{
1111
U32 flags;
1212
F32 secsTotal;
1313
F32 secsLeft;
1414
F32 stRadius;
15-
F32 tgRadius;
15+
F32 tgRadius; // 0x10
1616
F32 crRadius;
17-
xVec3 stCenter;
18-
xVec3 tgCenter;
19-
xVec3 crCenter;
20-
xVec3 stNormal;
17+
xVec3 stCenter; // 0x18
18+
xVec3 tgCenter; // 0x24
19+
xVec3 crCenter; // 0x30
20+
xVec3 stNormal; // 0x3C
2121
xVec3 tgNormal;
22-
xVec3 crNormal;
22+
xVec3 crNormal; // 0x48
2323
xVec3 honda;
2424
F32 stSlack;
2525
F32 stSlackDist;

0 commit comments

Comments
 (0)