Commits

mcc committed 05c5ccb

stuck noise

Comments (0)

Files changed (1)

media/overlay/play/onLoad.lua

 	else
 		gm.deadat = ticks
 		gm.fatal = touched
-		s_lose:Play(false)
+		if special_message then
+			s_stuck:Play(false)
+		else
+			s_lose:Play(false)
+		end
 		fill(dos, 0,safeline,40,3,"#")
 		dos:set_centered(0,safeline,40,   special_message or "DEAD!!!!#YOU#ARE#A#TERRIBLE#PLAYER", false)
 		dos:set_centered(0,safeline+1,40, "PRESS#\010#TO#CONTINUE", false)
 -- SOUND
 
 if not have_audio then
-	--have_audio = true
+	have_audio = true
 	
 	-- Generate jump sound
 	if s_jump then delete(s_jump) end
 		end
 		s_lose = bridge:soundFromValues(data)
 	end
+	
+	if s_stuck then delete(s_stuck) end
+	do
+		local data = a(NumberArray())
+		local limit = (512*32)-1
+		local v
+			local w = 320
+		for i=0,limit do
+			v = ((math.floor(i/w)%2)==0) and 0.25 or -0.25
+			--if i % math.floor(limit/3) == 0 then w = w * 2 end
+			data:push_back(v)--v*((limit-i)/limit))
+		end
+		s_stuck = bridge:soundFromValues(data)
+	end
 end
 
 -- "The actual game"