Files
jak-project/goal_src/jak1/engine/debug/assert-h.gc
T
2026-07-26 14:43:53 -04:00

30 lines
1002 B
Common Lisp

;;-*-Lisp-*-
(in-package goal)
(bundles "ENGINE.CGO" "GAME.CGO")
(require "kernel/gcommon.gc")
;; DECOMP BEGINS
;; Source location captured by the assert macro before it reports a failure.
(deftype __assert-info-private-struct (structure)
((filename string)
(line-num uint16)
(column-num uint16))
(:methods
(set-pos (_type_ string uint uint) int)
(print-pos (_type_) int)))
(defmethod set-pos ((this __assert-info-private-struct) (filename string) (line-num uint) (column-num uint))
"Record the source filename, line, and column and return zero."
(set! (-> this filename) filename)
(set! (-> this line-num) line-num)
(set! (-> this column-num) column-num)
0)
(defmethod print-pos ((this __assert-info-private-struct))
"Print the recorded GOAL source location and return zero."
(format #t "file ~S.gc, line ~D, col ~D.~%" (-> this filename) (-> this line-num) (-> this column-num))
0)
(define *__private-assert-info* (new 'static '__assert-info-private-struct))