mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
parent
fd7d9c3df5
commit
e443676889
|
@ -3702,8 +3702,10 @@ ConstantTokenElement* DerefElement::try_as_art_const(const Env& env, FormPool& p
|
|||
if (elt_name) {
|
||||
return pool.alloc_element<ConstantTokenElement>(*elt_name);
|
||||
} else {
|
||||
lg::error("function {}: did not find art element {} in {}", env.func->name(),
|
||||
mr.maps.ints.at(0), env.art_group());
|
||||
if (env.version != GameVersion::Jak2) {
|
||||
lg::error("function {}: did not find art element {} in {}", env.func->name(),
|
||||
mr.maps.ints.at(0), env.art_group());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "common/log/log.h"
|
||||
#include "common/util/BitUtils.h"
|
||||
#include "common/util/Range.h"
|
||||
#include "common/util/print_float.h"
|
||||
|
||||
#include "decompiler/Function/Function.h"
|
||||
#include "decompiler/IR2/Form.h"
|
||||
|
@ -44,7 +45,12 @@ goos::Object BitfieldStaticDefElement::to_form_internal(const Env& env) const {
|
|||
auto def_as_atom = form_as_atom(def.value);
|
||||
if (def_as_atom && def_as_atom->is_int()) {
|
||||
u64 v = def_as_atom->get_int();
|
||||
if (def.is_signed) {
|
||||
if (def.is_float) {
|
||||
float vf;
|
||||
memcpy(&vf, &v, 4);
|
||||
result.push_back(pretty_print::to_symbol(
|
||||
fmt::format(":{} {}", def.field_name, float_to_string(vf, true))));
|
||||
} else if (def.is_signed) {
|
||||
result.push_back(pretty_print::to_symbol(fmt::format(":{} {}", def.field_name, (s64)v)));
|
||||
} else {
|
||||
result.push_back(pretty_print::to_symbol(fmt::format(":{} #x{:x}", def.field_name, v)));
|
||||
|
@ -709,6 +715,7 @@ BitFieldDef BitFieldDef::from_constant(const BitFieldConstantDef& constant, Form
|
|||
BitFieldDef bfd;
|
||||
bfd.field_name = constant.field_name;
|
||||
bfd.is_signed = constant.is_signed;
|
||||
bfd.is_float = constant.is_float;
|
||||
if (constant.nested_field) {
|
||||
std::vector<BitFieldDef> defs;
|
||||
for (auto& x : constant.nested_field->fields) {
|
||||
|
|
|
@ -119,6 +119,7 @@ class BitfieldAccessElement : public FormElement {
|
|||
|
||||
struct BitFieldDef {
|
||||
bool is_signed = false;
|
||||
bool is_float = false;
|
||||
Form* value = nullptr;
|
||||
std::string field_name;
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ struct LetRewriteStats {
|
|||
int case_with_else = 0;
|
||||
int set_vector = 0;
|
||||
int set_vector2 = 0;
|
||||
int set_vector3 = 0;
|
||||
int send_event = 0;
|
||||
int font_context_meth = 0;
|
||||
int proc_new = 0;
|
||||
|
@ -91,6 +92,7 @@ struct LetRewriteStats {
|
|||
out += fmt::format(" ja: {}\n", ja);
|
||||
out += fmt::format(" set_vector: {}\n", set_vector);
|
||||
out += fmt::format(" set_vector2: {}\n", set_vector2);
|
||||
out += fmt::format(" set_vector3: {}\n", set_vector3);
|
||||
out += fmt::format(" case_no_else: {}\n", case_no_else);
|
||||
out += fmt::format(" case_with_else: {}\n", case_with_else);
|
||||
out += fmt::format(" unused: {}\n", unused);
|
||||
|
|
|
@ -801,6 +801,50 @@ FormElement* rewrite_set_vector(LetElement* in, const Env& env, FormPool& pool)
|
|||
return pool.alloc_element<GenericElement>(op, args);
|
||||
}
|
||||
|
||||
FormElement* rewrite_set_vector_3(LetElement* in, const Env& env, FormPool& pool) {
|
||||
if (in->entries().size() != 1) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto in_vec = env.get_variable_name(in->entries().at(0).dest);
|
||||
|
||||
auto& body_elts = in->body()->elts();
|
||||
if (body_elts.size() != 4) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<Form*> sources;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto elt_as_form_form = dynamic_cast<SetFormFormElement*>(body_elts.at(i));
|
||||
if (!elt_as_form_form) {
|
||||
return nullptr;
|
||||
}
|
||||
auto dst = elt_as_form_form->dst();
|
||||
sources.push_back(elt_as_form_form->src());
|
||||
Matcher dst_matcher = Matcher::deref(Matcher::any_reg(0), false,
|
||||
{DerefTokenMatcher::string("vector4w"),
|
||||
DerefTokenMatcher::string(std::string(1, "xyzw"[i]))});
|
||||
auto mr = match(dst_matcher, dst);
|
||||
if (!mr.matched) {
|
||||
return nullptr;
|
||||
}
|
||||
if (in_vec != env.get_variable_name(*mr.maps.regs.at(0))) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Form*> args;
|
||||
args.push_back(pool.form<DerefElement>(in->entries().at(0).src, false,
|
||||
DerefToken::make_field_name("vector4w")));
|
||||
for (auto& src : sources) {
|
||||
args.push_back(src);
|
||||
}
|
||||
|
||||
auto op = GenericOperator::make_function(
|
||||
pool.alloc_single_element_form<ConstantTokenElement>(nullptr, "set-vector!"));
|
||||
return pool.alloc_element<GenericElement>(op, args);
|
||||
}
|
||||
|
||||
FormElement* rewrite_set_vector_2(LetElement* in, const Env& env, FormPool& pool) {
|
||||
if (in->entries().size() != 1) {
|
||||
return nullptr;
|
||||
|
@ -1737,6 +1781,12 @@ FormElement* rewrite_let(LetElement* in, const Env& env, FormPool& pool, LetRewr
|
|||
return as_set_vector2;
|
||||
}
|
||||
|
||||
auto as_set_vector3 = rewrite_set_vector_3(in, env, pool);
|
||||
if (as_set_vector3) {
|
||||
stats.set_vector3++;
|
||||
return as_set_vector3;
|
||||
}
|
||||
|
||||
auto as_abs_2 = fix_up_abs_2(in, env, pool);
|
||||
if (as_abs_2) {
|
||||
stats.abs2++;
|
||||
|
|
|
@ -1055,6 +1055,7 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
|||
case InstructionKind::PCGTW:
|
||||
case InstructionKind::PPACB:
|
||||
case InstructionKind::PADDW:
|
||||
case InstructionKind::PADDB:
|
||||
case InstructionKind::PEXTUB:
|
||||
case InstructionKind::PMULTH:
|
||||
case InstructionKind::PMADDH:
|
||||
|
|
|
@ -2712,7 +2712,7 @@
|
|||
(bucket-2 2)
|
||||
(bucket-3 3) ;; blit displays
|
||||
(tex-lcom-sky-pre 4) ;; tex
|
||||
(bucket-5 5) ;; sky
|
||||
(sky-draw 5) ;; sky
|
||||
(bucket-6 6) ;; ocean
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -5151,7 +5151,7 @@
|
|||
(func-id basic :offset 4)
|
||||
(init-func basic :offset-assert 8)
|
||||
(init-func-id basic :offset 8)
|
||||
(tex basic :offset-assert 12)
|
||||
(tex texture :offset-assert 12)
|
||||
(tex-name basic :offset-assert 16)
|
||||
(extra vector :inline :offset-assert 32)
|
||||
(color rgba :offset-assert 48)
|
||||
|
@ -5173,7 +5173,7 @@
|
|||
)
|
||||
|
||||
(deftype texture-anim-array (array)
|
||||
((array-data texture-anim :dynamic :inline :offset-assert 16)
|
||||
((array-data texture-anim :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x10
|
||||
|
@ -10129,7 +10129,7 @@
|
|||
(vec1 vector4w :inline :offset-assert 1568)
|
||||
(cloud-lights cloud-lights :inline :offset-assert 1584)
|
||||
(haze-lights haze-lights :inline :offset-assert 1744)
|
||||
(buf basic :offset-assert 1868)
|
||||
(buf dma-buffer :offset-assert 1868)
|
||||
(draw-vortex basic :offset-assert 1872)
|
||||
(stars vector 512 :inline :offset-assert 1888)
|
||||
)
|
||||
|
@ -10140,31 +10140,31 @@
|
|||
(init-sun-data! "Sets the sun related upload data - the sun, halo and aurora" (_type_ int float float float) none 9)
|
||||
(init-orbit-settings! (_type_ int float float float float float float) none 10)
|
||||
(update-colors-for-time (_type_ float) none 11)
|
||||
(update-time-and-speed (_type_ float float) none 12) ;; update time-of-day settings
|
||||
(update-time-and-speed (_type_ float float) none 12)
|
||||
(draw (_type_) none 13)
|
||||
(sky-work-method-14 () none 14)
|
||||
(sky-work-method-15 () none 15)
|
||||
(sky-work-method-16 () none 16)
|
||||
(sky-work-method-17 () none 17)
|
||||
(sky-work-method-18 () none 18)
|
||||
(sky-work-method-19 () none 19)
|
||||
(sky-work-method-20 () none 20)
|
||||
(sky-work-method-21 () none 21)
|
||||
(sky-work-method-22 () none 22)
|
||||
(sky-work-method-23 () none 23)
|
||||
(sky-work-method-24 () none 24)
|
||||
(sky-work-method-25 () none 25)
|
||||
(sky-work-method-26 () none 26)
|
||||
(sky-work-method-27 () none 27)
|
||||
(sky-work-method-28 () none 28)
|
||||
(sky-work-method-29 () none 29)
|
||||
(sky-work-method-30 () none 30)
|
||||
(sky-work-method-31 () none 31)
|
||||
(sky-work-method-32 () none 32)
|
||||
(sky-work-method-33 () none 33)
|
||||
(sky-work-method-34 () none 34)
|
||||
(sky-work-method-35 () none 35)
|
||||
(sky-work-method-36 () none 36)
|
||||
(update-matrix (_type_ matrix) none 14)
|
||||
(update-template-colors (_type_) none 15)
|
||||
(init-regs-for-large-polygon-draw (_type_) none 16)
|
||||
(init-regs-for-sky-asm (_type_) none 17)
|
||||
(cloud-vtx-light-update (_type_ vector vector cloud-lights vector vector) none 18)
|
||||
(cloud-vtx-tex-update (_type_ vector vector vector cloud-lights) none 19)
|
||||
(adjust-cloud-lighting (_type_) none 20)
|
||||
(cloud-vtx1-to-sky (_type_ sky-vertex cloud-vertex) none 21)
|
||||
(cloud-vtx2-to-sky (_type_ sky-vertex cloud-vertex) none 22)
|
||||
(draw-clouds (_type_ dma-buffer) none 23)
|
||||
(apply-haze-light (_type_ vector vector haze-lights) none 24)
|
||||
(adjust-haze-lighting (_type_) none 25)
|
||||
(haze-vtx-to-sky (_type_ sky-vertex sky-vertex haze-vertex) none 26)
|
||||
(draw-haze (_type_ dma-buffer) none 27)
|
||||
(sun-dma (_type_ dma-buffer) none 28)
|
||||
(green-sun-dma (_type_ dma-buffer) none 29)
|
||||
(moon-dma (_type_ dma-buffer) none 30)
|
||||
(setup-stars (_type_ matrix sky-upload-data) none 31)
|
||||
(stars-transform-asm (_type_) none 32)
|
||||
(stars-dma (_type_ dma-buffer) none 33)
|
||||
(draw-roof (_type_ dma-buffer) none 34)
|
||||
(draw-base (_type_ dma-buffer) none 35)
|
||||
(draw-fog (_type_ dma-buffer) none 36)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -25790,10 +25790,10 @@
|
|||
(define-extern sky-base-polygons (inline-array sky-vertex))
|
||||
(define-extern sky-roof-polygons (inline-array sky-vertex))
|
||||
(define-extern *cloud-vert-array* cloud-vert-array)
|
||||
(define-extern *cloud-poly* (inline-array cloud-vertex))
|
||||
(define-extern *cloud-poly* (inline-array sky-vertex))
|
||||
(define-extern init-cloud-vert-array (function symbol))
|
||||
(define-extern *haze-vert-array* haze-vert-array)
|
||||
(define-extern *haze-poly* (inline-array haze-vertex))
|
||||
(define-extern *haze-poly* (inline-array sky-vertex))
|
||||
(define-extern init-haze-vert-array (function symbol))
|
||||
(define-extern sky-make-sun-data "Initialize `upload-data` with [[sky-sun-data]] in [[*sky-work*]]" (function sky-work int float none))
|
||||
(define-extern sky-make-moon-data "Initialize `upload-data` with [[sky-moon-data]] in [[*sky-work*]]" (function sky-work float none))
|
||||
|
@ -25802,12 +25802,12 @@
|
|||
;; sky-tng ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; (define-extern set-tex-offset function) ;; (function int int none)
|
||||
(define-extern set-tex-offset (function int int none))
|
||||
;; (define-extern draw-large-polygon function) ;; function
|
||||
;; (define-extern clip-polygon-against-positive-hyperplane function) ;; function
|
||||
;; (define-extern clip-polygon-against-negative-hyperplane function) ;; function
|
||||
;; (define-extern render-sky-quad function) ;; (function int dma-buffer none)
|
||||
;; (define-extern render-sky-tri function) ;; (function (inline-array sky-vertex) dma-buffer none)
|
||||
(define-extern render-sky-quad (function (inline-array sky-vertex) dma-buffer none))
|
||||
(define-extern render-sky-tri (function (inline-array sky-vertex) dma-buffer none))
|
||||
(define-extern close-sky-buffer (function dma-buffer none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -413,7 +413,18 @@
|
|||
"sp-launch-particles-var",
|
||||
"sparticle-motion-blur",
|
||||
"sp-process-block-2d",
|
||||
"sp-process-block-3d"
|
||||
"sp-process-block-3d",
|
||||
"set-tex-offset",
|
||||
"draw-large-polygon",
|
||||
"render-sky-quad",
|
||||
"render-sky-tri",
|
||||
"(method 16 sky-work)",
|
||||
"(method 17 sky-work)",
|
||||
"(method 32 sky-work)",
|
||||
"(method 33 sky-work)",
|
||||
"(method 28 sky-work)",
|
||||
"(method 29 sky-work)",
|
||||
"(method 30 sky-work)"
|
||||
],
|
||||
|
||||
"mips2c_jump_table_functions": {},
|
||||
|
|
|
@ -110,8 +110,8 @@
|
|||
"sky-data": [
|
||||
["L26", "(inline-array sky-vertex)", 12],
|
||||
["L25", "(inline-array sky-vertex)", 12],
|
||||
["L23", "(inline-array cloud-vertex)", 277],
|
||||
["L21", "(inline-array haze-vertex)", 144]
|
||||
["L23", "(inline-array sky-vertex)", 648],
|
||||
["L21", "(inline-array sky-vertex)", 144]
|
||||
],
|
||||
"default-menu": [
|
||||
["L6314", "(pointer uint64)", 1],
|
||||
|
@ -426,5 +426,16 @@
|
|||
"water-anim": [
|
||||
["L63", "attack-info"],
|
||||
["L62", "attack-info"]
|
||||
],
|
||||
"sky-tng": [
|
||||
["L131", "uint64", true],
|
||||
["L130", "uint64", true],
|
||||
["L129", "uint64", true],
|
||||
["L128", "uint64", true],
|
||||
["L127", "uint64", true],
|
||||
["L126", "uint64", true],
|
||||
["L125", "uint64", true],
|
||||
["L124", "uint64", true],
|
||||
["L123", "uint64", true]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1021,6 +1021,12 @@
|
|||
"(enter cam-circular)": [[32, "collide-query"]],
|
||||
"(method 26 rigid-body)": [[16, ["inline-array", "vector", 8]]],
|
||||
"(method 47 rigid-body-object)": [[16, "matrix"]],
|
||||
"(method 16 sky-work)": [
|
||||
[16, "vector"]
|
||||
],
|
||||
"(method 17 sky-work)": [
|
||||
[16, "vector"]
|
||||
],
|
||||
// placeholder
|
||||
"placeholder-do-not-add-below": []
|
||||
}
|
||||
|
|
|
@ -3488,7 +3488,125 @@
|
|||
[[268, 315], "s4", "process-drawable"],
|
||||
[[275,338], "s5", "sound-rpc-set-param"],
|
||||
[[351,375], "s5", "sound-rpc-set-param"]
|
||||
|
||||
],
|
||||
"(method 13 sky-work)": [
|
||||
[[78, 170], "s4", "sky-work"],
|
||||
[[162, 168], "v1", "dma-packet"],
|
||||
[[221, 228], "a1", "dma-packet"],
|
||||
[[230, 239], "a1", "gs-gif-tag"],
|
||||
[243, "a1", "(pointer gs-zbuf)"],
|
||||
[245, "a1", "(pointer gs-reg64)"],
|
||||
[247, "a1", "(pointer gs-test)"],
|
||||
[249, "a1", "(pointer gs-reg64)"],
|
||||
[250, "a1", "(pointer gs-alpha)"],
|
||||
[252, "a1", "(pointer gs-reg64)"],
|
||||
[255, "a1", "(pointer gs-tex0)"],
|
||||
[257, "a1", "(pointer gs-reg64)"],
|
||||
[259, "a1", "(pointer gs-tex1)"],
|
||||
[261, "a1", "(pointer gs-reg64)"],
|
||||
[263, "a1", "(pointer gs-clamp)"],
|
||||
[265, "a1", "(pointer gs-reg64)"],
|
||||
[266, "a1", "(pointer uint64)"],
|
||||
[268, "a1", "(pointer gs-reg64)"],
|
||||
[[271, 309], "a2", "(inline-array qword)"],
|
||||
[[316, 354], "t0", "(inline-array qword)"],
|
||||
[[362, 369], "t1", "dma-packet"],
|
||||
[[371, 380], "t1", "gs-gif-tag"],
|
||||
[384, "t1", "(pointer gs-alpha)"],
|
||||
[386, "t1", "(pointer gs-reg64)"],
|
||||
[389, "t1", "(pointer gs-tex0)"],
|
||||
[391, "t1", "(pointer gs-reg64)"],
|
||||
[392, "t1", "(pointer uint64)"],
|
||||
[394, "t1", "(pointer gs-reg64)"],
|
||||
[[397, 429], "t0", "(inline-array qword)"],
|
||||
[[437, 444], "a1", "dma-packet"],
|
||||
[[446, 455], "a1", "gs-gif-tag"],
|
||||
[458, "a1", "(pointer gs-alpha)"],
|
||||
[460, "a1", "(pointer gs-reg64)"],
|
||||
[[515, 561], "t1", "(inline-array qword)"],
|
||||
[[574, 581], "a3", "dma-packet"],
|
||||
[[583, 592], "a3", "gs-gif-tag"],
|
||||
[596, "a3", "(pointer gs-alpha)"],
|
||||
[598, "a3", "(pointer gs-reg64)"],
|
||||
[601, "a3", "(pointer gs-tex0)"],
|
||||
[603, "a3", "(pointer gs-reg64)"],
|
||||
[604, "a3", "(pointer uint64)"],
|
||||
[606, "a3", "(pointer gs-reg64)"],
|
||||
[[609, 647], "v1", "(inline-array qword)"],
|
||||
[[673, 680], "a1", "dma-packet"],
|
||||
[[682, 691], "a1", "gs-gif-tag"],
|
||||
[695, "a1", "(pointer gs-zbuf)"],
|
||||
[697, "a1", "(pointer gs-reg64)"],
|
||||
[699, "a1", "(pointer gs-test)"],
|
||||
[701, "a1", "(pointer gs-reg64)"],
|
||||
[728, "a1", "(pointer gs-rgbaq)"],
|
||||
[730, "a1", "(pointer gs-reg64)"],
|
||||
[[733, 738], "v1", "(inline-array qword)"],
|
||||
[[741, 750], "v1", "(inline-array qword)"],
|
||||
[[760, 766], "v1", "dma-packet"]
|
||||
],
|
||||
"(method 33 sky-work)": [
|
||||
[42, "s5", "int"],
|
||||
[46, "a2", "sky-work"],
|
||||
[59, "a2", "sky-work"],
|
||||
[36, "v1", "sky-work"]
|
||||
],
|
||||
"(method 23 sky-work)": [
|
||||
[[3, 10], "a0", "dma-packet"],
|
||||
[[12, 21], "a0", "gs-gif-tag"],
|
||||
[25, "s3", "(pointer gs-test)"],
|
||||
[27, "s3", "(pointer gs-reg64)"],
|
||||
[42, "s3", "(pointer gs-tex0)"],
|
||||
[44, "s3", "(pointer gs-reg64)"],
|
||||
[46, "s3", "(pointer gs-tex1)"],
|
||||
[48, "s3", "(pointer gs-reg64)"],
|
||||
[49, "s3", "(pointer gs-clamp)"],
|
||||
[51, "s3", "(pointer gs-reg64)"],
|
||||
[53, "s3", "(pointer gs-alpha)"],
|
||||
[55, "s3", "(pointer gs-reg64)"],
|
||||
[56, "s3", "(pointer uint64)"],
|
||||
[58, "s3", "(pointer gs-reg64)"],
|
||||
[[255, 263], "s4", "dma-packet"]
|
||||
],
|
||||
"(method 27 sky-work)": [
|
||||
[[5, 10], "a0", "dma-packet"],
|
||||
[[12, 20], "a0", "gs-gif-tag"],
|
||||
[25, "a0", "(pointer gs-alpha)"],
|
||||
[27, "a0", "(pointer gs-reg64)"],
|
||||
[[142, 149], "s4", "dma-packet"]
|
||||
],
|
||||
"(method 34 sky-work)": [
|
||||
[[5, 10], "a0", "dma-packet"],
|
||||
[[12, 20], "a0", "gs-gif-tag"],
|
||||
[25, "a0", "(pointer gs-zbuf)"],
|
||||
[27, "a0", "(pointer gs-reg64)"],
|
||||
[29, "a0", "(pointer gs-test)"],
|
||||
[31, "a0", "(pointer gs-reg64)"],
|
||||
[33, "a0", "(pointer gs-alpha)"],
|
||||
[35, "a0", "(pointer gs-reg64)"],
|
||||
[[80, 88], "s5", "dma-packet"]
|
||||
],
|
||||
"(method 35 sky-work)": [
|
||||
[[2, 9], "a1", "dma-packet"],
|
||||
[[11, 20], "a1", "gs-gif-tag"],
|
||||
[24, "a1", "(pointer gs-test)"],
|
||||
[26, "a1", "(pointer gs-reg64)"],
|
||||
[[66, 74], "s5", "dma-packet"]
|
||||
],
|
||||
"(method 36 sky-work)": [
|
||||
[[7, 14], "a0", "dma-packet"],
|
||||
[[16, 26], "a0", "gs-gif-tag"],
|
||||
[62, "s2", "(pointer gs-tex0)"],
|
||||
[64, "s2", "(pointer gs-reg64)"],
|
||||
[66, "s2", "(pointer gs-tex1)"],
|
||||
[68, "s2", "(pointer gs-reg64)"],
|
||||
[70, "s2", "(pointer gs-test)"],
|
||||
[72, "s2", "(pointer gs-reg64)"],
|
||||
[74, "s2", "(pointer gs-clamp)"],
|
||||
[76, "s2", "(pointer gs-reg64)"],
|
||||
[78, "s2", "(pointer gs-alpha)"],
|
||||
[80, "s2", "(pointer gs-reg64)"],
|
||||
[[83, 177], "v1", "(inline-array qword)"]
|
||||
],
|
||||
"draw-subtitle-image": [
|
||||
[[44, 48], "a0", "dma-packet"],
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// if you want to filter to only some object names.
|
||||
// it will make the decompiler much faster.
|
||||
"allowed_objects": [],
|
||||
"banned_objects": ["effect-control", "ctywide-scenes", "texture-anim-tables", "sky-tng", "traffic-engine"],
|
||||
"banned_objects": ["effect-control", "ctywide-scenes", "texture-anim-tables", "traffic-engine"],
|
||||
|
||||
////////////////////////////
|
||||
// CODE ANALYSIS OPTIONS
|
||||
|
|
|
@ -1656,6 +1656,7 @@ std::optional<std::vector<BitFieldConstantDef>> try_decompile_bitfield_from_int(
|
|||
def.value = bitfield_value;
|
||||
def.field_name = field.name();
|
||||
def.is_signed = is_signed;
|
||||
def.is_float = field.type().base_type() == "float";
|
||||
auto enum_info = ts.try_enum_lookup(field.type());
|
||||
if (enum_info && !enum_info->is_bitfield()) {
|
||||
auto name = decompile_int_enum_from_int(field.type(), ts, bitfield_value);
|
||||
|
|
|
@ -82,6 +82,7 @@ goos::Object decompile_bitfield(const TypeSpec& type,
|
|||
|
||||
struct BitFieldConstantDef {
|
||||
bool is_signed = false;
|
||||
bool is_float = false;
|
||||
u64 value = -1;
|
||||
std::optional<std::string> enum_constant;
|
||||
std::string field_name;
|
||||
|
|
|
@ -967,9 +967,14 @@ void DirectRenderer::handle_xyzf2_common(u32 x,
|
|||
auto& corner1_rgba = m_prim_building.building_rgba[0];
|
||||
auto& corner2_vert = m_prim_building.building_vert[1];
|
||||
auto& corner2_rgba = m_prim_building.building_rgba[1];
|
||||
auto& corner1_stq = m_prim_building.building_stq[0];
|
||||
auto& corner2_stq = m_prim_building.building_stq[1];
|
||||
|
||||
// should use most recent vertex z.
|
||||
math::Vector<u32, 4> corner3_vert{corner1_vert[0], corner2_vert[1], corner2_vert[2]};
|
||||
math::Vector<u32, 4> corner4_vert{corner2_vert[0], corner1_vert[1], corner2_vert[2]};
|
||||
math::Vector<float, 3> corner3_stq{corner1_stq[0], corner2_stq[1], corner2_stq[2]};
|
||||
math::Vector<float, 3> corner4_stq{corner2_stq[0], corner1_stq[1], corner2_stq[2]};
|
||||
|
||||
if (m_prim_gl_state.gouraud_enable) {
|
||||
// I'm not really sure what the GS does here.
|
||||
|
@ -978,12 +983,12 @@ void DirectRenderer::handle_xyzf2_common(u32 x,
|
|||
auto& corner3_rgba = corner2_rgba;
|
||||
auto& corner4_rgba = corner2_rgba;
|
||||
|
||||
m_prim_buffer.push(corner1_rgba, corner1_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner3_rgba, corner3_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner2_rgba, corner2_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner2_rgba, corner2_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner4_rgba, corner4_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner1_rgba, corner1_vert, {}, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner1_rgba, corner1_vert, corner1_stq, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner3_rgba, corner3_vert, corner3_stq, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner2_rgba, corner2_vert, corner2_stq, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner2_rgba, corner2_vert, corner2_stq, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner4_rgba, corner4_vert, corner4_stq, 0, tcc, decal, fge);
|
||||
m_prim_buffer.push(corner1_rgba, corner1_vert, corner1_stq, 0, tcc, decal, fge);
|
||||
m_prim_building.building_idx = 0;
|
||||
}
|
||||
} break;
|
||||
|
|
|
@ -92,6 +92,7 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
|
|||
init_bucket_renderer<VisDataHandler>("vis", BucketCategory::OTHER, BucketId::SPECIAL_BUCKET_2);
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-sky-pre", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_SKY_PRE);
|
||||
init_bucket_renderer<DirectRenderer>("sky-draw", BucketCategory::OTHER, BucketId::SKY_DRAW, 1024);
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l0-tfrag", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_TFRAG);
|
||||
init_bucket_renderer<TFragment>("tfrag-l0-tfrag", BucketCategory::TFRAG, BucketId::TFRAG_L0_TFRAG,
|
||||
|
@ -120,6 +121,8 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
|
|||
// 100
|
||||
// 110
|
||||
// 120
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l0-alpha", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_ALPHA);
|
||||
init_bucket_renderer<TFragment>("tfrag-t-l0-alpha", BucketCategory::TFRAG,
|
||||
BucketId::TFRAG_T_L0_ALPHA,
|
||||
std::vector{tfrag3::TFragmentTreeKind::TRANS}, false, 0);
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace jak2 {
|
|||
enum class BucketId {
|
||||
SPECIAL_BUCKET_2 = 2,
|
||||
TEX_LCOM_SKY_PRE = 4,
|
||||
SKY_DRAW = 5,
|
||||
TEX_L0_TFRAG = 7,
|
||||
TFRAG_L0_TFRAG = 8,
|
||||
TIE_L0_TFRAG = 9,
|
||||
|
@ -93,6 +94,7 @@ enum class BucketId {
|
|||
SHRUB_L0_SHRUB = 74,
|
||||
TEX_L1_SHRUB = 82,
|
||||
SHRUB_L1_SHRUB = 83,
|
||||
TEX_L0_ALPHA = 127,
|
||||
TFRAG_T_L0_ALPHA = 128,
|
||||
TEX_LCOM_TFRAG = 187,
|
||||
TEX_LCOM_SHRUB = 191,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -552,6 +552,14 @@ struct ExecutionContext {
|
|||
}
|
||||
}
|
||||
|
||||
void paddb(int rd, int rs, int rt) {
|
||||
auto s = gpr_src(rs);
|
||||
auto t = gpr_src(rt);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
gprs[rd].du8[i] = s.du8[i] + t.du8[i];
|
||||
}
|
||||
}
|
||||
|
||||
void pextub(int rd, int rs, int rt) {
|
||||
auto s = gpr_src(rs);
|
||||
auto t = gpr_src(rt);
|
||||
|
|
|
@ -128,6 +128,7 @@ namespace init_boundary_regs { extern void link(); }
|
|||
namespace render_boundary_tri { extern void link(); }
|
||||
namespace render_boundary_quad { extern void link(); }
|
||||
namespace set_sky_vf27 { extern void link(); }
|
||||
namespace set_sky_vf23_value { extern void link(); }
|
||||
namespace draw_boundary_polygon { extern void link(); }
|
||||
namespace sp_init_fields { extern void link(); }
|
||||
namespace particle_adgif { extern void link(); }
|
||||
|
@ -135,6 +136,17 @@ namespace sp_launch_particles_var { extern void link(); }
|
|||
namespace sparticle_motion_blur { extern void link(); }
|
||||
namespace sp_process_block_2d { extern void link(); }
|
||||
namespace sp_process_block_3d { extern void link(); }
|
||||
namespace set_tex_offset { extern void link(); }
|
||||
namespace draw_large_polygon { extern void link(); }
|
||||
namespace render_sky_quad { extern void link(); }
|
||||
namespace render_sky_tri { extern void link(); }
|
||||
namespace method_16_sky_work { extern void link(); }
|
||||
namespace method_17_sky_work { extern void link(); }
|
||||
namespace method_32_sky_work { extern void link(); }
|
||||
namespace method_33_sky_work { extern void link(); }
|
||||
namespace method_28_sky_work { extern void link(); }
|
||||
namespace method_29_sky_work { extern void link(); }
|
||||
namespace method_30_sky_work { extern void link(); }
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
|
@ -223,7 +235,13 @@ PerGameVersion<std::unordered_map<std::string, std::vector<void (*)()>>> gMips2C
|
|||
{"sparticle-launcher",
|
||||
{jak2::sp_init_fields::link, jak2::particle_adgif::link, jak2::sp_launch_particles_var::link,
|
||||
jak2::sparticle_motion_blur::link}},
|
||||
{"sparticle", {jak2::sp_process_block_2d::link, jak2::sp_process_block_3d::link}}},
|
||||
{"sparticle", {jak2::sp_process_block_2d::link, jak2::sp_process_block_3d::link}},
|
||||
{"sky-tng",
|
||||
{jak2::set_tex_offset::link, jak2::draw_large_polygon::link, jak2::render_sky_quad::link,
|
||||
jak2::render_sky_tri::link, jak2::method_16_sky_work::link, jak2::method_17_sky_work::link,
|
||||
jak2::method_32_sky_work::link, jak2::method_33_sky_work::link,
|
||||
jak2::method_28_sky_work::link, jak2::method_29_sky_work::link,
|
||||
jak2::method_30_sky_work::link, jak2::set_sky_vf23_value::link}}},
|
||||
};
|
||||
|
||||
void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) {
|
||||
|
|
|
@ -9,3 +9,65 @@
|
|||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun kill-current-talker ((arg0 symbol) (arg1 pair) (arg2 symbol))
|
||||
(if (not (member 'daxter arg1))
|
||||
(gui-control-method-16
|
||||
*gui-control*
|
||||
(gui-action stop)
|
||||
(the-as sound-id 1)
|
||||
(gui-channel daxter)
|
||||
(gui-action none)
|
||||
(the-as string #f)
|
||||
(the-as (function gui-connection symbol) #f)
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
(if (not (member 'voicebox arg1))
|
||||
(gui-control-method-16
|
||||
*gui-control*
|
||||
(gui-action stop)
|
||||
(the-as sound-id 1)
|
||||
(gui-channel voicebox)
|
||||
(gui-action none)
|
||||
(the-as string #f)
|
||||
(the-as (function gui-connection symbol) #f)
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
(if (not (member 'message arg1))
|
||||
(gui-control-method-16
|
||||
*gui-control*
|
||||
(gui-action stop)
|
||||
(the-as sound-id 1)
|
||||
(gui-channel message)
|
||||
(gui-action none)
|
||||
(the-as string #f)
|
||||
(the-as (function gui-connection symbol) #f)
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
(when (not (member 'notice arg1))
|
||||
(gui-control-method-16
|
||||
*gui-control*
|
||||
(gui-action stop)
|
||||
(the-as sound-id 1)
|
||||
(gui-channel notice)
|
||||
(gui-action none)
|
||||
(the-as string #f)
|
||||
(the-as (function gui-connection symbol) #f)
|
||||
(the-as process #f)
|
||||
)
|
||||
(gui-control-method-16
|
||||
*gui-control*
|
||||
(gui-action stop)
|
||||
(the-as sound-id 1)
|
||||
(gui-channel notice-low)
|
||||
(gui-action none)
|
||||
(the-as string #f)
|
||||
(the-as (function gui-connection symbol) #f)
|
||||
(the-as process #f)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
|
|
@ -337,10 +337,10 @@
|
|||
|
||||
;; draw the sky
|
||||
(with-profiler 'sky *profile-sky-color*
|
||||
; (if (-> *sky-work* draw-vortex)
|
||||
; (draw-vortex)
|
||||
; (draw *sky-work*)
|
||||
; )
|
||||
(if (-> *sky-work* draw-vortex)
|
||||
(format 0 "no vortex.~%");(draw-vortex)
|
||||
(draw *sky-work*)
|
||||
)
|
||||
(flush-cache 0)
|
||||
)
|
||||
|
||||
|
|
|
@ -252,286 +252,7 @@
|
|||
|
||||
(define *cloud-vert-array* (new 'static 'cloud-vert-array))
|
||||
|
||||
(define *cloud-poly* (new 'static 'inline-array cloud-vertex 277
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
(new 'static 'cloud-vertex)
|
||||
)
|
||||
)
|
||||
(define *cloud-poly* (new 'static 'inline-array sky-vertex 648))
|
||||
|
||||
(defun init-cloud-vert-array ()
|
||||
(let ((gp-0 *cloud-vert-array*))
|
||||
|
@ -573,153 +294,7 @@
|
|||
|
||||
(define *haze-vert-array* (new 'static 'haze-vert-array))
|
||||
|
||||
(define *haze-poly* (new 'static 'inline-array haze-vertex 144
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
(new 'static 'haze-vertex)
|
||||
)
|
||||
)
|
||||
(define *haze-poly* (new 'static 'inline-array sky-vertex 144))
|
||||
|
||||
(defun init-haze-vert-array ()
|
||||
(let ((gp-0 *haze-vert-array*))
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
(vec1 vector4w :inline :offset-assert 1568)
|
||||
(cloud-lights cloud-lights :inline :offset-assert 1584)
|
||||
(haze-lights haze-lights :inline :offset-assert 1744)
|
||||
(buf basic :offset-assert 1868)
|
||||
(buf dma-buffer :offset-assert 1868)
|
||||
(draw-vortex basic :offset-assert 1872)
|
||||
(stars vector 512 :inline :offset-assert 1888)
|
||||
)
|
||||
|
@ -236,33 +236,32 @@
|
|||
(update-colors-for-time (_type_ float) none 11)
|
||||
(update-time-and-speed (_type_ float float) none 12)
|
||||
(draw (_type_) none 13)
|
||||
(sky-work-method-14 () none 14)
|
||||
(sky-work-method-15 () none 15)
|
||||
(sky-work-method-16 () none 16)
|
||||
(sky-work-method-17 () none 17)
|
||||
(sky-work-method-18 () none 18)
|
||||
(sky-work-method-19 () none 19)
|
||||
(sky-work-method-20 () none 20)
|
||||
(sky-work-method-21 () none 21)
|
||||
(sky-work-method-22 () none 22)
|
||||
(sky-work-method-23 () none 23)
|
||||
(sky-work-method-24 () none 24)
|
||||
(sky-work-method-25 () none 25)
|
||||
(sky-work-method-26 () none 26)
|
||||
(sky-work-method-27 () none 27)
|
||||
(sky-work-method-28 () none 28)
|
||||
(sky-work-method-29 () none 29)
|
||||
(sky-work-method-30 () none 30)
|
||||
(sky-work-method-31 () none 31)
|
||||
(sky-work-method-32 () none 32)
|
||||
(sky-work-method-33 () none 33)
|
||||
(sky-work-method-34 () none 34)
|
||||
(sky-work-method-35 () none 35)
|
||||
(sky-work-method-36 () none 36)
|
||||
(update-matrix (_type_ matrix) none 14)
|
||||
(update-template-colors (_type_) none 15)
|
||||
(init-regs-for-large-polygon-draw (_type_) none 16)
|
||||
(init-regs-for-sky-asm (_type_) none 17)
|
||||
(cloud-vtx-light-update (_type_ vector vector cloud-lights vector vector) none 18)
|
||||
(cloud-vtx-tex-update (_type_ vector vector vector cloud-lights) none 19)
|
||||
(adjust-cloud-lighting (_type_) none 20)
|
||||
(cloud-vtx1-to-sky (_type_ sky-vertex cloud-vertex) none 21)
|
||||
(cloud-vtx2-to-sky (_type_ sky-vertex cloud-vertex) none 22)
|
||||
(draw-clouds (_type_ dma-buffer) none 23)
|
||||
(apply-haze-light (_type_ vector vector haze-lights) none 24)
|
||||
(adjust-haze-lighting (_type_) none 25)
|
||||
(haze-vtx-to-sky (_type_ sky-vertex sky-vertex haze-vertex) none 26)
|
||||
(draw-haze (_type_ dma-buffer) none 27)
|
||||
(sun-dma (_type_ dma-buffer) none 28)
|
||||
(green-sun-dma (_type_ dma-buffer) none 29)
|
||||
(moon-dma (_type_ dma-buffer) none 30)
|
||||
(setup-stars (_type_ matrix sky-upload-data) none 31)
|
||||
(stars-transform-asm (_type_) none 32)
|
||||
(stars-dma (_type_ dma-buffer) none 33)
|
||||
(draw-roof (_type_ dma-buffer) none 34)
|
||||
(draw-base (_type_ dma-buffer) none 35)
|
||||
(draw-fog (_type_ dma-buffer) none 36)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
(define-extern *sky-work* sky-work)
|
File diff suppressed because it is too large
Load diff
|
@ -54,7 +54,7 @@
|
|||
(func-id basic :offset 4)
|
||||
(init-func basic :offset-assert 8)
|
||||
(init-func-id basic :offset 8)
|
||||
(tex basic :offset-assert 12)
|
||||
(tex texture :offset-assert 12)
|
||||
(tex-name basic :offset-assert 16)
|
||||
(extra vector :inline :offset-assert 32)
|
||||
(color rgba :offset-assert 48)
|
||||
|
@ -76,7 +76,7 @@
|
|||
)
|
||||
|
||||
(deftype texture-anim-array (array)
|
||||
((array-data texture-anim :inline :dynamic :offset-assert 16)
|
||||
((array-data texture-anim :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x10
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
(bucket-2 2)
|
||||
(bucket-3 3) ;; blit displays
|
||||
(tex-lcom-sky-pre 4) ;; tex
|
||||
(bucket-5 5) ;; sky
|
||||
(sky-draw 5) ;; sky
|
||||
(bucket-6 6) ;; ocean
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -2151,7 +2151,7 @@
|
|||
'demo
|
||||
)
|
||||
(*debug-segment*
|
||||
;;'prison
|
||||
; 'prison
|
||||
'ctysluma
|
||||
)
|
||||
(else
|
||||
|
@ -2179,15 +2179,14 @@
|
|||
)
|
||||
(set! *time-of-day-fast* #f)
|
||||
(load-commands-set! *level* '())
|
||||
(format 0 "SKIP: time of day setup and initial level load.~%")
|
||||
; (send-event (ppointer->process *time-of-day*) 'change 'ratio #x3f800000)
|
||||
; (send-event (ppointer->process *time-of-day*) 'change 'hour 7)
|
||||
; (send-event (ppointer->process *time-of-day*) 'change 'minutes 0)
|
||||
; (send-event (ppointer->process *time-of-day*) 'change 'seconds 0)
|
||||
; (send-event (ppointer->process *time-of-day*) 'change 'frames 0)
|
||||
; (set! (-> *time-of-day-context* mode) (the-as uint 8))
|
||||
; (set! (-> *mood-control* overide-weather-flag) #f)
|
||||
; (set-blackout-frames (seconds 0.02))
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'ratio #x3f800000)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'hour 7)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'minutes 0)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'seconds 0)
|
||||
(send-event (ppointer->process *time-of-day*) 'change 'frames 0)
|
||||
(set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3))
|
||||
(set! (-> *mood-control* overide-weather-flag) #f)
|
||||
(set-blackout-frames (seconds 0.02))
|
||||
(when (not *dproc*)
|
||||
(reset! *load-state*)
|
||||
(let ((s4-1 (level-get-for-use *level* s5-0 'active)))
|
||||
|
@ -2223,9 +2222,10 @@
|
|||
)
|
||||
(start-debug "PLAY: starting dproc~%")
|
||||
(on #t)
|
||||
(if arg1
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
)
|
||||
(format 0 "SKIP: initialize game info~%")
|
||||
; (if arg1
|
||||
; (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
; )
|
||||
(kmemclose)
|
||||
(kmemclose)
|
||||
0
|
||||
|
|
1221
test/decompiler/reference/jak2/engine/gfx/sky/sky-data_REF.gc
generated
vendored
1221
test/decompiler/reference/jak2/engine/gfx/sky/sky-data_REF.gc
generated
vendored
File diff suppressed because it is too large
Load diff
48
test/decompiler/reference/jak2/engine/gfx/sky/sky-h_REF.gc
generated
vendored
48
test/decompiler/reference/jak2/engine/gfx/sky/sky-h_REF.gc
generated
vendored
|
@ -434,7 +434,7 @@
|
|||
(vec1 vector4w :inline :offset-assert 1568)
|
||||
(cloud-lights cloud-lights :inline :offset-assert 1584)
|
||||
(haze-lights haze-lights :inline :offset-assert 1744)
|
||||
(buf basic :offset-assert 1868)
|
||||
(buf dma-buffer :offset-assert 1868)
|
||||
(draw-vortex basic :offset-assert 1872)
|
||||
(stars vector 512 :inline :offset-assert 1888)
|
||||
)
|
||||
|
@ -447,29 +447,29 @@
|
|||
(update-colors-for-time (_type_ float) none 11)
|
||||
(update-time-and-speed (_type_ float float) none 12)
|
||||
(draw (_type_) none 13)
|
||||
(sky-work-method-14 () none 14)
|
||||
(sky-work-method-15 () none 15)
|
||||
(sky-work-method-16 () none 16)
|
||||
(sky-work-method-17 () none 17)
|
||||
(sky-work-method-18 () none 18)
|
||||
(sky-work-method-19 () none 19)
|
||||
(sky-work-method-20 () none 20)
|
||||
(sky-work-method-21 () none 21)
|
||||
(sky-work-method-22 () none 22)
|
||||
(sky-work-method-23 () none 23)
|
||||
(sky-work-method-24 () none 24)
|
||||
(sky-work-method-25 () none 25)
|
||||
(sky-work-method-26 () none 26)
|
||||
(sky-work-method-27 () none 27)
|
||||
(sky-work-method-28 () none 28)
|
||||
(sky-work-method-29 () none 29)
|
||||
(sky-work-method-30 () none 30)
|
||||
(sky-work-method-31 () none 31)
|
||||
(sky-work-method-32 () none 32)
|
||||
(sky-work-method-33 () none 33)
|
||||
(sky-work-method-34 () none 34)
|
||||
(sky-work-method-35 () none 35)
|
||||
(sky-work-method-36 () none 36)
|
||||
(update-matrix (_type_ matrix) none 14)
|
||||
(update-template-colors (_type_) none 15)
|
||||
(init-regs-for-large-polygon-draw (_type_) none 16)
|
||||
(init-regs-for-sky-asm (_type_) none 17)
|
||||
(cloud-vtx-light-update (_type_ vector vector cloud-lights vector vector) none 18)
|
||||
(cloud-vtx-tex-update (_type_ vector vector vector cloud-lights) none 19)
|
||||
(adjust-cloud-lighting (_type_) none 20)
|
||||
(cloud-vtx1-to-sky (_type_ sky-vertex cloud-vertex) none 21)
|
||||
(cloud-vtx2-to-sky (_type_ sky-vertex cloud-vertex) none 22)
|
||||
(draw-clouds (_type_ dma-buffer) none 23)
|
||||
(apply-haze-light (_type_ vector vector haze-lights) none 24)
|
||||
(adjust-haze-lighting (_type_) none 25)
|
||||
(haze-vtx-to-sky (_type_ sky-vertex sky-vertex haze-vertex) none 26)
|
||||
(draw-haze (_type_ dma-buffer) none 27)
|
||||
(sun-dma (_type_ dma-buffer) none 28)
|
||||
(green-sun-dma (_type_ dma-buffer) none 29)
|
||||
(moon-dma (_type_ dma-buffer) none 30)
|
||||
(setup-stars (_type_ matrix sky-upload-data) none 31)
|
||||
(stars-transform-asm (_type_) none 32)
|
||||
(stars-dma (_type_ dma-buffer) none 33)
|
||||
(draw-roof (_type_ dma-buffer) none 34)
|
||||
(draw-base (_type_ dma-buffer) none 35)
|
||||
(draw-fog (_type_ dma-buffer) none 36)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
1131
test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc
generated
vendored
Normal file
1131
test/decompiler/reference/jak2/engine/gfx/sky/sky-tng_REF.gc
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
4
test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc
generated
vendored
4
test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc
generated
vendored
|
@ -87,7 +87,7 @@
|
|||
(func-id basic :offset 4)
|
||||
(init-func basic :offset-assert 8)
|
||||
(init-func-id basic :offset 8)
|
||||
(tex basic :offset-assert 12)
|
||||
(tex texture :offset-assert 12)
|
||||
(tex-name basic :offset-assert 16)
|
||||
(extra vector :inline :offset-assert 32)
|
||||
(color rgba :offset-assert 48)
|
||||
|
@ -137,7 +137,7 @@
|
|||
|
||||
;; definition of type texture-anim-array
|
||||
(deftype texture-anim-array (array)
|
||||
((array-data texture-anim :inline :dynamic :offset-assert 16)
|
||||
((array-data texture-anim :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x10
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
|
||||
"(method 16 level)", "unpack-comp-lzo", // asm mods
|
||||
"update-time-of-day",
|
||||
"close-sky-buffer", // asm
|
||||
|
||||
"i-hopefully-will-never-exist-dont-add-anything-after-me-please"
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue