From f91d1f4056065a572b3741b736e98a88f2c83ac8 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Fri, 18 Feb 2022 23:01:05 -0500 Subject: [PATCH] fix bug in collide-probe (#1180) * fix bug in collide-probe * add debug print --- common/util/os.cpp | 1 + game/mips2c/functions/collide_probe.cpp | 2 -- goal_src/engine/collide/collide-cache.gc | 4 +--- test/test_main.cpp | 3 +++ 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/util/os.cpp b/common/util/os.cpp index 35bb1b15ae..795ddd4cad 100644 --- a/common/util/os.cpp +++ b/common/util/os.cpp @@ -78,6 +78,7 @@ void setup_cpu_info() { printf(" Model: %s\n", gCpuInfo.model.c_str()); printf(" AVX : %s\n", gCpuInfo.has_avx ? "true" : "false"); printf(" AVX2 : %s\n", gCpuInfo.has_avx2 ? "true" : "false"); + fflush(stdout); gCpuInfo.initialized = true; } diff --git a/game/mips2c/functions/collide_probe.cpp b/game/mips2c/functions/collide_probe.cpp index 4418c20508..8d2cb26453 100644 --- a/game/mips2c/functions/collide_probe.cpp +++ b/game/mips2c/functions/collide_probe.cpp @@ -834,8 +834,6 @@ u64 execute(void* ctxt) { block_40: // Unknown instr: vcallms 54 // fmt::print("vcallms54\n"); - // nop | maddx.xyz vf19, vf04, vf00 - c->vmadd_bc(DEST::xyz, BC::w, vf19, vf4, vf0); // nop | mulaw.xyzw ACC, vf20, vf00 c->vmula_bc(DEST::xyzw, BC::w, vf20, vf0); // nop | maddax.xyzw ACC, vf17, vf05 diff --git a/goal_src/engine/collide/collide-cache.gc b/goal_src/engine/collide/collide-cache.gc index 1bc1017e8d..93ec127b5c 100644 --- a/goal_src/engine/collide/collide-cache.gc +++ b/goal_src/engine/collide/collide-cache.gc @@ -113,10 +113,8 @@ (set! (-> *collide-list* num-items) 0) - ;; HACK: the special case collide-probe-make-list function doesn't always work correctly. - ;; for example, on the little side thing in FJ it totally misses. (cond - (#f ;; (= bsp-find-mesh-func (method-of-type bsp-header collide-ray)) + ((= bsp-find-mesh-func (method-of-type bsp-header collide-ray)) ;; for collide-ray (actually line-sphere), we have a fancy version. (dotimes (s4-1 (-> *level* length)) (let ((a0-2 (-> *level* level s4-1))) diff --git a/test/test_main.cpp b/test/test_main.cpp index 2be0f32eef..b912fd6235 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -4,6 +4,7 @@ #include "common/util/FileUtil.h" #include "common/log/log.h" +#include "common/util/os.h" // Running subsets of tests, see: // - @@ -17,6 +18,8 @@ // to make it easier to test a subset of tests int main(int argc, char** argv) { + // hopefully get a debug print on github actions + setup_cpu_info(); lg::initialize(); ::testing::InitGoogleTest(&argc, argv);