some static-screen decomp fixes (#1435)

* some decomp fixes

* memcard robustness

* fix wrong bank in savefile being picked

* wtf???

* remove deleted memcard code
This commit is contained in:
ManDude
2022-06-10 18:20:00 +01:00
committed by GitHub
parent 7ce58f709f
commit 3ce301ad0d
13 changed files with 710 additions and 1380 deletions
+204 -17
View File
@@ -17,17 +17,50 @@
(load-state-want-vis 'vi1)
(case (scf-get-territory)
((2)
(let ((gp-0 (ppointer->handle (static-screen-spawn 6 #x27c00000 #x27c00100 #x27c00200 1500 #f self))))
(let ((gp-0 (ppointer->handle (static-screen-spawn
6
(new 'static 'texture-id :page #x27c)
(new 'static 'texture-id :index #x1 :page #x27c)
(new 'static 'texture-id :index #x2 :page #x27c)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-0)
(suspend)
)
)
(let ((gp-1 (ppointer->handle (static-screen-spawn 7 #x27d00000 #x27d00100 #x27d00200 1500 #f self))))
(let ((gp-1 (ppointer->handle (static-screen-spawn
7
(new 'static 'texture-id :page #x27d)
(new 'static 'texture-id :index #x1 :page #x27d)
(new 'static 'texture-id :index #x2 :page #x27d)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-1)
(suspend)
)
)
(let ((gp-2 (ppointer->handle (static-screen-spawn 8 #x2f000000 #x2f000100 #x2f000200 #x4650 #t self))))
(let ((gp-2 (ppointer->handle (static-screen-spawn
8
(new 'static 'texture-id :page #x2f0)
(new 'static 'texture-id :index #x1 :page #x2f0)
(new 'static 'texture-id :index #x2 :page #x2f0)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-2)
(suspend)
)
@@ -36,77 +69,198 @@
((1)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-3 (ppointer->handle (static-screen-spawn 10 #x63f00000 #x63f00100 #x63f00200 1500 #f self))))
(let ((gp-3 (ppointer->handle (static-screen-spawn
10
(new 'static 'texture-id :page #x63f)
(new 'static 'texture-id :index #x1 :page #x63f)
(new 'static 'texture-id :index #x2 :page #x63f)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-3)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-4 (ppointer->handle (static-screen-spawn 11 #x64000000 #x64000100 #x64000200 1500 #f self))))
(let ((gp-4 (ppointer->handle (static-screen-spawn
11
(new 'static 'texture-id :page #x640)
(new 'static 'texture-id :index #x1 :page #x640)
(new 'static 'texture-id :index #x2 :page #x640)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-4)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-5 (ppointer->handle (static-screen-spawn 12 #x64100000 #x64100100 #x64100200 1500 #f self))))
(let ((gp-5 (ppointer->handle (static-screen-spawn
12
(new 'static 'texture-id :page #x641)
(new 'static 'texture-id :index #x1 :page #x641)
(new 'static 'texture-id :index #x2 :page #x641)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-5)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-6 (ppointer->handle (static-screen-spawn 13 #x64200000 #x64200100 #x64200200 1500 #f self))))
(let ((gp-6 (ppointer->handle (static-screen-spawn
13
(new 'static 'texture-id :page #x642)
(new 'static 'texture-id :index #x1 :page #x642)
(new 'static 'texture-id :index #x2 :page #x642)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-6)
(suspend)
)
)
)
(else
(let ((gp-7 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(let ((gp-7 (ppointer->handle (static-screen-spawn
2
(new 'static 'texture-id :page #x5cd)
(new 'static 'texture-id :index #x1 :page #x5cd)
(new 'static 'texture-id :index #x2 :page #x5cd)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-7)
(suspend)
)
)
)
)
(let ((gp-8 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(let ((gp-8 (ppointer->handle (static-screen-spawn
3
(new 'static 'texture-id :page #x5ce)
(new 'static 'texture-id :index #x1 :page #x5ce)
(new 'static 'texture-id :index #x2 :page #x5ce)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-8)
(suspend)
)
)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-9 (ppointer->handle (static-screen-spawn 15 #x64400000 #x64400100 #x64400200 #x4650 #t self))))
(let ((gp-9 (ppointer->handle (static-screen-spawn
15
(new 'static 'texture-id :page #x644)
(new 'static 'texture-id :index #x1 :page #x644)
(new 'static 'texture-id :index #x2 :page #x644)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-9)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-10 (ppointer->handle (static-screen-spawn 16 #x64500000 #x64500100 #x64500200 #x4650 #t self))))
(let ((gp-10 (ppointer->handle (static-screen-spawn
16
(new 'static 'texture-id :page #x645)
(new 'static 'texture-id :index #x1 :page #x645)
(new 'static 'texture-id :index #x2 :page #x645)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-10)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-11 (ppointer->handle (static-screen-spawn 17 #x64600000 #x64600100 #x64600200 #x4650 #t self))))
(let ((gp-11 (ppointer->handle (static-screen-spawn
17
(new 'static 'texture-id :page #x646)
(new 'static 'texture-id :index #x1 :page #x646)
(new 'static 'texture-id :index #x2 :page #x646)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-11)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-12 (ppointer->handle (static-screen-spawn 18 #x64700000 #x64700100 #x64700200 #x4650 #t self))))
(let ((gp-12 (ppointer->handle (static-screen-spawn
18
(new 'static 'texture-id :page #x647)
(new 'static 'texture-id :index #x1 :page #x647)
(new 'static 'texture-id :index #x2 :page #x647)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-12)
(suspend)
)
)
)
(else
(let ((gp-13 (ppointer->handle (static-screen-spawn 14 #x64300000 #x64300100 #x64300200 #x4650 #t self))))
(let ((gp-13 (ppointer->handle (static-screen-spawn
14
(new 'static 'texture-id :page #x643)
(new 'static 'texture-id :index #x1 :page #x643)
(new 'static 'texture-id :index #x2 :page #x643)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-13)
(suspend)
)
@@ -115,17 +269,50 @@
)
)
(else
(let ((gp-14 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(let ((gp-14 (ppointer->handle (static-screen-spawn
2
(new 'static 'texture-id :page #x5cd)
(new 'static 'texture-id :index #x1 :page #x5cd)
(new 'static 'texture-id :index #x2 :page #x5cd)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-14)
(suspend)
)
)
(let ((gp-15 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(let ((gp-15 (ppointer->handle (static-screen-spawn
3
(new 'static 'texture-id :page #x5ce)
(new 'static 'texture-id :index #x1 :page #x5ce)
(new 'static 'texture-id :index #x2 :page #x5ce)
(seconds 5)
#f
self
)
)
)
)
(while (handle->process gp-15)
(suspend)
)
)
(let ((gp-16 (ppointer->handle (static-screen-spawn 4 #x5cf00000 #x5cf00100 #x5cf00200 #x4650 #t self))))
(let ((gp-16 (ppointer->handle (static-screen-spawn
4
(new 'static 'texture-id :page #x5cf)
(new 'static 'texture-id :index #x1 :page #x5cf)
(new 'static 'texture-id :index #x2 :page #x5cf)
(seconds 60)
#t
self
)
)
)
)
(while (handle->process gp-16)
(suspend)
)
+18 -7
View File
@@ -152,7 +152,7 @@
;; definition for function static-screen-init-by-other
;; INFO: Return type mismatch int vs none.
(defbehavior static-screen-init-by-other static-screen ((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 time-frame) (arg5 symbol))
(defbehavior static-screen-init-by-other static-screen ((arg0 int) (arg1 texture-id) (arg2 texture-id) (arg3 texture-id) (arg4 time-frame) (arg5 symbol))
(let ((s3-0 (lookup-part-group-by-name "group-part-screen1")))
(when (and s3-0 (nonzero? s3-0) (type-type? (-> s3-0 type) sparticle-launch-group))
(set! (-> *part-id-table* 2966 init-specs 0 initial-valuef) (the-as float arg1))
@@ -167,15 +167,26 @@
)
;; definition for function static-screen-spawn
;; INFO: Return type mismatch (pointer process) vs (pointer static-screen).
;; Used lq/sq
(defun static-screen-spawn ((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 symbol) (arg6 target))
(defun static-screen-spawn ((arg0 int)
(arg1 texture-id)
(arg2 texture-id)
(arg3 texture-id)
(arg4 time-frame)
(arg5 symbol)
(arg6 process-tree)
)
(local-vars (sv-16 process))
(set! sv-16 (get-process *default-dead-pool* static-screen #x4000))
(when sv-16
(let ((t9-1 (method-of-type static-screen activate)))
(t9-1 (the-as static-screen sv-16) arg6 'static-screen (the-as pointer #x70004000))
(the-as
(pointer static-screen)
(when sv-16
(let ((t9-1 (method-of-type static-screen activate)))
(t9-1 (the-as static-screen sv-16) arg6 'static-screen (the-as pointer #x70004000))
)
(run-now-in-process sv-16 static-screen-init-by-other arg0 arg1 arg2 arg3 arg4 arg5)
(-> sv-16 ppointer)
)
(run-now-in-process sv-16 static-screen-init-by-other arg0 arg1 arg2 arg3 arg4 arg5)
(-> sv-16 ppointer)
)
)
+11 -1
View File
@@ -723,7 +723,17 @@
(let ((gp-0 (the-as handle #f)))
(case (scf-get-territory)
((2)
(set! gp-0 (ppointer->handle (static-screen-spawn 5 #x64900000 #x64900100 #x64900200 900 #f self)))
(set! gp-0 (ppointer->handle (static-screen-spawn
5
(new 'static 'texture-id :page #x649)
(new 'static 'texture-id :index #x1 :page #x649)
(new 'static 'texture-id :index #x2 :page #x649)
(seconds 3)
#f
self
)
)
)
)
(else
(while (!= (file-status *art-control* "ndi-intro" 0) 'active)