mirror of
https://github.com/open-goal/jak-project
synced 2026-09-10 04:22:13 -04:00
decomp: task-control (#654)
* stash * decompiler: support symbols in arrays * decomp: a ton of lambda casts * finish task control? * add lambda label casts * decomp: resolve some issues, add enums * decomp: One last decompiler issue remains * decomp: finalize `task-control` * linting * revert change to test change, didn't mean to commit * decomp: comment out function call for now
This commit is contained in:
@@ -98,7 +98,8 @@
|
||||
|
||||
;; definition of type entity-perm-array
|
||||
(deftype entity-perm-array (inline-array-class)
|
||||
()
|
||||
((data entity-perm :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
@@ -109,7 +110,7 @@
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> obj _data))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-13 (_type_ uint) entity-perm 13)
|
||||
(dummy-14 (_type_) none 14)
|
||||
(dummy-15 (_type_) none 15)
|
||||
(dummy-16 () none 16)
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
;; definition of type task-cstage
|
||||
(deftype task-cstage (structure)
|
||||
((game-task uint8 :offset-assert 0)
|
||||
(status uint64 :offset-assert 8)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(condition basic :offset-assert 20)
|
||||
((game-task game-task :offset-assert 0)
|
||||
(status task-status :offset-assert 8)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(condition (function task-control symbol) :offset-assert 20)
|
||||
)
|
||||
:method-count-assert 16
|
||||
:size-assert #x18
|
||||
:flag-assert #x1000000018
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
(dummy-15 () none 15)
|
||||
(get-game-task (_type_) uint 9)
|
||||
(get-task-status (_type_) uint 10)
|
||||
(TODO-RENAME-11 (_type_ task-control) symbol 11)
|
||||
(first-flag-bit? (_type_) symbol 12)
|
||||
(third-flag-bit? (_type_) symbol 13)
|
||||
(TODO-RENAME-14 (_type_) int 14)
|
||||
(clear-all-but-first-flag-bit (_type_) int 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -34,23 +34,23 @@
|
||||
|
||||
;; definition of type task-control
|
||||
(deftype task-control (basic)
|
||||
((current-stage int16 :offset-assert 4)
|
||||
(stage basic :offset-assert 8)
|
||||
((current-stage int16 :offset-assert 4)
|
||||
(stage (array task-cstage) :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 19
|
||||
:size-assert #xc
|
||||
:flag-assert #x130000000c
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
(dummy-15 () none 15)
|
||||
(dummy-16 () none 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(current-task (_type_) int 9)
|
||||
(current-status (_type_) int 10)
|
||||
(close-current! (_type_) none 11)
|
||||
(close-status! (_type_ int) int 12)
|
||||
(first-any (_type_ symbol) int 13)
|
||||
(reset! (_type_ symbol symbol) int 14)
|
||||
(closed? (_type_ int int) symbol 15)
|
||||
(get-reminder (_type_ int) int 16)
|
||||
(save-reminder (_type_ int int) int 17)
|
||||
(exists? (_type_ int int) symbol 18)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -353,7 +353,8 @@ TEST_F(OfflineDecompilation, FunctionDetect) {
|
||||
EXPECT_EQ(config->allowed_objects.size(), login_count);
|
||||
|
||||
// not many lambdas.
|
||||
EXPECT_TRUE(unknown_count < 10);
|
||||
// TODO - disabling this test, some files do have many lambdas! Gotta figure out a better way to
|
||||
// do this EXPECT_TRUE(unknown_count < 10);
|
||||
}
|
||||
|
||||
TEST_F(OfflineDecompilation, AsmFunction) {
|
||||
|
||||
Reference in New Issue
Block a user