@@ -35,7 +35,7 @@ namespace home {
3535 return gf::Orientation::SouthWest;
3636 }
3737
38- gf::Vec2F compute_initial_location (const WorldData & data, gf::ResourceManager* resource_manager)
38+ gf::Vec2F compute_initial_location (const WorldResources & data, gf::ResourceManager* resource_manager)
3939 {
4040 const gf::RichMap* map = resource_manager->get <gf::RichMap>(data.map .filename );
4141
@@ -57,16 +57,16 @@ namespace home {
5757
5858 using namespace gf ::literals;
5959
60- HeroEntity::HeroEntity (GameHub* hub, const WorldData& data , gf::PhysicsWorld* physics_world)
60+ HeroEntity::HeroEntity (GameHub* hub, const WorldResources& resources , gf::PhysicsWorld* physics_world)
6161 : m_controller(gf::PhysicsBody::make_kinematic())
6262 , m_body(gf::PhysicsBody::make_dynamic(HeroMass, gf::compute_moment_for_circle(HeroMass, 0 .0f , HeroRadius, { 0 .0f , 0 .0f })))
6363 , m_pivot(gf::PhysicsConstraint::make_pivot_joint(&m_controller, &m_body, { 0 .0f , 0 .0f }, { 0 .0f , 0 .0f }))
6464 , m_gear(gf::PhysicsConstraint::make_gear_joint(&m_controller, &m_body, 0 .0f , 1 .0f ))
6565 , m_shape(gf::PhysicsShape::make_circle(&m_body, HeroRadius, { 0 .0f , 0 .0f }))
66- , m_target(compute_initial_location(data , hub->resource_manager ()))
67- , m_hero_animations(data .hero_animations, hub->render_manager (), hub->resource_manager())
68- , m_crosshair(data .crosshair, hub->render_manager (), hub->resource_manager())
69- , m_jet_engine_sound(hub->resource_manager ()->get<gf::Sound>(data .jet_engine_sound.filename))
66+ , m_target(compute_initial_location(resources , hub->resource_manager ()))
67+ , m_hero_animations(resources .hero_animations, hub->render_manager (), hub->resource_manager())
68+ , m_crosshair(resources .crosshair, hub->render_manager (), hub->resource_manager())
69+ , m_jet_engine_sound(hub->resource_manager ()->get<gf::Sound>(resources .jet_engine_sound.filename))
7070 {
7171 set_location ({ 0 .0f , 0 .0f });
7272 set_origin ({ 0 .5f , 0 .5f });
0 commit comments