mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 06:09:57 +00:00
jak3: decomp bigmap
, blit-displays
, fix progress
crash (#3657)
`bigmap` and `blit-displays` mostly work. `blit-displays` is still missing all of the special effects that were added in Jak 3 (brightness and contrast settings, screen blur effect, etc.). `bigmap` is missing the player marker texture (`hud-target-marker`) for some reason, it's part of `tpage-17` which is coming from `progress-minimap` and should already be included. The icons also currently stretch when using aspect ratios other than 4:3. The progress menu now also works for the most part. The draw order is a bit messed up because some code was initially drawing things with the ocean bucket, which was changed to use `hud-draw-hud-alpha` instead for now. The texture for the volume and brightness/contrast sliders still looks wrong. Fixes #3653 Fixes #3656
This commit is contained in:
parent
bc66d416b4
commit
7053090541
@ -231,10 +231,11 @@ ObjectFileDB::ObjectFileDB(const std::vector<fs::path>& _dgos,
|
||||
StrFileReader reader(obj, version());
|
||||
// name from the file name
|
||||
std::string base_name = obj_filename_to_name(obj.string());
|
||||
ASSERT(reader.chunk_count() == 1);
|
||||
auto name = reader.get_texture_name();
|
||||
add_obj_from_dgo(name, name, reader.get_chunk(0).data(), reader.get_chunk(0).size(),
|
||||
"TEXSPOOL", config, name);
|
||||
for (int i = 0; i < reader.chunk_count(); i++) {
|
||||
auto name = reader.get_chunk_texture_name(i);
|
||||
add_obj_from_dgo(name, name, reader.get_chunk(i).data(), reader.get_chunk(i).size(),
|
||||
"TEXSPOOL", config, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7541,27 +7541,27 @@
|
||||
;; +++level-h:bigmap-id
|
||||
(defenum bigmap-id
|
||||
:type uint32
|
||||
(bigmap-id-0 0)
|
||||
(bigmap-id-1 1)
|
||||
(city 0)
|
||||
(comb 1)
|
||||
(desert 2)
|
||||
(factory 3)
|
||||
(forest 4)
|
||||
(mhcity 5)
|
||||
(mine 6)
|
||||
(nest 7)
|
||||
(bigmap-id-8 8)
|
||||
(no-map 9)
|
||||
(precursor 10)
|
||||
(bigmap-id-11 11)
|
||||
(nest2 8)
|
||||
(none 9)
|
||||
(precursor1 10)
|
||||
(precursor2 11)
|
||||
(rubble 12)
|
||||
(sewer0 13)
|
||||
(sewer1 14)
|
||||
(sewer2 15)
|
||||
(sewer-hum-kg 13)
|
||||
(sewer-kg-met 14)
|
||||
(sewer-met-hum 15)
|
||||
(stadium 16)
|
||||
(temple 17)
|
||||
(bigmap-id-18 18)
|
||||
(bigmap-id-19 19)
|
||||
(bigmap-id-20 20)
|
||||
(temple1 17)
|
||||
(temple2 18)
|
||||
(temple3 19)
|
||||
(temple4 20)
|
||||
(tower 21)
|
||||
(volcano 22)
|
||||
(wascity 23)
|
||||
@ -10742,16 +10742,55 @@
|
||||
:flag-assert #x900000180
|
||||
)
|
||||
|
||||
;; +++bigmap-h:bigmap-flag
|
||||
(defenum bigmap-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(bf00 0)
|
||||
(bf01 1)
|
||||
(bf02 2)
|
||||
(bf03 3)
|
||||
(bf04 4)
|
||||
(bf05 5)
|
||||
(bf06 6)
|
||||
(bf07 7)
|
||||
(bf08 8)
|
||||
(bf09 9)
|
||||
(bf10 10)
|
||||
(bf11 11)
|
||||
(bf12 12)
|
||||
(bf13 13)
|
||||
(bf14 14)
|
||||
(bf15 15)
|
||||
(bf16 16)
|
||||
(bf17 17)
|
||||
(ctywide 18)
|
||||
(waswide 19)
|
||||
(wasall 20)
|
||||
(desert 21)
|
||||
(bf22 22)
|
||||
(bf23 23)
|
||||
(bf24 24)
|
||||
(bf25 25)
|
||||
(bf26 26)
|
||||
(bf27 27)
|
||||
(bf28 28)
|
||||
(bf29 29)
|
||||
(bf30 30)
|
||||
(bf31 31)
|
||||
)
|
||||
;; ---bigmap-h:bigmap-flag
|
||||
|
||||
(deftype bigmap (basic)
|
||||
((drawing-flag symbol :offset-assert 4) ;; guessed by decompiler
|
||||
(loading-flag symbol :offset-assert 8) ;; guessed by decompiler
|
||||
(bigmap-index uint32 :offset-assert 12)
|
||||
(bigmap-index bigmap-id :offset-assert 12)
|
||||
(bigmap-image external-art-buffer :offset-assert 16) ;; guessed by decompiler
|
||||
(tpage external-art-buffer :offset-assert 20) ;; guessed by decompiler
|
||||
(tpage2 basic :offset-assert 24)
|
||||
(tpage2 external-art-buffer :offset-assert 24)
|
||||
(progress-minimap texture-page :offset-assert 28) ;; guessed by decompiler
|
||||
(progress-minimap2 texture-page :offset-assert 32)
|
||||
(load-index uint32 :offset-assert 36)
|
||||
(load-index bigmap-id :offset-assert 36)
|
||||
(x0 int32 :offset-assert 40)
|
||||
(y0 int32 :offset-assert 44)
|
||||
(x1 int32 :offset-assert 48)
|
||||
@ -10766,29 +10805,29 @@
|
||||
(scroll vector :inline :offset-assert 176)
|
||||
(pos vector4w :inline :offset-assert 192)
|
||||
(color vector4w :inline :offset-assert 208)
|
||||
(corner vector 4 :inline :offset-assert 224) ;; guessed by decompiler
|
||||
(corner vector 4 :inline :offset-assert 224) ;; guessed by decompiler
|
||||
(auto-save-icon-flag symbol :offset-assert 288) ;; guessed by decompiler
|
||||
(global-flags uint32 :offset-assert 292)
|
||||
(global-flags bigmap-flag :offset-assert 292)
|
||||
)
|
||||
:method-count-assert 23
|
||||
:size-assert #x128
|
||||
:flag-assert #x1700000128
|
||||
(:methods
|
||||
(new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_)
|
||||
(bigmap-method-9 () none) ;; 9 ;; (initialize (_type_) none)
|
||||
(new (symbol type) _type_) ;; 0
|
||||
(initialize (_type_) none) ;; 9
|
||||
(update (_type_) none) ;; 10
|
||||
(bigmap-method-11 (_type_) symbol) ;; 11
|
||||
(bigmap-method-12 () none) ;; 12 ;; (handle-cpad-inputs (_type_) int)
|
||||
(bigmap-method-13 () none) ;; 13 ;; (compress-all (_type_) int)
|
||||
(loaded? (_type_) symbol) ;; 11
|
||||
(draw! (_type_ int int int int) none) ;; 12 ;; (handle-cpad-inputs (_type_) int)
|
||||
(handle-cpad-input (_type_) none) ;; 13 ;; (compress-all (_type_) int)
|
||||
(enable-drawing (_type_) none) ;; 14
|
||||
(disable-drawing (_type_) int) ;; 15
|
||||
(bigmap-method-16 (_type_) none) ;; 16 ;; (dump-to-file (_type_) file-stream)
|
||||
(bigmap-method-17 () none) ;; 17 ;; (set-pos! (_type_ vector) int)
|
||||
(bigmap-method-18 () none) ;; 18 ;; (decompress-current-masks! (_type_) int)
|
||||
(bigmap-method-19 () none) ;; 19 ;; (compress-current-masks! (_type_) int)
|
||||
(bigmap-method-20 () none) ;; 20 ;; (set-enable-from-position! (_type_) int)
|
||||
(bigmap-method-21 () none) ;; 21 ;; (maybe-fill-for-position (_type_ int int) int)
|
||||
(bigmap-method-22 () none) ;; 22 ;; (texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none)
|
||||
(set-map-indices! (_type_) none) ;; 16 ;; (dump-to-file (_type_) file-stream)
|
||||
(set-pos! (_type_ vector) none) ;; 17
|
||||
(bigmap-method-18 (_type_ (pointer int32)) none) ;; 18 ;; (decompress-current-masks! (_type_) int)
|
||||
(texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none) ;; 19 ;; (compress-current-masks! (_type_) int)
|
||||
(bigmap-method-20 (_type_ dma-buffer) symbol) ;; 20 ;; (set-enable-from-position! (_type_) int)
|
||||
(sprite-dma (_type_ dma-buffer int int int int int int) object) ;; 21 ;; (maybe-fill-for-position (_type_ int int) int)
|
||||
(draw-from-minimap (_type_ dma-buffer connection-minimap) none) ;; 22
|
||||
)
|
||||
)
|
||||
|
||||
@ -11503,13 +11542,13 @@
|
||||
(scan-tmpl dma-gif-packet :inline :offset-assert 192)
|
||||
(color vector4w :inline :offset-assert 224)
|
||||
(line-color uint64 :offset-assert 240)
|
||||
(scan-colors vector4w 15 :inline :offset-assert 256) ;; guessed by decompiler
|
||||
(scan-colors vector4w 15 :inline :offset-assert 256) ;; guessed by decompiler
|
||||
(zoom-blur-pos vector :inline :offset-assert 496)
|
||||
(zoom-blur-count int32 :offset-assert 512)
|
||||
(zoom-blur-texels int32 :offset-assert 516)
|
||||
(zoom-blur-alpha-target float :offset-assert 520)
|
||||
(zoom-blur-alpha-current float :offset-assert 524)
|
||||
(zoom-blur-2d basic :offset-assert 528)
|
||||
(zoom-blur-2d symbol :offset-assert 528)
|
||||
(menu-mode symbol :offset-assert 532) ;; guessed by decompiler
|
||||
(screen-copied symbol :offset-assert 536) ;; guessed by decompiler
|
||||
(vu1-enable-user-menu vu1-renderer-mask :offset-assert 544)
|
||||
@ -11527,18 +11566,18 @@
|
||||
:size-assert #x24c
|
||||
:flag-assert #x1b0000024c
|
||||
(:methods
|
||||
(blit-displays-work-method-9 () none) ;; 9
|
||||
(blit-displays-work-method-10 () none) ;; 10
|
||||
(blit-displays-work-method-11 () none) ;; 11
|
||||
(blit-displays-work-method-12 () none) ;; 12
|
||||
(blit-displays-work-method-13 () none) ;; 13
|
||||
(blit-displays-work-method-14 () none) ;; 14
|
||||
(blit-displays-work-method-15 () none) ;; 15
|
||||
(blit-displays-work-method-16 () none) ;; 16
|
||||
(blit-displays-work-method-17 (_type_ vector int float symbol) none) ;; 17
|
||||
(blit-displays-work-method-18 () none) ;; 18
|
||||
(blit-displays-work-method-19 (_type_) none) ;; 19 (called from main.gc)
|
||||
(blit-displays-work-method-20 (_type_) none) ;; 20
|
||||
(blit-displays-work-method-9 (_type_ dma-buffer int int int) none) ;; 9
|
||||
(blit-displays-work-method-10 (_type_ dma-buffer int int int) none) ;; 10
|
||||
(blit-displays-work-method-11 (_type_ dma-buffer int) none) ;; 11
|
||||
(draw-letterbox (_type_ dma-buffer float int float) none) ;; 12
|
||||
(blit-displays-work-method-13 (_type_ dma-buffer int int int) none) ;; 13
|
||||
(blit-displays-work-method-14 (_type_ dma-buffer vector) none) ;; 14
|
||||
(blit-displays-work-method-15 (_type_ dma-buffer) none) ;; 15
|
||||
(draw-zoom-blur (_type_ dma-buffer int) none) ;; 16
|
||||
(setup-zoom-blur-2d (_type_ vector int float symbol) none) ;; 17
|
||||
(setup-brightness-and-contrast (_type_ dma-buffer float float) none) ;; 18
|
||||
(do-blit-displays (_type_) none) ;; 19 (called from main.gc)
|
||||
(draw-sky (_type_ dma-buffer) none) ;; 20
|
||||
(get-menu-mode (_type_) symbol) ;; 21
|
||||
(get-screen-copied (_type_) symbol) ;; 22
|
||||
(get-horizontal-flip-flag (_type_) symbol) ;; 23
|
||||
@ -31082,7 +31121,7 @@
|
||||
|
||||
(define-extern *blit-displays-work* blit-displays-work)
|
||||
(define-extern draw-color-bars (function blit-displays-work none))
|
||||
(define-extern draw-raw-image (function bucket-id art-group int vector vector level int none))
|
||||
(define-extern draw-raw-image (function blit-displays-work bucket-id art-group vector vector level int none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; font-data ;;
|
||||
@ -39247,7 +39286,7 @@
|
||||
;; bigmap ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern *bigmap-info-array* object) ;; bigmap-info-array
|
||||
(define-extern *bigmap-info-array* bigmap-info-array)
|
||||
(define-extern *bigmap* bigmap)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -1000,5 +1000,10 @@
|
||||
[12, "(function none :behavior scene-player)"],
|
||||
[13, "(function none :behavior scene-player)"],
|
||||
[14, "(function none :behavior scene-player)"]
|
||||
],
|
||||
"bigmap": [
|
||||
[15, "(function external-art-buffer object)"],
|
||||
[16, "(function external-art-buffer object)"],
|
||||
[17, "(function external-art-buffer object)"]
|
||||
]
|
||||
}
|
||||
|
@ -187,17 +187,17 @@
|
||||
"DGO/PRECB.DGO",
|
||||
"DGO/PRECC.DGO",
|
||||
// "DGO/PRECD.DGO",
|
||||
// // title/intro
|
||||
// title/intro
|
||||
"DGO/WIN.DGO", // wasintro
|
||||
"DGO/TITLE.DGO",
|
||||
"DGO/INTTITLE.DGO",
|
||||
"DGO/INTPALRF.DGO", // intro-palace-roof
|
||||
"DGO/IPF.DGO", // intro-palace-fall
|
||||
"DGO/INTROCST.DGO",
|
||||
// // outro
|
||||
// outro
|
||||
"DGO/OUTCAST3.DGO",
|
||||
"DGO/OUTROCST.DGO",
|
||||
// // museum
|
||||
// museum
|
||||
"DGO/MUSEUM.DGO",
|
||||
"DGO/MUSEUM2.DGO",
|
||||
"DGO/MUSEUM3.DGO",
|
||||
@ -311,6 +311,10 @@
|
||||
"DGO/LWSTDPCK.DGO"
|
||||
],
|
||||
|
||||
// STR files containing a texture that should be used by
|
||||
// FR3 creation.
|
||||
"str_texture_file_names": ["STR/PRMINIMA.STR"],
|
||||
|
||||
// some objects are part of STR files (streaming data).
|
||||
"str_file_names": [],
|
||||
|
||||
@ -343,6 +347,12 @@
|
||||
"VAGWAD.INT"
|
||||
],
|
||||
|
||||
// tpages that should always be possible to access.
|
||||
"common_tpages": [
|
||||
17, // PRMINIMA progress-minimap
|
||||
3349 // PRMINIMA progress-minimap2
|
||||
],
|
||||
|
||||
"animated_textures": [
|
||||
// dark jak
|
||||
"jakc-arm",
|
||||
|
@ -2513,5 +2513,12 @@
|
||||
[80, "matrix"],
|
||||
[144, "matrix"],
|
||||
[208, "matrix"]
|
||||
],
|
||||
"(method 12 bigmap)": [[32, "matrix"]],
|
||||
"(method 22 bigmap)": [
|
||||
[16, "vector4w"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
]
|
||||
}
|
||||
|
@ -10857,7 +10857,6 @@
|
||||
["_stack_", 76, "float"],
|
||||
["_stack_", 100, "float"]
|
||||
],
|
||||
"real-wang-texture-anim-func": [[[3, 31], "v1", "mood-context"]],
|
||||
"(method 24 sky-work)": [
|
||||
[256, "s4", "(pointer int32)"],
|
||||
[261, "s4", "(pointer int32)"]
|
||||
@ -11266,5 +11265,80 @@
|
||||
[[191, 249], "gp", "shadow-dcache"],
|
||||
[96, "v1", "shadow-dcache"]
|
||||
],
|
||||
"real-fog-texture-anim-func": [[[6, 160], "s2", "(pointer uint32)"]]
|
||||
"real-fog-texture-anim-func": [[[6, 160], "s2", "(pointer uint32)"]],
|
||||
"(method 22 bigmap)": [
|
||||
[22, "s3", "process-drawable"],
|
||||
[[46, 49], "v1", "entity-actor"],
|
||||
[58, "a0", "process-drawable"],
|
||||
[65, "a0", "entity-actor"],
|
||||
[42, "v1", "entity-actor"],
|
||||
[55, "s3", "process-drawable"],
|
||||
[[201, 243], "a1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 20 bigmap)": [
|
||||
[[3, 95], "s4", "(pointer uint32)"],
|
||||
[99, "a2", "(pointer uint32)"],
|
||||
[54, "a2", "(pointer uint32)"]
|
||||
],
|
||||
"(method 12 bigmap)": [
|
||||
[85, "v1", "(pointer uint32)"],
|
||||
[100, "v1", "(pointer uint32)"],
|
||||
[[142, 145], "s0", "(pointer uint128)"],
|
||||
["_stack_", 96, "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 21 bigmap)": [[[10, 38], "v1", "(inline-array vector4w)"]],
|
||||
"(method 19 blit-displays-work)": [
|
||||
[764, "v1", "float"],
|
||||
[759, "v1", "float"],
|
||||
[[935, 954], "a1", "(inline-array vector4w)"],
|
||||
[[857, 875], "a1", "(inline-array vector4w)"],
|
||||
[[844, 847], "a0", "dma-gif-packet"],
|
||||
[[921, 924], "v1", "dma-gif-packet"]
|
||||
],
|
||||
"(method 9 blit-displays-work)": [[[2, 36], "v1", "(inline-array vector4w)"]],
|
||||
"(method 10 blit-displays-work)": [
|
||||
[[2, 141], "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 11 blit-displays-work)": [
|
||||
[[2, 30], "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 12 blit-displays-work)": [
|
||||
[[4, 41], "v1", "(inline-array vector4w)"],
|
||||
[[60, 112], "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 13 blit-displays-work)": [
|
||||
[[41, 44], "v1", "(inline-array vector4w)"],
|
||||
[[53, 71], "a0", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 18 blit-displays-work)": [
|
||||
[[28, 33], "v1", "dma-gif-packet"],
|
||||
[[174, 177], "v1", "dma-gif-packet"],
|
||||
[[186, 202], "a0", "(inline-array vector4w)"]
|
||||
],
|
||||
"draw-raw-image": [[[104, 154], "v1", "(inline-array vector4w)"]],
|
||||
"draw-color-bars": [
|
||||
[[11, 16], "v1", "dma-gif-packet"],
|
||||
[[28, 54], "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 20 blit-displays-work)": [
|
||||
[[57, 89], "a3", "(inline-array vector4w)"],
|
||||
[[102, 134], "t1", "(inline-array vector4w)"],
|
||||
[[176, 209], "t1", "(inline-array vector4w)"],
|
||||
[[310, 338], "t2", "(inline-array vector4w)"],
|
||||
[[385, 422], "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 14 blit-displays-work)": [
|
||||
[[88, 91], "v1", "dma-gif-packet"],
|
||||
[[100, 120], "a0", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 16 blit-displays-work)": [
|
||||
[[35, 79], "s2", "(inline-array vector4w)"],
|
||||
[[134, 178], "s2", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 15 blit-displays-work)": [
|
||||
[[60, 63], "v1", "dma-gif-packet"],
|
||||
[[81, 99], "a0", "(inline-array vector4w)"],
|
||||
[[165, 190], "a0", "(inline-array vector4w)"]
|
||||
],
|
||||
"(event idle progress)": [[[10, 80], "v1", "mc-status-code"]]
|
||||
}
|
||||
|
@ -2135,5 +2135,11 @@
|
||||
"vars": {
|
||||
"v0-0": ["type", "assault-target-type"]
|
||||
}
|
||||
},
|
||||
"(method 22 bigmap)": {
|
||||
"vars": {
|
||||
"a2-1": ["a2-1", "uint"],
|
||||
"a3-0": ["a3-0", "uint"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -258,9 +258,8 @@ std::string StrFileReader::get_full_name(const std::string& short_name) const {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string StrFileReader::get_texture_name() const {
|
||||
ASSERT(m_chunks.size() == 1);
|
||||
const auto& chunk = m_chunks[0];
|
||||
std::string StrFileReader::get_chunk_texture_name(int idx) const {
|
||||
const auto& chunk = m_chunks[idx];
|
||||
auto find_string = get_texture_page_file_info_string();
|
||||
int offset;
|
||||
if (find_string_in_data(chunk.data(), int(chunk.size()), find_string, &offset)) {
|
||||
|
@ -22,7 +22,7 @@ class StrFileReader {
|
||||
std::string get_chunk_art_name(int idx) const;
|
||||
|
||||
std::string get_full_name(const std::string& short_name) const;
|
||||
std::string get_texture_name() const;
|
||||
std::string get_chunk_texture_name(int idx) const;
|
||||
|
||||
private:
|
||||
void init_jak1(const fs::path& file_path);
|
||||
@ -46,8 +46,9 @@ class StrFileReader {
|
||||
std::string get_texture_page_file_info_string() const {
|
||||
switch (m_version) {
|
||||
case GameVersion::Jak2:
|
||||
case GameVersion::Jak3:
|
||||
return "/src/jak2/final/texture-page8/";
|
||||
case GameVersion::Jak3:
|
||||
return "/src/jak3/final/texture-page8/";
|
||||
default:
|
||||
ASSERT_MSG(false, "NYI get_file_info_string version");
|
||||
break;
|
||||
|
@ -11,9 +11,8 @@
|
||||
|
||||
void kmemcard_init_globals();
|
||||
|
||||
// TODO: jak 3 stubs
|
||||
constexpr PerGameVersion<s32> SAVE_SIZE(692, 1204, 0); // 691 for jak 1 v1
|
||||
constexpr PerGameVersion<s32> BANK_SIZE(0x10000, 0x20000, 0x0);
|
||||
constexpr PerGameVersion<s32> SAVE_SIZE(692, 1204, 1060); // 691 for jak 1 v1
|
||||
constexpr PerGameVersion<s32> BANK_SIZE(0x10000, 0x20000, 0x1e000);
|
||||
|
||||
// each card can be in one of these states:
|
||||
enum class MemoryCardState : u32 {
|
||||
|
@ -4042,7 +4042,7 @@
|
||||
:trans (behavior ()
|
||||
(set! (-> self task-counter) (-> *game-info* task-counter))
|
||||
(if *bigmap*
|
||||
(bigmap-method-16 *bigmap*)
|
||||
(set-map-indices! *bigmap*)
|
||||
)
|
||||
(let ((gp-0 (res-lump-struct (-> self entity) 'on-running structure)))
|
||||
(cond
|
||||
|
@ -9,6 +9,9 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; og:preserve-this
|
||||
(declare-file (debug))
|
||||
|
||||
(deftype list-control (structure)
|
||||
((listfunc (function int list-control symbol) :offset-assert 0) ;; guessed by decompiler
|
||||
(list-owner uint32 :offset-assert 4)
|
||||
|
@ -587,10 +587,7 @@
|
||||
(dotimes (v1-96 (-> this game-score length))
|
||||
(set! (-> this game-score v1-96) 0.0)
|
||||
)
|
||||
(when *bigmap* ;; og:preserve-this not-yet-implemented check
|
||||
(format 0 "skipping bigmap init in game-info~%")
|
||||
((method-of-object *bigmap* bigmap-method-9))
|
||||
)
|
||||
(initialize *bigmap*)
|
||||
)
|
||||
)
|
||||
(case mode
|
||||
@ -1089,34 +1086,31 @@
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector4w)))
|
||||
(set! (-> s3-0 quad) (the-as uint128 0))
|
||||
(when (transform-point-qword! s3-0 (the-as vector arg0))
|
||||
(let ((s5-0
|
||||
(new
|
||||
'stack
|
||||
'font-context
|
||||
*font-default-matrix*
|
||||
(+ (the int (/ (the float (+ (/ (-> s3-0 x) 16) -1792)) (-> *video-params* relative-x-scale))) -48)
|
||||
(+ (/ (-> s3-0 y) 16) -1855)
|
||||
0.0
|
||||
(font-color orange)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
(let ((s5-0 (new
|
||||
'stack
|
||||
'font-context
|
||||
*font-default-matrix*
|
||||
(+ (the int (/ (the float (+ (/ (-> s3-0 x) 16) -1792)) (-> *video-params* relative-x-scale))) -48)
|
||||
(+ (/ (-> s3-0 y) 16) -1855)
|
||||
0.0
|
||||
(font-color orange)
|
||||
(font-flags shadow kerning)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 scale) (lerp-scale 0.6 1.0 (the-as float arg1) 50.0 8000.0))
|
||||
(let ((v1-9 s5-0))
|
||||
(set! (-> v1-9 origin z) (the float (/ (-> s3-0 z) 16)))
|
||||
)
|
||||
(set! (-> s5-0 flags) (font-flags shadow kerning large))
|
||||
(suspend-for
|
||||
(+ arg2 -75)
|
||||
(suspend-for (+ arg2 -75)
|
||||
(+! (-> s5-0 origin y) (* -120.0 (seconds-per-frame)))
|
||||
(let ((s2-0 print-game-text))
|
||||
(format (clear *temp-string*) "~4,,0f" arg1)
|
||||
(s2-0 *temp-string* s5-0 #f 44 (bucket-id debug-no-zbuf1))
|
||||
)
|
||||
)
|
||||
(suspend-for
|
||||
(seconds 0.25)
|
||||
(suspend-for (seconds 0.25)
|
||||
(set! (-> s5-0 alpha) (lerp-scale 1.0 0.0 (the float (- (current-time) time)) 0.0 150.0))
|
||||
(+! (-> s5-0 origin y) (* -120.0 (seconds-per-frame)))
|
||||
(let ((s3-2 print-game-text))
|
||||
@ -1398,10 +1392,6 @@
|
||||
|
||||
(defmethod copy-perms-to-level! ((this game-info) (arg0 level))
|
||||
(let ((s5-0 (-> arg0 bsp level entity)))
|
||||
(when (not s5-0) ;; og:preserve-this not-yet-implemented check
|
||||
(format #t "skipping copy-perms-to-level! since we have no entity links (needs entity.gc)~%")
|
||||
(return 0)
|
||||
)
|
||||
(dotimes (s4-0 (-> s5-0 length))
|
||||
(let* ((s3-0 (-> s5-0 data s4-0 entity extra perm))
|
||||
(v1-7 (actor-perm this (-> s3-0 aid)))
|
||||
@ -1589,7 +1579,13 @@
|
||||
(position->stream s5-0 arg0 #t)
|
||||
(process-spawn-function
|
||||
process
|
||||
(lambda :behavior process ((arg0 string)) (suspend-for (seconds 10) (format *stdcon* "~S~%" arg0)) (none))
|
||||
(lambda :behavior process
|
||||
((arg0 string))
|
||||
(suspend-for (seconds 10)
|
||||
(format *stdcon* "~S~%" arg0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
@ -1485,7 +1485,7 @@
|
||||
)
|
||||
|
||||
; ;; Update start-menu map and masking
|
||||
; (update *bigmap*)
|
||||
(update *bigmap*)
|
||||
|
||||
;; do some more level loading.
|
||||
(if (-> *level* loading-level)
|
||||
@ -1555,7 +1555,7 @@
|
||||
|
||||
; ;; generate DMA to copy from render buffer to frame buffer.
|
||||
(with-profiler 'blit-displays *profile-blit-color*
|
||||
(blit-displays-work-method-19 *blit-displays-work*)
|
||||
(do-blit-displays *blit-displays-work*)
|
||||
)
|
||||
|
||||
;; wrap up this frame (drawing of stdcon, debugging, etc.)
|
||||
@ -1575,8 +1575,11 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; start stat collection for this frame
|
||||
(start-frame! (-> arg0 frames (-> arg0 on-screen) profile-array data 0))
|
||||
(start-profiling! (-> *perf-stats* data 0))
|
||||
;; og:preserve-this added check
|
||||
(when *debug-segment*
|
||||
(start-frame! (-> arg0 frames (-> arg0 on-screen) profile-array data 0))
|
||||
(start-profiling! (-> *perf-stats* data 0))
|
||||
)
|
||||
|
||||
;; update *teleport* flag, which is set when the game intentionally teleports the camera,
|
||||
;; and indicates that effects should not be gradually transitioned.
|
||||
|
@ -1838,7 +1838,7 @@
|
||||
(-> s4-0 blur-a)
|
||||
(* (-> s5-0 blur-a-speed) (-> *display* real-clock seconds-per-frame))
|
||||
)
|
||||
(blit-displays-work-method-17
|
||||
(setup-zoom-blur-2d
|
||||
*blit-displays-work*
|
||||
(new 'static 'vector :x 256.0 :y 208.0 :w 1.0)
|
||||
s3-10
|
||||
|
@ -23,7 +23,7 @@
|
||||
(zoom-blur-texels int32)
|
||||
(zoom-blur-alpha-target float)
|
||||
(zoom-blur-alpha-current float)
|
||||
(zoom-blur-2d basic)
|
||||
(zoom-blur-2d symbol)
|
||||
(menu-mode symbol)
|
||||
(screen-copied symbol)
|
||||
(vu1-enable-user-menu vu1-renderer-mask)
|
||||
@ -38,18 +38,18 @@
|
||||
(slow-time float)
|
||||
)
|
||||
(:methods
|
||||
(blit-displays-work-method-9 () none)
|
||||
(blit-displays-work-method-10 () none)
|
||||
(blit-displays-work-method-11 () none)
|
||||
(blit-displays-work-method-12 () none)
|
||||
(blit-displays-work-method-13 () none)
|
||||
(blit-displays-work-method-14 () none)
|
||||
(blit-displays-work-method-15 () none)
|
||||
(blit-displays-work-method-16 () none)
|
||||
(blit-displays-work-method-17 (_type_ vector int float symbol) none)
|
||||
(blit-displays-work-method-18 () none)
|
||||
(blit-displays-work-method-19 (_type_) none)
|
||||
(blit-displays-work-method-20 (_type_) none)
|
||||
(blit-displays-work-method-9 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-10 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-11 (_type_ dma-buffer int) none)
|
||||
(draw-letterbox (_type_ dma-buffer float int float) none)
|
||||
(blit-displays-work-method-13 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-14 (_type_ dma-buffer vector) none)
|
||||
(blit-displays-work-method-15 (_type_ dma-buffer) none)
|
||||
(draw-zoom-blur (_type_ dma-buffer int) none)
|
||||
(setup-zoom-blur-2d (_type_ vector int float symbol) none)
|
||||
(setup-brightness-and-contrast (_type_ dma-buffer float float) none)
|
||||
(do-blit-displays (_type_) none)
|
||||
(draw-sky (_type_ dma-buffer) none)
|
||||
(get-menu-mode (_type_) symbol)
|
||||
(get-screen-copied (_type_) symbol)
|
||||
(get-horizontal-flip-flag (_type_) symbol)
|
||||
|
@ -83,20 +83,958 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; stub:
|
||||
|
||||
(defmethod blit-displays-work-method-19 ((this blit-displays-work))
|
||||
(set! (-> this slow-time) (- 1.0 (-> *setting-control* user-current slow-time)))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-17 ((this blit-displays-work) (arg0 vector) (arg1 int) (arg2 float) (arg3 symbol))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun draw-raw-image ((arg0 bucket-id) (arg1 art-group) (arg2 int) (arg3 vector) (arg4 vector) (arg5 level) (arg6 int))
|
||||
(none)
|
||||
(defun pc-upload-raw-texture ((dma-buf dma-buffer) (image-data pointer) (width int) (height int) (tbp int))
|
||||
"Added function in the PC port to create a 'raw' texture (no clut)"
|
||||
(pc-texture-anim-flag start-anim-array dma-buf)
|
||||
(pc-texture-anim-flag upload-generic-vram dma-buf :qwc 1)
|
||||
(let ((upload-record (the texture-anim-pc-upload (-> dma-buf base))))
|
||||
(set! (-> upload-record data) image-data)
|
||||
(set! (-> upload-record width) width)
|
||||
(set! (-> upload-record height) height)
|
||||
(set! (-> upload-record dest) tbp)
|
||||
(set! (-> upload-record format) (gs-psm ct32))
|
||||
(set! (-> upload-record force-to-gpu) 1)
|
||||
)
|
||||
(&+! (-> dma-buf base) 16)
|
||||
(pc-texture-anim-flag finish-anim-array dma-buf)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *blit-displays-work* (new 'static 'blit-displays-work
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
)
|
||||
:sprite-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x408b400000008010 #x5353)
|
||||
)
|
||||
:contrast-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x40ab400000008010 #x5353)
|
||||
)
|
||||
:sprite-slow-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531)
|
||||
)
|
||||
:draw-slow-time-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x13 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x13 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x30aec00000008006 #x531)
|
||||
)
|
||||
:line-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x2020c00000008020 #x55)
|
||||
)
|
||||
:scan-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4c :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4c :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x5020c0000000800f #x55551)
|
||||
)
|
||||
:color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:line-color #x3f80000000000000
|
||||
:scan-colors (new 'static 'inline-array vector4w 15
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :x 1 :y 3 :z 2)
|
||||
(new 'static 'vector4w :x 1 :y 4 :z 3)
|
||||
(new 'static 'vector4w :x 2 :y 6 :z 5)
|
||||
(new 'static 'vector4w :x 3 :y 8 :z 7)
|
||||
(new 'static 'vector4w :x 5 :y 11 :z 10)
|
||||
(new 'static 'vector4w :x 6 :y 14 :z 13)
|
||||
(new 'static 'vector4w :x 9 :y 20 :z 17)
|
||||
(new 'static 'vector4w :x 13 :y 27 :z 21)
|
||||
(new 'static 'vector4w :x 17 :y 36 :z 24)
|
||||
(new 'static 'vector4w :x 22 :y 45 :z 28)
|
||||
(new 'static 'vector4w :x 32 :y 63 :z 32)
|
||||
)
|
||||
:menu-mode #f
|
||||
:screen-copied #f
|
||||
:horizontal-flip-flag #f
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-9 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 8184 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-10 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this draw-slow-time-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this draw-slow-time-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 96 96 96 192)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 4088 3320 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 5120 (* arg2 8) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 7) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 8) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 9) 8184 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 10) #x2800 0 #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 11) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 12) 8184 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 13) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 14) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 15) 8 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 16) 0 (* arg2 16) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 17) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 18) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 19) 0 0 #xffffff 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 320)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-11 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) #x27f8 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) 8192 6656 #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw-letterbox ((this blit-displays-work) (arg0 dma-buffer) (arg1 float) (arg2 int) (arg3 float))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (pointer uint128) v1-0)) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 8184 (+ (the int (* 736.0 arg1)) 8) 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-0) 6)
|
||||
#x2800
|
||||
(the int (* 736.0 arg3 arg1))
|
||||
#xffffff
|
||||
#x10000
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((v1-4 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-4) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-4) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 3) 8 (+ (* (- 416 (the int (* 46.0 arg1))) 16) 8) 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-4) 4)
|
||||
0
|
||||
(* (- arg2 (the int (* 46.0 arg3 arg1))) 16)
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 5) 8184 6648 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 6) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-13 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0 (rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0)))
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-3) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-3) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-2 (* v1-6 512))
|
||||
(a1-10 (* (+ v1-6 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) (+ a2-2 arg3) arg1 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a2-2 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) (+ a1-10 arg3) arg2 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) a1-10 6656 0 #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-14 ((this blit-displays-work) (arg0 dma-buffer) (arg1 vector))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(rgbaq (new 'static 'gs-rgbaq
|
||||
:a #x80
|
||||
:q 1.0
|
||||
:b (the int (* 128.0 (-> arg1 z)))
|
||||
:g (the int (* 128.0 (-> arg1 y)))
|
||||
:r (the int (* 128.0 (-> arg1 x)))
|
||||
)
|
||||
)
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) dma-vif quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) quad 1) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-14 (* v1-6 512))
|
||||
(a1-23 (* (+ v1-6 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) (+ a2-14 8) 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a2-14 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) (+ a1-23 8) 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) a1-23 6656 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod blit-displays-work-method-15 ((this blit-displays-work) (arg0 dma-buffer))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) dma-vif quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) quad 1) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-1 (+ (* v1-6 512) 8))
|
||||
(a1-22 (+ (* (+ v1-6 1) 512) 8))
|
||||
(a3-3 (* (- 16 v1-6) 512))
|
||||
(t0-3 (* (- 16 (+ v1-6 1)) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) a2-1 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a3-3 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) a1-22 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) t0-3 6656 0 #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
(set-display-gs-state arg0 304 512 416 (shl #xff00 16) 48)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x2600 :tbw #x8 :psm #x30 :tw #x9 :th #x9))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((a0-21 (the-as object (-> arg0 base)))
|
||||
(a1-40 2640)
|
||||
(v1-13 4560)
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 3) 8192 a1-40 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 4) 8 a1-40 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 5) 6592 v1-13 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 6) 1608 v1-13 #xffffff 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw-zoom-blur ((this blit-displays-work) (arg0 dma-buffer) (arg1 int))
|
||||
(let ((s2-0 (the-as object (-> arg0 base)))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
0.0
|
||||
(let ((f26-0 512.0))
|
||||
0.0
|
||||
(let ((f30-0 416.0)
|
||||
(f28-0 (the float (-> this zoom-blur-texels)))
|
||||
)
|
||||
(cond
|
||||
((-> this zoom-blur-2d)
|
||||
(set! (-> s5-0 quad) (-> this zoom-blur-pos quad))
|
||||
(let* ((f2-0 (* 0.001953125 f28-0 (-> s5-0 x)))
|
||||
(f0-6 (- f26-0 (- f28-0 f2-0)))
|
||||
(f3-1 (* 0.0024038462 f28-0 (-> s5-0 y)))
|
||||
(f1-4 (- f30-0 (- f28-0 f3-1)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 3) (the int (* 16.0 f2-0)) (the int (* 16.0 f3-1)) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) s2-0) 5)
|
||||
(the int (* 16.0 (+ -1.0 f0-6)))
|
||||
(the int (* 16.0 (+ -1.0 f1-4)))
|
||||
0
|
||||
0
|
||||
)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 6) #x2800 (* arg1 16) #xffffff #x10000)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
(else
|
||||
(transform-point-vector! s5-0 (-> this zoom-blur-pos))
|
||||
(if (< (-> s5-0 z) 0.0)
|
||||
(vector-negate! s5-0 s5-0)
|
||||
)
|
||||
(+! (-> s5-0 x) -1792.0)
|
||||
(+! (-> s5-0 y) -1840.0)
|
||||
(let* ((f1-10 (* 0.001953125 f28-0 (-> s5-0 x)))
|
||||
(f2-8 (fmax 0.0 (fmin f1-10 f28-0)))
|
||||
(f0-22 (- f26-0 (- f28-0 f2-8)))
|
||||
(f3-4 (* 0.0024038462 f28-0 (-> s5-0 y)))
|
||||
(f3-6 (fmax 0.0 (fmin f3-4 f28-0)))
|
||||
(f1-16 (- f30-0 (- f28-0 f3-6)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 3) (the int (* 16.0 f2-8)) (the int (* 16.0 f3-6)) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) s2-0) 5)
|
||||
(the int (* 16.0 (+ -1.0 f0-22)))
|
||||
(the int (* 16.0 (+ -1.0 f1-16)))
|
||||
0
|
||||
0
|
||||
)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 6) #x2800 (* arg1 16) #xffffff #x10000)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-29 0.0)
|
||||
(f1-18 0.0)
|
||||
)
|
||||
(if (< (-> s5-0 x) 0.0)
|
||||
(set! f0-29 (fmin 1.0 (* 0.001953125 (- (-> s5-0 x)))))
|
||||
)
|
||||
(if (< 512.0 (-> s5-0 x))
|
||||
(set! f0-29 (fmin 1.0 (* 0.001953125 (+ -512.0 (-> s5-0 x)))))
|
||||
)
|
||||
(if (< (-> s5-0 y) 0.0)
|
||||
(set! f1-18 (fmin 1.0 (* 0.001953125 (- (-> s5-0 y)))))
|
||||
)
|
||||
(if (< 416.0 (-> s5-0 y))
|
||||
(set! f1-18 (fmin 1.0 (* 0.001953125 (+ -416.0 (-> s5-0 y)))))
|
||||
)
|
||||
(let ((f0-32 (fmax f0-29 f1-18)))
|
||||
(set! (-> this zoom-blur-alpha-current) (lerp (-> this zoom-blur-alpha-target) 1.0 f0-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-dirty-mask! (-> *level* level-default) 9 #xd0000 #x4c000)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod setup-zoom-blur-2d ((this blit-displays-work) (arg0 vector) (arg1 int) (arg2 float) (arg3 symbol))
|
||||
(set! (-> this zoom-blur-2d) arg3)
|
||||
(set! (-> this zoom-blur-pos quad) (-> arg0 quad))
|
||||
(set! (-> this zoom-blur-texels) arg1)
|
||||
(set! (-> this zoom-blur-alpha-target) arg2)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod setup-brightness-and-contrast ((this blit-displays-work) (arg0 dma-buffer) (arg1 float) (arg2 float))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(let ((s4-1 (fmax 0.0 (fmin 1.0 arg2)))
|
||||
(s3-1 (fmax 0.0 (fmin 1.0 arg1)))
|
||||
)
|
||||
(let ((v1-2 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-2) dma-vif quad) (-> this adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-2) quad 1) (-> this adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple!
|
||||
(the-as adgif-shader (&+ (the-as dma-gif-packet v1-2) 32))
|
||||
(get-texture common-white common)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((v1-9 (the int (* 64.2509 (+ (- 0.5 s4-1) (* 2.0 (fmax 0.0 (+ -0.5 s3-1)))))))
|
||||
(a0-10 (the int (fmin 255.0 (* 256.0 (fmin 1.0 (* 2.0 s3-1)) s4-1))))
|
||||
)
|
||||
(cond
|
||||
((>= v1-9 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :a #x1 :b #x2 :c #x2 :fix a0-10))
|
||||
(rgbaq (new 'static 'gs-rgbaq :a #x80 :q 1.0 :b v1-9 :g v1-9 :r v1-9))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (- v1-9)))
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :a #x1 :c #x2 :d #x2 :fix a0-10))
|
||||
(rgbaq (new 'static 'gs-rgbaq :a #x80 :q 1.0 :b v1-15 :g v1-15 :r v1-15))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-21 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-21) dma-vif quad) (-> this contrast-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-21) quad 1) (-> this contrast-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-24 16)
|
||||
(let ((a0-27 (the-as object (-> arg0 base)))
|
||||
(a2-12 (* v1-24 512))
|
||||
(a1-10 (* (+ v1-24 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 0) 0 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 1) a2-12 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 2) 0 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 3) a1-10 6656 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; TODO new jak3 effects
|
||||
(defmethod do-blit-displays ((this blit-displays-work))
|
||||
(set! (-> this slow-time) (- 1.0 (-> *setting-control* user-current slow-time)))
|
||||
(let ((v1-3 (-> *setting-control* user-current)))
|
||||
(when (or (!= (-> v1-3 contrast) 0.5) (!= (-> v1-3 brightness) 0.5))
|
||||
; (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id debug-menu)
|
||||
; )
|
||||
; (setup-brightness-and-contrast this s4-0 (-> v1-3 brightness) (-> v1-3 contrast))
|
||||
; (reset-display-gs-state *display* s4-0)
|
||||
; )
|
||||
)
|
||||
)
|
||||
(when (zero? (-> this count-down))
|
||||
(cond
|
||||
((and (-> this menu-mode) (not (-> this screen-copied)))
|
||||
(with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket3)
|
||||
)
|
||||
(fx-copy-buf s4-1)
|
||||
)
|
||||
(set! (-> this vu1-enable-user-menu) (-> *display* vu1-enable-user-menu))
|
||||
;; og:preserve-this
|
||||
(set! (-> *display* vu1-enable-user-menu) (vu1-renderer-mask merc))
|
||||
(set! (-> *display* vu1-enable-user) (vu1-renderer-mask merc))
|
||||
(set! (-> this texture-enable-user-menu) (the-as uint (-> *texture-pool* texture-enable-user-menu)))
|
||||
(set! (-> *texture-pool* texture-enable-user-menu) (texture-enable-mask shrub water hud))
|
||||
(set! (-> *texture-pool* texture-enable-user) (texture-enable-mask shrub water hud))
|
||||
(set! (-> this count-down) (the-as uint 3))
|
||||
(set! (-> this screen-copied) #t)
|
||||
(set! (-> this progress-interp) 0.0)
|
||||
(set! (-> this progress-interp-dest) 1.0)
|
||||
(set! (-> this progress-interp-speed) 0.033333335)
|
||||
(#when PC_PORT
|
||||
(when (-> *pc-settings* fast-progress?)
|
||||
(*! (-> this progress-interp-speed) (-> *pc-cheat-state* progress-speed))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (not (get-menu-mode this)) (get-screen-copied this))
|
||||
(set! (-> *display* vu1-enable-user-menu) (-> this vu1-enable-user-menu))
|
||||
(set! (-> *texture-pool* texture-enable-user-menu)
|
||||
(the-as texture-enable-mask (-> this texture-enable-user-menu))
|
||||
)
|
||||
(set! (-> this count-down) (the-as uint 3))
|
||||
(set! (-> this screen-copied) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (-> *setting-control* user-current render) (>= (the-as uint 1) (-> this count-down)))
|
||||
(when (and (get-horizontal-flip-flag this) (not (get-menu-mode this)))
|
||||
; (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id debug-no-zbuf1)
|
||||
; )
|
||||
; (fx-copy-buf s4-2)
|
||||
; (blit-displays-work-method-15 this s4-2)
|
||||
; (reset-display-gs-state *display* s4-2)
|
||||
; )
|
||||
)
|
||||
; (when (logtest? (vu1-renderer-mask rn36) (-> *display* vu1-enable-user))
|
||||
; (when (not *display-color-bars*)
|
||||
; (with-dma-buffer-add-bucket ((s4-3 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id bucket567)
|
||||
; )
|
||||
; (dma-buffer-add-gs-set s4-3
|
||||
; (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
; (alpha-1 (new 'static 'gs-alpha))
|
||||
; (tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
; (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
; (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
; (texflush 0)
|
||||
; )
|
||||
; (if (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
; (blit-displays-work-method-13 this s4-3 0 6656 8)
|
||||
; )
|
||||
; (reset-display-gs-state *display* s4-3)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
)
|
||||
(let ((f0-9 (-> this slow-time))
|
||||
(a2-6 (-> *time-of-day-context* filter))
|
||||
(s5-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector! s5-4 1.0 1.0 1.5 1.0)
|
||||
(vector4-lerp! s5-4 s5-4 a2-6 f0-9)
|
||||
(when (and (or (!= (-> s5-4 x) 1.0) (!= (-> s5-4 y) 1.0) (!= (-> s5-4 z) 1.0)) (not (get-menu-mode this)))
|
||||
; (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id tex-hud-hud-alpha)
|
||||
; )
|
||||
; (blit-displays-work-method-14 this s3-0 s5-4)
|
||||
; (reset-display-gs-state *display* s3-0)
|
||||
; )
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (-> *setting-control* user-current render) (zero? (-> this count-down)))
|
||||
; (with-dma-buffer-add-bucket ((s4-5 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id bucket3)
|
||||
; )
|
||||
; (dma-buffer-add-gs-set s4-5
|
||||
; (dthe (new 'static 'gs-dthe))
|
||||
; (prmodecont (new 'static 'gs-prmode-cont :ac #x1))
|
||||
; (colclamp (new 'static 'gs-color-clamp :clamp #x1))
|
||||
; (pabe 0)
|
||||
; (texa (new 'static 'gs-texa :ta1 #x80))
|
||||
; (texclut (new 'static 'gs-texclut :cbw #x4))
|
||||
; (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
; (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
; (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
; (fogcol *fog-color*)
|
||||
; (texflush 0)
|
||||
; )
|
||||
; (let* ((s0-0 *video-params*)
|
||||
; (s1-0 (-> s0-0 display-fbp))
|
||||
; (s3-1 (-> s0-0 display-sy))
|
||||
; )
|
||||
; (let ((s2-0 (* s3-1 2)))
|
||||
; (dma-buffer-add-gs-set s4-5
|
||||
; (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
; (tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9))
|
||||
; )
|
||||
; (cond
|
||||
; ((or (zero? (-> this zoom-blur-texels)) (or (= (-> this zoom-blur-alpha-target) 1.0) (paused?)))
|
||||
; (let ((f0-14 (-> this slow-time))
|
||||
; (f30-0 1.0)
|
||||
; )
|
||||
; (if (!= f0-14 1.0)
|
||||
; (set! f30-0 (lerp 0.05 1.0 f0-14))
|
||||
; )
|
||||
; (set-display-gs-state s4-5 (-> s0-0 display-fbp) 640 s2-0 (shl #xff00 16) 0)
|
||||
; (if (= f30-0 1.0)
|
||||
; (blit-displays-work-method-9 this s4-5 416 s2-0 128)
|
||||
; (blit-displays-work-method-10 this s4-5 416 s2-0 (the int (* 128.0 f30-0)))
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (else
|
||||
; (set-display-gs-state s4-5 38 512 416 (shl #xff00 16) 0)
|
||||
; (dma-buffer-add-gs-set s4-5
|
||||
; (tex0-1 (new 'static 'gs-tex0 :tbw #xa :tw #xa :th #x9 :tbp0 (* (-> s0-0 display-fbp) 32)))
|
||||
; )
|
||||
; (blit-displays-work-method-11 this s4-5 s2-0)
|
||||
; (set-display-gs-state s4-5 s1-0 640 s2-0 (shl #xff00 16) 0)
|
||||
; (dma-buffer-add-gs-set s4-5 (tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9)))
|
||||
; (draw-zoom-blur this s4-5 s2-0)
|
||||
; (dma-buffer-add-gs-set s4-5 (tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9)))
|
||||
; (blit-displays-work-method-9 this s4-5 416 s2-0 (the int (* 128.0 (-> this zoom-blur-alpha-current))))
|
||||
; (when (or (!= (-> *setting-control* user-current letterbox) 0.0)
|
||||
; (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time))
|
||||
; )
|
||||
; (when (and (= (-> *setting-control* user-current aspect-ratio) 'aspect4x3)
|
||||
; (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
; )
|
||||
; (let ((f0-24 (the-as float (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time))
|
||||
; 1.0
|
||||
; (-> *setting-control* user-current letterbox)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (f1-15 (* 0.0024038462 (the float s2-0)))
|
||||
; )
|
||||
; (draw-letterbox this s4-5 f0-24 s2-0 f1-15)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (when (!= (-> *setting-control* user-current scanlines) 0.0)
|
||||
; (let ((v1-213 (the int (* 128.0 (-> *setting-control* user-current scanlines)))))
|
||||
; (set! (-> this line-color)
|
||||
; (logior (logand (-> this line-color) (the-as uint #xffffffff00ffffff)) (shr (shl v1-213 56) 32))
|
||||
; )
|
||||
; (dotimes (a0-120 15)
|
||||
; (set! (-> this scan-colors a0-120 w) v1-213)
|
||||
; )
|
||||
; )
|
||||
; (dma-buffer-add-gs-set s4-5
|
||||
; (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
; (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
; (rgbaq (-> this line-color))
|
||||
; )
|
||||
; (dotimes (v1-219 (/ s3-1 32))
|
||||
; (let ((a0-127 (the-as object (-> s4-5 base))))
|
||||
; (set! (-> (the-as dma-gif-packet a0-127) dma-vif quad) (-> this line-tmpl dma-vif quad))
|
||||
; (set! (-> (the-as dma-gif-packet a0-127) quad 1) (-> this line-tmpl quad 1))
|
||||
; )
|
||||
; (&+! (-> s4-5 base) 32)
|
||||
; (dotimes (a0-130 16)
|
||||
; (let ((a1-115 (the-as object (-> s4-5 base)))
|
||||
; (a2-25 (* (+ (* v1-219 64) (* a0-130 4)) 16))
|
||||
; )
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-115) 0) 0 a2-25 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-115) 1) #x2800 a2-25 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-115) 2) 0 (+ a2-25 16) 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-115) 3) #x2800 (+ a2-25 16) 0 0)
|
||||
; )
|
||||
; (&+! (-> s4-5 base) 64)
|
||||
; )
|
||||
; )
|
||||
; (dma-buffer-add-gs-set s4-5 (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)))
|
||||
; (let ((v1-225 (the-as object (-> s4-5 base))))
|
||||
; (set! (-> (the-as dma-gif-packet v1-225) dma-vif quad) (-> this scan-tmpl dma-vif quad))
|
||||
; (set! (-> (the-as dma-gif-packet v1-225) quad 1) (-> this scan-tmpl quad 1))
|
||||
; )
|
||||
; (&+! (-> s4-5 base) 32)
|
||||
; (let ((a0-142 (* (-> this scanline) 32)))
|
||||
; (dotimes (v1-229 15)
|
||||
; (let ((a1-126 (the-as object (-> s4-5 base))))
|
||||
; (set! (-> (the-as (inline-array vector4w) a1-126) 0 quad) (-> this scan-colors v1-229 quad))
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-126) 1) 0 (the-as int a0-142) 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-126) 2) #x2800 (the-as int a0-142) 0 0)
|
||||
; (let ((a0-143 (+ a0-142 16)))
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-126) 3) 0 (the-as int a0-143) 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a1-126) 4) #x2800 (the-as int a0-143) 0 0)
|
||||
; (set! a0-142 (+ a0-143 16))
|
||||
; )
|
||||
; )
|
||||
; (&+! (-> s4-5 base) 80)
|
||||
; )
|
||||
; )
|
||||
; (if (not (paused?))
|
||||
; (set! (-> this scanline) (the-as uint (mod (the-as int (+ (-> this scanline) 4)) s3-1)))
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (reset-display-gs-state *display* s4-5)
|
||||
; )
|
||||
)
|
||||
(else
|
||||
; (with-dma-buffer-add-bucket ((s4-6 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
; (bucket-id bucket3)
|
||||
; )
|
||||
; (reset-display-gs-state *display* s4-6)
|
||||
; )
|
||||
)
|
||||
)
|
||||
(when (nonzero? (-> this count-down))
|
||||
(+! (-> this count-down) -1)
|
||||
;; og:preserve-this
|
||||
(with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket3)
|
||||
)
|
||||
(dma-buffer-add-cnt-vif2 buf 0 (new 'static 'vif-tag :cmd (vif-cmd pc-port) :imm #x11) ;; kind - do nothing
|
||||
(new 'static 'vif-tag :cmd (vif-cmd pc-port)))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod draw-sky ((this blit-displays-work) (arg0 dma-buffer))
|
||||
(let ((f0-0 (-> this progress-interp))
|
||||
(v1-0 *time-of-day-context*)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(zbuf-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)))
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
;; og:preserve-this
|
||||
; (let ((a3-17 (the-as object (-> arg0 base)))
|
||||
; (t0-0 #x7000)
|
||||
; (t1-0 #x7300)
|
||||
; (a0-4 #x7800)
|
||||
; (a2-6 #x7980)
|
||||
; )
|
||||
; (set! (-> (the-as (inline-array vector4w) a3-17) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
; (set! (-> (the-as (inline-array vector4w) a3-17) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a3-17) 2) 128 128 128 128)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a3-17) 3) 8 8 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a3-17) 4) t0-0 t1-0 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a3-17) 5) 8200 6664 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) a3-17) 6) a0-4 a2-6 0 0)
|
||||
; )
|
||||
; (&+! (-> arg0 base) 112)
|
||||
(let ((t1-3 (the-as object (-> arg0 base)))
|
||||
(a3-19 #x8000)
|
||||
(t0-2 #x8000)
|
||||
(a0-7 #x9000)
|
||||
(a2-7 #x8d00)
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) t1-3) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-3) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 4) a3-19 t0-2 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 5) 8200 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 6) a0-7 a2-7 0 0)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((t1-10 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-10) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-10) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 2) 128 128 128 80)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 4) a3-19 (+ t0-2 -8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 5) 2056 1672 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 6) a0-7 (+ a2-7 -8) 0 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha)))
|
||||
(let ((a0-16 (the int (+ 128.0 (* 32.0 f0-0))))
|
||||
(a2-16 (the int (- 128.0 (* 16.0 f0-0))))
|
||||
(a3-31 (the int (- 128.0 (* 96.0 f0-0))))
|
||||
)
|
||||
(when (or (!= (-> v1-0 filter x) 1.0) (!= (-> v1-0 filter y) 1.0) (!= (-> v1-0 filter z) 1.0))
|
||||
(set! a0-16 128)
|
||||
(set! a2-16 128)
|
||||
(set! a3-31 128)
|
||||
)
|
||||
;; og:preserve-this
|
||||
(let ((v1-57 (* (get-current-game-height *pc-settings*) 16))
|
||||
(a3-16 0)
|
||||
)
|
||||
(let ((t1-22 (the-as (inline-array qword) (-> arg0 base))))
|
||||
(set! (-> t1-22 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> t1-22 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> t1-22 2 vector4w) a0-16 a2-16 a3-31 128)
|
||||
(set-vector! (-> t1-22 3 vector4w) (* 0 16) v1-57 0 0)
|
||||
(set-vector! (-> t1-22 4 vector4w) (* 1792 16) #x7300 0 0)
|
||||
(set-vector! (-> t1-22 5 vector4w) (* (get-current-game-width *pc-settings*) 16) a3-16 0 0)
|
||||
(set-vector! (-> t1-22 6 vector4w) (* 2304 16) #x8d00 0 0)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
)
|
||||
; (let ((v1-5 3328)
|
||||
; (t0-9 6656)
|
||||
; )
|
||||
; (dotimes (t1-11 16)
|
||||
; (let ((t2-22 (the-as object (-> arg0 base)))
|
||||
; (t4-0 (* (+ (* t1-11 32) 1792) 16))
|
||||
; (t3-35 (* (+ (* (+ t1-11 1) 32) 1792) 16))
|
||||
; )
|
||||
; (let ((t6-0 (* (+ (* t1-11 16) 256) 16))
|
||||
; (t5-5 (* (+ (* (+ t1-11 1) 16) 256) 16))
|
||||
; )
|
||||
; (set! (-> (the-as (inline-array vector4w) t2-22) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
; (set! (-> (the-as (inline-array vector4w) t2-22) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) t2-22) 2) a0-16 a2-16 a3-31 128)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) t2-22) 3) t6-0 (+ v1-5 8) 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) t2-22) 4) t4-0 #x72f8 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) t2-22) 5) t5-5 (+ t0-9 8) 0 0)
|
||||
; )
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) t2-22) 6) t3-35 #x8cf8 0 0)
|
||||
; )
|
||||
; (&+! (-> arg0 base) 112)
|
||||
; )
|
||||
; )
|
||||
; (dma-buffer-add-gs-set arg0
|
||||
; (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
; (tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
; (texflush 0)
|
||||
; )
|
||||
; (let ((v1-11 (the-as object (-> arg0 base))))
|
||||
; (set! (-> (the-as (inline-array vector4w) v1-11) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
; (set! (-> (the-as (inline-array vector4w) v1-11) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
; (set-vector!
|
||||
; (-> (the-as (inline-array vector4w) v1-11) 2)
|
||||
; a0-16
|
||||
; a2-16
|
||||
; a3-31
|
||||
; (the int (- 128.0 (* 48.0 f0-0)))
|
||||
; )
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) v1-11) 3) 8 8 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) v1-11) 4) #x7000 #x72f8 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) v1-11) 5) 8200 6664 0 0)
|
||||
; (set-vector! (-> (the-as (inline-array vector4w) v1-11) 6) #x9000 #x8cf8 0 0)
|
||||
; )
|
||||
)
|
||||
)
|
||||
; (&+! (-> arg0 base) 112)
|
||||
(seek! (-> this progress-interp) (-> this progress-interp-dest) (-> this progress-interp-speed))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun draw-color-bars ((arg0 blit-displays-work))
|
||||
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id debug-no-zbuf2)
|
||||
)
|
||||
(let ((v1-5 (the-as object (-> s5-0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-5) dma-vif quad) (-> arg0 adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-5) quad 1) (-> arg0 adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple!
|
||||
(the-as adgif-shader (&+ (the-as dma-gif-packet v1-5) 32))
|
||||
(get-texture colorbars13 programmer)
|
||||
)
|
||||
)
|
||||
(&+! (-> s5-0 base) 112)
|
||||
(let ((v1-8 (the-as object (-> s5-0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 0 quad) (-> arg0 sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 1 quad) (-> arg0 sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 2 quad) (-> arg0 color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 3) 32 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 4) #x7000 #x7300 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 5) 480 256 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 6) #x9000 #x8d00 0 0)
|
||||
)
|
||||
(&+! (-> s5-0 base) 112)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun draw-raw-image ((arg0 blit-displays-work)
|
||||
(arg1 bucket-id)
|
||||
(arg2 art-group)
|
||||
(arg3 vector)
|
||||
(arg4 vector)
|
||||
(arg5 level)
|
||||
(arg6 int)
|
||||
)
|
||||
(local-vars (sv-16 blit-displays-work) (sv-32 int))
|
||||
(set! sv-16 *blit-displays-work*)
|
||||
(with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
arg1
|
||||
)
|
||||
;; og:preserve-this
|
||||
(#when PC_PORT
|
||||
;; draw a black rectangle covering the screen first
|
||||
(draw-sprite2d-xy s1-0 0 0 512 416 (static-rgba 0 0 0 128) #x3fffff)
|
||||
)
|
||||
; (upload-vram-data s1-0 0 (the-as pointer arg2) (the int (-> arg3 y)) (the int (-> arg3 x)))
|
||||
(pc-upload-raw-texture s1-0 (the pointer arg2) (the int (-> arg3 x)) (the int (-> arg3 y)) 0)
|
||||
(set! sv-32 (+ (log2 (+ (the int (-> arg3 x)) -1)) 1))
|
||||
(let ((v1-9 (+ (log2 (+ (the int (-> arg3 y)) -1)) 1)))
|
||||
(dma-buffer-add-gs-set s1-0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tcc #x1 :th v1-9 :tw sv-32 :tbw (/ (the int (-> arg3 x)) 64)))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (the-as object (-> s1-0 base)))
|
||||
(f0-10 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 0 quad) (-> sv-16 sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 1 quad) (-> sv-16 sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 2 quad) (-> sv-16 color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-20) 3) 0 0 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 4)
|
||||
(* (- 2048 (the int (* 256.0 f0-10 (-> arg4 x)))) 16)
|
||||
(* (- 2048 (the int (* 208.0 (-> arg4 y)))) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 5)
|
||||
(* (the int (-> arg3 x)) 16)
|
||||
(* (the int (-> arg3 y)) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 6)
|
||||
(* (+ (the int (* 256.0 f0-10 (-> arg4 x))) 2048) 16)
|
||||
(* (+ (the int (* 208.0 (-> arg4 y))) 2048) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
;; og:preserve-this
|
||||
(#when PC_PORT
|
||||
(when (not (-> *pc-settings* use-vis?))
|
||||
(let ((corrected-width (the int (* (-> *pc-settings* aspect-ratio-reciprocal) #x1000))))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-20) 4) (- #x8000 corrected-width) #x7300 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-20) 6) (+ #x8000 corrected-width) #x8d00 0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! (-> s1-0 base) 112)
|
||||
(set-dirty-mask! arg5 arg6 (* (* (the int (-> arg3 y)) (the int (-> arg3 x))) 4) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
@ -17,6 +17,7 @@
|
||||
;; (def-mips2c clip-polygon-against-negative-hyperplane function)
|
||||
|
||||
(def-mips2c render-sky-quad (function (inline-array sky-vertex) dma-buffer none))
|
||||
|
||||
(def-mips2c render-sky-tri (function (inline-array sky-vertex) dma-buffer none))
|
||||
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
@ -730,7 +731,7 @@
|
||||
(with-dma-buffer-add-bucket ((s5-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id sky)
|
||||
)
|
||||
(blit-displays-work-method-20 *blit-displays-work*)
|
||||
(draw-sky *blit-displays-work* s5-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
@ -139,27 +139,27 @@
|
||||
;; +++bigmap-id
|
||||
(defenum bigmap-id
|
||||
:type uint32
|
||||
(bigmap-id-0 0)
|
||||
(bigmap-id-1 1)
|
||||
(city 0)
|
||||
(comb 1)
|
||||
(desert 2)
|
||||
(factory 3)
|
||||
(forest 4)
|
||||
(mhcity 5)
|
||||
(mine 6)
|
||||
(nest 7)
|
||||
(bigmap-id-8 8)
|
||||
(no-map 9)
|
||||
(precursor 10)
|
||||
(bigmap-id-11 11)
|
||||
(nest2 8)
|
||||
(none 9)
|
||||
(precursor1 10)
|
||||
(precursor2 11)
|
||||
(rubble 12)
|
||||
(sewer0 13)
|
||||
(sewer1 14)
|
||||
(sewer2 15)
|
||||
(sewer-hum-kg 13)
|
||||
(sewer-kg-met 14)
|
||||
(sewer-met-hum 15)
|
||||
(stadium 16)
|
||||
(temple 17)
|
||||
(bigmap-id-18 18)
|
||||
(bigmap-id-19 19)
|
||||
(bigmap-id-20 20)
|
||||
(temple1 17)
|
||||
(temple2 18)
|
||||
(temple3 19)
|
||||
(temple4 20)
|
||||
(tower 21)
|
||||
(volcano 22)
|
||||
(wascity 23)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -127,7 +127,9 @@ NOTE: this is a special type in three ways:
|
||||
(format *file-temp-string* "texture-page~D/dir-tpages" TPAGE_FILE_VERSION)
|
||||
)
|
||||
((= kind (file-kind tpage))
|
||||
(format *file-temp-string* "texture-page~D/tpage-~S" TPAGE_FILE_VERSION name)
|
||||
;; og:preserve-this removed texture-page8 prefix
|
||||
; (format *file-temp-string* "texture-page~D/tpage-~S" TPAGE_FILE_VERSION name)
|
||||
(format *file-temp-string* "tpage-~S" name)
|
||||
)
|
||||
((= kind (file-kind level-bt))
|
||||
(format *file-temp-string* "level~D/~S-bt" LEVEL_BT_FILE_VERSION name)
|
||||
|
@ -847,7 +847,7 @@
|
||||
(f0-4 (evaluate (-> this blur-curve) f0-3 (loop-behavior use-default)))
|
||||
(f0-5 (- 1.0 f0-4))
|
||||
)
|
||||
(blit-displays-work-method-17
|
||||
(setup-zoom-blur-2d
|
||||
*blit-displays-work*
|
||||
(-> this root trans)
|
||||
(the-as int (-> this num-blur-segments))
|
||||
@ -1050,7 +1050,7 @@
|
||||
:exit (behavior ()
|
||||
(when (= (process->handle self) (-> *last-active-nuke* last-active-nuke))
|
||||
(disable *screen-filter*)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
@ -1225,7 +1225,7 @@
|
||||
:exit (behavior ()
|
||||
(when (= (process->handle self) (-> *last-active-nuke* last-active-nuke))
|
||||
(disable *screen-filter*)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
|
@ -1416,7 +1416,7 @@
|
||||
|
||||
(defmethod deactivate ((this gun-red-2-shockwave))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> this origin) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> this origin) 0 1.0 #f)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
@ -1455,7 +1455,7 @@
|
||||
(set! (-> self current-warp-alpha) 1.0)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self origin) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self origin) 0 1.0 #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((f0-1
|
||||
@ -1491,7 +1491,7 @@
|
||||
(let* ((f0-16 (- 1.0 (evaluate *impact-blur* f0-14 (loop-behavior use-default))))
|
||||
(f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength)))))
|
||||
)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f)
|
||||
)
|
||||
)
|
||||
(if (< (-> self current-stage-t) 1.0)
|
||||
@ -1883,7 +1883,7 @@
|
||||
|
||||
(defmethod deactivate ((this gun-red-3-grenade))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(blit-displays-work-method-17 *blit-displays-work* *zero-vector* 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* *zero-vector* 0 1.0 #f)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
@ -1962,7 +1962,7 @@
|
||||
(f0-14 (lerp f0-13 1.0 f30-1))
|
||||
)
|
||||
(set! (-> *display* force-sync) (the-as uint 2))
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f)
|
||||
)
|
||||
)
|
||||
(let ((gp-8 (-> self child)))
|
||||
@ -1976,7 +1976,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 15 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 15 1.0 #f)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
|
@ -2293,8 +2293,9 @@
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
(f30-0 4096.0)
|
||||
)
|
||||
;; og:preserve-this resize effect based on aspect ratio
|
||||
(let ((f0-4 (* 0.00013563369 (tan (* 0.5 (-> *math-camera* fov))) f30-0)))
|
||||
(set-vector! (-> this root scale) f0-4 f0-4 f0-4 1.0)
|
||||
(set-vector! (-> this root scale) (* f0-4 (if (-> *pc-settings* use-vis?) 1.0 (-> *pc-settings* aspect-ratio-scale))) f0-4 f0-4 1.0)
|
||||
)
|
||||
(set! (-> gp-0 quad) (-> (camera-pos) quad))
|
||||
(vector-normalize-copy! s5-0 (-> s3-0 fvec) 1.0)
|
||||
|
@ -5,6 +5,46 @@
|
||||
;; name in dgo: bigmap-h
|
||||
;; dgos: GAME
|
||||
|
||||
;; +++bigmap-flag
|
||||
(defenum bigmap-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(bf00 0)
|
||||
(bf01 1)
|
||||
(bf02 2)
|
||||
(bf03 3)
|
||||
(bf04 4)
|
||||
(bf05 5)
|
||||
(bf06 6)
|
||||
(bf07 7)
|
||||
(bf08 8)
|
||||
(bf09 9)
|
||||
(bf10 10)
|
||||
(bf11 11)
|
||||
(bf12 12)
|
||||
(bf13 13)
|
||||
(bf14 14)
|
||||
(bf15 15)
|
||||
(bf16 16)
|
||||
(bf17 17)
|
||||
(ctywide 18)
|
||||
(waswide 19)
|
||||
(wasall 20)
|
||||
(desert 21)
|
||||
(bf22 22)
|
||||
(bf23 23)
|
||||
(bf24 24)
|
||||
(bf25 25)
|
||||
(bf26 26)
|
||||
(bf27 27)
|
||||
(bf28 28)
|
||||
(bf29 29)
|
||||
(bf30 30)
|
||||
(bf31 31)
|
||||
)
|
||||
;; ---bigmap-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype bigmap-image (structure)
|
||||
@ -33,13 +73,13 @@
|
||||
(deftype bigmap (basic)
|
||||
((drawing-flag symbol)
|
||||
(loading-flag symbol)
|
||||
(bigmap-index uint32)
|
||||
(bigmap-index bigmap-id)
|
||||
(bigmap-image external-art-buffer)
|
||||
(tpage external-art-buffer)
|
||||
(tpage2 basic)
|
||||
(tpage2 external-art-buffer)
|
||||
(progress-minimap texture-page)
|
||||
(progress-minimap2 texture-page)
|
||||
(load-index uint32)
|
||||
(load-index bigmap-id)
|
||||
(x0 int32)
|
||||
(y0 int32)
|
||||
(x1 int32)
|
||||
@ -56,24 +96,24 @@
|
||||
(color vector4w :inline)
|
||||
(corner vector 4 :inline)
|
||||
(auto-save-icon-flag symbol)
|
||||
(global-flags uint32)
|
||||
(global-flags bigmap-flag)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(bigmap-method-9 () none)
|
||||
(initialize (_type_) none)
|
||||
(update (_type_) none)
|
||||
(bigmap-method-11 (_type_) symbol)
|
||||
(bigmap-method-12 () none)
|
||||
(bigmap-method-13 () none)
|
||||
(loaded? (_type_) symbol)
|
||||
(draw! (_type_ int int int int) none)
|
||||
(handle-cpad-input (_type_) none)
|
||||
(enable-drawing (_type_) none)
|
||||
(disable-drawing (_type_) int)
|
||||
(bigmap-method-16 (_type_) none)
|
||||
(bigmap-method-17 () none)
|
||||
(bigmap-method-18 () none)
|
||||
(bigmap-method-19 () none)
|
||||
(bigmap-method-20 () none)
|
||||
(bigmap-method-21 () none)
|
||||
(bigmap-method-22 () none)
|
||||
(set-map-indices! (_type_) none)
|
||||
(set-pos! (_type_ vector) none)
|
||||
(bigmap-method-18 (_type_ (pointer int32)) none)
|
||||
(texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none)
|
||||
(bigmap-method-20 (_type_ dma-buffer) symbol)
|
||||
(sprite-dma (_type_ dma-buffer int int int int int int) object)
|
||||
(draw-from-minimap (_type_ dma-buffer connection-minimap) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -7,9 +7,944 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(kmemopen global "bigmap")
|
||||
(defmethod new bigmap ((allocation symbol) (type-to-make type))
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> gp-0 bigmap-image)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -591936 (-> *display* frames 0 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x90800))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tpage)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -597056 (-> *display* frames 1 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x54000))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tpage2)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -941120 (-> *display* frames 1 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x54000))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 sprite-tmpl gif0) (the-as uint #x50ab400000008001))
|
||||
(set! (-> gp-0 sprite-tmpl gif1) (the-as uint #x53531))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 draw-tmpl gif0) (the-as uint #x90aa400000008001))
|
||||
(set! (-> gp-0 draw-tmpl gif1) (the-as uint #x535353531))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 adgif-tmpl gif0) (the-as uint #x1000000000008005))
|
||||
(set! (-> gp-0 adgif-tmpl gif1) (the-as uint 14))
|
||||
(set-vector! (-> gp-0 offset) 0.0 0.0 0.0 0.0)
|
||||
(set-vector! (-> gp-0 scroll) 0.0 0.0 0.0 0.0)
|
||||
(set-vector! (-> gp-0 pos) 0 0 0 0)
|
||||
(set-vector! (-> gp-0 color) 128 128 128 128)
|
||||
(set! (-> gp-0 drawing-flag) #f)
|
||||
(set! (-> gp-0 loading-flag) #f)
|
||||
(set! (-> gp-0 progress-minimap) #f)
|
||||
(set! (-> gp-0 progress-minimap2) #f)
|
||||
(set! (-> gp-0 auto-save-icon-flag) #f)
|
||||
(initialize gp-0)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
(define *bigmap-info-array*
|
||||
(new 'static 'bigmap-info-array
|
||||
:data (new 'static 'inline-array bigmap-info 24
|
||||
(new 'static 'bigmap-info :x -2621440.0 :y -4456448.0 :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -2621440.0 :y -4456448.0 :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -2038169.6 :y -2301542.5 :z 27443.2 :w 0.0000364389)
|
||||
(new 'static 'bigmap-info :x -354713.6 :y -1128448.0 :z 4505.6 :w 0.00022194601)
|
||||
(new 'static 'bigmap-info :x -4205363.0 :y 3437363.2 :z 4628.48 :w 0.00021605365)
|
||||
(new 'static 'bigmap-info :x -3381657.5 :y 2019737.6 :z 7618.56 :w 0.0001312584)
|
||||
(new 'static 'bigmap-info :x -1399193.6 :y -1023590.4 :z 5406.72 :w 0.00018495502)
|
||||
(new 'static 'bigmap-info :x 2215526.5 :y 615055.4 :z 10444.8 :w 0.00009574142)
|
||||
(new 'static 'bigmap-info :x 2215526.5 :y 615055.4 :z 10444.8 :w 0.00009574142)
|
||||
(new 'static 'bigmap-info :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -1481932.8 :y -918323.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x -1481932.8 :y -918323.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x -2614886.5 :y -1766195.2 :z 9052.16 :w 0.00011047087)
|
||||
(new 'static 'bigmap-info :x -2530508.8 :y -1041203.2 :z 5591.04 :w 0.0001788576)
|
||||
(new 'static 'bigmap-info :x -2374451.2 :y -4505.6 :z 4628.48 :w 0.00021605365)
|
||||
(new 'static 'bigmap-info :x -2712780.8 :y -2477260.8 :z 6471.68 :w 0.00015451938)
|
||||
(new 'static 'bigmap-info :x -1218560.0 :y -3392307.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x 16039117.0 :y 16509747.0 :z 3317.76 :w 0.00030140817)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x -1716224.0 :y 1286144.0 :z 3604.48 :w 0.00027743253)
|
||||
(new 'static 'bigmap-info :x -1316864.0 :y -2084126.8 :z 4014.08 :w 0.00024912308)
|
||||
(new 'static 'bigmap-info :x 5619712.0 :y -2914304.0 :z 9830.4 :w 0.00010172526)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod set-pos! ((this bigmap) (arg0 vector))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.lvf vf2 (&-> this offset quad))
|
||||
(.add.z.vf vf1 vf0 vf1 :mask #b10)
|
||||
(.sub.vf vf1 vf1 vf2)
|
||||
(.mul.w.vf vf1 vf1 vf2)
|
||||
(.ftoi.vf vf1 vf1)
|
||||
(.svf (&-> this pos quad) vf1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod bigmap-method-18 ((this bigmap) (arg0 (pointer int32)))
|
||||
(when (or (= (-> this load-index) (bigmap-id sewer-met-hum)) (= (-> this load-index) (bigmap-id sewer-hum-kg)))
|
||||
(let ((v1-4 (-> arg0 0)))
|
||||
(set! (-> arg0 0) (-> arg0 1))
|
||||
(set! (-> arg0 1) (- 832 v1-4))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; og:preserve-this
|
||||
(define-perm *bigmap* bigmap #f)
|
||||
(defun pc-upload-map-texture ((dma-buf dma-buffer) (image-data pointer) (clut-data pointer) (width int) (height int) (tbp int) (cbp int))
|
||||
"Added function in the PC port to create a map texture. The format should be mt8 for the image and ct32 for the clut (16 x 16)"
|
||||
(pc-texture-anim-flag start-anim-array dma-buf)
|
||||
(pc-texture-anim-flag upload-clut-16-16 dma-buf :qwc 1)
|
||||
(let ((upload-record (the texture-anim-pc-upload (-> dma-buf base))))
|
||||
(set! (-> upload-record data) clut-data)
|
||||
(set! (-> upload-record width) 16)
|
||||
(set! (-> upload-record height) 16)
|
||||
(set! (-> upload-record dest) cbp)
|
||||
(set! (-> upload-record format) (gs-psm ct32))
|
||||
(set! (-> upload-record force-to-gpu) 0)
|
||||
)
|
||||
(&+! (-> dma-buf base) 16)
|
||||
|
||||
(kmemclose)
|
||||
(pc-texture-anim-flag upload-generic-vram dma-buf :qwc 1)
|
||||
(let ((upload-record (the texture-anim-pc-upload (-> dma-buf base))))
|
||||
(set! (-> upload-record data) image-data)
|
||||
(set! (-> upload-record width) width)
|
||||
(set! (-> upload-record height) height)
|
||||
(set! (-> upload-record dest) tbp)
|
||||
(set! (-> upload-record format) (gs-psm mt8))
|
||||
(set! (-> upload-record force-to-gpu) 1)
|
||||
)
|
||||
(&+! (-> dma-buf base) 16)
|
||||
(pc-texture-anim-flag finish-anim-array dma-buf)
|
||||
)
|
||||
|
||||
(defmethod texture-upload-dma ((this bigmap) (arg0 dma-buffer) (arg1 (pointer uint32)) (arg2 int) (arg3 int) (arg4 int) (arg5 gs-psm))
|
||||
(local-vars (sv-16 int))
|
||||
(set! sv-16 arg2)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(bitbltbuf (new 'static 'gs-bitbltbuf :dpsm (the-as int arg5) :dbp sv-16 :dbw (/ arg3 64)))
|
||||
(trxpos (new 'static 'gs-trxpos))
|
||||
(trxreg (new 'static 'gs-trxreg :rrw arg3 :rrh arg4))
|
||||
(trxdir (new 'static 'gs-trxdir))
|
||||
)
|
||||
(dma-buffer-add-ref-texture arg0 arg1 arg3 arg4 arg5)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs object.
|
||||
(defmethod sprite-dma ((this bigmap) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 int) (arg6 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(let ((t5-0 0)
|
||||
(t4-2 (the int (* 416.0 (-> *video-params* relative-x-scale))))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) (* arg5 16) (* t5-0 16) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) (* arg1 16) (* arg3 16) #xfffff0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) (* arg6 16) (* t4-2 16) 0 0)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) (* arg2 16) (* arg4 16) #xfffff0 0)
|
||||
)
|
||||
(let ((v0-0 (&+ (-> arg0 base) 112)))
|
||||
(set! (-> arg0 base) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod bigmap-method-20 ((this bigmap) (arg0 dma-buffer))
|
||||
(local-vars (sv-16 uint))
|
||||
(let* ((s4-0 (the-as (pointer uint32) (-> this bigmap-image art-group)))
|
||||
(f0-1 (* 0.001953125 (the float (- (-> this x1) (-> this x0)))))
|
||||
(s3-0 (the int (* 256.0 f0-1)))
|
||||
(v1-5 (the int (-> this scroll x)))
|
||||
(a0-2 (-> this x0))
|
||||
(f1-7 (-> this scroll x))
|
||||
(s2-0 (- a0-2 (the int (* (- f1-7 (* (the float (the int (/ f1-7 256.0))) 256.0)) f0-1))))
|
||||
(s1-0 (/ v1-5 256))
|
||||
(s0-0 (/ (+ v1-5 511) 256))
|
||||
)
|
||||
(-> s4-0 2)
|
||||
(set! sv-16 (* (-> s4-0 3) 256))
|
||||
(while (>= s0-0 s1-0)
|
||||
;; og:preserve-this
|
||||
; (texture-upload-dma this arg0 (+ (+ (-> s4-0 0) 16) (the-as uint s4-0)) 0 16 16 (gs-psm ct32))
|
||||
; (dma-buffer-add-gs-set arg0 (texflush 0))
|
||||
(let ((v1-18 (+ (-> s4-0 1) (* (the-as uint s1-0) sv-16) (* (the int (-> this scroll y)) 256))))
|
||||
; (texture-upload-dma this arg0 (+ (+ v1-18 16) (the-as uint s4-0)) 8 256 416 (gs-psm mt8))
|
||||
(pc-upload-map-texture arg0 (&+ s4-0 v1-18 16) (&+ s4-0 (-> s4-0 0) 16) 256 416 8 0)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x8 :tbw #x4 :psm #x13 :tw #x8 :th #x9 :cld #x1))
|
||||
;; og:preserve-this added mmag and mmin for texture filtering
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(texflush 0)
|
||||
)
|
||||
(sprite-dma this arg0 (+ s2-0 1792) (+ s3-0 1792 s2-0) (-> this y0) (-> this y1) 0 256)
|
||||
(+! s2-0 s3-0)
|
||||
(+! s1-0 1)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defmethod draw-from-minimap ((this bigmap) (arg0 dma-buffer) (arg1 connection-minimap))
|
||||
(local-vars (sv-80 vector4w))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((= (-> arg1 position) #t)
|
||||
(let* ((s3-0 (handle->process (-> arg1 handle)))
|
||||
(v1-4 (if (type? s3-0 process-drawable)
|
||||
(the-as process-drawable s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and v1-4 (nonzero? (-> v1-4 root)))
|
||||
(set! (-> arg1 last-world-pos quad) (-> v1-4 root trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (logand (the-as int (-> arg1 position)) 7) 4)
|
||||
(= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor)
|
||||
)
|
||||
(let* ((v1-14 (the-as entity-actor (-> arg1 position)))
|
||||
(s3-1 (if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
)
|
||||
(a0-13 (if (type? s3-1 process-drawable)
|
||||
(the-as process-drawable s3-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-13
|
||||
(set! (-> arg1 last-world-pos quad) (-> a0-13 root trans quad))
|
||||
(set! (-> arg1 last-world-pos quad) (-> (the-as entity-actor (-> arg1 position)) extra trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg1 last-world-pos quad) (-> arg1 position quad))
|
||||
)
|
||||
)
|
||||
(let ((f30-0 (-> arg1 class scale))
|
||||
(s1-0 (-> arg1 class color))
|
||||
)
|
||||
(set! sv-80 (new 'stack-no-clear 'vector4w))
|
||||
(let ((s0-0 (new-stack-vector0))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(s3-2 (new-stack-vector0))
|
||||
)
|
||||
(let ((f26-0 (-> *video-params* relative-x-scale))
|
||||
(f28-0 (-> *video-params* relative-x-scale-reciprical))
|
||||
)
|
||||
(-> arg1 class)
|
||||
(.lvf vf1 (&-> arg1 last-world-pos quad))
|
||||
(.lvf vf2 (&-> this offset quad))
|
||||
(.add.z.vf vf1 vf0 vf1 :mask #b10)
|
||||
(.sub.vf vf1 vf1 vf2)
|
||||
(.mul.w.vf vf1 vf1 vf2)
|
||||
(.ftoi.vf vf1 vf1)
|
||||
(.svf (&-> sv-80 quad) vf1)
|
||||
(if (logtest? (-> arg1 class flags) (minimap-flag goal))
|
||||
(set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6)))
|
||||
)
|
||||
(bigmap-method-18 this (the-as (pointer int32) sv-80))
|
||||
(cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! f26-0 (- f26-0))
|
||||
(set! (-> s0-0 x) (+ (the float (+ (- 2304 (-> sv-80 x)) (-> this x1))) (-> this scroll x)))
|
||||
)
|
||||
(else
|
||||
(set! (-> s0-0 x) (- (the float (+ (-> sv-80 x) 1792 (-> this x0))) (-> this scroll x)))
|
||||
)
|
||||
)
|
||||
(set! (-> s0-0 y) (+ 1840.0 (* (- (the float (-> sv-80 y)) (-> this scroll y)) f28-0)))
|
||||
(let ((f0-12 (* 20.0 f26-0 f30-0))
|
||||
(f1-8 (* 20.0 f28-0 f30-0))
|
||||
)
|
||||
(set! (-> s2-0 x) (the float (the int (- (-> s0-0 x) (* 0.5 f0-12)))))
|
||||
(set! (-> s2-0 y) (the float (the int (- (-> s0-0 y) (* 0.5 f1-8)))))
|
||||
(set! (-> s3-2 x) (+ (-> s2-0 x) f0-12))
|
||||
(set! (-> s3-2 y) (+ (-> s2-0 y) f1-8))
|
||||
)
|
||||
)
|
||||
;; og:preserve-this cast
|
||||
(let* ((a2-1 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8)))
|
||||
(a3-0 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8)))
|
||||
;; og:preserve-this fix icon misalignment
|
||||
(v1-55 (+ a2-1 300))
|
||||
(a0-35 (+ a3-0 300))
|
||||
(a1-6 (the-as object (-> arg0 base)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) a1-6) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) a1-6) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 2)
|
||||
(the-as int (-> s1-0 r))
|
||||
(the-as int (-> s1-0 g))
|
||||
(the-as int (-> s1-0 b))
|
||||
128
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-6) 3) a2-1 a3-0 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 4)
|
||||
(the int (* 16.0 (-> s2-0 x)))
|
||||
(the int (* 16.0 (-> s2-0 y)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-6) 5) v1-55 a0-35 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 6)
|
||||
(the int (* 16.0 (-> s3-2 x)))
|
||||
(the int (* 16.0 (-> s3-2 y)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod initialize ((this bigmap))
|
||||
(set! (-> this bigmap-index) (bigmap-id city))
|
||||
(set-pending-file (-> this bigmap-image) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update ((this bigmap))
|
||||
(when (-> this drawing-flag)
|
||||
(update! *minimap*)
|
||||
(cond
|
||||
((= (-> *blit-displays-work* count-down) 1)
|
||||
(set-pending-file
|
||||
(-> this bigmap-image)
|
||||
"world-map"
|
||||
(the-as int (-> this load-index))
|
||||
(process->handle *dproc*)
|
||||
0.0
|
||||
)
|
||||
(set-pending-file (-> this tpage) "progress-minimap" 0 (process->handle *dproc*) 0.0)
|
||||
(set-pending-file (-> this tpage2) "progress-minimap" 1 (process->handle *dproc*) 0.0)
|
||||
(set! (-> this loading-flag) #t)
|
||||
)
|
||||
(else
|
||||
(update (-> this bigmap-image))
|
||||
(update (-> this tpage))
|
||||
(update (-> this tpage2))
|
||||
(when (and (-> this loading-flag)
|
||||
(= (file-status (-> this bigmap-image) "world-map" (the-as int (-> this load-index))) 'active)
|
||||
(= (file-status (-> this tpage) "progress-minimap" 0) 'active)
|
||||
(= (file-status (-> this tpage2) "progress-minimap" 1) 'active)
|
||||
(not (load-in-progress? *level*))
|
||||
)
|
||||
(let ((s5-0 (-> *level* loading-level))
|
||||
(s4-0 (-> *texture-pool* allocate-func))
|
||||
(s3-0 (-> *texture-relocate-later* memcpy))
|
||||
(s2-0 loading-level)
|
||||
)
|
||||
(set! (-> *texture-pool* allocate-func) texture-page-common-boot-allocate)
|
||||
(set! (-> *level* loading-level) #f)
|
||||
(set! (-> *texture-relocate-later* memcpy) #f)
|
||||
(set! loading-level (-> this tpage heap))
|
||||
(set! (-> this progress-minimap)
|
||||
(the-as
|
||||
texture-page
|
||||
(link (-> this tpage buf) (-> this tpage load-file data) (-> this tpage len) (-> this tpage heap) 4)
|
||||
)
|
||||
)
|
||||
(set! (-> this progress-minimap2)
|
||||
(the-as
|
||||
texture-page
|
||||
(link (-> this tpage2 buf) (-> this tpage2 load-file data) (-> this tpage2 len) (-> this tpage2 heap) 4)
|
||||
)
|
||||
)
|
||||
(set! (-> *level* loading-level) s5-0)
|
||||
(set! (-> *texture-pool* allocate-func) s4-0)
|
||||
(set! (-> *texture-relocate-later* memcpy) s3-0)
|
||||
(set! loading-level s2-0)
|
||||
)
|
||||
(set! (-> this loading-flag) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch texture-page vs symbol.
|
||||
(defmethod loaded? ((this bigmap))
|
||||
(the-as symbol (and (-> *bigmap* progress-minimap) (-> *bigmap* progress-minimap2)))
|
||||
)
|
||||
|
||||
(defmethod draw! ((this bigmap) (arg0 int) (arg1 int) (arg2 int) (arg3 int))
|
||||
(local-vars
|
||||
(sv-96 (inline-array vector4w))
|
||||
(sv-100 texture)
|
||||
(sv-104 matrix)
|
||||
(sv-112 int)
|
||||
(sv-120 float)
|
||||
(sv-240 (function bigmap vector none))
|
||||
)
|
||||
(when (and (= (file-status (-> this bigmap-image) "world-map" (the-as int (-> this load-index))) 'active)
|
||||
(not (-> this loading-flag))
|
||||
)
|
||||
(with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id tex-hud-hud-alpha)
|
||||
)
|
||||
(dma-buffer-add-gs-set s2-0
|
||||
(scissor-1 (new 'static 'gs-scissor
|
||||
:scax0 (+ arg0 -1792)
|
||||
:scay0 (+ arg1 -1840)
|
||||
:scax1 (+ arg2 -1792)
|
||||
:scay1 (+ arg3 -1840)
|
||||
)
|
||||
)
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
)
|
||||
(let ((v1-14 (the-as object (-> this bigmap-image art-group)))
|
||||
(f0-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(set! (-> this scroll x)
|
||||
(fmax 0.0 (fmin (-> this scroll x) (the float (+ (-> (the-as (pointer uint32) v1-14) 2) -513))))
|
||||
)
|
||||
(set! (-> this scroll y)
|
||||
(fmax
|
||||
0.0
|
||||
(fmin (-> this scroll y) (+ (- -1.0 (* 416.0 f0-0)) (the float (-> (the-as (pointer uint32) v1-14) 3))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! (-> this x0) (+ arg2 -1792))
|
||||
(set! (-> this x1) (+ arg0 -1792))
|
||||
)
|
||||
(else
|
||||
(set! (-> this x0) (+ arg0 -1792))
|
||||
(set! (-> this x1) (+ arg2 -1792))
|
||||
)
|
||||
)
|
||||
(set! (-> this y0) arg1)
|
||||
(set! (-> this y1) arg3)
|
||||
(bigmap-method-20 this s2-0)
|
||||
(when (!= (-> this load-index) (bigmap-id none))
|
||||
(when (= (-> this y0) 1840)
|
||||
(let ((s0-1 (-> s2-0 base))
|
||||
(s1-1 (lookup-texture-by-id-fast (new 'static 'texture-id :index #x4 :page #x11)))
|
||||
)
|
||||
(when s1-1
|
||||
(set! (-> (the-as (pointer uint128) s0-1) 0) (-> this adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (pointer uint128) s0-1) 1) (-> this adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple! (the-as adgif-shader (&+ s0-1 32)) s1-1)
|
||||
(&+! (-> s2-0 base) 112)
|
||||
)
|
||||
(if (not s1-1)
|
||||
(format 0 "ERROR: bigmap: mini-map-icons texture is #f~%")
|
||||
)
|
||||
)
|
||||
(let ((s1-2 (-> *minimap* engine alive-list)))
|
||||
(while s1-2
|
||||
(let ((a2-11 s1-2))
|
||||
(when (logtest? (-> a2-11 class flags) (minimap-flag bigmap bigmap-only))
|
||||
(if (not (and (logtest? (minimap-flag local-only) (-> a2-11 class flags))
|
||||
(not (logtest? (the-as minimap-flag (logand (bigmap-flag ctywide waswide wasall desert) (-> this global-flags)))
|
||||
(-> a2-11 class flags)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(draw-from-minimap this s2-0 a2-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s1-2 (-> s1-2 next))
|
||||
)
|
||||
)
|
||||
(let ((s1-3 (new 'stack-no-clear 'vector))
|
||||
(f30-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(vector-z-quaternion! s1-3 (-> *target* control quat))
|
||||
(vector-xz-normalize! s1-3 -1.0)
|
||||
(set! (-> s1-3 y) 0.0)
|
||||
(set! (-> s1-3 w) 0.0)
|
||||
(set! sv-96 (the-as (inline-array vector4w) (-> s2-0 base)))
|
||||
(set! sv-100 (lookup-texture-by-id-fast (new 'static 'texture-id :index #x1 :page #x11)))
|
||||
(set! sv-104 (new 'stack-no-clear 'matrix))
|
||||
(set! sv-112 (the int (* 56.0 f30-0)))
|
||||
(set! sv-120 (-> *video-params* relative-x-scale-reciprical))
|
||||
(when sv-100
|
||||
(let ((s0-2 this))
|
||||
(set! sv-240 (method-of-object s0-2 set-pos!))
|
||||
(let ((a1-29 (target-pos 0)))
|
||||
(sv-240 s0-2 a1-29)
|
||||
)
|
||||
)
|
||||
(let ((s0-3 (new 'stack 'vector4w)))
|
||||
0.0
|
||||
(set! (-> s0-3 quad) (-> this pos quad))
|
||||
(bigmap-method-18 this (the-as (pointer int32) s0-3))
|
||||
(let ((f0-15 (cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! f30-0 (- f30-0))
|
||||
(+ (the float (+ (- 2304 (-> s0-3 x)) (-> this x1))) (-> this scroll x))
|
||||
)
|
||||
(else
|
||||
(- (the float (+ (-> s0-3 x) 1792 (-> this x0))) (-> this scroll x))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-vector! (-> sv-104 rvec) (* (-> s1-3 z) f30-0) 0.0 (- (-> s1-3 x)) 0.0)
|
||||
(set-vector! (-> sv-104 uvec) 0.0 1.0 0.0 0.0)
|
||||
(set-vector! (-> sv-104 fvec) (* (-> s1-3 x) f30-0) 0.0 (-> s1-3 z) 1.0)
|
||||
(set-vector!
|
||||
(-> sv-104 trans)
|
||||
f0-15
|
||||
0.0
|
||||
(+ 1840.0 (* (- (the float (-> s0-3 y)) (-> this scroll y)) sv-120))
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-83 (mod (-> *display* real-clock frame-counter) 360))
|
||||
(f0-26 (+ 1.5 (* 0.25 (cos (* 182.04445 (the float v1-83))))))
|
||||
(f0-27 (* 7.0 f0-26))
|
||||
)
|
||||
(cond
|
||||
((or (= (-> this load-index) (bigmap-id sewer-met-hum)) (= (-> this load-index) (bigmap-id sewer-hum-kg)))
|
||||
(set-vector! (-> this corner 0) (- f0-27) 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 1) 0.0 0.0 f0-27 1.0)
|
||||
(set-vector! (-> this corner 2) 0.0 0.0 (- f0-27) 1.0)
|
||||
(set-vector! (-> this corner 3) f0-27 0.0 0.0 1.0)
|
||||
)
|
||||
(else
|
||||
(set-vector! (-> this corner 0) 0.0 0.0 (- f0-27) 1.0)
|
||||
(set-vector! (-> this corner 1) f0-27 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 2) (- f0-27) 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 3) 0.0 0.0 f0-27 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-matrix*! (the-as vector (-> this corner)) (the-as vector (-> this corner)) sv-104)
|
||||
(vector-matrix*! (-> this corner 1) (-> this corner 1) sv-104)
|
||||
(vector-matrix*! (-> this corner 2) (-> this corner 2) sv-104)
|
||||
(vector-matrix*! (-> this corner 3) (-> this corner 3) sv-104)
|
||||
(let ((v1-97 (-> this adgif-tmpl dma-vif quad)))
|
||||
(set! (-> sv-96 0 quad) v1-97)
|
||||
)
|
||||
(let ((v1-98 (-> this adgif-tmpl quad 1)))
|
||||
(set! (-> sv-96 1 quad) v1-98)
|
||||
)
|
||||
(adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-96 2)) sv-100)
|
||||
(let ((v1-100 (-> this draw-tmpl dma-vif quad)))
|
||||
(set! (-> sv-96 7 quad) v1-100)
|
||||
)
|
||||
(let ((v1-101 (-> this draw-tmpl quad 1)))
|
||||
(set! (-> sv-96 8 quad) v1-101)
|
||||
)
|
||||
(set-vector! (-> sv-96 9) 0 255 255 128)
|
||||
(set-vector! (-> sv-96 10) 0 0 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 11)
|
||||
(the int (* 16.0 (-> this corner 0 x)))
|
||||
(the int (* 16.0 (-> this corner 0 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 12) 256 0 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 13)
|
||||
(the int (* 16.0 (-> this corner 1 x)))
|
||||
(the int (* 16.0 (-> this corner 1 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 14) 0 256 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 15)
|
||||
(the int (* 16.0 (-> this corner 2 x)))
|
||||
(the int (* 16.0 (-> this corner 2 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 16) 256 256 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 17)
|
||||
(the int (* 16.0 (-> this corner 3 x)))
|
||||
(the int (* 16.0 (-> this corner 3 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(&+! (-> s2-0 base) 288)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set s2-0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1ff :scay1 #x19f)))
|
||||
)
|
||||
(when (= (-> this load-index) (bigmap-id none))
|
||||
(let ((s3-1
|
||||
(new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((f30-2 (* 0.0024038462 (the float (- arg3 arg1)))))
|
||||
(let ((v1-138 s3-1))
|
||||
(set! (-> v1-138 scale) f30-2)
|
||||
)
|
||||
(let ((v1-139 s3-1))
|
||||
(set! (-> v1-139 width) (the float (the int (* 400.0 f30-2))))
|
||||
)
|
||||
(let ((a0-100 s3-1))
|
||||
(set! (-> a0-100 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((s5-1 print-game-text))
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id map-data-unavailable) #f))
|
||||
(let* ((f0-63 (s5-1 *temp-string* s3-1 #t 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(v1-142 s3-1)
|
||||
(a0-106 (- 256 (the int (* 200.0 f30-2))))
|
||||
(a1-52 (- 208 (the int (* 0.5 f0-63))))
|
||||
)
|
||||
(set! (-> v1-142 origin x) (the float a0-106))
|
||||
(set! (-> v1-142 origin y) (the float a1-52))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id map-data-unavailable) #f))
|
||||
(s5-2 *temp-string* s3-1 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> this goal-time) (* 16.0 (seconds-per-frame)))
|
||||
(set-dirty-mask! (-> *level* level-default) 4 #x1a400 0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod handle-cpad-input ((this bigmap))
|
||||
(let ((v1-1 (-> this bigmap-image art-group))
|
||||
(s5-0 (-> *cpad-list* cpads 0))
|
||||
)
|
||||
(when v1-1
|
||||
(let ((f30-0 (analog-input (the-as int (-> s5-0 leftx)) 128.0 32.0 110.0 4.0))
|
||||
(f0-0 (analog-input (the-as int (-> s5-0 lefty)) 128.0 32.0 110.0 4.0))
|
||||
)
|
||||
(+! (-> this scroll x) f30-0)
|
||||
(+! (-> this scroll y) f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod set-map-indices! ((this bigmap))
|
||||
(let ((s5-0 (level-get-target-inside *level*)))
|
||||
(let ((v1-2 (-> *setting-control* user-current bigmap-level)))
|
||||
(cond
|
||||
(v1-2
|
||||
(cond
|
||||
((= v1-2 'city)
|
||||
(set! (-> this bigmap-index) (bigmap-id city))
|
||||
0
|
||||
)
|
||||
((= v1-2 'comb)
|
||||
(set! (-> this bigmap-index) (bigmap-id comb))
|
||||
)
|
||||
((= v1-2 'desert)
|
||||
(set! (-> this bigmap-index) (bigmap-id desert))
|
||||
)
|
||||
((= v1-2 'factory)
|
||||
(set! (-> this bigmap-index) (bigmap-id factory))
|
||||
)
|
||||
((= v1-2 'forest)
|
||||
(set! (-> this bigmap-index) (bigmap-id forest))
|
||||
)
|
||||
((= v1-2 'metalhead-city)
|
||||
(set! (-> this bigmap-index) (bigmap-id mhcity))
|
||||
)
|
||||
((= v1-2 'mine)
|
||||
(set! (-> this bigmap-index) (bigmap-id mine))
|
||||
)
|
||||
((= v1-2 'nest)
|
||||
(set! (-> this bigmap-index) (bigmap-id nest))
|
||||
)
|
||||
((= v1-2 'nest2)
|
||||
(set! (-> this bigmap-index) (bigmap-id nest2))
|
||||
)
|
||||
((= v1-2 'none)
|
||||
(set! (-> this bigmap-index) (bigmap-id none))
|
||||
)
|
||||
((= v1-2 'precursor1)
|
||||
(set! (-> this bigmap-index) (bigmap-id precursor1))
|
||||
)
|
||||
((= v1-2 'precursor2)
|
||||
(set! (-> this bigmap-index) (bigmap-id precursor2))
|
||||
)
|
||||
((= v1-2 'rubble)
|
||||
(set! (-> this bigmap-index) (bigmap-id rubble))
|
||||
)
|
||||
((= v1-2 'sewer-hum-kg)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-hum-kg))
|
||||
)
|
||||
((= v1-2 'sewer-kg-met)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-kg-met))
|
||||
)
|
||||
((= v1-2 'sewer-met-hum)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-met-hum))
|
||||
)
|
||||
((= v1-2 'stadium)
|
||||
(set! (-> this bigmap-index) (bigmap-id stadium))
|
||||
)
|
||||
((= v1-2 'temple1)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple1))
|
||||
)
|
||||
((= v1-2 'temple2)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple2))
|
||||
)
|
||||
((= v1-2 'temple3)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple3))
|
||||
)
|
||||
((= v1-2 'temple4)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple4))
|
||||
)
|
||||
((= v1-2 'tower)
|
||||
(set! (-> this bigmap-index) (bigmap-id tower))
|
||||
)
|
||||
((= v1-2 'volcano)
|
||||
(set! (-> this bigmap-index) (bigmap-id volcano))
|
||||
)
|
||||
((= v1-2 'wascity)
|
||||
(set! (-> this bigmap-index) (bigmap-id wascity))
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-0
|
||||
(set! (-> this bigmap-index) (-> s5-0 info bigmap-id))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)
|
||||
(not (or (= (-> s5-0 name) 'mhcitya) (= (-> s5-0 name) 'mhcityb)))
|
||||
)
|
||||
(set! (-> this bigmap-index) (-> ctyport bigmap-id))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> this bigmap-index) (bigmap-id temple1))
|
||||
(cond
|
||||
((task-node-closed? (game-task-node factory-boss-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple4))
|
||||
)
|
||||
((task-node-closed? (game-task-node desert-oasis-defense-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple3))
|
||||
)
|
||||
((task-node-closed? (game-task-node volcano-darkeco-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple2))
|
||||
)
|
||||
(else
|
||||
(set! (-> this load-index) (bigmap-id temple1))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> this bigmap-index) (bigmap-id precursor1))
|
||||
(if (task-node-closed? (game-task-node comb-wild-ride-resolution))
|
||||
(set! (-> this load-index) (bigmap-id precursor2))
|
||||
(set! (-> this load-index) (bigmap-id precursor1))
|
||||
)
|
||||
)
|
||||
((= (-> this bigmap-index) (bigmap-id nest))
|
||||
(if (task-node-closed? (game-task-node nest-eggs-gas))
|
||||
(set! (-> this load-index) (bigmap-id nest2))
|
||||
(set! (-> this load-index) (bigmap-id nest))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this load-index) (-> this bigmap-index))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch bigmap-flag vs none.
|
||||
(defmethod enable-drawing ((this bigmap))
|
||||
(set-map-indices! this)
|
||||
(set! (-> this offset quad) (-> *bigmap-info-array* data (-> this load-index) quad))
|
||||
(let ((s4-0 (target-pos 0))
|
||||
(s5-0 (-> this offset))
|
||||
)
|
||||
(cond
|
||||
((= (-> this load-index) (bigmap-id sewer-hum-kg))
|
||||
(let ((a0-10 (level-get *level* 'sewa)))
|
||||
(if a0-10
|
||||
(set! (-> a0-10 info bigmap-id) (bigmap-id sewer-hum-kg))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 y) (-> s5-0 y)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (- 624.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
)
|
||||
((= (-> this load-index) (bigmap-id sewer-kg-met))
|
||||
(let ((a0-14 (level-get *level* 'sewa)))
|
||||
(if a0-14
|
||||
(set! (-> a0-14 info bigmap-id) (bigmap-id sewer-kg-met))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (+ -208.0 (* (- (-> s4-0 z) (-> s5-0 y)) (-> s5-0 w))))
|
||||
)
|
||||
((= (-> this load-index) (bigmap-id sewer-met-hum))
|
||||
(let ((a0-18 (level-get *level* 'sewa)))
|
||||
(if a0-18
|
||||
(set! (-> a0-18 info bigmap-id) (bigmap-id sewer-met-hum))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 y) (-> s5-0 y)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (- 624.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
)
|
||||
(else
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (+ -208.0 (* (- (-> s4-0 z) (-> s5-0 y)) (-> s5-0 w))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this drawing-flag) #t)
|
||||
(set! (-> this loading-flag) #f)
|
||||
(set! (-> this global-flags) (bigmap-flag))
|
||||
(if (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag ctywide))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'waswide #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag wasall))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'wasall #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag waswide))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'desert #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag desert))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod disable-drawing ((this bigmap))
|
||||
(set-pending-file
|
||||
(-> this bigmap-image)
|
||||
(the-as string #f)
|
||||
(the-as int (-> this bigmap-index))
|
||||
(process->handle *dproc*)
|
||||
0.0
|
||||
)
|
||||
(set-pending-file (-> this tpage) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
(set-pending-file (-> this tpage2) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
(let ((v1-12 #f))
|
||||
(while (not v1-12)
|
||||
(update (-> this bigmap-image))
|
||||
(update (-> this tpage))
|
||||
(update (-> this tpage2))
|
||||
(set! v1-12 (and (= (-> this bigmap-image status) 'inactive)
|
||||
(= (-> this tpage status) 'inactive)
|
||||
(= (-> this tpage2 status) 'inactive)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (-> this progress-minimap)
|
||||
(unload-page *texture-pool* (-> this progress-minimap))
|
||||
(set! (-> (&-> *level* level-default texture-page 6) 0) (the-as texture-page 0))
|
||||
(set! (-> this progress-minimap) #f)
|
||||
)
|
||||
(when (-> this progress-minimap2)
|
||||
(unload-page *texture-pool* (-> this progress-minimap2))
|
||||
(set! (-> (&-> *level* level-default texture-page 3) 0) (the-as texture-page 0))
|
||||
(set! (-> this progress-minimap2) #f)
|
||||
)
|
||||
(set! (-> this drawing-flag) #f)
|
||||
(set! (-> this loading-flag) #f)
|
||||
0
|
||||
)
|
||||
|
||||
(kmemopen global "bigmap-struct")
|
||||
|
||||
;; og:preserve-this
|
||||
(define-perm *bigmap* bigmap (new 'global 'bigmap))
|
||||
|
||||
(kmemclose)
|
||||
|
@ -1884,8 +1884,7 @@
|
||||
)
|
||||
(while s3-0
|
||||
(let ((s4-0 (-> s3-0 next)))
|
||||
;; og:preserve-this not-yet-implemented check
|
||||
(when (or (and *bigmap* (bigmap-method-11 *bigmap*)) (not (paused?)))
|
||||
(when (or (loaded? *bigmap*) (not (paused?)))
|
||||
(cond
|
||||
((logtest? (-> s3-0 flags) (minimap-flag fade-out))
|
||||
(logclear! (-> s3-0 flags) (minimap-flag fade-in))
|
||||
|
@ -279,7 +279,8 @@
|
||||
|
||||
(defmethod progress-method-41 ((this progress) (arg0 progress-box) (arg1 float))
|
||||
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id particles)
|
||||
;; og:preserve-this changed from particles bucket
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
(case (get-aspect-ratio)
|
||||
(('aspect4x3)
|
||||
@ -317,7 +318,8 @@
|
||||
|
||||
(defmethod progress-method-43 ((this progress) (arg0 progress-box) (arg1 float))
|
||||
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket6)
|
||||
;; og:preserve-this changed from bucket6
|
||||
(bucket-id tex-hud-hud-alpha)
|
||||
)
|
||||
(case (get-aspect-ratio)
|
||||
(('aspect4x3)
|
||||
@ -1744,7 +1746,8 @@
|
||||
(set! (-> s1-1 box max y) (+ (-> s1-1 box min y) f30-1))
|
||||
(set-vector! (-> s1-1 color) 192 192 96 (the int (* 128.0 s3-0)))
|
||||
(with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id particles)
|
||||
;; og:preserve-this changed from particles bucket
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
(set! (-> s1-1 box min x) arg2)
|
||||
(set! (-> s1-1 box max x) arg3)
|
||||
@ -2437,7 +2440,7 @@
|
||||
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))))
|
||||
(set! (-> arg1 alpha) f30-0)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -2474,7 +2477,7 @@
|
||||
(set! (-> a0-2 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
((begin
|
||||
@ -2569,7 +2572,7 @@
|
||||
(set! (-> arg1 alpha) f30-0)
|
||||
(progress-method-33 arg0 (-> *progress-work* body))
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -2755,7 +2758,7 @@
|
||||
(f24-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -4624,7 +4627,7 @@
|
||||
(set! sv-24 (the int (-> *game-info* skill)))
|
||||
(set! (-> arg1 alpha) sv-16)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
|
@ -453,9 +453,7 @@
|
||||
(process-spawn hud-ring-cell 11 (* -1.0 f30-0) 9 :name "hud-ring-cell" :to self)
|
||||
)
|
||||
(clear *stdcon1*)
|
||||
(if *bigmap*
|
||||
(enable-drawing *bigmap*)
|
||||
)
|
||||
(enable-drawing *bigmap*)
|
||||
(set-setting! 'scanlines 'abs 0.0 0)
|
||||
(go-virtual come-in)
|
||||
)
|
||||
@ -504,8 +502,7 @@
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(set! (-> *progress-work* hero-mode-save) #f)
|
||||
(remove-setting-by-arg0 *setting-control* 'extra-bank)
|
||||
;; og:preserve-this not-yet-implemented check
|
||||
(if *bigmap* (disable-drawing *bigmap*))
|
||||
(disable-drawing *bigmap*)
|
||||
(set-menu-mode *blit-displays-work* #f)
|
||||
(set! *progress-process* (the-as (pointer progress) #f))
|
||||
(enable-level-text-file-loading)
|
||||
@ -1509,13 +1506,7 @@
|
||||
(progress-method-33 self (-> *progress-work* full-screen))
|
||||
(cond
|
||||
((>= (-> self pos-transition) 0.38)
|
||||
(let ((t9-15 (method-of-object *bigmap* bigmap-method-12)))
|
||||
1792
|
||||
1840
|
||||
2304
|
||||
2256
|
||||
(t9-15)
|
||||
)
|
||||
(draw! *bigmap* 1792 1840 2304 2256)
|
||||
)
|
||||
(else
|
||||
(let ((s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21)))
|
||||
@ -1525,15 +1516,9 @@
|
||||
(set! (-> gp-1 quad) (the-as uint128 0))
|
||||
(let ((s5-2 (new 'stack-no-clear 'vector4w)))
|
||||
(set! (-> s5-2 quad) (the-as uint128 0))
|
||||
(when (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1))
|
||||
(let ((t9-20 (method-of-object *bigmap* bigmap-method-12)))
|
||||
(/ (-> s5-2 x) 16)
|
||||
(/ (-> s5-2 y) 16)
|
||||
(/ (-> gp-1 x) 16)
|
||||
(/ (-> gp-1 y) 16)
|
||||
(t9-20)
|
||||
(if (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1))
|
||||
(draw! *bigmap* (/ (-> s5-2 x) 16) (/ (-> s5-2 y) 16) (/ (-> gp-1 x) 16) (/ (-> gp-1 y) 16))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1602,64 +1587,64 @@
|
||||
(let ((t9-0 format)
|
||||
(a0-3 #t)
|
||||
(a1-1 "DONE NOTIFY: ~S ~S~%")
|
||||
(v1-3 (-> block param 1))
|
||||
(v1-3 (the-as mc-status-code (-> block param 1)))
|
||||
)
|
||||
(t9-0
|
||||
a0-3
|
||||
a1-1
|
||||
(cond
|
||||
((= v1-3 15)
|
||||
((= v1-3 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-3 13)
|
||||
((= v1-3 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-3 10)
|
||||
((= v1-3 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-3 14)
|
||||
((= v1-3 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-3 4)
|
||||
((= v1-3 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-3 8)
|
||||
((= v1-3 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-3 2)
|
||||
((= v1-3 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((zero? v1-3)
|
||||
((= v1-3 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-3 5)
|
||||
((= v1-3 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-3 6)
|
||||
((= v1-3 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-3 9)
|
||||
((= v1-3 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-3 11)
|
||||
((= v1-3 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-3 1)
|
||||
((= v1-3 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-3 16)
|
||||
((= v1-3 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-3 17)
|
||||
((= v1-3 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-3 12)
|
||||
((= v1-3 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-3 3)
|
||||
((= v1-3 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-3 7)
|
||||
((= v1-3 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
@ -1669,7 +1654,8 @@
|
||||
(-> self current)
|
||||
)
|
||||
)
|
||||
(case (-> self current)
|
||||
;; og:preserve-this patched to next instead of current because we save synchronously
|
||||
(case (-> self next)
|
||||
(('saving)
|
||||
(cond
|
||||
((= (-> self state-array 0) 'title)
|
||||
@ -1862,8 +1848,7 @@
|
||||
(defstate gone (progress)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
;; og:preserve-this not-yet-implemented check
|
||||
(if *bigmap* (disable-drawing *bigmap*))
|
||||
(disable-drawing *bigmap*)
|
||||
(set-menu-mode *blit-displays-work* #f)
|
||||
(while (or (-> *blit-displays-work* screen-copied) (nonzero? (-> *blit-displays-work* count-down)))
|
||||
(suspend)
|
||||
@ -1882,7 +1867,7 @@
|
||||
|
||||
(defmethod respond-progress ((this menu-slider-option) (arg0 progress) (arg1 symbol))
|
||||
(with-pp
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(let ((s5-0 (&+ (the-as (pointer float) *setting-control*) (-> this setting-offset)))
|
||||
(s3-0 #f)
|
||||
)
|
||||
@ -1938,7 +1923,7 @@
|
||||
)
|
||||
|
||||
(defmethod respond-progress ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol))
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(let ((a0-2 (-> *setting-control* user-default stereo-mode))
|
||||
(v1-4 #f)
|
||||
)
|
||||
@ -2215,7 +2200,7 @@
|
||||
(set-next-state arg0 a1-3 0)
|
||||
)
|
||||
(set! (-> arg0 selected-option) #f)
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(cond
|
||||
((cpad-pressed? 0 triangle)
|
||||
)
|
||||
@ -3009,7 +2994,7 @@
|
||||
)
|
||||
|
||||
(defmethod respond-progress ((this menu-bigmap-option) (arg0 progress) (arg1 symbol))
|
||||
((method-of-object *bigmap* bigmap-method-13))
|
||||
(handle-cpad-input *bigmap*)
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm))
|
||||
0
|
||||
@ -4049,7 +4034,8 @@
|
||||
process
|
||||
(lambda :behavior process
|
||||
((arg0 int))
|
||||
(suspend-for (seconds 2.5))
|
||||
(suspend-for (seconds 2.5)
|
||||
)
|
||||
(while (or (not (handle-command-list *gui-control* (gui-channel alert) (the-as gui-connection #f)))
|
||||
(= (status-of-level-and-borrows *level* 'title #f) 'active)
|
||||
)
|
||||
|
@ -1514,8 +1514,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> *game-info* score) (the float v1-7))
|
||||
(if (= v1-7 (-> self goal-score))
|
||||
;; og:preserve-this fix hud kill counter
|
||||
(set! (-> *game-info* score) (the float (the int v1-7)))
|
||||
;; og:preserve-this fix original game bug
|
||||
(if (>= v1-7 (-> self goal-score))
|
||||
(send-event self 'complete)
|
||||
)
|
||||
)
|
||||
|
@ -192,7 +192,8 @@
|
||||
(cond
|
||||
((and (kiosk?) (or (cpad-pressed? 0 square) (time-elapsed? s5-1 (seconds 60))))
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f))
|
||||
(suspend-for (seconds 5))
|
||||
(suspend-for (seconds 5)
|
||||
)
|
||||
(set! s5-1 (current-time))
|
||||
)
|
||||
((and (cpad-pressed? 0 up l-analog-up) (> (-> self selected) 0))
|
||||
@ -252,7 +253,8 @@
|
||||
#x33001
|
||||
#t
|
||||
)
|
||||
(suspend-for (seconds 0.4))
|
||||
(suspend-for (seconds 0.4)
|
||||
)
|
||||
(send-event (ppointer->process (-> *setting-control* user-current movie)) 'abort)
|
||||
(set! (-> *setting-control* user-current bg-a) 0.0)
|
||||
(while (or (-> *setting-control* user-current movie)
|
||||
@ -541,7 +543,7 @@
|
||||
(set! (-> t0-2 y) 1.0)
|
||||
(set! (-> t0-2 z) 0.0)
|
||||
(set! (-> t0-2 w) 1.0)
|
||||
(t9-6 (the-as bucket-id a0-31) (the-as art-group a1-15) (the-as int a2-5) a3-7 t0-2 (-> self level) 8)
|
||||
(t9-6 a0-31 (the-as bucket-id a1-15) a2-5 a3-7 t0-2 (-> self level) 8)
|
||||
)
|
||||
(set! (-> self active) #t)
|
||||
)
|
||||
@ -560,7 +562,8 @@
|
||||
:code (behavior ()
|
||||
(remove-setting! 'allow-timeout)
|
||||
(remove-setting! 'dialog-volume)
|
||||
(suspend-for (seconds 1))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
(send-event
|
||||
(ppointer->process (-> self logo))
|
||||
'trans-hook
|
||||
@ -589,7 +592,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend-for (seconds 1))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
(remove-setting! 'dust-storm-fog-scalar)
|
||||
(if (zero? (title-menu))
|
||||
(go-virtual idle)
|
||||
@ -612,7 +616,8 @@
|
||||
)
|
||||
)
|
||||
(until (= (-> *game-info* current-continue level) 'title)
|
||||
(suspend-for (seconds 1))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
)
|
||||
(go-virtual wait)
|
||||
)
|
||||
@ -952,7 +957,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(suspend-for (seconds 0.6))
|
||||
(suspend-for (seconds 0.6)
|
||||
)
|
||||
(process-spawn-function
|
||||
process
|
||||
(lambda ((arg0 game-task))
|
||||
|
@ -42,7 +42,8 @@
|
||||
)
|
||||
(set-setting! 'fog-special-interp-targ #f f0-0 0)
|
||||
)
|
||||
(suspend-for (seconds 15))
|
||||
(suspend-for (seconds 15)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
@ -121,12 +122,11 @@
|
||||
(logior! (-> this minimap-temple flags) (minimap-flag fade-out))
|
||||
(set! (-> this minimap-temple) #f)
|
||||
)
|
||||
;; og:preserve-this not-yet-implemented check
|
||||
(if *bigmap* (bigmap-method-16 *bigmap*))
|
||||
(set-map-indices! *bigmap*)
|
||||
(when (and (not (-> this rod-of-god))
|
||||
; (!= (-> *bigmap* load-index) 18)
|
||||
; (!= (-> *bigmap* load-index) 19)
|
||||
; (!= (-> *bigmap* load-index) 20)
|
||||
(!= (-> *bigmap* load-index) 18)
|
||||
(!= (-> *bigmap* load-index) 19)
|
||||
(!= (-> *bigmap* load-index) 20)
|
||||
)
|
||||
(let ((s4-1 (new 'stack-no-clear 'task-arrow-params)))
|
||||
(set! (-> s4-1 pos quad) (-> (the-as process-focusable s5-0) root trans quad))
|
||||
@ -385,7 +385,8 @@
|
||||
)
|
||||
#f
|
||||
(label cfg-22)
|
||||
(suspend-for (seconds 2))
|
||||
(suspend-for (seconds 2)
|
||||
)
|
||||
(talker-spawn-func (-> *talker-speech* 88) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(send-event self 'complete)
|
||||
)
|
||||
@ -467,7 +468,8 @@
|
||||
(defstate active (oasis-defense-intro-manager)
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(suspend-for (seconds 1))
|
||||
(suspend-for (seconds 1)
|
||||
)
|
||||
(open! (-> self node-info) 'event)
|
||||
(talker-spawn-func (-> *talker-speech* 83) *entity-pool* (target-pos 0) (the-as region #f))
|
||||
(sleep-code)
|
||||
|
2
test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/common-obs/generic-obs_REF.gc
generated
vendored
@ -4690,7 +4690,7 @@
|
||||
:trans (behavior ()
|
||||
(set! (-> self task-counter) (-> *game-info* task-counter))
|
||||
(if *bigmap*
|
||||
(bigmap-method-16 *bigmap*)
|
||||
(set-map-indices! *bigmap*)
|
||||
)
|
||||
(let ((gp-0 (res-lump-struct (-> self entity) 'on-running structure)))
|
||||
(cond
|
||||
|
2
test/decompiler/reference/jak3/engine/game/game-info_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/game/game-info_REF.gc
generated
vendored
@ -592,7 +592,7 @@
|
||||
(dotimes (v1-96 (-> this game-score length))
|
||||
(set! (-> this game-score v1-96) 0.0)
|
||||
)
|
||||
((method-of-object *bigmap* bigmap-method-9))
|
||||
(initialize *bigmap*)
|
||||
)
|
||||
)
|
||||
(case mode
|
||||
|
2
test/decompiler/reference/jak3/engine/game/main_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/game/main_REF.gc
generated
vendored
@ -1742,7 +1742,7 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
(blit-displays-work-method-19 *blit-displays-work*)
|
||||
(do-blit-displays *blit-displays-work*)
|
||||
(when *debug-segment*
|
||||
(let ((s5-12 (-> *display* frames (-> *display* on-screen) profile-array data 0)))
|
||||
(when (and *dproc* *debug-segment*)
|
||||
|
2
test/decompiler/reference/jak3/engine/game/settings_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/game/settings_REF.gc
generated
vendored
@ -1840,7 +1840,7 @@
|
||||
(-> s4-0 blur-a)
|
||||
(* (-> s5-0 blur-a-speed) (-> *display* real-clock seconds-per-frame))
|
||||
)
|
||||
(blit-displays-work-method-17
|
||||
(setup-zoom-blur-2d
|
||||
*blit-displays-work*
|
||||
(new 'static 'vector :x 256.0 :y 208.0 :w 1.0)
|
||||
s3-10
|
||||
|
30
test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc
generated
vendored
30
test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc
generated
vendored
@ -18,7 +18,7 @@
|
||||
(zoom-blur-texels int32)
|
||||
(zoom-blur-alpha-target float)
|
||||
(zoom-blur-alpha-current float)
|
||||
(zoom-blur-2d basic)
|
||||
(zoom-blur-2d symbol)
|
||||
(menu-mode symbol)
|
||||
(screen-copied symbol)
|
||||
(vu1-enable-user-menu vu1-renderer-mask)
|
||||
@ -33,18 +33,18 @@
|
||||
(slow-time float)
|
||||
)
|
||||
(:methods
|
||||
(blit-displays-work-method-9 () none)
|
||||
(blit-displays-work-method-10 () none)
|
||||
(blit-displays-work-method-11 () none)
|
||||
(blit-displays-work-method-12 () none)
|
||||
(blit-displays-work-method-13 () none)
|
||||
(blit-displays-work-method-14 () none)
|
||||
(blit-displays-work-method-15 () none)
|
||||
(blit-displays-work-method-16 () none)
|
||||
(blit-displays-work-method-17 (_type_ vector int float symbol) none)
|
||||
(blit-displays-work-method-18 () none)
|
||||
(blit-displays-work-method-19 (_type_) none)
|
||||
(blit-displays-work-method-20 (_type_) none)
|
||||
(blit-displays-work-method-9 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-10 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-11 (_type_ dma-buffer int) none)
|
||||
(draw-letterbox (_type_ dma-buffer float int float) none)
|
||||
(blit-displays-work-method-13 (_type_ dma-buffer int int int) none)
|
||||
(blit-displays-work-method-14 (_type_ dma-buffer vector) none)
|
||||
(blit-displays-work-method-15 (_type_ dma-buffer) none)
|
||||
(draw-zoom-blur (_type_ dma-buffer int) none)
|
||||
(setup-zoom-blur-2d (_type_ vector int float symbol) none)
|
||||
(setup-brightness-and-contrast (_type_ dma-buffer float float) none)
|
||||
(do-blit-displays (_type_) none)
|
||||
(draw-sky (_type_ dma-buffer) none)
|
||||
(get-menu-mode (_type_) symbol)
|
||||
(get-screen-copied (_type_) symbol)
|
||||
(get-horizontal-flip-flag (_type_) symbol)
|
||||
@ -128,3 +128,7 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
940
test/decompiler/reference/jak3/engine/gfx/blit-displays_REF.gc
generated
vendored
Normal file
940
test/decompiler/reference/jak3/engine/gfx/blit-displays_REF.gc
generated
vendored
Normal file
@ -0,0 +1,940 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for symbol *blit-displays-work*, type blit-displays-work
|
||||
(define *blit-displays-work* (new 'static 'blit-displays-work
|
||||
:adgif-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
|
||||
)
|
||||
:sprite-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x408b400000008010 #x5353)
|
||||
)
|
||||
:contrast-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x40ab400000008010 #x5353)
|
||||
)
|
||||
:sprite-slow-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531)
|
||||
)
|
||||
:draw-slow-time-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x13 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x13 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x30aec00000008006 #x531)
|
||||
)
|
||||
:line-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x2020c00000008020 #x55)
|
||||
)
|
||||
:scan-tmpl (new 'static 'dma-gif-packet
|
||||
:dma-vif (new 'static 'dma-packet
|
||||
:dma (new 'static 'dma-tag :qwc #x4c :id (dma-tag-id cnt))
|
||||
:vif1 (new 'static 'vif-tag :imm #x4c :cmd (vif-cmd direct) :msk #x1)
|
||||
)
|
||||
:gif (new 'static 'array uint64 2 #x5020c0000000800f #x55551)
|
||||
)
|
||||
:color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
|
||||
:line-color #x3f80000000000000
|
||||
:scan-colors (new 'static 'inline-array vector4w 15
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :y 1 :z 1)
|
||||
(new 'static 'vector4w :x 1 :y 3 :z 2)
|
||||
(new 'static 'vector4w :x 1 :y 4 :z 3)
|
||||
(new 'static 'vector4w :x 2 :y 6 :z 5)
|
||||
(new 'static 'vector4w :x 3 :y 8 :z 7)
|
||||
(new 'static 'vector4w :x 5 :y 11 :z 10)
|
||||
(new 'static 'vector4w :x 6 :y 14 :z 13)
|
||||
(new 'static 'vector4w :x 9 :y 20 :z 17)
|
||||
(new 'static 'vector4w :x 13 :y 27 :z 21)
|
||||
(new 'static 'vector4w :x 17 :y 36 :z 24)
|
||||
(new 'static 'vector4w :x 22 :y 45 :z 28)
|
||||
(new 'static 'vector4w :x 32 :y 63 :z 32)
|
||||
)
|
||||
:menu-mode #f
|
||||
:screen-copied #f
|
||||
:horizontal-flip-flag #f
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-9 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 8184 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-10 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this draw-slow-time-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this draw-slow-time-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 96 96 96 192)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 4088 3320 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 5120 (* arg2 8) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 7) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 8) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 9) 8184 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 10) #x2800 0 #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 11) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 12) 8184 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 13) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 14) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 15) 8 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 16) 0 (* arg2 16) #xffffff #x10000)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 17) 128 128 128 arg3)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 18) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 19) 0 0 #xffffff 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 320)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-11 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) #x27f8 (+ (* (+ arg1 -1) 16) 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) 8192 6656 #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw-letterbox ((this blit-displays-work) (arg0 dma-buffer) (arg1 float) (arg2 int) (arg3 float))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (pointer uint128) v1-0)) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) 8184 (+ (the int (* 736.0 arg1)) 8) 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-0) 6)
|
||||
#x2800
|
||||
(the int (* 736.0 arg3 arg1))
|
||||
#xffffff
|
||||
#x10000
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((v1-4 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-4) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-4) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 3) 8 (+ (* (- 416 (the int (* 46.0 arg1))) 16) 8) 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-4) 4)
|
||||
0
|
||||
(* (- arg2 (the int (* 46.0 arg3 arg1))) 16)
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 5) 8184 6648 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-4) 6) #x2800 (* arg2 16) #xffffff #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-13 ((this blit-displays-work) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0 (rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0)))
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-3) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-3) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-2 (* v1-6 512))
|
||||
(a1-10 (* (+ v1-6 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) (+ a2-2 arg3) arg1 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a2-2 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) (+ a1-10 arg3) arg2 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) a1-10 6656 0 #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-14 ((this blit-displays-work) (arg0 dma-buffer) (arg1 vector))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(rgbaq (new 'static 'gs-rgbaq
|
||||
:a #x80
|
||||
:q 1.0
|
||||
:b (the int (* 128.0 (-> arg1 z)))
|
||||
:g (the int (* 128.0 (-> arg1 y)))
|
||||
:r (the int (* 128.0 (-> arg1 x)))
|
||||
)
|
||||
)
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) dma-vif quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) quad 1) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-14 (* v1-6 512))
|
||||
(a1-23 (* (+ v1-6 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) (+ a2-14 8) 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a2-14 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) (+ a1-23 8) 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) a1-23 6656 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod blit-displays-work-method-15 ((this blit-displays-work) (arg0 dma-buffer))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(rgbaq (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((v1-3 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) dma-vif quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-3) quad 1) (-> this sprite-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-6 16)
|
||||
(let ((a0-10 (the-as object (-> arg0 base)))
|
||||
(a2-1 (+ (* v1-6 512) 8))
|
||||
(a1-22 (+ (* (+ v1-6 1) 512) 8))
|
||||
(a3-3 (* (- 16 v1-6) 512))
|
||||
(t0-3 (* (- 16 (+ v1-6 1)) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 0) a2-1 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 1) a3-3 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 2) a1-22 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-10) 3) t0-3 6656 0 #x10000)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
(set-display-gs-state arg0 304 512 416 (shl #xff00 16) 48)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x2600 :tbw #x8 :psm #x30 :tw #x9 :th #x9))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((a0-21 (the-as object (-> arg0 base)))
|
||||
(a1-40 2640)
|
||||
(v1-13 4560)
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) a0-21) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 3) 8192 a1-40 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 4) 8 a1-40 #xffffff 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 5) 6592 v1-13 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-21) 6) 1608 v1-13 #xffffff 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw-zoom-blur ((this blit-displays-work) (arg0 dma-buffer) (arg1 int))
|
||||
(let ((s2-0 (the-as object (-> arg0 base)))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
0.0
|
||||
(let ((f26-0 512.0))
|
||||
0.0
|
||||
(let ((f30-0 416.0)
|
||||
(f28-0 (the float (-> this zoom-blur-texels)))
|
||||
)
|
||||
(cond
|
||||
((-> this zoom-blur-2d)
|
||||
(set! (-> s5-0 quad) (-> this zoom-blur-pos quad))
|
||||
(let* ((f2-0 (* 0.001953125 f28-0 (-> s5-0 x)))
|
||||
(f0-6 (- f26-0 (- f28-0 f2-0)))
|
||||
(f3-1 (* 0.0024038462 f28-0 (-> s5-0 y)))
|
||||
(f1-4 (- f30-0 (- f28-0 f3-1)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 3) (the int (* 16.0 f2-0)) (the int (* 16.0 f3-1)) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) s2-0) 5)
|
||||
(the int (* 16.0 (+ -1.0 f0-6)))
|
||||
(the int (* 16.0 (+ -1.0 f1-4)))
|
||||
0
|
||||
0
|
||||
)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 6) #x2800 (* arg1 16) #xffffff #x10000)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
(else
|
||||
(transform-point-vector! s5-0 (-> this zoom-blur-pos))
|
||||
(if (< (-> s5-0 z) 0.0)
|
||||
(vector-negate! s5-0 s5-0)
|
||||
)
|
||||
(+! (-> s5-0 x) -1792.0)
|
||||
(+! (-> s5-0 y) -1840.0)
|
||||
(let* ((f1-10 (* 0.001953125 f28-0 (-> s5-0 x)))
|
||||
(f2-8 (fmax 0.0 (fmin f1-10 f28-0)))
|
||||
(f0-22 (- f26-0 (- f28-0 f2-8)))
|
||||
(f3-4 (* 0.0024038462 f28-0 (-> s5-0 y)))
|
||||
(f3-6 (fmax 0.0 (fmin f3-4 f28-0)))
|
||||
(f1-16 (- f30-0 (- f28-0 f3-6)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) s2-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 3) (the int (* 16.0 f2-8)) (the int (* 16.0 f3-6)) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 4) 0 0 #xffffff 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) s2-0) 5)
|
||||
(the int (* 16.0 (+ -1.0 f0-22)))
|
||||
(the int (* 16.0 (+ -1.0 f1-16)))
|
||||
0
|
||||
0
|
||||
)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) s2-0) 6) #x2800 (* arg1 16) #xffffff #x10000)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-29 0.0)
|
||||
(f1-18 0.0)
|
||||
)
|
||||
(if (< (-> s5-0 x) 0.0)
|
||||
(set! f0-29 (fmin 1.0 (* 0.001953125 (- (-> s5-0 x)))))
|
||||
)
|
||||
(if (< 512.0 (-> s5-0 x))
|
||||
(set! f0-29 (fmin 1.0 (* 0.001953125 (+ -512.0 (-> s5-0 x)))))
|
||||
)
|
||||
(if (< (-> s5-0 y) 0.0)
|
||||
(set! f1-18 (fmin 1.0 (* 0.001953125 (- (-> s5-0 y)))))
|
||||
)
|
||||
(if (< 416.0 (-> s5-0 y))
|
||||
(set! f1-18 (fmin 1.0 (* 0.001953125 (+ -416.0 (-> s5-0 y)))))
|
||||
)
|
||||
(let ((f0-32 (fmax f0-29 f1-18)))
|
||||
(set! (-> this zoom-blur-alpha-current) (lerp (-> this zoom-blur-alpha-target) 1.0 f0-32))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-dirty-mask! (-> *level* level-default) 9 #xd0000 #x4c000)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-zoom-blur-2d ((this blit-displays-work) (arg0 vector) (arg1 int) (arg2 float) (arg3 symbol))
|
||||
(set! (-> this zoom-blur-2d) arg3)
|
||||
(set! (-> this zoom-blur-pos quad) (-> arg0 quad))
|
||||
(set! (-> this zoom-blur-texels) arg1)
|
||||
(set! (-> this zoom-blur-alpha-target) arg2)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 18 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-brightness-and-contrast ((this blit-displays-work) (arg0 dma-buffer) (arg1 float) (arg2 float))
|
||||
(set-display-gs-state arg0 408 512 416 0 0)
|
||||
(let ((s4-1 (fmax 0.0 (fmin 1.0 arg2)))
|
||||
(s3-1 (fmax 0.0 (fmin 1.0 arg1)))
|
||||
)
|
||||
(let ((v1-2 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-2) dma-vif quad) (-> this adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-2) quad 1) (-> this adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple!
|
||||
(the-as adgif-shader (&+ (the-as dma-gif-packet v1-2) 32))
|
||||
(get-texture common-white common)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((v1-9 (the int (* 64.2509 (+ (- 0.5 s4-1) (* 2.0 (fmax 0.0 (+ -0.5 s3-1)))))))
|
||||
(a0-10 (the int (fmin 255.0 (* 256.0 (fmin 1.0 (* 2.0 s3-1)) s4-1))))
|
||||
)
|
||||
(cond
|
||||
((>= v1-9 0)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :a #x1 :b #x2 :c #x2 :fix a0-10))
|
||||
(rgbaq (new 'static 'gs-rgbaq :a #x80 :q 1.0 :b v1-9 :g v1-9 :r v1-9))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (- v1-9)))
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :a #x1 :c #x2 :d #x2 :fix a0-10))
|
||||
(rgbaq (new 'static 'gs-rgbaq :a #x80 :q 1.0 :b v1-15 :g v1-15 :r v1-15))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-21 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-21) dma-vif quad) (-> this contrast-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-21) quad 1) (-> this contrast-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> arg0 base) 32)
|
||||
(dotimes (v1-24 16)
|
||||
(let ((a0-27 (the-as object (-> arg0 base)))
|
||||
(a2-12 (* v1-24 512))
|
||||
(a1-10 (* (+ v1-24 1) 512))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 0) 0 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 1) a2-12 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 2) 0 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a0-27) 3) a1-10 6656 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 64)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 19 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod do-blit-displays ((this blit-displays-work))
|
||||
(set! (-> this slow-time) (- 1.0 (-> *setting-control* user-current slow-time)))
|
||||
(let ((v1-3 (-> *setting-control* user-current)))
|
||||
(when (or (!= (-> v1-3 contrast) 0.5) (!= (-> v1-3 brightness) 0.5))
|
||||
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id debug-menu)
|
||||
)
|
||||
(setup-brightness-and-contrast this s4-0 (-> v1-3 brightness) (-> v1-3 contrast))
|
||||
(reset-display-gs-state *display* s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (-> this count-down))
|
||||
(cond
|
||||
((and (-> this menu-mode) (not (-> this screen-copied)))
|
||||
(with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket3)
|
||||
)
|
||||
(fx-copy-buf s4-1)
|
||||
)
|
||||
(set! (-> this vu1-enable-user-menu) (-> *display* vu1-enable-user-menu))
|
||||
(set! (-> *display* vu1-enable-user-menu) (vu1-renderer-mask generic))
|
||||
(set! (-> *display* vu1-enable-user) (vu1-renderer-mask generic))
|
||||
(set! (-> this texture-enable-user-menu) (the-as uint (-> *texture-pool* texture-enable-user-menu)))
|
||||
(set! (-> *texture-pool* texture-enable-user-menu) (texture-enable-mask shrub water hud))
|
||||
(set! (-> *texture-pool* texture-enable-user) (texture-enable-mask shrub water hud))
|
||||
(set! (-> this count-down) (the-as uint 3))
|
||||
(set! (-> this screen-copied) #t)
|
||||
(set! (-> this progress-interp) 0.0)
|
||||
(set! (-> this progress-interp-dest) 1.0)
|
||||
(set! (-> this progress-interp-speed) 0.033333335)
|
||||
)
|
||||
((and (not (get-menu-mode this)) (get-screen-copied this))
|
||||
(set! (-> *display* vu1-enable-user-menu) (-> this vu1-enable-user-menu))
|
||||
(set! (-> *texture-pool* texture-enable-user-menu)
|
||||
(the-as texture-enable-mask (-> this texture-enable-user-menu))
|
||||
)
|
||||
(set! (-> this count-down) (the-as uint 3))
|
||||
(set! (-> this screen-copied) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (-> *setting-control* user-current render) (>= (the-as uint 1) (-> this count-down)))
|
||||
(when (and (get-horizontal-flip-flag this) (not (get-menu-mode this)))
|
||||
(with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id debug-no-zbuf1)
|
||||
)
|
||||
(fx-copy-buf s4-2)
|
||||
(blit-displays-work-method-15 this s4-2)
|
||||
(reset-display-gs-state *display* s4-2)
|
||||
)
|
||||
)
|
||||
(when (logtest? (vu1-renderer-mask rn36) (-> *display* vu1-enable-user))
|
||||
(when (not *display-color-bars*)
|
||||
(with-dma-buffer-add-bucket ((s4-3 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket567)
|
||||
)
|
||||
(dma-buffer-add-gs-set s4-3
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
(if (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
(blit-displays-work-method-13 this s4-3 0 6656 8)
|
||||
)
|
||||
(reset-display-gs-state *display* s4-3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-9 (-> this slow-time))
|
||||
(a2-6 (-> *time-of-day-context* filter))
|
||||
(s5-4 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector! s5-4 1.0 1.0 1.5 1.0)
|
||||
(vector4-lerp! s5-4 s5-4 a2-6 f0-9)
|
||||
(when (and (or (!= (-> s5-4 x) 1.0) (!= (-> s5-4 y) 1.0) (!= (-> s5-4 z) 1.0)) (not (get-menu-mode this)))
|
||||
(with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id tex-hud-hud-alpha)
|
||||
)
|
||||
(blit-displays-work-method-14 this s3-0 s5-4)
|
||||
(reset-display-gs-state *display* s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (-> *setting-control* user-current render) (zero? (-> this count-down)))
|
||||
(with-dma-buffer-add-bucket ((s4-5 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket3)
|
||||
)
|
||||
(dma-buffer-add-gs-set s4-5
|
||||
(dthe (new 'static 'gs-dthe))
|
||||
(prmodecont (new 'static 'gs-prmode-cont :ac #x1))
|
||||
(colclamp (new 'static 'gs-color-clamp :clamp #x1))
|
||||
(pabe 0)
|
||||
(texa (new 'static 'gs-texa :ta1 #x80))
|
||||
(texclut (new 'static 'gs-texclut :cbw #x4))
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(fogcol *fog-color*)
|
||||
(texflush 0)
|
||||
)
|
||||
(let* ((s0-0 *video-params*)
|
||||
(s1-0 (-> s0-0 display-fbp))
|
||||
(s3-1 (-> s0-0 display-sy))
|
||||
)
|
||||
(let ((s2-0 (* s3-1 2)))
|
||||
(dma-buffer-add-gs-set s4-5
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9))
|
||||
)
|
||||
(cond
|
||||
((or (zero? (-> this zoom-blur-texels)) (or (= (-> this zoom-blur-alpha-target) 1.0) (paused?)))
|
||||
(let ((f0-14 (-> this slow-time))
|
||||
(f30-0 1.0)
|
||||
)
|
||||
(if (!= f0-14 1.0)
|
||||
(set! f30-0 (lerp 0.05 1.0 f0-14))
|
||||
)
|
||||
(set-display-gs-state s4-5 (-> s0-0 display-fbp) 640 s2-0 (shl #xff00 16) 0)
|
||||
(if (= f30-0 1.0)
|
||||
(blit-displays-work-method-9 this s4-5 416 s2-0 128)
|
||||
(blit-displays-work-method-10 this s4-5 416 s2-0 (the int (* 128.0 f30-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set-display-gs-state s4-5 38 512 416 (shl #xff00 16) 0)
|
||||
(dma-buffer-add-gs-set s4-5
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbw #xa :tw #xa :th #x9 :tbp0 (* (-> s0-0 display-fbp) 32)))
|
||||
)
|
||||
(blit-displays-work-method-11 this s4-5 s2-0)
|
||||
(set-display-gs-state s4-5 s1-0 640 s2-0 (shl #xff00 16) 0)
|
||||
(dma-buffer-add-gs-set s4-5 (tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9)))
|
||||
(draw-zoom-blur this s4-5 s2-0)
|
||||
(dma-buffer-add-gs-set s4-5 (tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9)))
|
||||
(blit-displays-work-method-9 this s4-5 416 s2-0 (the int (* 128.0 (-> this zoom-blur-alpha-current))))
|
||||
(when (or (!= (-> *setting-control* user-current letterbox) 0.0)
|
||||
(< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time))
|
||||
)
|
||||
(when (and (= (-> *setting-control* user-current aspect-ratio) 'aspect4x3)
|
||||
(or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
)
|
||||
(let ((f0-24 (the-as float (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time))
|
||||
1.0
|
||||
(-> *setting-control* user-current letterbox)
|
||||
)
|
||||
)
|
||||
)
|
||||
(f1-15 (* 0.0024038462 (the float s2-0)))
|
||||
)
|
||||
(draw-letterbox this s4-5 f0-24 s2-0 f1-15)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= (-> *setting-control* user-current scanlines) 0.0)
|
||||
(let ((v1-213 (the int (* 128.0 (-> *setting-control* user-current scanlines)))))
|
||||
(set! (-> this line-color)
|
||||
(logior (logand (-> this line-color) (the-as uint #xffffffff00ffffff)) (shr (shl v1-213 56) 32))
|
||||
)
|
||||
(dotimes (a0-120 15)
|
||||
(set! (-> this scan-colors a0-120 w) v1-213)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set s4-5
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(rgbaq (-> this line-color))
|
||||
)
|
||||
(dotimes (v1-219 (/ s3-1 32))
|
||||
(let ((a0-127 (the-as object (-> s4-5 base))))
|
||||
(set! (-> (the-as dma-gif-packet a0-127) dma-vif quad) (-> this line-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet a0-127) quad 1) (-> this line-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> s4-5 base) 32)
|
||||
(dotimes (a0-130 16)
|
||||
(let ((a1-115 (the-as object (-> s4-5 base)))
|
||||
(a2-25 (* (+ (* v1-219 64) (* a0-130 4)) 16))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-115) 0) 0 a2-25 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-115) 1) #x2800 a2-25 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-115) 2) 0 (+ a2-25 16) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-115) 3) #x2800 (+ a2-25 16) 0 0)
|
||||
)
|
||||
(&+! (-> s4-5 base) 64)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set s4-5 (alpha-1 (new 'static 'gs-alpha :b #x2 :d #x1)))
|
||||
(let ((v1-225 (the-as object (-> s4-5 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-225) dma-vif quad) (-> this scan-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-225) quad 1) (-> this scan-tmpl quad 1))
|
||||
)
|
||||
(&+! (-> s4-5 base) 32)
|
||||
(let ((a0-142 (* (-> this scanline) 32)))
|
||||
(dotimes (v1-229 15)
|
||||
(let ((a1-126 (the-as object (-> s4-5 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) a1-126) 0 quad) (-> this scan-colors v1-229 quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-126) 1) 0 (the-as int a0-142) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-126) 2) #x2800 (the-as int a0-142) 0 0)
|
||||
(let ((a0-143 (+ a0-142 16)))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-126) 3) 0 (the-as int a0-143) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-126) 4) #x2800 (the-as int a0-143) 0 0)
|
||||
(set! a0-142 (+ a0-143 16))
|
||||
)
|
||||
)
|
||||
(&+! (-> s4-5 base) 80)
|
||||
)
|
||||
)
|
||||
(if (not (paused?))
|
||||
(set! (-> this scanline) (the-as uint (mod (the-as int (+ (-> this scanline) 4)) s3-1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(reset-display-gs-state *display* s4-5)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(with-dma-buffer-add-bucket ((s4-6 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket3)
|
||||
)
|
||||
(reset-display-gs-state *display* s4-6)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> this count-down))
|
||||
(+! (-> this count-down) -1)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 20 of type blit-displays-work
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw-sky ((this blit-displays-work) (arg0 dma-buffer))
|
||||
(let ((f0-0 (-> this progress-interp))
|
||||
(v1-0 *time-of-day-context*)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(zbuf-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)))
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((a3-17 (the-as object (-> arg0 base)))
|
||||
(t0-0 #x7000)
|
||||
(t1-0 #x7300)
|
||||
(a0-4 #x7800)
|
||||
(a2-6 #x7980)
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) a3-17) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) a3-17) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a3-17) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a3-17) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a3-17) 4) t0-0 t1-0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a3-17) 5) 8200 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a3-17) 6) a0-4 a2-6 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((t1-3 (the-as object (-> arg0 base)))
|
||||
(a3-19 #x8000)
|
||||
(t0-2 #x8000)
|
||||
(a0-7 #x9000)
|
||||
(a2-7 #x8d00)
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) t1-3) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-3) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 2) 128 128 128 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 4) a3-19 t0-2 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 5) 8200 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-3) 6) a0-7 a2-7 0 0)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x3300 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((t1-10 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-10) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) t1-10) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 2) 128 128 128 80)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 4) a3-19 (+ t0-2 -8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 5) 2056 1672 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t1-10) 6) a0-7 (+ a2-7 -8) 0 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha)))
|
||||
(let ((a0-16 (the int (+ 128.0 (* 32.0 f0-0))))
|
||||
(a2-16 (the int (- 128.0 (* 16.0 f0-0))))
|
||||
(a3-31 (the int (- 128.0 (* 96.0 f0-0))))
|
||||
)
|
||||
(when (or (!= (-> v1-0 filter x) 1.0) (!= (-> v1-0 filter y) 1.0) (!= (-> v1-0 filter z) 1.0))
|
||||
(set! a0-16 128)
|
||||
(set! a2-16 128)
|
||||
(set! a3-31 128)
|
||||
)
|
||||
(let ((v1-5 3328)
|
||||
(t0-9 6656)
|
||||
)
|
||||
(dotimes (t1-11 16)
|
||||
(let ((t2-22 (the-as object (-> arg0 base)))
|
||||
(t4-0 (* (+ (* t1-11 32) 1792) 16))
|
||||
(t3-35 (* (+ (* (+ t1-11 1) 32) 1792) 16))
|
||||
)
|
||||
(let ((t6-0 (* (+ (* t1-11 16) 256) 16))
|
||||
(t5-5 (* (+ (* (+ t1-11 1) 16) 256) 16))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) t2-22) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) t2-22) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t2-22) 2) a0-16 a2-16 a3-31 128)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t2-22) 3) t6-0 (+ v1-5 8) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t2-22) 4) t4-0 #x72f8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t2-22) 5) t5-5 (+ t0-9 8) 0 0)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) t2-22) 6) t3-35 #x8cf8 0 0)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x4c0 :tbw #x8 :tw #x9 :th #x9 :tcc #x1))
|
||||
(texflush 0)
|
||||
)
|
||||
(let ((v1-11 (the-as object (-> arg0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-11) 0 quad) (-> this sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-11) 1 quad) (-> this sprite-slow-tmpl quad 1))
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-11) 2)
|
||||
a0-16
|
||||
a2-16
|
||||
a3-31
|
||||
(the int (- 128.0 (* 48.0 f0-0)))
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-11) 3) 8 8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-11) 4) #x7000 #x72f8 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-11) 5) 8200 6664 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-11) 6) #x9000 #x8cf8 0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(seek! (-> this progress-interp) (-> this progress-interp-dest) (-> this progress-interp-speed))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function draw-color-bars
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun draw-color-bars ((arg0 blit-displays-work))
|
||||
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id debug-no-zbuf2)
|
||||
)
|
||||
(let ((v1-5 (the-as object (-> s5-0 base))))
|
||||
(set! (-> (the-as dma-gif-packet v1-5) dma-vif quad) (-> arg0 adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as dma-gif-packet v1-5) quad 1) (-> arg0 adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple!
|
||||
(the-as adgif-shader (&+ (the-as dma-gif-packet v1-5) 32))
|
||||
(get-texture colorbars13 programmer)
|
||||
)
|
||||
)
|
||||
(&+! (-> s5-0 base) 112)
|
||||
(let ((v1-8 (the-as object (-> s5-0 base))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 0 quad) (-> arg0 sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 1 quad) (-> arg0 sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-8) 2 quad) (-> arg0 color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 3) 32 0 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 4) #x7000 #x7300 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 5) 480 256 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-8) 6) #x9000 #x8d00 0 0)
|
||||
)
|
||||
(&+! (-> s5-0 base) 112)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function draw-raw-image
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun draw-raw-image ((arg0 blit-displays-work)
|
||||
(arg1 bucket-id)
|
||||
(arg2 art-group)
|
||||
(arg3 vector)
|
||||
(arg4 vector)
|
||||
(arg5 level)
|
||||
(arg6 int)
|
||||
)
|
||||
(local-vars (sv-16 blit-displays-work) (sv-32 int))
|
||||
(set! sv-16 *blit-displays-work*)
|
||||
(with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
arg1
|
||||
)
|
||||
(upload-vram-data s1-0 0 (the-as pointer arg2) (the int (-> arg3 y)) (the int (-> arg3 x)))
|
||||
(set! sv-32 (+ (log2 (+ (the int (-> arg3 x)) -1)) 1))
|
||||
(let ((v1-9 (+ (log2 (+ (the int (-> arg3 y)) -1)) 1)))
|
||||
(dma-buffer-add-gs-set s1-0
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha))
|
||||
(tex0-1 (new 'static 'gs-tex0 :tcc #x1 :th v1-9 :tw sv-32 :tbw (/ (the int (-> arg3 x)) 64)))
|
||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
(texflush 0)
|
||||
)
|
||||
)
|
||||
(let ((v1-20 (the-as object (-> s1-0 base)))
|
||||
(f0-10 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 0 quad) (-> sv-16 sprite-slow-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 1 quad) (-> sv-16 sprite-slow-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-20) 2 quad) (-> sv-16 color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-20) 3) 0 0 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 4)
|
||||
(* (- 2048 (the int (* 256.0 f0-10 (-> arg4 x)))) 16)
|
||||
(* (- 2048 (the int (* 208.0 (-> arg4 y)))) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 5)
|
||||
(* (the int (-> arg3 x)) 16)
|
||||
(* (the int (-> arg3 y)) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) v1-20) 6)
|
||||
(* (+ (the int (* 256.0 f0-10 (-> arg4 x))) 2048) 16)
|
||||
(* (+ (the int (* 208.0 (-> arg4 y))) 2048) 16)
|
||||
0
|
||||
0
|
||||
)
|
||||
)
|
||||
(&+! (-> s1-0 base) 112)
|
||||
(set-dirty-mask! arg5 arg6 (* (* (the int (-> arg3 y)) (the int (-> arg3 x))) 4) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/gfx/sky/sky-tng_REF.gc
generated
vendored
@ -802,7 +802,7 @@
|
||||
(with-dma-buffer-add-bucket ((s5-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id sky)
|
||||
)
|
||||
(blit-displays-work-method-20 *blit-displays-work*)
|
||||
(draw-sky *blit-displays-work* s5-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
470
test/decompiler/reference/jak3/engine/level/level-info_REF.gc
generated
vendored
470
test/decompiler/reference/jak3/engine/level/level-info_REF.gc
generated
vendored
File diff suppressed because it is too large
Load Diff
6
test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc
generated
vendored
6
test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc
generated
vendored
@ -996,7 +996,7 @@
|
||||
(f0-4 (evaluate (-> this blur-curve) f0-3 (loop-behavior use-default)))
|
||||
(f0-5 (- 1.0 f0-4))
|
||||
)
|
||||
(blit-displays-work-method-17
|
||||
(setup-zoom-blur-2d
|
||||
*blit-displays-work*
|
||||
(-> this root trans)
|
||||
(the-as int (-> this num-blur-segments))
|
||||
@ -1205,7 +1205,7 @@
|
||||
:exit (behavior ()
|
||||
(when (= (process->handle self) (-> *last-active-nuke* last-active-nuke))
|
||||
(disable *screen-filter*)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
@ -1384,7 +1384,7 @@
|
||||
:exit (behavior ()
|
||||
(when (= (process->handle self) (-> *last-active-nuke* last-active-nuke))
|
||||
(disable *screen-filter*)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 0 1.0 #f)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
|
12
test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc
generated
vendored
12
test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc
generated
vendored
@ -1700,7 +1700,7 @@
|
||||
;; definition for method 10 of type gun-red-2-shockwave
|
||||
(defmethod deactivate ((this gun-red-2-shockwave))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> this origin) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> this origin) 0 1.0 #f)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
@ -1740,7 +1740,7 @@
|
||||
(set! (-> self current-warp-alpha) 1.0)
|
||||
)
|
||||
:exit (behavior ()
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self origin) 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self origin) 0 1.0 #f)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(let ((f0-1
|
||||
@ -1776,7 +1776,7 @@
|
||||
(let* ((f0-16 (- 1.0 (evaluate *impact-blur* f0-14 (loop-behavior use-default))))
|
||||
(f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength)))))
|
||||
)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f)
|
||||
)
|
||||
)
|
||||
(if (< (-> self current-stage-t) 1.0)
|
||||
@ -2238,7 +2238,7 @@
|
||||
;; definition for method 10 of type gun-red-3-grenade
|
||||
(defmethod deactivate ((this gun-red-3-grenade))
|
||||
"Make a process dead, clean it up, remove it from the active pool, and return to dead pool."
|
||||
(blit-displays-work-method-17 *blit-displays-work* *zero-vector* 0 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* *zero-vector* 0 1.0 #f)
|
||||
(call-parent-method this)
|
||||
(none)
|
||||
)
|
||||
@ -2318,7 +2318,7 @@
|
||||
(f0-14 (lerp f0-13 1.0 f30-1))
|
||||
)
|
||||
(set! (-> *display* force-sync) (the-as uint 2))
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f)
|
||||
)
|
||||
)
|
||||
(let ((gp-8 (-> self child)))
|
||||
@ -2332,7 +2332,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 15 1.0 #f)
|
||||
(setup-zoom-blur-2d *blit-displays-work* (-> self root trans) 15 1.0 #f)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
|
34
test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc
generated
vendored
34
test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc
generated
vendored
@ -76,13 +76,13 @@
|
||||
(deftype bigmap (basic)
|
||||
((drawing-flag symbol)
|
||||
(loading-flag symbol)
|
||||
(bigmap-index uint32)
|
||||
(bigmap-index bigmap-id)
|
||||
(bigmap-image external-art-buffer)
|
||||
(tpage external-art-buffer)
|
||||
(tpage2 basic)
|
||||
(tpage2 external-art-buffer)
|
||||
(progress-minimap texture-page)
|
||||
(progress-minimap2 texture-page)
|
||||
(load-index uint32)
|
||||
(load-index bigmap-id)
|
||||
(x0 int32)
|
||||
(y0 int32)
|
||||
(x1 int32)
|
||||
@ -99,24 +99,24 @@
|
||||
(color vector4w :inline)
|
||||
(corner vector 4 :inline)
|
||||
(auto-save-icon-flag symbol)
|
||||
(global-flags uint32)
|
||||
(global-flags bigmap-flag)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(bigmap-method-9 () none)
|
||||
(initialize (_type_) none)
|
||||
(update (_type_) none)
|
||||
(bigmap-method-11 (_type_) symbol)
|
||||
(bigmap-method-12 () none)
|
||||
(bigmap-method-13 () none)
|
||||
(loaded? (_type_) symbol)
|
||||
(draw! (_type_ int int int int) none)
|
||||
(handle-cpad-input (_type_) none)
|
||||
(enable-drawing (_type_) none)
|
||||
(disable-drawing (_type_) int)
|
||||
(bigmap-method-16 (_type_) none)
|
||||
(bigmap-method-17 () none)
|
||||
(bigmap-method-18 () none)
|
||||
(bigmap-method-19 () none)
|
||||
(bigmap-method-20 () none)
|
||||
(bigmap-method-21 () none)
|
||||
(bigmap-method-22 () none)
|
||||
(set-map-indices! (_type_) none)
|
||||
(set-pos! (_type_ vector) none)
|
||||
(bigmap-method-18 (_type_ (pointer int32)) none)
|
||||
(texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none)
|
||||
(bigmap-method-20 (_type_ dma-buffer) symbol)
|
||||
(sprite-dma (_type_ dma-buffer int int int int int int) object)
|
||||
(draw-from-minimap (_type_ dma-buffer connection-minimap) none)
|
||||
)
|
||||
)
|
||||
|
||||
@ -159,3 +159,7 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
963
test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc
generated
vendored
Normal file
963
test/decompiler/reference/jak3/engine/ui/bigmap_REF.gc
generated
vendored
Normal file
@ -0,0 +1,963 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 0 of type bigmap
|
||||
(defmethod new bigmap ((allocation symbol) (type-to-make type))
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> gp-0 bigmap-image)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -591936 (-> *display* frames 0 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x90800))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tpage)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -597056 (-> *display* frames 1 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x54000))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 tpage2)
|
||||
((method-of-type external-art-buffer new)
|
||||
allocation
|
||||
external-art-buffer
|
||||
0
|
||||
(lambda ((arg0 external-art-buffer))
|
||||
(let ((a1-3 (logand -64 (+ -941120 (-> *display* frames 1 global-buf real-buffer-end) 63)))
|
||||
(v1-1 (-> arg0 heap))
|
||||
)
|
||||
(set! (-> v1-1 base) (the-as pointer a1-3))
|
||||
(set! (-> v1-1 current) (-> v1-1 base))
|
||||
(set! (-> v1-1 top-base) (&+ (-> v1-1 base) #x54000))
|
||||
(set! (-> v1-1 top) (-> v1-1 top-base))
|
||||
)
|
||||
0
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 sprite-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 sprite-tmpl gif0) (the-as uint #x50ab400000008001))
|
||||
(set! (-> gp-0 sprite-tmpl gif1) (the-as uint #x53531))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 draw-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 draw-tmpl gif0) (the-as uint #x90aa400000008001))
|
||||
(set! (-> gp-0 draw-tmpl gif1) (the-as uint #x535353531))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif vif0) (new 'static 'vif-tag))
|
||||
(set! (-> gp-0 adgif-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> gp-0 adgif-tmpl gif0) (the-as uint #x1000000000008005))
|
||||
(set! (-> gp-0 adgif-tmpl gif1) (the-as uint 14))
|
||||
(set-vector! (-> gp-0 offset) 0.0 0.0 0.0 0.0)
|
||||
(set-vector! (-> gp-0 scroll) 0.0 0.0 0.0 0.0)
|
||||
(set-vector! (-> gp-0 pos) 0 0 0 0)
|
||||
(set-vector! (-> gp-0 color) 128 128 128 128)
|
||||
(set! (-> gp-0 drawing-flag) #f)
|
||||
(set! (-> gp-0 loading-flag) #f)
|
||||
(set! (-> gp-0 progress-minimap) #f)
|
||||
(set! (-> gp-0 progress-minimap2) #f)
|
||||
(set! (-> gp-0 auto-save-icon-flag) #f)
|
||||
(initialize gp-0)
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *bigmap-info-array*, type bigmap-info-array
|
||||
(define *bigmap-info-array*
|
||||
(new 'static 'bigmap-info-array
|
||||
:data (new 'static 'inline-array bigmap-info 24
|
||||
(new 'static 'bigmap-info :x -2621440.0 :y -4456448.0 :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -2621440.0 :y -4456448.0 :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -2038169.6 :y -2301542.5 :z 27443.2 :w 0.0000364389)
|
||||
(new 'static 'bigmap-info :x -354713.6 :y -1128448.0 :z 4505.6 :w 0.00022194601)
|
||||
(new 'static 'bigmap-info :x -4205363.0 :y 3437363.2 :z 4628.48 :w 0.00021605365)
|
||||
(new 'static 'bigmap-info :x -3381657.5 :y 2019737.6 :z 7618.56 :w 0.0001312584)
|
||||
(new 'static 'bigmap-info :x -1399193.6 :y -1023590.4 :z 5406.72 :w 0.00018495502)
|
||||
(new 'static 'bigmap-info :x 2215526.5 :y 615055.4 :z 10444.8 :w 0.00009574142)
|
||||
(new 'static 'bigmap-info :x 2215526.5 :y 615055.4 :z 10444.8 :w 0.00009574142)
|
||||
(new 'static 'bigmap-info :z 16384.0 :w 0.000061035156)
|
||||
(new 'static 'bigmap-info :x -1481932.8 :y -918323.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x -1481932.8 :y -918323.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x -2614886.5 :y -1766195.2 :z 9052.16 :w 0.00011047087)
|
||||
(new 'static 'bigmap-info :x -2530508.8 :y -1041203.2 :z 5591.04 :w 0.0001788576)
|
||||
(new 'static 'bigmap-info :x -2374451.2 :y -4505.6 :z 4628.48 :w 0.00021605365)
|
||||
(new 'static 'bigmap-info :x -2712780.8 :y -2477260.8 :z 6471.68 :w 0.00015451938)
|
||||
(new 'static 'bigmap-info :x -1218560.0 :y -3392307.2 :z 5857.28 :w 0.00017072771)
|
||||
(new 'static 'bigmap-info :x 16039117.0 :y 16509747.0 :z 3317.76 :w 0.00030140817)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x 15403827.0 :y 16360653.0 :z 5283.84 :w 0.0001892563)
|
||||
(new 'static 'bigmap-info :x -1716224.0 :y 1286144.0 :z 3604.48 :w 0.00027743253)
|
||||
(new 'static 'bigmap-info :x -1316864.0 :y -2084126.8 :z 4014.08 :w 0.00024912308)
|
||||
(new 'static 'bigmap-info :x 5619712.0 :y -2914304.0 :z 9830.4 :w 0.00010172526)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-pos! ((this bigmap) (arg0 vector))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(.lvf vf1 (&-> arg0 quad))
|
||||
(.lvf vf2 (&-> this offset quad))
|
||||
(.add.z.vf vf1 vf0 vf1 :mask #b10)
|
||||
(.sub.vf vf1 vf1 vf2)
|
||||
(.mul.w.vf vf1 vf1 vf2)
|
||||
(.ftoi.vf vf1 vf1)
|
||||
(.svf (&-> this pos quad) vf1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 18 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod bigmap-method-18 ((this bigmap) (arg0 (pointer int32)))
|
||||
(when (or (= (-> this load-index) (bigmap-id sewer-met-hum)) (= (-> this load-index) (bigmap-id sewer-hum-kg)))
|
||||
(let ((v1-4 (-> arg0 0)))
|
||||
(set! (-> arg0 0) (-> arg0 1))
|
||||
(set! (-> arg0 1) (- 832 v1-4))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 19 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod texture-upload-dma ((this bigmap) (arg0 dma-buffer) (arg1 (pointer uint32)) (arg2 int) (arg3 int) (arg4 int) (arg5 gs-psm))
|
||||
(local-vars (sv-16 int))
|
||||
(set! sv-16 arg2)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(bitbltbuf (new 'static 'gs-bitbltbuf :dpsm (the-as int arg5) :dbp sv-16 :dbw (/ arg3 64)))
|
||||
(trxpos (new 'static 'gs-trxpos))
|
||||
(trxreg (new 'static 'gs-trxreg :rrw arg3 :rrh arg4))
|
||||
(trxdir (new 'static 'gs-trxdir))
|
||||
)
|
||||
(dma-buffer-add-ref-texture arg0 arg1 arg3 arg4 arg5)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 21 of type bigmap
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch pointer vs object.
|
||||
(defmethod sprite-dma ((this bigmap) (arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 int) (arg6 int))
|
||||
(let ((v1-0 (the-as object (-> arg0 base))))
|
||||
(let ((t5-0 0)
|
||||
(t4-2 (the int (* 416.0 (-> *video-params* relative-x-scale))))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-0) 2 quad) (-> this color quad))
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 3) (* arg5 16) (* t5-0 16) 0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 4) (* arg1 16) (* arg3 16) #xfffff0 0)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 5) (* arg6 16) (* t4-2 16) 0 0)
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) v1-0) 6) (* arg2 16) (* arg4 16) #xfffff0 0)
|
||||
)
|
||||
(let ((v0-0 (&+ (-> arg0 base) 112)))
|
||||
(set! (-> arg0 base) v0-0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 20 of type bigmap
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod bigmap-method-20 ((this bigmap) (arg0 dma-buffer))
|
||||
(local-vars (sv-16 uint))
|
||||
(let* ((s4-0 (the-as (pointer uint32) (-> this bigmap-image art-group)))
|
||||
(f0-1 (* 0.001953125 (the float (- (-> this x1) (-> this x0)))))
|
||||
(s3-0 (the int (* 256.0 f0-1)))
|
||||
(v1-5 (the int (-> this scroll x)))
|
||||
(a0-2 (-> this x0))
|
||||
(f1-7 (-> this scroll x))
|
||||
(s2-0 (- a0-2 (the int (* (- f1-7 (* (the float (the int (/ f1-7 256.0))) 256.0)) f0-1))))
|
||||
(s1-0 (/ v1-5 256))
|
||||
(s0-0 (/ (+ v1-5 511) 256))
|
||||
)
|
||||
(-> s4-0 2)
|
||||
(set! sv-16 (* (-> s4-0 3) 256))
|
||||
(while (>= s0-0 s1-0)
|
||||
(texture-upload-dma
|
||||
this
|
||||
arg0
|
||||
(the-as (pointer uint32) (+ (+ (-> s4-0 0) 16) (the-as uint s4-0)))
|
||||
0
|
||||
16
|
||||
16
|
||||
(gs-psm ct32)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0 (texflush 0))
|
||||
(let ((v1-18 (+ (-> s4-0 1) (* (the-as uint s1-0) sv-16) (* (the int (-> this scroll y)) 256))))
|
||||
(texture-upload-dma
|
||||
this
|
||||
arg0
|
||||
(the-as (pointer uint32) (+ (+ v1-18 16) (the-as uint s4-0)))
|
||||
8
|
||||
256
|
||||
416
|
||||
(gs-psm mt8)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set arg0
|
||||
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x8 :tbw #x4 :psm #x13 :tw #x8 :th #x9 :cld #x1))
|
||||
(tex1-1 (new 'static 'gs-tex1))
|
||||
(texflush 0)
|
||||
)
|
||||
(sprite-dma this arg0 (+ s2-0 1792) (+ s3-0 1792 s2-0) (-> this y0) (-> this y1) 0 256)
|
||||
(+! s2-0 s3-0)
|
||||
(+! s1-0 1)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 22 of type bigmap
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw-from-minimap ((this bigmap) (arg0 dma-buffer) (arg1 connection-minimap))
|
||||
(local-vars (sv-80 vector4w))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(cond
|
||||
((= (-> arg1 position) #t)
|
||||
(let* ((s3-0 (handle->process (-> arg1 handle)))
|
||||
(v1-4 (if (type? s3-0 process-drawable)
|
||||
(the-as process-drawable s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and v1-4 (nonzero? (-> v1-4 root)))
|
||||
(set! (-> arg1 last-world-pos quad) (-> v1-4 root trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (logand (the-as int (-> arg1 position)) 7) 4)
|
||||
(= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor)
|
||||
)
|
||||
(let* ((v1-14 (the-as entity-actor (-> arg1 position)))
|
||||
(s3-1 (if v1-14
|
||||
(-> v1-14 extra process)
|
||||
)
|
||||
)
|
||||
(a0-13 (if (type? s3-1 process-drawable)
|
||||
(the-as process-drawable s3-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-13
|
||||
(set! (-> arg1 last-world-pos quad) (-> a0-13 root trans quad))
|
||||
(set! (-> arg1 last-world-pos quad) (-> (the-as entity-actor (-> arg1 position)) extra trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg1 last-world-pos quad) (-> arg1 position quad))
|
||||
)
|
||||
)
|
||||
(let ((f30-0 (-> arg1 class scale))
|
||||
(s1-0 (-> arg1 class color))
|
||||
)
|
||||
(set! sv-80 (new 'stack-no-clear 'vector4w))
|
||||
(let ((s0-0 (new-stack-vector0))
|
||||
(s2-0 (new-stack-vector0))
|
||||
(s3-2 (new-stack-vector0))
|
||||
)
|
||||
(let ((f26-0 (-> *video-params* relative-x-scale))
|
||||
(f28-0 (-> *video-params* relative-x-scale-reciprical))
|
||||
)
|
||||
(-> arg1 class)
|
||||
(.lvf vf1 (&-> arg1 last-world-pos quad))
|
||||
(.lvf vf2 (&-> this offset quad))
|
||||
(.add.z.vf vf1 vf0 vf1 :mask #b10)
|
||||
(.sub.vf vf1 vf1 vf2)
|
||||
(.mul.w.vf vf1 vf1 vf2)
|
||||
(.ftoi.vf vf1 vf1)
|
||||
(.svf (&-> sv-80 quad) vf1)
|
||||
(if (logtest? (-> arg1 class flags) (minimap-flag goal))
|
||||
(set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6)))
|
||||
)
|
||||
(bigmap-method-18 this (the-as (pointer int32) sv-80))
|
||||
(cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! f26-0 (- f26-0))
|
||||
(set! (-> s0-0 x) (+ (the float (+ (- 2304 (-> sv-80 x)) (-> this x1))) (-> this scroll x)))
|
||||
)
|
||||
(else
|
||||
(set! (-> s0-0 x) (- (the float (+ (-> sv-80 x) 1792 (-> this x0))) (-> this scroll x)))
|
||||
)
|
||||
)
|
||||
(set! (-> s0-0 y) (+ 1840.0 (* (- (the float (-> sv-80 y)) (-> this scroll y)) f28-0)))
|
||||
(let ((f0-12 (* 20.0 f26-0 f30-0))
|
||||
(f1-8 (* 20.0 f28-0 f30-0))
|
||||
)
|
||||
(set! (-> s2-0 x) (the float (the int (- (-> s0-0 x) (* 0.5 f0-12)))))
|
||||
(set! (-> s2-0 y) (the float (the int (- (-> s0-0 y) (* 0.5 f1-8)))))
|
||||
(set! (-> s3-2 x) (+ (-> s2-0 x) f0-12))
|
||||
(set! (-> s3-2 y) (+ (-> s2-0 y) f1-8))
|
||||
)
|
||||
)
|
||||
(let* ((a2-1 (the-as uint (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8)))
|
||||
(a3-0 (the-as uint (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8)))
|
||||
(v1-55 (+ (the-as int a2-1) 312))
|
||||
(a0-35 (+ (the-as int a3-0) 312))
|
||||
(a1-6 (the-as object (-> arg0 base)))
|
||||
)
|
||||
(set! (-> (the-as (inline-array vector4w) a1-6) 0 quad) (-> this sprite-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (inline-array vector4w) a1-6) 1 quad) (-> this sprite-tmpl quad 1))
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 2)
|
||||
(the-as int (-> s1-0 r))
|
||||
(the-as int (-> s1-0 g))
|
||||
(the-as int (-> s1-0 b))
|
||||
128
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-6) 3) (the-as int a2-1) (the-as int a3-0) 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 4)
|
||||
(the int (* 16.0 (-> s2-0 x)))
|
||||
(the int (* 16.0 (-> s2-0 y)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> (the-as (inline-array vector4w) a1-6) 5) v1-55 a0-35 0 0)
|
||||
(set-vector!
|
||||
(-> (the-as (inline-array vector4w) a1-6) 6)
|
||||
(the int (* 16.0 (-> s3-2 x)))
|
||||
(the int (* 16.0 (-> s3-2 y)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod initialize ((this bigmap))
|
||||
(set! (-> this bigmap-index) (bigmap-id city))
|
||||
(set-pending-file (-> this bigmap-image) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update ((this bigmap))
|
||||
(when (-> this drawing-flag)
|
||||
(update! *minimap*)
|
||||
(cond
|
||||
((= (-> *blit-displays-work* count-down) 1)
|
||||
(set-pending-file
|
||||
(-> this bigmap-image)
|
||||
"world-map"
|
||||
(the-as int (-> this load-index))
|
||||
(process->handle *dproc*)
|
||||
0.0
|
||||
)
|
||||
(set-pending-file (-> this tpage) "progress-minimap" 0 (process->handle *dproc*) 0.0)
|
||||
(set-pending-file (-> this tpage2) "progress-minimap" 1 (process->handle *dproc*) 0.0)
|
||||
(set! (-> this loading-flag) #t)
|
||||
)
|
||||
(else
|
||||
(update (-> this bigmap-image))
|
||||
(update (-> this tpage))
|
||||
(update (-> this tpage2))
|
||||
(when (and (-> this loading-flag)
|
||||
(= (file-status (-> this bigmap-image) "world-map" (the-as int (-> this load-index))) 'active)
|
||||
(= (file-status (-> this tpage) "progress-minimap" 0) 'active)
|
||||
(= (file-status (-> this tpage2) "progress-minimap" 1) 'active)
|
||||
(not (load-in-progress? *level*))
|
||||
)
|
||||
(let ((s5-0 (-> *level* loading-level))
|
||||
(s4-0 (-> *texture-pool* allocate-func))
|
||||
(s3-0 (-> *texture-relocate-later* memcpy))
|
||||
(s2-0 loading-level)
|
||||
)
|
||||
(set! (-> *texture-pool* allocate-func) texture-page-common-boot-allocate)
|
||||
(set! (-> *level* loading-level) #f)
|
||||
(set! (-> *texture-relocate-later* memcpy) #f)
|
||||
(set! loading-level (-> this tpage heap))
|
||||
(set! (-> this progress-minimap)
|
||||
(the-as
|
||||
texture-page
|
||||
(link (-> this tpage buf) (-> this tpage load-file data) (-> this tpage len) (-> this tpage heap) 4)
|
||||
)
|
||||
)
|
||||
(set! (-> this progress-minimap2)
|
||||
(the-as
|
||||
texture-page
|
||||
(link (-> this tpage2 buf) (-> this tpage2 load-file data) (-> this tpage2 len) (-> this tpage2 heap) 4)
|
||||
)
|
||||
)
|
||||
(set! (-> *level* loading-level) s5-0)
|
||||
(set! (-> *texture-pool* allocate-func) s4-0)
|
||||
(set! (-> *texture-relocate-later* memcpy) s3-0)
|
||||
(set! loading-level s2-0)
|
||||
)
|
||||
(set! (-> this loading-flag) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type bigmap
|
||||
;; WARN: Return type mismatch texture-page vs symbol.
|
||||
(defmethod loaded? ((this bigmap))
|
||||
(the-as symbol (and (-> *bigmap* progress-minimap) (-> *bigmap* progress-minimap2)))
|
||||
)
|
||||
|
||||
;; definition for method 12 of type bigmap
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod draw! ((this bigmap) (arg0 int) (arg1 int) (arg2 int) (arg3 int))
|
||||
(local-vars
|
||||
(sv-96 (inline-array vector4w))
|
||||
(sv-100 texture)
|
||||
(sv-104 matrix)
|
||||
(sv-112 int)
|
||||
(sv-120 float)
|
||||
(sv-240 (function bigmap vector none))
|
||||
)
|
||||
(when (and (= (file-status (-> this bigmap-image) "world-map" (the-as int (-> this load-index))) 'active)
|
||||
(not (-> this loading-flag))
|
||||
)
|
||||
(with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
(dma-buffer-add-gs-set s2-0
|
||||
(scissor-1 (new 'static 'gs-scissor
|
||||
:scax0 (+ arg0 -1792)
|
||||
:scay0 (+ arg1 -1840)
|
||||
:scax1 (+ arg2 -1792)
|
||||
:scay1 (+ arg3 -1840)
|
||||
)
|
||||
)
|
||||
(test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always)))
|
||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
|
||||
)
|
||||
(let ((v1-14 (the-as object (-> this bigmap-image art-group)))
|
||||
(f0-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(set! (-> this scroll x)
|
||||
(fmax 0.0 (fmin (-> this scroll x) (the float (+ (-> (the-as (pointer uint32) v1-14) 2) -513))))
|
||||
)
|
||||
(set! (-> this scroll y)
|
||||
(fmax
|
||||
0.0
|
||||
(fmin (-> this scroll y) (+ (- -1.0 (* 416.0 f0-0)) (the float (-> (the-as (pointer uint32) v1-14) 3))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! (-> this x0) (+ arg2 -1792))
|
||||
(set! (-> this x1) (+ arg0 -1792))
|
||||
)
|
||||
(else
|
||||
(set! (-> this x0) (+ arg0 -1792))
|
||||
(set! (-> this x1) (+ arg2 -1792))
|
||||
)
|
||||
)
|
||||
(set! (-> this y0) arg1)
|
||||
(set! (-> this y1) arg3)
|
||||
(bigmap-method-20 this s2-0)
|
||||
(when (!= (-> this load-index) (bigmap-id none))
|
||||
(when (= (-> this y0) 1840)
|
||||
(let ((s0-1 (-> s2-0 base))
|
||||
(s1-1 (lookup-texture-by-id-fast (new 'static 'texture-id :index #x4 :page #x11)))
|
||||
)
|
||||
(when s1-1
|
||||
(set! (-> (the-as (pointer uint128) s0-1) 0) (-> this adgif-tmpl dma-vif quad))
|
||||
(set! (-> (the-as (pointer uint128) s0-1) 1) (-> this adgif-tmpl quad 1))
|
||||
(adgif-shader<-texture-simple! (the-as adgif-shader (&+ s0-1 32)) s1-1)
|
||||
(&+! (-> s2-0 base) 112)
|
||||
)
|
||||
(if (not s1-1)
|
||||
(format 0 "ERROR: bigmap: mini-map-icons texture is #f~%")
|
||||
)
|
||||
)
|
||||
(let ((s1-2 (-> *minimap* engine alive-list)))
|
||||
(while s1-2
|
||||
(let ((a2-11 s1-2))
|
||||
(when (logtest? (-> a2-11 class flags) (minimap-flag bigmap bigmap-only))
|
||||
(if (not (and (logtest? (minimap-flag local-only) (-> a2-11 class flags))
|
||||
(not (logtest? (the-as minimap-flag (logand (bigmap-flag ctywide waswide wasall desert) (-> this global-flags)))
|
||||
(-> a2-11 class flags)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(draw-from-minimap this s2-0 a2-11)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s1-2 (-> s1-2 next))
|
||||
)
|
||||
)
|
||||
(let ((s1-3 (new 'stack-no-clear 'vector))
|
||||
(f30-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(vector-z-quaternion! s1-3 (-> *target* control quat))
|
||||
(vector-xz-normalize! s1-3 -1.0)
|
||||
(set! (-> s1-3 y) 0.0)
|
||||
(set! (-> s1-3 w) 0.0)
|
||||
(set! sv-96 (the-as (inline-array vector4w) (-> s2-0 base)))
|
||||
(set! sv-100 (lookup-texture-by-id-fast (new 'static 'texture-id :index #x1 :page #x11)))
|
||||
(set! sv-104 (new 'stack-no-clear 'matrix))
|
||||
(set! sv-112 (the int (* 56.0 f30-0)))
|
||||
(set! sv-120 (-> *video-params* relative-x-scale-reciprical))
|
||||
(when sv-100
|
||||
(let ((s0-2 this))
|
||||
(set! sv-240 (method-of-object s0-2 set-pos!))
|
||||
(let ((a1-29 (target-pos 0)))
|
||||
(sv-240 s0-2 a1-29)
|
||||
)
|
||||
)
|
||||
(let ((s0-3 (new 'stack 'vector4w)))
|
||||
0.0
|
||||
(set! (-> s0-3 quad) (-> this pos quad))
|
||||
(bigmap-method-18 this (the-as (pointer int32) s0-3))
|
||||
(let ((f0-15 (cond
|
||||
((get-horizontal-flip-flag *blit-displays-work*)
|
||||
(set! f30-0 (- f30-0))
|
||||
(+ (the float (+ (- 2304 (-> s0-3 x)) (-> this x1))) (-> this scroll x))
|
||||
)
|
||||
(else
|
||||
(- (the float (+ (-> s0-3 x) 1792 (-> this x0))) (-> this scroll x))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-vector! (-> sv-104 rvec) (* (-> s1-3 z) f30-0) 0.0 (- (-> s1-3 x)) 0.0)
|
||||
(set-vector! (-> sv-104 uvec) 0.0 1.0 0.0 0.0)
|
||||
(set-vector! (-> sv-104 fvec) (* (-> s1-3 x) f30-0) 0.0 (-> s1-3 z) 1.0)
|
||||
(set-vector!
|
||||
(-> sv-104 trans)
|
||||
f0-15
|
||||
0.0
|
||||
(+ 1840.0 (* (- (the float (-> s0-3 y)) (-> this scroll y)) sv-120))
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((v1-83 (mod (-> *display* real-clock frame-counter) 360))
|
||||
(f0-26 (+ 1.5 (* 0.25 (cos (* 182.04445 (the float v1-83))))))
|
||||
(f0-27 (* 7.0 f0-26))
|
||||
)
|
||||
(cond
|
||||
((or (= (-> this load-index) (bigmap-id sewer-met-hum)) (= (-> this load-index) (bigmap-id sewer-hum-kg)))
|
||||
(set-vector! (-> this corner 0) (- f0-27) 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 1) 0.0 0.0 f0-27 1.0)
|
||||
(set-vector! (-> this corner 2) 0.0 0.0 (- f0-27) 1.0)
|
||||
(set-vector! (-> this corner 3) f0-27 0.0 0.0 1.0)
|
||||
)
|
||||
(else
|
||||
(set-vector! (-> this corner 0) 0.0 0.0 (- f0-27) 1.0)
|
||||
(set-vector! (-> this corner 1) f0-27 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 2) (- f0-27) 0.0 0.0 1.0)
|
||||
(set-vector! (-> this corner 3) 0.0 0.0 f0-27 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-matrix*! (the-as vector (-> this corner)) (the-as vector (-> this corner)) sv-104)
|
||||
(vector-matrix*! (-> this corner 1) (-> this corner 1) sv-104)
|
||||
(vector-matrix*! (-> this corner 2) (-> this corner 2) sv-104)
|
||||
(vector-matrix*! (-> this corner 3) (-> this corner 3) sv-104)
|
||||
(let ((v1-97 (-> this adgif-tmpl dma-vif quad)))
|
||||
(set! (-> sv-96 0 quad) v1-97)
|
||||
)
|
||||
(let ((v1-98 (-> this adgif-tmpl quad 1)))
|
||||
(set! (-> sv-96 1 quad) v1-98)
|
||||
)
|
||||
(adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-96 2)) sv-100)
|
||||
(let ((v1-100 (-> this draw-tmpl dma-vif quad)))
|
||||
(set! (-> sv-96 7 quad) v1-100)
|
||||
)
|
||||
(let ((v1-101 (-> this draw-tmpl quad 1)))
|
||||
(set! (-> sv-96 8 quad) v1-101)
|
||||
)
|
||||
(set-vector! (-> sv-96 9) 0 255 255 128)
|
||||
(set-vector! (-> sv-96 10) 0 0 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 11)
|
||||
(the int (* 16.0 (-> this corner 0 x)))
|
||||
(the int (* 16.0 (-> this corner 0 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 12) 256 0 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 13)
|
||||
(the int (* 16.0 (-> this corner 1 x)))
|
||||
(the int (* 16.0 (-> this corner 1 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 14) 0 256 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 15)
|
||||
(the int (* 16.0 (-> this corner 2 x)))
|
||||
(the int (* 16.0 (-> this corner 2 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(set-vector! (-> sv-96 16) 256 256 0 0)
|
||||
(set-vector!
|
||||
(-> sv-96 17)
|
||||
(the int (* 16.0 (-> this corner 3 x)))
|
||||
(the int (* 16.0 (-> this corner 3 z)))
|
||||
#xffffff
|
||||
0
|
||||
)
|
||||
(&+! (-> s2-0 base) 288)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dma-buffer-add-gs-set s2-0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1ff :scay1 #x19f)))
|
||||
)
|
||||
(when (= (-> this load-index) (bigmap-id none))
|
||||
(let ((s3-1
|
||||
(new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning))
|
||||
)
|
||||
)
|
||||
(let ((f30-2 (* 0.0024038462 (the float (- arg3 arg1)))))
|
||||
(let ((v1-138 s3-1))
|
||||
(set! (-> v1-138 scale) f30-2)
|
||||
)
|
||||
(let ((v1-139 s3-1))
|
||||
(set! (-> v1-139 width) (the float (the int (* 400.0 f30-2))))
|
||||
)
|
||||
(let ((a0-100 s3-1))
|
||||
(set! (-> a0-100 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(let ((s5-1 print-game-text))
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id map-data-unavailable) #f))
|
||||
(let* ((f0-63 (s5-1 *temp-string* s3-1 #t 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(v1-142 s3-1)
|
||||
(a0-106 (- 256 (the int (* 200.0 f30-2))))
|
||||
(a1-52 (- 208 (the int (* 0.5 f0-63))))
|
||||
)
|
||||
(set! (-> v1-142 origin x) (the float a0-106))
|
||||
(set! (-> v1-142 origin y) (the float a1-52))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s5-2 print-game-text))
|
||||
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id map-data-unavailable) #f))
|
||||
(s5-2 *temp-string* s3-1 #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! (-> this goal-time) (* 16.0 (seconds-per-frame)))
|
||||
(set-dirty-mask! (-> *level* level-default) 4 #x1a400 0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod handle-cpad-input ((this bigmap))
|
||||
(let ((v1-1 (-> this bigmap-image art-group))
|
||||
(s5-0 (-> *cpad-list* cpads 0))
|
||||
)
|
||||
(when v1-1
|
||||
(let ((f30-0 (analog-input (the-as int (-> s5-0 leftx)) 128.0 32.0 110.0 4.0))
|
||||
(f0-0 (analog-input (the-as int (-> s5-0 lefty)) 128.0 32.0 110.0 4.0))
|
||||
)
|
||||
(+! (-> this scroll x) f30-0)
|
||||
(+! (-> this scroll y) f0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type bigmap
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-map-indices! ((this bigmap))
|
||||
(let ((s5-0 (level-get-target-inside *level*)))
|
||||
(let ((v1-2 (-> *setting-control* user-current bigmap-level)))
|
||||
(cond
|
||||
(v1-2
|
||||
(cond
|
||||
((= v1-2 'city)
|
||||
(set! (-> this bigmap-index) (bigmap-id city))
|
||||
0
|
||||
)
|
||||
((= v1-2 'comb)
|
||||
(set! (-> this bigmap-index) (bigmap-id comb))
|
||||
)
|
||||
((= v1-2 'desert)
|
||||
(set! (-> this bigmap-index) (bigmap-id desert))
|
||||
)
|
||||
((= v1-2 'factory)
|
||||
(set! (-> this bigmap-index) (bigmap-id factory))
|
||||
)
|
||||
((= v1-2 'forest)
|
||||
(set! (-> this bigmap-index) (bigmap-id forest))
|
||||
)
|
||||
((= v1-2 'metalhead-city)
|
||||
(set! (-> this bigmap-index) (bigmap-id mhcity))
|
||||
)
|
||||
((= v1-2 'mine)
|
||||
(set! (-> this bigmap-index) (bigmap-id mine))
|
||||
)
|
||||
((= v1-2 'nest)
|
||||
(set! (-> this bigmap-index) (bigmap-id nest))
|
||||
)
|
||||
((= v1-2 'nest2)
|
||||
(set! (-> this bigmap-index) (bigmap-id nest2))
|
||||
)
|
||||
((= v1-2 'none)
|
||||
(set! (-> this bigmap-index) (bigmap-id none))
|
||||
)
|
||||
((= v1-2 'precursor1)
|
||||
(set! (-> this bigmap-index) (bigmap-id precursor1))
|
||||
)
|
||||
((= v1-2 'precursor2)
|
||||
(set! (-> this bigmap-index) (bigmap-id precursor2))
|
||||
)
|
||||
((= v1-2 'rubble)
|
||||
(set! (-> this bigmap-index) (bigmap-id rubble))
|
||||
)
|
||||
((= v1-2 'sewer-hum-kg)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-hum-kg))
|
||||
)
|
||||
((= v1-2 'sewer-kg-met)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-kg-met))
|
||||
)
|
||||
((= v1-2 'sewer-met-hum)
|
||||
(set! (-> this bigmap-index) (bigmap-id sewer-met-hum))
|
||||
)
|
||||
((= v1-2 'stadium)
|
||||
(set! (-> this bigmap-index) (bigmap-id stadium))
|
||||
)
|
||||
((= v1-2 'temple1)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple1))
|
||||
)
|
||||
((= v1-2 'temple2)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple2))
|
||||
)
|
||||
((= v1-2 'temple3)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple3))
|
||||
)
|
||||
((= v1-2 'temple4)
|
||||
(set! (-> this bigmap-index) (bigmap-id temple4))
|
||||
)
|
||||
((= v1-2 'tower)
|
||||
(set! (-> this bigmap-index) (bigmap-id tower))
|
||||
)
|
||||
((= v1-2 'volcano)
|
||||
(set! (-> this bigmap-index) (bigmap-id volcano))
|
||||
)
|
||||
((= v1-2 'wascity)
|
||||
(set! (-> this bigmap-index) (bigmap-id wascity))
|
||||
)
|
||||
)
|
||||
)
|
||||
(s5-0
|
||||
(set! (-> this bigmap-index) (-> s5-0 info bigmap-id))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)
|
||||
(not (or (= (-> s5-0 name) 'mhcitya) (= (-> s5-0 name) 'mhcityb)))
|
||||
)
|
||||
(set! (-> this bigmap-index) (-> ctyport bigmap-id))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> this bigmap-index) (bigmap-id temple1))
|
||||
(cond
|
||||
((task-node-closed? (game-task-node factory-boss-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple4))
|
||||
)
|
||||
((task-node-closed? (game-task-node desert-oasis-defense-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple3))
|
||||
)
|
||||
((task-node-closed? (game-task-node volcano-darkeco-resolution))
|
||||
(set! (-> this load-index) (bigmap-id temple2))
|
||||
)
|
||||
(else
|
||||
(set! (-> this load-index) (bigmap-id temple1))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> this bigmap-index) (bigmap-id precursor1))
|
||||
(if (task-node-closed? (game-task-node comb-wild-ride-resolution))
|
||||
(set! (-> this load-index) (bigmap-id precursor2))
|
||||
(set! (-> this load-index) (bigmap-id precursor1))
|
||||
)
|
||||
)
|
||||
((= (-> this bigmap-index) (bigmap-id nest))
|
||||
(if (task-node-closed? (game-task-node nest-eggs-gas))
|
||||
(set! (-> this load-index) (bigmap-id nest2))
|
||||
(set! (-> this load-index) (bigmap-id nest))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> this load-index) (-> this bigmap-index))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type bigmap
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch bigmap-flag vs none.
|
||||
(defmethod enable-drawing ((this bigmap))
|
||||
(set-map-indices! this)
|
||||
(set! (-> this offset quad) (-> *bigmap-info-array* data (-> this load-index) quad))
|
||||
(let ((s4-0 (target-pos 0))
|
||||
(s5-0 (-> this offset))
|
||||
)
|
||||
(cond
|
||||
((= (-> this load-index) (bigmap-id sewer-hum-kg))
|
||||
(let ((a0-10 (level-get *level* 'sewa)))
|
||||
(if a0-10
|
||||
(set! (-> a0-10 info bigmap-id) (bigmap-id sewer-hum-kg))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 y) (-> s5-0 y)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (- 624.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
)
|
||||
((= (-> this load-index) (bigmap-id sewer-kg-met))
|
||||
(let ((a0-14 (level-get *level* 'sewa)))
|
||||
(if a0-14
|
||||
(set! (-> a0-14 info bigmap-id) (bigmap-id sewer-kg-met))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (+ -208.0 (* (- (-> s4-0 z) (-> s5-0 y)) (-> s5-0 w))))
|
||||
)
|
||||
((= (-> this load-index) (bigmap-id sewer-met-hum))
|
||||
(let ((a0-18 (level-get *level* 'sewa)))
|
||||
(if a0-18
|
||||
(set! (-> a0-18 info bigmap-id) (bigmap-id sewer-met-hum))
|
||||
)
|
||||
)
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 y) (-> s5-0 y)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (- 624.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
)
|
||||
(else
|
||||
(set! (-> this scroll x) (+ -256.0 (* (- (-> s4-0 x) (-> s5-0 x)) (-> s5-0 w))))
|
||||
(set! (-> this scroll y) (+ -208.0 (* (- (-> s4-0 z) (-> s5-0 y)) (-> s5-0 w))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this drawing-flag) #t)
|
||||
(set! (-> this loading-flag) #f)
|
||||
(set! (-> this global-flags) (bigmap-flag))
|
||||
(if (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag ctywide))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'waswide #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag wasall))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'wasall #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag waswide))
|
||||
)
|
||||
(if (= (status-of-level-and-borrows *level* 'desert #f) 'active)
|
||||
(logior! (-> this global-flags) (bigmap-flag desert))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type bigmap
|
||||
(defmethod disable-drawing ((this bigmap))
|
||||
(set-pending-file
|
||||
(-> this bigmap-image)
|
||||
(the-as string #f)
|
||||
(the-as int (-> this bigmap-index))
|
||||
(process->handle *dproc*)
|
||||
0.0
|
||||
)
|
||||
(set-pending-file (-> this tpage) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
(set-pending-file (-> this tpage2) (the-as string #f) 0 (process->handle *dproc*) 0.0)
|
||||
(let ((v1-12 #f))
|
||||
(while (not v1-12)
|
||||
(update (-> this bigmap-image))
|
||||
(update (-> this tpage))
|
||||
(update (-> this tpage2))
|
||||
(set! v1-12 (and (= (-> this bigmap-image status) 'inactive)
|
||||
(= (-> this tpage status) 'inactive)
|
||||
(= (-> this tpage2 status) 'inactive)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (-> this progress-minimap)
|
||||
(unload-page *texture-pool* (-> this progress-minimap))
|
||||
(set! (-> (&-> *level* level-default texture-page 6) 0) (the-as texture-page 0))
|
||||
(set! (-> this progress-minimap) #f)
|
||||
)
|
||||
(when (-> this progress-minimap2)
|
||||
(unload-page *texture-pool* (-> this progress-minimap2))
|
||||
(set! (-> (&-> *level* level-default texture-page 3) 0) (the-as texture-page 0))
|
||||
(set! (-> this progress-minimap2) #f)
|
||||
)
|
||||
(set! (-> this drawing-flag) #f)
|
||||
(set! (-> this loading-flag) #f)
|
||||
0
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(kmemopen global "bigmap-struct")
|
||||
|
||||
;; definition for symbol *bigmap*, type bigmap
|
||||
(define *bigmap* (new 'global 'bigmap))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(kmemclose)
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak3/engine/ui/minimap_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/ui/minimap_REF.gc
generated
vendored
@ -1937,7 +1937,7 @@
|
||||
)
|
||||
(while s3-0
|
||||
(let ((s4-0 (-> s3-0 next)))
|
||||
(when (or (bigmap-method-11 *bigmap*) (not (paused?)))
|
||||
(when (or (loaded? *bigmap*) (not (paused?)))
|
||||
(cond
|
||||
((logtest? (-> s3-0 flags) (minimap-flag fade-out))
|
||||
(logclear! (-> s3-0 flags) (minimap-flag fade-in))
|
||||
|
10
test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc
generated
vendored
10
test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc
generated
vendored
@ -2549,7 +2549,7 @@
|
||||
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))))
|
||||
(set! (-> arg1 alpha) f30-0)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -2588,7 +2588,7 @@
|
||||
(set! (-> a0-2 flags) (font-flags kerning middle large))
|
||||
)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
((begin
|
||||
@ -2685,7 +2685,7 @@
|
||||
(set! (-> arg1 alpha) f30-0)
|
||||
(progress-method-33 arg0 (-> *progress-work* body))
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -2880,7 +2880,7 @@
|
||||
(f24-0 (-> *video-params* relative-x-scale))
|
||||
)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
@ -4803,7 +4803,7 @@
|
||||
(set! sv-24 (the int (-> *game-info* skill)))
|
||||
(set! (-> arg1 alpha) sv-16)
|
||||
(cond
|
||||
((not (bigmap-method-11 *bigmap*))
|
||||
((not (loaded? *bigmap*))
|
||||
(progress-method-51 arg0 arg1)
|
||||
)
|
||||
(else
|
||||
|
68
test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc
generated
vendored
68
test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc
generated
vendored
@ -1566,13 +1566,7 @@
|
||||
(progress-method-33 self (-> *progress-work* full-screen))
|
||||
(cond
|
||||
((>= (-> self pos-transition) 0.38)
|
||||
(let ((t9-15 (method-of-object *bigmap* bigmap-method-12)))
|
||||
1792
|
||||
1840
|
||||
2304
|
||||
2256
|
||||
(t9-15)
|
||||
)
|
||||
(draw! *bigmap* 1792 1840 2304 2256)
|
||||
)
|
||||
(else
|
||||
(let ((s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21)))
|
||||
@ -1582,15 +1576,9 @@
|
||||
(set! (-> gp-1 quad) (the-as uint128 0))
|
||||
(let ((s5-2 (new 'stack-no-clear 'vector4w)))
|
||||
(set! (-> s5-2 quad) (the-as uint128 0))
|
||||
(when (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1))
|
||||
(let ((t9-20 (method-of-object *bigmap* bigmap-method-12)))
|
||||
(/ (-> s5-2 x) 16)
|
||||
(/ (-> s5-2 y) 16)
|
||||
(/ (-> gp-1 x) 16)
|
||||
(/ (-> gp-1 y) 16)
|
||||
(t9-20)
|
||||
(if (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1))
|
||||
(draw! *bigmap* (/ (-> s5-2 x) 16) (/ (-> s5-2 y) 16) (/ (-> gp-1 x) 16) (/ (-> gp-1 y) 16))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1661,64 +1649,64 @@
|
||||
(let ((t9-0 format)
|
||||
(a0-3 #t)
|
||||
(a1-1 "DONE NOTIFY: ~S ~S~%")
|
||||
(v1-3 (-> block param 1))
|
||||
(v1-3 (the-as mc-status-code (-> block param 1)))
|
||||
)
|
||||
(t9-0
|
||||
a0-3
|
||||
a1-1
|
||||
(cond
|
||||
((= v1-3 15)
|
||||
((= v1-3 (mc-status-code bad-version))
|
||||
"bad-version"
|
||||
)
|
||||
((= v1-3 13)
|
||||
((= v1-3 (mc-status-code no-save))
|
||||
"no-save"
|
||||
)
|
||||
((= v1-3 10)
|
||||
((= v1-3 (mc-status-code no-last))
|
||||
"no-last"
|
||||
)
|
||||
((= v1-3 14)
|
||||
((= v1-3 (mc-status-code no-space))
|
||||
"no-space"
|
||||
)
|
||||
((= v1-3 4)
|
||||
((= v1-3 (mc-status-code internal-error))
|
||||
"internal-error"
|
||||
)
|
||||
((= v1-3 8)
|
||||
((= v1-3 (mc-status-code no-memory))
|
||||
"no-memory"
|
||||
)
|
||||
((= v1-3 2)
|
||||
((= v1-3 (mc-status-code bad-handle))
|
||||
"bad-handle"
|
||||
)
|
||||
((zero? v1-3)
|
||||
((= v1-3 (mc-status-code busy))
|
||||
"busy"
|
||||
)
|
||||
((= v1-3 5)
|
||||
((= v1-3 (mc-status-code write-error))
|
||||
"write-error"
|
||||
)
|
||||
((= v1-3 6)
|
||||
((= v1-3 (mc-status-code read-error))
|
||||
"read-error"
|
||||
)
|
||||
((= v1-3 9)
|
||||
((= v1-3 (mc-status-code no-card))
|
||||
"no-card"
|
||||
)
|
||||
((= v1-3 11)
|
||||
((= v1-3 (mc-status-code no-format))
|
||||
"no-format"
|
||||
)
|
||||
((= v1-3 1)
|
||||
((= v1-3 (mc-status-code ok))
|
||||
"ok"
|
||||
)
|
||||
((= v1-3 16)
|
||||
((= v1-3 (mc-status-code no-process))
|
||||
"no-process"
|
||||
)
|
||||
((= v1-3 17)
|
||||
((= v1-3 (mc-status-code no-auto-save))
|
||||
"no-auto-save"
|
||||
)
|
||||
((= v1-3 12)
|
||||
((= v1-3 (mc-status-code no-file))
|
||||
"no-file"
|
||||
)
|
||||
((= v1-3 3)
|
||||
((= v1-3 (mc-status-code format-failed))
|
||||
"format-failed"
|
||||
)
|
||||
((= v1-3 7)
|
||||
((= v1-3 (mc-status-code new-game))
|
||||
"new-game"
|
||||
)
|
||||
(else
|
||||
@ -1944,7 +1932,7 @@
|
||||
;; definition for method 9 of type menu-slider-option
|
||||
(defmethod respond-progress ((this menu-slider-option) (arg0 progress) (arg1 symbol))
|
||||
(with-pp
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(let ((s5-0 (&+ (the-as (pointer float) *setting-control*) (-> this setting-offset)))
|
||||
(s3-0 #f)
|
||||
)
|
||||
@ -2001,7 +1989,7 @@
|
||||
|
||||
;; definition for method 9 of type menu-stereo-mode-sound-option
|
||||
(defmethod respond-progress ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol))
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(let ((a0-2 (-> *setting-control* user-default stereo-mode))
|
||||
(v1-4 #f)
|
||||
)
|
||||
@ -2282,7 +2270,7 @@
|
||||
(set-next-state arg0 a1-3 0)
|
||||
)
|
||||
(set! (-> arg0 selected-option) #f)
|
||||
(when (bigmap-method-11 *bigmap*)
|
||||
(when (loaded? *bigmap*)
|
||||
(cond
|
||||
((cpad-pressed? 0 triangle)
|
||||
)
|
||||
@ -3096,7 +3084,7 @@
|
||||
|
||||
;; definition for method 9 of type menu-bigmap-option
|
||||
(defmethod respond-progress ((this menu-bigmap-option) (arg0 progress) (arg1 symbol))
|
||||
((method-of-object *bigmap* bigmap-method-13))
|
||||
(handle-cpad-input *bigmap*)
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm))
|
||||
0
|
||||
@ -4251,3 +4239,7 @@
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
6
test/decompiler/reference/jak3/levels/title/title-obs_REF.gc
generated
vendored
6
test/decompiler/reference/jak3/levels/title/title-obs_REF.gc
generated
vendored
@ -573,7 +573,7 @@
|
||||
(set! (-> t0-2 y) 1.0)
|
||||
(set! (-> t0-2 z) 0.0)
|
||||
(set! (-> t0-2 w) 1.0)
|
||||
(t9-6 (the-as bucket-id a0-31) (the-as art-group a1-15) (the-as int a2-5) a3-7 t0-2 (-> self level) 8)
|
||||
(t9-6 a0-31 (the-as bucket-id a1-15) a2-5 a3-7 t0-2 (-> self level) 8)
|
||||
)
|
||||
(set! (-> self active) #t)
|
||||
)
|
||||
@ -2738,3 +2738,7 @@
|
||||
)
|
||||
:post target-no-move-post
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/levels/wascity/wasall-tasks_REF.gc
generated
vendored
@ -280,7 +280,7 @@
|
||||
(logior! (-> this minimap-temple flags) (minimap-flag fade-out))
|
||||
(set! (-> this minimap-temple) #f)
|
||||
)
|
||||
(bigmap-method-16 *bigmap*)
|
||||
(set-map-indices! *bigmap*)
|
||||
(when (and (not (-> this rod-of-god))
|
||||
(!= (-> *bigmap* load-index) 18)
|
||||
(!= (-> *bigmap* load-index) 19)
|
||||
|
Loading…
Reference in New Issue
Block a user