Skip to content

Commit

Permalink
Merge pull request #186 from ucsd-cse125-sp24/chore/update-model-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
atar13 authored Jun 3, 2024
2 parents f328c8d + d291aad commit 7cf0a4b
Showing 1 changed file with 34 additions and 26 deletions.
60 changes: 34 additions & 26 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ bool Client::init() {
auto shaders_dir = getRepoRoot() / "src/client/shaders";
auto graphics_assets_dir = getRepoRoot() / "assets/graphics";

auto player_models_dir = graphics_assets_dir / "player_models";
auto item_models_dir = graphics_assets_dir / "item_models";
auto env_models_dir = graphics_assets_dir / "env_models";
auto entity_models_dir = graphics_assets_dir / "entity_models";

auto deferred_geometry_vert_path = shaders_dir / "deferred_geometry.vert";
auto deferred_geometry_frag_path = shaders_dir / "deferred_geometry.frag";
this->deferred_geometry_shader = std::make_shared<Shader>(deferred_geometry_vert_path.string(), deferred_geometry_frag_path.string());
Expand All @@ -189,21 +194,45 @@ bool Client::init() {
auto deferred_light_box_frag_path = shaders_dir / "deferred_light_box.frag";
this->deferred_light_box_shader = std::make_shared<Shader>(deferred_light_box_vert_path.string(), deferred_light_box_frag_path.string());

auto floor_model_path = graphics_assets_dir / "floor.obj";
auto floor_model_path = env_models_dir / "floor.obj";
this->floor_model = std::make_unique<Model>(floor_model_path.string(), true);

auto wall_model_path = graphics_assets_dir / "wall.obj";
auto wall_model_path = env_models_dir / "wall.obj";
this->wall_model = std::make_unique<Model>(wall_model_path.string(), true);

auto pillar_model_path = graphics_assets_dir / "pillar.obj";
auto pillar_model_path = env_models_dir / "pillar.obj";
this->pillar_model = std::make_unique<Model>(pillar_model_path.string(), true);

auto torchlight_model_path = graphics_assets_dir / "exit.obj";
auto torchlight_model_path = env_models_dir / "exit.obj";
this->torchlight_model = std::make_unique<Model>(torchlight_model_path.string(), true);

auto slime_model_path = graphics_assets_dir / "slime.obj";
auto slime_model_path = entity_models_dir / "slime.obj";
this->slime_model = std::make_unique<Model>(slime_model_path.string(), true);

auto bear_model_path = entity_models_dir / "bear-sp22.obj";
this->bear_model = std::make_unique<Model>(bear_model_path.string(), true);

auto sungod_model_path = entity_models_dir / "sungod.obj";
this->sungod_model = std::make_unique<Model>(sungod_model_path.string(), true);

auto minotaur_model_path = entity_models_dir / "minotaur.obj";
this->minotaur_model = std::make_unique<Model>(minotaur_model_path.string(), true);

auto python_model_path = entity_models_dir / "python.obj";
this->python_model = std::make_unique<Model>(python_model_path.string(), true);

auto item_model_path = item_models_dir / "item.obj";
this->item_model = std::make_unique<Model>(item_model_path.string(), true);

auto spike_trap_model_path = env_models_dir / "spike_trap.obj";
this->spike_trap_model = std::make_unique<Model>(spike_trap_model_path.string(), true);

auto orb_model_path = item_models_dir / "orb.obj";
this->orb_model = std::make_unique<Model>(orb_model_path.string(), true);

auto exit_model_path = env_models_dir / "exit.obj";
this->exit_model = std::make_unique<Model>(exit_model_path.string(), true);

auto player_model_path = graphics_assets_dir / "player_models/char_3/model_char_3.fbx";
auto player_walk_path = graphics_assets_dir / "animations/walk.fbx";
auto player_jump_path = graphics_assets_dir / "animations/jump.fbx";
Expand All @@ -230,27 +259,6 @@ bool Client::init() {
animManager->addAnimation(player_atk, ObjectType::Player, AnimState::AttackAnim);
animManager->addAnimation(player_use_potion, ObjectType::Player, AnimState::DrinkPotionAnim);

auto sungod_model_path = graphics_assets_dir / "sungod.obj";
this->sungod_model = std::make_unique<Model>(sungod_model_path.string(), true);

auto minotaur_model_path = graphics_assets_dir / "minotaur.obj";
this->minotaur_model = std::make_unique<Model>(minotaur_model_path.string(), true);

auto python_model_path = graphics_assets_dir / "python.obj";
this->python_model = std::make_unique<Model>(python_model_path.string(), true);

auto item_model_path = graphics_assets_dir / "item.obj";
this->item_model = std::make_unique<Model>(item_model_path.string(), true);

auto spike_trap_model_path = graphics_assets_dir / "spike_trap.obj";
this->spike_trap_model = std::make_unique<Model>(spike_trap_model_path.string(), true);

auto orb_model_path = graphics_assets_dir / "orb.obj";
this->orb_model = std::make_unique<Model>(orb_model_path.string(), true);

auto exit_model_path = graphics_assets_dir / "exit.obj";
this->exit_model = std::make_unique<Model>(exit_model_path.string(), true);

this->configureGBuffer();

this->audioManager->init();
Expand Down

0 comments on commit 7cf0a4b

Please sign in to comment.