Replaced Ref and RefCounter with std::shared_ptr<>
[supertux.git] / src / object / endsequence_fireworks.cpp
index 4fab4e1..b971b25 100644 (file)
@@ -17,7 +17,8 @@
 #include "object/endsequence_fireworks.hpp"
 
 #include "object/fireworks.hpp"
-#include "supertux/mainloop.hpp"
+#include "supertux/globals.hpp"
+#include "supertux/screen_manager.hpp"
 #include "supertux/sector.hpp"
 
 EndSequenceFireworks::EndSequenceFireworks() :
@@ -39,8 +40,8 @@ void
 EndSequenceFireworks::starting()
 {
   EndSequence::starting();
-  endsequence_timer.start(7.3f * g_main_loop->get_speed());
-  Sector::current()->add_object(new Fireworks());
+  endsequence_timer.start(7.3f * ScreenManager::current()->get_speed());
+  Sector::current()->add_object(std::make_shared<Fireworks>());
 }
 
 void