Commits

mcc committed 61981e5

Rebirth on down

  • Participants
  • Parent commits 4e8a1a4

Comments (0)

Files changed (6)

media/overlay/launch/onLoad.lua

 	dos:set(0,0,"The World Hates You.")
 	dos:set(21,0,"http://runhello.com")
 	if t.message then dos:set(0,2,t.message) end
-	dos:set(0,4,"Press return key")
+	dos:set(0,4,"Press \010 to start")
 	pull(um, t.um) -- TODO: TEST
 end)
 

media/overlay/launch/onUpdate.lua

-if pressed[KEY_RETURN] then go("play") end
+if pressed[KEY_DOWN] then go("play") end

media/overlay/play/onLoad.lua

 	local top = a(gm.player:getPosition()).y < gm.level.ydim*gm.level.scale/2
 	if success then
 		local safeline = top and 22 or 0
+		gm.won = true
 		fill(dos, 0,safeline,40,2,"#")
 		dos:set_centered(0,safeline,40,   "SUCCESS!#YOU#ARE#A#SUPER#PLAYER", false)
 		dos:set_centered(0,safeline+1,40, "PRESS#\010#TO#CONTINUE", false)

media/overlay/play/onUpdate.lua

 		gm.canjump = false
 	end
 	
+	if gm.dead then
+		if down[KEY_DOWN] then
+			bridge:rebirth()
+		end
+	end
+	
 	-- GRAPHICS
 	
 	local falloff = nil

source/bridge.cpp

 	room_auto::singleton()->rebirth(true);
 }
 
+void project_bridge::rebirth() {
+	room_auto::singleton()->rebirth(false);
+}
+
 void project_bridge::Quit() {
 	::Quit();
 }
 	String filedump_external(String _path);
 	String help(String _path);
 	void fake();
+	void rebirth();
 	void Quit();
 	Matrix4 mmult(Matrix4 a, Matrix4 b);
 	Quaternion qmult(Quaternion a, Quaternion b);