Find sounds with all extensions instead of only wav, so Sound() does no longer require .ogg extensions

Do not replace * with ? in sound name wildcards anymore, adjust scripts
Julius Michaelis 2011-10-12 23:09:22 +02:00
parent 05c02c7dda
commit 0f12b3485e
63 changed files with 120 additions and 126 deletions

View File

@ -16,7 +16,7 @@ public func ControlUp(object clonk)
if (GetAction() == "Still")
{
SetAction("SpinLeft");
Sound("Chain.ogg");
Sound("Chain");
var arrw= CreateObject(Arrow,x,y,-1);
arrw->Launch(30,80, clonk);
arrw->SetGraphics("1");

View File

@ -7,7 +7,7 @@ func Initialize()
for(var i = 1380; i<=1800; i+=28)
CreateObject(Dynamite,i,1328);
Sound("BirdsLoop.ogg",true,100,nil,+1);
Sound("BirdsLoop",true,100,nil,+1);
CreateObject(Environment_Clouds);
// Create the parkour goal.

View File

@ -25,7 +25,7 @@ protected func FxIntMoveGateUpTimer(object target)
{
if (GBackSolid(0, -20))
{
Sound("GateHit.ogg");
Sound("GateHit");
SetYDir(0);
return -1;
}
@ -38,7 +38,7 @@ protected func FxIntMoveGateDownTimer(object target)
{
if (GBackSolid(0, 19))
{
Sound("GateHit.ogg");
Sound("GateHit");
SetYDir(0);
return -1;
}

View File

@ -10,7 +10,7 @@ public func ControlUp(object clonk)
{
targetdoor->OpenDoor();
SetAction("SpinLeft");
Sound("Chain.ogg");
Sound("Chain");
}
}

View File

@ -44,7 +44,7 @@ protected func Initialize()
}
// Create a little mood.
Sound("BirdsLoop.ogg", true, 100, nil, 1);
Sound("BirdsLoop", true, 100, nil, 1);
CreateObject(Environment_Clouds);
PlaceGrass(200);
return;

View File

@ -47,7 +47,7 @@ protected func Initialize()
AddEffect("FillOtherChest", chest, 100, 5 * 36);
AddEffect("SnowyWinter", nil, 100, 1);
Sound("WindLoop.ogg",true,20,nil,+1);
Sound("WindLoop",true,20,nil,+1);
AddEffect("GeysirExplosion", nil, 100, 1);
// Brick edges, notice the symmetric landscape.
PlaceEdges();

View File

@ -9,8 +9,8 @@
public func ControlUse(object pClonk, int ix, int iy)
{
AddEffect("Frostbolt", 0, 100, 1, 0, GetID(), pClonk->GetOwner(), Angle(0,0,ix,iy),pClonk->GetX(), pClonk->GetY());
Sound("Fireball.ogg");
Sound("Fireball.ogg");
Sound("Fireball");
Sound("Fireball");
RemoveObject();
return 1;
}
@ -45,7 +45,7 @@ public func FxFrostboltTimer(pTarget, effect, iEffectTime)
)
{
CreateObject(Dynamite,x,y,effect.owner)->BlueExplode();
CreateObject(Star,x,y,-1)->Sound("GlassShatter.ogg");
CreateObject(Star,x,y,-1)->Sound("GlassShatter");
for(var i=0; i<=60;i++)
{
var r=Random(10)+Random(18);

View File

@ -24,7 +24,7 @@ public func FinishedAiming(object clonk, int angle)
AddEffect("ExplosiveArrow",arrow,100,1,this);
arrow->SetClrModulation(RGB(255,128,0));
}
Sound("BowShoot*.ogg");
Sound("BowShoot?");
}
}

View File

@ -40,7 +40,7 @@ public func DoThrow(object clonk, int angle)
javelin->AddEffect("Flight",javelin,1,1,javelin,nil);
javelin->AddEffect("HitCheck",javelin,1,1,nil,nil,clonk);
Sound("ThrowJavelin*.ogg");
Sound("ThrowJavelin?");
fAiming = -1;
clonk->UpdateAttach();

View File

@ -38,7 +38,7 @@ private func FireWeapon(object clonk, int angle)
loaded = false;
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)));
Sound("GunShoot*.ogg");
Sound("GunShoot?");
// Muzzle Flash & gun smoke
var IX=Sin(180-angle,MuskFront);

View File

@ -17,7 +17,7 @@ protected func Initialize()
CreateObject(Environment_Clouds);
CreateObject(Environment_Clouds); //Double the clouds.
SetSkyAdjust(RGBa(250,250,255,128),RGB(200,200,220));
Sound("BirdsLoop.ogg", true, 100, nil, 1);
Sound("BirdsLoop", true, 100, nil, 1);
// Brick edges at horizontal moving bricks.
var x=[525, 436, 436, 525, 812, 812, 716, 716, 573, 573, 213, 213];

View File

@ -9,8 +9,8 @@
public func ControlUse(object pClonk, int ix, int iy)
{
AddEffect("Fireball", 0, 100, 1, 0, GetID(), pClonk->GetOwner(), Angle(0,0,ix,iy),pClonk->GetX(), pClonk->GetY());
Sound("Fireball.ogg");
Sound("Fireball.ogg");
Sound("Fireball");
Sound("Fireball");
RemoveObject();
return 1;
}

View File

@ -56,7 +56,7 @@ protected func Initialize()
// Snow
AddEffect("Snowfall", 0, 1, 2);
//Wind
Sound("WindLoop.ogg",true,40,nil,+1);
Sound("WindLoop",true,40,nil,+1);
MapBottomFix();

View File

@ -19,7 +19,7 @@ protected func Initialize()
//Enviroment.
//SetSkyAdjust(RGBa(250,250,255,128),RGB(200,200,220));
Sound("BirdsLoop.ogg",true,100,nil,+1);
Sound("BirdsLoop",true,100,nil,+1);
CreateObject(Column,650,379);
CreateObject(Column,350,409);

View File

@ -9,8 +9,8 @@
public func ControlUse(object pClonk, int ix, int iy)
{
AddEffect("Fireball", 0, 100, 1, 0, GetID(), pClonk->GetOwner(), Angle(0,0,ix,iy),pClonk->GetX(), pClonk->GetY());
Sound("Fireball.ogg");
Sound("Fireball.ogg");
Sound("Fireball");
Sound("Fireball");
RemoveObject();
return 1;
}

View File

@ -5,7 +5,7 @@
func Fall(int from)
{
Sound("BowShoot*.ogg");
Sound("BowShoot?");
for(var i=0; i < 10; i++ )
{
var arrow = TakeObject();

View File

@ -28,7 +28,7 @@ func Initialize()
PlaceGrass(100, 800, 1400);
SetSkyParallax(0,25,25,0,0,0,50);
AddEffect("BoomAttack", 0, 100, 35);
Sound("WindLoop.ogg",true,40,nil,+1);
Sound("WindLoop",true,40,nil,+1);
}
global func FxBoomAttackTimer(object target, effect, int time)

View File

@ -368,14 +368,14 @@ func GetCurrentWalkAnimation()
func Footstep()
{
if (GetMaterialVal("DigFree", "Material", GetMaterial(0,10)) == 0)
Sound("StepHard*.ogg");
Sound("StepHard?");
else
{
var dir = GetXDir() / Abs(GetXDir());
var clr = GetAverageTextureColor(GetTexture(0,10));
CreateParticle("Dust2", dir*-4, 8, dir*-2, -2, 25+Random(5), DoRGBaValue(clr,-150,0));
CreateParticle("Dust2", dir*-4, 8, dir*-3, -3, 25+Random(5), DoRGBaValue(clr,-150,0));
Sound("StepSoft*.ogg");
Sound("StepSoft?");
}
}
@ -729,7 +729,7 @@ func FxFallTimer(object target, effect, int timer)
}
if(timer == 2 && GetYDir() < 1)
{
Sound("Rustle*.ogg");
Sound("Rustle?");
}
if(GetYDir() > 55 && GetAction() == "Jump")
@ -935,7 +935,7 @@ func FxIntSwimTimer(pTarget, effect, iTime)
var color = GetAverageTextureColor(GetTexture(0, 0));
CreateParticle(particle_name, (0), -4, (RandomX(-5,5)-(-1+2*GetDir())*4)/4, 0, 100, color, this, 1);
}
Sound("Splash*");
Sound("Splash?");
}
// Animation speed by X
if(effect.animation_name != "Swim")
@ -1028,7 +1028,7 @@ func DoKneel()
SetXDir(0);
SetAction("Kneel");
Sound("RustleLand.ogg");
Sound("RustleLand");
PlayAnimation("KneelDown", 5, Anim_Linear(0, 0, GetAnimationLength("KneelDown"), iKneelDownSpeed, ANIM_Remove), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
ScheduleCall(this, "EndKneel", iKneelDownSpeed, 1);
@ -1043,7 +1043,7 @@ func EndKneel()
//rollp
func StartRoll()
{
Sound("Roll.ogg");
Sound("Roll");
if(GetDir() == 1) rolldir = 1;
else
rolldir = -1;
@ -1107,7 +1107,7 @@ func FxIntDigStart(pTarget, effect, fTmp)
UpdateAttach();
// Sound
Sound("Dig*");
Sound("Dig?");
// Set proper turn type
SetTurnType(0);
@ -1117,7 +1117,7 @@ func FxIntDigTimer(pTarget, effect, iTime)
{
if(iTime % 36 == 0)
{
Sound("Dig*");
Sound("Dig?");
}
if( (iTime-18) % 36 == 0 || iTime > 35)
{

View File

@ -110,9 +110,9 @@ protected func CatchBlow()
protected func Hurt()
{
if(gender == 0)
Sound("Hurt*");
Sound("Hurt?");
else
Sound("FHurt*"); //female 'ouch' sounds TODO :/
Sound("FHurt?"); //female 'ouch' sounds TODO :/
}
protected func Grab(object pTarget, bool fGrab)
@ -183,7 +183,7 @@ public func Eat(object food)
{
DoEnergy(food->NutritionalValue());
food->RemoveObject();
Sound("Munch*.ogg");
Sound("Munch?");
SetAction("Eat");
}

View File

@ -21,7 +21,7 @@ private func Initialize()
func Hit()
{
Sound("WoodHit*.ogg");
Sound("WoodHit?");
}
/* Harvesting */

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("SoftHit1.ogg");
Sound("SoftHit1");
}
public func IsOvenProduct() { return true; }

View File

@ -2,7 +2,7 @@
func Hit()
{
Sound("WoodHit*.ogg");
Sound("WoodHit?");
}
/* Eating */

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("SoftHit1.ogg");
Sound("SoftHit1");
}
public func IsMillProduct() { return true; }

View File

@ -11,7 +11,7 @@ protected func Hit()
{
CastPXS("Earth", 200, 18);
Sound("EarthHit*");
Sound("EarthHit?");
RemoveObject();
return 1;
}

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("CrystalHit*");
Sound("CrystalHit?");
}
protected func Construction()

View File

@ -8,7 +8,7 @@ protected func Construction()
protected func Hit()
{
Sound("MetalHit*");
Sound("MetalHit?");
return 1;
}

View File

@ -9,7 +9,7 @@ protected func Construction()
protected func Hit()
{
Sound("CrystalHit*");
Sound("CrystalHit?");
}
local Collectible = 1;

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("WoodHit*");
Sound("WoodHit?");
return 1;
}

View File

@ -24,7 +24,7 @@ public func ControlUse(object pByClonk, int iX, int iY)
if( tree )
{
pByClonk->SetAction("Chop"); //FIXME: actually implement this
Sound("KnightConfirm*");
Sound("KnightConfirm?");
} else {
if(pByClonk->GetAction() == "Chop")
pByClonk->SetAction("Idle");

View File

@ -21,7 +21,7 @@ protected func Initialize()
private func Hit()
{
Sound("Clonk.ogg");
Sound("Clonk");
if(iVolume >= 1) {
if(GBackLiquid(0,7) && GetMaterial(0,7) != szLiquid) return 0;
EmptyBarrel(GetR());

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("RockHit*");
Sound("RockHit?");
}
public func IsToolProduct() { return 1; }

View File

@ -93,7 +93,7 @@ private func GetWall(angle)
return false;
}
protected func Hit() { Sound("WoodHit*"); }
protected func Hit() { Sound("WoodHit?"); }
protected func Incineration() { Extinguish(); Fuse(); }

View File

@ -44,7 +44,7 @@ public func Launch(int angle, int str, object shooter, object bow)
SetXDir(xdir);
SetYDir(ydir);
SetR(angle);
Sound("ArrowShoot*.ogg");
Sound("ArrowShoot?");
AddEffect("InFlight", this, 1, 1, this);
}
@ -59,7 +59,7 @@ private func Stick()
{
if (GetEffect("InFlight",this))
{
Sound("ArrowHitGround.ogg");
Sound("ArrowHitGround");
RemoveEffect("InFlight",this);

View File

@ -146,7 +146,7 @@ public func FinishedAiming(object clonk, int angle)
hook->Exit();
hook->Launch(angle, 100, clonk, this);
DetachMesh(hook_attach);
Sound("BowShoot*.ogg");
Sound("BowShoot?");
// Open the hand to let the string go and play the fire animation
PlayAnimation("Fire", 6, Anim_Linear(0, 0, GetAnimationLength("Fire"), animation_set["ShootTime"], ANIM_Hold), Anim_Const(1000));

View File

@ -43,7 +43,7 @@ protected func ControlUse(object pClonk, iX, iY)
FireWeapon(pClonk, iX, iY);
Amount=0;
AddEffect("JarReload",this,100,1,this);
Sound("WindCharge.ogg",false,nil,nil,1);
Sound("WindCharge",false,nil,nil,1);
sound=true;
}
@ -72,7 +72,7 @@ protected func Load()
{
if(!sound)
{
Sound("WindCharge.ogg",false,nil,nil,1);
Sound("WindCharge",false,nil,nil,1);
sound=true;
}
Amount += 2; //Air is sucked in.
@ -101,8 +101,8 @@ protected func Load()
protected func ChargeSoundStop()
{
Sound("WindCharge.ogg",false,nil,nil,-1);
Sound("WindChargeStop.ogg");
Sound("WindCharge",false,nil,nil,-1);
Sound("WindChargeStop");
sound=false;
}
@ -111,7 +111,7 @@ private func FireWeapon(object pClonk,iX,iY)
var iAngle=Angle(0,0,iX,iY);
ChargeSoundStop();
Sound("WindGust.ogg");
Sound("WindGust");
//Find Victims to push
for(var i=10; i<32; i++)

View File

@ -111,7 +111,7 @@ protected func DoSwing(object clonk, int ix, int iy)
else
{
CastParticles("Spark",RandomX(3,9),35,x2*9/10,y2*9/10,10,30,RGB(255,255,150),RGB(255,255,200));
Sound("Clang*");
Sound("Clang?");
}
// dig out resources too! Don't just remove landscape pixels

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("RockHit*");
Sound("RockHit?");
}
public func IsToolProduct() { return 1; }

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("WoodHit*");
Sound("WoodHit?");
return 1;
}

View File

@ -73,7 +73,7 @@ private func StartUsage(object clonk)
//Animations and effects for TeleGlove
Sound("Electrical.ogg",nil,nil,nil,+1);
Sound("Electrical",nil,nil,nil,+1);
PlayAnimation("Opening", -5, Anim_Linear(0,0,GetAnimationLength("Opening"), 10, ANIM_Hold), Anim_Const(1000));
anim_spin = PlayAnimation("Spin",5, Anim_Linear(0,0,GetAnimationLength("Spin"), 40, ANIM_Loop), Anim_Const(1000));
}
@ -245,7 +245,7 @@ protected func ControlUseCancel(object clonk, int ix, int iy)
protected func CancelUse(object clonk)
{
EndUsage(clonk);
Sound("Electrical.ogg",nil,nil,nil,-1);
Sound("Electrical",nil,nil,nil,-1);
if(aiming = 1) PlayAnimation("Closing", -5, Anim_Linear(0,0,GetAnimationLength("Closing"), 10, ANIM_Hold), Anim_Const(1000));
StopAnimation(anim_spin);
aiming = 0;

View File

@ -33,7 +33,7 @@ public func Launch(int angle, int str, object shooter)
SetXDir(xdir);
SetYDir(ydir);
SetR(angle);
Sound("ArrowShoot*.ogg");
Sound("ArrowShoot?");
// Shooter controls the arrow.
SetController(shooter->GetController());
@ -82,15 +82,15 @@ public func HitObject(object obj)
public func OnStrike(object obj)
{
if(obj->GetAlive())
Sound("ProjectileHitLiving*.ogg");
Sound("ProjectileHitLiving?");
else
Sound("ArrowHitGround.ogg");
Sound("ArrowHitGround");
}
public func Hit()
{
if(GetEffect("InFlight",this))
Sound("ArrowHitGround.ogg");
Sound("ArrowHitGround");
Stick();
}

View File

@ -93,7 +93,7 @@ public func DuringLoad(object clonk) { return AddArrow(clonk); }
// Called during loading then the arrow is added to the animation
public func AddArrow(object clonk)
{
Sound("BowLoad*.ogg");
Sound("BowLoad?");
iArrowMesh = clonk->AttachMesh(HelpArrow, "pos_hand1", "main", nil);
}
@ -139,7 +139,7 @@ public func FinishedAiming(object clonk, int angle)
{
var arrow = Contents(0)->TakeObject();
arrow->Launch(angle,100,clonk);
Sound("BowShoot*.ogg");
Sound("BowShoot?");
}
}
@ -215,12 +215,12 @@ func RejectCollect(id arrowid, object arrows)
/*
func Selection()
{
Sound("DrawBow.ogg");
Sound("DrawBow");
}
func Deselection()
{
Sound("PutAwayBow.ogg");
Sound("PutAwayBow");
}
*/
func Definition(def) {

View File

@ -53,9 +53,9 @@ func DoExplode()
i--;
}
if(GBackLiquid())
Sound("BlastLiquid2.ogg");
Sound("BlastLiquid2");
else
Sound("BlastMetal.ogg");
Sound("BlastMetal");
CreateParticle("ExploSmoke", 0,0,0,0,390,RGBa(255,255,255,165));
Explode(14);
}

View File

@ -29,7 +29,7 @@ protected func Hit()
public func HitObject(object obj)
{
ProjectileHit(obj,ProjectileDamage(),ProjectileHit_tumble);
Sound("ProjectileHitLiving*.ogg");
Sound("ProjectileHitLiving?");
RemoveObject();
}

View File

@ -46,7 +46,7 @@ public func ControlUseStart(object clonk, int x, int y)
ControlUseHolding(clonk, x, y);
Sound("DrawJavelin.ogg");
Sound("DrawJavelin");
return 1;
}
@ -112,7 +112,7 @@ public func DoThrow(object clonk, int angle)
javelin->AddEffect("Flight",javelin,1,1,javelin,nil);
javelin->AddEffect("HitCheck",javelin,1,1,nil,nil,clonk);
Sound("ThrowJavelin*.ogg");
Sound("ThrowJavelin?");
fAiming = -1;
clonk->UpdateAttach();
@ -137,9 +137,9 @@ public func HitObject(object obj)
public func OnStrike(object obj)
{
if(obj->GetAlive())
Sound("ProjectileHitLiving*.ogg");
Sound("ProjectileHitLiving?");
else
Sound("JavelinHitGround.ogg");
Sound("JavelinHitGround");
}
protected func Hit()
@ -147,7 +147,7 @@ protected func Hit()
if(GetEffect("Flight",this))
{
Stick();
Sound("JavelinHitGround.ogg");
Sound("JavelinHitGround");
}
else
Sound("WoodHit");

View File

@ -15,7 +15,7 @@ protected func Hit()
{
RemoveEffect("HitCheck",this);
Sound("BulletHitGround*.ogg");
Sound("BulletHitGround?");
CastParticles("Spark",1,20,0,0,15,25,RGB(255,200,0),RGB(255,255,150));
@ -41,7 +41,7 @@ public func Launch(object shooter, int angle, int dist, int speed)
CreateObject(BulletTrail,0,0)->Set(2, 200, this);
// sound
Sound("BulletShot*.ogg");
Sound("BulletShot?");
}
public func HitObject(object obj)
@ -54,9 +54,9 @@ public func HitObject(object obj)
public func OnStrike(object obj)
{
if(obj->GetAlive())
Sound("ProjectileHitLiving*.ogg");
Sound("ProjectileHitLiving?");
else
Sound("BulletHitGround*.ogg");
Sound("BulletHitGround?");
}
func UpdatePicture()

View File

@ -154,7 +154,7 @@ private func FireWeapon(object clonk, int angle)
loaded = false;
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)));
Sound("GunShoot*.ogg");
Sound("GunShoot?");
// Muzzle Flash & gun smoke
var IX=Sin(180-angle,MuskFront);

View File

@ -186,7 +186,7 @@ func HitByWeapon(by, iDamage)
var angle_diff = Abs(Normalize(shield_angle-object_angle,-180));
if (angle_diff > 45) return 0;
Sound(Format("ShieldMetalHit%d.ogg", Random(4)+1));
Sound("ShieldMetalHit?");
// bash him hard!
ApplyWeaponBash(by, 100, iAngle);
@ -253,7 +253,7 @@ func FxShieldStopControlQueryCatchBlow(object target, effect, object obj)
// dont collect blocked objects
AddEffect("NoCollection", obj, 1, 30);
Sound(Format("ShieldMetalHit%d.ogg", Random(4)+1));
Sound("ShieldMetalHit?");
return true;
}

View File

@ -107,7 +107,7 @@ public func ControlUse(object clonk, int x, int y)
magic_number=((magic_number+1)%10) + (ObjectNumber()*10);
StartWeaponHitCheckEffect(clonk, length, 1);
this->Sound(Format("WeaponSwing%d.ogg", 1+Random(3)), false, nil, nil, nil);
this->Sound("WeaponSwing?", false, nil, nil, nil);
return true;
}
@ -219,7 +219,7 @@ func CheckStrike(iTime)
}
// sound and done. We can only hit one target
Sound(Format("WeaponHit%d.ogg", 1+Random(3)), false);
Sound("WeaponHit?", false);
break;
}
}

View File

@ -43,13 +43,13 @@ private func OnContentMenuOpen() { Open(); }
private func Open()
{
chestanim = PlayAnimation("Open", 5, Anim_Linear(0, 0, GetAnimationLength("Open"), 22, ANIM_Hold), Anim_Const(1000));
Sound("ChestOpen.ogg");
Sound("ChestOpen");
}
private func Close()
{
PlayAnimation("Close", 5, Anim_Linear(0, 0, GetAnimationLength("Close"), 15, ANIM_Hold), Anim_Const(1000));
Sound("ChestClose.ogg");
Sound("ChestClose");
}
protected func Definition(def)

View File

@ -35,7 +35,7 @@ public func NeedsRawMaterial(id rawmat_id)
public func OnProductionStart(id product)
{
AddEffect("Smelting", this, 100, 1, this);
Sound("FurnaceStart.ogg");
Sound("FurnaceStart");
return;
}
@ -52,7 +52,7 @@ public func OnProductionFinish(id product)
protected func Collection()
{
Sound("Clonk.ogg");
Sound("Clonk");
return;
}
@ -68,7 +68,7 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
// Furnace sound after some time.
if (time == 100)
Sound("FurnaceLoop.ogg", false, 100, nil, +1);
Sound("FurnaceLoop", false, 100, nil, +1);
// Pour after some time.
if(time == 244)
@ -76,7 +76,7 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
//Molten metal hits cast... Sizzling sound
if (time == 256)
Sound("Sizzle.ogg");
Sound("Sizzle");
// Fire from the pouring exit.
if (Inside(time, 244, 290))
@ -85,8 +85,8 @@ public func FxSmeltingTimer(object target, proplist effect, int time)
if (time == 290)
{
SetMeshMaterial("Metal", 1);
Sound("FurnaceLoop.ogg", false ,100, nil, -1);
Sound("FurnaceStop.ogg");
Sound("FurnaceLoop", false ,100, nil, -1);
Sound("FurnaceStop");
return -1;
}
return 1;
@ -97,7 +97,7 @@ public func OnProductEjection(object product)
product->SetPosition(GetX() - 18, GetY() + 16);
product->SetSpeed(0, -17);
product->SetR(30 - Random(59));
Sound("Pop.ogg");
Sound("Pop");
return;
}

View File

@ -44,7 +44,7 @@ private func IsClosed()
protected func Hit()
{
Sound("GateHit.ogg");
Sound("GateHit");
return;
}

View File

@ -19,7 +19,7 @@ public func ControlUp(object clonk)
{
targetdoor->OpenDoor();
SetAction("SpinLeft");
Sound("Chain.ogg");
Sound("Chain");
}
}
@ -29,7 +29,7 @@ public func ControlDown(object clonk)
{
targetdoor->CloseDoor();
SetAction("SpinRight");
Sound("Chain.ogg");
Sound("Chain");
}
}

View File

@ -61,7 +61,7 @@ public func ContainedUseStop(object clonk, int ix, int iy)
var shot = ammo->TakeObject();
var angle = this->GetR();
shot->Launch(clonk, angle, 35, 200);
Sound("GunShoot*.ogg");
Sound("GunShoot?");
// Muzzle Flash & gun smoke
var IX = Sin(GetR(), 30);
@ -143,7 +143,7 @@ public func ContainedStop(object clonk)
public func StartFlight(int new_throttle)
{
Sound("EngineStart.ogg");
Sound("EngineStart");
AddEffect("IntSoundDelay",this,1,1,this);
SetAction("Fly");
throttle = new_throttle;
@ -152,7 +152,7 @@ public func StartFlight(int new_throttle)
public func StartInstantFlight(int angle, int new_throttle)
{
angle -= 10;
Sound("EngineStart.ogg");
Sound("EngineStart");
AddEffect("IntSoundDelay",this,1,1,this);
SetAction("Fly");
throttle = new_throttle;
@ -166,8 +166,8 @@ public func StartInstantFlight(int angle, int new_throttle)
public func CancelFlight()
{
RemoveEffect("IntSoundDelay",this);
Sound("EngineLoop.ogg",0,100,nil,-1);
Sound("EngineStop.ogg");
Sound("EngineLoop",0,100,nil,-1);
Sound("EngineStop");
SetAction("Land");
rdir = 0;
throttle = 0;
@ -177,7 +177,7 @@ private func FxIntSoundDelayTimer(object target, effect, int timer)
{
if(timer >= 78)
{
Sound("EngineLoop.ogg",0,100,nil,1);
Sound("EngineLoop",0,100,nil,1);
return -1;
}
}

View File

@ -75,14 +75,14 @@ public func FxFlyEffectTimer(object target, int num, int timer)
if(!enginesound)
{
enginesound = true;
Sound("FanLoop.ogg",nil,nil,nil,1);
Sound("FanLoop",nil,nil,nil,1);
}
}
else
{
if(enginesound == true)
{
Sound("FanLoop.ogg",nil,nil,nil,-1);
Sound("FanLoop",nil,nil,nil,-1);
enginesound = nil;
}
}
@ -213,7 +213,7 @@ func AirshipDeath()
hitbox->RemoveObject();
//Make sure engine sound is gone
Sound("FanLoop.ogg",nil,nil,nil,-1);
Sound("FanLoop",nil,nil,nil,-1);
//This object has served its purpose.
Explode(27);

View File

@ -84,7 +84,7 @@ private func CheckForKeg(object clonk)
{
keg->Exit();
keg->Enter(this);
Sound("WoodHit*");
Sound("WoodHit?");
}
else // No keg, stop using cannon.
{

View File

@ -145,7 +145,7 @@ protected func DoFire(object clonk, int power, int hand)
aim_anim = PlayAnimation("ArmPosition", 1, Anim_Linear(GetAnimationPosition(aim_anim),0, GetAnimationLength("ArmPosition"), 3, ANIM_Hold), Anim_Const(1000));
//Sound
Sound("Catapult_Launch.ogg");
Sound("Catapult_Launch");
var projectile = nil;
if(Contents(0)) projectile = Contents(0); //Is clonk sitting in the catapult? Then (s)he shall be the projectile!

View File

@ -21,7 +21,7 @@ global func Explode(int level, bool silent)
{
var grade = BoundBy(level / 10 - 1, 1, 3);
if(GBackLiquid())
Sound(Format("BlastLiquid%d.ogg",grade));
Sound(Format("BlastLiquid%d",grade));
else
Sound(Format("Blast%d", grade));
}

View File

@ -208,10 +208,10 @@ global func StonyObjectHit(int x, int y)
}
// Check if digfree
if (!GetMaterialVal("DigFree", "Material", GetMaterial(x*i, y*i)) && GBackSolid(x*i, y*i))
return Sound("RockHit*");
return Sound("RockHit?");
// Else play standard sound
if (Distance(0,0,xdir,ydir) > 10)
return Sound("SoftTouch*.ogg");
return Sound("SoftTouch?");
else
return Sound("SoftHit*.ogg");
return Sound("SoftHit?");
}

View File

@ -2,7 +2,7 @@
protected func Hit()
{
Sound("RockHit*");
Sound("RockHit?");
}
public func IsToolProduct() { return 1; }

View File

@ -99,7 +99,7 @@ public func Interact(object clonk)
protected func Hit()
{
Sound("MetalHit*");
Sound("MetalHit?");
}
func Construction(object constructor)

View File

@ -32,5 +32,5 @@ private func DoEnvironment()
CreateObject(Environment_Clouds);
CreateObject(Environment_Celestial);
CreateObject(Environment_Time);
Sound("BirdsLoop.ogg",true,100,nil,+1);
Sound("BirdsLoop",true,100,nil,+1);
}

View File

@ -17,7 +17,7 @@ protected func Initialize()
var time = CreateObject(Environment_Time);
time->SetTime(1125);
time->SetCycleSpeed(0);
Sound("WindLoop.ogg", true, 40, nil, 1);
Sound("WindLoop", true, 40, nil, 1);
// Goal: Melee, all opponents must be killed.
CreateObject(Goal_Melee, 0, 0, NO_OWNER);

View File

@ -4,7 +4,7 @@
* Copyright (c) 1998-2000, 2004, 2008 Matthes Bender
* Copyright (c) 2001, 2005-2006, 2008 Sven Eberhardt
* Copyright (c) 2003-2005 Peter Wortmann
* Copyright (c) 2005-2006, 2009, 2011 Günther Brammer
* Copyright (c) 2005-2006, 2009, 2011 Günther Brammer
* Copyright (c) 2009 Nicolas Hake
* Copyright (c) 2010 Benjamin Herr
* Copyright (c) 2010 Martin Plicht
@ -509,7 +509,7 @@ int32_t C4SoundSystem::EffectInBank(const char *szSound)
char szName[C4MaxSoundName+4+1];
// Compose name (with extension)
SCopy(szSound,szName,C4MaxSoundName);
DefaultExtension(szName,"wav");
DefaultExtension(szName,"*");
// Count all matching sounds in bank
for (pSfx=FirstSound; pSfx; pSfx=pSfx->Next)
if (WildcardMatch(szName,pSfx->Name))
@ -541,11 +541,8 @@ C4SoundEffect* C4SoundSystem::GetEffect(const char *szSndName)
int32_t iNumber;
// Evaluate sound name
SCopy(szSndName,szName,C4MaxSoundName);
// Default extension
DefaultExtension(szName,"wav");
// Convert old style '*' wildcard to correct '?' wildcard
// For sound effects, '*' is supposed to match single digits only
SReplaceChar(szName, '*', '?');
// Any extension accepted
DefaultExtension(szName,"*");
// Sound with a wildcard: determine number of available matches
if (SCharCount('?',szName))
{
@ -588,8 +585,7 @@ C4SoundInstance *C4SoundSystem::FindInstance(const char *szSndName, C4Object *pO
char szName[C4MaxSoundName+4+1];
// Evaluate sound name (see GetEffect)
SCopy(szSndName,szName,C4MaxSoundName);
DefaultExtension(szName,"wav");
SReplaceChar(szName, '*', '?');
DefaultExtension(szName,"*");
// Find an effect with a matching instance
for (C4SoundEffect *csfx = FirstSound; csfx; csfx = csfx->Next)
if (WildcardMatch(szName, csfx->Name))
@ -601,8 +597,6 @@ C4SoundInstance *C4SoundSystem::FindInstance(const char *szSndName, C4Object *pO
}
// LoadEffects will load all sound effects of all known sound types (i.e. *.wav and *.ogg)
// To play an ogg effect, however, you will have to specify the extension in the sound
// command (e.g. Sound("Hello.ogg")), because all playback functions will default to wav only.
// LoadEffects is currently used for static loading from object definitions only.
int32_t C4SoundSystem::LoadEffects(C4Group &hGroup, bool fStatic)