' Missile Lock ' ' Copyright (C) 2006 Ian Cowburn (ianc@noddybox.co.uk) ' ' This program is free software; you can redistribute it and/or modify ' it under the terms of the GNU General Public License as published by ' the Free Software Foundation; either version 2 of the License, or ' (at your option) any later version. ' ' This program is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' GNU General Public License for more details. ' ' You should have received a copy of the GNU General Public License ' along with this program; if not, write to the Free Software ' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ' ' ------------------------------------------------------------------------- ' ' $Id$ ' Strict Import brl.audio Import brl.oggloader Import brl.freeaudioaudio Incbin "SFX/alert.ogg" Incbin "SFX/missile_explode.ogg" Incbin "SFX/missile_launch.ogg" Incbin "SFX/ship_explode.ogg" Incbin "SFX/ship_hit.ogg" Type SFX Global sfx_alert:TSound Global sfx_missile_explode:TSound Global sfx_missile_launch:TSound Global sfx_ship_explode:TSound Global sfx_ship_hit:TSound Function SafeLoadSound:TSound(p:String, loop:Int=False) Local i:TSound=LoadSound(p,loop) Assert i,"Failed to load " + p Return i End Function Function Init() sfx_alert=SafeLoadSound("incbin::SFX/alert.ogg") sfx_missile_explode=SafeLoadSound("incbin::SFX/missile_explode.ogg") sfx_missile_launch=SafeLoadSound("incbin::SFX/missile_launch.ogg") sfx_ship_explode=SafeLoadSound("incbin::SFX/ship_explode.ogg") sfx_ship_hit=SafeLoadSound("incbin::SFX/ship_hit.ogg") End Function Function Alert() PlaySound(sfx_alert) End Function Function MissileExplode() PlaySound(sfx_missile_explode) End Function Function MissileLaunch() PlaySound(sfx_missile_launch) End Function Function ShipHit() PlaySound(sfx_ship_hit) End Function Function ShipExplode() PlaySound(sfx_ship_explode) End Function End Type