diff --git a/data/sound/MegaShrink.wav b/data/sound/MegaShrink.wav new file mode 100644 index 00000000..6abb0868 Binary files /dev/null and b/data/sound/MegaShrink.wav differ diff --git a/data/sound/all_achievement.wav b/data/sound/all_achievement.wav new file mode 100644 index 00000000..0c68ab61 Binary files /dev/null and b/data/sound/all_achievement.wav differ diff --git a/data/sound/begin.wav b/data/sound/begin.wav new file mode 100644 index 00000000..7aeea365 Binary files /dev/null and b/data/sound/begin.wav differ diff --git a/data/sound/bouncehard1.wav b/data/sound/bouncehard1.wav index 4ed0c8c6..6dcf9b5e 100644 Binary files a/data/sound/bouncehard1.wav and b/data/sound/bouncehard1.wav differ diff --git a/data/sound/bouncehard2.wav b/data/sound/bouncehard2.wav index 7f8649a0..8f9c629c 100644 Binary files a/data/sound/bouncehard2.wav and b/data/sound/bouncehard2.wav differ diff --git a/data/sound/bouncehard3.wav b/data/sound/bouncehard3.wav index 023bb412..55e10fd6 100644 Binary files a/data/sound/bouncehard3.wav and b/data/sound/bouncehard3.wav differ diff --git a/data/sound/bouncehard4.wav b/data/sound/bouncehard4.wav index be4cc305..7cdddcc3 100644 Binary files a/data/sound/bouncehard4.wav and b/data/sound/bouncehard4.wav differ diff --git a/data/sound/bumper1.wav b/data/sound/bumper1.wav index 574fcdd6..e2fb2589 100644 Binary files a/data/sound/bumper1.wav and b/data/sound/bumper1.wav differ diff --git a/data/sound/bumperding1.wav b/data/sound/bumperding1.wav index 946f02f9..bff1edfb 100644 Binary files a/data/sound/bumperding1.wav and b/data/sound/bumperding1.wav differ diff --git a/data/sound/buttonover.wav b/data/sound/buttonover.wav index 703b14c3..0a0e2f7c 100644 Binary files a/data/sound/buttonover.wav and b/data/sound/buttonover.wav differ diff --git a/data/sound/buttonpress.wav b/data/sound/buttonpress.wav index 100f40bb..af5f9a92 100644 Binary files a/data/sound/buttonpress.wav and b/data/sound/buttonpress.wav differ diff --git a/data/sound/checkpoint.wav b/data/sound/checkpoint.wav index c9b12102..4c178a3b 100644 Binary files a/data/sound/checkpoint.wav and b/data/sound/checkpoint.wav differ diff --git a/data/sound/dosuperjump.wav b/data/sound/dosuperjump.wav index 54e2ee7e..f0b2d701 100644 Binary files a/data/sound/dosuperjump.wav and b/data/sound/dosuperjump.wav differ diff --git a/data/sound/easter_egg.wav b/data/sound/easter_egg.wav new file mode 100644 index 00000000..1aa8396c Binary files /dev/null and b/data/sound/easter_egg.wav differ diff --git a/data/sound/fan_loop.wav b/data/sound/fan_loop.wav index 408fb591..afea79a4 100644 Binary files a/data/sound/fan_loop.wav and b/data/sound/fan_loop.wav differ diff --git a/data/sound/finish.wav b/data/sound/finish.wav new file mode 100644 index 00000000..86f0967d Binary files /dev/null and b/data/sound/finish.wav differ diff --git a/data/sound/forcefield.wav b/data/sound/forcefield.wav index 13ed5bca..e8e3230f 100644 Binary files a/data/sound/forcefield.wav and b/data/sound/forcefield.wav differ diff --git a/data/sound/gem_all.wav b/data/sound/gem_all.wav new file mode 100644 index 00000000..25368907 Binary files /dev/null and b/data/sound/gem_all.wav differ diff --git a/data/sound/gem_collect.wav b/data/sound/gem_collect.wav new file mode 100644 index 00000000..67c7485d Binary files /dev/null and b/data/sound/gem_collect.wav differ diff --git a/data/sound/go.wav b/data/sound/go.wav index 391da42e..82119945 100644 Binary files a/data/sound/go.wav and b/data/sound/go.wav differ diff --git a/data/sound/gravity.wav b/data/sound/gravity.wav new file mode 100644 index 00000000..4cd0e9a1 Binary files /dev/null and b/data/sound/gravity.wav differ diff --git a/data/sound/gravitychange.wav b/data/sound/gravitychange.wav index 4e16f3cf..b808eb82 100644 Binary files a/data/sound/gravitychange.wav and b/data/sound/gravitychange.wav differ diff --git a/data/sound/gui_back.wav b/data/sound/gui_back.wav new file mode 100644 index 00000000..7a6843b4 Binary files /dev/null and b/data/sound/gui_back.wav differ diff --git a/data/sound/gui_confirm.wav b/data/sound/gui_confirm.wav new file mode 100644 index 00000000..052eea01 Binary files /dev/null and b/data/sound/gui_confirm.wav differ diff --git a/data/sound/gui_next.wav b/data/sound/gui_next.wav new file mode 100644 index 00000000..e84fb91c Binary files /dev/null and b/data/sound/gui_next.wav differ diff --git a/data/sound/gyrocopter.wav b/data/sound/gyrocopter.wav new file mode 100644 index 00000000..facb9d13 Binary files /dev/null and b/data/sound/gyrocopter.wav differ diff --git a/data/sound/ice_roll.wav b/data/sound/ice_roll.wav new file mode 100644 index 00000000..fea4d836 Binary files /dev/null and b/data/sound/ice_roll.wav differ diff --git a/data/sound/infotutorial.wav b/data/sound/infotutorial.wav index 7022759b..5069e6ca 100644 Binary files a/data/sound/infotutorial.wav and b/data/sound/infotutorial.wav differ diff --git a/data/sound/jump.wav b/data/sound/jump.wav index 5f349af3..337836b4 100644 Binary files a/data/sound/jump.wav and b/data/sound/jump.wav differ diff --git a/data/sound/level_checkpoint.wav b/data/sound/level_checkpoint.wav new file mode 100644 index 00000000..09156eee Binary files /dev/null and b/data/sound/level_checkpoint.wav differ diff --git a/data/sound/level_complete.wav b/data/sound/level_complete.wav new file mode 100644 index 00000000..e9c0c3f5 Binary files /dev/null and b/data/sound/level_complete.wav differ diff --git a/data/sound/level_finish.wav b/data/sound/level_finish.wav new file mode 100644 index 00000000..86f0967d Binary files /dev/null and b/data/sound/level_finish.wav differ diff --git a/data/sound/level_platform.wav b/data/sound/level_platform.wav new file mode 100644 index 00000000..74313236 Binary files /dev/null and b/data/sound/level_platform.wav differ diff --git a/data/sound/level_text.wav b/data/sound/level_text.wav new file mode 100644 index 00000000..fc6749ad Binary files /dev/null and b/data/sound/level_text.wav differ diff --git a/data/sound/marble_blast_ultra.wav b/data/sound/marble_blast_ultra.wav new file mode 100644 index 00000000..167555f5 Binary files /dev/null and b/data/sound/marble_blast_ultra.wav differ diff --git a/data/sound/marble_roll_rubber.wav b/data/sound/marble_roll_rubber.wav new file mode 100644 index 00000000..5acd1716 Binary files /dev/null and b/data/sound/marble_roll_rubber.wav differ diff --git a/data/sound/mega_bouncehard1.wav b/data/sound/mega_bouncehard1.wav index 267d3d9c..89bd6ce6 100644 Binary files a/data/sound/mega_bouncehard1.wav and b/data/sound/mega_bouncehard1.wav differ diff --git a/data/sound/mega_bouncehard2.wav b/data/sound/mega_bouncehard2.wav index 38747d06..82fdb11a 100644 Binary files a/data/sound/mega_bouncehard2.wav and b/data/sound/mega_bouncehard2.wav differ diff --git a/data/sound/mega_bouncehard3.wav b/data/sound/mega_bouncehard3.wav index aedf9cb8..a03ae63f 100644 Binary files a/data/sound/mega_bouncehard3.wav and b/data/sound/mega_bouncehard3.wav differ diff --git a/data/sound/mega_bouncehard4.wav b/data/sound/mega_bouncehard4.wav index 3c16d091..1ebbc3cd 100644 Binary files a/data/sound/mega_bouncehard4.wav and b/data/sound/mega_bouncehard4.wav differ diff --git a/data/sound/mega_marble.wav b/data/sound/mega_marble.wav new file mode 100644 index 00000000..758fdd96 Binary files /dev/null and b/data/sound/mega_marble.wav differ diff --git a/data/sound/mega_roll.wav b/data/sound/mega_roll.wav index e38c9aeb..5b3d8b75 100644 Binary files a/data/sound/mega_roll.wav and b/data/sound/mega_roll.wav differ diff --git a/data/sound/missinggems.wav b/data/sound/missinggems.wav index 1066862e..ec1b8cc6 100644 Binary files a/data/sound/missinggems.wav and b/data/sound/missinggems.wav differ diff --git a/data/sound/movingblockloop.wav b/data/sound/movingblockloop.wav index 42a236eb..c3563aa1 100644 Binary files a/data/sound/movingblockloop.wav and b/data/sound/movingblockloop.wav differ diff --git a/data/sound/new_achievement.wav b/data/sound/new_achievement.wav new file mode 100644 index 00000000..39fb84ae Binary files /dev/null and b/data/sound/new_achievement.wav differ diff --git a/data/sound/new_high_score.wav b/data/sound/new_high_score.wav new file mode 100644 index 00000000..095d6e56 Binary files /dev/null and b/data/sound/new_high_score.wav differ diff --git a/data/sound/opponent_gem_collect.wav b/data/sound/opponent_gem_collect.wav new file mode 100644 index 00000000..b8fe9660 Binary files /dev/null and b/data/sound/opponent_gem_collect.wav differ diff --git a/data/sound/out_of_bounds.wav b/data/sound/out_of_bounds.wav new file mode 100644 index 00000000..b774d116 Binary files /dev/null and b/data/sound/out_of_bounds.wav differ diff --git a/data/sound/player_join.wav b/data/sound/player_join.wav new file mode 100644 index 00000000..89b733ad Binary files /dev/null and b/data/sound/player_join.wav differ diff --git a/data/sound/player_kicked.wav b/data/sound/player_kicked.wav new file mode 100644 index 00000000..3bdffb1d Binary files /dev/null and b/data/sound/player_kicked.wav differ diff --git a/data/sound/pu_easter.wav b/data/sound/pu_easter.wav new file mode 100644 index 00000000..d937c1a7 Binary files /dev/null and b/data/sound/pu_easter.wav differ diff --git a/data/sound/pu_gravity.wav b/data/sound/pu_gravity.wav new file mode 100644 index 00000000..da06a595 Binary files /dev/null and b/data/sound/pu_gravity.wav differ diff --git a/data/sound/pu_timetravel.wav b/data/sound/pu_timetravel.wav new file mode 100644 index 00000000..e217337f Binary files /dev/null and b/data/sound/pu_timetravel.wav differ diff --git a/data/sound/ready.wav b/data/sound/ready.wav index e527c0c4..9f55b05f 100644 Binary files a/data/sound/ready.wav and b/data/sound/ready.wav differ diff --git a/data/sound/rolling_hard.wav b/data/sound/rolling_hard.wav index 6fe30a29..f85dc6b9 100644 Binary files a/data/sound/rolling_hard.wav and b/data/sound/rolling_hard.wav differ diff --git a/data/sound/sliding.wav b/data/sound/sliding.wav index 35efa784..2c59bd99 100644 Binary files a/data/sound/sliding.wav and b/data/sound/sliding.wav differ diff --git a/data/sound/spawn.wav b/data/sound/spawn.wav index 5baef063..f811c2f5 100644 Binary files a/data/sound/spawn.wav and b/data/sound/spawn.wav differ diff --git a/data/sound/spawn_alternate.wav b/data/sound/spawn_alternate.wav new file mode 100644 index 00000000..72786b08 Binary files /dev/null and b/data/sound/spawn_alternate.wav differ diff --git a/data/sound/spawn_alternate2.wav b/data/sound/spawn_alternate2.wav new file mode 100644 index 00000000..d2fe08a9 Binary files /dev/null and b/data/sound/spawn_alternate2.wav differ diff --git a/data/sound/super_jump.wav b/data/sound/super_jump.wav new file mode 100644 index 00000000..1e27aa83 Binary files /dev/null and b/data/sound/super_jump.wav differ diff --git a/data/sound/super_speed.wav b/data/sound/super_speed.wav new file mode 100644 index 00000000..c6c135ef Binary files /dev/null and b/data/sound/super_speed.wav differ diff --git a/data/sound/time_travel.wav b/data/sound/time_travel.wav new file mode 100644 index 00000000..38e9296b Binary files /dev/null and b/data/sound/time_travel.wav differ diff --git a/data/sound/trapdooropen.wav b/data/sound/trapdooropen.wav index 22c605a0..dc30cd33 100644 Binary files a/data/sound/trapdooropen.wav and b/data/sound/trapdooropen.wav differ diff --git a/data/sound/ultrablast.wav b/data/sound/ultrablast.wav new file mode 100644 index 00000000..227bf7a6 Binary files /dev/null and b/data/sound/ultrablast.wav differ diff --git a/data/sound/use_blast.wav b/data/sound/use_blast.wav new file mode 100644 index 00000000..8e06e676 Binary files /dev/null and b/data/sound/use_blast.wav differ diff --git a/data/sound/use_blast_ultra.wav b/data/sound/use_blast_ultra.wav new file mode 100644 index 00000000..d9ac147c Binary files /dev/null and b/data/sound/use_blast_ultra.wav differ diff --git a/data/sound/use_gyrocopter.wav b/data/sound/use_gyrocopter.wav index 743e5dbc..b1c2a38f 100644 Binary files a/data/sound/use_gyrocopter.wav and b/data/sound/use_gyrocopter.wav differ diff --git a/data/sound/use_mega.wav b/data/sound/use_mega.wav new file mode 100644 index 00000000..605d4857 Binary files /dev/null and b/data/sound/use_mega.wav differ diff --git a/data/sound/use_speed.wav b/data/sound/use_speed.wav new file mode 100644 index 00000000..2cae977b Binary files /dev/null and b/data/sound/use_speed.wav differ diff --git a/data/sound/use_superjump.wav b/data/sound/use_superjump.wav new file mode 100644 index 00000000..605d4857 Binary files /dev/null and b/data/sound/use_superjump.wav differ diff --git a/data/sound/use_superjump_alternate.wav b/data/sound/use_superjump_alternate.wav new file mode 100644 index 00000000..eadef55d Binary files /dev/null and b/data/sound/use_superjump_alternate.wav differ diff --git a/src/Marble.hx b/src/Marble.hx index 25c6374c..e67a3c93 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -1869,7 +1869,7 @@ class Marble extends GameObject { return; var impulse = this.level.currentUp.multiply(Math.max(Math.sqrt(this.level.blastAmount), this.level.blastAmount) * 10); this.applyImpulse(impulse); - AudioManager.playSound(ResourceLoader.getResource('data/sound/blast.wav', ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource('data/sound/use_blast.wav', ResourceLoader.getAudio, this.soundResources)); this.level.particleManager.createEmitter(this.level.blastAmount > 1 ? blastMaxParticleOptions : blastParticleOptions, this.level.blastAmount > 1 ? blastMaxEmitterData : blastEmitterData, this.getAbsPos().getPosition(), () -> { this.getAbsPos().getPosition().add(this.level.currentUp.multiply(-this._radius * 0.4)); diff --git a/src/MarbleWorld.hx b/src/MarbleWorld.hx index 15234fd3..cb219a05 100644 --- a/src/MarbleWorld.hx +++ b/src/MarbleWorld.hx @@ -19,8 +19,6 @@ import shapes.Checkpoint; import triggers.CheckpointTrigger; import shapes.EasterEgg; import shapes.Sign; -import triggers.TeleportTrigger; -import triggers.DestinationTrigger; import src.Replay; import gui.Canvas; import hxd.snd.Channel; @@ -144,7 +142,6 @@ class MarbleWorld extends Scheduler { public var cursorLock:Bool = true; var timeTravelSound:Channel; - var alarmSound:Channel; var helpTextTimeState:Float = -1e8; var alertTextTimeState:Float = -1e8; @@ -387,12 +384,7 @@ class MarbleWorld extends Scheduler { "sound/bouncehard2.wav", "sound/bouncehard3.wav", "sound/bouncehard4.wav", - "sound/spawn.wav", - "sound/ready.wav", - "sound/set.wav", - "sound/go.wav", - "sound/alarm.wav", - "sound/alarm_timeout.wav", + "sound/spawn_alternate.wav", "sound/missinggems.wav", "shapes/images/glow_bounce.dts", "shapes/images/glow_bounce.png", @@ -456,10 +448,6 @@ class MarbleWorld extends Scheduler { this.blastAmount = 0; this.outOfBoundsTime = null; this.finishTime = null; - if (this.alarmSound != null) { - this.alarmSound.stop(); - this.alarmSound = null; - } this.currentCheckpoint = null; this.currentCheckpointTrigger = null; @@ -534,29 +522,7 @@ class MarbleWorld extends Scheduler { this.newOrientationQuat = new Quat(); this.deselectPowerUp(); - AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn.wav', ResourceLoader.getAudio, this.soundResources)); - - Console.log("State Start"); - this.clearSchedule(); - this.schedule(0.5, () -> { - // setCenterText('ready'); - Console.log("State Ready"); - AudioManager.playSound(ResourceLoader.getResource('data/sound/ready.wav', ResourceLoader.getAudio, this.soundResources)); - return 0; - }); - this.schedule(2, () -> { - // setCenterText('set'); - Console.log("State Set"); - AudioManager.playSound(ResourceLoader.getResource('data/sound/set.wav', ResourceLoader.getAudio, this.soundResources)); - return 0; - }); - this.schedule(3.5, () -> { - // setCenterText('go'); - Console.log("State Go"); - AudioManager.playSound(ResourceLoader.getResource('data/sound/go.wav', ResourceLoader.getAudio, this.soundResources)); - Console.log("State Play"); - return 0; - }); + AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn_alternate.wav', ResourceLoader.getAudio, this.soundResources)); return 0; } @@ -568,19 +534,11 @@ class MarbleWorld extends Scheduler { this.playGui.setCenterText('none'); this.marble.mode = Start; } - if ((this.timeState.currentAttemptTime >= 0.5) && (this.timeState.currentAttemptTime < 2)) { - this.playGui.setCenterText('ready'); + if ((this.timeState.currentAttemptTime >= 0.5) && (this.timeState.currentAttemptTime < 3.5)) { + this.playGui.setCenterText('none'); this.marble.mode = Start; } - if ((this.timeState.currentAttemptTime >= 2) && (this.timeState.currentAttemptTime < 3.5)) { - this.playGui.setCenterText('set'); - this.marble.mode = Start; - } - if ((this.timeState.currentAttemptTime >= 3.5) && (this.timeState.currentAttemptTime < 5.5)) { - this.playGui.setCenterText('go'); - this.marble.mode = Play; - } - if (this.timeState.currentAttemptTime >= 5.5 && this.finishTime == null) { + if (this.timeState.currentAttemptTime >= 3.5 && this.finishTime == null) { this.playGui.setCenterText('none'); this.marble.mode = Play; } @@ -724,10 +682,6 @@ class MarbleWorld extends Scheduler { trigger = new InBoundsTrigger(element, cast this); } else if (datablockLowercase == "helptrigger") { trigger = new HelpTrigger(element, cast this); - } else if (datablockLowercase == "teleporttrigger") { - trigger = new TeleportTrigger(element, cast this); - } else if (datablockLowercase == "destinationtrigger") { - trigger = new DestinationTrigger(element, cast this); } else if (datablockLowercase == "checkpointtrigger") { trigger = new CheckpointTrigger(element, cast this); _previousCheckpointTrigger = cast trigger; @@ -1170,16 +1124,6 @@ class MarbleWorld extends Scheduler { if (timeToDisplay >= this.mission.qualifyTime) return 2; - if (this.timeState.currentAttemptTime >= 3.5) { - // Create the flashing effect - var alarmStart = this.mission.computeAlarmStartTime(); - var elapsed = timeToDisplay - alarmStart; - if (elapsed < 0) - return 0; - if (Math.floor(elapsed) % 2 == 0) - return 2; - } - return 0; // Default yellow } @@ -1198,16 +1142,11 @@ class MarbleWorld extends Scheduler { if (timeTravelSound == null) { var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources); timeTravelSound = AudioManager.playSound(ttsnd, null, true); - - if (alarmSound != null) - alarmSound.pause = true; } } else { if (timeTravelSound != null) { timeTravelSound.stop(); timeTravelSound = null; - if (alarmSound != null) - alarmSound.pause = false; } if (this.timeState.currentAttemptTime >= 3.5) { this.timeState.gameplayClock += dt; @@ -1234,27 +1173,6 @@ class MarbleWorld extends Scheduler { } this.timeState.timeSinceLoad += dt; - // Handle alarm warnings (that the user is about to exceed the par time) - if (this.timeState.currentAttemptTime >= 3.5) { - var alarmStart = this.mission.computeAlarmStartTime(); - - if (prevGameplayClock < alarmStart && this.timeState.gameplayClock >= alarmStart) { - // Start the alarm - this.alarmSound = AudioManager.playSound(ResourceLoader.getResource("data/sound/alarm.wav", ResourceLoader.getAudio, this.soundResources), - null, true); // AudioManager.createAudioSource('alarm.wav'); - this.displayHelp('You have ${(this.mission.qualifyTime - alarmStart)} seconds remaining.'); - } - if (prevGameplayClock < this.mission.qualifyTime && this.timeState.gameplayClock >= this.mission.qualifyTime) { - // Stop the alarm - if (this.alarmSound != null) { - this.alarmSound.stop(); - this.alarmSound = null; - } - this.displayHelp("The clock has passed the Par Time."); - AudioManager.playSound(ResourceLoader.getResource("data/sound/alarm_timeout.wav", ResourceLoader.getAudio, this.soundResources)); - } - } - if (finishTime != null) this.timeState.gameplayClock = finishTime.gameplayClock; playGui.formatTimer(this.timeState.gameplayClock, determineClockColor(this.timeState.gameplayClock)); @@ -1340,7 +1258,7 @@ class MarbleWorld extends Scheduler { if (this.gemCount == this.totalGems) { string = "You have all the diamonds, head for the finish!"; // if (!this.rewinding) - AudioManager.playSound(ResourceLoader.getResource('data/sound/gotallgems.wav', ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource('data/sound/gem_all.wav', ResourceLoader.getAudio, this.soundResources)); // Some levels with this package end immediately upon collection of all gems // if (this.mission.misFile.activatedPackages.includes('endWithTheGems')) { @@ -1359,7 +1277,7 @@ class MarbleWorld extends Scheduler { } // if (!this.rewinding) - AudioManager.playSound(ResourceLoader.getResource('data/sound/gotgem.wav', ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource('data/sound/gem_collect.wav', ResourceLoader.getAudio, this.soundResources)); } displayAlert(string); @@ -1511,10 +1429,6 @@ class MarbleWorld extends Scheduler { timeTravelSound.stop(); timeTravelSound = null; } - if (alarmSound != null) { - alarmSound.stop(); - alarmSound = null; - } } } @@ -1716,7 +1630,6 @@ class MarbleWorld extends Scheduler { // sky.follow = null; // this.oobCameraPosition = camera.position.clone(); playGui.setCenterText('outofbounds'); - AudioManager.playSound(ResourceLoader.getResource('data/sound/whoosh.wav', ResourceLoader.getAudio, this.soundResources)); // if (this.replay.mode != = 'playback') this.oobSchedule = this.schedule(this.timeState.currentAttemptTime + 2, () -> { playGui.setCenterText('none'); @@ -1820,7 +1733,7 @@ class MarbleWorld extends Scheduler { // Wait a bit to select the powerup to prevent immediately using it incase the user skipped the OOB screen by clicking if (this.checkpointHeldPowerup != null) this.schedule(this.timeState.currentAttemptTime + 0.5, () -> this.pickUpPowerUp(this.checkpointHeldPowerup)); - AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn.wav', ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource('data/sound/spawn_alternate.wav', ResourceLoader.getAudio, this.soundResources)); } public function setCursorLock(enabled:Bool) { diff --git a/src/Mission.hx b/src/Mission.hx index ff0215ba..fffc9495 100644 --- a/src/Mission.hx +++ b/src/Mission.hx @@ -236,19 +236,6 @@ class Mission { return ""; } - /** Computes the clock time in MBP when the user should be warned that they're about to exceed the par time. */ - public function computeAlarmStartTime() { - var alarmStart = this.qualifyTime; - if (this.missionInfo.alarmstarttime != null) - alarmStart -= MisParser.parseNumber(this.missionInfo.alarmstarttime); - else { - alarmStart -= 15; - } - alarmStart = Math.max(0, alarmStart); - - return alarmStart; - } - public function download(onFinish:Void->Void) { if (this.isClaMission) { Marbleland.download(this.id, (zipEntries) -> { diff --git a/src/shapes/AntiGravity.hx b/src/shapes/AntiGravity.hx index 3c6a543f..5b6dff31 100644 --- a/src/shapes/AntiGravity.hx +++ b/src/shapes/AntiGravity.hx @@ -43,8 +43,8 @@ class AntiGravity extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/gravitychange.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/gravitychange.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/pu_gravity.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/pu_gravity.wav", ResourceLoader.getAudio, this.soundResources); onFinish(); }); }); diff --git a/src/shapes/Blast.hx b/src/shapes/Blast.hx index b0ce0b1c..d396a6d8 100644 --- a/src/shapes/Blast.hx +++ b/src/shapes/Blast.hx @@ -20,8 +20,8 @@ class Blast extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/publastvoice.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/publastvoice.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/ultrablast.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/ultrablast.wav", ResourceLoader.getAudio, this.soundResources); onFinish(); }); }); diff --git a/src/shapes/EasterEgg.hx b/src/shapes/EasterEgg.hx index 612af703..d3d5be53 100644 --- a/src/shapes/EasterEgg.hx +++ b/src/shapes/EasterEgg.hx @@ -22,7 +22,7 @@ class EasterEgg extends PowerUp { } if (!found) { Settings.easterEggs.set(this.level.mission.path, this.level.timeState.currentAttemptTime); - this.pickupSound = ResourceLoader.getResource("data/sound/easter.wav", ResourceLoader.getAudio, this.soundResources); + this.pickupSound = ResourceLoader.getResource("data/sound/easter_egg.wav", ResourceLoader.getAudio, this.soundResources); this.customPickupMessage = "You found an Easter Egg!"; } else { this.pickupSound = ResourceLoader.getResource("data/sound/easterfound.wav", ResourceLoader.getAudio, this.soundResources); @@ -34,7 +34,7 @@ class EasterEgg extends PowerUp { public override function init(level:src.MarbleWorld, onFinish:() -> Void) { super.init(level, () -> { - ResourceLoader.load("sound/easter.wav").entry.load(() -> { + ResourceLoader.load("sound/easter_egg.wav").entry.load(() -> { ResourceLoader.load("sound/easterfound.wav").entry.load(onFinish); }); }); diff --git a/src/shapes/Gem.hx b/src/shapes/Gem.hx index 7c8420f0..2e379f5b 100644 --- a/src/shapes/Gem.hx +++ b/src/shapes/Gem.hx @@ -35,8 +35,8 @@ class Gem extends DtsObject { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { var worker = new ResourceLoaderWorker(onFinish); - worker.loadFile('sound/gotgem.wav'); - worker.loadFile('sound/gotallgems.wav'); + worker.loadFile('sound/gem_collect.wav'); + worker.loadFile('sound/gem_all.wav'); worker.run(); }); } diff --git a/src/shapes/Helicopter.hx b/src/shapes/Helicopter.hx index 2375e1dd..bd8a1374 100644 --- a/src/shapes/Helicopter.hx +++ b/src/shapes/Helicopter.hx @@ -21,8 +21,8 @@ class Helicopter extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/pugyrocoptervoice.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/pugyrocoptervoice.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/gyrocopter.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/gyrocopter.wav", ResourceLoader.getAudio, this.soundResources); onFinish(); }); }); diff --git a/src/shapes/MegaMarble.hx b/src/shapes/MegaMarble.hx index 432f1d24..b3665a19 100644 --- a/src/shapes/MegaMarble.hx +++ b/src/shapes/MegaMarble.hx @@ -20,15 +20,15 @@ class MegaMarble extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/pumegamarblevoice.wav").entry.load(() -> { + ResourceLoader.load("sound/mega_marble.wav").entry.load(() -> { var worker = new ResourceLoaderWorker(onFinish); worker.loadFile("sound/mega_bouncehard1.wav"); worker.loadFile("sound/mega_bouncehard2.wav"); worker.loadFile("sound/mega_bouncehard3.wav"); worker.loadFile("sound/mega_bouncehard4.wav"); worker.loadFile("sound/mega_roll.wav"); - worker.loadFile("sound/dosuperjump.wav"); - this.pickupSound = ResourceLoader.getResource("data/sound/pumegamarblevoice.wav", ResourceLoader.getAudio, this.soundResources); + worker.loadFile("sound/use_mega.wav"); + this.pickupSound = ResourceLoader.getResource("data/sound/mega_marble.wav", ResourceLoader.getAudio, this.soundResources); worker.run(); }); }); @@ -41,7 +41,7 @@ class MegaMarble extends PowerUp { public function use(timeState:TimeState) { this.level.marble.enableMegaMarble(timeState.currentAttemptTime); this.level.deselectPowerUp(); - AudioManager.playSound(ResourceLoader.getResource('data/sound/dosuperjump.wav', ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource('data/sound/use_mega.wav', ResourceLoader.getAudio, this.soundResources)); } override function postProcessMaterial(matName:String, material:h3d.mat.Material) { diff --git a/src/shapes/SuperJump.hx b/src/shapes/SuperJump.hx index 0009df43..70dc7403 100644 --- a/src/shapes/SuperJump.hx +++ b/src/shapes/SuperJump.hx @@ -51,9 +51,9 @@ class SuperJump extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/pusuperjumpvoice.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/pusuperjumpvoice.wav", ResourceLoader.getAudio, this.soundResources); - ResourceLoader.load("sound/dosuperjump.wav").entry.load(onFinish); + ResourceLoader.load("sound/super_jump.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/super_jump.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/use_superjump.wav").entry.load(onFinish); }); }); } @@ -68,7 +68,7 @@ class SuperJump extends PowerUp { this.level.particleManager.createEmitter(superJumpParticleOptions, this.sjEmitterParticleData, null, () -> marble.getAbsPos().getPosition()); // marble.body.addLinearVelocity(this.level.currentUp.scale(20)); // Simply add to vertical velocity // if (!this.level.rewinding) - AudioManager.playSound(ResourceLoader.getResource("data/sound/dosuperjump.wav", ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource("data/sound/use_superjump.wav", ResourceLoader.getAudio, this.soundResources)); // this.level.particles.createEmitter(superJumpParticleOptions, null, () => Util.vecOimoToThree(marble.body.getPosition())); this.level.deselectPowerUp(); } diff --git a/src/shapes/SuperSpeed.hx b/src/shapes/SuperSpeed.hx index 55f182d6..ce5d6cbd 100644 --- a/src/shapes/SuperSpeed.hx +++ b/src/shapes/SuperSpeed.hx @@ -56,9 +56,9 @@ class SuperSpeed extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/pusuperspeedvoice.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/pusuperspeedvoice.wav", ResourceLoader.getAudio, this.soundResources); - ResourceLoader.load("sound/dosuperspeed.wav").entry.load(onFinish); + ResourceLoader.load("sound/super_speed.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/super_speed.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/use_speed.wav").entry.load(onFinish); }); }); } @@ -85,7 +85,7 @@ class SuperSpeed extends PowerUp { // marble.body.addLinearVelocity(Util.vecThreeToOimo(movementVector).scale(24.7)); // Whirligig's determined value // marble.body.addLinearVelocity(this.level.currentUp.scale(20)); // Simply add to vertical velocity // if (!this.level.rewinding) - AudioManager.playSound(ResourceLoader.getResource("data/sound/dosuperspeed.wav", ResourceLoader.getAudio, this.soundResources)); + AudioManager.playSound(ResourceLoader.getResource("data/sound/use_speed.wav", ResourceLoader.getAudio, this.soundResources)); this.level.particleManager.createEmitter(superSpeedParticleOptions, this.ssEmitterParticleData, null, () -> marble.getAbsPos().getPosition()); this.level.deselectPowerUp(); } diff --git a/src/shapes/TimeTravel.hx b/src/shapes/TimeTravel.hx index be9b38d0..2ddfb853 100644 --- a/src/shapes/TimeTravel.hx +++ b/src/shapes/TimeTravel.hx @@ -32,8 +32,8 @@ class TimeTravel extends PowerUp { public override function init(level:MarbleWorld, onFinish:Void->Void) { super.init(level, () -> { - ResourceLoader.load("sound/putimetravelvoice.wav").entry.load(() -> { - this.pickupSound = ResourceLoader.getResource("data/sound/putimetravelvoice.wav", ResourceLoader.getAudio, this.soundResources); + ResourceLoader.load("sound/time_travel.wav").entry.load(() -> { + this.pickupSound = ResourceLoader.getResource("data/sound/time_travel.wav", ResourceLoader.getAudio, this.soundResources); ResourceLoader.load("sound/timetravelactive.wav").entry.load(onFinish); }); }); diff --git a/src/triggers/DestinationTrigger.hx b/src/triggers/DestinationTrigger.hx deleted file mode 100644 index 1276e523..00000000 --- a/src/triggers/DestinationTrigger.hx +++ /dev/null @@ -1,5 +0,0 @@ -package triggers; - -class DestinationTrigger extends Trigger { - // Stub -} diff --git a/src/triggers/TeleportTrigger.hx b/src/triggers/TeleportTrigger.hx deleted file mode 100644 index 018fc588..00000000 --- a/src/triggers/TeleportTrigger.hx +++ /dev/null @@ -1,132 +0,0 @@ -package triggers; - -import h3d.Vector; -import src.ResourceLoader; -import src.AudioManager; -import mis.MisParser; -import src.MarbleWorld; -import mis.MissionElement.MissionElementTrigger; -import src.Console; - -class TeleportTrigger extends Trigger { - var delay:Float = 2; - - var entryTime:Null = null; - var exitTime:Null = null; - - public function new(element:MissionElementTrigger, level:MarbleWorld) { - super(element, level); - if (element.delay != null) - this.delay = MisParser.parseNumber(element.delay) / 1000; - } - - override function onMarbleEnter(time:src.TimeState) { - this.exitTime = null; - this.level.marble.setCloaking(true, time); - if (this.entryTime != null) - return; - this.entryTime = time.currentAttemptTime; - this.level.displayAlert("Teleporter has been activated, please wait."); - AudioManager.playSound(ResourceLoader.getResource("data/sound/teleport.wav", ResourceLoader.getAudio, this.soundResources)); - } - - override function onMarbleLeave(time:src.TimeState) { - this.exitTime = time.currentAttemptTime; - this.level.marble.setCloaking(false, time); - } - - public override function update(timeState:src.TimeState) { - if (this.entryTime == null) - return; - - if (timeState.currentAttemptTime - this.entryTime >= this.delay) { - this.executeTeleport(); - return; - } - - // There's a little delay after exiting before the teleporter gets cancelled - if (this.exitTime != null && timeState.currentAttemptTime - this.exitTime > 0.050) { - this.entryTime = null; - this.exitTime = null; - return; - } - } - - override function init(onFinish:() -> Void) { - ResourceLoader.load("sound/teleport.wav").entry.load(onFinish); - } - - function executeTeleport() { - this.entryTime = null; - - function chooseNonNull(a:String, b:String) { - if (a != null) - return a; - if (b != null) - return b; - return null; - } - - // Find the destination trigger - if (this.element.destination == null) - return; - var destinationList = this.level.triggers.filter(x -> x is DestinationTrigger - && x.element._name.toLowerCase() == this.element.destination.toLowerCase()); - if (destinationList.length == 0) - return; // Who knows - - var destination = destinationList[0]; - - var pos = MisParser.parseVector3(destination.element.position); - pos.x = -pos.x; - - // Determine where to place the marble - var position:Vector; - if (MisParser.parseBoolean(chooseNonNull(this.element.centerdestpoint, destination.element.centerdestpoint))) { - position = destination.collider.boundingBox.getCenter().toVector(); // Put the marble in the middle of the thing - } else { - position = destination.vertices[0].add(new Vector(0, 0, 3)).add(pos); // destination.vertices[0].clone().add(new Vector(0, 0, 3)); - } - position.w = 1; - this.level.marble.prevPos.load(position); - this.level.marble.setPosition(position.x, position.y, position.z); - var ct = this.level.marble.collider.transform.clone(); - ct.setPosition(position); - this.level.marble.collider.setTransform(ct); - if (this.level.isRecording) { - this.level.replay.recordMarbleStateFlags(false, false, true, false); - } - - if (!MisParser.parseBoolean(chooseNonNull(this.element.keepvelocity, destination.element.keepvelocity))) - this.level.marble.velocity.set(0, 0, 0); - if (MisParser.parseBoolean(chooseNonNull(this.element.inversevelocity, destination.element.inversevelocity))) - this.level.marble.velocity.scale(-1); - if (!MisParser.parseBoolean(chooseNonNull(this.element.keepangular, destination.element.keepangular))) - this.level.marble.omega.set(0, 0, 0); - - Console.log('Teleport:'); - Console.log('Marble Position: ${position.x} ${position.y} ${position.z}'); - Console.log('Marble Velocity: ${this.level.marble.velocity.x} ${this.level.marble.velocity.y} ${this.level.marble.velocity.z}'); - Console.log('Marble Angular: ${this.level.marble.omega.x} ${this.level.marble.omega.y} ${this.level.marble.omega.z}'); - - // Determine camera orientation - if (!MisParser.parseBoolean(chooseNonNull(this.element.keepcamera, destination.element.keepcamera))) { - var yaw:Float; - if (this.element.camerayaw != null) - yaw = MisParser.parseNumber(this.element.camerayaw) * Math.PI / 180; - else if (destination.element.camerayaw != null) - yaw = MisParser.parseNumber(destination.element.camerayaw) * Math.PI / 180; - else - yaw = 0; - - yaw = -yaw; // Need to flip it for some reason - - this.level.marble.camera.CameraYaw = yaw + Math.PI / 2; - this.level.marble.camera.CameraPitch = 0.45; - this.level.marble.camera.nextCameraYaw = yaw + Math.PI / 2; - this.level.marble.camera.nextCameraPitch = 0.45; - } - - AudioManager.playSound(ResourceLoader.getResource("data/sound/spawn.wav", ResourceLoader.getAudio, this.soundResources)); - } -}