mirror of
https://github.com/open-goal/jak-project
synced 2026-09-10 04:22:13 -04:00
Merge remote-tracking branch 'origin/master' into j2/progress
This commit is contained in:
@@ -77,7 +77,17 @@ class Vector {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const T other) const {
|
||||
for (int i = 0; i < Size; i++) {
|
||||
if (m_data[i] != other) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator!=(const Vector<T, Size>& other) const { return !((*this) == other); }
|
||||
bool operator!=(const T other) const { return !((*this) == other); }
|
||||
|
||||
const T length() const { return std::sqrt(squared_length()); }
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@ std::string meters_to_string(float value, bool append_trailing_decimal) {
|
||||
return float_to_string(value / METER_LENGTH, append_trailing_decimal);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Wrapper around float_to_string, for printing degrees. Unlike float_to_string, it does not append
|
||||
* decimals by default.
|
||||
*/
|
||||
std::string degrees_to_string(float value, bool append_trailing_decimal) {
|
||||
return float_to_string(value / DEGREES_LENGTH, append_trailing_decimal);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Convert a fixed point value to a float. Fixed point values usually end up with strange numbers
|
||||
* that were definitely not what was written when we do a naive conversion. This function
|
||||
|
||||
@@ -8,5 +8,6 @@ float fixed_point_to_float(s64 value, s64 scale);
|
||||
std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_decimal = false);
|
||||
std::string float_to_string(float value, bool append_trailing_decimal = true);
|
||||
std::string meters_to_string(float value, bool append_trailing_decimal = false);
|
||||
std::string degrees_to_string(float value, bool append_trailing_decimal = false);
|
||||
std::string seconds_to_string(s64 value, bool append_trailing_decimal = false);
|
||||
int float_to_cstr(float value, char* buffer, bool append_trailing_decimal = true);
|
||||
|
||||
+26
-9
@@ -2481,11 +2481,12 @@ void DecompiledDataElement::get_modified_regs(RegSet&) const {}
|
||||
|
||||
void DecompiledDataElement::do_decomp(const Env& env, const LinkedObjectFile* file) {
|
||||
if (m_label_info) {
|
||||
m_description = decompile_at_label_with_hint(*m_label_info, m_label, env.file->labels,
|
||||
env.file->words_by_seg, *env.dts, file);
|
||||
m_description =
|
||||
decompile_at_label_with_hint(*m_label_info, m_label, env.file->labels,
|
||||
env.file->words_by_seg, *env.dts, file, env.version);
|
||||
} else {
|
||||
m_description = decompile_at_label_guess_type(m_label, env.file->labels, env.file->words_by_seg,
|
||||
env.dts->ts, file);
|
||||
env.dts->ts, file, env.version);
|
||||
}
|
||||
m_decompiled = true;
|
||||
}
|
||||
@@ -3095,11 +3096,13 @@ goos::Object DefpartgroupElement::to_form_internal(const Env& env) const {
|
||||
forms.push_back(pretty_print::to_symbol(fmt::format("defpartgroup {}", name())));
|
||||
forms.push_back(pretty_print::to_symbol(fmt::format(":id {}", m_group_id)));
|
||||
if (m_static_info.duration != 3000) {
|
||||
forms.push_back(pretty_print::to_symbol(fmt::format(":duration {}", m_static_info.duration)));
|
||||
forms.push_back(pretty_print::to_symbol(
|
||||
fmt::format(":duration (seconds {})", seconds_to_string(m_static_info.duration))));
|
||||
}
|
||||
if (m_static_info.linger != 1500) {
|
||||
forms.push_back(
|
||||
pretty_print::to_symbol(fmt::format(":linger-duration {}", m_static_info.linger)));
|
||||
// 5 seconds is default
|
||||
forms.push_back(pretty_print::to_symbol(
|
||||
fmt::format(":linger-duration (seconds {})", seconds_to_string(m_static_info.linger))));
|
||||
}
|
||||
if (m_static_info.flags != 0) {
|
||||
auto things = decompile_bitfield_enum_from_int(TypeSpec("sp-group-flag"), env.dts->ts,
|
||||
@@ -3118,6 +3121,21 @@ goos::Object DefpartgroupElement::to_form_internal(const Env& env) const {
|
||||
meters_to_string(m_static_info.bounds.y()), meters_to_string(m_static_info.bounds.z()),
|
||||
meters_to_string(m_static_info.bounds.w()))));
|
||||
|
||||
if (env.version != GameVersion::Jak1) {
|
||||
// jak 2 stuff.
|
||||
if (m_static_info.rot != 0) {
|
||||
forms.push_back(pretty_print::to_symbol(fmt::format(
|
||||
":rotate ((degrees {}) (degrees {}) (degrees {}))",
|
||||
meters_to_string(m_static_info.rot.x()), meters_to_string(m_static_info.rot.y()),
|
||||
meters_to_string(m_static_info.rot.z()))));
|
||||
}
|
||||
if (m_static_info.scale != 1) {
|
||||
forms.push_back(pretty_print::to_symbol(fmt::format(
|
||||
":scale ({} {} {})", float_to_string(m_static_info.rot.x()),
|
||||
float_to_string(m_static_info.rot.y()), float_to_string(m_static_info.rot.z()))));
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<goos::Object> item_forms;
|
||||
for (const auto& e : m_static_info.elts) {
|
||||
s32 launcher = e.part_id;
|
||||
@@ -3204,12 +3222,11 @@ goos::Object DefpartElement::to_form_internal(const Env& env) const {
|
||||
|
||||
std::vector<goos::Object> item_forms;
|
||||
for (const auto& e : m_static_info.fields) {
|
||||
if (e.field_id == 67) {
|
||||
if (e.is_sp_end(env.version)) {
|
||||
// sp-end
|
||||
break;
|
||||
}
|
||||
ASSERT(env.version == GameVersion::Jak1); // need to update enums
|
||||
item_forms.push_back(decompile_sparticle_field_init(e, env.dts->ts));
|
||||
item_forms.push_back(decompile_sparticle_field_init(e, env.dts->ts, env.version));
|
||||
}
|
||||
if (!item_forms.empty()) {
|
||||
forms.push_back(pretty_print::to_symbol(":init-specs"));
|
||||
|
||||
@@ -1721,6 +1721,9 @@ class DefpartgroupElement : public FormElement {
|
||||
u16 flags;
|
||||
std::string name;
|
||||
math::Vector4f bounds;
|
||||
// added in jak 2
|
||||
math::Vector3f rot;
|
||||
math::Vector3f scale;
|
||||
|
||||
struct PartGroupItem {
|
||||
u32 part_id;
|
||||
@@ -1763,6 +1766,19 @@ class DefpartElement : public FormElement {
|
||||
u16 flags;
|
||||
std::vector<LinkedWord> data;
|
||||
goos::Object sound_spec;
|
||||
goos::Object userdata; // backup
|
||||
|
||||
bool is_sp_end(GameVersion version) const {
|
||||
switch (version) {
|
||||
case GameVersion::Jak1:
|
||||
return field_id == 67;
|
||||
case GameVersion::Jak2:
|
||||
return field_id == 72;
|
||||
default:
|
||||
ASSERT_MSG(false, fmt::format("unknown version {} for is_sp_end"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
std::vector<PartField> fields;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "find_defpartgroup.h"
|
||||
#include "common/goos/PrettyPrinter.h"
|
||||
#include "common/util/BitUtils.h"
|
||||
#include "decompiler/IR2/Form.h"
|
||||
#include "decompiler/IR2/GenericElementMatcher.h"
|
||||
#include "decompiler/ObjectFile/LinkedObjectFile.h"
|
||||
@@ -39,24 +40,24 @@ L81:
|
||||
L82:
|
||||
*/
|
||||
|
||||
int start_word_idx = (lab.offset / 4) - 1;
|
||||
int word_idx = (lab.offset / 4) - 1;
|
||||
auto& words = env.file->words_by_seg.at(lab.target_segment);
|
||||
|
||||
auto& first_word = words.at(start_word_idx);
|
||||
auto& first_word = words.at(word_idx++);
|
||||
if (first_word.kind() != LinkedWord::TYPE_PTR ||
|
||||
first_word.symbol_name() != "sparticle-launch-group") {
|
||||
env.func->warnings.error_and_throw(
|
||||
"Reference to sparticle-launch-group bad: invalid type pointer");
|
||||
}
|
||||
|
||||
auto& word_1 = words.at(start_word_idx + 1);
|
||||
auto& word_1 = words.at(word_idx++);
|
||||
s16 len = word_1.data & 0xffff;
|
||||
group.duration = (word_1.data >> 16) & 0xffff;
|
||||
auto& word_2 = words.at(start_word_idx + 2);
|
||||
auto& word_2 = words.at(word_idx++);
|
||||
group.linger = word_2.data & 0xffff;
|
||||
group.flags = (word_2.data >> 16) & 0xffff;
|
||||
|
||||
auto& string_word = words.at(start_word_idx + 3);
|
||||
auto& string_word = words.at(word_idx++);
|
||||
if (string_word.kind() != LinkedWord::PTR) {
|
||||
env.func->warnings.error_and_throw(
|
||||
"Reference to sparticle-launch-group bad: invalid name label");
|
||||
@@ -64,7 +65,7 @@ L82:
|
||||
group.name = env.file->get_goal_string_by_label(
|
||||
env.file->get_label_by_name(env.file->get_label_name(string_word.label_id())));
|
||||
|
||||
auto& array_word = words.at(start_word_idx + 4);
|
||||
auto& array_word = words.at(word_idx++);
|
||||
if (array_word.kind() != LinkedWord::PTR) {
|
||||
env.func->warnings.error_and_throw(
|
||||
"Reference to sparticle-launch-group bad: invalid array label");
|
||||
@@ -87,13 +88,34 @@ L82:
|
||||
item.binding = array_words.at(item_idx + 6).data;
|
||||
}
|
||||
|
||||
if (env.version != GameVersion::Jak1) {
|
||||
// added fields in jak 2
|
||||
for (int i = 0; i < 3; i++) {
|
||||
auto& word = words.at(word_idx++);
|
||||
if (word.kind() != LinkedWord::PLAIN_DATA) {
|
||||
env.func->warnings.error_and_throw("Reference to sparticle-launch-group bad: invalid rot");
|
||||
}
|
||||
group.rot[i] = *reinterpret_cast<float*>(&word.data);
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
auto& word = words.at(word_idx++);
|
||||
if (word.kind() != LinkedWord::PLAIN_DATA) {
|
||||
env.func->warnings.error_and_throw(
|
||||
"Reference to sparticle-launch-group bad: invalid scale");
|
||||
}
|
||||
group.scale[i] = *reinterpret_cast<float*>(&word.data);
|
||||
}
|
||||
}
|
||||
|
||||
word_idx = align4(word_idx);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
auto& word = words.at(start_word_idx + 8 + i);
|
||||
auto& word = words.at(word_idx + i);
|
||||
if (word.kind() != LinkedWord::PLAIN_DATA) {
|
||||
env.func->warnings.error_and_throw("Reference to sparticle-launch-group bad: invalid bounds");
|
||||
}
|
||||
group.bounds[i] = *reinterpret_cast<float*>(&word.data);
|
||||
}
|
||||
word_idx += 4;
|
||||
}
|
||||
|
||||
void read_static_part_data(DecompiledDataElement* src,
|
||||
@@ -159,7 +181,10 @@ L80:
|
||||
auto& fld = car(cur_field);
|
||||
item.sound_spec = cdr(cdr(cdr(cdr(&fld))))->as_pair()->car;
|
||||
}
|
||||
if (item.field_id == 67) {
|
||||
if (item.field_id == 48) {
|
||||
item.userdata = car(cur_field);
|
||||
}
|
||||
if (item.is_sp_end(env.version)) {
|
||||
// sp-end
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -616,11 +616,14 @@ Mips2C_Line handle_daddiu(Mips2C_Output& out,
|
||||
}
|
||||
}
|
||||
|
||||
Mips2C_Line handle_sw(Mips2C_Output& out, const Instruction& i0, const std::string& instr_str) {
|
||||
Mips2C_Line handle_sw(Mips2C_Output& out,
|
||||
const Instruction& i0,
|
||||
const std::string& instr_str,
|
||||
GameVersion version) {
|
||||
if (i0.get_src(1).is_sym() && i0.get_src(2).is_reg(rs7())) {
|
||||
out.require_symbol(i0.get_src(1).get_sym());
|
||||
return {fmt::format("c->store_symbol({}, cache.{});", reg_to_name(i0.get_src(0)),
|
||||
goal_to_c_name(i0.get_src(1).get_sym())),
|
||||
return {fmt::format("c->store_symbol{}({}, cache.{});", version == GameVersion::Jak1 ? "" : "2",
|
||||
reg_to_name(i0.get_src(0)), goal_to_c_name(i0.get_src(1).get_sym())),
|
||||
instr_str};
|
||||
return handle_unknown(instr_str);
|
||||
// auto name = i0.get_src(1).get_sym();
|
||||
@@ -998,7 +1001,7 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
||||
case InstructionKind::OR:
|
||||
return handle_or(i0, instr_str);
|
||||
case InstructionKind::SW:
|
||||
return handle_sw(output, i0, instr_str);
|
||||
return handle_sw(output, i0, instr_str, version);
|
||||
case InstructionKind::VMOVE:
|
||||
return handle_generic_op2_mask(i0, instr_str, "vmove");
|
||||
case InstructionKind::VITOF0:
|
||||
@@ -1071,6 +1074,7 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output,
|
||||
case InstructionKind::PAND:
|
||||
case InstructionKind::PCEQB:
|
||||
case InstructionKind::PPACW:
|
||||
case InstructionKind::PCEQW:
|
||||
return handle_generic_op3(i0, instr_str, {});
|
||||
case InstructionKind::MULS:
|
||||
return handle_generic_op3(i0, instr_str, "muls");
|
||||
|
||||
@@ -3073,7 +3073,7 @@
|
||||
(bucket-311 311) ;; depth-cue
|
||||
|
||||
(tex-all-sprite 312)
|
||||
(bucket-313 313) ;; particles | progress (percent bar)
|
||||
(particles 313) ;; particles
|
||||
(bucket-314 314) ;; shadow
|
||||
(bucket-315 315) ;; effects
|
||||
(tex-all-warp 316) ;; tex
|
||||
@@ -5008,6 +5008,7 @@
|
||||
:bitfield #t
|
||||
(needs-log-in 8)
|
||||
(bit-9 9)
|
||||
(backup-sprite-tex 10) ;; set when particle-setup-adgif fails texture lookup.
|
||||
)
|
||||
|
||||
|
||||
@@ -19685,7 +19686,7 @@
|
||||
(get-field-spec-by-id
|
||||
"Returns the [[sp-field-init-spec]] that has the matching [[sp-field-id]]"
|
||||
(_type_ sp-field-id) sp-field-init-spec 9)
|
||||
(sparticle-launcher-method-10 (_type_ string) none 10)
|
||||
(setup-user-array (_type_ string) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -19770,11 +19771,11 @@
|
||||
:size-assert #x70
|
||||
:flag-assert #x1000000070
|
||||
(:methods
|
||||
(initialize (_type_ sparticle-launch-group process) none 9) ;;
|
||||
(sparticle-launch-control-method-10 (_type_ vector) symbol 10) ;; (is-visible? (_type_ vector) symbol 10)
|
||||
(initialize (_type_ sparticle-launch-group process) none 9)
|
||||
(is-visible? (_type_ vector) symbol 10)
|
||||
(spawn (_type_ vector) none 11) ;; TODO - CFG ;; (spawn (_type_ vector) object 11)
|
||||
(sparticle-launch-control-method-12 (_type_ matrix) none 12)
|
||||
(sparticle-launch-control-method-13 (_type_ cspace) none 13)
|
||||
(spawn-with-matrix (_type_ matrix) none 12)
|
||||
(spawn-with-cspace (_type_ cspace) none 13)
|
||||
(kill-and-free-particles (_type_) none 14)
|
||||
(kill-particles (_type_) none 15)
|
||||
)
|
||||
@@ -19815,6 +19816,12 @@
|
||||
)
|
||||
;; ---sparticle-h:sp-cpuinfo-flag
|
||||
|
||||
(defenum sp-cpuinfo-flag-s32
|
||||
:bitfield #t
|
||||
:type int32
|
||||
:copy-entries sp-cpuinfo-flag
|
||||
)
|
||||
|
||||
(declare-type sparticle-system basic)
|
||||
(deftype sparticle-cpuinfo (structure)
|
||||
((sprite sprite-vec-data-2d :offset-assert 0)
|
||||
@@ -19833,6 +19840,7 @@
|
||||
(friction float :offset-assert 96)
|
||||
(timer int32 :offset-assert 100)
|
||||
(flags sp-cpuinfo-flag :offset-assert 104) ;; NOTE - loaded with lw and lwu?
|
||||
(flags-s32 sp-cpuinfo-flag-s32 :offset 104)
|
||||
(user-int32 int32 :offset-assert 108)
|
||||
(user-uint32 uint32 :offset 108)
|
||||
(user-float float :offset 108 :score 1)
|
||||
@@ -19850,7 +19858,7 @@
|
||||
(key-alt sparticle-launch-state :offset 132)
|
||||
(binding sparticle-launch-state :offset-assert 136)
|
||||
(data uint32 1 :offset 12) ;; guessed by decompiler
|
||||
(datab uint8 4 :offset 12)
|
||||
(datab int8 4 :offset 12)
|
||||
(dataf float 1 :offset 12) ;; guessed by decompiler
|
||||
(datac uint8 1 :offset 12) ;; guessed by decompiler
|
||||
)
|
||||
@@ -24228,20 +24236,6 @@
|
||||
;; sparticle-launcher ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype sparticle-launcher (basic)
|
||||
()
|
||||
:method-count-assert 11
|
||||
:size-assert #x10
|
||||
:flag-assert #xb00000010
|
||||
;; Failed to read fields.
|
||||
(:methods
|
||||
(sparticle-launcher-method-9 () none 9)
|
||||
(sparticle-launcher-method-10 () none 10)
|
||||
)
|
||||
)
|
||||
|#
|
||||
|
||||
(deftype sp-queued-launch-particles (structure)
|
||||
((sp-system sparticle-system :offset-assert 0) ;; guessed by decompiler
|
||||
(sp-launcher sparticle-launcher :offset-assert 4) ;; guessed by decompiler
|
||||
@@ -24310,15 +24304,15 @@
|
||||
"Verifies if the given pointer, points to a [[sparticle-launch-group]]"
|
||||
(function pointer symbol))
|
||||
(define-extern unlink-part-group-by-heap (function kheap int)) ;;
|
||||
(define-extern sp-init-fields! (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object)) ;; TODO - mips2c
|
||||
(define-extern sp-init-fields! (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object))
|
||||
(define-extern *sp-launcher-lock* symbol) ;;
|
||||
(define-extern *sp-launch-queue* sp-launch-queue) ;;
|
||||
(define-extern *sp-launcher-enable* symbol) ;;
|
||||
;; (define-extern particle-setup-adgif (function adgif-shader texture-id none)) ;; TODO - assertion failure
|
||||
(define-extern particle-setup-adgif (function adgif-shader int none)) ;; TODO - assertion failure
|
||||
(define-extern *particle-adgif-cache* particle-adgif-cache) ;;
|
||||
(define-extern particle-adgif-cache-flush "Clear [[*particle-adgif-cache*]]" (function none))
|
||||
(define-extern particle-adgif (function adgif-shader texture-id none)) ;; TODO - particle-adgif atomic ops, MIPS2C
|
||||
(define-extern particle-adgif-callback (function adgif-shader none)) ;; TODO bad VF dependencies
|
||||
(define-extern particle-adgif (function adgif-shader texture-id none))
|
||||
(define-extern particle-adgif-callback (function adgif-shader texture-id none))
|
||||
(define-extern sp-queue-launch (function sparticle-system sparticle-launcher matrix int))
|
||||
(define-extern sp-adjust-launch (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) matrix symbol none)) ;;
|
||||
(define-extern sp-euler-convert (function sparticle-launchinfo sparticle-cpuinfo none)) ;;
|
||||
@@ -24343,8 +24337,8 @@
|
||||
(define-extern sparticle-respawn-heights (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-respawn-timer (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-texture-animate (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-texture-day-night (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-mode-animate (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-texture-day-night (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none))
|
||||
(define-extern sparticle-mode-animate (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none))
|
||||
(define-extern sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern sparticle-motion-blur-old "Unused" (function object sparticle-cpuinfo sprite-vec-data-3d object))
|
||||
(define-extern sparticle-set-conerot (function sparticle-launcher vector none))
|
||||
@@ -24365,16 +24359,16 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern sp-particle-copy! (function sparticle-cpuinfo sparticle-cpuinfo none)) ;;
|
||||
(define-extern *sp-particle-system-2d* sparticle-system) ;;
|
||||
(define-extern *sp-particle-system-3d* sparticle-system) ;; sparticle-system
|
||||
(define-extern *sp-particle-system-2d* sparticle-system)
|
||||
(define-extern *sp-particle-system-3d* sparticle-system)
|
||||
(define-extern sp-get-block-size (function sparticle-system int int)) ;;
|
||||
(define-extern sp-get-approx-alloc-size (function sparticle-system int int)) ;;
|
||||
(define-extern sp-free-particle (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)) ;;
|
||||
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) ;; TODO - manually fixed in jak 1? gross
|
||||
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo))
|
||||
(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol)) ;;
|
||||
(define-extern sp-orbiter (function sparticle-system sparticle-cpuinfo vector none)) ;;
|
||||
(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none)) ;; TODO - mips2c
|
||||
(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none))
|
||||
(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none))
|
||||
(define-extern sp-copy-to-spr (function int pointer int none)) ;; TODO - these are all actually uints, but this is needed to get the casts right...
|
||||
(define-extern sp-copy-from-spr (function int pointer int none)) ;; TODO - these are all actually uints, but this is needed to get the casts right...
|
||||
(define-extern memcpy function) ;; TODO - was done manually as well?
|
||||
@@ -25633,15 +25627,15 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define-extern group-rain-screend-drop sparticle-launch-group) ;;
|
||||
(define-extern update-snow (function target none))
|
||||
;; (define-extern birth-func-omega-normal-orient function)
|
||||
;; (define-extern birth-func-rain function)
|
||||
;; (define-extern check-drop-level-rain function) ;; (function sparticle-system sparticle-cpuinfo vector none)
|
||||
;; (define-extern check-drop-level-rain2 function)
|
||||
;; (define-extern check-drop-level-splash function)
|
||||
(define-extern update-rain (function target none))
|
||||
(define-extern update-snow (function float vector vector none))
|
||||
(define-extern birth-func-omega-normal-orient (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none))
|
||||
(define-extern birth-func-rain (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none))
|
||||
(define-extern check-drop-level-rain (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern check-drop-level-rain2 (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern check-drop-level-splash (function sparticle-system sparticle-cpuinfo vector none))
|
||||
(define-extern update-rain (function float vector vector none))
|
||||
(define-extern cam-master-effect (function none :behavior camera-master)) ;;
|
||||
;; (define-extern sparticle-track-sun function) ;; (function int sparticle-cpuinfo matrix none)
|
||||
(define-extern sparticle-track-sun (function int sparticle-cpuinfo matrix none))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; time-of-day ;;
|
||||
@@ -30578,21 +30572,22 @@
|
||||
;; part-tester ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype part-tester (UNKNOWN)
|
||||
()
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
(deftype part-tester (process)
|
||||
((root trsqv)
|
||||
(part sparticle-launch-control)
|
||||
(old-group sparticle-launch-group))
|
||||
:heap-base 16
|
||||
:size-assert #x8c
|
||||
:flag-assert #xe0010008c
|
||||
;; Failed to read fields.
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *part-tester-name* object) ;; string
|
||||
;; (define-extern part-tester-idle state) ;; (state part-tester)
|
||||
;; (define-extern part-tester-init-by-other function) ;; (function vector none :behavior process-drawable)
|
||||
;; (define-extern *debug-part-dead-pool* object) ;; dead-pool
|
||||
;; (define-extern start-part function) ;; (function none)
|
||||
(define-extern *part-tester-name* string)
|
||||
(define-extern part-tester-idle (state part-tester))
|
||||
(define-extern part-tester-init-by-other (function vector none :behavior process-drawable))
|
||||
(define-extern *debug-part-dead-pool* dead-pool)
|
||||
(define-extern start-part (function none))
|
||||
(define-extern *part-tester* (pointer process))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; editable-h ;;
|
||||
|
||||
@@ -140,9 +140,6 @@
|
||||
"(anon-function 4 gun-states)",
|
||||
"(anon-function 28 grenadier)",
|
||||
"(anon-function 24 grenadier)",
|
||||
// no longer bug or asm, not done yet
|
||||
"particle-adgif-callback",
|
||||
|
||||
// texture
|
||||
"adgif-shader<-texture!"
|
||||
],
|
||||
@@ -390,7 +387,13 @@
|
||||
"render-boundary-quad",
|
||||
"render-boundary-tri",
|
||||
"clip-polygon-against-negative-hyperplane",
|
||||
"clip-polygon-against-positive-hyperplane"
|
||||
"clip-polygon-against-positive-hyperplane",
|
||||
"sp-init-fields!",
|
||||
"particle-adgif",
|
||||
"sp-launch-particles-var",
|
||||
"sparticle-motion-blur",
|
||||
"sp-process-block-2d",
|
||||
"sp-process-block-3d"
|
||||
],
|
||||
|
||||
"mips2c_jump_table_functions": {},
|
||||
|
||||
@@ -275,6 +275,7 @@
|
||||
"tie-methods": [["L328", "(inline-array tie-init-data)", 6]],
|
||||
"blocking-plane": [["L43", "vector"]],
|
||||
"elec-gate": [["L141", "attack-info"]],
|
||||
"part-tester": [["L35", "uint64", true], ["L30", "uint64", true]],
|
||||
"progress-draw": [
|
||||
["L933", "uint64", true],
|
||||
["L934", "uint64", true],
|
||||
|
||||
@@ -928,6 +928,18 @@
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"particle-adgif-callback": [
|
||||
[16, ["inline-array", "vector", 4]]
|
||||
],
|
||||
"sparticle-respawn-heights": [
|
||||
[16, "vector"]
|
||||
],
|
||||
"sparticle-respawn-timer": [
|
||||
[16, "vector"]
|
||||
],
|
||||
"check-drop-level-rain": [
|
||||
[16, "vector"]
|
||||
],
|
||||
"progress-post": [[112, "hud-box"]],
|
||||
"(method 10 menu-missions-option)": [[224, "hud-box"]],
|
||||
"(method 10 menu-secret-option)": [[64, "hud-box"]],
|
||||
|
||||
@@ -1434,13 +1434,50 @@
|
||||
[[49, 61], "v1", "dma-packet"]
|
||||
],
|
||||
"sparticle-track-root-prim": [[3, "v1", "collide-shape"]],
|
||||
"(method 10 sparticle-launcher)": [[41, "gp", "(array float)"]],
|
||||
"birth-func-texture-group": [[3, "s5", "(pointer int32)"]],
|
||||
"(method 10 sparticle-launcher)": [[[41, 75], "gp", "(array int32)"]],
|
||||
"birth-func-texture-group": [[[2, 10], "s5", "(array int32)"]],
|
||||
"(method 9 sparticle-launch-control)": [[22, "a2", "process-drawable"]],
|
||||
"(method 10 sparticle-launch-control)": [[42, "a3", "float"]],
|
||||
"execute-part-engine": [
|
||||
[11, "v1", "connection"],
|
||||
[137, "a3", "vector"]
|
||||
[12, "a0", "process-drawable"],
|
||||
[13, "v1", "connection"],
|
||||
[[19, 53], "s0", "vector"],
|
||||
[23, "v1", "connection"],
|
||||
[28, "v1", "connection"],
|
||||
[29, "v1", "int"],
|
||||
[137, "a3", "vector"],
|
||||
[35, "a0", "process-drawable"]
|
||||
],
|
||||
"sparticle-respawn-heights": [
|
||||
[[0, 58], "gp", "(array int32)"],
|
||||
[58, "gp", "(array int32)"],
|
||||
[34, "v1", "int"]
|
||||
],
|
||||
"sparticle-respawn-timer": [
|
||||
[[9, 15], "gp", "(array int32)"],
|
||||
[34, "gp", "(array int32)"],
|
||||
[10, "v1", "int"]
|
||||
],
|
||||
"sparticle-texture-animate": [
|
||||
[[0, 31], "v1", "(array int32)"],
|
||||
[47, "v1", "(array int32)"]
|
||||
],
|
||||
"sparticle-texture-day-night": [
|
||||
[[21, 78], "s2", "(array int32)"]
|
||||
],
|
||||
"sparticle-mode-animate": [
|
||||
[5, "v1", "(array symbol)"],
|
||||
[[7, 16], "a1", "(array uint32)"],
|
||||
[18, "a1", "vector4w"],
|
||||
[21, "a1", "(pointer int32)"],
|
||||
[26, "a1", "(array int32)"],
|
||||
[28, "v1", "(array int32)"],
|
||||
[32, "a0", "(pointer int64)"],
|
||||
// [33, "a0", "(pointer int64)"],
|
||||
[44, "v1", "(pointer int32)"],
|
||||
[46, "v1", "(pointer int32)"]
|
||||
|
||||
],
|
||||
"(method 2 sparticle-cpuinfo)": [[14, "f0", "float"]],
|
||||
"sp-kill-particle": [
|
||||
@@ -2931,6 +2968,9 @@
|
||||
[99, "a0", "dma-packet"],
|
||||
[97, "a1", "dma-packet"]
|
||||
],
|
||||
"(code part-tester-idle)": [
|
||||
[[16, 22], "s5", "process-drawable"]
|
||||
],
|
||||
"(method 25 progress)": [[[19, 31], "a0", "menu-option"]],
|
||||
"(method 24 progress)": [
|
||||
[70, "a0", "(array menu-option)"],
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
// if you want to filter to only some object names.
|
||||
// it will make the decompiler much faster.
|
||||
"allowed_objects": ["mood"],
|
||||
"allowed_objects": [],
|
||||
"banned_objects": ["effect-control", "target-util", "ctywide-scenes"],
|
||||
|
||||
////////////////////////////
|
||||
|
||||
@@ -26,7 +26,8 @@ goos::Object decompile_at_label_with_hint(const LabelInfo& hint,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
DecompilerTypeSystem& dts,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
const auto& type = hint.result_type;
|
||||
if (!hint.array_size.has_value()) {
|
||||
// if we don't have an array size, treat it as just a normal type.
|
||||
@@ -34,7 +35,7 @@ goos::Object decompile_at_label_with_hint(const LabelInfo& hint,
|
||||
throw std::runtime_error(fmt::format(
|
||||
"Label {} was marked as a value, but is being decompiled as a reference.", hint.name));
|
||||
}
|
||||
return decompile_at_label(type, label, labels, words, dts.ts, file);
|
||||
return decompile_at_label(type, label, labels, words, dts.ts, file, version);
|
||||
}
|
||||
|
||||
if (type.base_type() == "pointer") {
|
||||
@@ -95,8 +96,8 @@ goos::Object decompile_at_label_with_hint(const LabelInfo& hint,
|
||||
fake_label.target_segment = label.target_segment;
|
||||
fake_label.offset = label.offset + field_type_info->get_offset() + stride * elt;
|
||||
fake_label.name = fmt::format("fake-label-{}-elt-{}", type.get_single_arg().print(), elt);
|
||||
array_def.push_back(
|
||||
decompile_at_label(type.get_single_arg(), fake_label, labels, words, dts.ts, file));
|
||||
array_def.push_back(decompile_at_label(type.get_single_arg(), fake_label, labels, words,
|
||||
dts.ts, file, version));
|
||||
}
|
||||
return pretty_print::build_list(array_def);
|
||||
}
|
||||
@@ -151,12 +152,13 @@ goos::Object decompile_at_label_guess_type(const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
auto guessed_type = get_type_of_label(label, words);
|
||||
if (!guessed_type.has_value()) {
|
||||
throw std::runtime_error("Could not guess the type of " + label.name);
|
||||
}
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file);
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file, version);
|
||||
}
|
||||
|
||||
goos::Object decompile_function_at_label(const DecompilerLabel& label,
|
||||
@@ -187,6 +189,7 @@ goos::Object decompile_at_label(const TypeSpec& type,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version,
|
||||
bool in_static_pair) {
|
||||
if (type == TypeSpec("string")) {
|
||||
return decompile_string_at_label(label, words);
|
||||
@@ -201,15 +204,15 @@ goos::Object decompile_at_label(const TypeSpec& type,
|
||||
if (type.has_single_arg()) {
|
||||
content_type_spec = type.get_single_arg();
|
||||
}
|
||||
return decompile_boxed_array(label, labels, words, ts, file, content_type_spec);
|
||||
return decompile_boxed_array(label, labels, words, ts, file, content_type_spec, version);
|
||||
}
|
||||
|
||||
if (ts.tc(TypeSpec("structure"), type)) {
|
||||
return decompile_structure(type, label, labels, words, ts, file, true);
|
||||
return decompile_structure(type, label, labels, words, ts, file, true, version);
|
||||
}
|
||||
|
||||
if (type == TypeSpec("pair")) {
|
||||
return decompile_pair(label, labels, words, ts, true, file);
|
||||
return decompile_pair(label, labels, words, ts, true, file, version);
|
||||
}
|
||||
|
||||
throw std::runtime_error("Unimplemented decompile_at_label for " + type.print());
|
||||
@@ -439,7 +442,8 @@ goos::Object decomp_ref_to_inline_array_guess_size(
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file,
|
||||
const TypeSpec& array_elt_type,
|
||||
int stride) {
|
||||
int stride,
|
||||
GameVersion version) {
|
||||
// lg::print("Decomp decomp_ref_to_inline_array_guess_size {}\n", array_elt_type.print());
|
||||
|
||||
// verify the stride matches the type system
|
||||
@@ -511,7 +515,7 @@ goos::Object decomp_ref_to_inline_array_guess_size(
|
||||
fake_label.target_segment = my_seg; // same segment
|
||||
fake_label.offset = start_label.offset + elt * stride;
|
||||
array_def.push_back(
|
||||
decompile_at_label(array_elt_type, fake_label, labels, all_words, ts, file));
|
||||
decompile_at_label(array_elt_type, fake_label, labels, all_words, ts, file, version));
|
||||
}
|
||||
|
||||
// build into a list.
|
||||
@@ -532,9 +536,10 @@ goos::Object ocean_near_indices_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("ocean-near-index"), 32);
|
||||
file, TypeSpec("ocean-near-index"), 32, version);
|
||||
}
|
||||
|
||||
goos::Object ocean_mid_masks_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -543,9 +548,10 @@ goos::Object ocean_mid_masks_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("ocean-mid-mask"), 8);
|
||||
file, TypeSpec("ocean-mid-mask"), 8, version);
|
||||
}
|
||||
|
||||
goos::Object sp_field_init_spec_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -554,9 +560,10 @@ goos::Object sp_field_init_spec_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("sp-field-init-spec"), 16);
|
||||
file, TypeSpec("sp-field-init-spec"), 16, version);
|
||||
}
|
||||
|
||||
goos::Object nav_mesh_vertex_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -565,9 +572,10 @@ goos::Object nav_mesh_vertex_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("nav-vertex"), 16);
|
||||
file, TypeSpec("nav-vertex"), 16, version);
|
||||
}
|
||||
|
||||
goos::Object nav_mesh_poly_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -576,9 +584,10 @@ goos::Object nav_mesh_poly_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("nav-poly"), 8);
|
||||
file, TypeSpec("nav-poly"), 8, version);
|
||||
}
|
||||
|
||||
goos::Object nav_mesh_poly_arr_jak2_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -587,9 +596,10 @@ goos::Object nav_mesh_poly_arr_jak2_decompile(const std::vector<LinkedWord>& wor
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("nav-poly"), 64);
|
||||
file, TypeSpec("nav-poly"), 64, version);
|
||||
}
|
||||
|
||||
goos::Object nav_mesh_nav_control_arr_decompile(
|
||||
@@ -599,9 +609,10 @@ goos::Object nav_mesh_nav_control_arr_decompile(
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("nav-control"), 288);
|
||||
file, TypeSpec("nav-control"), 288, version);
|
||||
}
|
||||
|
||||
goos::Object xz_height_map_data_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -610,9 +621,10 @@ goos::Object xz_height_map_data_arr_decompile(const std::vector<LinkedWord>& wor
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("vector4b"), 4);
|
||||
file, TypeSpec("vector4b"), 4, version);
|
||||
}
|
||||
|
||||
goos::Object nav_mesh_route_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -621,9 +633,10 @@ goos::Object nav_mesh_route_arr_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("vector4ub"), 4);
|
||||
file, TypeSpec("vector4ub"), 4, version);
|
||||
}
|
||||
|
||||
goos::Object sp_launch_grp_launcher_decompile(const std::vector<LinkedWord>& words,
|
||||
@@ -632,9 +645,10 @@ goos::Object sp_launch_grp_launcher_decompile(const std::vector<LinkedWord>& wor
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("sparticle-group-item"), 32);
|
||||
file, TypeSpec("sparticle-group-item"), 32, version);
|
||||
}
|
||||
goos::Object probe_dir_decompile(const std::vector<LinkedWord>& words,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
@@ -642,9 +656,10 @@ goos::Object probe_dir_decompile(const std::vector<LinkedWord>& words,
|
||||
int field_location,
|
||||
const TypeSystem& ts,
|
||||
const std::vector<std::vector<LinkedWord>>& all_words,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts, all_words,
|
||||
file, TypeSpec("vector"), 16);
|
||||
file, TypeSpec("vector"), 16, version);
|
||||
}
|
||||
|
||||
goos::Object decompile_sound_spec(const TypeSpec& type,
|
||||
@@ -652,7 +667,8 @@ goos::Object decompile_sound_spec(const TypeSpec& type,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
// auto normal = decompile_structure(type, label, labels, words, ts, file, false);
|
||||
// lg::print("Doing: {}\n", normal.print());
|
||||
auto uncast_type_info = ts.lookup_type(type);
|
||||
@@ -673,7 +689,7 @@ goos::Object decompile_sound_spec(const TypeSpec& type,
|
||||
for (int i = 0; i < word_count - 1; ++i) {
|
||||
if (i == word_count - 2 && !obj_words.at(i).data) {
|
||||
// just some default initialized sound spec, don't attempt anything fancy.
|
||||
return decompile_structure(type, label, labels, words, ts, file, false);
|
||||
return decompile_structure(type, label, labels, words, ts, file, false, version);
|
||||
}
|
||||
if (obj_words.at(i).data)
|
||||
break;
|
||||
@@ -801,14 +817,15 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
bool use_fancy_macros) {
|
||||
bool use_fancy_macros,
|
||||
GameVersion version) {
|
||||
// some structures we want to decompile to fancy macros instead of a raw static definiton
|
||||
// temp hack!!
|
||||
if (use_fancy_macros && file) {
|
||||
if (file->version == GameVersion::Jak1) {
|
||||
if (type == TypeSpec("sp-field-init-spec")) {
|
||||
ASSERT(file->version == GameVersion::Jak1); // need to update enums
|
||||
return decompile_sparticle_field_init(type, label, labels, words, ts, file);
|
||||
return decompile_sparticle_field_init(type, label, labels, words, ts, file, version);
|
||||
}
|
||||
if (type == TypeSpec("sparticle-group-item")) {
|
||||
ASSERT(file->version == GameVersion::Jak1); // need to update enums
|
||||
@@ -816,7 +833,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
}
|
||||
}
|
||||
if (type == TypeSpec("sound-spec")) {
|
||||
return decompile_sound_spec(type, label, labels, words, ts, file);
|
||||
return decompile_sound_spec(type, label, labels, words, ts, file, version);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -851,7 +868,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
|
||||
// try again with the right type. this resets back to decompile_at_label because we may
|
||||
// want to get the specific function/string/etc implementations.
|
||||
return decompile_at_label(actual_type, label, labels, words, ts, file);
|
||||
return decompile_at_label(actual_type, label, labels, words, ts, file, version);
|
||||
} else {
|
||||
throw std::runtime_error(
|
||||
fmt::format("Basic has the wrong type pointer, got {} expected {} at label {}:{}",
|
||||
@@ -1017,49 +1034,49 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
// first, get the label:
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), ocean_near_indices_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "data" && type.print() == "ocean-mid-masks") {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), ocean_mid_masks_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "init-specs" && type.print() == "sparticle-launcher") {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), sp_field_init_spec_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "vertex" && type.print() == "nav-mesh" &&
|
||||
file->version == GameVersion::Jak1) {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), nav_mesh_vertex_arr_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "poly" && type.print() == "nav-mesh" &&
|
||||
file->version == GameVersion::Jak1) {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), nav_mesh_poly_arr_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "poly-array" && type.print() == "nav-mesh" &&
|
||||
file->version == GameVersion::Jak2) {
|
||||
field_defs_out.emplace_back(field.name(), nav_mesh_poly_arr_jak2_decompile(
|
||||
obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "nav-control-array" && type.print() == "nav-mesh" &&
|
||||
file->version == GameVersion::Jak2) {
|
||||
field_defs_out.emplace_back(field.name(), nav_mesh_nav_control_arr_decompile(
|
||||
obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "data" && type.print() == "xz-height-map" &&
|
||||
file->version == GameVersion::Jak2) {
|
||||
field_defs_out.emplace_back(field.name(), xz_height_map_data_arr_decompile(
|
||||
obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "route" && type.print() == "nav-mesh" &&
|
||||
file->version == GameVersion::Jak1) {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), nav_mesh_route_arr_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "launcher" && type.print() == "sparticle-launch-group") {
|
||||
field_defs_out.emplace_back(field.name(), sp_launch_grp_launcher_decompile(
|
||||
obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else if (field.name() == "col-mesh-indexes" && type.print() == "ropebridge-tuning") {
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), decomp_ref_to_integer_array_guess_size(
|
||||
@@ -1068,7 +1085,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
} else if (field.name() == "probe-dirs" && type.print() == "lightning-probe-vars") {
|
||||
field_defs_out.emplace_back(field.name(),
|
||||
probe_dir_decompile(obj_words, labels, label.target_segment,
|
||||
field_start, ts, words, file));
|
||||
field_start, ts, words, file, version));
|
||||
} else {
|
||||
if (field.type().base_type() == "pointer") {
|
||||
if (obj_words.at(field_start / 4).kind() != LinkedWord::SYM_PTR) {
|
||||
@@ -1105,7 +1122,8 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
fake_label.offset = offset_location + field.offset() + field_type_info->get_offset();
|
||||
fake_label.name = fmt::format("fake-label-{}-{}", actual_type.print(), field.name());
|
||||
field_defs_out.emplace_back(
|
||||
field.name(), decompile_at_label(field.type(), fake_label, labels, words, ts, file));
|
||||
field.name(),
|
||||
decompile_at_label(field.type(), fake_label, labels, words, ts, file, version));
|
||||
} else if (!field.is_dynamic() && field.is_array() && field.is_inline()) {
|
||||
// it's an inline array. let's figure out the len and stride
|
||||
auto len = field.array_size();
|
||||
@@ -1126,7 +1144,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
fake_label.name =
|
||||
fmt::format("fake-label-{}-{}-elt-{}", actual_type.print(), field.name(), elt);
|
||||
array_def.push_back(
|
||||
decompile_at_label(field.type(), fake_label, labels, words, ts, file));
|
||||
decompile_at_label(field.type(), fake_label, labels, words, ts, file, version));
|
||||
}
|
||||
field_defs_out.emplace_back(field.name(), pretty_print::build_list(array_def));
|
||||
} else if (!field.is_dynamic() && field.is_array() && !field.is_inline()) {
|
||||
@@ -1154,7 +1172,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
|
||||
if (word.kind() == LinkedWord::PTR) {
|
||||
array_def.push_back(decompile_at_label(field.type(), labels.at(word.label_id()), labels,
|
||||
words, ts, file));
|
||||
words, ts, file, version));
|
||||
} else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) {
|
||||
// do nothing, the default is zero?
|
||||
array_def.push_back(pretty_print::to_symbol("0"));
|
||||
@@ -1430,7 +1448,8 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
const std::optional<TypeSpec>& content_type_override) {
|
||||
const std::optional<TypeSpec>& content_type_override,
|
||||
GameVersion version) {
|
||||
TypeSpec content_type;
|
||||
auto type_ptr_word_idx = (label.offset / 4) - 1;
|
||||
if ((label.offset % 8) == 4) {
|
||||
@@ -1487,11 +1506,11 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
result.push_back(pretty_print::to_symbol("0"));
|
||||
} else if (word.kind() == LinkedWord::PTR) {
|
||||
if (content_type == TypeSpec("object")) {
|
||||
result.push_back(
|
||||
decompile_at_label_guess_type(labels.at(word.label_id()), labels, words, ts, file));
|
||||
result.push_back(decompile_at_label_guess_type(labels.at(word.label_id()), labels, words,
|
||||
ts, file, version));
|
||||
} else {
|
||||
result.push_back(decompile_at_label(content_type, labels.at(word.label_id()), labels,
|
||||
words, ts, file));
|
||||
words, ts, file, version));
|
||||
}
|
||||
} else if (word.kind() == LinkedWord::SYM_PTR) {
|
||||
result.push_back(pretty_print::to_symbol(fmt::format("'{}", word.symbol_name())));
|
||||
@@ -1519,7 +1538,7 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
auto segment = labels.at(word.label_id()).target_segment;
|
||||
result.push_back(decomp_ref_to_inline_array_guess_size(
|
||||
words.at(segment), labels, segment, (first_elt_word_idx + elt) * 4, ts, words, file,
|
||||
content_type.get_single_arg(), ts.get_deref_info(content_type).stride));
|
||||
content_type.get_single_arg(), ts.get_deref_info(content_type).stride, version));
|
||||
}
|
||||
|
||||
return pretty_print::build_list(result);
|
||||
@@ -1552,7 +1571,8 @@ goos::Object decompile_pair_elt(const LinkedWord& word,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
if (word.kind() == LinkedWord::PTR) {
|
||||
auto& label = labels.at(word.label_id());
|
||||
auto guessed_type = get_type_of_label(label, words);
|
||||
@@ -1561,10 +1581,10 @@ goos::Object decompile_pair_elt(const LinkedWord& word,
|
||||
}
|
||||
|
||||
if (guessed_type == TypeSpec("pair")) {
|
||||
return decompile_pair(label, labels, words, ts, false, file);
|
||||
return decompile_pair(label, labels, words, ts, false, file, version);
|
||||
}
|
||||
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file, true);
|
||||
return decompile_at_label(*guessed_type, label, labels, words, ts, file, version, true);
|
||||
} else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) {
|
||||
// do nothing, the default is zero?
|
||||
return pretty_print::to_symbol("0");
|
||||
@@ -1589,7 +1609,8 @@ goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
bool add_quote,
|
||||
const LinkedObjectFile* file) {
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
if ((label.offset % 8) != 2) {
|
||||
if ((label.offset % 4) != 0) {
|
||||
throw std::runtime_error(
|
||||
@@ -1618,7 +1639,7 @@ goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
if ((to_print.offset % 8) == 2) {
|
||||
// continue
|
||||
auto car_word = words.at(to_print.target_segment).at((to_print.offset - 2) / 4);
|
||||
list_tokens.push_back(decompile_pair_elt(car_word, labels, words, ts, file));
|
||||
list_tokens.push_back(decompile_pair_elt(car_word, labels, words, ts, file, version));
|
||||
|
||||
auto cdr_word = words.at(to_print.target_segment).at((to_print.offset + 2) / 4);
|
||||
// if empty
|
||||
@@ -1636,7 +1657,7 @@ goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
}
|
||||
// improper
|
||||
list_tokens.push_back(pretty_print::to_symbol("."));
|
||||
list_tokens.push_back(decompile_pair_elt(cdr_word, labels, words, ts, file));
|
||||
list_tokens.push_back(decompile_pair_elt(cdr_word, labels, words, ts, file, version));
|
||||
if (add_quote) {
|
||||
return pretty_print::build_list("quote", pretty_print::build_list(list_tokens));
|
||||
} else {
|
||||
@@ -1649,8 +1670,9 @@ goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
} else {
|
||||
// improper
|
||||
list_tokens.push_back(pretty_print::to_symbol("."));
|
||||
list_tokens.push_back(decompile_pair_elt(
|
||||
words.at(to_print.target_segment).at(to_print.offset / 4), labels, words, ts, file));
|
||||
list_tokens.push_back(
|
||||
decompile_pair_elt(words.at(to_print.target_segment).at(to_print.offset / 4), labels,
|
||||
words, ts, file, version));
|
||||
if (add_quote) {
|
||||
return pretty_print::build_list("quote", pretty_print::build_list(list_tokens));
|
||||
} else {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "common/goos/Object.h"
|
||||
#include "common/type_system/TypeSpec.h"
|
||||
#include "common/type_system/TypeSystem.h"
|
||||
#include "common/versions.h"
|
||||
|
||||
#include "decompiler/Disasm/DecompilerLabel.h"
|
||||
#include "decompiler/IR2/LabelDB.h"
|
||||
@@ -25,37 +26,43 @@ goos::Object decompile_at_label(const TypeSpec& type,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version,
|
||||
bool in_static_pair = false);
|
||||
goos::Object decompile_at_label_with_hint(const LabelInfo& hint,
|
||||
const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
DecompilerTypeSystem& dts,
|
||||
const LinkedObjectFile* file);
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version);
|
||||
goos::Object decompile_at_label_guess_type(const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file);
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version);
|
||||
goos::Object decompile_structure(const TypeSpec& actual_type,
|
||||
const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
bool use_fancy_macros);
|
||||
bool use_fancy_macros,
|
||||
GameVersion version);
|
||||
goos::Object decompile_pair(const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
bool add_quote,
|
||||
const LinkedObjectFile* file);
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version);
|
||||
goos::Object decompile_boxed_array(const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
const std::optional<TypeSpec>& content_type_override);
|
||||
const std::optional<TypeSpec>& content_type_override,
|
||||
GameVersion version);
|
||||
goos::Object decompile_value(const TypeSpec& type,
|
||||
const std::vector<u8>& bytes,
|
||||
const TypeSystem& ts);
|
||||
|
||||
@@ -80,6 +80,83 @@ enum class FieldId {
|
||||
SPT_END = 67,
|
||||
};
|
||||
|
||||
// jak2 version
|
||||
enum class FieldId2 {
|
||||
MISC_FIELDS_START = 0,
|
||||
SPT_TEXTURE = 1,
|
||||
SPT_ANIM = 2,
|
||||
SPT_ANIM_SPEED = 3,
|
||||
SPT_BIRTH_FUNC = 4,
|
||||
SPT_JOINT_REFPOINT = 5,
|
||||
SPT_NUM = 6,
|
||||
SPT_SOUND = 7,
|
||||
MISC_FIELDS_END = 8,
|
||||
SPRITE_FIELDS_START = 9,
|
||||
SPT_X = 10,
|
||||
SPT_Y = 11,
|
||||
SPT_Z = 12,
|
||||
SPT_SCALE_X = 13,
|
||||
SPT_ROT_X = 14,
|
||||
SPT_ROT_Y = 15,
|
||||
SPT_ROT_Z = 16,
|
||||
SPT_SCALE_Y = 17,
|
||||
SPT_R = 18,
|
||||
SPT_G = 19,
|
||||
SPT_B = 20,
|
||||
SPT_A = 21,
|
||||
SPRITE_FIELDS_END = 22,
|
||||
CPU_FIELDS_START = 23,
|
||||
SPT_OMEGA = 24,
|
||||
SPT_VEL_X = 25,
|
||||
SPT_VEL_Y = 26,
|
||||
SPT_VEL_Z = 27,
|
||||
SPT_SCALEVEL_X = 28,
|
||||
SPT_ROTVEL_X = 29,
|
||||
SPT_ROTVEL_Y = 30,
|
||||
SPT_ROTVEL_Z = 31,
|
||||
SPT_SCALEVEL_Y = 32,
|
||||
SPT_FADE_R = 33,
|
||||
SPT_FADE_G = 34,
|
||||
SPT_FADE_B = 35,
|
||||
SPT_FADE_A = 36,
|
||||
SPT_ACCEL_X = 37,
|
||||
SPT_ACCEL_Y = 38,
|
||||
SPT_ACCEL_Z = 39,
|
||||
SPT_DUMMY = 40,
|
||||
SPT_QUAT_X = 41,
|
||||
SPT_QUAT_Y = 42,
|
||||
SPT_QUAT_Z = 43,
|
||||
SPT_QUAD_W = 44,
|
||||
SPT_FRICTION = 45,
|
||||
SPT_TIMER = 46,
|
||||
SPT_FLAGS = 47,
|
||||
SPT_USERDATA = 48,
|
||||
SPT_FUNC = 49,
|
||||
SPT_NEXT_TIME = 50,
|
||||
SPT_NEXT_LAUNCHER = 51,
|
||||
CPU_FIELDS_END = 52,
|
||||
LAUNCH_FIELDS_START = 53,
|
||||
SPT_LAUNCHROT_X = 54,
|
||||
SPT_LAUNCHROT_Y = 55,
|
||||
SPT_LAUNCHROT_Z = 56,
|
||||
SPT_LAUNCHROT_W = 57,
|
||||
SPT_CONEROT_X = 58,
|
||||
SPT_CONEROT_Y = 59,
|
||||
SPT_CONEROT_Z = 60,
|
||||
SPT_CONEROT_W = 61,
|
||||
SPT_ROTATE_X = 62,
|
||||
SPT_ROTATE_Y = 63,
|
||||
SPT_ROTATE_Z = 64,
|
||||
SPT_CONEROT_RADIUS = 65,
|
||||
SPT_MAT_SCALE_X = 66,
|
||||
SPT_MAT_SCALE_Y = 67,
|
||||
SPT_MAT_SCALE_Z = 68,
|
||||
LAUNCH_FIELDS_END = 69,
|
||||
SPT_SCALE = 70,
|
||||
SPT_SCALEVEL = 71,
|
||||
SPT_END = 72,
|
||||
};
|
||||
|
||||
// flag vals:
|
||||
// 0: timer, flags, end
|
||||
// 1: texture, float, random-rangef
|
||||
@@ -115,7 +192,7 @@ struct SparticleFieldDecomp {
|
||||
FieldKind kind = FieldKind::INVALID;
|
||||
};
|
||||
|
||||
const SparticleFieldDecomp field_kinds[68] = {
|
||||
const SparticleFieldDecomp field_kind_jak1[68] = {
|
||||
{false}, // MISC_FIELDS_START = 0
|
||||
{true, FieldKind::TEXTURE_ID}, // SPT_TEXTURE = 1
|
||||
{false}, // SPT_ANIM = 2
|
||||
@@ -183,10 +260,89 @@ const SparticleFieldDecomp field_kinds[68] = {
|
||||
{false}, // LAUNCH_FIELDS_END = 64
|
||||
{false}, // SPT_SCALE = 65
|
||||
{false}, // SPT_SCALEVEL = 66
|
||||
{true, FieldKind::END_FLAG}, // SPT_END = 67
|
||||
|
||||
{true, FieldKind::END_FLAG} // SPT_END = 67
|
||||
};
|
||||
|
||||
const SparticleFieldDecomp field_kind_jak2[73] = {
|
||||
{false}, // MISC_FIELDS_START = 0
|
||||
{true, FieldKind::TEXTURE_ID}, // SPT_TEXTURE = 1
|
||||
{false}, // SPT_ANIM = 2
|
||||
{false}, // SPT_ANIM_SPEED = 3
|
||||
{true, FieldKind::FUNCTION}, // SPT_BIRTH_FUNC = 4
|
||||
{false}, // SPT_JOINT/REFPOINT = 5
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_NUM = 6
|
||||
{true, FieldKind::SOUND_SPEC}, // SPT_SOUND = 7
|
||||
{false}, // MISC_FIELDS_END = 8
|
||||
{false}, // SPRITE_FIELDS_START = 9
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_X = 10
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_Y = 11
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_Z = 12
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_SCALE_X = 13
|
||||
{true, FieldKind::ROT_X}, // SPT_ROT_X = 14
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROT_Y = 15
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROT_Z = 16
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_SCALE_Y = 17
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_R = 18
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_G = 19
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_B = 20
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_A = 21
|
||||
{false}, // SPRITE_FIELDS_END = 22
|
||||
{false}, // CPU_FIELDS_START = 23
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_OMEGA = 24
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_VEL_X = 25 (likely m/s)
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_VEL_Y = 26
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_VEL_Z = 27
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_SCALEVEL_X = 28
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTVEL_X = 29
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTVEL_Y = 30
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTVEL_Z = 31
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_SCALEVEL_Y = 32
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_FADE_R = 33
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_FADE_G = 34
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_FADE_B = 35
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_FADE_A = 36
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_ACCEL_X = 37
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_ACCEL_Y = 38
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_ACCEL_Z = 39
|
||||
{false}, // SPT_DUMMY = 40
|
||||
{false}, // SPT_QUAT_X = 41
|
||||
{false}, // SPT_QUAT_Y = 42
|
||||
{false}, // SPT_QUAT_Z = 43
|
||||
{false}, // SPT_QUAD_W = 44
|
||||
{true, FieldKind::FLOAT_WITH_RAND}, // SPT_FRICTION = 45
|
||||
{true, FieldKind::PLAIN_INT_WITH_RANDS}, // SPT_TIMER = 46
|
||||
{true, FieldKind::CPUINFO_FLAGS}, // SPT_FLAGS = 47
|
||||
{true, FieldKind::USERDATA}, // SPT_USERDATA = 48
|
||||
{true, FieldKind::FUNCTION}, // SPT_FUNC = 49
|
||||
{true, FieldKind::PLAIN_INT_WITH_RANDS}, // SPT_NEXT_TIME = 50
|
||||
{true, FieldKind::LAUNCHER_BY_ID}, // SPT_NEXT_LAUNCHER = 51
|
||||
{false}, // CPU_FIELDS_END = 52
|
||||
{false}, // LAUNCH_FIELDS_START = 53
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_LAUNCHROT_X = 54
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_LAUNCHROT_Y = 55
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_LAUNCHROT_Z = 56
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_LAUNCHROT_W = 57
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_CONEROT_X = 58
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_CONEROT_Y = 59
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_CONEROT_Z = 60
|
||||
{false}, // SPT_CONEROT_W = 61
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTATE_X = 62
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTATE_Y = 63
|
||||
{true, FieldKind::DEGREES_WITH_RAND}, // SPT_ROTATE_Z = 64
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_CONEROT_RADIUS = 65
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_MAT_SCALE_X = 66
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_MAT_SCALE_X = 67
|
||||
{true, FieldKind::METER_WITH_RAND}, // SPT_MAT_SCALE_X = 68
|
||||
{false}, // LAUNCH_FIELDS_END = 69
|
||||
{false}, // SPT_SCALE = 70
|
||||
{false}, // SPT_SCALEVEL = 71
|
||||
{true, FieldKind::END_FLAG} // SPT_END = 72
|
||||
};
|
||||
|
||||
const std::unordered_map<GameVersion, const SparticleFieldDecomp*> field_kinds = {
|
||||
{GameVersion::Jak1, field_kind_jak1},
|
||||
{GameVersion::Jak2, field_kind_jak2}};
|
||||
|
||||
std::string make_flags_str(const std::vector<std::string>& flags) {
|
||||
if (flags.empty()) {
|
||||
return "";
|
||||
@@ -536,8 +692,9 @@ goos::Object decompile_sparticle_field_init(const TypeSpec& type,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
auto normal = decompile_structure(type, label, labels, words, ts, file, false);
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version) {
|
||||
auto normal = decompile_structure(type, label, labels, words, ts, file, false, version);
|
||||
// lg::print("Doing: {}\n", normal.print());
|
||||
auto uncast_type_info = ts.lookup_type(type);
|
||||
auto type_info = dynamic_cast<StructureType*>(uncast_type_info);
|
||||
@@ -560,7 +717,7 @@ goos::Object decompile_sparticle_field_init(const TypeSpec& type,
|
||||
|
||||
ASSERT(field_id <= (u32)FieldId::SPT_END);
|
||||
auto field_name = decompile_int_enum_from_int(TypeSpec("sp-field-id"), ts, field_id);
|
||||
const auto& field_info = field_kinds[field_id];
|
||||
const auto& field_info = field_kinds.at(version)[field_id];
|
||||
if (!field_info.known) {
|
||||
throw std::runtime_error("Unknown sparticle field: " + field_name);
|
||||
}
|
||||
@@ -624,24 +781,47 @@ goos::Object decompile_sparticle_field_init(const TypeSpec& type,
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string debug_print(const LinkedWord& word) {
|
||||
switch (word.kind()) {
|
||||
case LinkedWord::PLAIN_DATA:
|
||||
return fmt::format("0x{:08x}", word.data);
|
||||
case LinkedWord::TYPE_PTR:
|
||||
return fmt::format("type: {}\n", word.symbol_name());
|
||||
case LinkedWord::EMPTY_PTR:
|
||||
return fmt::format("'()");
|
||||
case LinkedWord::HI_PTR:
|
||||
return fmt::format("hi ptr");
|
||||
case LinkedWord::LO_PTR:
|
||||
return fmt::format("lo ptr");
|
||||
case LinkedWord::PTR:
|
||||
return fmt::format("ptr");
|
||||
case LinkedWord::SYM_OFFSET:
|
||||
return fmt::format("offset '{}", word.symbol_name());
|
||||
case LinkedWord::SYM_PTR:
|
||||
return fmt::format("ptr '{}", word.symbol_name());
|
||||
}
|
||||
}
|
||||
|
||||
goos::Object decompile_sparticle_userdata_ASSERT(const std::vector<LinkedWord>& words,
|
||||
const std::string& field_name,
|
||||
const std::string& flag_name) {
|
||||
if (flag_name == "int-with-rand" || flag_name == "float-with-rand") {
|
||||
return decompile_sparticle_float_with_rand_init(words, field_name, flag_name);
|
||||
} else {
|
||||
fmt::print("flag name is {}\n", flag_name);
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
|
||||
goos::Object decompile_sparticle_field_init(const DefpartElement::StaticInfo::PartField& field,
|
||||
const TypeSystem& ts) {
|
||||
const TypeSystem& ts,
|
||||
GameVersion version) {
|
||||
auto field_id = field.field_id;
|
||||
auto flags = field.flags;
|
||||
|
||||
ASSERT(field_id <= (u32)FieldId::SPT_END);
|
||||
auto field_name = decompile_int_enum_from_int(TypeSpec("sp-field-id"), ts, field_id);
|
||||
const auto& field_info = field_kinds[field_id];
|
||||
const auto& field_info = field_kinds.at(version)[field_id];
|
||||
if (!field_info.known) {
|
||||
throw std::runtime_error("Unknown sparticle field: " + field_name);
|
||||
}
|
||||
@@ -691,7 +871,7 @@ goos::Object decompile_sparticle_field_init(const DefpartElement::StaticInfo::Pa
|
||||
result = decompile_sparticle_func(field.data, field_name, flag_name);
|
||||
break;
|
||||
case FieldKind::USERDATA:
|
||||
result = decompile_sparticle_userdata_ASSERT(field.data, field_name, flag_name);
|
||||
result = decompile_sparticle_userdata(field.data, field_name, flag_name, field.userdata);
|
||||
break;
|
||||
case FieldKind::ROT_X:
|
||||
result = decompile_sparticle_rot_x(field.data, field_name, flag_name);
|
||||
|
||||
@@ -13,9 +13,11 @@ goos::Object decompile_sparticle_field_init(const TypeSpec& type,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file);
|
||||
const LinkedObjectFile* file,
|
||||
GameVersion version);
|
||||
goos::Object decompile_sparticle_field_init(const DefpartElement::StaticInfo::PartField& field,
|
||||
const TypeSystem& ts);
|
||||
const TypeSystem& ts,
|
||||
GameVersion version);
|
||||
goos::Object decompile_sparticle_group_item(const TypeSpec& type,
|
||||
const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
|
||||
@@ -87,6 +87,8 @@ set(RUNTIME_SOURCE
|
||||
mips2c/jak2_functions/font.cpp
|
||||
mips2c/jak2_functions/joint.cpp
|
||||
mips2c/jak2_functions/sky.cpp
|
||||
mips2c/jak2_functions/sparticle.cpp
|
||||
mips2c/jak2_functions/sparticle_launcher.cpp
|
||||
mips2c/jak2_functions/texture.cpp
|
||||
overlord/dma.cpp
|
||||
overlord/fake_iso.cpp
|
||||
|
||||
@@ -88,23 +88,94 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
|
||||
using namespace jak2;
|
||||
m_bucket_renderers.resize((int)BucketId::MAX_BUCKETS);
|
||||
m_bucket_categories.resize((int)BucketId::MAX_BUCKETS, BucketCategory::OTHER);
|
||||
// 0
|
||||
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<TextureUploadHandler>("tex-l0-tfrag", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_TFRAG);
|
||||
init_bucket_renderer<TFragment>("tfrag-l0-tfrag", BucketCategory::TFRAG, BucketId::TFRAG_L0_TFRAG,
|
||||
std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, 0);
|
||||
init_bucket_renderer<Tie3>("tie-l0-tfrag", BucketCategory::TIE, BucketId::TIE_L0_TFRAG, 0);
|
||||
// 10
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l1-tfrag", BucketCategory::TEX,
|
||||
BucketId::TEX_L1_TFRAG);
|
||||
init_bucket_renderer<TFragment>("tfrag-l1-tfrag", BucketCategory::TFRAG, BucketId::TFRAG_L1_TFRAG,
|
||||
std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, 1);
|
||||
// 20
|
||||
init_bucket_renderer<Tie3>("tie-l1-tfrag", BucketCategory::TIE, BucketId::TIE_L1_TFRAG, 1);
|
||||
// 30
|
||||
// 40
|
||||
// 50
|
||||
// 60
|
||||
// 70
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l0-shrub", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_SHRUB);
|
||||
init_bucket_renderer<Shrub>("shrub-l0-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L0_SHRUB);
|
||||
// 80
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l1-shrub", BucketCategory::TEX,
|
||||
BucketId::TEX_L1_SHRUB);
|
||||
init_bucket_renderer<Shrub>("shrub-l1-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L1_SHRUB);
|
||||
// 90
|
||||
// 100
|
||||
// 110
|
||||
// 120
|
||||
init_bucket_renderer<TFragment>("tfrag-t-l0-alpha", BucketCategory::TFRAG,
|
||||
BucketId::TFRAG_T_L0_ALPHA,
|
||||
std::vector{tfrag3::TFragmentTreeKind::TRANS}, false, 0);
|
||||
// 130
|
||||
// 140
|
||||
// 150
|
||||
// 160
|
||||
// 170
|
||||
// 180
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-tfrag", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_TFRAG);
|
||||
// 190
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-shrub", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_SHRUB);
|
||||
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l0-pris", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_PRIS);
|
||||
// 200
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l2-pris", BucketCategory::TEX,
|
||||
BucketId::TEX_L2_PRIS);
|
||||
// 210
|
||||
// 220
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-pris", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_PRIS);
|
||||
// 230
|
||||
// 240
|
||||
// 250
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l0-water", BucketCategory::TEX,
|
||||
BucketId::TEX_L0_WATER);
|
||||
init_bucket_renderer<TFragment>("tfrag-w-l0-alpha", BucketCategory::TFRAG,
|
||||
BucketId::TFRAG_W_L0_WATER,
|
||||
std::vector{tfrag3::TFragmentTreeKind::WATER}, false, 0);
|
||||
// 260
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l1-water", BucketCategory::TEX,
|
||||
BucketId::TEX_L1_WATER);
|
||||
// 270
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-l2-water", BucketCategory::TEX,
|
||||
BucketId::TEX_L2_WATER);
|
||||
// 280
|
||||
// 290
|
||||
// 300
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-water", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_WATER);
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-lcom-sky-post", BucketCategory::TEX,
|
||||
BucketId::TEX_LCOM_SKY_POST);
|
||||
// 310
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-all-sprite", BucketCategory::TEX,
|
||||
BucketId::TEX_ALL_SPRITE);
|
||||
init_bucket_renderer<Sprite3>("particles", BucketCategory::SPRITE, BucketId::PARTICLES);
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-all-warp", BucketCategory::TEX,
|
||||
BucketId::TEX_ALL_WARP);
|
||||
init_bucket_renderer<DirectRenderer>("debug-no-zbuf1", BucketCategory::OTHER,
|
||||
BucketId::DEBUG_NO_ZBUF1, 0x8000);
|
||||
init_bucket_renderer<TextureUploadHandler>("tex-all-map", BucketCategory::TEX,
|
||||
BucketId::TEX_ALL_MAP);
|
||||
// 320
|
||||
init_bucket_renderer<DirectRenderer>("debug2", BucketCategory::OTHER, BucketId::DEBUG2, 0x8000);
|
||||
init_bucket_renderer<DirectRenderer>("debug-no-zbuf2", BucketCategory::OTHER,
|
||||
BucketId::DEBUG_NO_ZBUF2, 0x8000);
|
||||
|
||||
@@ -762,7 +762,7 @@ void Sprite3::distort_setup_framebuffer_dims(SharedRenderState* render_state) {
|
||||
* This should get the dma chain immediately after the call to sprite-draw-distorters.
|
||||
* It ends right before the sprite-add-matrix-data for the 3d's
|
||||
*/
|
||||
void Sprite3::handle_sprite_frame_setup(DmaFollower& dma) {
|
||||
void Sprite3::handle_sprite_frame_setup(DmaFollower& dma, GameVersion version) {
|
||||
// first is some direct data
|
||||
auto direct_data = dma.read_and_advance();
|
||||
ASSERT(direct_data.size_bytes == 3 * 16);
|
||||
@@ -771,17 +771,38 @@ void Sprite3::handle_sprite_frame_setup(DmaFollower& dma) {
|
||||
// next would be the program, but it's 0 size on the PC and isn't sent.
|
||||
|
||||
// next is the "frame data"
|
||||
auto frame_data = dma.read_and_advance();
|
||||
ASSERT(frame_data.size_bytes == (int)sizeof(SpriteFrameData)); // very cool
|
||||
ASSERT(frame_data.vifcode0().kind == VifCode::Kind::STCYCL);
|
||||
VifCodeStcycl frame_data_stcycl(frame_data.vifcode0());
|
||||
ASSERT(frame_data_stcycl.cl == 4);
|
||||
ASSERT(frame_data_stcycl.wl == 4);
|
||||
ASSERT(frame_data.vifcode1().kind == VifCode::Kind::UNPACK_V4_32);
|
||||
VifCodeUnpack frame_data_unpack(frame_data.vifcode1());
|
||||
ASSERT(frame_data_unpack.addr_qw == SpriteDataMem::FrameData);
|
||||
ASSERT(frame_data_unpack.use_tops_flag == false);
|
||||
memcpy(&m_frame_data, frame_data.data, sizeof(SpriteFrameData));
|
||||
switch (version) {
|
||||
case GameVersion::Jak1: {
|
||||
auto frame_data = dma.read_and_advance();
|
||||
ASSERT(frame_data.size_bytes == (int)sizeof(SpriteFrameDataJak1)); // very cool
|
||||
ASSERT(frame_data.vifcode0().kind == VifCode::Kind::STCYCL);
|
||||
VifCodeStcycl frame_data_stcycl(frame_data.vifcode0());
|
||||
ASSERT(frame_data_stcycl.cl == 4);
|
||||
ASSERT(frame_data_stcycl.wl == 4);
|
||||
ASSERT(frame_data.vifcode1().kind == VifCode::Kind::UNPACK_V4_32);
|
||||
VifCodeUnpack frame_data_unpack(frame_data.vifcode1());
|
||||
ASSERT(frame_data_unpack.addr_qw == SpriteDataMem::FrameData);
|
||||
ASSERT(frame_data_unpack.use_tops_flag == false);
|
||||
SpriteFrameDataJak1 jak1_data;
|
||||
memcpy(&jak1_data, frame_data.data, sizeof(SpriteFrameDataJak1));
|
||||
m_frame_data.from_jak1(jak1_data);
|
||||
} break;
|
||||
case GameVersion::Jak2: {
|
||||
auto frame_data = dma.read_and_advance();
|
||||
ASSERT(frame_data.size_bytes == (int)sizeof(SpriteFrameData)); // very cool
|
||||
ASSERT(frame_data.vifcode0().kind == VifCode::Kind::STCYCL);
|
||||
VifCodeStcycl frame_data_stcycl(frame_data.vifcode0());
|
||||
ASSERT(frame_data_stcycl.cl == 4);
|
||||
ASSERT(frame_data_stcycl.wl == 4);
|
||||
ASSERT(frame_data.vifcode1().kind == VifCode::Kind::UNPACK_V4_32);
|
||||
VifCodeUnpack frame_data_unpack(frame_data.vifcode1());
|
||||
ASSERT(frame_data_unpack.addr_qw == SpriteDataMem::FrameData);
|
||||
ASSERT(frame_data_unpack.use_tops_flag == false);
|
||||
memcpy(&m_frame_data, frame_data.data, sizeof(SpriteFrameData));
|
||||
} break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
// next, a MSCALF.
|
||||
auto mscalf = dma.read_and_advance();
|
||||
@@ -951,6 +972,84 @@ void Sprite3::render_2d_group1(DmaFollower& dma,
|
||||
}
|
||||
|
||||
void Sprite3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof) {
|
||||
switch (render_state->version) {
|
||||
case GameVersion::Jak1:
|
||||
render_jak1(dma, render_state, prof);
|
||||
break;
|
||||
case GameVersion::Jak2:
|
||||
render_jak2(dma, render_state, prof);
|
||||
break;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
void Sprite3::render_jak2(DmaFollower& dma,
|
||||
SharedRenderState* render_state,
|
||||
ScopedProfilerNode& prof) {
|
||||
m_debug_stats = {};
|
||||
auto data0 = dma.read_and_advance();
|
||||
ASSERT(data0.vif1() == 0 || data0.vifcode1().kind == VifCode::Kind::NOP);
|
||||
ASSERT(data0.vif0() == 0 || data0.vifcode0().kind == VifCode::Kind::MARK);
|
||||
ASSERT(data0.size_bytes == 0);
|
||||
|
||||
if (dma.current_tag_offset() == render_state->next_bucket) {
|
||||
fmt::print("early exit!");
|
||||
return;
|
||||
}
|
||||
|
||||
// First is the distorter (temporarily disabled for jak 2)
|
||||
{
|
||||
// auto child = prof.make_scoped_child("distorter");
|
||||
// render_distorter(dma, render_state, child);
|
||||
}
|
||||
|
||||
// next, the normal sprite stuff
|
||||
render_state->shaders[ShaderId::SPRITE3].activate();
|
||||
handle_sprite_frame_setup(dma, render_state->version);
|
||||
|
||||
// 3d sprites
|
||||
render_3d(dma);
|
||||
|
||||
// 2d draw
|
||||
// m_sprite_renderer.reset_state();
|
||||
{
|
||||
auto child = prof.make_scoped_child("2d-group0");
|
||||
render_2d_group0(dma, render_state, child);
|
||||
flush_sprites(render_state, prof, false);
|
||||
}
|
||||
|
||||
// shadow draw
|
||||
render_fake_shadow(dma);
|
||||
|
||||
// 2d draw (HUD)
|
||||
{
|
||||
auto child = prof.make_scoped_child("2d-group1");
|
||||
render_2d_group1(dma, render_state, child);
|
||||
flush_sprites(render_state, prof, true);
|
||||
}
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
|
||||
// TODO finish this up.
|
||||
// fmt::print("next bucket is 0x{}\n", render_state->next_bucket);
|
||||
while (dma.current_tag_offset() != render_state->next_bucket) {
|
||||
// auto tag = dma.current_tag();
|
||||
// fmt::print("@ 0x{:x} tag: {}", dma.current_tag_offset(), tag.print());
|
||||
auto data = dma.read_and_advance();
|
||||
VifCode code(data.vif0());
|
||||
// fmt::print(" vif0: {}\n", code.print());
|
||||
if (code.kind == VifCode::Kind::NOP) {
|
||||
// fmt::print(" vif1: {}\n", VifCode(data.vif1()).print());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Sprite3::render_jak1(DmaFollower& dma,
|
||||
SharedRenderState* render_state,
|
||||
ScopedProfilerNode& prof) {
|
||||
m_debug_stats = {};
|
||||
// First thing should be a NEXT with two nops. this is a jump from buckets to sprite data
|
||||
auto data0 = dma.read_and_advance();
|
||||
@@ -976,7 +1075,7 @@ void Sprite3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedPr
|
||||
render_state->shaders[ShaderId::SPRITE3].activate();
|
||||
|
||||
// next, sprite frame setup.
|
||||
handle_sprite_frame_setup(dma);
|
||||
handle_sprite_frame_setup(dma, render_state->version);
|
||||
|
||||
// 3d sprites
|
||||
render_3d(dma);
|
||||
@@ -1160,7 +1259,7 @@ void Sprite3::handle_zbuf(u64 val,
|
||||
// way - 24-bit, at offset 448.
|
||||
GsZbuf x(val);
|
||||
ASSERT(x.psm() == TextureFormat::PSMZ24);
|
||||
ASSERT(x.zbp() == 448);
|
||||
ASSERT(x.zbp() == 448 || x.zbp() == 304); // 304 for jak 2.
|
||||
|
||||
m_current_mode.set_depth_write_enable(!x.zmsk());
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ class Sprite3 : public BucketRenderer {
|
||||
static constexpr int SPRITES_PER_CHUNK = 48;
|
||||
|
||||
private:
|
||||
void render_jak1(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof);
|
||||
void render_jak2(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof);
|
||||
|
||||
void opengl_setup();
|
||||
void opengl_setup_normal();
|
||||
void opengl_setup_distort();
|
||||
@@ -33,7 +36,7 @@ class Sprite3 : public BucketRenderer {
|
||||
void distort_draw_instanced(SharedRenderState* render_state, ScopedProfilerNode& prof);
|
||||
void distort_draw_common(SharedRenderState* render_state, ScopedProfilerNode& prof);
|
||||
void distort_setup_framebuffer_dims(SharedRenderState* render_state);
|
||||
void handle_sprite_frame_setup(DmaFollower& dma);
|
||||
void handle_sprite_frame_setup(DmaFollower& dma, GameVersion version);
|
||||
void render_3d(DmaFollower& dma);
|
||||
void render_2d_group0(DmaFollower& dma,
|
||||
SharedRenderState* render_state,
|
||||
|
||||
@@ -15,6 +15,7 @@ void TextureUploadHandler::render(DmaFollower& dma,
|
||||
SharedRenderState* render_state,
|
||||
ScopedProfilerNode& prof) {
|
||||
// this is the data we get from the PC Port modification.
|
||||
m_upload_count = 0;
|
||||
std::vector<TextureUpload> uploads;
|
||||
|
||||
// loop through all data, grabbing buckets
|
||||
@@ -60,38 +61,18 @@ void TextureUploadHandler::flush_uploads(std::vector<TextureUpload>& uploads,
|
||||
if (m_fake_uploads) {
|
||||
uploads.clear();
|
||||
} else {
|
||||
m_upload_count += uploads.size();
|
||||
// NOTE: we don't actually copy the textures in the dma chain copying because they aren't
|
||||
// reference by DMA tag. So there's the potential for race conditions if the game gets messed
|
||||
// up and corrupts the texture memory.
|
||||
const u8* ee_mem = (const u8*)render_state->ee_main_memory;
|
||||
if (uploads.size() == 2 && uploads[0].mode == 2 && uploads[1].mode == -2 &&
|
||||
uploads[0].page == uploads[1].page) {
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + uploads[0].page, -2, ee_mem,
|
||||
for (auto& upload : uploads) {
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + upload.page, upload.mode, ee_mem,
|
||||
render_state->offset_of_s7);
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + uploads[0].page, 2, ee_mem,
|
||||
render_state->offset_of_s7);
|
||||
} else if (uploads.size() == 1 && uploads[0].mode == -1) {
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + uploads[0].page, -1, ee_mem,
|
||||
render_state->offset_of_s7);
|
||||
} else if (uploads.size() == 1 && uploads[0].mode == -2) {
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + uploads[0].page, -2, ee_mem,
|
||||
render_state->offset_of_s7);
|
||||
} else if (uploads.size() == 1 && uploads[0].mode == 0) {
|
||||
render_state->texture_pool->handle_upload_now(ee_mem + uploads[0].page, 0, ee_mem,
|
||||
render_state->offset_of_s7);
|
||||
}
|
||||
|
||||
else if (uploads.empty()) {
|
||||
// do nothing.
|
||||
} else {
|
||||
lg::error("unhandled upload sequence in {}:", m_name);
|
||||
for (auto& upload : uploads) {
|
||||
lg::error(" page: 0x{:x} mode: {}", upload.page, upload.mode);
|
||||
}
|
||||
ASSERT(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
void TextureUploadHandler::draw_debug_window() {
|
||||
ImGui::Checkbox("Fake Uploads", &m_fake_uploads);
|
||||
ImGui::Text("Uploads: %d", m_upload_count);
|
||||
}
|
||||
|
||||
@@ -21,4 +21,5 @@ class TextureUploadHandler : public BucketRenderer {
|
||||
};
|
||||
void flush_uploads(std::vector<TextureUpload>& uploads, SharedRenderState* render_state);
|
||||
bool m_fake_uploads = false;
|
||||
int m_upload_count = 0;
|
||||
};
|
||||
|
||||
@@ -82,15 +82,34 @@ namespace jak2 {
|
||||
|
||||
enum class BucketId {
|
||||
SPECIAL_BUCKET_2 = 2,
|
||||
TEX_LCOM_SKY_PRE = 4,
|
||||
TEX_L0_TFRAG = 7,
|
||||
TFRAG_L0_TFRAG = 8,
|
||||
TIE_L0_TFRAG = 9,
|
||||
TEX_L1_TFRAG = 18,
|
||||
TFRAG_L1_TFRAG = 19,
|
||||
TIE_L1_TFRAG = 20,
|
||||
TEX_L0_SHRUB = 73,
|
||||
SHRUB_L0_SHRUB = 74,
|
||||
TEX_L1_SHRUB = 82,
|
||||
SHRUB_L1_SHRUB = 83,
|
||||
TFRAG_T_L0_ALPHA = 128,
|
||||
TEX_LCOM_TFRAG = 187,
|
||||
TEX_LCOM_SHRUB = 191,
|
||||
TEX_L0_PRIS = 196,
|
||||
TEX_L2_PRIS = 204,
|
||||
TEX_LCOM_PRIS = 220,
|
||||
TEX_L0_WATER = 252,
|
||||
TFRAG_W_L0_WATER = 255,
|
||||
TEX_L1_WATER = 261,
|
||||
TEX_L2_WATER = 270,
|
||||
TEX_LCOM_WATER = 306,
|
||||
TEX_LCOM_SKY_POST = 309,
|
||||
TEX_ALL_SPRITE = 312,
|
||||
PARTICLES = 313,
|
||||
TEX_ALL_WARP = 316,
|
||||
DEBUG_NO_ZBUF1 = 318,
|
||||
TEX_ALL_MAP = 319,
|
||||
DEBUG2 = 324,
|
||||
DEBUG_NO_ZBUF2 = 325,
|
||||
DEBUG3 = 326,
|
||||
|
||||
@@ -28,7 +28,7 @@ out flat vec4 fragment_color;
|
||||
out vec3 tex_coord;
|
||||
out flat uvec2 tex_info;
|
||||
|
||||
const float SCISSOR_ADJUST = 512.0/448.0;
|
||||
const float SCISSOR_ADJUST = HEIGHT_SCALE * 512.0/448.0;
|
||||
|
||||
vec4 matrix_transform(mat4 mtx, vec3 pt) {
|
||||
return mtx[3]
|
||||
|
||||
@@ -12,7 +12,7 @@ using math::Vector4f;
|
||||
/*!
|
||||
* GOAL sprite-frame-data, all the data that's uploaded once per frame for the sprite system.
|
||||
*/
|
||||
struct SpriteFrameData {
|
||||
struct SpriteFrameDataJak1 {
|
||||
Vector4f xy_array[8];
|
||||
Vector4f st_array[4];
|
||||
Vector4f xyz_array[4];
|
||||
@@ -41,6 +41,71 @@ struct SpriteFrameData {
|
||||
float bonus;
|
||||
};
|
||||
|
||||
struct SpriteFrameData {
|
||||
Vector4f xy_array[8];
|
||||
Vector4f st_array[4];
|
||||
Vector4f xyz_array[4];
|
||||
Vector4f hmge_scale;
|
||||
float pfog0;
|
||||
float deg_to_rad;
|
||||
float min_scale;
|
||||
float inv_area;
|
||||
GifTag adgif_giftag;
|
||||
GifTag sprite_2d_giftag;
|
||||
GifTag sprite_2d_giftag2;
|
||||
Vector4f sincos[5];
|
||||
Vector4f basis_x;
|
||||
Vector4f basis_y;
|
||||
GifTag sprite_3d_giftag;
|
||||
GifTag sprite_3d_giftag_2;
|
||||
AdGifData screen_shader;
|
||||
GifTag clipped_giftag;
|
||||
Vector4f inv_hmge_scale;
|
||||
Vector4f stq_offset;
|
||||
Vector4f stq_scale;
|
||||
Vector4f rgba_plain;
|
||||
GifTag warp_giftag;
|
||||
float fog_min;
|
||||
float fog_max;
|
||||
float max_scale;
|
||||
float bonus;
|
||||
|
||||
void from_jak1(const SpriteFrameDataJak1& data) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
xy_array[i] = data.xy_array[i];
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
st_array[i] = data.st_array[i];
|
||||
xyz_array[i] = data.xyz_array[i];
|
||||
}
|
||||
hmge_scale = data.hmge_scale;
|
||||
pfog0 = data.pfog0;
|
||||
deg_to_rad = data.deg_to_rad;
|
||||
min_scale = data.min_scale;
|
||||
inv_area = data.inv_area;
|
||||
adgif_giftag = data.adgif_giftag;
|
||||
sprite_2d_giftag = data.sprite_2d_giftag;
|
||||
sprite_2d_giftag2 = data.sprite_2d_giftag2;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
sincos[i] = data.sincos[i];
|
||||
}
|
||||
basis_x = data.basis_x;
|
||||
basis_y = data.basis_y;
|
||||
sprite_3d_giftag = data.sprite_3d_giftag;
|
||||
screen_shader = data.screen_shader;
|
||||
clipped_giftag = data.clipped_giftag;
|
||||
inv_hmge_scale = data.inv_hmge_scale;
|
||||
stq_offset = data.stq_offset;
|
||||
stq_scale = data.stq_scale;
|
||||
rgba_plain = data.rgba_plain;
|
||||
warp_giftag = data.warp_giftag;
|
||||
fog_min = data.fog_min;
|
||||
fog_max = data.fog_max;
|
||||
max_scale = data.max_scale;
|
||||
bonus = data.bonus;
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* "Matrix Data" for 3D sprites. This is shared for all 3D sprites
|
||||
*/
|
||||
@@ -143,4 +208,5 @@ enum SpriteProgMem {
|
||||
};
|
||||
|
||||
static_assert(offsetof(SpriteFrameData, hmge_scale) == 256);
|
||||
static_assert(sizeof(SpriteFrameData) == 0x290, "SpriteFrameData size");
|
||||
static_assert(sizeof(SpriteFrameDataJak1) == 0x290, "SpriteFrameData size");
|
||||
static_assert(sizeof(SpriteFrameData) == 0x2a0, "SpriteFrameData size");
|
||||
@@ -0,0 +1,712 @@
|
||||
//--------------------------MIPS2C---------------------
|
||||
// clang-format off
|
||||
#include "game/mips2c/mips2c_private.h"
|
||||
#include "game/kernel/jak2/kscheme.h"
|
||||
using ::jak2::intern_from_c;
|
||||
namespace Mips2C::jak2 {
|
||||
namespace sp_process_block_2d {
|
||||
struct Cache {
|
||||
void* fake_scratchpad_data; // *fake-scratchpad-data*
|
||||
void* add_to_sprite_aux_list; // add-to-sprite-aux-list
|
||||
void* sp_free_particle; // sp-free-particle
|
||||
void* sp_orbiter; // sp-orbiter
|
||||
void* sp_relaunch_particle_2d; // sp-relaunch-particle-2d
|
||||
} cache;
|
||||
|
||||
u64 execute(void* ctxt) {
|
||||
auto* c = (ExecutionContext*)ctxt;
|
||||
bool bc = false;
|
||||
u32 call_addr = 0;
|
||||
c->daddiu(sp, sp, -128); // daddiu sp, sp, -128
|
||||
c->sd(ra, 0, sp); // sd ra, 0(sp)
|
||||
c->sq(s0, 16, sp); // sq s0, 16(sp)
|
||||
c->sq(s1, 32, sp); // sq s1, 32(sp)
|
||||
c->sq(s2, 48, sp); // sq s2, 48(sp)
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->sq(s4, 80, sp); // sq s4, 80(sp)
|
||||
c->sq(s5, 96, sp); // sq s5, 96(sp)
|
||||
c->sq(gp, 112, sp); // sq gp, 112(sp)
|
||||
c->mov64(gp, a0); // or gp, a0, r0
|
||||
c->mov64(s5, a1); // or s5, a1, r0
|
||||
c->mov64(s4, a2); // or s4, a2, r0
|
||||
c->mov64(s1, a3); // or s1, a3, r0
|
||||
c->mov64(s3, t0); // or s3, t0, r0
|
||||
c->mov64(s2, t1); // or s2, t1, r0
|
||||
|
||||
block_1:
|
||||
c->lb(v1, 128, s5); // lb v1, 128(s5)
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L113
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
c->lb(a0, 129, s5); // lb a0, 129(s5)
|
||||
get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672
|
||||
c->dsll(a0, a0, 4); // dsll a0, a0, 4
|
||||
c->daddu(v1, v1, a0); // daddu v1, v1, a0
|
||||
c->lqc2(vf9, 0, v1); // lqc2 vf9, 0(v1)
|
||||
c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9
|
||||
c->andi(s0, v1, 255); // andi s0, v1, 255
|
||||
bc = c->sgpr64(s0) != 0; // bne s0, r0, L103
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_9;} // branch non-likely
|
||||
|
||||
c->lw(v1, 104, s5); // lw v1, 104(s5)
|
||||
// nop // sll r0, r0, 0
|
||||
c->andi(v1, v1, 32896); // andi v1, v1, 32896
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L101
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_5;} // branch non-likely
|
||||
|
||||
c->load_symbol2(t9, cache.add_to_sprite_aux_list);// lw t9, add-to-sprite-aux-list(s7)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s5); // or a1, s5, r0
|
||||
c->mov64(a2, s4); // or a2, s4, r0
|
||||
c->mov64(a3, s1); // or a3, s1, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
|
||||
block_5:
|
||||
c->lw(v1, 100, s5); // lw v1, 100(s5)
|
||||
c->addiu(a0, r0, -1); // addiu a0, r0, -1
|
||||
bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L102
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_7;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L112
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_31;} // branch non-likely
|
||||
|
||||
|
||||
block_7:
|
||||
c->lw(a0, 104, s5); // lw a0, 104(s5)
|
||||
c->andi(v1, a0, 32); // andi v1, a0, 32
|
||||
c->xor_(a0, a0, v1); // xor a0, a0, v1
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L113
|
||||
c->sw(a0, 104, s5); // sw a0, 104(s5)
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
c->lw(v1, 124, s5); // lw v1, 124(s5)
|
||||
//beq r0, r0, L113 // beq r0, r0, L113
|
||||
c->sw(v1, 44, s4); // sw v1, 44(s4)
|
||||
goto block_32; // branch always
|
||||
|
||||
|
||||
block_9:
|
||||
c->lw(v1, 100, s5); // lw v1, 100(s5)
|
||||
c->addiu(a0, r0, -1); // addiu a0, r0, -1
|
||||
bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L104
|
||||
c->dsubu(a0, v1, s0); // dsubu a0, v1, s0
|
||||
if (bc) {goto block_12;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L112
|
||||
c->pmaxw(v1, a0, r0); // pmaxw v1, a0, r0
|
||||
if (bc) {goto block_31;} // branch non-likely
|
||||
|
||||
c->sw(v1, 100, s5); // sw v1, 100(s5)
|
||||
|
||||
block_12:
|
||||
c->lw(v1, 104, s5); // lw v1, 104(s5)
|
||||
c->andi(a0, v1, 32); // andi a0, v1, 32
|
||||
c->xor_(v1, v1, a0); // xor v1, v1, a0
|
||||
bc = c->sgpr64(a0) == 0; // beq a0, r0, L105
|
||||
c->sw(v1, 104, s5); // sw v1, 104(s5)
|
||||
if (bc) {goto block_14;} // branch non-likely
|
||||
|
||||
c->lw(a0, 124, s5); // lw a0, 124(s5)
|
||||
c->sw(a0, 44, s4); // sw a0, 44(s4)
|
||||
|
||||
block_14:
|
||||
c->lw(t9, 112, s5); // lw t9, 112(s5)
|
||||
c->andi(v1, v1, 32896); // andi v1, v1, 32896
|
||||
c->load_symbol2(a0, cache.add_to_sprite_aux_list);// lw a0, add-to-sprite-aux-list(s7)
|
||||
c->movn(t9, a0, v1); // movn t9, a0, v1
|
||||
bc = c->sgpr64(t9) == 0; // beq t9, r0, L106
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_16;} // branch non-likely
|
||||
|
||||
c->daddiu(sp, sp, -80); // daddiu sp, sp, -80
|
||||
c->sq(gp, 0, sp); // sq gp, 0(sp)
|
||||
c->sq(s5, 16, sp); // sq s5, 16(sp)
|
||||
c->sq(s4, 32, sp); // sq s4, 32(sp)
|
||||
c->sq(s1, 48, sp); // sq s1, 48(sp)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s5); // or a1, s5, r0
|
||||
c->mov64(a2, s4); // or a2, s4, r0
|
||||
c->mov64(a3, s1); // or a3, s1, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(gp, 0, sp); // lq gp, 0(sp)
|
||||
c->lq(s5, 16, sp); // lq s5, 16(sp)
|
||||
c->lq(s4, 32, sp); // lq s4, 32(sp)
|
||||
c->lq(s1, 48, sp); // lq s1, 48(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->daddiu(sp, sp, 80); // daddiu sp, sp, 80
|
||||
|
||||
block_16:
|
||||
c->lw(a1, 120, s5); // lw a1, 120(s5)
|
||||
c->lw(v1, 116, s5); // lw v1, 116(s5)
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L107
|
||||
c->dsubu(a0, v1, s0); // dsubu a0, v1, s0
|
||||
if (bc) {goto block_19;} // branch non-likely
|
||||
|
||||
c->daddiu(v1, a0, -1); // daddiu v1, a0, -1
|
||||
bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L107
|
||||
c->sw(a0, 116, s5); // sw a0, 116(s5)
|
||||
if (bc) {goto block_19;} // branch non-likely
|
||||
|
||||
c->daddiu(sp, sp, -96); // daddiu sp, sp, -96
|
||||
c->sq(gp, 0, sp); // sq gp, 0(sp)
|
||||
c->sq(s5, 16, sp); // sq s5, 16(sp)
|
||||
c->sq(s4, 32, sp); // sq s4, 32(sp)
|
||||
c->sq(s1, 48, sp); // sq s1, 48(sp)
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->sq(s2, 80, sp); // sq s2, 80(sp)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a3, s4); // or a3, s4, r0
|
||||
c->mov64(a2, s5); // or a2, s5, r0
|
||||
c->load_symbol2(t9, cache.sp_relaunch_particle_2d);// lw t9, sp-relaunch-particle-2d(s7)
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(gp, 0, sp); // lq gp, 0(sp)
|
||||
c->lq(s5, 16, sp); // lq s5, 16(sp)
|
||||
c->lq(s4, 32, sp); // lq s4, 32(sp)
|
||||
c->lq(s1, 48, sp); // lq s1, 48(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->lq(s2, 80, sp); // lq s2, 80(sp)
|
||||
c->daddiu(sp, sp, 96); // daddiu sp, sp, 96
|
||||
|
||||
block_19:
|
||||
c->lqc2(vf1, 0, s4); // lqc2 vf1, 0(s4)
|
||||
c->lqc2(vf2, 16, s4); // lqc2 vf2, 16(s4)
|
||||
c->lqc2(vf3, 32, s4); // lqc2 vf3, 32(s4)
|
||||
c->lqc2(vf4, 16, s5); // lqc2 vf4, 16(s5)
|
||||
c->lqc2(vf5, 32, s5); // lqc2 vf5, 32(s5)
|
||||
c->lqc2(vf6, 48, s5); // lqc2 vf6, 48(s5)
|
||||
c->lqc2(vf7, 64, s5); // lqc2 vf7, 64(s5)
|
||||
c->lwc1(f0, 96, s5); // lwc1 f0, 96(s5)
|
||||
c->mfc1(v1, f0); // mfc1 v1, f0
|
||||
c->vmul_bc(DEST::xyzw, BC::z, vf7, vf7, vf9); // vmulz.xyzw vf7, vf7, vf9
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L108
|
||||
c->vadd(DEST::xyz, vf4, vf4, vf7); // vadd.xyz vf4, vf4, vf7
|
||||
if (bc) {goto block_21;} // branch non-likely
|
||||
|
||||
c->mov128_vf_gpr(vf8, v1); // qmtc2.i vf8, v1
|
||||
c->vsub_bc(DEST::w, BC::x, vf8, vf0, vf8); // vsubx.w vf8, vf0, vf8
|
||||
c->vmul_bc(DEST::xyzw, BC::w, vf8, vf8, vf9); // vmulw.xyzw vf8, vf8, vf9
|
||||
c->vsub_bc(DEST::w, BC::w, vf8, vf0, vf8); // vsubw.w vf8, vf0, vf8
|
||||
c->vmul_bc(DEST::xyz, BC::w, vf4, vf4, vf8); // vmulw.xyz vf4, vf4, vf8
|
||||
|
||||
block_21:
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf10, vf4, vf9); // vmuly.xyzw vf10, vf4, vf9
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf11, vf5, vf9); // vmuly.xyzw vf11, vf5, vf9
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf12, vf6, vf9); // vmuly.xyzw vf12, vf6, vf9
|
||||
c->vadd(DEST::xyzw, vf1, vf1, vf10); // vadd.xyzw vf1, vf1, vf10
|
||||
c->vadd(DEST::zw, vf2, vf2, vf11); // vadd.zw vf2, vf2, vf11
|
||||
c->vadd(DEST::xyzw, vf3, vf3, vf12); // vadd.xyzw vf3, vf3, vf12
|
||||
c->vmax_bc(DEST::xyzw, BC::x, vf3, vf3, vf0); // vmaxx.xyzw vf3, vf3, vf0
|
||||
c->sqc2(vf4, 16, s5); // sqc2 vf4, 16(s5)
|
||||
c->sqc2(vf1, 0, s4); // sqc2 vf1, 0(s4)
|
||||
c->sqc2(vf2, 16, s4); // sqc2 vf2, 16(s4)
|
||||
c->sqc2(vf3, 32, s4); // sqc2 vf3, 32(s4)
|
||||
c->lwc1(f0, 24, s4); // lwc1 f0, 24(s4)
|
||||
c->cvtws(f0, f0); // cvt.w.s f0, f0
|
||||
c->mfc1(v1, f0); // mfc1 v1, f0
|
||||
c->dsll32(v1, v1, 16); // dsll32 v1, v1, 16
|
||||
c->dsra32(v1, v1, 16); // dsra32 v1, v1, 16
|
||||
c->mtc1(f0, v1); // mtc1 f0, v1
|
||||
c->cvtsw(f0, f0); // cvt.s.w f0, f0
|
||||
c->swc1(f0, 24, s4); // swc1 f0, 24(s4)
|
||||
c->lw(v1, 104, s5); // lw v1, 104(s5)
|
||||
c->andi(v1, v1, 64); // andi v1, v1, 64
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L109
|
||||
c->load_symbol2(t9, cache.sp_orbiter); // lw t9, sp-orbiter(s7)
|
||||
if (bc) {goto block_23;} // branch non-likely
|
||||
|
||||
c->daddiu(sp, sp, -96); // daddiu sp, sp, -96
|
||||
c->sq(gp, 0, sp); // sq gp, 0(sp)
|
||||
c->sq(s5, 16, sp); // sq s5, 16(sp)
|
||||
c->sq(s4, 32, sp); // sq s4, 32(sp)
|
||||
c->sq(s1, 48, sp); // sq s1, 48(sp)
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s5); // or a1, s5, r0
|
||||
c->mov64(a2, s4); // or a2, s4, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sq(s2, 80, sp); // sq s2, 80(sp)
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(gp, 0, sp); // lq gp, 0(sp)
|
||||
c->lq(s5, 16, sp); // lq s5, 16(sp)
|
||||
c->lq(s4, 32, sp); // lq s4, 32(sp)
|
||||
c->lq(s1, 48, sp); // lq s1, 48(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->lq(s2, 80, sp); // lq s2, 80(sp)
|
||||
c->daddiu(sp, sp, 96); // daddiu sp, sp, 96
|
||||
|
||||
block_23:
|
||||
c->lq(v1, 32, s4); // lq v1, 32(s4)
|
||||
c->lw(a0, 104, s5); // lw a0, 104(s5)
|
||||
c->andi(a1, a0, 2); // andi a1, a0, 2
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L110
|
||||
c->andi(a1, a0, 4); // andi a1, a0, 4
|
||||
if (bc) {goto block_26;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(v1) != 0; // bne v1, r0, L110
|
||||
c->pextuw(t4, v1, r0); // pextuw t4, v1, r0
|
||||
if (bc) {goto block_26;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(t4) == 0; // beq t4, r0, L112
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_31;} // branch non-likely
|
||||
|
||||
|
||||
block_26:
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L111
|
||||
c->andi(a0, a0, 1); // andi a0, a0, 1
|
||||
if (bc) {goto block_28;} // branch non-likely
|
||||
|
||||
c->pcpyud(t4, v1, r0); // pcpyud t4, v1, r0
|
||||
c->pexew(t4, t4); // pexew t4, t4
|
||||
bc = ((s64)c->sgpr64(t4)) <= 0; // blez t4, L112
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_31;} // branch non-likely
|
||||
|
||||
|
||||
block_28:
|
||||
bc = c->sgpr64(a0) == 0; // beq a0, r0, L113
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
c->mov128_gpr_vf(v1, vf1); // qmfc2.i v1, vf1
|
||||
c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0
|
||||
c->pexew(v1, v1); // pexew v1, v1
|
||||
bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L112
|
||||
c->mov128_gpr_vf(v1, vf2); // qmfc2.i v1, vf2
|
||||
if (bc) {goto block_31;} // branch non-likely
|
||||
|
||||
c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0
|
||||
c->pexew(v1, v1); // pexew v1, v1
|
||||
bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L113
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
|
||||
block_31:
|
||||
c->load_symbol2(t9, cache.sp_free_particle); // lw t9, sp-free-particle(s7)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s1); // or a1, s1, r0
|
||||
c->mov64(a2, s5); // or a2, s5, r0
|
||||
c->mov64(a3, s4); // or a3, s4, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
|
||||
block_32:
|
||||
c->daddiu(s3, s3, -1); // daddiu s3, s3, -1
|
||||
c->daddiu(s5, s5, 144); // daddiu s5, s5, 144
|
||||
c->daddiu(s4, s4, 48); // daddiu s4, s4, 48
|
||||
bc = c->sgpr64(s3) != 0; // bne s3, r0, L100
|
||||
c->daddiu(s1, s1, 1); // daddiu s1, s1, 1
|
||||
if (bc) {goto block_1;} // branch non-likely
|
||||
|
||||
c->mov64(v0, s1); // or v0, s1, r0
|
||||
c->ld(ra, 0, sp); // ld ra, 0(sp)
|
||||
c->lq(gp, 112, sp); // lq gp, 112(sp)
|
||||
c->lq(s5, 96, sp); // lq s5, 96(sp)
|
||||
c->lq(s4, 80, sp); // lq s4, 80(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->lq(s2, 48, sp); // lq s2, 48(sp)
|
||||
c->lq(s1, 32, sp); // lq s1, 32(sp)
|
||||
c->lq(s0, 16, sp); // lq s0, 16(sp)
|
||||
//jr ra // jr ra
|
||||
c->daddiu(sp, sp, 128); // daddiu sp, sp, 128
|
||||
goto end_of_function; // return
|
||||
|
||||
// nop // sll r0, r0, 0
|
||||
// nop // sll r0, r0, 0
|
||||
// nop // sll r0, r0, 0
|
||||
end_of_function:
|
||||
return c->gprs[v0].du64[0];
|
||||
}
|
||||
|
||||
void link() {
|
||||
cache.fake_scratchpad_data = intern_from_c("*fake-scratchpad-data*").c();
|
||||
cache.add_to_sprite_aux_list = intern_from_c("add-to-sprite-aux-list").c();
|
||||
cache.sp_free_particle = intern_from_c("sp-free-particle").c();
|
||||
cache.sp_orbiter = intern_from_c("sp-orbiter").c();
|
||||
cache.sp_relaunch_particle_2d = intern_from_c("sp-relaunch-particle-2d").c();
|
||||
gLinkedFunctionTable.reg("sp-process-block-2d", execute, 256);
|
||||
}
|
||||
|
||||
} // namespace sp_process_block_2d
|
||||
} // namespace Mips2C
|
||||
|
||||
//--------------------------MIPS2C---------------------
|
||||
// clang-format off
|
||||
#include "game/mips2c/mips2c_private.h"
|
||||
#include "game/kernel/jak2/kscheme.h"
|
||||
using ::jak2::intern_from_c;
|
||||
namespace Mips2C::jak2 {
|
||||
namespace sp_process_block_3d {
|
||||
struct Cache {
|
||||
void* fake_scratchpad_data; // *fake-scratchpad-data*
|
||||
void* quaternion; // quaternion*!
|
||||
void* quaternion_normalize; // quaternion-normalize!
|
||||
void* sp_free_particle; // sp-free-particle
|
||||
void* sp_relaunch_particle_3d; // sp-relaunch-particle-3d
|
||||
} cache;
|
||||
|
||||
u64 execute(void* ctxt) {
|
||||
auto* c = (ExecutionContext*)ctxt;
|
||||
bool bc = false;
|
||||
u32 call_addr = 0;
|
||||
bool cop1_bc = false;
|
||||
c->daddiu(sp, sp, -176); // daddiu sp, sp, -176
|
||||
c->sd(ra, 0, sp); // sd ra, 0(sp)
|
||||
c->sq(s0, 64, sp); // sq s0, 64(sp)
|
||||
c->sq(s1, 80, sp); // sq s1, 80(sp)
|
||||
c->sq(s2, 96, sp); // sq s2, 96(sp)
|
||||
c->sq(s3, 112, sp); // sq s3, 112(sp)
|
||||
c->sq(s4, 128, sp); // sq s4, 128(sp)
|
||||
c->sq(s5, 144, sp); // sq s5, 144(sp)
|
||||
c->sq(gp, 160, sp); // sq gp, 160(sp)
|
||||
c->mov64(gp, a0); // or gp, a0, r0
|
||||
c->mov64(s5, a1); // or s5, a1, r0
|
||||
c->mov64(s4, a2); // or s4, a2, r0
|
||||
c->mov64(s0, a3); // or s0, a3, r0
|
||||
c->mov64(s3, t0); // or s3, t0, r0
|
||||
c->mov64(s2, t1); // or s2, t1, r0
|
||||
c->daddiu(s1, sp, 16); // daddiu s1, sp, 16
|
||||
c->sq(r0, 0, s1); // sq r0, 0(s1)
|
||||
|
||||
block_1:
|
||||
c->lb(v1, 128, s5); // lb v1, 128(s5)
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L98
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_33;} // branch non-likely
|
||||
|
||||
c->lb(a0, 129, s5); // lb a0, 129(s5)
|
||||
get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672
|
||||
c->dsll(a0, a0, 4); // dsll a0, a0, 4
|
||||
c->daddu(v1, v1, a0); // daddu v1, v1, a0
|
||||
c->lqc2(vf16, 0, v1); // lqc2 vf16, 0(v1)
|
||||
c->mov128_gpr_vf(v1, vf16); // qmfc2.i v1, vf16
|
||||
c->andi(v1, v1, 255); // andi v1, v1, 255
|
||||
c->sq(v1, 32, sp); // sq v1, 32(sp)
|
||||
c->lq(v1, 32, sp); // lq v1, 32(sp)
|
||||
bc = c->sgpr64(v1) != 0; // bne v1, r0, L86
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_7;} // branch non-likely
|
||||
|
||||
c->lw(v1, 100, s5); // lw v1, 100(s5)
|
||||
c->addiu(a0, r0, -1); // addiu a0, r0, -1
|
||||
bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L85
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_5;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L97
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
|
||||
block_5:
|
||||
c->lw(a0, 104, s5); // lw a0, 104(s5)
|
||||
c->andi(v1, a0, 32); // andi v1, a0, 32
|
||||
c->xor_(a0, a0, v1); // xor a0, a0, v1
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L98
|
||||
c->sw(a0, 104, s5); // sw a0, 104(s5)
|
||||
if (bc) {goto block_33;} // branch non-likely
|
||||
|
||||
c->lw(v1, 124, s5); // lw v1, 124(s5)
|
||||
//beq r0, r0, L98 // beq r0, r0, L98
|
||||
c->sw(v1, 44, s4); // sw v1, 44(s4)
|
||||
goto block_33; // branch always
|
||||
|
||||
|
||||
block_7:
|
||||
c->lw(v1, 100, s5); // lw v1, 100(s5)
|
||||
c->addiu(a0, r0, -1); // addiu a0, r0, -1
|
||||
bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L87
|
||||
c->lq(a0, 32, sp); // lq a0, 32(sp)
|
||||
if (bc) {goto block_10;} // branch non-likely
|
||||
|
||||
c->dsubu(a0, v1, a0); // dsubu a0, v1, a0
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L97
|
||||
c->pmaxw(v1, a0, r0); // pmaxw v1, a0, r0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
c->sw(v1, 100, s5); // sw v1, 100(s5)
|
||||
|
||||
block_10:
|
||||
c->lw(a0, 104, s5); // lw a0, 104(s5)
|
||||
c->andi(v1, a0, 32); // andi v1, a0, 32
|
||||
c->xor_(a0, a0, v1); // xor a0, a0, v1
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L88
|
||||
c->sw(a0, 104, s5); // sw a0, 104(s5)
|
||||
if (bc) {goto block_12;} // branch non-likely
|
||||
|
||||
c->lw(v1, 124, s5); // lw v1, 124(s5)
|
||||
c->sw(v1, 44, s4); // sw v1, 44(s4)
|
||||
|
||||
block_12:
|
||||
c->lw(t9, 112, s5); // lw t9, 112(s5)
|
||||
bc = c->sgpr64(t9) == 0; // beq t9, r0, L89
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_14;} // branch non-likely
|
||||
|
||||
c->daddiu(sp, sp, -96); // daddiu sp, sp, -96
|
||||
c->sq(gp, 0, sp); // sq gp, 0(sp)
|
||||
c->sq(s5, 16, sp); // sq s5, 16(sp)
|
||||
c->sq(s4, 32, sp); // sq s4, 32(sp)
|
||||
c->sq(s0, 48, sp); // sq s0, 48(sp)
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s5); // or a1, s5, r0
|
||||
c->mov64(a2, s4); // or a2, s4, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sq(s2, 80, sp); // sq s2, 80(sp)
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(gp, 0, sp); // lq gp, 0(sp)
|
||||
c->lq(s5, 16, sp); // lq s5, 16(sp)
|
||||
c->lq(s4, 32, sp); // lq s4, 32(sp)
|
||||
c->lq(s0, 48, sp); // lq s0, 48(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->lq(s2, 80, sp); // lq s2, 80(sp)
|
||||
c->daddiu(sp, sp, 96); // daddiu sp, sp, 96
|
||||
|
||||
block_14:
|
||||
c->lw(a1, 120, s5); // lw a1, 120(s5)
|
||||
c->lw(v1, 116, s5); // lw v1, 116(s5)
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L90
|
||||
c->lq(a0, 32, sp); // lq a0, 32(sp)
|
||||
if (bc) {goto block_17;} // branch non-likely
|
||||
|
||||
c->dsubu(v1, v1, a0); // dsubu v1, v1, a0
|
||||
bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L90
|
||||
c->sw(v1, 116, s5); // sw v1, 116(s5)
|
||||
if (bc) {goto block_17;} // branch non-likely
|
||||
|
||||
c->daddiu(sp, sp, -96); // daddiu sp, sp, -96
|
||||
c->sq(gp, 0, sp); // sq gp, 0(sp)
|
||||
c->sq(s5, 16, sp); // sq s5, 16(sp)
|
||||
c->sq(s4, 32, sp); // sq s4, 32(sp)
|
||||
c->sq(s0, 48, sp); // sq s0, 48(sp)
|
||||
c->sq(s3, 64, sp); // sq s3, 64(sp)
|
||||
c->sq(s2, 80, sp); // sq s2, 80(sp)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a3, s4); // or a3, s4, r0
|
||||
c->mov64(a2, s5); // or a2, s5, r0
|
||||
c->load_symbol2(t9, cache.sp_relaunch_particle_3d);// lw t9, sp-relaunch-particle-3d(s7)
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(gp, 0, sp); // lq gp, 0(sp)
|
||||
c->lq(s5, 16, sp); // lq s5, 16(sp)
|
||||
c->lq(s4, 32, sp); // lq s4, 32(sp)
|
||||
c->lq(s0, 48, sp); // lq s0, 48(sp)
|
||||
c->lq(s3, 64, sp); // lq s3, 64(sp)
|
||||
c->lq(s2, 80, sp); // lq s2, 80(sp)
|
||||
c->daddiu(sp, sp, 96); // daddiu sp, sp, 96
|
||||
|
||||
block_17:
|
||||
c->lqc2(vf8, 0, s4); // lqc2 vf8, 0(s4)
|
||||
c->lqc2(vf9, 16, s4); // lqc2 vf9, 16(s4)
|
||||
c->lqc2(vf10, 32, s4); // lqc2 vf10, 32(s4)
|
||||
c->lqc2(vf11, 16, s5); // lqc2 vf11, 16(s5)
|
||||
c->lqc2(vf12, 32, s5); // lqc2 vf12, 32(s5)
|
||||
c->lqc2(vf13, 48, s5); // lqc2 vf13, 48(s5)
|
||||
c->lqc2(vf14, 64, s5); // lqc2 vf14, 64(s5)
|
||||
c->lwc1(f0, 96, s5); // lwc1 f0, 96(s5)
|
||||
c->mfc1(v1, f0); // mfc1 v1, f0
|
||||
c->vmul_bc(DEST::xyzw, BC::z, vf14, vf14, vf16); // vmulz.xyzw vf14, vf14, vf16
|
||||
bc = c->sgpr64(v1) == 0; // beq v1, r0, L91
|
||||
c->vadd(DEST::xyz, vf11, vf11, vf14); // vadd.xyz vf11, vf11, vf14
|
||||
if (bc) {goto block_19;} // branch non-likely
|
||||
|
||||
c->mov128_vf_gpr(vf15, v1); // qmtc2.i vf15, v1
|
||||
c->vsub_bc(DEST::w, BC::x, vf15, vf0, vf15); // vsubx.w vf15, vf0, vf15
|
||||
c->vmul_bc(DEST::xyzw, BC::w, vf15, vf15, vf16); // vmulw.xyzw vf15, vf15, vf16
|
||||
c->vsub_bc(DEST::w, BC::w, vf15, vf0, vf15); // vsubw.w vf15, vf0, vf15
|
||||
c->vmul_bc(DEST::xyz, BC::w, vf11, vf11, vf15); // vmulw.xyz vf11, vf11, vf15
|
||||
|
||||
block_19:
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf17, vf11, vf16); // vmuly.xyzw vf17, vf11, vf16
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf18, vf12, vf16); // vmuly.xyzw vf18, vf12, vf16
|
||||
c->vmul_bc(DEST::xyzw, BC::y, vf19, vf13, vf16); // vmuly.xyzw vf19, vf13, vf16
|
||||
c->vadd(DEST::xyzw, vf8, vf8, vf17); // vadd.xyzw vf8, vf8, vf17
|
||||
c->vadd_bc(DEST::w, BC::w, vf9, vf9, vf18); // vaddw.w vf9, vf9, vf18
|
||||
c->vadd(DEST::xyzw, vf10, vf10, vf19); // vadd.xyzw vf10, vf10, vf19
|
||||
c->vmax_bc(DEST::xyzw, BC::x, vf10, vf10, vf0); // vmaxx.xyzw vf10, vf10, vf0
|
||||
c->sqc2(vf11, 16, s5); // sqc2 vf11, 16(s5)
|
||||
c->sqc2(vf8, 0, s4); // sqc2 vf8, 0(s4)
|
||||
c->sqc2(vf9, 16, s4); // sqc2 vf9, 16(s4)
|
||||
c->sqc2(vf10, 32, s4); // sqc2 vf10, 32(s4)
|
||||
c->mov64(v1, s1); // or v1, s1, r0
|
||||
c->mov64(a0, s4); // or a0, s4, r0
|
||||
c->lwc1(f0, 16, a0); // lwc1 f0, 16(a0)
|
||||
c->lwc1(f1, 20, a0); // lwc1 f1, 20(a0)
|
||||
c->lwc1(f2, 24, a0); // lwc1 f2, 24(a0)
|
||||
c->swc1(f0, 0, v1); // swc1 f0, 0(v1)
|
||||
c->swc1(f1, 4, v1); // swc1 f1, 4(v1)
|
||||
c->swc1(f2, 8, v1); // swc1 f2, 8(v1)
|
||||
c->lui(a0, 16256); // lui a0, 16256
|
||||
c->mtc1(f3, a0); // mtc1 f3, a0
|
||||
c->muls(f2, f2, f2); // mul.s f2, f2, f2
|
||||
c->subs(f2, f3, f2); // sub.s f2, f3, f2
|
||||
c->muls(f1, f1, f1); // mul.s f1, f1, f1
|
||||
c->subs(f1, f2, f1); // sub.s f1, f2, f1
|
||||
c->muls(f0, f0, f0); // mul.s f0, f0, f0
|
||||
c->subs(f0, f1, f0); // sub.s f0, f1, f0
|
||||
c->sqrts(f0, f0); // sqrt.s f0, f0
|
||||
c->swc1(f0, 12, v1); // swc1 f0, 12(v1)
|
||||
c->mfc1(a0, f0); // mfc1 a0, f0
|
||||
c->lq(v1, 32, sp); // lq v1, 32(sp)
|
||||
c->mov64(v1, v1); // or v1, v1, r0
|
||||
c->sq(v1, 48, sp); // sq v1, 48(sp)
|
||||
|
||||
block_20:
|
||||
c->load_symbol2(t9, cache.quaternion); // lw t9, quaternion*!(s7)
|
||||
c->mov64(a0, s1); // or a0, s1, r0
|
||||
c->mov64(a1, s1); // or a1, s1, r0
|
||||
c->daddiu(a2, s5, 80); // daddiu a2, s5, 80
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->lq(v1, 48, sp); // lq v1, 48(sp)
|
||||
c->daddiu(v1, v1, -10); // daddiu v1, v1, -10
|
||||
c->sq(v1, 48, sp); // sq v1, 48(sp)
|
||||
// nop // sll r0, r0, 0
|
||||
c->lq(v1, 48, sp); // lq v1, 48(sp)
|
||||
bc = ((s64)c->sgpr64(v1)) > 0; // bgtz v1, L92
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_20;} // branch non-likely
|
||||
|
||||
c->load_symbol2(t9, cache.quaternion_normalize); // lw t9, quaternion-normalize!(s7)
|
||||
c->mov64(a0, s1); // or a0, s1, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
c->mov64(a0, s4); // or a0, s4, r0
|
||||
c->mov64(v1, s1); // or v1, s1, r0
|
||||
c->lwc1(f0, 12, v1); // lwc1 f0, 12(v1)
|
||||
c->mtc1(f1, r0); // mtc1 f1, r0
|
||||
cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1
|
||||
bc = !cop1_bc; // bc1f L93
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_23;} // branch non-likely
|
||||
|
||||
c->lqc2(vf1, 16, a0); // lqc2 vf1, 16(a0)
|
||||
c->lqc2(vf2, 0, v1); // lqc2 vf2, 0(v1)
|
||||
c->vsub(DEST::xyz, vf1, vf0, vf2); // vsub.xyz vf1, vf0, vf2
|
||||
c->sqc2(vf1, 16, a0); // sqc2 vf1, 16(a0)
|
||||
c->mov128_gpr_vf(a0, vf1); // qmfc2.i a0, vf1
|
||||
//beq r0, r0, L94 // beq r0, r0, L94
|
||||
// nop // sll r0, r0, 0
|
||||
goto block_24; // branch always
|
||||
|
||||
|
||||
block_23:
|
||||
c->lqc2(vf1, 16, a0); // lqc2 vf1, 16(a0)
|
||||
c->lqc2(vf2, 0, v1); // lqc2 vf2, 0(v1)
|
||||
c->vadd(DEST::xyz, vf1, vf0, vf2); // vadd.xyz vf1, vf0, vf2
|
||||
c->sqc2(vf1, 16, a0); // sqc2 vf1, 16(a0)
|
||||
c->mov128_gpr_vf(a0, vf1); // qmfc2.i a0, vf1
|
||||
|
||||
block_24:
|
||||
c->mov128_gpr_vf(v1, vf10); // qmfc2.i v1, vf10
|
||||
c->lw(a0, 104, s5); // lw a0, 104(s5)
|
||||
c->andi(a1, a0, 2); // andi a1, a0, 2
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L95
|
||||
c->andi(a1, a0, 4); // andi a1, a0, 4
|
||||
if (bc) {goto block_27;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(v1) != 0; // bne v1, r0, L95
|
||||
c->pextuw(a2, v1, r0); // pextuw a2, v1, r0
|
||||
if (bc) {goto block_27;} // branch non-likely
|
||||
|
||||
bc = c->sgpr64(a2) == 0; // beq a2, r0, L97
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
|
||||
block_27:
|
||||
bc = c->sgpr64(a1) == 0; // beq a1, r0, L96
|
||||
c->andi(a0, a0, 1); // andi a0, a0, 1
|
||||
if (bc) {goto block_29;} // branch non-likely
|
||||
|
||||
c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0
|
||||
c->pexew(v1, v1); // pexew v1, v1
|
||||
bc = ((s64)c->sgpr64(v1)) <= 0; // blez v1, L97
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
|
||||
block_29:
|
||||
bc = c->sgpr64(a0) == 0; // beq a0, r0, L98
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_33;} // branch non-likely
|
||||
|
||||
c->mov128_gpr_vf(v1, vf8); // qmfc2.i v1, vf8
|
||||
c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0
|
||||
c->pexew(v1, v1); // pexew v1, v1
|
||||
bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L97
|
||||
c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9
|
||||
if (bc) {goto block_32;} // branch non-likely
|
||||
|
||||
c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0
|
||||
c->pexew(v1, v1); // pexew v1, v1
|
||||
bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L98
|
||||
// nop // sll r0, r0, 0
|
||||
if (bc) {goto block_33;} // branch non-likely
|
||||
|
||||
|
||||
block_32:
|
||||
c->load_symbol2(t9, cache.sp_free_particle); // lw t9, sp-free-particle(s7)
|
||||
c->mov64(a0, gp); // or a0, gp, r0
|
||||
c->mov64(a1, s0); // or a1, s0, r0
|
||||
c->mov64(a2, s5); // or a2, s5, r0
|
||||
c->mov64(a3, s4); // or a3, s4, r0
|
||||
call_addr = c->gprs[t9].du32[0]; // function call:
|
||||
c->sll(v0, ra, 0); // sll v0, ra, 0
|
||||
c->jalr(call_addr); // jalr ra, t9
|
||||
|
||||
block_33:
|
||||
c->daddiu(s3, s3, -1); // daddiu s3, s3, -1
|
||||
c->daddiu(s5, s5, 144); // daddiu s5, s5, 144
|
||||
c->daddiu(s4, s4, 48); // daddiu s4, s4, 48
|
||||
bc = c->sgpr64(s3) != 0; // bne s3, r0, L84
|
||||
c->daddiu(s0, s0, 1); // daddiu s0, s0, 1
|
||||
if (bc) {goto block_1;} // branch non-likely
|
||||
|
||||
c->mov64(v0, s0); // or v0, s0, r0
|
||||
c->ld(ra, 0, sp); // ld ra, 0(sp)
|
||||
c->lq(gp, 160, sp); // lq gp, 160(sp)
|
||||
c->lq(s5, 144, sp); // lq s5, 144(sp)
|
||||
c->lq(s4, 128, sp); // lq s4, 128(sp)
|
||||
c->lq(s3, 112, sp); // lq s3, 112(sp)
|
||||
c->lq(s2, 96, sp); // lq s2, 96(sp)
|
||||
c->lq(s1, 80, sp); // lq s1, 80(sp)
|
||||
c->lq(s0, 64, sp); // lq s0, 64(sp)
|
||||
//jr ra // jr ra
|
||||
c->daddiu(sp, sp, 176); // daddiu sp, sp, 176
|
||||
goto end_of_function; // return
|
||||
|
||||
// nop // sll r0, r0, 0
|
||||
// nop // sll r0, r0, 0
|
||||
end_of_function:
|
||||
return c->gprs[v0].du64[0];
|
||||
}
|
||||
|
||||
void link() {
|
||||
cache.fake_scratchpad_data = intern_from_c("*fake-scratchpad-data*").c();
|
||||
cache.quaternion = intern_from_c("quaternion*!").c();
|
||||
cache.quaternion_normalize = intern_from_c("quaternion-normalize!").c();
|
||||
cache.sp_free_particle = intern_from_c("sp-free-particle").c();
|
||||
cache.sp_relaunch_particle_3d = intern_from_c("sp-relaunch-particle-3d").c();
|
||||
gLinkedFunctionTable.reg("sp-process-block-3d", execute, 512);
|
||||
}
|
||||
|
||||
} // namespace sp_process_block_3d
|
||||
} // namespace Mips2C
|
||||
File diff suppressed because it is too large
Load Diff
@@ -274,6 +274,8 @@ struct ExecutionContext {
|
||||
gprs[gpr].ds64[0] = val; // sign extend and set
|
||||
}
|
||||
|
||||
void store_symbol2(int gpr, void* sym_addr) { memcpy((u8*)sym_addr - 1, &gprs[gpr].ds32[0], 4); }
|
||||
|
||||
void load_symbol_addr(int gpr, void* sym_addr) {
|
||||
gprs[gpr].du64[0] = ((const u8*)sym_addr) - g_ee_main_mem;
|
||||
}
|
||||
@@ -719,6 +721,14 @@ struct ExecutionContext {
|
||||
}
|
||||
}
|
||||
|
||||
void pceqw(int dst, int rs, int rt) {
|
||||
auto s = gpr_src(rs);
|
||||
auto t = gpr_src(rt);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gprs[dst].du32[i] = (s.du32[i] == t.du32[i]) ? 0xffffffff : 0;
|
||||
}
|
||||
}
|
||||
|
||||
void pmfhl_lh(int dest) {
|
||||
gprs[dest].du16[0] = lo.du16[0];
|
||||
gprs[dest].du16[1] = lo.du16[2];
|
||||
@@ -1430,6 +1440,37 @@ struct ExecutionContext {
|
||||
gprs[dst].du64[0] = (gprs[dst].du64[0] & LDR_MASK[shift]) | (mem >> LDR_SHIFT[shift]);
|
||||
}
|
||||
|
||||
u32 clip(int xyz_idx, int w_idx, u32 old_clip) {
|
||||
u32 result = (old_clip << 6);
|
||||
auto xyz_vec = vf_src(xyz_idx);
|
||||
float w = vf_src(w_idx).f[3];
|
||||
|
||||
float plus = std::abs(w);
|
||||
float minus = -plus;
|
||||
|
||||
if (xyz_vec.f[0] > plus) {
|
||||
result |= 0b1;
|
||||
}
|
||||
if (xyz_vec.f[0] < minus) {
|
||||
result |= 0b10;
|
||||
}
|
||||
|
||||
if (xyz_vec.f[1] > plus) {
|
||||
result |= 0b100;
|
||||
}
|
||||
if (xyz_vec.f[1] < minus) {
|
||||
result |= 0b1000;
|
||||
}
|
||||
|
||||
if (xyz_vec.f[2] > plus) {
|
||||
result |= 0b10000;
|
||||
}
|
||||
if (xyz_vec.f[2] < minus) {
|
||||
result |= 0b100000;
|
||||
}
|
||||
return result & 0xffffff; // only 24 bits
|
||||
}
|
||||
|
||||
std::string print_vf_float(int vf) {
|
||||
auto src = vf_src(vf);
|
||||
return fmt::format("{} {} {} {}", src.f[0], src.f[1], src.f[2], src.f[3]);
|
||||
|
||||
@@ -129,6 +129,12 @@ namespace render_boundary_tri { extern void link(); }
|
||||
namespace render_boundary_quad { extern void link(); }
|
||||
namespace set_sky_vf27 { extern void link(); }
|
||||
namespace draw_boundary_polygon { extern void link(); }
|
||||
namespace sp_init_fields { extern void link(); }
|
||||
namespace particle_adgif { extern void link(); }
|
||||
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(); }
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -213,7 +219,11 @@ PerGameVersion<std::unordered_map<std::string, std::vector<void (*)()>>> gMips2C
|
||||
{"debug",
|
||||
{jak2::debug_line_clip::link, jak2::init_boundary_regs::link,
|
||||
jak2::render_boundary_quad::link, jak2::render_boundary_tri::link, jak2::set_sky_vf27::link,
|
||||
jak2::draw_boundary_polygon::link}}},
|
||||
jak2::draw_boundary_polygon::link}},
|
||||
{"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}}},
|
||||
};
|
||||
|
||||
void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) {
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
|
||||
(define-extern position-in-front-of-camera! (function vector float float vector))
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
|
||||
(define-extern math-camera-matrix
|
||||
"Returns [[*math-camera*]]'s `inv-camera-rot`"
|
||||
(function matrix))
|
||||
|
||||
(define-extern matrix-local->world (function symbol matrix))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define-perm *camera-init-mat* matrix #f)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,141 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
(when *debug-segment*
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-tester
|
||||
:id 127
|
||||
:flags (unk-4 unk-6)
|
||||
:bounds (static-bspherem 0 0 0 640)
|
||||
:rotate ((degrees 2) (degrees 0) (degrees 0))
|
||||
:parts ((sp-item 209))
|
||||
)
|
||||
|
||||
;; definition of type part-tester
|
||||
(deftype part-tester (process)
|
||||
((root trsqv :offset-assert 128)
|
||||
(part sparticle-launch-control :offset-assert 132)
|
||||
(old-group sparticle-launch-group :offset-assert 136)
|
||||
)
|
||||
:heap-base #x10
|
||||
:method-count-assert 14
|
||||
:size-assert #x8c
|
||||
:flag-assert #xe0010008c
|
||||
)
|
||||
(define-extern *part-tester* (pointer process))
|
||||
|
||||
;; definition for method 3 of type part-tester
|
||||
(defmethod inspect part-tester ((obj part-tester))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Troot: ~A~%" (-> obj root))
|
||||
(format #t "~2Tpart: ~A~%" (-> obj part))
|
||||
(format #t "~2Told-group: ~A~%" (-> obj old-group))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *part-tester-name*, type string
|
||||
(define *part-tester-name* (the-as string #f))
|
||||
|
||||
;; definition for method 10 of type part-tester
|
||||
(defmethod deactivate part-tester ((obj part-tester))
|
||||
(if (nonzero? (-> obj part))
|
||||
(kill-and-free-particles (-> obj part))
|
||||
)
|
||||
((method-of-type process deactivate) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate part-tester-idle (part-tester)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((gp-0 (entity-by-name *part-tester-name*)))
|
||||
(when gp-0
|
||||
(let ((s5-0 (-> gp-0 extra process)))
|
||||
(if (and s5-0 (type? s5-0 process-drawable) (nonzero? (-> (the-as process-drawable s5-0) root)))
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable s5-0) root trans quad))
|
||||
(set! (-> self root trans quad) (-> gp-0 extra trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self root trans)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
;(let ((gp-1 (-> *part-group-id-table* 127)))
|
||||
(let ((gp-1 (-> *part-group-id-table* 96)))
|
||||
(let ((s5-1 (-> self root trans)))
|
||||
(when (!= gp-1 (-> self old-group))
|
||||
(when (nonzero? (-> self part))
|
||||
(kill-and-free-particles (-> self part))
|
||||
(set! (-> self heap-cur) (&-> (-> self part) type))
|
||||
)
|
||||
(set! (-> self part) (create-launch-control gp-1 self))
|
||||
)
|
||||
(if (nonzero? (-> self part))
|
||||
(spawn (-> self part) (cond
|
||||
((logtest? (-> gp-1 flags) (sp-group-flag screen-space))
|
||||
*zero-vector*
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self old-group) gp-1)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function part-tester-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior part-tester-init-by-other process-drawable ((arg0 vector))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! *part-tester* (process->ppointer self))
|
||||
(go part-tester-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (perm) for symbol *debug-part-dead-pool*, type dead-pool
|
||||
(define-perm *debug-part-dead-pool* dead-pool (new 'debug 'dead-pool 1 #x10000 "*debug-part-dead-pool*"))
|
||||
|
||||
;; definition for function start-part
|
||||
;; WARN: Return type mismatch (pointer process) vs none.
|
||||
(defun start-part ()
|
||||
(kill-by-type part-tester *active-pool*)
|
||||
(process-spawn
|
||||
part-tester
|
||||
(if *anim-tester*
|
||||
(-> *anim-tester* 0 root trans)
|
||||
(target-pos 0)
|
||||
)
|
||||
:from *debug-part-dead-pool*
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -375,12 +375,12 @@
|
||||
; )
|
||||
|
||||
;; run the sprite/particle system.
|
||||
; (if (not (paused?))
|
||||
; (execute-part-engine)
|
||||
; )
|
||||
; (if (logtest? (vu1-renderer-mask rn29) (-> *display* vu1-enable-user))
|
||||
; (sprite-draw *display*)
|
||||
; )
|
||||
(if (not (paused?))
|
||||
(execute-part-engine)
|
||||
)
|
||||
(if (logtest? (vu1-renderer-mask sprite) (-> *display* vu1-enable-user))
|
||||
(sprite-draw *display*)
|
||||
)
|
||||
|
||||
;; debug draw collision stuff before processing it.
|
||||
(when *debug-segment*
|
||||
@@ -684,7 +684,7 @@
|
||||
(*pre-draw-hook* (-> s5-1 calc-buf))
|
||||
(when (not (paused?))
|
||||
(clear *stdcon1*)
|
||||
;(debug-reset-buffers)
|
||||
(debug-reset-buffers)
|
||||
;(clear! *simple-sprite-system*)
|
||||
)
|
||||
(set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) 327))
|
||||
@@ -940,23 +940,23 @@
|
||||
; (generic-vu1-init-buffers)
|
||||
|
||||
;; sprite texture remaps
|
||||
; (when (-> *texture-pool* update-sprites-flag)
|
||||
; (update-sprites *texture-pool*)
|
||||
; (particle-adgif-cache-flush)
|
||||
; (remap-all-particles)
|
||||
; )
|
||||
(when (-> *texture-pool* update-sprites-flag)
|
||||
(update-sprites *texture-pool*)
|
||||
(particle-adgif-cache-flush)
|
||||
(remap-all-particles)
|
||||
)
|
||||
|
||||
;; texture uploads while GS is not doing anything.
|
||||
; (with-profiler 'texture *profile-texture-color*
|
||||
; (let ((s3-1 (-> pp clock)))
|
||||
; (if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3))
|
||||
; (set! (-> pp clock) (-> *display* bg-clock))
|
||||
; (set! (-> pp clock) (-> *display* real-clock))
|
||||
; )
|
||||
; (upload-textures *texture-pool*)
|
||||
; (set! (-> pp clock) s3-1)
|
||||
; )
|
||||
; )
|
||||
(with-profiler 'texture *profile-texture-color*
|
||||
(let ((s3-1 (-> pp clock)))
|
||||
(if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3))
|
||||
(set! (-> pp clock) (-> *display* bg-clock))
|
||||
(set! (-> pp clock) (-> *display* real-clock))
|
||||
)
|
||||
(upload-textures *texture-pool*)
|
||||
(set! (-> pp clock) s3-1)
|
||||
)
|
||||
)
|
||||
|
||||
;; more texture mapping.
|
||||
; (if (-> *texture-pool* update-flag)
|
||||
|
||||
@@ -620,7 +620,7 @@
|
||||
|
||||
;; a few things before the actor updates...
|
||||
|
||||
; (set! (-> *time-of-day-context* title-updated) #f)
|
||||
(set! (-> *time-of-day-context* title-updated) #f)
|
||||
|
||||
;; update teleport counter
|
||||
; (set! *teleport* #f)
|
||||
@@ -630,11 +630,11 @@
|
||||
; )
|
||||
|
||||
;; update particles (we're racing the DMA transfer again, do this asap)
|
||||
; (let ((gp-1 (-> pp clock)))
|
||||
; (set! (-> pp clock) (-> *display* part-clock))
|
||||
; (process-particles)
|
||||
; (set! (-> pp clock) gp-1)
|
||||
; )
|
||||
(let ((gp-1 (-> pp clock)))
|
||||
(set! (-> pp clock) (-> *display* part-clock))
|
||||
(process-particles)
|
||||
(set! (-> pp clock) gp-1)
|
||||
)
|
||||
|
||||
;; set up VU0's VIF for collision code run by actors
|
||||
; (dma-send
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
)
|
||||
)
|
||||
(when (and (-> *setting-control* user-current weather) gp-0)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(v1-8 (-> *math-camera* inv-camera-rot vector 2))
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((v1-8 (-> *math-camera* inv-camera-rot vector 2)))
|
||||
(set! (-> s5-0 quad) (-> *math-camera* trans quad))
|
||||
(vector-! s4-0 s5-0 (-> *math-camera* prev-trans))
|
||||
(let ((f0-1 (vector-dot s4-0 v1-8)))
|
||||
@@ -62,13 +62,13 @@
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 y) (-> *math-camera* trans y))
|
||||
(if (< 0.0 (-> *setting-control* user-current rain))
|
||||
(update-rain (-> *setting-control* user-current rain) s5-0 s4-0)
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current snow))
|
||||
(update-snow (-> *setting-control* user-current snow) s5-0 s4-0)
|
||||
)
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current rain))
|
||||
(update-rain (the-as target (-> *setting-control* user-current rain)))
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current snow))
|
||||
(update-snow (the-as target (-> *setting-control* user-current snow)))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (>= (-> self time-of-day) 6.25)
|
||||
@@ -124,6 +124,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
;; definition for function update-counters
|
||||
(defbehavior update-counters time-of-day-proc ()
|
||||
(let ((v1-2 (-> *display* bg-clock frame-counter)))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,16 +36,20 @@
|
||||
)
|
||||
;; ---sp-cpuinfo-flag
|
||||
|
||||
;; NOTE - for relocate
|
||||
(defenum sp-cpuinfo-flag-s32
|
||||
:bitfield #t
|
||||
:type int32
|
||||
:copy-entries sp-cpuinfo-flag
|
||||
)
|
||||
|
||||
|
||||
(declare-type sparticle-system basic)
|
||||
(declare-type sparticle-cpuinfo structure)
|
||||
(declare-type sparticle-launch-control inline-array-class)
|
||||
(define-extern forall-particles-with-key (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none))
|
||||
|
||||
;; NOTE - for many things
|
||||
(define-extern *part-id-table* (array sparticle-launcher))
|
||||
|
||||
;; NOTE - for sparticle-launcher
|
||||
(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo))
|
||||
(define-extern kill-all-particles-with-key (function sparticle-launch-control none))
|
||||
(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol))
|
||||
@@ -70,7 +74,8 @@
|
||||
(scalevely float :offset 44)
|
||||
(friction float :offset-assert 96)
|
||||
(timer int32 :offset-assert 100)
|
||||
(flags sp-cpuinfo-flag :offset-assert 104)
|
||||
(flags sp-cpuinfo-flag :offset-assert 104) ;; NOTE - loaded with lw and lwu?
|
||||
(flags-s32 sp-cpuinfo-flag-s32 :offset 104)
|
||||
(user-int32 int32 :offset-assert 108)
|
||||
(user-uint32 uint32 :offset 108)
|
||||
(user-float float :offset 108)
|
||||
@@ -88,7 +93,7 @@
|
||||
(key-alt sparticle-launch-state :offset 132)
|
||||
(binding sparticle-launch-state :offset-assert 136)
|
||||
(data uint32 1 :offset 12)
|
||||
(datab uint8 4 :offset 12)
|
||||
(datab int8 4 :offset 12)
|
||||
(dataf float 1 :offset 12)
|
||||
(datac uint8 1 :offset 12)
|
||||
)
|
||||
@@ -144,3 +149,5 @@
|
||||
|
||||
|
||||
|
||||
(define-extern *sp-particle-system-2d* sparticle-system)
|
||||
(define-extern *sp-particle-system-3d* sparticle-system)
|
||||
@@ -137,6 +137,174 @@
|
||||
|
||||
(declare-type sparticle-cpuinfo structure)
|
||||
|
||||
(defmacro sp-item (launcher
|
||||
&key (fade-after 0.0)
|
||||
&key (falloff-to 0.0)
|
||||
&key (flags ())
|
||||
&key (period 0)
|
||||
&key (length 0)
|
||||
&key (offset 0)
|
||||
&key (hour-mask 0)
|
||||
&key (binding 0)
|
||||
)
|
||||
`(new 'static 'sparticle-group-item
|
||||
:launcher ,launcher
|
||||
:fade-after ,fade-after
|
||||
:falloff-to ,falloff-to
|
||||
:flags (sp-group-item-flag ,@flags)
|
||||
:period ,period
|
||||
:length ,length
|
||||
:offset ,offset
|
||||
:hour-mask ,hour-mask
|
||||
:binding ,binding
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro defpartgroup (name &key id &key parts &key (duration 3000) &key (linger-duration 1500) &key (flags ()) &key bounds
|
||||
&key (rotate (0.0 0.0 0.0)) &key (scale (1.0 1.0 1.0)))
|
||||
"define a new part group. defines a constant with the name of the group with the ID as its value"
|
||||
`(begin
|
||||
(defconstant ,name ,id)
|
||||
(set! (-> *part-group-id-table* ,id)
|
||||
(new 'static 'sparticle-launch-group
|
||||
:duration ,duration
|
||||
:linger-duration ,linger-duration
|
||||
:flags (sp-group-flag ,@flags)
|
||||
:bounds ,bounds
|
||||
:name ,(symbol->string name)
|
||||
:length ,(length parts)
|
||||
:launcher (new 'static 'inline-array sparticle-group-item ,(length parts) ,@parts)
|
||||
:rotate-x ,(car rotate)
|
||||
:rotate-y ,(cadr rotate)
|
||||
:rotate-z ,(caddr rotate)
|
||||
:scale-x ,(car scale)
|
||||
:scale-y ,(cadr scale)
|
||||
:scale-z ,(caddr scale)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro defpart (id &key (init-specs ()))
|
||||
"define a new sparticle-launcher"
|
||||
`(set! (-> *part-id-table* ,id)
|
||||
(new 'static 'sparticle-launcher
|
||||
:init-specs (new 'static 'inline-array sp-field-init-spec ,(1+ (length init-specs))
|
||||
,@init-specs
|
||||
(sp-end)
|
||||
)))
|
||||
)
|
||||
|
||||
(defmacro sp-tex (field-name tex-id)
|
||||
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-name) :tex ,tex-id)
|
||||
)
|
||||
|
||||
(defmacro sp-rnd-flt (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-rangef ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag float-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-flt (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-rangef 0.0
|
||||
:random-multf 1.0
|
||||
:flags (sp-flag float-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-int (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range 0
|
||||
:random-mult 1
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-int-plain-rnd (field-name val range mult)
|
||||
"For when we use plain integer, but set the randoms."
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range ,range
|
||||
:random-mult ,mult
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-rnd-int (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag int-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro sp-rnd-int-flt (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-range ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag int-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-cpuinfo-flags (&rest flags)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-flags)
|
||||
:initial-value (sp-cpuinfo-flag ,@flags)
|
||||
:random-mult 1
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-launcher-by-id (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:flags (sp-flag part-by-id)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-func (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:sym ,val
|
||||
:flags (sp-flag from-pointer)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-sound (sound)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-sound)
|
||||
:sound ,sound
|
||||
:flags (sp-flag plain-v2)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-end ()
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-end)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-copy-from-other (field-name offset)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,offset
|
||||
:random-mult 1
|
||||
:flags (sp-flag copy-from-other-field)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -189,7 +357,7 @@
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(get-field-spec-by-id (_type_ sp-field-id) sp-field-init-spec 9)
|
||||
(sparticle-launcher-method-10 (_type_ string) none 10)
|
||||
(setup-user-array (_type_ string) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -279,10 +447,10 @@
|
||||
:flag-assert #x1000000070
|
||||
(:methods
|
||||
(initialize (_type_ sparticle-launch-group process) none 9)
|
||||
(sparticle-launch-control-method-10 (_type_ vector) symbol 10)
|
||||
(is-visible? (_type_ vector) symbol 10)
|
||||
(spawn (_type_ vector) none 11)
|
||||
(sparticle-launch-control-method-12 (_type_ matrix) none 12)
|
||||
(sparticle-launch-control-method-13 (_type_ cspace) none 13)
|
||||
(spawn-with-matrix (_type_ matrix) none 12)
|
||||
(spawn-with-cspace (_type_ cspace) none 13)
|
||||
(kill-and-free-particles (_type_) none 14)
|
||||
(kill-particles (_type_) none 15)
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: sparticle-launcher
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; TODO sparticle-texture-day-night vf1/vf2 issue
|
||||
|
||||
;; og:ignore-form:sp-relaunch-particle-3d
|
||||
;; og:ignore-form:execute-part-engine
|
||||
;; og:ignore-form:sparticle-respawn-heights
|
||||
@@ -19,7 +21,6 @@
|
||||
(define-extern sp-init-fields! (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object)) ;; TODO - mips2c
|
||||
|
||||
(define-extern particle-adgif (function adgif-shader texture-id none)) ;; TODO - particle-adgif atomic ops, MIPS2C
|
||||
(define-extern particle-adgif-callback (function adgif-shader none)) ;; TODO bad VF dependencies
|
||||
(define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) ;; TODO - mips2c
|
||||
|
||||
;; DECOMP BEGINS
|
||||
@@ -95,7 +96,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(def-mips2c sp-init-fields! (function object (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol object))
|
||||
|
||||
(deftype sp-queued-launch-particles (structure)
|
||||
((sp-system sparticle-system :offset-assert 0)
|
||||
@@ -128,7 +129,32 @@
|
||||
|
||||
(kmemclose)
|
||||
|
||||
;; ERROR: function has no type analysis. Cannot decompile.
|
||||
(defun particle-setup-adgif ((arg0 adgif-shader) (arg1 int))
|
||||
(let ((a1-1 (lookup-texture-by-id-fast (the-as texture-id arg1)))
|
||||
(s5-0 #f)
|
||||
)
|
||||
(when (not a1-1)
|
||||
(set! a1-1 (lookup-texture-by-id-fast (new 'static 'texture-id :index #x9b :page #xb)))
|
||||
(set! s5-0 #t)
|
||||
)
|
||||
(set! (-> arg0 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> arg0 tex0 tfx) 0)
|
||||
(adgif-shader<-texture! arg0 a1-1)
|
||||
(set! (-> arg0 prims 1) (gs-reg64 tex0-1))
|
||||
(set! (-> arg0 prims 3) (the-as gs-reg64 (logior arg1 20)))
|
||||
(set! (-> arg0 prims 5) (gs-reg64 miptbp1-1))
|
||||
(set! (-> arg0 clamp-reg) (gs-reg64 zbuf-1))
|
||||
(set! (-> arg0 prims 9) (gs-reg64 alpha-1))
|
||||
(if s5-0
|
||||
(logior! (-> arg0 link-test) (link-test-flags backup-sprite-tex))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 alpha) (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(set! (-> arg0 clamp) (new 'static 'gs-clamp :minu #x13 :minv #x101))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
(deftype particle-adgif-cache (basic)
|
||||
((used int32 :offset-assert 4)
|
||||
@@ -159,9 +185,46 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(def-mips2c particle-adgif (function adgif-shader texture-id none))
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defun particle-adgif-callback ((arg0 adgif-shader) (arg1 texture-id))
|
||||
"Callback to update the adgif of a particle, keeping only alpha and clamp.
|
||||
This is new for jak 2.
|
||||
There is some funny stuff going on with vf16 - vf20, but it seems like this function just
|
||||
preserves those registers (which particle-adgif likely clobbers) so this doesn't clobber
|
||||
registers used by particle system, which it assumes are preserved across callbacks."
|
||||
(local-vars (v1-0 float))
|
||||
(rlet ((vf16 :class vf)
|
||||
(vf17 :class vf)
|
||||
(vf18 :class vf)
|
||||
(vf19 :class vf)
|
||||
(vf20 :class vf)
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 4)))
|
||||
(let ((s4-0 (-> arg0 alpha))
|
||||
(s3-0 (-> arg0 clamp))
|
||||
)
|
||||
; (.svf (&-> s5-0 0 quad) vf16)
|
||||
; (.svf (&-> s5-0 1 quad) vf17)
|
||||
; (.svf (&-> s5-0 2 quad) vf18)
|
||||
; (.svf (&-> s5-0 3 quad) vf19)
|
||||
; (.svf (&-> s5-0 4 quad) vf20)
|
||||
(particle-adgif arg0 arg1)
|
||||
(set! (-> arg0 alpha) s4-0)
|
||||
(set! (-> arg0 clamp) s3-0)
|
||||
)
|
||||
; (.lvf vf16 (&-> s5-0 0 quad))
|
||||
; (.lvf vf17 (&-> s5-0 1 quad))
|
||||
; (.lvf vf18 (&-> s5-0 2 quad))
|
||||
; (.lvf vf19 (&-> s5-0 3 quad))
|
||||
; (.lvf vf20 (&-> s5-0 4 quad))
|
||||
)
|
||||
(.mov v1-0 vf20)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defun sp-queue-launch ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 matrix))
|
||||
(let ((v1-0 *sp-launch-queue*))
|
||||
@@ -327,7 +390,7 @@
|
||||
)
|
||||
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(def-mips2c sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none))
|
||||
|
||||
(define *death-adgif* (the-as adgif-shader #f))
|
||||
|
||||
@@ -567,11 +630,83 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 32: Could not figure out load: (set! a1 (l.w (+ gp 104)))
|
||||
(defun sp-relaunch-particle-3d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d))
|
||||
(local-vars (v1-9 float) (v1-10 float))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s4-0 (new 'stack-no-clear 'quaternion)))
|
||||
(let* ((v1-0 s4-0)
|
||||
(a2-1 arg3)
|
||||
(f0-0 (-> a2-1 qx-qy-qz-sy x))
|
||||
(f1-0 (-> a2-1 qx-qy-qz-sy y))
|
||||
(f2-0 (-> a2-1 qx-qy-qz-sy z))
|
||||
)
|
||||
(set! (-> v1-0 x) f0-0)
|
||||
(set! (-> v1-0 y) f1-0)
|
||||
(set! (-> v1-0 z) f2-0)
|
||||
(set! (-> v1-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0))))
|
||||
)
|
||||
(set! (-> arg3 qx-qy-qz-sy x) 0.0)
|
||||
(set! (-> arg3 qx-qy-qz-sy y) 0.0)
|
||||
(set! (-> arg3 qx-qy-qz-sy z) 0.0)
|
||||
(sp-relaunch-setup-fields arg0 arg1 arg2 arg3)
|
||||
|
||||
;; TODO stub
|
||||
(defmethod spawn sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
|
||||
(none)
|
||||
;; some truly strange flag weirdness.
|
||||
(let* ((a1-1 (-> arg2 flags-s32))
|
||||
(v1-1 -2)
|
||||
(a0-1 (the-as uint (-> arg3 r-g-b-a x)))
|
||||
(a1-2 (logand a1-1 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)))
|
||||
)
|
||||
1
|
||||
(let ((a1-3 (sar (the-as int a1-2) 14)))
|
||||
(set! (-> arg3 r-g-b-a x) (the-as float (logior (logand a0-1 (the-as uint v1-1)) a1-3)))
|
||||
)
|
||||
)
|
||||
(let ((a1-4 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(set-vector! a1-4 (-> arg3 qx-qy-qz-sy x) (-> arg3 qx-qy-qz-sy y) (-> arg3 qx-qy-qz-sy z) 1.0)
|
||||
(quaternion-zxy! s3-0 a1-4)
|
||||
(if (logtest? (sp-cpuinfo-flag left-multiply-quat) (-> arg2 flags))
|
||||
(quaternion*! s3-0 s4-0 s3-0)
|
||||
)
|
||||
(cond
|
||||
((< (-> s3-0 w) 0.0)
|
||||
(.lvf vf1 (&-> arg3 qx-qy-qz-sy quad))
|
||||
(.lvf vf2 (&-> s3-0 vec quad))
|
||||
(.sub.vf vf1 vf0 vf2 :mask #b111)
|
||||
(.svf (&-> arg3 qx-qy-qz-sy quad) vf1)
|
||||
(.mov v1-9 vf1)
|
||||
)
|
||||
(else
|
||||
(.lvf vf1 (&-> arg3 qx-qy-qz-sy quad))
|
||||
(.lvf vf2 (&-> s3-0 vec quad))
|
||||
(.add.vf vf1 vf0 vf2 :mask #b111)
|
||||
(.svf (&-> arg3 qx-qy-qz-sy quad) vf1)
|
||||
(.mov v1-10 vf1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(*sp-60-hz*
|
||||
(set! (-> arg2 rot-syvel x) (* 5.0 (-> arg2 rot-syvel x)))
|
||||
(set! (-> arg2 rot-syvel y) (* 5.0 (-> arg2 rot-syvel y)))
|
||||
(set! (-> arg2 rot-syvel z) (* 5.0 (-> arg2 rot-syvel z)))
|
||||
)
|
||||
(else
|
||||
(set! (-> arg2 rot-syvel x) (* 6.0 (-> arg2 rot-syvel x)))
|
||||
(set! (-> arg2 rot-syvel y) (* 6.0 (-> arg2 rot-syvel y)))
|
||||
(set! (-> arg2 rot-syvel z) (* 6.0 (-> arg2 rot-syvel z)))
|
||||
)
|
||||
)
|
||||
(quaternion-zxy! (-> arg2 rotvel3d) (-> arg2 rot-syvel))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod initialize sparticle-launch-control ((obj sparticle-launch-control) (arg0 sparticle-launch-group) (arg1 process))
|
||||
@@ -695,7 +830,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod sparticle-launch-control-method-10 sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
|
||||
(defmethod is-visible? sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
|
||||
(let* ((v1-0 (-> obj group))
|
||||
(f0-0 (-> v1-0 bounds r))
|
||||
)
|
||||
@@ -726,7 +861,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod sparticle-launch-control-method-12 sparticle-launch-control ((obj sparticle-launch-control) (arg0 matrix))
|
||||
(defmethod spawn-with-matrix sparticle-launch-control ((obj sparticle-launch-control) (arg0 matrix))
|
||||
(let* ((a2-0 (-> obj origin))
|
||||
(a3-0 arg0)
|
||||
(v1-0 (-> a3-0 vector 0 quad))
|
||||
@@ -772,7 +907,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod sparticle-launch-control-method-13 sparticle-launch-control ((obj sparticle-launch-control) (arg0 cspace))
|
||||
(defmethod spawn-with-cspace sparticle-launch-control ((obj sparticle-launch-control) (arg0 cspace))
|
||||
(let* ((v1-0 (-> obj origin))
|
||||
(a3-0 (-> arg0 bone transform))
|
||||
(a0-2 (-> a3-0 vector 0 quad))
|
||||
@@ -818,10 +953,298 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod spawn sparticle-launch-control ((obj sparticle-launch-control) (arg0 vector))
|
||||
(with-pp
|
||||
(set! (-> obj origin trans quad) (-> arg0 quad))
|
||||
(if (not (or (is-visible? obj arg0) (logtest? (-> obj group flags) (sp-group-flag always-draw screen-space))))
|
||||
(return 0)
|
||||
)
|
||||
(let ((s4-0 (the-as int (-> pp clock frame-counter)))
|
||||
(s5-0 (-> obj last-spawn-time))
|
||||
)
|
||||
(let ((v1-10 (-> *display* real-frame-clock integral-frame-counter)))
|
||||
(if (!= v1-10 (+ (-> obj last-spawn-frame) 1))
|
||||
(set! s5-0 (the-as int (- (the-as time-frame s4-0) (logand (the-as int (-> pp clock sparticle-data x)) 255))))
|
||||
)
|
||||
)
|
||||
(set! (-> obj last-spawn-frame) (the-as int (-> *display* real-frame-clock integral-frame-counter)))
|
||||
(set! (-> obj last-spawn-time) s4-0)
|
||||
(when (logtest? (-> obj group flags) (sp-group-flag use-local-clock))
|
||||
(set! s5-0 (-> obj local-clock))
|
||||
(+! (-> obj local-clock) (logand (the-as int (-> pp clock sparticle-data x)) 255))
|
||||
(set! s4-0 (-> obj local-clock))
|
||||
)
|
||||
(let* ((f30-0 (vector-vector-distance arg0 (math-camera-pos)))
|
||||
(v1-26 1)
|
||||
(a0-13 *time-of-day*)
|
||||
(s3-1 (ash v1-26 (if a0-13
|
||||
(-> a0-13 0 hours)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (nonzero? (-> obj matrix))
|
||||
(set! f30-0 0.0)
|
||||
)
|
||||
(let ((s2-1 (-> obj length)))
|
||||
(b! #t cfg-95 :delay (nop!))
|
||||
(label cfg-19)
|
||||
(+! s2-1 -1)
|
||||
(let* ((a3-0 (-> obj data s2-1))
|
||||
(v1-33 (-> a3-0 group-item))
|
||||
(a1-4 (-> *part-id-table* (-> v1-33 launcher)))
|
||||
)
|
||||
(b!
|
||||
(not (and a1-4 (nonzero? a1-4) (logtest? (-> a3-0 flags) (sp-launch-state-flags launcher-active))))
|
||||
cfg-95
|
||||
:delay (empty-form)
|
||||
)
|
||||
(let* ((f1-3 (if (!= (-> v1-33 falloff-to) 0.0)
|
||||
(- 1.0 (/ f30-0 (-> v1-33 falloff-to)))
|
||||
1.0
|
||||
)
|
||||
)
|
||||
(f0-5 f1-3)
|
||||
)
|
||||
(let ((a0-25 sparticle-launcher))
|
||||
(b! (!= (-> a1-4 type) a0-25) cfg-94 :delay (nop!))
|
||||
)
|
||||
(b! (not (logtest? (-> v1-33 flags) (sp-group-item-flag launch-asap))) cfg-42 :delay (nop!))
|
||||
(when (not (logtest? (-> a3-0 flags) (sp-launch-state-flags particles-active)))
|
||||
(set! (-> a3-0 spawn-time) (the-as uint s4-0))
|
||||
(logior! (-> a3-0 flags) (sp-launch-state-flags particles-active))
|
||||
(when (< 0.0 f0-5)
|
||||
(b! (not (logtest? (-> v1-33 flags) (sp-group-item-flag bit7))) cfg-37 :delay (nop!))
|
||||
(let ((t9-3 sp-launch-particles-var))
|
||||
(b! (not (logtest? (-> v1-33 flags) (sp-group-item-flag is-3d))) cfg-35 :delay (nop!))
|
||||
(let ((a0-36 *sp-particle-system-3d*))
|
||||
(b! #t cfg-36 :delay (nop!))
|
||||
(label cfg-35)
|
||||
(set! a0-36 *sp-particle-system-2d*)
|
||||
(label cfg-36)
|
||||
(t9-3 a0-36 a1-4 (-> obj origin) a3-0 obj f0-5)
|
||||
)
|
||||
)
|
||||
(b! #t cfg-41 :delay (nop!))
|
||||
(label cfg-37)
|
||||
(let ((t9-4 sp-launch-particles-var)
|
||||
(a0-38 (if (logtest? (-> v1-33 flags) (sp-group-item-flag is-3d))
|
||||
*sp-particle-system-3d*
|
||||
*sp-particle-system-2d*
|
||||
)
|
||||
)
|
||||
(a2-4 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-4 trans quad) (-> a3-0 center quad))
|
||||
(t9-4 a0-38 a1-4 a2-4 a3-0 obj f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-41)
|
||||
(b! #t cfg-93 :delay (nop!))
|
||||
(label cfg-42)
|
||||
(when (or (logtest? s3-1 (-> v1-33 hour-mask))
|
||||
(not (or (= (-> v1-33 fade-after) 0.0) (< f30-0 (-> v1-33 fade-after))))
|
||||
)
|
||||
0
|
||||
(goto cfg-93)
|
||||
)
|
||||
(b! (nonzero? (-> v1-33 period)) cfg-59 :delay (empty-form))
|
||||
(if (not (logtest? (-> v1-33 flags) (sp-group-item-flag bit6)))
|
||||
(set! f0-5 (* 0.2 (the float (- s4-0 s5-0)) f0-5))
|
||||
)
|
||||
(b! #t cfg-81 :delay (nop!))
|
||||
(label cfg-59)
|
||||
0
|
||||
0
|
||||
(let* ((a2-5 (-> v1-33 length))
|
||||
(a0-57 (-> v1-33 period))
|
||||
(t0-10 (mod (+ (- s5-0 (the-as int (-> obj data s2-1 offset))) a0-57) (the-as int a0-57)))
|
||||
(a0-58 (mod (the-as uint (+ (- s4-0 (the-as int (-> obj data s2-1 offset))) a0-57)) a0-57))
|
||||
)
|
||||
(set! f0-5 (cond
|
||||
((and (< t0-10 (the-as int a2-5)) (< (the-as int a0-58) (the-as int a2-5)))
|
||||
(* 0.2 (the float (- s4-0 s5-0)) f0-5)
|
||||
)
|
||||
((and (< t0-10 (the-as int a2-5)) (>= (the-as int a0-58) (the-as int a2-5)))
|
||||
(* 0.2 (the float (- a2-5 (the-as uint t0-10))) f0-5)
|
||||
)
|
||||
((and (>= t0-10 (the-as int a2-5)) (< (the-as int a0-58) (the-as int a2-5)))
|
||||
(* 0.2 (the float a0-58) f0-5)
|
||||
)
|
||||
(else
|
||||
(when (not (logtest? (-> v1-33 flags) (sp-group-item-flag bit1)))
|
||||
0
|
||||
(goto cfg-93)
|
||||
)
|
||||
(when (< (the-as uint (- s4-0 (the-as int (-> obj data s2-1 spawn-time)))) (-> v1-33 period))
|
||||
0
|
||||
(goto cfg-93)
|
||||
)
|
||||
(set! (-> obj data s2-1 offset) (- (-> v1-33 period) a0-58))
|
||||
(* 0.2 (the float (- s4-0 s5-0)) f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-81)
|
||||
(set! (-> a3-0 spawn-time) (the-as uint s4-0))
|
||||
(logior! (-> a3-0 flags) (sp-launch-state-flags particles-active))
|
||||
(when (< 0.0 f0-5)
|
||||
(if (logtest? (-> v1-33 flags) (sp-group-item-flag bit6))
|
||||
(set! f0-5 f1-3)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> v1-33 flags) (sp-group-item-flag bit7))
|
||||
(sp-launch-particles-var
|
||||
(if (logtest? (-> v1-33 flags) (sp-group-item-flag is-3d))
|
||||
*sp-particle-system-3d*
|
||||
*sp-particle-system-2d*
|
||||
)
|
||||
a1-4
|
||||
(-> obj origin)
|
||||
a3-0
|
||||
obj
|
||||
f0-5
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((t9-6 sp-launch-particles-var)
|
||||
(a0-83 (if (logtest? (-> v1-33 flags) (sp-group-item-flag is-3d))
|
||||
*sp-particle-system-3d*
|
||||
*sp-particle-system-2d*
|
||||
)
|
||||
)
|
||||
(a2-22 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-22 trans quad) (-> a3-0 center quad))
|
||||
(t9-6 a0-83 a1-4 a2-22 a3-0 obj f0-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label cfg-93)
|
||||
(b! #t cfg-95 :delay (nop!))
|
||||
(label cfg-94)
|
||||
(format 0 "spawn called for non-sparticle-launcher~%")
|
||||
(label cfg-95)
|
||||
(b! (nonzero? s2-1) cfg-19 :delay (nop!))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 12: Could not figure out load: (set! a1 (l.wu (+ a0 132)))
|
||||
|
||||
(defun execute-part-engine ()
|
||||
(local-vars (sv-96 sparticle-launcher) (sv-104 int))
|
||||
(let ((gp-0 *sp-particle-system-2d*))
|
||||
(let* ((s5-0 *part-engine*)
|
||||
(s4-0 *part-id-table*)
|
||||
(s3-0 (new 'stack-no-clear 'matrix))
|
||||
(s2-0 (new 'stack-no-clear 'vector))
|
||||
(v1-1 (-> s5-0 alive-list next0))
|
||||
(s1-0 (-> v1-1 next0))
|
||||
)
|
||||
(while (!= v1-1 (-> s5-0 alive-list-end))
|
||||
(let* ((a0-2 (the-as process-drawable (-> (the-as connection v1-1) param1)))
|
||||
(a1-0 (-> a0-2 draw))
|
||||
(s0-0 (the-as object (-> (the-as connection v1-1) param3)))
|
||||
)
|
||||
(when (and (logtest? (-> a1-0 status) (draw-control-status on-screen))
|
||||
(< (-> a1-0 distance) (-> (the-as vector s0-0) w))
|
||||
)
|
||||
(set! sv-96 (-> s4-0 (-> (the-as connection v1-1) param2)))
|
||||
(set! sv-104 (the-as int (-> (the-as connection v1-1) param0)))
|
||||
(when (nonzero? sv-96)
|
||||
(let ((a1-8 (-> a0-2 node-list data sv-104)))
|
||||
(let* ((v1-7 s3-0)
|
||||
(t0-0 (-> a1-8 bone transform))
|
||||
(a0-5 (-> t0-0 vector 0 quad))
|
||||
(a2-2 (-> t0-0 vector 1 quad))
|
||||
(a3-0 (-> t0-0 vector 2 quad))
|
||||
(t0-1 (-> t0-0 trans quad))
|
||||
)
|
||||
(set! (-> v1-7 vector 0 quad) a0-5)
|
||||
(set! (-> v1-7 vector 1 quad) a2-2)
|
||||
(set! (-> v1-7 vector 2 quad) a3-0)
|
||||
(set! (-> v1-7 trans quad) t0-1)
|
||||
)
|
||||
(vector<-cspace! (-> s3-0 trans) a1-8)
|
||||
)
|
||||
(set! (-> s2-0 quad) (-> (the-as vector s0-0) quad))
|
||||
(set! (-> s2-0 w) 1.0)
|
||||
(vector-matrix*! (-> s3-0 trans) s2-0 s3-0)
|
||||
(sp-launch-particles-var
|
||||
gp-0
|
||||
sv-96
|
||||
s3-0
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-1 s1-0)
|
||||
(set! s1-0 (-> s1-0 next0))
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (camera-pos))
|
||||
(v1-12 1)
|
||||
(a0-14 *time-of-day*)
|
||||
(s4-1 (ash v1-12 (if a0-14
|
||||
(-> a0-14 0 hours)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s3-1 (-> *level* length))
|
||||
(let ((v1-16 (-> *level* level s3-1)))
|
||||
(when (= (-> v1-16 status) 'active)
|
||||
(let ((s2-1 (-> v1-16 part-engine)))
|
||||
(when s2-1
|
||||
(countdown (s1-1 (-> s2-1 length))
|
||||
(let ((s0-1 (-> s2-1 data s1-1)))
|
||||
(when (and (or (zero? (-> s0-1 param3))
|
||||
(< (vector-vector-distance s5-1 (the-as vector (&-> s0-1 param0))) (the-as float (-> s0-1 param3)))
|
||||
)
|
||||
(zero? (logand s4-1 (the-as int (-> s0-1 prev1))))
|
||||
)
|
||||
(let ((a1-14 (-> s0-1 next1))
|
||||
(t9-5 sp-launch-particles-var)
|
||||
(a0-25 gp-0)
|
||||
(a2-5 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-5 trans quad) (-> (the-as vector (&-> s0-1 param0)) quad))
|
||||
(t9-5
|
||||
a0-25
|
||||
(the-as sparticle-launcher a1-14)
|
||||
a2-5
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
(defun sparticle-track-root ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(let ((v1-3 (-> arg1 key proc root trans)))
|
||||
(set! (-> arg2 x) (-> v1-3 x))
|
||||
@@ -1027,29 +1450,335 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 12: Could not figure out load: (set! v1 (l.w (+ gp 16)))
|
||||
(defun sparticle-respawn-heights ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(let ((gp-0 (the-as (array int32) (-> arg1 user-float))))
|
||||
(when (and (nonzero? gp-0)
|
||||
(or (and (< (-> arg1 vel-sxvel y) 0.0) (< (-> arg2 y) (the-as float (-> gp-0 1))))
|
||||
(and (< 0.0 (-> arg1 vel-sxvel y)) (< (the-as float (-> gp-0 2)) (-> arg2 y)))
|
||||
)
|
||||
)
|
||||
(sp-kill-particle arg0 arg1)
|
||||
(let ((s3-0 (+ (the-as int (-> gp-0 length)) -1)))
|
||||
(when (< 2 s3-0)
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (if (zero? (-> gp-0 0))
|
||||
*sp-particle-system-2d*
|
||||
*sp-particle-system-3d*
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-vector! s2-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
|
||||
(let ((s5-1 3))
|
||||
(while (>= s3-0 s5-1)
|
||||
(let ((t9-1 sp-launch-particles-var)
|
||||
(a0-2 s1-0)
|
||||
(a1-3 (-> *part-id-table* (-> gp-0 s5-1)))
|
||||
(a2-1 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-1 trans quad) (-> s2-0 quad))
|
||||
(t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(+! s5-1 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 9: Could not figure out load: (set! v1 (l.w gp))
|
||||
|
||||
;; ERROR: failed type prop at 2: Could not figure out load: (set! a0 (l.w (+ v1 20)))
|
||||
(defun sparticle-respawn-timer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(when (<= (-> arg1 timer) 0)
|
||||
(let ((gp-0 (the-as object (-> arg1 user-float))))
|
||||
(when (nonzero? (the-as float gp-0))
|
||||
(sp-kill-particle arg0 arg1)
|
||||
(let ((s5-0 (+ (the-as int (-> (the-as (array int32) gp-0) length)) -1)))
|
||||
(when (< 2 s5-0)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (if (zero? (-> (the-as (array int32) gp-0) 0))
|
||||
*sp-particle-system-2d*
|
||||
*sp-particle-system-3d*
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
|
||||
(let ((s2-1 3))
|
||||
(while (>= s5-0 s2-1)
|
||||
(let ((t9-1 sp-launch-particles-var)
|
||||
(a0-2 s3-0)
|
||||
(a1-3 (-> *part-id-table* (-> (the-as (array int32) gp-0) s2-1)))
|
||||
(a2-1 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-1 trans quad) (-> s4-0 quad))
|
||||
(t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(+! s2-1 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 21: Could not figure out load: (set! a1 (l.w (+ s2 40)))
|
||||
;; ERROR: Bad vector register dependency: vf1
|
||||
;; ERROR: Bad vector register dependency: vf2
|
||||
(defun sparticle-texture-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(let ((v1-0 (the-as (array int32) (-> arg1 user-float))))
|
||||
(when (nonzero? v1-0)
|
||||
(if (zero? (-> v1-0 2))
|
||||
(set! (-> v1-0 2) (-> arg1 timer))
|
||||
)
|
||||
(let* ((a0-6 (+ (-> v1-0 length) -3))
|
||||
(a2-1 (-> v1-0 0))
|
||||
(a3-0 (-> v1-0 2))
|
||||
(t0-1 (if (< (-> arg1 timer) 0)
|
||||
(the-as int (-> *display* base-clock frame-counter))
|
||||
(- a3-0 (-> arg1 timer))
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((zero? (-> v1-0 1))
|
||||
(let ((v1-2 (-> v1-0 (+ (max 0 (min (+ (/ t0-1 a2-1) (-> arg1 user1-int16)) (+ a0-6 -1))) 3))))
|
||||
(if (nonzero? v1-2)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-4 (-> v1-0 (+ (mod (max 0 (+ (/ t0-1 a2-1) (-> arg1 user1-int16))) a0-6) 3))))
|
||||
(if (nonzero? v1-4)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-4))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 5: Could not figure out load: (set! a1 (l.w (+ v1 12)))
|
||||
;; TODO: vf1/vf2 get set from somewhere...
|
||||
(defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d))
|
||||
(local-vars
|
||||
(v1-9 uint128)
|
||||
(v1-10 uint128)
|
||||
(v1-13 uint128)
|
||||
(v1-14 uint128)
|
||||
(v1-23 uint128)
|
||||
(v1-24 uint128)
|
||||
(v1-27 uint128)
|
||||
(v1-28 uint128)
|
||||
(v1-33 float)
|
||||
(a0-5 float)
|
||||
(a0-11 float)
|
||||
(t7-0 uint) ;; changed
|
||||
(t7-3 uint) ;; changed
|
||||
(s3-0 float)
|
||||
(s4-0 float)
|
||||
)
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(let ((s2-0 (the-as object (-> arg1 user-float))))
|
||||
(when (nonzero? (the-as float s2-0))
|
||||
(let* ((v1-1 *time-of-day*)
|
||||
(s1-0 (if v1-1
|
||||
(-> v1-1 0 hours)
|
||||
0
|
||||
)
|
||||
)
|
||||
(f0-0 (rand-vu))
|
||||
)
|
||||
(.mov s4-0 vf1)
|
||||
(.mov s3-0 vf2)
|
||||
(cond
|
||||
((or (< s1-0 6) (< 18 s1-0))
|
||||
(let ((a1-1 (-> (the-as (array int32) s2-0) 7)))
|
||||
(when (nonzero? a1-1)
|
||||
(let ((v1-6 f0-0))
|
||||
(.mov vf2 v1-6)
|
||||
)
|
||||
(let ((v1-8 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 9)))))
|
||||
(.pextlb v1-9 0 v1-8)
|
||||
)
|
||||
(.pextlb v1-10 0 v1-9)
|
||||
(.mov vf1 v1-10)
|
||||
(.itof.vf vf1 vf1)
|
||||
(.mul.x.vf vf1 vf1 vf2)
|
||||
(let ((v1-12 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 8)))))
|
||||
(.pextlb v1-13 0 v1-12)
|
||||
)
|
||||
(.pextlb v1-14 0 v1-13)
|
||||
(.mov vf2 v1-14)
|
||||
(.itof.vf vf2 vf2)
|
||||
(.add.vf vf1 vf1 vf2)
|
||||
(let ((v1-15 (-> arg1 flags-s32)))
|
||||
(when (nonzero? (-> (the-as (array int32) s2-0) 10))
|
||||
(.lvf vf2 (&-> *time-of-day-context* current-prt-color quad))
|
||||
(.mul.vf vf1 vf1 vf2)
|
||||
(.mov a0-5 vf1)
|
||||
)
|
||||
(let ((v1-16 (logand v1-15 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14))))
|
||||
(.mov t7-0 vf1)
|
||||
(let ((v1-17 (sar (the-as int v1-16) 14)))
|
||||
(set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-0 (the-as uint -2)) v1-17)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a1-2 (-> (the-as (array int32) s2-0) 3)))
|
||||
(when (nonzero? a1-2)
|
||||
(let ((v1-20 f0-0))
|
||||
(.mov vf2 v1-20)
|
||||
)
|
||||
(let ((v1-22 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 5)))))
|
||||
(.pextlb v1-23 0 v1-22)
|
||||
)
|
||||
(.pextlb v1-24 0 v1-23)
|
||||
(.mov vf1 v1-24)
|
||||
(.itof.vf vf1 vf1)
|
||||
(.mul.x.vf vf1 vf1 vf2)
|
||||
(let ((v1-26 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 4)))))
|
||||
(.pextlb v1-27 0 v1-26)
|
||||
)
|
||||
(.pextlb v1-28 0 v1-27)
|
||||
(.mov vf2 v1-28)
|
||||
(.itof.vf vf2 vf2)
|
||||
(.add.vf vf1 vf1 vf2)
|
||||
(let ((v1-29 (-> arg1 flags-s32)))
|
||||
(when (nonzero? (-> (the-as (array int32) s2-0) 6))
|
||||
(.lvf vf2 (&-> *time-of-day-context* current-prt-color quad))
|
||||
(.mul.vf vf1 vf1 vf2)
|
||||
(.mov a0-11 vf1)
|
||||
)
|
||||
(let ((v1-30 (logand v1-29 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14))))
|
||||
(.mov t7-3 vf1)
|
||||
(let ((v1-31 (sar (the-as int v1-30) 14)))
|
||||
(set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-3 (the-as uint -2)) v1-31)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-2))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(.mov vf1 s4-0)
|
||||
(.mov vf2 s3-0)
|
||||
(.mov v1-33 vf2)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: Expression building failed: In sparticle-motion-blur: [OP: 78] - Floating point math attempted on invalid types: uint and float in op (-.s f2-0 f3-0).
|
||||
;; ERROR: Inline assembly instruction marked with TODO - [TODO.VCLIP]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping]
|
||||
;; ERROR: Inline assembly instruction marked with TODO - [TODO.VCLIP]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f3, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f3, f4, f4]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
|
||||
(defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d))
|
||||
(let ((a0-1 (-> arg1 key))
|
||||
(v1-0 (the-as object (-> arg1 user-float)))
|
||||
)
|
||||
(when (nonzero? (the-as float v1-0))
|
||||
(let ((a1-2 (the-as (array uint32) (-> (the-as (array symbol) v1-0) 0 value))))
|
||||
(when (nonzero? a1-2)
|
||||
(let* ((a1-4 (the-as object (-> a1-2 (min (the-as int (+ (-> a0-1 state-mode 0) 1)) (+ (-> a1-2 length) -1)))))
|
||||
(a0-8 (the-as
|
||||
object
|
||||
(-> (the-as (array int32) a1-4)
|
||||
(+ (mod
|
||||
(the-as int (/ (-> a0-1 state-counter) (/ (the-as int (-> (the-as vector4w a1-4) w)) 8)))
|
||||
(+ (-> (the-as (pointer int32) a1-4) 0) -1)
|
||||
)
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(a1-6 (/ (-> (the-as (array int32) v1-0) 1) 8))
|
||||
(a2-14 (-> (the-as (pointer int64) a0-8) (/ a1-6 64)))
|
||||
(a0-11 (logtest? a2-14 (ash 1 (logand a1-6 63))))
|
||||
(s4-0 (if a0-11
|
||||
(-> (the-as (pointer int32) v1-0) 6)
|
||||
(-> (the-as (pointer int32) v1-0) 5)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if a0-11
|
||||
(set! (-> arg2 r-g-b-a x) (rand-vu-float-range 64.0 192.0))
|
||||
(set! (-> arg2 r-g-b-a x) (rand-vu-float-range 32.0 48.0))
|
||||
)
|
||||
(set! (-> arg2 r-g-b-a y) (-> arg2 r-g-b-a x))
|
||||
(set! (-> arg2 r-g-b-a z) (-> arg2 r-g-b-a x))
|
||||
(if (nonzero? s4-0)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id s4-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(def-mips2c sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none))
|
||||
|
||||
(defun-debug sparticle-motion-blur-old ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d))
|
||||
"Unused"
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector4w))
|
||||
(s3-0 (new 'stack-no-clear 'vector4w))
|
||||
)
|
||||
(set! (-> s2-0 x) (-> arg2 x-y-z-sx x))
|
||||
(set! (-> s2-0 y) (-> arg2 x-y-z-sx y))
|
||||
(set! (-> s2-0 z) (-> arg2 x-y-z-sx z))
|
||||
(set! (-> s2-0 w) 1.0)
|
||||
(when (and (or (!= (-> arg1 vel-sxvel x) 0.0) (!= (-> arg1 vel-sxvel y) 0.0) (!= (-> arg1 vel-sxvel z) 0.0))
|
||||
(transform-point-qword! s5-0 s2-0)
|
||||
)
|
||||
(+! (-> s2-0 x) (* 32.0 (-> arg1 vel-sxvel x)))
|
||||
(+! (-> s2-0 y) (* 32.0 (-> arg1 vel-sxvel y)))
|
||||
(+! (-> s2-0 z) (* 32.0 (-> arg1 vel-sxvel z)))
|
||||
(when (transform-point-qword! s3-0 s2-0)
|
||||
(let* ((f0-14 (the float (+ (-> s5-0 x) -28672)))
|
||||
(f1-10 (the float (+ (-> s5-0 y) -29440)))
|
||||
(f2-4 (the float (+ (-> s3-0 x) -28672)))
|
||||
(f3-1 (the float (+ (-> s3-0 y) -29440)))
|
||||
(f30-0 (- f2-4 f0-14))
|
||||
(f28-0 (- f3-1 f1-10))
|
||||
)
|
||||
(set! (-> arg2 qx-qy-qz-sy z) (+ -16384.0 (atan f30-0 f28-0)))
|
||||
(let ((f0-17 (-> arg1 omega)))
|
||||
(if (!= f0-17 0.0)
|
||||
(set! (-> arg2 x-y-z-sx w) (* (sqrtf (+ (* f30-0 f30-0) (* f28-0 f28-0)))
|
||||
f0-17
|
||||
(lerp-scale 3.0 0.25 (/ 1.0 (the float (-> s5-0 z))) 0.000001 0.00000014285715)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return (the-as object #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (!= (-> arg1 omega) 0.0)
|
||||
(set! (-> arg2 x-y-z-sx w) 0.0)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defun sparticle-set-conerot ((arg0 sparticle-launcher) (arg1 vector))
|
||||
(let ((s5-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-x)))
|
||||
@@ -1187,6 +1916,21 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun birth-func-texture-group ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo))
|
||||
(let ((s5-0 (the-as (array int32) (-> arg1 user-float))))
|
||||
(when (nonzero? s5-0)
|
||||
(let* ((a0-1 (+ (-> s5-0 length) -3))
|
||||
(a1-1 (-> s5-0 (+ (rand-vu-int-count a0-1) 3)))
|
||||
)
|
||||
(if (nonzero? a1-1)
|
||||
(particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod get-field-spec-by-id sparticle-launcher ((obj sparticle-launcher) (arg0 sp-field-id))
|
||||
@@ -1211,4 +1955,37 @@
|
||||
(the-as sp-field-init-spec #f)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 45: Could not figure out load: (set! v1 (l.w (+ gp 12)))
|
||||
(defmethod setup-user-array sparticle-launcher ((obj sparticle-launcher) (arg0 string))
|
||||
(let ((s5-0 (get-field-spec-by-id obj (sp-field-id spt-texture)))
|
||||
(v1-1 (lookup-texture-id-by-name arg0 (the-as string #f)))
|
||||
)
|
||||
(if s5-0
|
||||
(set! (-> s5-0 initial-valuef) (the-as float v1-1))
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (get-field-spec-by-id obj (sp-field-id spt-userdata))))
|
||||
(when (and v1-3 (= (-> v1-3 flags) (sp-flag plain-v2)))
|
||||
(let ((gp-1 (the-as object (-> v1-3 initial-valuef))))
|
||||
(when (and (= (logand (the-as int gp-1) 7) 4)
|
||||
(type? (the-as float gp-1) array)
|
||||
(logtest? (-> (the-as (array int32) gp-1) 1) 128)
|
||||
)
|
||||
(set! (-> (the-as (array int32) gp-1) 0) (/ (-> (the-as (array int32) gp-1) 0) 8))
|
||||
(set! (-> (the-as (array int32) gp-1) 1) (/ (logand (-> (the-as (array int32) gp-1) 1) 8) 8))
|
||||
(set! (-> (the-as (array int32) gp-1) 2) (/ (-> (the-as (array int32) gp-1) 2) 8))
|
||||
(set! (-> (the-as (array int32) gp-1) content-type) int32)
|
||||
(dotimes (s5-1 (+ (-> (the-as (array int32) gp-1) length) -3))
|
||||
(set! (-> (the-as (array int32) gp-1) (+ s5-1 3))
|
||||
(the-as
|
||||
int
|
||||
(lookup-texture-id-by-name (the-as string (-> (the-as (array int32) gp-1) (+ s5-1 3))) (the-as string #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -161,12 +161,113 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t2, t1]
|
||||
(defmacro .movn (result value check original)
|
||||
`(if (!= ,check 0)
|
||||
(set! ,result (the-as int ,value))
|
||||
(set! ,result (the-as int ,original))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro .movz (result value check original)
|
||||
`(if (= ,check 0)
|
||||
(set! ,result (the-as int ,value))
|
||||
(set! ,result (the-as int ,original))
|
||||
)
|
||||
)
|
||||
|
||||
(defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state))
|
||||
(local-vars
|
||||
(a2-3 int)
|
||||
(a2-4 int)
|
||||
(a2-5 int)
|
||||
(a2-6 int)
|
||||
(a2-7 int)
|
||||
(a2-8 int)
|
||||
(t1-16 int)
|
||||
(t1-17 int)
|
||||
(t1-18 int)
|
||||
(t1-19 int)
|
||||
(t1-20 int)
|
||||
(t3-5 int)
|
||||
)
|
||||
(let ((v1-0 0)
|
||||
(t0-0 (-> arg0 blocks 0))
|
||||
(a3-0 0)
|
||||
)
|
||||
(when (= arg1 1)
|
||||
(set! v1-0 t0-0)
|
||||
(set! t0-0 (-> arg0 blocks 1))
|
||||
)
|
||||
(when arg2
|
||||
(set! a3-0 (the-as int (-> arg2 randomize)))
|
||||
(+! (-> arg2 randomize) 1)
|
||||
(when (= (-> arg2 randomize) t0-0)
|
||||
(set! (-> arg2 randomize) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
(dotimes (a2-1 t0-0)
|
||||
(when (nonzero? (-> arg0 alloc-table (+ v1-0 a3-0)))
|
||||
(let ((a2-2 0)
|
||||
(t1-15 (-> arg0 alloc-table (+ v1-0 a3-0)))
|
||||
(t0-4 (* (+ v1-0 a3-0) 64))
|
||||
)
|
||||
0
|
||||
0
|
||||
(let ((t2-4 (shl t1-15 32))
|
||||
(t3-0 (+ a2-2 32))
|
||||
)
|
||||
(.movn t1-16 t2-4 t2-4 t1-15)
|
||||
(.movz a2-3 t3-0 t2-4 a2-2)
|
||||
)
|
||||
(let ((t2-5 (shl t1-16 16))
|
||||
(t3-1 (+ a2-3 16))
|
||||
)
|
||||
(.movn t1-17 t2-5 t2-5 t1-16)
|
||||
(.movz a2-4 t3-1 t2-5 a2-3)
|
||||
)
|
||||
(let ((t2-6 (* t1-17 256))
|
||||
(t3-2 (+ a2-4 8))
|
||||
)
|
||||
(.movn t1-18 t2-6 t2-6 t1-17)
|
||||
(.movz a2-5 t3-2 t2-6 a2-4)
|
||||
)
|
||||
(let ((t2-7 (* t1-18 16))
|
||||
(t3-3 (+ a2-5 4))
|
||||
)
|
||||
(.movn t1-19 t2-7 t2-7 t1-18)
|
||||
(.movz a2-6 t3-3 t2-7 a2-5)
|
||||
)
|
||||
(let ((t2-8 (* t1-19 4))
|
||||
(t3-4 (+ a2-6 2))
|
||||
)
|
||||
(.movn t1-20 t2-8 t2-8 t1-19)
|
||||
(.movz a2-7 t3-4 t2-8 a2-6)
|
||||
(let ((t1-21 (* t1-20 2))
|
||||
(t2-9 (+ a2-7 1))
|
||||
)
|
||||
(.movn t3-5 t1-21 t1-21 t3-4)
|
||||
(.movz a2-8 t2-9 t1-21 a2-7)
|
||||
)
|
||||
)
|
||||
(let ((t0-5 (+ t0-4 a2-8)))
|
||||
(logxor! (-> arg0 alloc-table (+ v1-0 a3-0)) (the-as uint (ash 1 a2-8)))
|
||||
(+! (-> arg0 num-alloc arg1) 1)
|
||||
(let ((v1-9 (-> arg0 cpuinfo-table t0-5)))
|
||||
(set! (-> v1-9 valid) (the-as uint 1))
|
||||
(return v1-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! a3-0 1)
|
||||
(if (= a3-0 t0-0)
|
||||
(set! a3-0 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as sparticle-cpuinfo #f)
|
||||
)
|
||||
|
||||
(defun sp-kill-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(cond
|
||||
@@ -226,13 +327,13 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(def-mips2c sp-process-block-2d (function sparticle-system int int int int symbol none))
|
||||
(def-mips2c sp-process-block-3d (function sparticle-system int int int int symbol none))
|
||||
|
||||
(defun sp-copy-to-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t)
|
||||
;(dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t)
|
||||
(__mem-move (&+ (scratchpad-start) arg0) arg1 (the uint (* a2-1 16)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -240,13 +341,15 @@
|
||||
|
||||
(defun sp-copy-from-spr ((arg0 int) (arg1 pointer) (arg2 int))
|
||||
(let ((a2-1 (/ (+ arg2 15) 16)))
|
||||
(dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t)
|
||||
;(dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t)
|
||||
(__mem-move arg1 (&+ (scratchpad-start) arg0) (the uint (* a2-1 16)))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
;; unused memcpy function
|
||||
|
||||
(defun sp-process-block ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d) (arg3 int))
|
||||
(local-vars (sv-16 int) (sv-32 int) (sv-48 int) (sv-64 int))
|
||||
@@ -264,8 +367,8 @@
|
||||
)
|
||||
(t9-2 sv-16 (the-as pointer a1-7) sv-32)
|
||||
)
|
||||
(set! sv-48 (+ #x70000000 s3-0))
|
||||
(set! sv-64 (+ #x70000000 s1-0))
|
||||
(set! sv-48 (+ (the int (scratchpad-start)) s3-0))
|
||||
(set! sv-64 (+ (the int (scratchpad-start)) s1-0))
|
||||
(let ((t1-0 (paused?)))
|
||||
(cond
|
||||
((-> arg0 is-3d)
|
||||
@@ -292,7 +395,7 @@
|
||||
(defun sp-process-particle-system ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d))
|
||||
(countdown (v1-0 13)
|
||||
(let ((a0-4 (-> *display* clock v1-0 sparticle-data quad)))
|
||||
(set! (-> (the-as vector (+ #x70000000 (* v1-0 16))) quad) a0-4)
|
||||
(set! (-> (the-as vector (+ (the int (scratchpad-start)) (* v1-0 16))) quad) a0-4)
|
||||
)
|
||||
)
|
||||
(let* ((v1-3 208)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; the sprite renderer draw 2D or 3D sprites
|
||||
;; TODO: glow is commented out.
|
||||
;; TODO: distort is commented out.
|
||||
|
||||
(defenum sprite-aux-type
|
||||
:bitfield #f
|
||||
@@ -126,21 +128,6 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(defmethod inspect sprite-aux-elem ((obj sprite-aux-elem))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'sprite-aux-elem)
|
||||
(format #t "~1Taux-type: ~D~%" (-> obj aux-type))
|
||||
(format #t "~1Tdata[3] @ #x~X~%" (-> obj data))
|
||||
(format #t "~1Tvec-data: #<sprite-vec-data-2d @ #x~X>~%" (-> obj vec-data))
|
||||
(format #t "~1Tgif-data: #<adgif-shader @ #x~X>~%" (-> obj gif-data))
|
||||
(format #t "~1Taux-data: #<sparticle-cpuinfo @ #x~X>~%" (-> obj aux-data))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
(deftype sprite-aux-list (basic)
|
||||
((num-entries int32 :offset-assert 4) ;; capacity
|
||||
(entry int32 :offset-assert 8) ;; current size
|
||||
@@ -254,50 +241,6 @@
|
||||
:flag-assert #x9000002a0
|
||||
)
|
||||
|
||||
(defmethod inspect sprite-frame-data ((obj sprite-frame-data))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'sprite-frame-data)
|
||||
(format #t "~1Tdata[42] @ #x~X~%" (-> obj cdata))
|
||||
(format #t "~1Tcdata[16] @ #x~X~%" (-> obj cdata))
|
||||
(format #t "~1Tfdata[26] @ #x~X~%" (-> obj hmge-scale))
|
||||
(format #t "~1Txy-array[8] @ #x~X~%" (-> obj cdata))
|
||||
(format #t "~1Tst-array[4] @ #x~X~%" (-> obj st-array))
|
||||
(format #t "~1Txyz-array[4] @ #x~X~%" (-> obj xyz-array))
|
||||
(format #t "~1Thmge-scale: #<vector @ #x~X>~%" (-> obj hmge-scale))
|
||||
(format #t "~1Tconsts: #<vector @ #x~X>~%" (&-> obj pfog0))
|
||||
(format #t "~1Tpfog0: ~f~%" (-> obj pfog0))
|
||||
(format #t "~1Tdeg-to-rad: ~f~%" (-> obj deg-to-rad))
|
||||
(format #t "~1Tmin-scale: ~f~%" (-> obj min-scale))
|
||||
(format #t "~1Tinv-area: ~f~%" (-> obj inv-area))
|
||||
(format #t "~1Tadgif-giftag: #<qword @ #x~X>~%" (-> obj adgif-giftag))
|
||||
(format #t "~1Tsprite-2d-giftag: #<qword @ #x~X>~%" (-> obj sprite-2d-giftag))
|
||||
(format #t "~1Tsprite-2d-giftag-2: #<qword @ #x~X>~%" (-> obj sprite-2d-giftag-2))
|
||||
(format #t "~1Tsincos-01: #<vector @ #x~X>~%" (-> obj sincos-01))
|
||||
(format #t "~1Tsincos-23: #<vector @ #x~X>~%" (-> obj sincos-23))
|
||||
(format #t "~1Tsincos-45: #<vector @ #x~X>~%" (-> obj sincos-45))
|
||||
(format #t "~1Tsincos-67: #<vector @ #x~X>~%" (-> obj sincos-67))
|
||||
(format #t "~1Tsincos-89: #<vector @ #x~X>~%" (-> obj sincos-89))
|
||||
(format #t "~1Tbasis-x: #<vector @ #x~X>~%" (-> obj basis-x))
|
||||
(format #t "~1Tbasis-y: #<vector @ #x~X>~%" (-> obj basis-y))
|
||||
(format #t "~1Tsprite-3d-giftag: #<qword @ #x~X>~%" (-> obj sprite-3d-giftag))
|
||||
(format #t "~1Tsprite-3d-giftag-2: #<qword @ #x~X>~%" (-> obj sprite-3d-giftag-2))
|
||||
(format #t "~1Tscreen-shader: #<adgif-shader @ #x~X>~%" (-> obj screen-shader))
|
||||
(format #t "~1Tinv-hmge-scale: #<vector @ #x~X>~%" (-> obj inv-hmge-scale))
|
||||
(format #t "~1Tstq-offset: #<vector @ #x~X>~%" (-> obj stq-offset))
|
||||
(format #t "~1Tstq-scale: #<vector @ #x~X>~%" (-> obj stq-scale))
|
||||
(format #t "~1Trgba-plain: #<qword @ #x~X>~%" (-> obj rgba-plain))
|
||||
(format #t "~1Twarp-giftag: #<qword @ #x~X>~%" (-> obj warp-giftag))
|
||||
(format #t "~1Tfog-clamp: #<vector @ #x~X>~%" (-> obj fog-clamp))
|
||||
(format #t "~1Tfog-min: ~f~%" (-> obj fog-clamp x))
|
||||
(format #t "~1Tfog-max: ~f~%" (-> obj fog-clamp y))
|
||||
(format #t "~1Tmax-scale: ~f~%" (-> obj max-scale))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
(defun sprite-setup-frame-data ((data sprite-frame-data) (tbp-offset uint))
|
||||
"Build the sprite-frame-data. This should be done once per frame"
|
||||
(set! (-> data hmge-scale quad) (-> *math-camera* hmge-scale quad))
|
||||
@@ -476,7 +419,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(define sprite-vu1-block (new 'static 'vu-function :length #x35f :qlength #x1b0))
|
||||
(define sprite-vu1-block (new 'static 'vu-function :length 0 :qlength 0))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;; sprite-arrays
|
||||
@@ -872,10 +815,10 @@
|
||||
)
|
||||
|
||||
;; run the distorters
|
||||
(when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
(sprite-init-distorter dma-buff)
|
||||
(sprite-draw-distorters dma-buff)
|
||||
)
|
||||
; (when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))
|
||||
; (sprite-init-distorter dma-buff)
|
||||
; (sprite-draw-distorters dma-buff)
|
||||
; )
|
||||
|
||||
;; first packet - set up the GS registers
|
||||
(let* ((v1-17 dma-buff)
|
||||
@@ -987,9 +930,9 @@
|
||||
;;;;;;;;;;;;;;;;
|
||||
|
||||
;; TODO: figure out what this is doing
|
||||
(sprite-glow-init-engine dma-buff)
|
||||
(sprite-glow-draw dma-buff)
|
||||
(simple-sprite-system-method-10 *simple-sprite-system* dma-buff)
|
||||
; (sprite-glow-init-engine dma-buff)
|
||||
; (sprite-glow-draw dma-buff)
|
||||
; (simple-sprite-system-method-10 *simple-sprite-system* dma-buff)
|
||||
(let* ((v1-26 dma-buff)
|
||||
(pkt6 (the-as dma-packet (-> v1-26 base)))
|
||||
)
|
||||
@@ -1007,7 +950,7 @@
|
||||
)
|
||||
(dma-bucket-insert-tag
|
||||
(-> *display* frames (-> *display* on-screen) bucket-group)
|
||||
(bucket-id bucket-313)
|
||||
(bucket-id particles)
|
||||
dma-bucket-begin
|
||||
(the-as (pointer dma-tag) a3-0)
|
||||
)
|
||||
|
||||
@@ -6,4 +6,8 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
(defun update-texture-anim ((id bucket-id))
|
||||
;; hack!
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -289,6 +289,7 @@
|
||||
:bitfield #t
|
||||
(needs-log-in 8)
|
||||
(bit-9 9)
|
||||
(backup-sprite-tex 10) ;; set when particle-setup-adgif fails texture lookup.
|
||||
)
|
||||
|
||||
;; GS texturing/blending settings, called adgif-shader.
|
||||
|
||||
@@ -1111,6 +1111,13 @@
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-28) 1) (gs-reg64 texflush))
|
||||
(set! (-> v1-53 base) (&+ a0-28 16))
|
||||
)
|
||||
|
||||
(#when PC_PORT
|
||||
(dma-buffer-add-cnt-vif2 dma-buf 1 (new 'static 'vif-tag :cmd (vif-cmd pc-port)) (the-as vif-tag 3))
|
||||
(dma-buffer-add-uint64 dma-buf tpage)
|
||||
(dma-buffer-add-uint64 dma-buf mode)
|
||||
)
|
||||
|
||||
(let ((a3-3 (-> dma-buf base)))
|
||||
(let ((v1-54 (the-as dma-packet (-> dma-buf base))))
|
||||
(set! (-> v1-54 dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -1628,10 +1635,10 @@
|
||||
)
|
||||
(((tpage-category sprite))
|
||||
;; sprite skips uploads if the level isn't drawing, but otherwise uploads the whole thing.
|
||||
(if (or (= (-> lev display?) 'display) (= (-> lev display?) 'actor) (= (-> lev index) 6))
|
||||
(set! (-> lev upload-size 7)
|
||||
(upload-vram-pages pool (-> pool segment-common) tpage (tex-upload-mode seg0-1-2) bucket)
|
||||
)
|
||||
(when (or (= (-> lev display?) 'display) (= (-> lev display?) 'actor) (= (-> lev index) 6))
|
||||
(set! (-> lev upload-size 7)
|
||||
(upload-vram-pages pool (-> pool segment-common) tpage (tex-upload-mode seg0-1-2) bucket)
|
||||
)
|
||||
)
|
||||
)
|
||||
(((tpage-category map))
|
||||
|
||||
@@ -392,7 +392,7 @@
|
||||
(bucket-311 311) ;; depth-cue
|
||||
|
||||
(tex-all-sprite 312)
|
||||
(bucket-313 313) ;; particles
|
||||
(particles 313) ;; particles
|
||||
(bucket-314 314) ;; shadow
|
||||
(bucket-315 315) ;; effects
|
||||
(tex-all-warp 316) ;; tex
|
||||
|
||||
@@ -7,3 +7,218 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defpartgroup group-board-land-straight
|
||||
:id 119
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 209))
|
||||
)
|
||||
|
||||
(defpartgroup group-board-quick-jump
|
||||
:id 120
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 209))
|
||||
)
|
||||
|
||||
(defpart 431
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.5))
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-flt spt-scale-y (meters 0.05))
|
||||
(sp-flt spt-r 255.0)
|
||||
(sp-flt spt-g 255.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-rnd-flt spt-a 64.0 32.0 1.0)
|
||||
(sp-flt spt-omega 8.192)
|
||||
(sp-rnd-flt spt-vel-y (meters 0.033333335) (meters 0.033333335) 1.0)
|
||||
(sp-rnd-flt spt-fade-g -0.85 -1.7 1.0)
|
||||
(sp-flt spt-fade-b -8.0)
|
||||
(sp-rnd-flt spt-fade-a -0.16 -0.16 1.0)
|
||||
(sp-rnd-flt spt-accel-y -6.826667 -2.7306666 1.0)
|
||||
(sp-flt spt-friction 0.95)
|
||||
(sp-int-plain-rnd spt-timer 50 149 1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
||||
(sp-func spt-func 'sparticle-motion-blur)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 45.0) (degrees 90.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-target-board
|
||||
:id 118
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 432) (sp-item 433 :flags (is-3d)) (sp-item 434))
|
||||
)
|
||||
|
||||
(defpart 432
|
||||
:init-specs ((sp-flt spt-num 3.0)
|
||||
(sp-flt spt-y (meters 0.25))
|
||||
(sp-int spt-rot-x 7)
|
||||
(sp-flt spt-r 2048.0)
|
||||
(sp-flt spt-g 1638.4)
|
||||
(sp-flt spt-b 1843.2)
|
||||
(sp-flt spt-fade-b -0.08533333)
|
||||
(sp-int spt-timer 40)
|
||||
(sp-cpuinfo-flags distort)
|
||||
(sp-flt spt-conerot-x (degrees 90.0))
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-radius (meters 0) (meters 0.5) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 433
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-func spt-birth-func 'birth-func-target-orient)
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 0.25))
|
||||
(sp-rnd-flt spt-scale-x (meters 4) (meters 2) 1.0)
|
||||
(sp-flt spt-rot-x 0.0)
|
||||
(sp-flt spt-rot-y (degrees 0.0))
|
||||
(sp-flt spt-rot-z (degrees 0.0))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 64.0 128.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-rnd-flt spt-a 8.0 8.0 1.0)
|
||||
(sp-rnd-flt spt-scalevel-x (meters -0.02) (meters -0.006666667) 1.0)
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.1)
|
||||
(sp-int spt-timer 160)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 434
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.5))
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-flt spt-scale-y (meters 0.05))
|
||||
(sp-rnd-flt spt-r 128.0 64.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-rnd-flt spt-a 64.0 32.0 1.0)
|
||||
(sp-flt spt-omega 10.24)
|
||||
(sp-rnd-flt spt-vel-y (meters 0.033333335) (meters 0.033333335) 1.0)
|
||||
(sp-flt spt-fade-r -3.0)
|
||||
(sp-flt spt-fade-g -3.0)
|
||||
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
|
||||
(sp-rnd-flt spt-accel-y -1.3653333 -1.3653333 1.0)
|
||||
(sp-flt spt-friction 0.95)
|
||||
(sp-int-plain-rnd spt-timer 50 149 1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12)
|
||||
(sp-func spt-func 'sparticle-motion-blur)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 80.0) (degrees 10.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-radius (meters 0) (meters 0.5) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 435
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :page #xc))
|
||||
(sp-flt spt-num 0.0)
|
||||
(sp-flt spt-y (meters 0))
|
||||
(sp-rnd-flt spt-scale-x (meters 1) (meters 1) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 32.0)
|
||||
(sp-rnd-flt spt-a 8.0 56.0 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters 0.13333334) (meters 0.16666667) 1.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.013333334))
|
||||
(sp-rnd-flt spt-rotvel-z (degrees -0.4) (degrees 0.8) 1.0)
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-g -1.4222223)
|
||||
(sp-flt spt-fade-a -0.35555556)
|
||||
(sp-flt spt-accel-y 0.34133333)
|
||||
(sp-flt spt-friction 0.7)
|
||||
(sp-int spt-timer 180)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
||||
(sp-flt spt-conerot-x (degrees 90.0))
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
(defpartgroup group-board-spin-attack
|
||||
:id 117
|
||||
:duration (seconds 50)
|
||||
:flags (use-local-clock unk-6)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:rotate ((degrees 4) (degrees 8) (degrees 4))
|
||||
:parts ((sp-item 436 :flags (is-3d launch-asap bit6 bit7))
|
||||
(sp-item 437 :flags (is-3d launch-asap bit6 bit7))
|
||||
(sp-item 438 :flags (launch-asap bit6))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 438
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xca :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 3) (meters 0.5) 1.0)
|
||||
(sp-flt spt-rot-x 2048.0)
|
||||
(sp-rnd-flt spt-scale-y (meters 4) (meters 0.5) 1.0)
|
||||
(sp-flt spt-r 0.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 64.0)
|
||||
(sp-flt spt-fade-a -0.4)
|
||||
(sp-int spt-timer 80)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
||||
(sp-flt spt-userdata 12288.0)
|
||||
(sp-func spt-func 'sparticle-track-root)
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 437
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 0))
|
||||
(sp-flt spt-y (meters 0))
|
||||
(sp-flt spt-z (meters 0))
|
||||
(sp-flt spt-scale-x (meters 12))
|
||||
(sp-flt spt-rot-x 0.0)
|
||||
(sp-flt spt-rot-y (degrees 0.0))
|
||||
(sp-flt spt-rot-z (degrees 90.0))
|
||||
(sp-flt spt-scale-y (meters 9))
|
||||
(sp-flt spt-r 0.0)
|
||||
(sp-rnd-flt spt-g 128.0 128.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 128.0)
|
||||
(sp-flt spt-scalevel-x (meters -0.086666666))
|
||||
(sp-flt spt-scalevel-y (meters -0.09))
|
||||
(sp-int spt-timer 50)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-func spt-func 'sparticle-track-root)
|
||||
(sp-flt spt-rotate-y (degrees 0.0))
|
||||
)
|
||||
)
|
||||
|
||||
(defpart 436
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-x (meters 0))
|
||||
(sp-flt spt-y (meters 0))
|
||||
(sp-flt spt-z (meters 0))
|
||||
(sp-flt spt-scale-x (meters 1.4))
|
||||
(sp-flt spt-rot-x 0.0)
|
||||
(sp-flt spt-rot-y (degrees 0.0))
|
||||
(sp-flt spt-rot-z (degrees 90.0))
|
||||
(sp-flt spt-scale-y (meters 0.9))
|
||||
(sp-flt spt-r 0.0)
|
||||
(sp-rnd-flt spt-g 128.0 128.0 1.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 255.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.3))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -3.1875)
|
||||
(sp-int spt-timer 20)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-func spt-func 'sparticle-track-root)
|
||||
(sp-flt spt-rotate-y (degrees 0.0))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -71,8 +71,10 @@ def update_all_blocks(game_name, block_dict):
|
||||
final_lines.append(line)
|
||||
block_id = line.split(";; +++")[1]
|
||||
# Look to see if we actually have that block
|
||||
found_block = False
|
||||
for block in blocks:
|
||||
if block.block_id == block_id:
|
||||
found_block = True
|
||||
# if we found the block, write the data, then proceed ahead until the end
|
||||
for block_line in block.data:
|
||||
final_lines.append(block_line)
|
||||
@@ -84,6 +86,8 @@ def update_all_blocks(game_name, block_dict):
|
||||
i = i + 1
|
||||
break
|
||||
break
|
||||
if not found_block:
|
||||
i = i + 1
|
||||
else:
|
||||
final_lines.append(line)
|
||||
i = i + 1
|
||||
|
||||
+18
-18
@@ -256,8 +256,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-eco-blue-collect
|
||||
:id 43
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 11 :flags (launch-asap) :binding 12)
|
||||
(sp-item 12 :flags (start-dead launch-asap) :binding 13)
|
||||
@@ -737,8 +737,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-eco-red-collect
|
||||
:id 49
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 168 :flags (launch-asap) :binding 169)
|
||||
@@ -1330,8 +1330,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-eco-yellow-collect
|
||||
:id 57
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 199 :flags (launch-asap) :binding 200)
|
||||
(sp-item 200 :flags (start-dead launch-asap) :binding 201)
|
||||
@@ -1675,8 +1675,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-eco-green-pill-collect
|
||||
:id 60
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 216 :flags (launch-asap) :binding 217)
|
||||
(sp-item 217 :flags (start-dead launch-asap) :binding 218)
|
||||
@@ -1695,8 +1695,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-eco-green-collect
|
||||
:id 61
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 216 :flags (launch-asap) :binding 219)
|
||||
(sp-item 219 :flags (start-dead launch-asap) :binding 218)
|
||||
@@ -2228,8 +2228,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-green-collect
|
||||
:id 66
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 241) (sp-item 242) (sp-item 243))
|
||||
@@ -2308,8 +2308,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-blue-collect
|
||||
:id 67
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 246) (sp-item 247) (sp-item 248))
|
||||
@@ -2388,8 +2388,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-yellow-collect
|
||||
:id 68
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 249) (sp-item 250) (sp-item 251))
|
||||
@@ -2478,8 +2478,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-red-collect
|
||||
:id 69
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 252) (sp-item 253) (sp-item 254))
|
||||
|
||||
+5
-5
@@ -274,7 +274,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-crate-explode
|
||||
:id 71
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 286) (sp-item 288))
|
||||
@@ -283,7 +283,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-crate-steel-explode
|
||||
:id 72
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 281) (sp-item 283) (sp-item 285) (sp-item 288) (sp-item 288) (sp-item 288))
|
||||
@@ -292,7 +292,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-eco-box-explosion
|
||||
:id 73
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
@@ -1296,8 +1296,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-buzzer-crate
|
||||
:id 74
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 302))
|
||||
)
|
||||
|
||||
+2
-2
@@ -172,8 +172,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-blue-hit-ground-effect
|
||||
:id 70
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 261) (sp-item 262) (sp-item 263 :flags (is-3d)) (sp-item 264) (sp-item 265 :flags (is-3d)))
|
||||
)
|
||||
|
||||
+3
-3
@@ -193,7 +193,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-yellow-eco-fireball
|
||||
:id 102
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 349 :flags (launch-asap) :binding 350)
|
||||
(sp-item 350 :flags (start-dead launch-asap) :binding 351)
|
||||
@@ -340,7 +340,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-yellow-eco-fireball-launcher
|
||||
:id 103
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 355 :flags (launch-asap))
|
||||
(sp-item 356 :flags (bit1) :period 630 :length 15)
|
||||
@@ -519,7 +519,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-yellow-eco-fireball-hit
|
||||
:id 104
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 2059 :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -273,7 +273,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-water-splash
|
||||
:id 40
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
@@ -312,7 +312,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-water-splash-small
|
||||
:id 41
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
|
||||
+96
-96
@@ -193,7 +193,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-target-hit
|
||||
:id 1
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 56) (sp-item 57))
|
||||
@@ -247,8 +247,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-red-eco-strike-ground
|
||||
:id 2
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 59) (sp-item 60))
|
||||
)
|
||||
@@ -310,8 +310,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-red-eco-spinkick
|
||||
:id 3
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 62) (sp-item 63) (sp-item 64))
|
||||
)
|
||||
@@ -391,8 +391,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-spin-hit
|
||||
:id 4
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 65) (sp-item 66))
|
||||
)
|
||||
@@ -400,8 +400,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-punch-hit
|
||||
:id 5
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 65) (sp-item 66))
|
||||
)
|
||||
@@ -456,8 +456,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-smack-surface
|
||||
:id 6
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 68)
|
||||
(sp-item 69)
|
||||
@@ -578,8 +578,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-sand
|
||||
:id 8
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 73) (sp-item 74) (sp-item 75))
|
||||
)
|
||||
@@ -661,8 +661,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-dirt
|
||||
:id 575
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2371) (sp-item 2372) (sp-item 2370))
|
||||
)
|
||||
@@ -744,8 +744,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-snow
|
||||
:id 9
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 76) (sp-item 77) (sp-item 78))
|
||||
)
|
||||
@@ -827,8 +827,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-ice
|
||||
:id 580
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 76) (sp-item 77) (sp-item 78))
|
||||
)
|
||||
@@ -836,8 +836,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-grass
|
||||
:id 10
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 79) (sp-item 80) (sp-item 81))
|
||||
)
|
||||
@@ -920,8 +920,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-wood
|
||||
:id 11
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 82) (sp-item 83))
|
||||
)
|
||||
@@ -979,8 +979,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-crwood
|
||||
:id 12
|
||||
:duration 5
|
||||
:linger-duration 750
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 82) (sp-item 83) (sp-item 84) (sp-item 84))
|
||||
)
|
||||
@@ -988,8 +988,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-stone
|
||||
:id 13
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 85) (sp-item 86))
|
||||
)
|
||||
@@ -1047,8 +1047,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-land-poof-pcmetal
|
||||
:id 581
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2373) (sp-item 2374))
|
||||
)
|
||||
@@ -1104,8 +1104,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-stone
|
||||
:id 14
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 87))
|
||||
)
|
||||
@@ -1113,8 +1113,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-stone
|
||||
:id 15
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 87))
|
||||
)
|
||||
@@ -1142,8 +1142,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-snow
|
||||
:id 582
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2375) (sp-item 2376 :flags (is-3d)))
|
||||
)
|
||||
@@ -1151,8 +1151,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-snow
|
||||
:id 583
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2375))
|
||||
)
|
||||
@@ -1160,8 +1160,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-footprint-snow
|
||||
:id 584
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2376 :flags (is-3d)))
|
||||
)
|
||||
@@ -1207,8 +1207,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-ice
|
||||
:id 585
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2375))
|
||||
)
|
||||
@@ -1216,8 +1216,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-ice
|
||||
:id 586
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2375))
|
||||
)
|
||||
@@ -1225,8 +1225,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-crwood
|
||||
:id 16
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 89) (sp-item 89) (sp-item 84))
|
||||
)
|
||||
@@ -1234,8 +1234,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-crwood
|
||||
:id 17
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 88))
|
||||
)
|
||||
@@ -1279,8 +1279,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-wood
|
||||
:id 18
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 89))
|
||||
)
|
||||
@@ -1288,8 +1288,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-wood
|
||||
:id 19
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 89))
|
||||
)
|
||||
@@ -1317,8 +1317,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-pcmetal
|
||||
:id 587
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2377))
|
||||
)
|
||||
@@ -1326,8 +1326,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-pcmetal
|
||||
:id 588
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2377))
|
||||
)
|
||||
@@ -1355,8 +1355,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-grass
|
||||
:id 20
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 92) (sp-item 93 :flags (is-3d)))
|
||||
)
|
||||
@@ -1364,8 +1364,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-grass
|
||||
:id 21
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 92))
|
||||
)
|
||||
@@ -1373,8 +1373,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-footprint-grass
|
||||
:id 22
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 93 :flags (is-3d)))
|
||||
)
|
||||
@@ -1420,8 +1420,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-sand
|
||||
:id 23
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 88) (sp-item 94 :flags (is-3d)))
|
||||
)
|
||||
@@ -1429,8 +1429,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-sand
|
||||
:id 24
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 88))
|
||||
)
|
||||
@@ -1438,8 +1438,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-footprint-sand
|
||||
:id 25
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 94 :flags (is-3d)))
|
||||
)
|
||||
@@ -1485,8 +1485,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-run-poof-dirt
|
||||
:id 576
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2378))
|
||||
)
|
||||
@@ -1494,8 +1494,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-poof-dirt
|
||||
:id 577
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2378))
|
||||
)
|
||||
@@ -1503,8 +1503,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-just-footprint-dirt
|
||||
:id 578
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2379 :flags (is-3d)))
|
||||
)
|
||||
@@ -1655,8 +1655,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-sand
|
||||
:id 26
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 100) (sp-item 101))
|
||||
)
|
||||
@@ -1713,8 +1713,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-dirt
|
||||
:id 579
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2380) (sp-item 2381))
|
||||
)
|
||||
@@ -1771,8 +1771,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-grass
|
||||
:id 27
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 102) (sp-item 103))
|
||||
)
|
||||
@@ -1830,8 +1830,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-stone
|
||||
:id 28
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 104))
|
||||
)
|
||||
@@ -1864,8 +1864,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-pcmetal
|
||||
:id 589
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2382))
|
||||
)
|
||||
@@ -1898,8 +1898,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-snow
|
||||
:id 590
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2383))
|
||||
)
|
||||
@@ -1932,8 +1932,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-ice
|
||||
:id 591
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2383))
|
||||
)
|
||||
@@ -1941,8 +1941,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-wood
|
||||
:id 29
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 105))
|
||||
)
|
||||
@@ -1975,8 +1975,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-slide-poof-crwood
|
||||
:id 30
|
||||
:duration 5
|
||||
:linger-duration 750
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 105))
|
||||
)
|
||||
@@ -2065,7 +2065,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-eco-death
|
||||
:id 31
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
@@ -2110,8 +2110,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-lava-death
|
||||
:id 32
|
||||
:duration 75
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.25)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2003) (sp-item 2004) (sp-item 2005) (sp-item 2006))
|
||||
)
|
||||
@@ -2119,8 +2119,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-burn-death
|
||||
:id 708
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2003))
|
||||
)
|
||||
|
||||
+1
-1
@@ -458,7 +458,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-beach-harvester-rock-explosion
|
||||
:id 156
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 543 :period 1500 :length 5)
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-beach-rocks-start
|
||||
:id 553
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2340 :period 75 :length 10)
|
||||
@@ -146,7 +146,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-beach-rocks-land
|
||||
:id 555
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2342 :period 900 :length 40)
|
||||
|
||||
+2
-2
@@ -414,8 +414,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-citb-generator-break
|
||||
:id 598
|
||||
:duration 600
|
||||
:linger-duration 600
|
||||
:duration (seconds 2)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 2423 :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -185,8 +185,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-eco-pool-nasty
|
||||
:id 445
|
||||
:duration 600
|
||||
:linger-duration 600
|
||||
:duration (seconds 2)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2056 :fade-after (meters 100) :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sharkey-splash
|
||||
:id 106
|
||||
:duration 120
|
||||
:linger-duration 780
|
||||
:duration (seconds 0.4)
|
||||
:linger-duration (seconds 2.6)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-green-eco-lurker-death
|
||||
:id 643
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2585 :fade-after (meters 100) :period 600 :length 5 :binding 2583)
|
||||
|
||||
+13
-13
@@ -592,7 +592,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-darkecobomb-glow
|
||||
:id 639
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2753)
|
||||
@@ -694,7 +694,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-darkecobomb-tick
|
||||
:id 663
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2756) (sp-item 2757) (sp-item 2758) (sp-item 2759))
|
||||
@@ -1123,7 +1123,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-greenshot
|
||||
:id 664
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2769 :binding 2766)
|
||||
@@ -1293,7 +1293,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-redshot-charge
|
||||
:id 646
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2699) (sp-item 2700) (sp-item 2701))
|
||||
)
|
||||
@@ -1472,7 +1472,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-redshot-body
|
||||
:id 665
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2709) (sp-item 2710) (sp-item 2711))
|
||||
@@ -1539,7 +1539,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-redshot-warning
|
||||
:id 647
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2712) (sp-item 2713) (sp-item 2714 :period 45 :length 5))
|
||||
@@ -1644,7 +1644,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-redshot-test
|
||||
:id 679
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2772))
|
||||
@@ -1996,7 +1996,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-yellowshot-charge
|
||||
:id 651
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2811) (sp-item 2812) (sp-item 2813))
|
||||
@@ -2074,7 +2074,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-yellowshot
|
||||
:id 652
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2815) (sp-item 2816) (sp-item 2817) (sp-item 2818) (sp-item 2819))
|
||||
@@ -3222,7 +3222,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-blue-claw-glow
|
||||
:id 674
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2324))
|
||||
@@ -3231,7 +3231,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-green-claw-glow
|
||||
:id 675
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2324))
|
||||
@@ -3240,7 +3240,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-red-claw-glow
|
||||
:id 676
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2324))
|
||||
@@ -3249,7 +3249,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-yellow-claw-glow
|
||||
:id 677
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2324))
|
||||
|
||||
+8
-8
@@ -135,7 +135,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-target-white-eco-ground
|
||||
:id 699
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2921)
|
||||
@@ -294,7 +294,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-target-white-eco-joints
|
||||
:id 700
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2929) (sp-item 2930))
|
||||
@@ -430,7 +430,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-target-white-eco-hand-glow
|
||||
:id 701
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2892))
|
||||
@@ -463,7 +463,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-target-white-eco-hand-shot
|
||||
:id 702
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2893) (sp-item 2935))
|
||||
@@ -514,7 +514,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-joints
|
||||
:id 703
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2936 :period 36 :length 5)
|
||||
@@ -601,7 +601,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-explode
|
||||
:id 696
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2939 :period 1200 :length 20 :binding 2938)
|
||||
@@ -832,7 +832,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-robotboss-splash
|
||||
:id 704
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2949) (sp-item 2950))
|
||||
@@ -897,7 +897,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-bigdoor-open
|
||||
:id 698
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2952 :flags (is-3d))
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-balloon
|
||||
:id 227
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 1006) (sp-item 1007) (sp-item 1008))
|
||||
)
|
||||
@@ -429,7 +429,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-cluster-explosion
|
||||
:id 228
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2100 :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -71,8 +71,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-flut-attack-strike-ground
|
||||
:id 121
|
||||
:duration 10
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 749) (sp-item 750))
|
||||
)
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-darkvine-puffs
|
||||
:id 175
|
||||
:duration 150
|
||||
:duration (seconds 0.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 2 0 3)
|
||||
:parts ((sp-item 800) (sp-item 801) (sp-item 802))
|
||||
|
||||
+6
-6
@@ -37,8 +37,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-bad-fish
|
||||
:id 177
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 828) (sp-item 2013))
|
||||
@@ -92,8 +92,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-normal-fish
|
||||
:id 178
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2001))
|
||||
@@ -121,8 +121,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-fish-collect
|
||||
:id 179
|
||||
:duration 5
|
||||
:linger-duration 1200
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 4)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 830) (sp-item 831))
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-jungle-blue-eco-room-activate
|
||||
:id 190
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:bounds (static-bspherem 0 -6 0 8)
|
||||
:parts ((sp-item 903) (sp-item 903) (sp-item 904 :flags (bit1) :period 1200 :length 15))
|
||||
)
|
||||
|
||||
+1
-1
@@ -1283,7 +1283,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-lavaballoon
|
||||
:id 543
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 1987) (sp-item 1988) (sp-item 1989))
|
||||
)
|
||||
|
||||
+3
-3
@@ -86,7 +86,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-crystal-gnd-explode
|
||||
:id 322
|
||||
:duration 75
|
||||
:duration (seconds 0.25)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 2153 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
@@ -278,8 +278,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-crystal-water-explode
|
||||
:id 323
|
||||
:duration 75
|
||||
:linger-duration 12000
|
||||
:duration (seconds 0.25)
|
||||
:linger-duration (seconds 40)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 2159 :period 600 :length 5)
|
||||
|
||||
+4
-4
@@ -72,8 +72,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-spider-egg-hatches
|
||||
:id 324
|
||||
:duration 5
|
||||
:linger-duration 900
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2018 :fade-after (meters 50) :falloff-to (meters 50))
|
||||
@@ -146,8 +146,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-spider-egg-explodes
|
||||
:id 325
|
||||
:duration 5
|
||||
:linger-duration 375
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.25)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2074 :fade-after (meters 50) :falloff-to (meters 50)))
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-mother-spider-proj-fly
|
||||
:id 326
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 718 :flags (launch-asap) :binding 716)
|
||||
(sp-item 716 :flags (start-dead) :binding 717)
|
||||
@@ -153,7 +153,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-mother-spider-proj-hit
|
||||
:id 327
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 722) (sp-item 723) (sp-item 724))
|
||||
@@ -232,7 +232,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-mother-spider-proj-die
|
||||
:id 328
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 722))
|
||||
|
||||
+3
-3
@@ -6,8 +6,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-balloonlurker-pilot-death
|
||||
:id 203
|
||||
:duration 5
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2015))
|
||||
@@ -34,7 +34,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-balloonlurker-mine-explosion
|
||||
:id 204
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 964 :period 1200 :length 30)
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-keg-bounce
|
||||
:id 197
|
||||
:duration 10
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.035)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2014 :fade-after (meters 100) :falloff-to (meters 100)))
|
||||
|
||||
+4
-4
@@ -158,7 +158,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-misty-bone-01
|
||||
:id 192
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 24)
|
||||
:parts ((sp-item 914 :period 780 :length 15)
|
||||
@@ -404,7 +404,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-misty-bone-03
|
||||
:id 193
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 24)
|
||||
:parts ((sp-item 914 :period 780 :length 15)
|
||||
@@ -586,7 +586,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-misty-bone-02
|
||||
:id 194
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 24)
|
||||
:parts ((sp-item 914 :period 780 :length 15)
|
||||
@@ -768,7 +768,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-misty-bone-07
|
||||
:id 195
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 24)
|
||||
:parts ((sp-item 914 :period 780 :length 15)
|
||||
|
||||
+4
-4
@@ -134,7 +134,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-quicksandlurker-pre-missile
|
||||
:id 199
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 2483))
|
||||
)
|
||||
@@ -170,7 +170,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-quicksandlurker-missile-impact
|
||||
:id 200
|
||||
:duration 10
|
||||
:duration (seconds 0.035)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 2484) (sp-item 2485) (sp-item 2486))
|
||||
)
|
||||
@@ -248,7 +248,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-quicksandlurker-hide
|
||||
:id 201
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
@@ -273,7 +273,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-quicksandlurker-popup
|
||||
:id 202
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 -12 0 14)
|
||||
:parts ((sp-item 124 :flags (is-3d) :period 900 :length 63)
|
||||
|
||||
+6
-6
@@ -180,7 +180,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-evilsib-appear
|
||||
:id 557
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2345 :period 1500 :length 20 :offset 1500)
|
||||
@@ -849,7 +849,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceC-glowing-can
|
||||
:id 560
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2298))
|
||||
@@ -880,7 +880,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceC-exploding-can
|
||||
:id 561
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2785 :period 1800 :length 5)
|
||||
@@ -1070,7 +1070,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceC-dark-splash
|
||||
:id 562
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 295 :fade-after (meters 100) :period 600 :length 5 :binding 296)
|
||||
@@ -1115,8 +1115,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceC-blow-dust
|
||||
:id 681
|
||||
:duration 5
|
||||
:linger-duration 900
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2790))
|
||||
|
||||
+2
-2
@@ -172,7 +172,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-tntbarrel-explosion
|
||||
:id 474
|
||||
:duration 600
|
||||
:duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2079 :period 600 :length 5)
|
||||
@@ -1566,7 +1566,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-shortcut-boulder-explosion
|
||||
:id 475
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2149 :period 1500 :length 5)
|
||||
|
||||
+11
-11
@@ -4,8 +4,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboss-column-break
|
||||
:id 464
|
||||
:duration 1500
|
||||
:linger-duration 3000
|
||||
:duration (seconds 5)
|
||||
:linger-duration (seconds 10)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2193 :period 1500 :length 5)
|
||||
@@ -144,8 +144,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboss-lava-splash
|
||||
:id 465
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2023))
|
||||
@@ -174,8 +174,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogre-bridge-splash
|
||||
:id 466
|
||||
:duration 75
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.25)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2108) (sp-item 2109) (sp-item 2110) (sp-item 2111))
|
||||
@@ -297,8 +297,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboss-boulder-grow
|
||||
:id 468
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 12)
|
||||
:parts ((sp-item 2201) (sp-item 2202) (sp-item 2203) (sp-item 2204))
|
||||
@@ -459,8 +459,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboss-pre-missile
|
||||
:id 470
|
||||
:duration 150
|
||||
:linger-duration 600
|
||||
:duration (seconds 0.5)
|
||||
:linger-duration (seconds 2)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 2079 :period 600 :length 5)
|
||||
@@ -506,7 +506,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboss-missile-impact
|
||||
:id 471
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 2079 :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -1000,8 +1000,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-racer-explode
|
||||
:id 116
|
||||
:duration 300
|
||||
:linger-duration 3000
|
||||
:duration (seconds 1)
|
||||
:linger-duration (seconds 10)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 2279 :period 600 :length 5)
|
||||
|
||||
+1
-1
@@ -1103,7 +1103,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-peeper
|
||||
:id 456
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 1768) (sp-item 1769 :period 120 :length 30) (sp-item 1770 :period 120 :length 60))
|
||||
)
|
||||
|
||||
+1
-1
@@ -517,7 +517,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-dark-plant
|
||||
:id 455
|
||||
:duration 42
|
||||
:duration (seconds 0.14)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 15)
|
||||
:parts ((sp-item 1764) (sp-item 2356))
|
||||
|
||||
+10
-10
@@ -46,7 +46,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-ring
|
||||
:id 457
|
||||
:linger-duration 0
|
||||
:linger-duration (seconds 0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1773 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 1774 :fade-after (meters 80))
|
||||
@@ -137,8 +137,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-spawn-ring
|
||||
:id 458
|
||||
:duration 5
|
||||
:linger-duration 141
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.47)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1777 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 1778 :flags (is-3d))
|
||||
@@ -249,8 +249,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-explode-ring
|
||||
:id 459
|
||||
:duration 5
|
||||
:linger-duration 150
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.5)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1783 :fade-after (meters 100) :falloff-to (meters 100)) (sp-item 1784 :flags (is-3d)))
|
||||
)
|
||||
@@ -320,7 +320,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-ring-blue
|
||||
:id 460
|
||||
:linger-duration 0
|
||||
:linger-duration (seconds 0)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1785 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 1786 :fade-after (meters 80))
|
||||
@@ -411,8 +411,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-spawn-ring-blue
|
||||
:id 461
|
||||
:duration 5
|
||||
:linger-duration 141
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.47)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1789 :fade-after (meters 100) :falloff-to (meters 100))
|
||||
(sp-item 1790 :flags (is-3d))
|
||||
@@ -523,8 +523,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rolling-explode-ring-blue
|
||||
:id 462
|
||||
:duration 5
|
||||
:linger-duration 150
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 0.5)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1795 :fade-after (meters 100) :falloff-to (meters 100)) (sp-item 1796 :flags (is-3d)))
|
||||
)
|
||||
|
||||
+2
-2
@@ -235,8 +235,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ice-cube-foot-puff
|
||||
:id 567
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2325) (sp-item 2326) (sp-item 2327))
|
||||
)
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-snow-yellow-eco-room-activate
|
||||
:id 511
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:bounds (static-bspherem 0 -6 0 8)
|
||||
:parts ((sp-item 1994) (sp-item 1994) (sp-item 1995 :flags (bit1) :period 1200 :length 15))
|
||||
)
|
||||
|
||||
+5
-5
@@ -291,7 +291,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ram-boss-proj-fly
|
||||
:id 522
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 1910 :flags (launch-asap) :binding 1908)
|
||||
(sp-item 1908 :flags (start-dead) :binding 1909)
|
||||
@@ -420,7 +420,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ram-boss-proj-hit
|
||||
:id 523
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1914) (sp-item 1915) (sp-item 1916))
|
||||
@@ -497,7 +497,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ram-boss-proj-die
|
||||
:id 524
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1914))
|
||||
@@ -849,8 +849,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ram-boss-foot-puff
|
||||
:id 574
|
||||
:duration 5
|
||||
:linger-duration 450
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 1.5)
|
||||
:bounds (static-bspherem 0 0 0 2)
|
||||
:parts ((sp-item 2367) (sp-item 2368) (sp-item 2369))
|
||||
)
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-exit-chamber-ripples
|
||||
:id 620
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2512 :flags (is-3d)))
|
||||
|
||||
+1
-1
@@ -327,7 +327,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-kermit-pulse-impact
|
||||
:id 301
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:bounds (static-bspherem 0 0 0 3)
|
||||
:parts ((sp-item 1371) (sp-item 1372))
|
||||
)
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-spike-up
|
||||
:id 289
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1325 :fade-after (meters 120) :falloff-to (meters 120))
|
||||
@@ -106,7 +106,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-spike-down
|
||||
:id 290
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1325 :fade-after (meters 120) :falloff-to (meters 120))
|
||||
@@ -578,7 +578,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-rock-explosion
|
||||
:id 291
|
||||
:duration 300
|
||||
:duration (seconds 1)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 1330 :period 1500 :length 5)
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-rat-nest-a-explosion
|
||||
:id 292
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 1334) (sp-item 1335) (sp-item 1336) (sp-item 1337) (sp-item 1338) (sp-item 1339))
|
||||
@@ -15,7 +15,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-rat-nest-b-explosion
|
||||
:id 293
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 1342) (sp-item 1339) (sp-item 1337) (sp-item 1334))
|
||||
@@ -24,7 +24,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-swamp-rat-nest-c-explosion
|
||||
:id 294
|
||||
:duration 5
|
||||
:duration (seconds 0.017)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 6)
|
||||
:parts ((sp-item 1335) (sp-item 1339) (sp-item 1337) (sp-item 1334))
|
||||
|
||||
+3
-3
@@ -472,7 +472,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-scarecrow-explode
|
||||
:id 143
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2912) (sp-item 2913) (sp-item 2914) (sp-item 2915) (sp-item 2916))
|
||||
)
|
||||
@@ -630,7 +630,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-scarecrow-joint-explode
|
||||
:id 144
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2912))
|
||||
)
|
||||
@@ -638,7 +638,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-scarecrow-hit
|
||||
:id 145
|
||||
:duration 15
|
||||
:duration (seconds 0.05)
|
||||
:bounds (static-bspherem 0 0 0 1)
|
||||
:parts ((sp-item 2913))
|
||||
)
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceAV-splash
|
||||
:id 686
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2854 :period 900 :length 600))
|
||||
@@ -37,8 +37,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sequenceAV-spit
|
||||
:id 687
|
||||
:duration 5
|
||||
:linger-duration 900
|
||||
:duration (seconds 0.017)
|
||||
:linger-duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2855))
|
||||
|
||||
+2
-2
@@ -1035,7 +1035,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-levitator-on-big
|
||||
:id 660
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2751 :fade-after (meters 100) :falloff-to (meters 100) :binding 2750)
|
||||
@@ -1183,7 +1183,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-levitator-on-small
|
||||
:id 661
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2679))
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-tetherrock-explode
|
||||
:id 285
|
||||
:duration 150
|
||||
:duration (seconds 0.5)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 2065 :period 600 :length 5)
|
||||
|
||||
+2
-2
@@ -1212,7 +1212,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboulder-hit-wall
|
||||
:id 551
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2287 :period 900 :length 40))
|
||||
@@ -1240,7 +1240,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-ogreboulder-splash
|
||||
:id 552
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 64)
|
||||
:parts ((sp-item 2288 :period 900 :length 20)
|
||||
|
||||
+2
-2
@@ -621,7 +621,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-village2-fireboulder
|
||||
:id 271
|
||||
:duration 18000
|
||||
:duration (seconds 60)
|
||||
:bounds (static-bspherem 0 4 0 10.5)
|
||||
:parts ((sp-item 1153 :fade-after (meters 200) :falloff-to (meters 240))
|
||||
(sp-item 1154 :fade-after (meters 100) :falloff-to (meters 120) :period 300 :length 60)
|
||||
@@ -1970,7 +1970,7 @@
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-village2-fireboulder-hover
|
||||
:id 678
|
||||
:duration 900
|
||||
:duration (seconds 3)
|
||||
:flags (use-local-clock)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 2792 :fade-after (meters 100) :falloff-to (meters 100) :binding 2791)
|
||||
|
||||
+177
@@ -966,3 +966,180 @@
|
||||
:mask (sound-mask ,@snd-mask)
|
||||
))
|
||||
)
|
||||
|
||||
(defmacro sp-item (launcher
|
||||
&key (fade-after 0.0)
|
||||
&key (falloff-to 0.0)
|
||||
&key (flags ())
|
||||
&key (period 0)
|
||||
&key (length 0)
|
||||
&key (offset 0)
|
||||
&key (hour-mask 0)
|
||||
&key (binding 0)
|
||||
)
|
||||
`(new 'static 'sparticle-group-item
|
||||
:launcher ,launcher
|
||||
:fade-after ,fade-after
|
||||
:falloff-to ,falloff-to
|
||||
:flags (sp-group-item-flag ,@flags)
|
||||
:period ,period
|
||||
:length ,length
|
||||
:offset ,offset
|
||||
:hour-mask ,hour-mask
|
||||
:binding ,binding
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro defpartgroup (name &key id &key parts &key (duration 3000) &key (linger-duration 1500) &key (flags ()) &key bounds
|
||||
&key (rotate (0.0 0.0 0.0)) &key (scale (1.0 1.0 1.0)))
|
||||
"define a new part group. defines a constant with the name of the group with the ID as its value"
|
||||
`(begin
|
||||
(defconstant ,name ,id)
|
||||
(set! (-> *part-group-id-table* ,id)
|
||||
(new 'static 'sparticle-launch-group
|
||||
:duration ,duration
|
||||
:linger-duration ,linger-duration
|
||||
:flags (sp-group-flag ,@flags)
|
||||
:bounds ,bounds
|
||||
:name ,(symbol->string name)
|
||||
:length ,(length parts)
|
||||
:launcher (new 'static 'inline-array sparticle-group-item ,(length parts) ,@parts)
|
||||
:rotate-x ,(car rotate)
|
||||
:rotate-y ,(cadr rotate)
|
||||
:rotate-z ,(caddr rotate)
|
||||
:scale-x ,(car scale)
|
||||
:scale-y ,(cadr scale)
|
||||
:scale-z ,(caddr scale)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro defpart (id &key (init-specs ()))
|
||||
"define a new sparticle-launcher"
|
||||
`(set! (-> *part-id-table* ,id)
|
||||
(new 'static 'sparticle-launcher
|
||||
:init-specs (new 'static 'inline-array sp-field-init-spec ,(1+ (length init-specs))
|
||||
,@init-specs
|
||||
(sp-end)
|
||||
)))
|
||||
)
|
||||
|
||||
(defmacro sp-tex (field-name tex-id)
|
||||
`(new 'static 'sp-field-init-spec :field (sp-field-id ,field-name) :tex ,tex-id)
|
||||
)
|
||||
|
||||
(defmacro sp-rnd-flt (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-rangef ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag float-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-flt (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-rangef 0.0
|
||||
:random-multf 1.0
|
||||
:flags (sp-flag float-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-int (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range 0
|
||||
:random-mult 1
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-int-plain-rnd (field-name val range mult)
|
||||
"For when we use plain integer, but set the randoms."
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range ,range
|
||||
:random-mult ,mult
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-rnd-int (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:random-range ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag int-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro sp-rnd-int-flt (field-name val range mult)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-valuef ,val
|
||||
:random-range ,range
|
||||
:random-multf ,mult
|
||||
:flags (sp-flag int-with-rand)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-cpuinfo-flags (&rest flags)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-flags)
|
||||
:initial-value (sp-cpuinfo-flag ,@flags)
|
||||
:random-mult 1
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-launcher-by-id (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,val
|
||||
:flags (sp-flag part-by-id)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-func (field-name val)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:sym ,val
|
||||
:flags (sp-flag from-pointer)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-sound (sound)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-sound)
|
||||
:sound ,sound
|
||||
:flags (sp-flag plain-v2)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-end ()
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-end)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro sp-copy-from-other (field-name offset)
|
||||
`(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id ,field-name)
|
||||
:initial-value ,offset
|
||||
:random-mult 1
|
||||
:flags (sp-flag copy-from-other-field)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro static-spherem (x y z r)
|
||||
"actually makes a vector. use bspherem for sphere."
|
||||
`(new 'static 'vector :x (meters ,x) :y (meters ,y) :z (meters ,z) :w (meters ,r))
|
||||
)
|
||||
(defmacro static-bspherem (x y z r)
|
||||
`(new 'static 'sphere :x (meters ,x) :y (meters ,y) :z (meters ,z) :w (meters ,r))
|
||||
)
|
||||
|
||||
+2137
File diff suppressed because it is too large
Load Diff
+136
@@ -0,0 +1,136 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
(when *debug-segment*
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-part-tester
|
||||
:id 127
|
||||
:flags (unk-4 unk-6)
|
||||
:bounds (static-bspherem 0 0 0 640)
|
||||
:rotate ((degrees 2) (degrees 0) (degrees 0))
|
||||
:parts ((sp-item 209))
|
||||
)
|
||||
|
||||
;; definition of type part-tester
|
||||
(deftype part-tester (process)
|
||||
((root trsqv :offset-assert 128)
|
||||
(part sparticle-launch-control :offset-assert 132)
|
||||
(old-group sparticle-launch-group :offset-assert 136)
|
||||
)
|
||||
:heap-base #x10
|
||||
:method-count-assert 14
|
||||
:size-assert #x8c
|
||||
:flag-assert #xe0010008c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type part-tester
|
||||
(defmethod inspect part-tester ((obj part-tester))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(format #t "~2Troot: ~A~%" (-> obj root))
|
||||
(format #t "~2Tpart: ~A~%" (-> obj part))
|
||||
(format #t "~2Told-group: ~A~%" (-> obj old-group))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *part-tester-name*, type string
|
||||
(define *part-tester-name* (the-as string #f))
|
||||
|
||||
;; definition for method 10 of type part-tester
|
||||
(defmethod deactivate part-tester ((obj part-tester))
|
||||
(if (nonzero? (-> obj part))
|
||||
(kill-and-free-particles (-> obj part))
|
||||
)
|
||||
((method-of-type process deactivate) obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate part-tester-idle (part-tester)
|
||||
:code (behavior ()
|
||||
(until #f
|
||||
(let ((gp-0 (entity-by-name *part-tester-name*)))
|
||||
(when gp-0
|
||||
(let ((s5-0 (-> gp-0 extra process)))
|
||||
(if (and s5-0 (type? s5-0 process-drawable) (nonzero? (-> (the-as process-drawable s5-0) root)))
|
||||
(set! (-> self root trans quad) (-> (the-as process-drawable s5-0) root trans quad))
|
||||
(set! (-> self root trans quad) (-> gp-0 extra trans quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(add-debug-x
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> self root trans)
|
||||
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
||||
)
|
||||
(let ((gp-1 (-> *part-group-id-table* 127)))
|
||||
(let ((s5-1 (-> self root trans)))
|
||||
(when (!= gp-1 (-> self old-group))
|
||||
(when (nonzero? (-> self part))
|
||||
(kill-and-free-particles (-> self part))
|
||||
(set! (-> self heap-cur) (&-> (-> self part) type))
|
||||
)
|
||||
(set! (-> self part) (create-launch-control gp-1 self))
|
||||
)
|
||||
(if (nonzero? (-> self part))
|
||||
(spawn (-> self part) (cond
|
||||
((logtest? (-> gp-1 flags) (sp-group-flag screen-space))
|
||||
*zero-vector*
|
||||
)
|
||||
(else
|
||||
(empty)
|
||||
s5-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self old-group) gp-1)
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
#f
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function part-tester-init-by-other
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defbehavior part-tester-init-by-other process-drawable ((arg0 vector))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(set! *part-tester* (process->ppointer self))
|
||||
(go part-tester-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition (perm) for symbol *debug-part-dead-pool*, type dead-pool
|
||||
(define-perm *debug-part-dead-pool* dead-pool (new 'debug 'dead-pool 1 #x10000 "*debug-part-dead-pool*"))
|
||||
|
||||
;; definition for function start-part
|
||||
;; WARN: Return type mismatch (pointer process) vs none.
|
||||
(defun start-part ()
|
||||
(kill-by-type part-tester *active-pool*)
|
||||
(process-spawn
|
||||
part-tester
|
||||
(if *anim-tester*
|
||||
(-> *anim-tester* 0 root trans)
|
||||
(target-pos 0)
|
||||
)
|
||||
:from *debug-part-dead-pool*
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
)
|
||||
+10
-14
@@ -43,10 +43,10 @@
|
||||
)
|
||||
)
|
||||
(when (and (-> *setting-control* user-current weather) gp-0)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(v1-8 (-> *math-camera* inv-camera-rot vector 2))
|
||||
)
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let ((v1-8 (-> *math-camera* inv-camera-rot vector 2)))
|
||||
(set! (-> s5-0 quad) (-> *math-camera* trans quad))
|
||||
(vector-! s4-0 s5-0 (-> *math-camera* prev-trans))
|
||||
(let ((f0-1 (vector-dot s4-0 v1-8)))
|
||||
@@ -54,13 +54,13 @@
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 y) (-> *math-camera* trans y))
|
||||
(if (< 0.0 (-> *setting-control* user-current rain))
|
||||
(update-rain (-> *setting-control* user-current rain) s5-0 s4-0)
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current snow))
|
||||
(update-snow (-> *setting-control* user-current snow) s5-0 s4-0)
|
||||
)
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current rain))
|
||||
(update-rain (the-as target (-> *setting-control* user-current rain)))
|
||||
)
|
||||
(if (< 0.0 (-> *setting-control* user-current snow))
|
||||
(update-snow (the-as target (-> *setting-control* user-current snow)))
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (>= (-> self time-of-day) 6.25)
|
||||
@@ -691,7 +691,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(start-time-of-day)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+963
@@ -0,0 +1,963 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-rain-screend-drop-real
|
||||
:id 1
|
||||
:flags (screen-space)
|
||||
:bounds (static-bspherem 0 0 0 16)
|
||||
:parts ((sp-item 45 :binding 41)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 41 :flags (start-dead launch-asap) :binding 42)
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 42 :flags (start-dead launch-asap))
|
||||
(sp-item 46 :binding 43)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 43 :flags (start-dead launch-asap) :binding 44)
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
(sp-item 44 :flags (start-dead launch-asap))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol group-rain-screend-drop, type sparticle-launch-group
|
||||
(define group-rain-screend-drop (-> *part-group-id-table* 1))
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 46
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -4.5) (meters 9) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -3) (meters 6) 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.5))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 128.0)
|
||||
(sp-flt spt-a 12.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.16666667))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.8)
|
||||
(sp-int spt-timer 10)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 43
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1.5))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 20.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.033333335))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.8)
|
||||
(sp-flt spt-accel-y -2.7306666)
|
||||
(sp-int spt-timer 270)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-int spt-next-time 15)
|
||||
(sp-launcher-by-id spt-next-launcher 47)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 47
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.004166667))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.06666667)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 44
|
||||
:init-specs ((sp-flt spt-num 1.0)
|
||||
(sp-int spt-rot-x 12)
|
||||
(sp-flt spt-r 4096.0)
|
||||
(sp-flt spt-g 3276.8)
|
||||
(sp-flt spt-b 3276.8)
|
||||
(sp-flt spt-fade-r 6.068148)
|
||||
(sp-flt spt-fade-g 68.26667)
|
||||
(sp-flt spt-fade-b 3.034074)
|
||||
(sp-flt spt-accel-y -2.7306666)
|
||||
(sp-int spt-timer 270)
|
||||
(sp-cpuinfo-flags distort)
|
||||
(sp-int spt-next-time 30)
|
||||
(sp-launcher-by-id spt-next-launcher 48)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 48
|
||||
:init-specs ((sp-flt spt-fade-g -5.1200004))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 45
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x29 :page #xc))
|
||||
(sp-flt spt-num 0.1)
|
||||
(sp-rnd-flt spt-x (meters -4.5) (meters 9) 1.0)
|
||||
(sp-rnd-flt spt-y (meters -3) (meters 6) 1.0)
|
||||
(sp-flt spt-scale-x (meters 4))
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 128.0)
|
||||
(sp-flt spt-a 12.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.26666668))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.8)
|
||||
(sp-int spt-timer 10)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 41
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.6))
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 20.0)
|
||||
(sp-flt spt-scalevel-x (meters 0.06666667))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.8)
|
||||
(sp-flt spt-accel-y -2.7306666)
|
||||
(sp-int spt-timer 270)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-int spt-next-time 15)
|
||||
(sp-launcher-by-id spt-next-launcher 49)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 49
|
||||
:init-specs ((sp-flt spt-scalevel-x (meters 0.008333334))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -0.06666667)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 42
|
||||
:init-specs ((sp-flt spt-num 1.0)
|
||||
(sp-int spt-rot-x 24)
|
||||
(sp-flt spt-r 12288.0)
|
||||
(sp-flt spt-g 6553.6)
|
||||
(sp-flt spt-b 6553.6)
|
||||
(sp-flt spt-fade-r 12.136296)
|
||||
(sp-flt spt-fade-g 136.53334)
|
||||
(sp-flt spt-fade-b 6.068148)
|
||||
(sp-flt spt-accel-y -2.7306666)
|
||||
(sp-int spt-timer 270)
|
||||
(sp-cpuinfo-flags distort)
|
||||
(sp-int spt-next-time 30)
|
||||
(sp-launcher-by-id spt-next-launcher 50)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 50
|
||||
:init-specs ((sp-flt spt-fade-g -10.240001))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-stars
|
||||
:id 2
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 8)
|
||||
:parts ((sp-item 51 :flags (bit6)) (sp-item 52 :flags (bit6)) (sp-item 53 :flags (bit6)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 51
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 30) (meters 20) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 256.0)
|
||||
(sp-flt spt-g 256.0)
|
||||
(sp-flt spt-b 256.0)
|
||||
(sp-flt spt-a 0.0)
|
||||
(sp-flt spt-fade-a 0.42666668)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-int-plain-rnd spt-next-time 60 239 1)
|
||||
(sp-launcher-by-id spt-next-launcher 54)
|
||||
(sp-rnd-flt spt-conerot-x (degrees -89.0) (degrees 178.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 1440.0) 1.0)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
(sp-flt spt-conerot-radius (meters 5000))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 54
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 29999700) (sp-launcher-by-id spt-next-launcher 55))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 55
|
||||
:init-specs ((sp-flt spt-fade-a -0.42666668))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 52
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 30) (meters 20) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 256.0)
|
||||
(sp-flt spt-g 256.0)
|
||||
(sp-flt spt-b 256.0)
|
||||
(sp-flt spt-a 0.0)
|
||||
(sp-flt spt-fade-a 0.42666668)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-int-plain-rnd spt-next-time 60 239 1)
|
||||
(sp-launcher-by-id spt-next-launcher 54)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 30.0) (degrees 59.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 2880.0) 1.0)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
(sp-flt spt-conerot-radius (meters 5000))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 53
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 30) (meters 20) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 128.0)
|
||||
(sp-flt spt-g 128.0)
|
||||
(sp-flt spt-b 128.0)
|
||||
(sp-flt spt-a 0.0)
|
||||
(sp-flt spt-fade-a 0.42666668)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-int-plain-rnd spt-next-time 60 239 1)
|
||||
(sp-launcher-by-id spt-next-launcher 54)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 60.0) (degrees 29.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 5760.0) 1.0)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
(sp-flt spt-conerot-radius (meters 5000))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 56
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-x (meters 10) (meters 10) 1.0)
|
||||
(sp-rnd-flt spt-y (meters 2) (meters 14) 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 255.0)
|
||||
(sp-flt spt-g 255.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 0.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.01) (meters -0.0033333334) 1.0)
|
||||
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
|
||||
(sp-flt spt-fade-a 0.85333335)
|
||||
(sp-int spt-timer 1500)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12 sp-cpuinfo-flag-14)
|
||||
(sp-int-plain-rnd spt-next-time 75 74 1)
|
||||
(sp-launcher-by-id spt-next-launcher 57)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 180.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 58
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-flt spt-num 0.0)
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 20) 1.0)
|
||||
(sp-flt spt-y (meters 16))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.2) (meters 0.1) 1.0)
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 255.0)
|
||||
(sp-flt spt-g 255.0)
|
||||
(sp-flt spt-b 255.0)
|
||||
(sp-flt spt-a 0.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.01) (meters -0.0033333334) 1.0)
|
||||
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
|
||||
(sp-flt spt-fade-a 0.85333335)
|
||||
(sp-int spt-timer 1500)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-12 sp-cpuinfo-flag-14)
|
||||
(sp-int-plain-rnd spt-next-time 75 74 1)
|
||||
(sp-launcher-by-id spt-next-launcher 57)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 360.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 57
|
||||
:init-specs ((sp-flt spt-fade-a 0.0) (sp-int spt-next-time 1200) (sp-launcher-by-id spt-next-launcher 59))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 59
|
||||
:init-specs ((sp-flt spt-fade-a -0.85333335))
|
||||
)
|
||||
|
||||
;; definition for function update-snow
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-snow ((arg0 float) (arg1 vector) (arg2 vector))
|
||||
(let ((f0-0 (lerp-scale 0.0 1.0 (vector-length arg2) 2048.0 40960.0)))
|
||||
(set! (-> *part-id-table* 58 init-specs 1 initial-valuef) (- 1.0 f0-0))
|
||||
(set! (-> *part-id-table* 56 init-specs 1 initial-valuef) (* 4.0 f0-0))
|
||||
)
|
||||
(set! (-> *part-id-table* 56 init-specs 19 initial-valuef) (+ 32768.0 (vector-y-angle arg2)))
|
||||
(let ((t9-2 sp-launch-particles-var)
|
||||
(a0-3 *sp-particle-system-2d*)
|
||||
(a1-2 (-> *part-id-table* 58))
|
||||
(a2-2 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-2 trans quad) (-> arg1 quad))
|
||||
(t9-2 a0-3 a1-2 a2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(let ((t9-3 sp-launch-particles-var)
|
||||
(a0-4 *sp-particle-system-2d*)
|
||||
(a1-3 (-> *part-id-table* 56))
|
||||
(a2-3 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-3 trans quad) (-> arg1 quad))
|
||||
(t9-3 a0-4 a1-3 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 60
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
|
||||
(sp-func spt-birth-func 'birth-func-rain)
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-rnd-flt spt-x (meters -20) (meters 40) 1.0)
|
||||
(sp-flt spt-y (meters 30))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.03) (meters 0.03) 1.0)
|
||||
(sp-rnd-flt spt-scale-y (meters 0.5) (meters 0.5) 1.0)
|
||||
(sp-rnd-flt spt-r 32.0 32.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-rnd-flt spt-b 64.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-a 32.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.1) (meters -0.2) 1.0)
|
||||
(sp-int spt-timer 900)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-flt spt-userdata 0.0)
|
||||
(sp-func spt-func 'check-drop-level-rain)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 61
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
|
||||
(sp-func spt-birth-func 'birth-func-rain)
|
||||
(sp-flt spt-num 4.0)
|
||||
(sp-rnd-flt spt-x (meters -20) (meters 40) 1.0)
|
||||
(sp-flt spt-y (meters 30))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.03) (meters 0.03) 1.0)
|
||||
(sp-rnd-flt spt-scale-y (meters 0.5) (meters 0.5) 1.0)
|
||||
(sp-rnd-flt spt-r 32.0 32.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-rnd-flt spt-b 64.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-a 32.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters -0.06666667) (meters -0.033333335) 1.0)
|
||||
(sp-int spt-timer 900)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(sp-flt spt-userdata 0.0)
|
||||
(sp-func spt-func 'check-drop-level-rain2)
|
||||
(sp-rnd-flt spt-rotate-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 62
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x21 :page #xc))
|
||||
(sp-rnd-flt spt-num 1.0 3.0 1.0)
|
||||
(sp-rnd-flt spt-scale-x (meters 0.08) (meters 0.03) 1.0)
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 32.0 32.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-rnd-flt spt-b 64.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-a 64.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-omega 2.8672 1.6384 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters 0.033333335) (meters 0.06666667) 1.0)
|
||||
(sp-rnd-flt spt-fade-a -0.21333334 -0.21333334 1.0)
|
||||
(sp-rnd-flt spt-accel-y -20.48 -2.7306666 1.0)
|
||||
(sp-flt spt-friction 0.98)
|
||||
(sp-int spt-timer 300)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 use-global-acc)
|
||||
(sp-flt spt-userdata 0.0)
|
||||
(sp-func spt-func 'check-drop-level-splash)
|
||||
(sp-int-plain-rnd spt-next-time 0 99 1)
|
||||
(sp-launcher-by-id spt-next-launcher 63)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 50.000004) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
(sp-flt spt-rotate-x (degrees 0.0))
|
||||
(sp-flt spt-rotate-y (degrees 0.0))
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 64
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xc9 :page #xc))
|
||||
(sp-func spt-birth-func 'birth-func-omega-normal-orient)
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-y (meters 0.2))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-rnd-flt spt-r 32.0 32.0 1.0)
|
||||
(sp-copy-from-other spt-g -1)
|
||||
(sp-rnd-flt spt-b 64.0 32.0 1.0)
|
||||
(sp-rnd-flt spt-a 64.0 32.0 1.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-rnd-flt spt-scalevel-x (meters 0.006666667) (meters 0.006666667) 1.0)
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-a -1.2)
|
||||
(sp-int spt-timer 300)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)
|
||||
(new 'static 'sp-field-init-spec
|
||||
:field (sp-field-id spt-userdata)
|
||||
:flags (sp-flag plain-v2)
|
||||
:object (new 'static 'boxed-array :type int32 10 0 0 #xc0c900 #xc02600 #xc03300 #xc02c00)
|
||||
)
|
||||
(sp-func spt-func 'sparticle-texture-animate)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 65
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #x92 :page #xc))
|
||||
(sp-rnd-flt spt-num 2.0 4.0 1.0)
|
||||
(sp-flt spt-scale-x (meters 2.5))
|
||||
(sp-int spt-rot-x 4)
|
||||
(sp-rnd-flt spt-scale-y (meters 0.06) (meters 0.03) 1.0)
|
||||
(sp-flt spt-r 255.0)
|
||||
(sp-rnd-flt spt-g 128.0 128.0 1.0)
|
||||
(sp-rnd-flt spt-b 0.0 128.0 1.0)
|
||||
(sp-flt spt-a 128.0)
|
||||
(sp-rnd-flt spt-omega 3.2768 2.048 1.0)
|
||||
(sp-rnd-flt spt-vel-y (meters 0.1) (meters 0.06666667) 1.0)
|
||||
(sp-rnd-flt spt-fade-g -2.55 -2.55 1.0)
|
||||
(sp-flt spt-fade-b -8.0)
|
||||
(sp-rnd-flt spt-fade-a -0.32 -0.64 1.0)
|
||||
(sp-rnd-flt spt-friction 0.8 0.02 1.0)
|
||||
(sp-int-plain-rnd spt-timer 100 99 1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)
|
||||
(sp-func spt-func 'sparticle-motion-blur)
|
||||
(sp-rnd-flt spt-conerot-x (degrees 0.0) (degrees 80.0) 1.0)
|
||||
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 66
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 0.25))
|
||||
(sp-flt spt-rot-x 40.96)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 3600.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
(sp-flt spt-r 255.0)
|
||||
(sp-rnd-flt spt-g 196.0 128.0 1.0)
|
||||
(sp-rnd-flt spt-b 128.0 64.0 1.0)
|
||||
(sp-rnd-flt spt-a 96.0 16.0 1.0)
|
||||
(sp-flt spt-omega 656998.4)
|
||||
(sp-flt spt-scalevel-x (meters 0.08))
|
||||
(sp-copy-from-other spt-scalevel-y -4)
|
||||
(sp-flt spt-fade-g -6.375)
|
||||
(sp-flt spt-fade-b -13.066667)
|
||||
(sp-flt spt-fade-a -2.8)
|
||||
(sp-int-plain-rnd spt-timer 15 9 1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)
|
||||
(sp-flt spt-userdata 2048.0)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function birth-func-omega-normal-orient
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun birth-func-omega-normal-orient ((arg0 sparticle-system)
|
||||
(arg1 sparticle-cpuinfo)
|
||||
(arg2 sprite-vec-data-3d)
|
||||
(arg3 sparticle-launcher)
|
||||
(arg4 sparticle-launch-state)
|
||||
)
|
||||
(local-vars (v1-6 float) (v1-7 float))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'quaternion))
|
||||
)
|
||||
(set! (-> s4-0 x) (* 0.007874016 (the float (-> arg1 datab 2))))
|
||||
(set! (-> s4-0 y) 0.0)
|
||||
(set! (-> s4-0 z) (* -0.007874016 (the float (-> arg1 datab 0))))
|
||||
(vector-normalize! s4-0 1.0)
|
||||
(quaternion-vector-angle! gp-0 s4-0 (acos (* 0.007874016 (the float (-> arg1 datab 1)))))
|
||||
(cond
|
||||
((< (-> gp-0 w) 0.0)
|
||||
(.lvf vf1 (&-> arg2 qx-qy-qz-sy quad))
|
||||
(.lvf vf2 (&-> gp-0 vec quad))
|
||||
(.sub.vf vf1 vf0 vf2 :mask #b111)
|
||||
(.svf (&-> arg2 qx-qy-qz-sy quad) vf1)
|
||||
(.mov v1-6 vf1)
|
||||
)
|
||||
(else
|
||||
(.lvf vf1 (&-> arg2 qx-qy-qz-sy quad))
|
||||
(.lvf vf2 (&-> gp-0 vec quad))
|
||||
(.add.vf vf1 vf0 vf2 :mask #b111)
|
||||
(.svf (&-> arg2 qx-qy-qz-sy quad) vf1)
|
||||
(.mov v1-7 vf1)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function birth-func-rain
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun birth-func-rain ((arg0 sparticle-system)
|
||||
(arg1 sparticle-cpuinfo)
|
||||
(arg2 sprite-vec-data-3d)
|
||||
(arg3 sparticle-launcher)
|
||||
(arg4 sparticle-launch-state)
|
||||
)
|
||||
(let ((s4-0 (new 'stack-no-clear 'collide-query)))
|
||||
(set! (-> s4-0 start-pos quad) (-> arg2 x-y-z-sx quad))
|
||||
(set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0)
|
||||
(let ((v1-2 s4-0))
|
||||
(set! (-> v1-2 radius) 40.96)
|
||||
(set! (-> v1-2 collide-with) (collide-spec backgnd))
|
||||
(set! (-> v1-2 ignore-process0) #f)
|
||||
(set! (-> v1-2 ignore-process1) #f)
|
||||
(set! (-> v1-2 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
|
||||
(set! (-> v1-2 action-mask) (collide-action solid))
|
||||
)
|
||||
(fill-using-line-sphere *collide-cache* s4-0)
|
||||
(cond
|
||||
((>= (collide-cache-method-16 *collide-cache* s4-0) 0.0)
|
||||
(set! (-> arg1 user-float) (-> s4-0 best-other-tri intersect y))
|
||||
(let ((f0-8 (+ 65536.0 (-> *math-camera* trans y))))
|
||||
(if (< (-> arg1 user-float) f0-8)
|
||||
(set! (-> arg2 x-y-z-sx y) f0-8)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 datab 0) (the int (* 127.0 (-> s4-0 best-other-tri normal x))))
|
||||
(set! (-> arg1 datab 1) (the int (* 127.0 (-> s4-0 best-other-tri normal y))))
|
||||
(set! (-> arg1 datab 2) (the int (* 127.0 (-> s4-0 best-other-tri normal z))))
|
||||
(set! (-> arg1 datab 3) (the-as int (-> s4-0 best-other-tri pat event)))
|
||||
)
|
||||
(else
|
||||
(set! (-> arg1 omega) 65280.0)
|
||||
(set! (-> arg1 user-float) (+ -204800.0 (-> arg2 x-y-z-sx y)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-21 (ocean-method-11 *ocean* (the-as (inline-array vector) (-> arg2 x-y-z-sx)) #f)))
|
||||
(when (!= f0-21 4095996000.0)
|
||||
(when (< (-> arg1 user-float) f0-21)
|
||||
(set! (-> arg1 user-float) f0-21)
|
||||
(set! (-> arg1 datab 0) 0)
|
||||
(set! (-> arg1 datab 1) 127)
|
||||
(set! (-> arg1 datab 2) 0)
|
||||
(set! (-> arg1 datab 3) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function check-drop-level-rain
|
||||
;; INFO: Used lq/sq
|
||||
(defun check-drop-level-rain ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(when (< (-> arg2 y) (-> arg1 user-float))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector))
|
||||
(gp-0 (new 'stack-no-clear 'matrix))
|
||||
)
|
||||
(let ((f30-0 (-> arg1 user-float)))
|
||||
(sp-kill-particle arg0 arg1)
|
||||
(set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
|
||||
(-> arg1 omega)
|
||||
(set-vector!
|
||||
(-> gp-0 vector 1)
|
||||
(* 0.007874016 (the float (-> arg1 datab 0)))
|
||||
(* 0.007874016 (the float (-> arg1 datab 1)))
|
||||
(* 0.007874016 (the float (-> arg1 datab 2)))
|
||||
0.0
|
||||
)
|
||||
(set-vector! (-> gp-0 vector 2) 0.0 0.0 1.0 0.0)
|
||||
(vector-cross! (the-as vector (-> gp-0 vector)) (-> gp-0 vector 1) (-> gp-0 vector 2))
|
||||
(set! (-> gp-0 trans quad) (-> s4-0 quad))
|
||||
(set! (-> *part-id-table* 62 init-specs 23 initial-valuef) (vector-y-angle (-> gp-0 vector 1)))
|
||||
(set! (-> *part-id-table* 62 init-specs 22 initial-valuef) (- 16384.0 (vector-x-angle (-> gp-0 vector 1))))
|
||||
(set! (-> *part-id-table* 62 init-specs 16 initial-valuef) f30-0)
|
||||
)
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(-> *part-id-table* 62)
|
||||
gp-0
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
(case (-> arg1 datab 3)
|
||||
((11 10)
|
||||
(sound-play "sizzle-drips")
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(-> *part-id-table* 66)
|
||||
gp-0
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(-> *part-id-table* 65)
|
||||
gp-0
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(sound-play "dry-drips")
|
||||
(set! (-> *part-id-table* 64 init-specs 10 initial-valuef) (-> arg1 omega))
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-3d*
|
||||
(-> *part-id-table* 64)
|
||||
gp-0
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function check-drop-level-rain2
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun check-drop-level-rain2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(if (< (-> arg2 y) (-> arg1 user-float))
|
||||
(sp-kill-particle arg0 arg1)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function check-drop-level-splash
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun check-drop-level-splash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector))
|
||||
(sparticle-motion-blur arg0 arg1 arg2)
|
||||
(if (< (-> arg2 y) (-> arg1 user-float))
|
||||
(sp-kill-particle arg0 arg1)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function update-rain
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun update-rain ((arg0 float) (arg1 vector) (arg2 vector))
|
||||
(let ((v1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-0 x) (-> arg2 x))
|
||||
(set! (-> v1-0 y) 0.0)
|
||||
(set! (-> v1-0 z) (-> arg2 z))
|
||||
(set! (-> v1-0 w) 1.0)
|
||||
(let ((gp-1 (vector+float*! (new 'stack-no-clear 'vector) arg1 v1-0 0.0)))
|
||||
(let ((t9-0 matrix-local->world)
|
||||
(a0-3 #f)
|
||||
)
|
||||
(let* ((s4-0 (t9-0 a0-3))
|
||||
(f28-0 (lerp-scale 122.88 245.76 (fabs (-> s4-0 vector 2 y)) 0.0 0.7))
|
||||
(f30-0 (lerp-scale 2048.0 245.76 (fabs (-> s4-0 vector 2 y)) 0.0 0.7))
|
||||
)
|
||||
(let ((f26-0 (lerp-scale 0.0 0.1 (-> s4-0 vector 2 y) 0.3 0.7))
|
||||
(f0-11 (lerp-scale 1.0 0.1 (-> s4-0 vector 2 y) 0.3 0.7))
|
||||
)
|
||||
(if (< 0.0 f26-0)
|
||||
(send-event *camera* 'part-water-drip f26-0 f0-11)
|
||||
)
|
||||
)
|
||||
(set! (-> *part-id-table* 60 init-specs 5 initial-valuef) f28-0)
|
||||
(set! (-> *part-id-table* 60 init-specs 5 random-rangef) f28-0)
|
||||
(set! (-> *part-id-table* 61 init-specs 5 initial-valuef) f28-0)
|
||||
(set! (-> *part-id-table* 61 init-specs 5 random-rangef) f28-0)
|
||||
(set! (-> *part-id-table* 60 init-specs 6 initial-valuef) f30-0)
|
||||
(set! (-> *part-id-table* 60 init-specs 6 random-rangef) f30-0)
|
||||
(set! (-> *part-id-table* 61 init-specs 6 initial-valuef) f30-0)
|
||||
(set! (-> *part-id-table* 61 init-specs 6 random-rangef) f30-0)
|
||||
)
|
||||
)
|
||||
(set! (-> *part-id-table* 60 init-specs 2 initial-valuef) arg0)
|
||||
(set! (-> *part-id-table* 61 init-specs 2 initial-valuef) (* 4.0 arg0))
|
||||
(let ((t9-6 sp-launch-particles-var)
|
||||
(a0-10 *sp-particle-system-2d*)
|
||||
(a1-7 (-> *part-id-table* 60))
|
||||
(a2-5 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-5 trans quad) (-> gp-1 quad))
|
||||
(t9-6 a0-10 a1-7 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
(let ((t9-7 sp-launch-particles-var)
|
||||
(a0-11 *sp-particle-system-2d*)
|
||||
(a1-8 (-> *part-id-table* 61))
|
||||
(a2-6 *launch-matrix*)
|
||||
)
|
||||
(set! (-> a2-6 trans quad) (-> gp-1 quad))
|
||||
(t9-7 a0-11 a1-8 a2-6 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function cam-master-effect
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior cam-master-effect camera-master ()
|
||||
(when (not (or (movie?) (>= (+ (-> self clock frame-counter) (seconds -10)) (-> self water-drip-time))))
|
||||
(set! (-> *part-id-table* 46 init-specs 1 initial-valuef) (-> self water-drip-mult))
|
||||
(set! (-> *part-id-table* 45 init-specs 1 initial-valuef) (* 0.9 (-> self water-drip-mult)))
|
||||
(set! (-> *part-id-table* 43 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
|
||||
(set! (-> *part-id-table* 44 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
|
||||
(set! (-> *part-id-table* 41 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
|
||||
(set! (-> *part-id-table* 42 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed)))
|
||||
(spawn (-> self water-drip) *zero-vector*)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function sparticle-track-sun
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun sparticle-track-sun ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
||||
(-> arg1 key)
|
||||
(let* ((s3-0 (the int (-> arg1 user-float)))
|
||||
(s5-0 (math-camera-pos))
|
||||
(s4-0 (+ (the-as uint (-> *sky-work* upload-data)) (* (/ s3-0 4) 64)))
|
||||
)
|
||||
(let ((v1-3 (/ s3-0 4)))
|
||||
(cond
|
||||
((zero? v1-3)
|
||||
(set! (-> arg2 vector 1 z) (+ 8192.0 (* 0.5 (vector-y-angle (-> (math-camera-matrix) vector 2)))))
|
||||
)
|
||||
((= v1-3 1)
|
||||
(set! (-> arg2 vector 1 z) (+ -8192.0 (* 0.5 (vector-y-angle (-> (math-camera-matrix) vector 2)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-12 (vector+float*! (new 'stack-no-clear 'vector) s5-0 (the-as vector s4-0) 4096.0)))
|
||||
(set! (-> arg2 vector 0 x) (-> v1-12 x))
|
||||
(set! (-> arg2 vector 0 y) (-> v1-12 y))
|
||||
(set! (-> arg2 vector 0 z) (-> v1-12 z))
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-sun
|
||||
:id 3
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 70)
|
||||
:parts ((sp-item 67 :flags (bit6)) (sp-item 68 :flags (bit6)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 67
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 2550))
|
||||
(sp-flt spt-rot-x 307200.0)
|
||||
(sp-flt spt-rot-z (degrees 30.0))
|
||||
(sp-flt spt-scale-y (meters 2550))
|
||||
(sp-flt spt-r 64.0)
|
||||
(sp-flt spt-g 64.0)
|
||||
(sp-flt spt-b 16.0)
|
||||
(sp-flt spt-a 70.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
||||
(sp-flt spt-userdata 1.0)
|
||||
(sp-func spt-func 'sparticle-track-sun)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 68
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 12000))
|
||||
(sp-flt spt-rot-x 307200.0)
|
||||
(sp-flt spt-rot-z (degrees 30.0))
|
||||
(sp-flt spt-scale-y (meters 12000))
|
||||
(sp-flt spt-r 64.0)
|
||||
(sp-flt spt-g 32.0)
|
||||
(sp-flt spt-b 0.0)
|
||||
(sp-flt spt-a 80.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
||||
(sp-flt spt-userdata 1.0)
|
||||
(sp-func spt-func 'sparticle-track-sun)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-green-sun
|
||||
:id 4
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 70)
|
||||
:parts ((sp-item 69 :flags (bit6)) (sp-item 70 :flags (bit6)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 69
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 1500))
|
||||
(sp-flt spt-rot-x 204800.0)
|
||||
(sp-flt spt-rot-z (degrees 30.0))
|
||||
(sp-flt spt-scale-y (meters 1500))
|
||||
(sp-flt spt-r 16.0)
|
||||
(sp-flt spt-g 64.0)
|
||||
(sp-flt spt-b 32.0)
|
||||
(sp-flt spt-a 64.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
||||
(sp-flt spt-userdata 4.0)
|
||||
(sp-func spt-func 'sparticle-track-sun)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 70
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xbb :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 3000))
|
||||
(sp-flt spt-rot-x 204800.0)
|
||||
(sp-flt spt-rot-z (degrees 30.0))
|
||||
(sp-flt spt-scale-y (meters 3000))
|
||||
(sp-flt spt-r 0.0)
|
||||
(sp-flt spt-g 43.0)
|
||||
(sp-flt spt-b 8.0)
|
||||
(sp-flt spt-a 64.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
||||
(sp-flt spt-userdata 4.0)
|
||||
(sp-func spt-func 'sparticle-track-sun)
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpartgroup group-moon
|
||||
:id 5
|
||||
:flags (always-draw)
|
||||
:bounds (static-bspherem 0 0 0 70)
|
||||
:parts ((sp-item 71 :flags (bit6)))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defpart 71
|
||||
:init-specs ((sp-tex spt-texture (new 'static 'texture-id :index #xca :page #xc))
|
||||
(sp-flt spt-num 1.0)
|
||||
(sp-flt spt-scale-x (meters 6000))
|
||||
(sp-flt spt-rot-x 544768.0)
|
||||
(sp-flt spt-rot-z (degrees 30.0))
|
||||
(sp-flt spt-scale-y (meters 6000))
|
||||
(sp-flt spt-r 16.0)
|
||||
(sp-flt spt-g 32.0)
|
||||
(sp-flt spt-b 64.0)
|
||||
(sp-flt spt-a 64.0)
|
||||
(sp-flt spt-omega 0.0)
|
||||
(sp-int spt-timer -1)
|
||||
(sp-cpuinfo-flags sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)
|
||||
(sp-flt spt-userdata 8.0)
|
||||
(sp-func spt-func 'sparticle-track-sun)
|
||||
)
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user