Skip to content

Commit

Permalink
fix bug in collide-probe (#1180)
Browse files Browse the repository at this point in the history
* fix bug in collide-probe

* add debug print
  • Loading branch information
water111 authored Feb 19, 2022
1 parent 5135ea9 commit f91d1f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions common/util/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions game/mips2c/functions/collide_probe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions goal_src/engine/collide/collide-cache.gc
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
3 changes: 3 additions & 0 deletions test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "common/util/FileUtil.h"
#include "common/log/log.h"
#include "common/util/os.h"

// Running subsets of tests, see:
// -
Expand All @@ -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);
Expand Down

0 comments on commit f91d1f4

Please sign in to comment.