1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

En_River_Sound OK (#833)

* match en_river_sound

* remove asm

* some docs

* more docs

* saria song

* review stuff
This commit is contained in:
Zelllll 2021-06-01 12:17:45 -05:00 committed by GitHub
parent 9de0b13141
commit 175aaf4f26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 116 additions and 202 deletions

View file

@ -1,93 +0,0 @@
glabel func_80AE6A54
/* 00124 80AE6A54 C48A0000 */ lwc1 $f10, 0x0000($a0) ## 00000000
/* 00128 80AE6A58 C4C80000 */ lwc1 $f8, 0x0000($a2) ## 00000000
/* 0012C 80AE6A5C 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8
/* 00130 80AE6A60 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
/* 00134 80AE6A64 46085481 */ sub.s $f18, $f10, $f8
/* 00138 80AE6A68 E7B20014 */ swc1 $f18, 0x0014($sp)
/* 0013C 80AE6A6C C4C60004 */ lwc1 $f6, 0x0004($a2) ## 00000004
/* 00140 80AE6A70 C4900004 */ lwc1 $f16, 0x0004($a0) ## 00000004
/* 00144 80AE6A74 46068101 */ sub.s $f4, $f16, $f6
/* 00148 80AE6A78 E7A40018 */ swc1 $f4, 0x0018($sp)
/* 0014C 80AE6A7C C4C80008 */ lwc1 $f8, 0x0008($a2) ## 00000008
/* 00150 80AE6A80 C48A0008 */ lwc1 $f10, 0x0008($a0) ## 00000008
/* 00154 80AE6A84 46085481 */ sub.s $f18, $f10, $f8
/* 00158 80AE6A88 E7B2001C */ swc1 $f18, 0x001C($sp)
/* 0015C 80AE6A8C C4C60000 */ lwc1 $f6, 0x0000($a2) ## 00000000
/* 00160 80AE6A90 C4B00000 */ lwc1 $f16, 0x0000($a1) ## 00000000
/* 00164 80AE6A94 46068101 */ sub.s $f4, $f16, $f6
/* 00168 80AE6A98 E7A40020 */ swc1 $f4, 0x0020($sp)
/* 0016C 80AE6A9C C4C80004 */ lwc1 $f8, 0x0004($a2) ## 00000004
/* 00170 80AE6AA0 C4AA0004 */ lwc1 $f10, 0x0004($a1) ## 00000004
/* 00174 80AE6AA4 46085481 */ sub.s $f18, $f10, $f8
/* 00178 80AE6AA8 C7A80014 */ lwc1 $f8, 0x0014($sp)
/* 0017C 80AE6AAC C7AA0020 */ lwc1 $f10, 0x0020($sp)
/* 00180 80AE6AB0 E7B20024 */ swc1 $f18, 0x0024($sp)
/* 00184 80AE6AB4 C4C60008 */ lwc1 $f6, 0x0008($a2) ## 00000008
/* 00188 80AE6AB8 C4B00008 */ lwc1 $f16, 0x0008($a1) ## 00000008
/* 0018C 80AE6ABC 46085481 */ sub.s $f18, $f10, $f8
/* 00190 80AE6AC0 E7AA0000 */ swc1 $f10, 0x0000($sp)
/* 00194 80AE6AC4 E7A80004 */ swc1 $f8, 0x0004($sp)
/* 00198 80AE6AC8 46068101 */ sub.s $f4, $f16, $f6
/* 0019C 80AE6ACC C7B00024 */ lwc1 $f16, 0x0024($sp)
/* 001A0 80AE6AD0 C7A60018 */ lwc1 $f6, 0x0018($sp)
/* 001A4 80AE6AD4 E7B20008 */ swc1 $f18, 0x0008($sp)
/* 001A8 80AE6AD8 E7A40028 */ swc1 $f4, 0x0028($sp)
/* 001AC 80AE6ADC 46068101 */ sub.s $f4, $f16, $f6
/* 001B0 80AE6AE0 E7B0000C */ swc1 $f16, 0x000C($sp)
/* 001B4 80AE6AE4 C7AA0028 */ lwc1 $f10, 0x0028($sp)
/* 001B8 80AE6AE8 C7B00008 */ lwc1 $f16, 0x0008($sp)
/* 001BC 80AE6AEC C7A8001C */ lwc1 $f8, 0x001C($sp)
/* 001C0 80AE6AF0 E7A60008 */ swc1 $f6, 0x0008($sp)
/* 001C4 80AE6AF4 C7A60004 */ lwc1 $f6, 0x0004($sp)
/* 001C8 80AE6AF8 E7B2002C */ swc1 $f18, 0x002C($sp)
/* 001CC 80AE6AFC 46085481 */ sub.s $f18, $f10, $f8
/* 001D0 80AE6B00 E7AA0004 */ swc1 $f10, 0x0004($sp)
/* 001D4 80AE6B04 46068182 */ mul.s $f6, $f16, $f6
/* 001D8 80AE6B08 C7AA0008 */ lwc1 $f10, 0x0008($sp)
/* 001DC 80AE6B0C E7A40030 */ swc1 $f4, 0x0030($sp)
/* 001E0 80AE6B10 E7B20034 */ swc1 $f18, 0x0034($sp)
/* 001E4 80AE6B14 460A2282 */ mul.s $f10, $f4, $f10
/* 001E8 80AE6B18 460A3180 */ add.s $f6, $f6, $f10
/* 001EC 80AE6B1C 46124282 */ mul.s $f10, $f8, $f18
/* 001F0 80AE6B20 C7A80000 */ lwc1 $f8, 0x0000($sp)
/* 001F4 80AE6B24 46065000 */ add.s $f0, $f10, $f6
/* 001F8 80AE6B28 46088282 */ mul.s $f10, $f16, $f8
/* 001FC 80AE6B2C C7A6000C */ lwc1 $f6, 0x000C($sp)
/* 00200 80AE6B30 46062202 */ mul.s $f8, $f4, $f6
/* 00204 80AE6B34 46085180 */ add.s $f6, $f10, $f8
/* 00208 80AE6B38 C7AA0004 */ lwc1 $f10, 0x0004($sp)
/* 0020C 80AE6B3C 46125202 */ mul.s $f8, $f10, $f18
/* 00210 80AE6B40 46064280 */ add.s $f10, $f8, $f6
/* 00214 80AE6B44 44803000 */ mtc1 $zero, $f6 ## $f6 = 0.00
/* 00218 80AE6B48 46005202 */ mul.s $f8, $f10, $f0
/* 0021C 80AE6B4C 4606403C */ c.lt.s $f8, $f6
/* 00220 80AE6B50 00000000 */ nop
/* 00224 80AE6B54 45000018 */ bc1f .L80AE6BB8
/* 00228 80AE6B58 00000000 */ nop
/* 0022C 80AE6B5C 46108282 */ mul.s $f10, $f16, $f16
/* 00230 80AE6B60 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
/* 00234 80AE6B64 46042202 */ mul.s $f8, $f4, $f4
/* 00238 80AE6B68 46085180 */ add.s $f6, $f10, $f8
/* 0023C 80AE6B6C 46129102 */ mul.s $f4, $f18, $f18
/* 00240 80AE6B70 46000207 */ neg.s $f8, $f0
/* 00244 80AE6B74 46062280 */ add.s $f10, $f4, $f6
/* 00248 80AE6B78 C4840000 */ lwc1 $f4, 0x0000($a0) ## 00000000
/* 0024C 80AE6B7C 460A4003 */ div.s $f0, $f8, $f10
/* 00250 80AE6B80 46008482 */ mul.s $f18, $f16, $f0
/* 00254 80AE6B84 46049180 */ add.s $f6, $f18, $f4
/* 00258 80AE6B88 E4E60000 */ swc1 $f6, 0x0000($a3) ## 00000000
/* 0025C 80AE6B8C C7A80030 */ lwc1 $f8, 0x0030($sp)
/* 00260 80AE6B90 C4900004 */ lwc1 $f16, 0x0004($a0) ## 00000004
/* 00264 80AE6B94 46004282 */ mul.s $f10, $f8, $f0
/* 00268 80AE6B98 46105480 */ add.s $f18, $f10, $f16
/* 0026C 80AE6B9C E4F20004 */ swc1 $f18, 0x0004($a3) ## 00000004
/* 00270 80AE6BA0 C7A40034 */ lwc1 $f4, 0x0034($sp)
/* 00274 80AE6BA4 C4880008 */ lwc1 $f8, 0x0008($a0) ## 00000008
/* 00278 80AE6BA8 46002182 */ mul.s $f6, $f4, $f0
/* 0027C 80AE6BAC 46083280 */ add.s $f10, $f6, $f8
/* 00280 80AE6BB0 10000001 */ beq $zero, $zero, .L80AE6BB8
/* 00284 80AE6BB4 E4EA0008 */ swc1 $f10, 0x0008($a3) ## 00000008
.L80AE6BB8:
/* 00288 80AE6BB8 03E00008 */ jr $ra
/* 0028C 80AE6BBC 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000

View file

@ -1,13 +0,0 @@
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .rodata
.balign 16
glabel D_80AE7240
.incbin "baserom/ovl_En_River_Sound", 0x910, 0x00000070

4
spec
View file

@ -2789,11 +2789,7 @@ endseg
beginseg
name "ovl_En_River_Sound"
include "build/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.o"
#ifdef NON_MATCHING
include "build/src/overlays/actors/ovl_En_River_Sound/ovl_En_River_Sound_reloc.o"
#else
include "build/data/overlays/actors/z_en_river_sound.reloc.o"
#endif
endseg
beginseg

View file

@ -30,18 +30,18 @@ const ActorInit En_River_Sound_InitVars = {
void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx) {
EnRiverSound* this = THIS;
this->unk_14C = 0;
this->playSound = 0;
this->pathIndex = (this->actor.params >> 8) & 0xFF;
this->actor.params = this->actor.params & 0xFF;
if (this->actor.params >= 248) {
func_800F4870(this->actor.params - 248);
if (this->actor.params >= RS_MAX) {
func_800F4870(this->actor.params - RS_MAX);
Actor_Kill(&this->actor);
} else if (this->actor.params == 247) {
} else if (this->actor.params == RS_UNK_F7) {
func_800F6FB4(4);
Actor_Kill(&this->actor);
} else if (this->actor.params == 12) {
if (!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) {
} else if (this->actor.params == RS_SARIAS_SONG) {
if ((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)) || (CHECK_QUEST_ITEM(QUEST_SONG_SARIA))) {
Actor_Kill(&this->actor);
}
}
@ -50,54 +50,50 @@ void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnRiverSound_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnRiverSound* this = THIS;
if (this->actor.params == 12) {
if (this->actor.params == RS_SARIAS_SONG) {
func_800F50EC(&this->actor.projectedPos);
} else if (this->actor.params == 13) {
} else if (this->actor.params == RS_UNK_13) {
func_800F5504();
}
}
#ifdef NON_MATCHING
// If anyone wants to try and figure this shit out, be my guest. I'm done.
s32 func_80AE6A54(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3) {
Vec3f sp2C;
Vec3f sp20;
Vec3f sp14;
f32 f;
f32 g;
f32 h;
Vec3f vec[3];
f32 temp;
sp20.x = arg0->x - arg2->x;
sp20.y = arg0->y - arg2->y;
sp20.z = arg0->z - arg2->z;
vec[0].x = arg0->x - arg2->x;
vec[0].y = arg0->y - arg2->y;
vec[0].z = arg0->z - arg2->z;
sp14.x = arg1->x - arg2->x;
sp14.y = arg1->y - arg2->y;
sp14.z = arg1->z - arg2->z;
vec[1].x = arg1->x - arg2->x;
vec[1].y = arg1->y - arg2->y;
vec[1].z = arg1->z - arg2->z;
sp2C.x = sp14.x - sp20.x;
sp2C.y = sp14.y - sp20.y;
sp2C.z = sp14.z - sp20.z;
vec[2].x = vec[1].x - vec[0].x;
vec[2].y = vec[1].y - vec[0].y;
vec[2].z = vec[1].z - vec[0].z;
f = sp20.z * sp2C.z + (sp2C.x * sp20.x + sp2C.y * sp20.y);
g = sp14.z * sp2C.z + (sp2C.x * sp14.x + sp2C.y * sp14.y);
h = sp2C.z * sp2C.z + (sp2C.x * sp2C.x + sp2C.y * sp2C.y);
temp = DOTXYZ(vec[2], vec[0]);
if (g * f < 0) {
arg3->x = sp2C.x * (-f / h) + arg0->x;
arg3->y = sp2C.y * (-f / h) + arg0->y;
arg3->z = sp2C.z * (-f / h) + arg0->z;
if ((DOTXYZ(vec[2], vec[1]) * temp) < 0.0f) {
temp = -temp / (SQ(vec[2].x) + SQ(vec[2].y) + SQ(vec[2].z));
return 1;
} else {
return 0;
arg3->x = (vec[2].x * temp) + arg0->x;
arg3->y = (vec[2].y * temp) + arg0->y;
arg3->z = (vec[2].z * temp) + arg0->z;
return true;
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_River_Sound/func_80AE6A54.s")
#endif
s32 func_80AE6BC0(Vec3s* points, s32 numPoints, Vec3f* pos, Vec3f* res) {
return false;
}
/**
* Writes the position along the river path to `soundPos` based on the `hearPos`, which is usually the position of the
* player.
* Returns true if the distance between the `hearPos` and `soundPos` is less than 10000, false if not.
*/
s32 EnRiverSound_GetSoundPos(Vec3s* points, s32 numPoints, Vec3f* hearPos, Vec3f* soundPos) {
s32 i;
s32 pointIdx;
s32 sp78[2] = { 0, 0 };
@ -109,21 +105,21 @@ s32 func_80AE6BC0(Vec3s* points, s32 numPoints, Vec3f* pos, Vec3f* res) {
Vec3s* point;
for (i = 0; i < numPoints; i++) {
f32 d;
f32 dist;
vec.x = points[i].x;
vec.y = points[i].y;
vec.z = points[i].z;
d = Math_Vec3f_DistXYZ(pos, &vec);
dist = Math_Vec3f_DistXYZ(hearPos, &vec);
if (d < pointDist) {
pointDist = d;
if (dist < pointDist) {
pointDist = dist;
pointIdx = i;
}
}
if (pointDist >= 10000.0f) {
return 0;
return false;
}
point = &points[pointIdx];
@ -135,37 +131,37 @@ s32 func_80AE6BC0(Vec3s* points, s32 numPoints, Vec3f* pos, Vec3f* res) {
vec.x = point[-1].x;
vec.y = point[-1].y;
vec.z = point[-1].z;
sp78[0] = func_80AE6A54(&vec, &pointLoc, pos, &sp54);
sp78[0] = func_80AE6A54(&vec, &pointLoc, hearPos, &sp54);
}
if (pointIdx + 1 != numPoints) {
vec.x = point[1].x;
vec.y = point[1].y;
vec.z = point[1].z;
sp78[1] = func_80AE6A54(&pointLoc, &vec, pos, &sp60);
sp78[1] = func_80AE6A54(&pointLoc, &vec, hearPos, &sp60);
}
if (sp78[0] && sp78[1]) {
if (!func_80AE6A54(&sp54, &sp60, pos, res)) {
res->x = (sp54.x + sp60.x) * 0.5f;
res->y = (sp54.y + sp60.y) * 0.5f;
res->z = (sp54.z + sp60.z) * 0.5f;
if (!func_80AE6A54(&sp54, &sp60, hearPos, soundPos)) {
soundPos->x = (sp54.x + sp60.x) * 0.5f;
soundPos->y = (sp54.y + sp60.y) * 0.5f;
soundPos->z = (sp54.z + sp60.z) * 0.5f;
}
} else if (sp78[0]) {
res->x = sp54.x;
res->y = sp54.y;
res->z = sp54.z;
soundPos->x = sp54.x;
soundPos->y = sp54.y;
soundPos->z = sp54.z;
} else if (sp78[1]) {
res->x = sp60.x;
res->y = sp60.y;
res->z = sp60.z;
soundPos->x = sp60.x;
soundPos->y = sp60.y;
soundPos->z = sp60.z;
} else {
res->x = pointLoc.x;
res->y = pointLoc.y;
res->z = pointLoc.z;
soundPos->x = pointLoc.x;
soundPos->y = pointLoc.y;
soundPos->z = pointLoc.z;
}
return 1;
return true;
}
void EnRiverSound_Update(Actor* thisx, GlobalContext* globalCtx) {
@ -175,32 +171,33 @@ void EnRiverSound_Update(Actor* thisx, GlobalContext* globalCtx) {
EnRiverSound* this = THIS;
s32 sp34;
if (thisx->params == 0 || thisx->params == 4 || thisx->params == 5) {
if ((thisx->params == RS_UNK_0) || (thisx->params == RS_UNK_4) || (thisx->params == RS_UNK_5)) {
path = &globalCtx->setupPathList[this->pathIndex];
pos = &thisx->world.pos;
if (func_80AE6BC0(SEGMENTED_TO_VIRTUAL(path->points), path->count, &player->actor.world.pos, pos)) {
if (EnRiverSound_GetSoundPos(SEGMENTED_TO_VIRTUAL(path->points), path->count, &player->actor.world.pos, pos)) {
if (BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &thisx->floorPoly, &sp34, thisx, pos) !=
BGCHECK_Y_MIN) {
this->unk_14D = SurfaceType_GetConveyorSpeed(&globalCtx->colCtx, thisx->floorPoly, sp34);
// Get the sound volume pitch based on the speed of the river current under the actor
this->soundPitchIndex = SurfaceType_GetConveyorSpeed(&globalCtx->colCtx, thisx->floorPoly, sp34);
} else {
this->unk_14D = 0;
this->soundPitchIndex = 0;
}
if (this->unk_14D == 0) {
if (thisx->params == 4) {
this->unk_14D = 0;
} else if (thisx->params == 0) {
this->unk_14D = 1;
if (this->soundPitchIndex == 0) {
if (thisx->params == RS_UNK_4) {
this->soundPitchIndex = 0;
} else if (thisx->params == RS_UNK_0) {
this->soundPitchIndex = 1;
} else {
this->unk_14D = 2;
this->soundPitchIndex = 2;
}
} else {
this->unk_14D--;
this->unk_14D = CLAMP_MAX(this->unk_14D, 2);
this->soundPitchIndex--;
this->soundPitchIndex = CLAMP_MAX(this->soundPitchIndex, 2);
}
}
} else if (thisx->params == 13 || thisx->params == 19) {
} else if ((thisx->params == RS_UNK_13) || (thisx->params == RS_UNK_19)) {
func_8002DBD0(&player->actor, &thisx->home.pos, &thisx->world.pos);
} else if (globalCtx->sceneNum == SCENE_DDAN_BOSS && Flags_GetClear(globalCtx, thisx->room)) {
Actor_Kill(thisx);
@ -208,9 +205,7 @@ void EnRiverSound_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnRiverSound_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnRiverSound* this = THIS;
static s16 D_80AE71F8[] = {
static s16 soundEffects[] = {
0,
NA_SE_EV_WATER_WALL - SFX_FLAG,
NA_SE_EV_MAGMA_LEVEL - SFX_FLAG,
@ -234,24 +229,26 @@ void EnRiverSound_Draw(Actor* thisx, GlobalContext* globalCtx) {
NA_SE_EV_TORCH - SFX_FLAG,
NA_SE_EV_COW_CRY_LV - SFX_FLAG,
};
static f32 D_80AE7224[] = { 0.7f, 1.0f, 1.4f };
static f32 soundPitch[] = { 0.7f, 1.0f, 1.4f };
EnRiverSound* this = THIS;
if (this->unk_14C == 0) {
this->unk_14C = 1;
} else if (this->actor.params == 0 || this->actor.params == 4 || this->actor.params == 5) {
func_800F4634(&this->actor.projectedPos, D_80AE7224[this->unk_14D]);
} else if (this->actor.params == 11) {
if (!(this->playSound)) {
this->playSound = true;
} else if ((this->actor.params == RS_UNK_0) || (this->actor.params == RS_UNK_4) ||
(this->actor.params == RS_UNK_5)) {
func_800F4634(&this->actor.projectedPos, soundPitch[this->soundPitchIndex]);
} else if (this->actor.params == RS_UNK_11) {
func_800F4A54(90);
} else if (this->actor.params == 12) {
} else if (this->actor.params == RS_SARIAS_SONG) {
func_800F4E30(&this->actor.projectedPos, this->actor.xzDistToPlayer);
} else if (this->actor.params == 13) {
} else if (this->actor.params == RS_UNK_13) {
func_800F52A0(&this->actor.home.pos, 62, 1000);
} else if (this->actor.params == 19) {
} else if (this->actor.params == RS_UNK_19) {
func_800F52A0(&this->actor.home.pos, 40, 800);
} else if (this->actor.params == 14 || this->actor.params == 16 || this->actor.params == 17 ||
this->actor.params == 18) {
func_800788CC(D_80AE71F8[this->actor.params]);
} else if ((this->actor.params == RS_SANDSTORM) || (this->actor.params == RS_CHAMBER_OF_SAGES_1) ||
(this->actor.params == RS_CHAMBER_OF_SAGES_2) || (this->actor.params == RS_RUMBLING)) {
func_800788CC(soundEffects[this->actor.params]);
} else {
Audio_PlayActorSound2(&this->actor, D_80AE71F8[this->actor.params]);
Audio_PlayActorSound2(&this->actor, soundEffects[this->actor.params]);
}
}

View file

@ -8,11 +8,38 @@ struct EnRiverSound;
typedef struct EnRiverSound {
/* 0x0000 */ Actor actor;
/* 0x014C */ u8 unk_14C;
/* 0x014D */ u8 unk_14D;
/* 0x014C */ u8 playSound;
/* 0x014D */ u8 soundPitchIndex;
/* 0x014E */ s16 pathIndex;
} EnRiverSound; // size = 0x0150
typedef enum {
/* 0x00 */ RS_UNK_0,
/* 0x01 */ RS_SMALL_WATERFALL,
/* 0x02 */ RS_LAVA_BUBBLES_1,
/* 0x03 */ RS_LARGE_WATERFALL,
/* 0x04 */ RS_UNK_4,
/* 0x05 */ RS_UNK_5,
/* 0x06 */ RS_LAVA_BUBBLES_2,
/* 0x07 */ RS_LAVA_BUBBLES_3,
/* 0x08 */ RS_DRIPPING_WATER,
/* 0x09 */ RS_FOUNTAIN_WATER,
/* 0x0A */ RS_MARKET_CROWD,
/* 0x0B */ RS_UNK_11,
/* 0x0C */ RS_SARIAS_SONG,
/* 0x0D */ RS_UNK_13,
/* 0x0E */ RS_SANDSTORM,
/* 0x0F */ RS_LAKESIDE_LAB_TANK,
/* 0x10 */ RS_CHAMBER_OF_SAGES_1,
/* 0x11 */ RS_CHAMBER_OF_SAGES_2,
/* 0x12 */ RS_RUMBLING,
/* 0x13 */ RS_UNK_19,
/* 0x14 */ RS_TORCH_CRACKLING,
/* 0x15 */ RS_COW_MOOING,
/* 0xF7 */ RS_UNK_F7 = 0xF7,
/* 0xF8 */ RS_MAX
} RiverSoundType;
extern const ActorInit En_River_Sound_InitVars;
#endif