Hook Jak 1 into ImGUI actor filter (#2157)

This commit is contained in:
ZedB0T
2023-01-28 14:17:43 -05:00
committed by GitHub
parent 42780e8f8c
commit 3b1e99cd3f
3 changed files with 12 additions and 0 deletions
+3
View File
@@ -646,6 +646,9 @@ void InitMachine_PCPort() {
// profiler
make_function_symbol_from_c("pc-prof", (void*)prof_event);
// debugging tools
make_function_symbol_from_c("pc-filter-debug-string?", (void*)pc_filter_debug_string);
// init ps2 VM
if (VM::use) {
make_function_symbol_from_c("vm-ptr", (void*)VM::get_vm_ptr);
+8
View File
@@ -548,6 +548,14 @@
(defun-debug add-debug-text-3d ((arg0 symbol) (arg1 bucket-id) (arg2 string) (arg3 vector) (arg4 font-color) (arg5 vector2h))
"Draw text at the given point. arg4 is the font-color index. arg5 is an offset and can be #f."
(when arg0
(#when PC_PORT
;; Check to see if the string should be filtered or not
(when (pc-filter-debug-string? arg2 (vector-vector-distance arg3 (target-pos 0)))
;;(format #t "got: ~S~%" arg2)
;; no-op the function!
(return #f)
)
)
(cond
(*debug-draw-pauseable*
(let ((v1-2 (get-debug-text-3d)))
+1
View File
@@ -391,3 +391,4 @@
;; These were made by us.
(define-extern vm-ptr (function int pointer))
(define-extern pc-filter-debug-string? (function string float symbol))