Files
jak-project/test/decompiler/reference/engine/ps2/timer_REF.gc
T
ManDude 24578b64b9 proper support for hardcoded "time" types (#1141)
* hardcode `time-frame`things

* Update cam-states_REF.gc

* Update level-info_REF.gc

* update refs 1

* update refs 2

* update refs 3

* update refs 4

* update refs 5

* update detection and casting

* Update FormExpressionAnalysis.cpp

* update refs 6

* update mood decomp

* update refs 7

* update refs 8

* remove temp entity birth code

* update time-frame casts

* fix compiler

* hardcode stuff and fix some types

* fix some bitfield detection being wrong

* bug fixes

* detect seconds on adds with immediate

* update refs 9

* fix casts and rand-vu-int-range bugs (update refs 10)

* update refs 11

* update 12

* update 13

* update 14

* Update game-info_REF.gc

* improve cpad macros detection

* remove unused code

* update refs

* clang

* update source code

* Update cam-states.gc

* `lavatube-energy` finish

* update refs

* fix actor bank stuff

* Update navigate.gc

* reduce entity default stack size

* Update transformq-h.gc

* oops forgot these

* fix code and tests

* fix mood sound stuff

* Update load-dgo.gc

* Update README.md
2022-02-12 12:26:19 -05:00

156 lines
4.3 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition for function timer-reset
;; INFO: Return type mismatch int vs none.
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
(defun timer-reset ((arg0 timer-bank))
(.sync.l)
(set! (-> arg0 count) (the-as uint 0))
(.sync.l)
0
(none)
)
;; definition for function timer-count
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
;; WARN: Unsupported inline assembly instruction kind - [sync.l]
(defun timer-count ((arg0 timer-bank))
(.sync.l)
(let ((v0-0 (-> arg0 count)))
(.sync.l)
v0-0
)
)
;; definition for function disable-irq
;; INFO: Return type mismatch int vs none.
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v0, Status]
;; WARN: Unsupported inline assembly instruction kind - [mtc0 Status, v0]
;; WARN: Unsupported inline assembly instruction kind - [sync.p]
(defun disable-irq ()
(local-vars (v0-0 int))
(let ((v1-0 (the-as uint #xfffffffe)))
(.mfc0 v0-0 Status)
(let ((v0-1 (logand v0-0 v1-0)))
(.mtc0 Status v0-1)
)
)
(.sync.p)
0
(none)
)
;; definition for function enable-irq
;; INFO: Return type mismatch int vs none.
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v0, Status]
;; WARN: Unsupported inline assembly instruction kind - [mtc0 Status, v0]
;; WARN: Unsupported inline assembly instruction kind - [sync.p]
(defun enable-irq ()
(local-vars (v0-0 int))
(.mfc0 v0-0 Status)
(let ((v0-1 (logior v0-0 1)))
(.mtc0 Status v0-1)
)
(.sync.p)
0
(none)
)
;; definition for function stopwatch-init
(defun stopwatch-init ((arg0 stopwatch))
(set! (-> arg0 begin-level) 0)
(set! (-> arg0 prev-time-elapsed) 0)
0
)
;; definition for function stopwatch-reset
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defun stopwatch-reset ((arg0 stopwatch))
(local-vars (v1-3 int))
(set! (-> arg0 prev-time-elapsed) 0)
(when (> (-> arg0 begin-level) 0)
0
(.mfc0 v1-3 Count)
(set! (-> arg0 start-time) (the-as time-frame v1-3))
)
0
)
;; definition for function stopwatch-start
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defun stopwatch-start ((arg0 stopwatch))
(local-vars (v1-4 int))
(when (zero? (-> arg0 begin-level))
(set! (-> arg0 begin-level) 1)
0
(.mfc0 v1-4 Count)
(set! (-> arg0 start-time) (the-as time-frame v1-4))
)
0
)
;; definition for function stopwatch-stop
;; INFO: Return type mismatch int vs uint.
;; WARN: Unsupported inline assembly instruction kind - [mfc0 a1, Count]
(defun stopwatch-stop ((arg0 stopwatch))
(local-vars (a1-0 int))
(when (> (-> arg0 begin-level) 0)
(set! (-> arg0 begin-level) 0)
0
(.mfc0 a1-0 Count)
(+! (-> arg0 prev-time-elapsed) (- (the-as time-frame a1-0) (-> arg0 start-time)))
)
(the-as uint 0)
)
;; definition for function stopwatch-begin
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defun stopwatch-begin ((arg0 stopwatch))
(local-vars (v1-3 int))
(when (zero? (-> arg0 begin-level))
0
(.mfc0 v1-3 Count)
(set! (-> arg0 start-time) (the-as time-frame v1-3))
)
(+! (-> arg0 begin-level) 1)
0
)
;; definition for function stopwatch-end
;; INFO: Return type mismatch int vs uint.
;; WARN: Unsupported inline assembly instruction kind - [mfc0 a1, Count]
(defun stopwatch-end ((arg0 stopwatch))
(local-vars (a1-0 int))
(+! (-> arg0 begin-level) -1)
(when (zero? (-> arg0 begin-level))
0
(.mfc0 a1-0 Count)
(+! (-> arg0 prev-time-elapsed) (- (the-as time-frame a1-0) (-> arg0 start-time)))
)
(the-as uint 0)
)
;; definition for function stopwatch-elapsed-ticks
;; INFO: Return type mismatch time-frame vs uint.
;; WARN: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defun stopwatch-elapsed-ticks ((arg0 stopwatch))
(local-vars (v1-3 int))
(let ((v0-0 (-> arg0 prev-time-elapsed)))
(when (> (-> arg0 begin-level) 0)
0
(.mfc0 v1-3 Count)
(+! v0-0 (- (the-as time-frame v1-3) (-> arg0 start-time)))
)
(the-as uint v0-0)
)
)
;; definition for function stopwatch-elapsed-seconds
(defun stopwatch-elapsed-seconds ((arg0 stopwatch))
(let ((v1-0 (stopwatch-elapsed-ticks arg0)))
(* 0.0000000033333334 (the float v1-0))
)
)