Skip to content

Commit

Permalink
fix trX, Y and Z not switching to fixed point representation
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeveelution authored Dec 3, 2024
1 parent f807850 commit 6aa9908
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/gui/widgets/registers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,15 @@ void PCSX::Widgets::Registers::draw(PCSX::GUI* gui, PCSX::psxRegisters* register
z /= magnitude;
ImGui::Text(" :: axis : {%3.5f, %3.5f, %3.5f}", x, y, z);
}
ImGui::Text("trX : %i", registers->CP2C.n.trX);
ImGui::Text("trY : %i", registers->CP2C.n.trY);
ImGui::Text("trZ : %i", registers->CP2C.n.trZ);
if (showFixed) {
ImGui::Text("trX : % 3.5f", fixedToFloat(registers->CP2C.n.trX));
ImGui::Text("trY : % 3.5f", fixedToFloat(registers->CP2C.n.trY));
ImGui::Text("trZ : % 3.5f", fixedToFloat(registers->CP2C.n.trZ));
} else {
ImGui::Text("trX : %i", registers->CP2C.n.trX);
ImGui::Text("trY : %i", registers->CP2C.n.trY);
ImGui::Text("trZ : %i", registers->CP2C.n.trZ);
}

Check warning on line 306 in src/gui/widgets/registers.cc

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

PCSX::Widgets::Registers::draw increases in cyclomatic complexity from 59 to 60, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
displayMatrix(registers->CP2C.n.lMatrix, "L");
if (showFixed) {
ImGui::Text("rbk : % 3.5f", fixedToFloat(registers->CP2C.n.rbk));
Expand Down

0 comments on commit 6aa9908

Please sign in to comment.