Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
marwan995 committed May 14, 2024
1 parent d062c58 commit 1bbfc67
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 45,743 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion source/audio/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void our::Audio::play(std::string audio_file){
std::thread audioThread([this, audio_file]() {

// Get the full path of the audio file
std::filesystem::path audioPath = std::filesystem::current_path().append("source").append("audio").append(audio_file).string();
std::filesystem::path audioPath = std::filesystem::current_path().append("assets").append("audio").append(audio_file).string();
std::string audioName = audioPath.string();
// Play the audio file
ma_engine_play_sound(&engine, audioName.c_str(), NULL);
Expand Down
15 changes: 7 additions & 8 deletions source/common/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ int our::Application::run(int run_for_frames)
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
if (currentState == states["play"] && alpha > 0&&lastRoam!=currentRoam)
if (currentState == states["play"] && alpha > 0 && lastRoam != currentRoam)
{
// Calculate fading alpha value based on time or other conditions
alpha -= (.25 * (current_frame_time - last_frame_time));
Expand All @@ -305,22 +305,21 @@ int our::Application::run(int run_for_frames)
ImGui::SetNextWindowPos(imagePos);
ImGui::SetNextWindowSize(imageSize);
ImGui::Begin("ImageWindow", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar);
std::filesystem::path roomPath = std::filesystem::current_path().append("x").append("source").append(currentRoam+".png").string();

std::filesystem::path roomPath = std::filesystem::current_path().append("assets").append("textures").append(currentRoam + ".png").string();
// Display image
ImGui::Image((ImTextureID)our::texture_utils::loadImage(roomPath.string(), true)->getOpenGLName(),
imageSize,ImVec2(0, 0), ImVec2(1, 1),imageColor);
ImGui::Image(reinterpret_cast<ImTextureID>(our::texture_utils::loadImage(roomPath.string(), true)->getOpenGLName()), imageSize, ImVec2(0, 0), ImVec2(1, 1), imageColor);

// End ImGui window
ImGui::End();
if(alpha<=0){
if (alpha <= 0)
{
lastRoam = currentRoam;
alpha=0.5f;
alpha = 0.5f;
}
}
if (currentState)
currentState->onImmediateGui(); // Call to run any required Immediate GUI.
//! look here MARWAAANNNN
// If ImGui is using the mouse or keyboard, then we don't want the captured events to affect our keyboard and mouse objects.
// For example, if you're focusing on an input and writing "W", the keyboard object shouldn't record this event.
// keyboard.setEnabled(!io.WantCaptureKeyboard, window);
Expand Down
12 changes: 0 additions & 12 deletions x/Explosion/Star Wars.mtl

This file was deleted.

Loading

0 comments on commit 1bbfc67

Please sign in to comment.