Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in collide-probe #1180

Merged
merged 2 commits into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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