[decomp] fix up debug menu rendering, add a few others (#1892)

![image](https://user-images.githubusercontent.com/48171810/190832869-e609d346-9c4a-43fb-ad94-2a9690521adc.png)
actor vis boxes for PRI.DGO
This commit is contained in:
water111
2022-09-16 20:42:33 -04:00
committed by GitHub
parent d95ff2d2fb
commit 6a1bde4168
132 changed files with 13617 additions and 3526 deletions
+74 -50
View File
@@ -134,6 +134,16 @@ Form* try_cast_simplify(Form* in,
if (new_type == TypeSpec("meters")) {
auto fc = get_goal_float_constant(in);
if (!fc && env.version == GameVersion::Jak2) {
auto ic = get_goal_integer_constant(in, env);
if (ic) {
ASSERT((s64)*ic == (s64)(s32)*ic);
float f;
memcpy(&f, &ic.value(), sizeof(float));
fc = f;
}
}
if (fc) {
double div = (double)*fc / METER_LENGTH; // GOOS will use doubles here
if (div * METER_LENGTH == *fc) {
@@ -1986,63 +1996,77 @@ void SimpleExpressionElement::update_from_stack_left_shift(const Env& env,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects) {
auto arg0_type = env.get_variable_type(m_expr.get_arg(0).var(), true);
TypeSpec arg0_type;
auto& arg0 = m_expr.get_arg(0);
if (arg0.is_var()) {
arg0_type = env.get_variable_type(m_expr.get_arg(0).var(), true);
auto type_info = env.dts->ts.lookup_type(arg0_type);
auto bitfield_info = dynamic_cast<BitFieldType*>(type_info);
if (arg0_type.base_type() != "time-frame" && bitfield_info && m_expr.get_arg(1).is_int()) {
auto base =
pop_to_forms({m_expr.get_arg(0).var()}, env, pool, stack, allow_side_effects).at(0);
auto read_elt = pool.alloc_element<BitfieldAccessElement>(base, arg0_type);
BitfieldManip step(BitfieldManip::Kind::LEFT_SHIFT, m_expr.get_arg(1).get_int());
auto other = read_elt->push_step(step, env.dts->ts, pool, env);
ASSERT(!other); // shouldn't be complete.
result->push_back(read_elt);
} else {
// try to turn this into a multiplication, if possible
if (m_expr.get_arg(1).is_int()) {
auto args = pop_to_forms({m_expr.get_arg(0).var()}, env, pool, stack, allow_side_effects);
int sa = m_expr.get_arg(1).get_int();
auto type_info = env.dts->ts.lookup_type(arg0_type);
auto bitfield_info = dynamic_cast<BitFieldType*>(type_info);
if (arg0_type.base_type() != "time-frame" && bitfield_info && m_expr.get_arg(1).is_int()) {
auto base = pop_to_forms({m_expr.get_arg(0).var()}, env, pool, stack, allow_side_effects).at(0);
auto read_elt = pool.alloc_element<BitfieldAccessElement>(base, arg0_type);
BitfieldManip step(BitfieldManip::Kind::LEFT_SHIFT, m_expr.get_arg(1).get_int());
auto other = read_elt->push_step(step, env.dts->ts, pool, env);
ASSERT(!other); // shouldn't be complete.
result->push_back(read_elt);
} else {
// try to turn this into a multiplication, if possible
if (m_expr.get_arg(1).is_int()) {
auto args = pop_to_forms({m_expr.get_arg(0).var()}, env, pool, stack, allow_side_effects);
int sa = m_expr.get_arg(1).get_int();
auto as_ba = args.at(0)->try_as_element<BitfieldAccessElement>();
if (as_ba) {
BitfieldManip step(BitfieldManip::Kind::LEFT_SHIFT, m_expr.get_arg(1).get_int());
auto other = as_ba->push_step(step, env.dts->ts, pool, env);
ASSERT(!other); // shouldn't be complete.
result->push_back(as_ba);
return;
}
// somewhat arbitrary threshold to switch from multiplications to shift.
if (sa < 10) {
s64 multiplier = (s64(1) << sa);
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::MULTIPLICATION), args.at(0),
pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(multiplier)));
result->push_back(new_form);
return;
}
auto arg0_i = is_int_type(env, m_my_idx, m_expr.get_arg(0).var());
auto arg0_u = is_uint_type(env, m_my_idx, m_expr.get_arg(0).var());
if (!arg0_i && !arg0_u) {
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::SHL),
pool.form<CastElement>(TypeSpec("int"), args.at(0)),
pool.form<SimpleAtomElement>(m_expr.get_arg(1)));
result->push_back(new_form);
} else {
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::SHL), args.at(0),
pool.form<SimpleAtomElement>(m_expr.get_arg(1)));
result->push_back(new_form);
}
auto as_ba = args.at(0)->try_as_element<BitfieldAccessElement>();
if (as_ba) {
BitfieldManip step(BitfieldManip::Kind::LEFT_SHIFT, m_expr.get_arg(1).get_int());
auto other = as_ba->push_step(step, env.dts->ts, pool, env);
ASSERT(!other); // shouldn't be complete.
result->push_back(as_ba);
return;
}
// somewhat arbitrary threshold to switch from multiplications to shift.
if (sa < 10) {
s64 multiplier = (s64(1) << sa);
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::MULTIPLICATION), args.at(0),
pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(multiplier)));
result->push_back(new_form);
return;
}
auto arg0_i = is_int_type(env, m_my_idx, m_expr.get_arg(0).var());
auto arg0_u = is_uint_type(env, m_my_idx, m_expr.get_arg(0).var());
if (!arg0_i && !arg0_u) {
auto new_form =
pool.alloc_element<GenericElement>(GenericOperator::make_fixed(FixedOperatorKind::SHL),
pool.form<CastElement>(TypeSpec("int"), args.at(0)),
pool.form<SimpleAtomElement>(m_expr.get_arg(1)));
result->push_back(new_form);
} else {
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::SHL), args.at(0),
pool.form<SimpleAtomElement>(m_expr.get_arg(1)));
result->push_back(new_form);
}
return;
update_from_stack_copy_first_int_2(env, FixedOperatorKind::SHL, pool, stack, result,
allow_side_effects);
}
} else if ((arg0.is_sym_val("#f") || arg0.is_sym_ptr("#f")) && m_expr.get_arg(1).is_int()) {
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::SHL),
pool.form<CastElement>(TypeSpec("int"), pool.form<SimpleAtomElement>(m_expr.get_arg(0))),
pool.form<SimpleAtomElement>(m_expr.get_arg(1)));
result->push_back(new_form);
return;
update_from_stack_copy_first_int_2(env, FixedOperatorKind::SHL, pool, stack, result,
allow_side_effects);
} else {
ASSERT(false);
}
}
+7
View File
@@ -81,6 +81,13 @@ void find_boxed(LabelDB* db, LinkedObjectFile* file) {
// so it can actually share a label with something else.
if (word.kind() == LinkedWord::TYPE_PTR && word.symbol_name() != "snowball-bank") {
TypeSpec basic_type(word.symbol_name());
if (word.symbol_name() == "array") {
const auto& type_word =
file->words_by_seg.at(lab.target_segment).at((lab.offset - 4 + 12) / 4);
if (type_word.kind() == LinkedWord::TYPE_PTR) {
basic_type.add_arg(TypeSpec(type_word.symbol_name()));
}
}
const auto& existing = db->lookup(lab.name);
if (existing.known) {
if (existing.result_type.base_type() != basic_type.base_type()) {
+136 -100
View File
@@ -103,6 +103,7 @@
(define-extern loading-level kheap)
(define-extern dma-sync (function pointer int int int))
(define-extern unload (function string none))
@@ -2649,8 +2650,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftype video-params (structure)
((set-video-mode basic :offset-assert 0)
(reset-video-mode basic :offset-assert 4)
((set-video-mode symbol :offset-assert 0)
(reset-video-mode symbol :offset-assert 4)
(display-fbp int32 :offset-assert 8)
(relative-x-scale float :offset 16)
(display-dx int32 :offset-assert 20)
@@ -3076,15 +3077,16 @@
(bucket-315 315) ;; effects
(tex-all-warp 316) ;; tex
(bucket-317 317) ;; mercneric
(bucket-318 318) ;; debug, no zbuf
(debug-no-zbuf1 318) ;; debug, no zbuf
(tex-all-map 319) ;; tex
(bucket-320 320) ;; hud
(bucket-321 321) ;; hud letterbox, no zbuf
(screen-filter 321) ;; hud letterbox, no zbuf
(bucket-322 322) ;; hud
(bucket-323 323) ;; hud
(bucket-324 324) ;; debug
(debug-no-zbuf 325) ;; debug
(debug-unknown-326 326)
(debug2 324) ;; debug
(debug-no-zbuf2 325) ;; debug
(debug3 326)
)
;; TODO - names in `render` menu
@@ -5710,6 +5712,31 @@
(movie0 16) ;; 0x10000
(movie1 17) ;; 0x20000
(movie2 18) ;; 0x40000
(tm19)
(tm20)
(tm21)
(tm22)
(tm23)
(tm24)
(tm25)
(tm26)
(tm27)
(tm28)
(tm29)
(tm30)
(tm31)
)
(defenum load-buffer-mode
:type uint32
(small-edge 0)
(small-center 1)
(medium 2)
(large 3)
(borrow 4)
(ten 10)
)
(deftype level-load-info (basic)
@@ -5723,7 +5750,7 @@
(taskname symbol :offset 20)
(other-name-1 symbol :offset 24)
(packages pair :offset-assert 32) ;; guess on type
(memory-mode uint32 :offset-assert 36)
(memory-mode load-buffer-mode :offset-assert 36)
(music-bank symbol :offset-assert 40)
(ambient-sounds symbol :offset-assert 44)
(sound-reverb float :offset-assert 48)
@@ -5841,7 +5868,7 @@
(vis-bits pointer :offset-assert 2392)
(all-visible? symbol :offset-assert 2396)
(force-all-visible? symbol :offset-assert 2400)
(linking basic :offset-assert 2404)
(linking symbol :offset-assert 2404)
(vis-info level-vis-info 8 :offset-assert 2408)
(vis-self-index int32 :offset-assert 2440)
(vis-adj-index int32 :offset-assert 2444)
@@ -5859,7 +5886,7 @@
(display-start-time time-frame :offset-assert 4552)
(memory-mask uint32 :offset-assert 4560)
(task-mask task-mask :offset-assert 4564)
(tfrag-gs-test uint64 :offset-assert 4568)
(tfrag-gs-test gs-test :offset-assert 4568)
(texture-dirty-masks texture-mask 10 :inline :offset-assert 4576)
(texture-mask texture-mask 18 :inline :offset-assert 4736)
(sky-mask texture-mask :inline :offset-assert 5024)
@@ -5892,12 +5919,12 @@
;; Failed to read fields.
(:methods
(deactivate (_type_) _type_ 9)
(level-method-10 () none 10) ;; (is-object-visible? (_type_ int) symbol 10)
(is-object-visible? (_type_ int) symbol 10)
(level-method-11 () none 11) ;; (add-irq-to-tex-buckets! (_type_) none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
(compute-memory-usage (_type_ object) memory-usage-block 14)
(point-in-boxes? (_type_ vector) symbol 15)
(inside-boxes-check (_type_ vector) symbol 15)
(level-method-16 () none 16) ;; (update-vis! (_type_ level-vis-info uint uint) symbol 16)
(load-continue (_type_) _type_ 17)
(load-begin (_type_) _type_ 18)
@@ -5968,21 +5995,21 @@
(level-get-with-status (_type_ symbol) level 10)
(get-level-by-heap-ptr-and-status (_type_ pointer symbol) level 11) ;;
(level-get-for-use (_type_ symbol symbol) level 12)
(activate-levels! (_type_) int 13) ;; (debug-print-entities (_type_ symbol type) none 13)
(level-group-method-14 () none 14)
(activate-levels! (_type_) int 13)
(debug-print-entities (_type_ symbol type) none 14)
(debug-draw-actors (_type_ symbol) none 15)
(assign-draw-indices (_type_) none 16) ;; (level-update (_type_) int 16)
(actors-update (_type_) none 17) ;; (level-get-target-inside (_type_) level 17)
(level-group-method-18 () none 18) ;; (alloc-levels! (_type_ symbol) int 18)
(level-group-method-18 (_type_) none 18) ;; (alloc-levels! (_type_ symbol) int 18)
(level-update (_type_) none 19) ;;
(level-get-target-inside (_type_) level 20) ;; (art-group-get-by-name (_type_ string) art-group 20)
(alloc-levels-if-needed (_type_ symbol) none 21)
(load-commands-set! (_type_ pair) none 22) ;; (update-vis-volumes (_type_) none 22)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23) ;; (update-vis-volumes-from-nav-mesh (_type_) none 23)
(load-command-get-index (_type_ symbol int) pair 24) ;; (print-volume-sizes (_type_) none 24)
(level-group-method-25 () none 25) ;; (level-status (_type_ symbol) symbol 25)
(level-group-method-26 () none 26)
(level-group-method-27 () none 27)
(load-commands-set! (_type_ pair) none 22)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23)
(alt-load-command-get-index (_type_ symbol int) pair 24) ;; (print-volume-sizes (_type_) none 24)
(update-vis-volumes (_type_) none 25) ;; (level-status (_type_ symbol) symbol 25)
(update-vis-volumes-from-nav-mesh (_type_) none 26)
(print-volume-sizes (_type_) none 27)
(level-status (_type_ symbol) symbol 28)
(load-in-progress? (_type_) symbol 29)
(level-get-most-disposable (_type_) level 30)
@@ -7189,8 +7216,8 @@
(process-mask process-mask)
(unknown-int32-00 int32 :offset-assert 8)
(language language-enum :offset 16)
(unknown-int32-01 int32 :offset-assert 24)
(unknown-int32-02 int32 :offset-assert 28)
(display-dx int32 :offset-assert 24) ;; video mode related, 0 for both ntsc/pal
(display-dy int32 :offset-assert 28) ;; video mode related, 8 for ntsc, 24 pal
(vibration symbol :offset 32)
(play-hints symbol :offset 36)
(movie (pointer process) :offset 40)
@@ -7200,7 +7227,7 @@
(ambient (pointer process) :offset-assert 56)
(video-mode symbol)
(aspect-ratio symbol :offset-assert 64)
(unknown-uint32-00 uint32 :offset 68)
(use-progressive-scan symbol :offset 68)
(auto-save symbol :offset 72)
(bg-r float :offset-assert 76)
(bg-g float)
@@ -7274,7 +7301,7 @@
(movie-skip-frame float)
(allow-blackout symbol)
(race-minimap int32 :offset-assert 364)
(extra-bank symbol)
(extra-bank pair)
(beard symbol)
(ignore-target symbol)
(subtitle-language language-enum)
@@ -8161,12 +8188,13 @@
:size-assert #x20
:flag-assert #x1400000020
(:methods
(drawable-region-prim-method-17 () none 17)
(debug-draw-region (_type_ int) none 17)
(drawable-region-prim-method-18 () none 18)
(drawable-region-prim-method-19 () none 19)
)
)
(declare-type drawable-inline-array-region-prim drawable)
(deftype drawable-tree-region-prim (drawable-tree)
((name basic :offset 8)
@@ -11623,12 +11651,12 @@
(want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15)
(execute-command (_type_ pair object) none 16)
(want-force-inside (_type_ symbol symbol) none 16)
(execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19)
(restore-load-state (_type_) int 20)
(set-force-inside! (_type_ symbol symbol) none 21)
(add-borrow-levels (_type_) none 21)
)
)
@@ -11885,7 +11913,7 @@
(game-info-method-18 () none 18)
(get-current-continue-point (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic symbol) continue-point 21)
(set-continue! (_type_ basic object) continue-point 21)
(game-info-method-22 () none 22)
(game-info-method-23 () none 23)
(game-info-method-24 () none 24)
@@ -16887,7 +16915,9 @@
(defenum texture-page-flag
:type uint16
:bitfield #t)
:bitfield #t
(alpha-enable 0)
)
(deftype bsp-header (drawable)
(
@@ -16919,12 +16949,12 @@
;; 0 (maybe current-leaf-idx?) 128
(texture-flags texture-page-flag 10 :offset 130)
;; 0 (maybe padding) 150
;; 0 (was boxes, current back flags?, byte?) 152
(require-force-inside uint8 :offset 152)
(ambients symbol :offset 156) ;; now just #t?
(subdivide-close float :offset 160)
(subdivide-far float :offset-assert 164)
(race-meshes (array entity-race-mesh) :offset-assert 168)
;; pointer to table of sorted floats 172
(actor-birth-order (pointer uint32) :offset 172)
(light-hash light-hash :offset 176)
(nav-meshes (array entity-nav-mesh) :offset-assert 180)
(actor-groups (array actor-group) :offset-assert 184)
@@ -16934,13 +16964,19 @@
;; 200 is some array
;; 204 is maybe that array's length
;; 216 is a vector array
;; (vec-array (pointer vector) :offset 216) ; TODO see - `update-visible` hits assertion
;; (vec-array (pointer vector) :offset 216) ; TODO see - `update-visible` hits assertion
(region-tree drawable-tree-region-prim :offset 252)
; (actor-birth-order (pointer uint32) :offset-assert 172)
; (split-box-indices (pointer uint16) :offset-assert 176)
(unk-data-8 uint32 55 :offset 180)
(unk-data uint32 18 :offset 180)
(tfrag-texture-masks-array texture-masks-array)
(tmask0 texture-masks-array :offset 272)
(tmask2 texture-masks-array :offset 280)
(end uint8 :offset 399)
)
:method-count-assert 19
:size-assert #x190
@@ -18169,10 +18205,10 @@
(defenum entity-perm-status
:bitfield #t
:type uint16
(bit-0 0)
(bit-0 0) ;; blocks birth
(bit-1 1)
(dead 2)
(bit-3 3)
(no-kill 3)
(bit-4 4)
(bit-5 5)
(subtask-complete 6)
@@ -18203,7 +18239,7 @@
:size-assert #x10
:flag-assert #xa00000010
(:methods
(entity-perm-method-9 () none 9) ;; (update-perm! (_type_ symbol entity-perm-status) _type_ 9)
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
)
)
@@ -18228,7 +18264,7 @@
:flag-assert #xa00000040
;; Failed to read fields.
(:methods
(entity-links-method-9 () none 9) ;; (birth? (_type_ vector) symbol 9)
(birth? (_type_ vector) symbol 9)
)
)
@@ -18258,11 +18294,11 @@
:flag-assert #x1b00000034
;; Failed to read fields.
(:methods
(entity-method-22 (_type_) _type_ 22) ;; (birth! (_type_) _type_ 22)
(kill! (_type_ ) _type_ 23) ;; (kill! (_type_) _type_ 23)
(entity-method-24 () none 24) ;; (add-to-level! (_type_ level-group level actor-id) none 24)
(entity-method-25 () none 25) ;; (remove-from-level! (_type_ level-group) _type_ 25)
(entity-method-26 () none 26) ;; (get-level (_type_) level 26)
(birth! (_type_) _type_ 22)
(kill! (_type_) _type_ 23)
(add-to-level! (_type_ level-group level actor-id) none 24)
(remove-from-level! (_type_ level-group) _type_ 25)
(get-level (_type_) level 26)
)
)
@@ -18310,17 +18346,18 @@
(:methods
(next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28)
(entity-actor-method-29 () none 29) ;; (debug-print (_type_ symbol type) none 29)
(entity-actor-method-30 (_type_ entity-perm-status symbol) none 30) ;; (dummy-30 (_type_ entity-perm-status symbol) none 30)
(debug-print (_type_ symbol type) none 29)
(toggle-status (_type_ entity-perm-status symbol) none 30)
(entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31)
(entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32)
)
)
(deftype actor-reference (structure)
((actor basic :offset-assert 0)
((actor entity :offset-assert 0)
(id uint32 :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
@@ -19948,12 +19985,12 @@
(progress-method-24 () none 24) ;; (draw-fuel-cell-screen (_type_ int) none 24)
(progress-method-25 () none 25) ;; (draw-money-screen (_type_ int) none 25)
(progress-method-26 () none 26) ;; (draw-buzzer-screen (_type_ int) none 26)
(progress-method-27 () none 27) ;; (draw-notice-screen (_type_) none 27)
(can-go-back? (_type_) symbol 27) ;; (draw-notice-screen (_type_) none 27)
(progress-method-28 () none 28) ;; (draw-options (_type_ int int float) none 28)
(progress-method-29 () none 29) ;; (respond-common (_type_) none 29)
(progress-method-30 () none 30) ;; (respond-progress (_type_) none 30)
(progress-method-31 () none 31) ;; (respond-memcard (_type_) none 31)
(progress-method-32 () none 32) ;; (can-go-back? (_type_) symbol 32)
(progress-method-32 () none 32)
)
)
@@ -20583,7 +20620,7 @@
:flag-assert #x1b00000024
(:methods
(new (symbol type process symbol float entity symbol) _type_ 0)
(path-control-method-9 () none 9) ;; (dummy-9 (_type_) none 9)
(debug-draw (_type_) none 9)
(path-control-method-10 () none 10) ;; (eval-path-curve-div! (_type_ vector float symbol) vector 10)
(path-control-method-11 () none 11) ;; (get-random-point (_type_ vector) vector 11)
(path-control-method-12 () none 12) ;; (TODO-RENAME-12 (_type_ vector float) vector 12)
@@ -21061,7 +21098,7 @@
;; Failed to read fields.
(:methods
;; (new (symbol type collide-shape int float) _type_ 0)
(nav-control-method-9 () none 9) ;; (debug-draw (_type_) none 9)
(debug-draw (_type_) none 9)
(point-in-bounds?
"Is the given point ([[vector]]) outside of the [[nav-mesh]]'s `bounds` [[sphere]] radius"
(_type_ vector) symbol 10)
@@ -21649,7 +21686,7 @@
;; subdivide ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *merc-global-stats* object) ;; merc-global-stats
(define-extern *merc-global-stats* merc-global-stats)
;; (define-extern clear-tr-stat function) ;; (function tr-stat none)
(define-extern *stat-string-tfrag* string)
(define-extern *stat-string-tfrag-scissor* string)
@@ -21659,14 +21696,14 @@
;; (define-extern update-subdivide-settings! function) ;; (function subdivide-settings math-camera int none)
(define-extern *subdivide-settings* subdivide-settings)
;; (define-extern set-tfrag-dists! function) ;; (function tfrag-dists none)
;; (define-extern *terrain-context* object) ;; terrain-context
;; (define-extern GSH_ENABLE object) ;; symbol
;; (define-extern GSH_BUCKET object) ;; bucket-id
;; (define-extern GSH_WHICH_STAT object) ;; int
;; (define-extern GSH_MAX_DISPLAY object) ;; basic
;; (define-extern GSH_TIME object) ;; int
(define-extern *terrain-context* terrain-context)
(define-extern GSH_ENABLE symbol)
(define-extern GSH_BUCKET bucket-id)
(define-extern GSH_WHICH_STAT int)
(define-extern GSH_MAX_DISPLAY basic)
(define-extern GSH_TIME int)
(define-extern *perf-stats* perf-stat-array)
;; (define-extern *gomi-stats-hack* object) ;; (inline-array perf-stat)
(define-extern *gomi-stats-hack* (inline-array perf-stat))
(define-extern start-perf-stat-collection (function none))
(define-extern end-perf-stat-collection (function none))
(define-extern print-perf-stats (function none))
@@ -24630,8 +24667,8 @@
;; load-state ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *display-load-commands* object) ;; symbol
(define-extern *backup-load-state* load-state) ;;
(define-extern *display-load-commands* symbol)
(define-extern *backup-load-state* load-state)
(define-extern *load-state* load-state)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -24808,12 +24845,12 @@
(define-extern add-bsp-drawable (function bsp-header level symbol display-frame none))
(define-extern *login-state* login-state)
(define-extern *print-login* symbol)
(define-extern load-buffer-resize (function level pointer none))
(define-extern load-buffer-resize (function level dgo-header none))
(define-extern level-update-after-load (function level login-state level))
(define-extern bg (function symbol none))
(define-extern play (function symbol symbol int))
(define-extern play-boot (function none))
;; (define-extern update-sound-banks function) ;; (function int)
(define-extern update-sound-banks (function int))
(define-extern show-level (function symbol int))
(define-extern *default-level* level)
@@ -25629,7 +25666,7 @@
:flag-assert #xc0000061c
(:methods
(new (symbol type process-drawable) _type_ 0)
(vol-control-method-9 (_type_) none 9)
(debug-draw (_type_) none 9)
(vol-control-method-10 (_type_ plane) symbol 10)
(should-display?
"Returns true/false if the volume's marks should be displayed"
@@ -26003,7 +26040,7 @@
;; (define-extern cspace-children function) ;; (function process-drawable int pair)
;; (define-extern cspace-inspect-tree function) ;; (function process-drawable cspace int int object object)
(define-extern execute-math-engine (function int))
;; (define-extern draw-joint-axes function)
(define-extern draw-joint-axes (function process-drawable none))
;; (define-extern draw-root function)
;; (define-extern empty-state state) ;; (state process)
(define-extern process-drawable-art-error (state string process-drawable))
@@ -26244,7 +26281,7 @@
;; (define-extern *lightning-globals* object)
;; (define-extern *lightning* object)
(define-extern lightning-draw-all (function none))
;; (define-extern unlink-lightning-spec-by-heap function)
(define-extern unlink-lightning-spec-by-heap (function kheap none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; carry-h ;;
@@ -27874,11 +27911,11 @@
(define-extern sphere-in-view-frustum? (function sphere symbol))
(define-extern line-in-view-frustum? (function vector vector symbol))
(define-extern vis-cull (function int symbol))
;; (define-extern vis-cull-debug function)
(define-extern vis-cull-debug (function work-area int symbol))
(define-extern error-sphere (function drawable-error string none))
(define-extern *edit-instance* string)
(define-extern *instance-mem-usage* memory-usage-block)
;; (define-extern find-instance-by-name-level function)
(define-extern find-instance-by-name-level (function string level prototype-bucket))
(define-extern find-instance-by-name (function string prototype-bucket))
;; (define-extern prototypes-game-visible-set! function)
;; (define-extern find-instance-by-index function) ;; (function type int bsp-header prototype-bucket)
@@ -27945,12 +27982,13 @@
;; video ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern *video-mode* int)
;; (define-extern set-video-mode function) ;; (function symbol none)
(define-extern get-video-mode (function symbol))
;; (define-extern set-aspect-ratio function) ;; (function symbol none)
;; (define-extern get-aspect-ratio function) ;; (function symbol)
;; (define-extern set-progressive-scan function)
;; (define-extern get-progressive-scan function)
(define-extern set-aspect-ratio (function symbol none))
(define-extern get-aspect-ratio (function symbol))
(define-extern set-progressive-scan (function symbol none))
(define-extern get-progressive-scan (function symbol))
(define-extern *smode2* int)
(define-extern set-graphics-mode (function none))
@@ -28073,10 +28111,9 @@
|#
#|
(deftype debug-actor-info (basic)
((name basic :offset-assert 4)
(handle uint64 :offset-assert 8)
(handle handle :offset-assert 8)
(process basic :offset-assert 16)
(pid int32 :offset-assert 20)
)
@@ -28084,7 +28121,6 @@
:size-assert #x18
:flag-assert #x900000018
)
|#
(define-extern *spawn-actors* symbol)
(define-extern *compact-actors* symbol)
@@ -28092,38 +28128,38 @@
(define-extern entity-by-name (function string entity))
(define-extern entity-by-type (function type entity-actor))
(define-extern entity-by-aid (function uint entity))
;; (define-extern entity-actor-from-level-name function)
(define-extern entity-actor-from-level-name (function level entity-actor))
(define-extern entity-nav-mesh-by-aid (function actor-id entity-nav-mesh))
(define-extern nav-mesh-from-res-tag (function entity symbol int nav-mesh))
;; (define-extern entity-by-meters function) ;; (function float float float entity-actor)
;; (define-extern process-by-ename function) ;; (function string process)
;; (define-extern entity-process-count function) ;; (function symbol int)
;; (define-extern entity-count function) ;; (function int)
;; (define-extern entity-remap-names function) ;; (function pair none)
;; (define-extern process-status-bits function) ;; (function process symbol none)
;; (define-extern process-entity-set! function)
(define-extern entity-by-meters (function float float float entity-actor))
(define-extern process-by-ename (function string process))
(define-extern entity-process-count (function symbol int))
(define-extern entity-count (function int))
(define-extern entity-remap-names (function pair none))
(define-extern process-status-bits (function process symbol none))
(define-extern process-entity-set! (function process entity entity))
(define-extern process-task-mask (function process task-mask))
;; (define-extern update-actor-vis-box function) ;; (function process-drawable vector vector none)
;; (define-extern expand-bounding-box function)
;; (define-extern expand-vis-box-with-point function) ;; (function entity vector none)
;; (define-extern *debug-actor-info* debug-actor-info)
;; (define-extern *pid-string* object)
(define-extern update-actor-vis-box (function process-drawable vector vector none))
(define-extern expand-bounding-box (function vector vector vector vector none))
(define-extern expand-vis-box-with-point (function entity vector none))
(define-extern *debug-actor-info* debug-actor-info)
(define-extern *pid-string* string)
(define-extern debug-actor (function string none))
;; (define-extern draw-actor-marks function)
;; (define-extern init-entity function) ;; (function process entity-actor none)
(define-extern draw-actor-marks (function process none))
(define-extern init-entity (function process entity-actor none))
;; (define-extern entity-deactivate-handler function) ;; (function process entity-actor none)
;; (define-extern check-for-rougue-process function)
;; (define-extern process-drawable-scale-from-entity! function)
(define-extern check-for-rougue-process (function process int int level none))
(define-extern process-drawable-scale-from-entity! (function process-drawable entity none))
(define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) ;;
(define-extern reset-actors (function symbol none))
(define-extern reset-cameras (function none))
(define-extern entity-birth-no-kill (function entity none)) ;;
;; (define-extern entity-task-complete-on function) ;; (function entity none)
;; (define-extern entity-task-complete-off function) ;; (function entity none)
(define-extern entity-birth-no-kill (function entity process))
(define-extern entity-task-complete-on (function entity none))
(define-extern entity-task-complete-off (function entity none))
(define-extern process-entity-status! (function process entity-perm-status symbol int)) ;;
;; (define-extern find-nearest-entity function)
;; (define-extern entity-speed-test function) ;; (function string none)
;; (define-extern dump-entity-remap function)
(define-extern find-nearest-entity (function vector type entity))
(define-extern entity-speed-test (function string none))
(define-extern dump-entity-remap (function object object none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; path ;;
@@ -28595,7 +28631,7 @@
(define-extern task-node-close! (function game-task none))
(define-extern task-node-open? (function game-task symbol))
(define-extern task-node-open! (function game-task none))
;; (define-extern task-node-reset function)
(define-extern task-node-reset (function symbol none))
;; (define-extern task-node-dump function)
;; (define-extern fail-mission-init-by-other function)
(define-extern task-manager-init-by-other (function game-task-node-info object none))
@@ -28917,7 +28953,7 @@
;; (define-extern progress-init-by-other function) ;; (function none :behavior progress)
;; (define-extern set-ring-position function)
(define-extern activate-progress (function process symbol none))
;; (define-extern deactivate-progress function) ;; (function none)
(define-extern deactivate-progress (function none))
(define-extern hide-progress-screen (function none))
(define-extern progress-allowed? (function symbol))
;; (define-extern menu-update-purchase-secrets function)
@@ -29462,7 +29498,7 @@
;; (define-extern init-viewer function) ;; (function string object :behavior viewer)
;; (define-extern init-viewer-for-other function) ;; (function string vector none :behavior viewer)
;; (define-extern add-a-bunch function) ;; (function string int int float symbol)
;; (define-extern birth-viewer function) ;; (function process entity-actor object)
(define-extern birth-viewer (function process entity-actor object))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; part-tester ;;
@@ -325,5 +325,11 @@
[84, "(function script-context meters)"],
[85, "(function script-context object)"],
[15, "(function script-context pair :behavior process)"] // NOTE - an interesting one
]
],
"entity": [
[16, "(function process none)"],
[11, "(function process none)"],
[59, "(function process none)"],
[56, "(function process-drawable none)"]
]
}
+10 -3
View File
@@ -117,7 +117,6 @@
// "reset-target-tracking",
"(anon-function 1 target)",
"find-nearest-entity",
"target-land-effect",
"(method 12 effect-control)",
"(method 11 effect-control)",
@@ -212,7 +211,13 @@
"(method 28 editable)",
"execute-select",
"(method 29 editable)",
"(method 25 editable)"
"(method 25 editable)",
"(method 17 load-state)",
"(method 12 level)",
"bg",
"update-sound-banks",
"entity-remap-names"
],
// If format is used with the wrong number of arguments,
@@ -263,7 +268,9 @@
"point-poly-distance-min": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
"(method 34 nav-mesh)": [1, 2, 3, 7],
"(method 35 nav-mesh)": [2, 4],
"(method 18 mysql-nav-graph)": [0, 1, 3, 4, 5, 9]
"(method 18 mysql-nav-graph)": [0, 1, 3, 4, 5, 9],
"draw-actor-marks": [8],
"find-nearest-entity": [7, 9, 10, 11, 12, 13, 14]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -776,6 +776,9 @@
[16, "vector"],
[32, "vector"]
],
"(method 19 load-state)": [[16, ["inline-array", "level-buffer-state", 6]]],
"(method 17 load-state)": [[16, "script-context"]],
"(method 26 level-group)": [[64, "vector"], [80, "vector"]],
// placeholder
"placeholder-do-not-add-below": []
}
+86
View File
@@ -2179,6 +2179,92 @@
"(anon-function 54 script)": [[66, "v1", "entity-actor"]],
"(anon-function 53 script)": [[40, "v1", "entity-actor"]],
"(anon-function 71 script)": [[4, "v1", "symbol"]],
"command-get-float": [
[20, "gp", "bfloat"]
],
"command-get-int": [
[17, "gp", "bfloat"]
],
"letterbox": [
[[27, 33], "v1", "dma-packet"]
],
"blackout": [
[[18, 23], "v1", "dma-packet"]
],
"(method 12 level)": [
[[182, 185], "a0", "texture-anim-array"],
[343, "a0", "symbol"],
[93, "t9", "(function level none)"],
[[314, 322], "a1", "type"]
],
"bg": [
[47, "a0", "symbol"]
],
"(method 10 load-state)": [
[436, "v1", "level"],
[442, "v1", "level"]
],
"(method 14 level-group)": [
[[53, 61], "a0", "entity-actor"]
],
"(method 27 level-group)": [
[[112, 122], "s3", "entity-actor"],
["_stack_", 32, "vector"],
["_stack_", 36, "vector"]
],
"expand-vis-box-with-point":[
[[10, 40], "v1", "(inline-array vector)"]
],
"check-for-rougue-process": [
[[103,115], "v1", "part-tracker"],
[[126, 140], "v1", "part-spawner"],
[[153, 169], "v1", "process-drawable"],
[[178, 194], "v1", "process-drawable"]
],
"process-drawable-scale-from-entity!": [
[15, "v1", "vector"]
],
"reset-actors": [
[161, "s3", "(function level symbol none)"]
],
"process-status-bits": [
[[12, 58], "s3", "process-drawable"]
],
"(method 26 level-group)": [
[134, "v0", "(pointer actor-group)"],
// [135, "s2", "actor-group"],
// [140, "v1", "(pointer uint32)"],
[37, "f0", "float"],
[40, "f0", "float"],
[83, "f0", "float"],
[86, "f0", "float"],
["_stack_", 48, "res-tag"],
["_stack_", 20, "vector"],
["_stack_", 24, "vector"]
],
"set-graphics-mode": [
[[0, 100], "gp", "gs-bank"]
],
"(method 3 entity-nav-mesh)": [
[7, "t9", "(function object object)"]
],
"draw-actor-marks": [
[20, "gp", "part-spawner"],
[[29, 273], "gp", "process-drawable"],
["_stack_", 20, "(pointer int32)"]
],
"(method 15 level-group)": [
[[233, 252], "s0", "process-drawable"],
[[281, 427], "s5", "process-drawable"],
[[627, 631], "a0", "drawable-region-prim"],
[625, "a0", "drawable-inline-array-region-prim"],
[639, "a0", "drawable-inline-array-region-prim"],
[688, "a0", "drawable-inline-array-region-prim"],
[705, "a0", "drawable-inline-array-region-prim"],
[[690, 694], "a0", "drawable-region-prim"]
],
// placeholder
"placeholder-do-not-add-below": []
}
+68
View File
@@ -995,5 +995,73 @@
"s1-2": ["nav-edge", "mysql-nav-edge"],
"s1-4": ["nav-visnode", "mysql-nav-visnode"]
}
},
"(method 18 level)": {
"vars": {
"s5-0" :"mem-mode",
"v1-5":"slot-in-borrow-from-lev",
"a0-4":"borrow-from-lev-idx",
"a1-3":"maybe-borrow-from-lev",
"a2-5":"check-slot-idx",
"a2-7":"found-borrow",
"a1-4":"borrow-from-lev",
"s2-0":"memory-unused?",
"v1-17":"bits-to-use",
"s4-0":"heap-size",
"s3-0":"offset-in-level-heap"
}
},
"level-update-after-load": {
"args": ["lev", "lstate"],
"vars": {
"s3-0":"drawable-trees",
"s5-0":"start-time",
"v1-5":"current-time",
"s1-0":"login-state-pos",
"s2-0":"current-tree",
"s1-1":"tree-array-idx",
"v1-40":"art-group-array-idx",
"s2-1":"current-ag",
"s0-0":"current-array",
"s2-3":"proto-array",
"s0-1":"protos",
"sv-32":"proto",
"sv-48":"geom-idx",
"a0-56":"geom",
"s1-2":"proto2-idx",
"v1-134":"proto2",
"s0-2":"envmap-shader",
"v0-7":"envmap-tex",
"v1-155":"lev-bsp",
"f0-6":"close-dist",
"f1-3":"far-dist",
"v1-122":"borrower-idx",
"a0-104":"borrower-heap",
"v1-225":"end-time"
}
},
"(method 10 load-state)": {
"vars": {
"v1-0":"discarded-level",
"s5-0":"most-recent-load-order",
"s4-0":"unload-attempt",
"a0-2":"unload-idx",
"a1-0":"unload-candidate-idx",
"a2-3":"unload-candidate-lev",
"a3-5":"still-wanted",
"s3-0":"lev-to-unload",
"a0-10":"all-levels-inactive",
"s5-1":"no-levels-at-all",
"v1-8":"desired-levels",
"a0-17":"want-lev-idx",
"s4-1":"want-lev-idx-to-load",
"s3-1":"new-lev",
"s5-2":"want-lev-i",
"s4-2":"lev-i",
"s3-2":"lev",
"v1-122":"lev-for-vis",
"a0-53":"num-vis-levs"
}
}
}
+1 -1
View File
@@ -7,7 +7,7 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"allowed_objects": ["level", "bsp", "entity", "process-drawable"],
"banned_objects": ["effect-control", "time-of-day"],
////////////////////////////
+15
View File
@@ -2463,6 +2463,21 @@ void CallOp::propagate_types2(types2::Instruction& instr,
out_types[Register(Reg::GPR, Reg::V0)]->type = TP_Type::make_from_ts(in_type.last_arg());
if (in_tp.kind == TP_Type::Kind::NON_OBJECT_NEW_METHOD &&
in_type.last_arg() == TypeSpec("array") && input_types[Register(Reg::GPR, arg_regs[2])]) {
// array new:
auto& a2 = input_types[Register(Reg::GPR, arg_regs[2])];
auto& a1 = input_types[Register(Reg::GPR, arg_regs[1])];
// the is_symbol() check here makes sure it's a symbol known at compile time.
if (a2->type && a2->type->kind == TP_Type::Kind::TYPE_OF_TYPE_NO_VIRTUAL && a1->type &&
a1->type->is_symbol()) {
out_types[Register(Reg::GPR, Reg::V0)]->type = TP_Type::make_from_ts(TypeSpec(
"array",
{input_types[Register(Reg::GPR, arg_regs[2])]->type->get_type_objects_typespec()}));
}
}
// we can also update register usage here.
m_read_regs.clear();
m_arg_vars.clear();
+6
View File
@@ -82,6 +82,8 @@ std::string TP_Type::print() const {
return "<run-function-in-process-func>";
case Kind::GET_ART_BY_NAME_METHOD:
return "<get-art-by-name-method>";
case Kind::SYMBOL:
return fmt::format("<sym {}>", m_str);
case Kind::INVALID:
default:
ASSERT(false);
@@ -137,6 +139,8 @@ bool TP_Type::operator==(const TP_Type& other) const {
return m_pcpyud == other.m_pcpyud && m_ts == other.m_ts;
case Kind::PCPYUD_BITFIELD_AND:
return m_pcpyud == other.m_pcpyud && m_ts == other.m_ts;
case Kind::SYMBOL:
return m_str == other.m_str;
case Kind::LABEL_ADDR:
case Kind::ENTER_STATE_FUNCTION:
case Kind::RUN_FUNCTION_IN_PROCESS_FUNCTION:
@@ -213,6 +217,8 @@ TypeSpec TP_Type::typespec() const {
return TypeSpec("function");
case Kind::GET_ART_BY_NAME_METHOD:
return m_ts;
case Kind::SYMBOL:
return TypeSpec("symbol");
case Kind::INVALID:
default:
ASSERT(false);
+10
View File
@@ -43,6 +43,7 @@ class TP_Type {
RUN_FUNCTION_IN_PROCESS_FUNCTION,
SET_TO_RUN_FUNCTION,
GET_ART_BY_NAME_METHOD,
SYMBOL,
INVALID
} kind = Kind::UNINITIALIZED;
TP_Type() = default;
@@ -77,6 +78,7 @@ class TP_Type {
case Kind::SET_TO_RUN_FUNCTION:
case Kind::GET_ART_BY_NAME_METHOD:
case Kind::NON_OBJECT_NEW_METHOD:
case Kind::SYMBOL:
return false;
case Kind::UNINITIALIZED:
case Kind::OBJECT_NEW_METHOD:
@@ -100,6 +102,7 @@ class TP_Type {
}
bool is_format_string() const { return kind == Kind::FORMAT_STRING; }
bool can_be_format_string() const { return is_format_string() || is_constant_string(); }
bool is_symbol() const { return kind == Kind::SYMBOL; }
int get_format_string_arg_count() const {
ASSERT(is_format_string());
@@ -176,6 +179,13 @@ class TP_Type {
return result;
}
static TP_Type make_symbol(const std::string& name) {
TP_Type result;
result.kind = Kind::SYMBOL;
result.m_str = name;
return result;
}
static TP_Type make_uninitialized() {
TP_Type result;
result.kind = Kind::UNINITIALIZED;
@@ -88,8 +88,11 @@ void OpenGLRenderer::init_bucket_renderers_jak2() {
m_bucket_renderers.resize((int)BucketId::MAX_BUCKETS);
m_bucket_categories.resize((int)BucketId::MAX_BUCKETS, BucketCategory::OTHER);
init_bucket_renderer<DirectRenderer>("debug-no-zbuf", BucketCategory::OTHER,
BucketId::DEBUG_NO_ZBUF, 0x8000);
init_bucket_renderer<DirectRenderer>("debug-no-zbuf1", BucketCategory::OTHER,
BucketId::DEBUG_NO_ZBUF1, 0x8000);
init_bucket_renderer<DirectRenderer>("debug-no-zbuf2", BucketCategory::OTHER,
BucketId::DEBUG_NO_ZBUF2, 0x8000);
init_bucket_renderer<DirectRenderer>("debug3", BucketCategory::OTHER, BucketId::DEBUG3, 0x8000);
// for now, for any unset renderers, just set them to an EmptyBucketRenderer.
for (size_t i = 0; i < m_bucket_renderers.size(); i++) {
+2 -1
View File
@@ -79,7 +79,8 @@ enum class BucketId {
}
namespace jak2 {
enum class BucketId { DEBUG_NO_ZBUF = 325, MAX_BUCKETS = 327 };
enum class BucketId { DEBUG_NO_ZBUF1 = 318, DEBUG_NO_ZBUF2 = 325, DEBUG3 = 326, MAX_BUCKETS = 327 };
}
enum class BucketCategory {
+16
View File
@@ -426,6 +426,22 @@ int ShutdownMachine() {
Ptr<MouseInfo> MouseGetData(Ptr<MouseInfo> mouse) {
// stubbed out in the actual game
static double px = 0;
static double py = 0;
mouse->active = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
mouse->valid = offset_of_s7() + jak2_symbols::FIX_SYM_TRUE;
mouse->status = 1;
mouse->button0 = 0;
// TODO: actually hook these up.
double last_cursor_x_position = 0;
double last_cursor_y_position = 0;
mouse->deltax = last_cursor_x_position - px;
mouse->deltay = last_cursor_y_position - py;
px = last_cursor_x_position;
py = last_cursor_y_position;
return mouse;
}
+34 -1
View File
@@ -1,5 +1,7 @@
#pragma once
#include "common/common_types.h"
namespace jak2 {
void InitParms(int argc, const char* const* argv);
void InitIOP();
@@ -7,5 +9,36 @@ int InitMachine();
int ShutdownMachine();
void InitMachineScheme();
struct MouseInfo {};
struct MouseInfo {
// ((active symbol :offset-assert 4)
u32 active;
// (cursor basic :offset-assert 8)
u32 cursor;
// (valid symbol :offset-assert 12)
u32 valid;
// (id uint8 :offset-assert 16)
u8 id;
u8 pad;
// (status uint16 :offset-assert 18)
u16 status;
// (button0 uint16 :offset-assert 20)
u16 button0;
// (deltax int8 :offset-assert 22)
s8 deltax;
// (deltay int8 :offset-assert 23)
s8 deltay;
// (wheel uint8 :offset-assert 24)
u8 wheel;
// (change-time time-frame :offset-assert 32)
// (button0-abs uint32 3 :offset-assert 40)
// (button0-shadow-abs uint32 1 :offset-assert 52)
// (button0-rel uint32 3 :offset-assert 56)
// (pos vector 2 :inline :offset-assert 80)
// (posx float :offset 80)
// (posy float :offset 84)
// (oldposx float :offset 96 :do-not-decompile)
// (oldposy float :offset 100)
// (speedx float :offset 92)
// (speedy float :offset 108)
};
} // namespace jak2
+2 -2
View File
@@ -1652,7 +1652,7 @@ int InitHeapAndSymbol() {
make_function_symbol_from_c("kmemclose", (void*)kmemclose);
make_function_symbol_from_c("new-dynamic-structure", (void*)new_dynamic_structure);
make_function_symbol_from_c("method-set!", (void*)method_set);
make_function_symbol_from_c("link", (void*)link_and_exec);
make_stack_arg_function_symbol_from_c("link", (void*)link_and_exec);
make_function_symbol_from_c("link-busy?", (void*)link_busy);
make_function_symbol_from_c("link-reset", (void*)link_reset);
make_function_symbol_from_c("dgo-load", (void*)load_and_link_dgo);
@@ -1660,7 +1660,7 @@ int InitHeapAndSymbol() {
make_raw_function_symbol_from_c("memcpy-and-rellink", 0);
make_raw_function_symbol_from_c("symlink2", 0);
make_raw_function_symbol_from_c("symlink3", 0);
make_function_symbol_from_c("link-begin", (void*)link_begin);
make_stack_arg_function_symbol_from_c("link-begin", (void*)link_begin);
make_function_symbol_from_c("link-resume", (void*)link_resume);
make_function_symbol_from_c("sql-query", (void*)sql_query_sync);
make_function_symbol_from_c("mc-run", (void*)MC_run);
+8
View File
@@ -91,6 +91,10 @@ u32 Thread_Loader() {
}
void* RPC_Player(unsigned int /*fno*/, void* data, int size) {
if (g_game_version == GameVersion::Jak2) {
printf("RPC_Player skip\n");
return nullptr;
}
if (gSoundEnable) {
gFreeMem = QueryTotalFreeMemSize();
if (!PollSema(gSema)) {
@@ -353,6 +357,10 @@ void* RPC_Player(unsigned int /*fno*/, void* data, int size) {
}
void* RPC_Loader(unsigned int /*fno*/, void* data, int size) {
if (g_game_version == GameVersion::Jak2) {
printf("RPC_Loader skip\n");
return nullptr;
}
int n_messages = size / SRPC_MESSAGE_SIZE;
SoundRpcCommand* cmd = (SoundRpcCommand*)(data);
if (gSoundEnable) {
-114
View File
@@ -1,114 +0,0 @@
(defun hack-update-camera ((location vector) (inv-rot matrix))
"Debugging function to set the camera's position and orientation"
;; update to compute the perspective matrix.
(update-math-camera
*math-camera*
'ntsc
'aspect4x3
(-> *math-camera* fov)
)
;; copy the input rotation
(matrix-copy! (-> *math-camera* inv-camera-rot) inv-rot)
;; inverse of rotation matrix matrix is its transpose
(matrix-transpose! (-> *math-camera* camera-rot) (-> *math-camera* inv-camera-rot))
;; fake some value here
(set! (-> *math-camera* fov-correction-factor) 1.0)
;; do the math
(set! (-> *math-camera* trans quad) (-> location quad))
(let ((cam-temp (-> *math-camera* camera-temp))
(cam-rot (-> *math-camera* camera-rot))
(inv-cam-rot (-> *math-camera* inv-camera-rot))
(cam-trans (-> *math-camera* trans))
)
(let ((rotated-trans (new-stack-vector0)))
(set! (-> rotated-trans x) (- (-> cam-trans x)))
(set! (-> rotated-trans y) (- (-> cam-trans y)))
(set! (-> rotated-trans z) (- (-> cam-trans z)))
(set! (-> rotated-trans w) 1.0)
(vector-matrix*! rotated-trans rotated-trans cam-rot)
(set! (-> cam-rot vector 3 quad) (-> rotated-trans quad))
)
(matrix*! cam-temp cam-rot (-> *math-camera* perspective))
(set! (-> inv-cam-rot vector 3 quad) (-> cam-trans quad))
;; fixes it!
;(set! (-> *math-camera* camera-temp data 15) -6.)
)
(none)
)
(defun test-function ((iter int))
"This function draws the debug stuff. You can edit this, then reload this file to play with it."
;; val will increase from 0 to 1, then reset back to 0.
(let* ((frame (the float (mod (* 4 iter) 1600)))
(val (/ frame 1600.0)))
(format *stdcon* "~0kval ~f~%" val)
;; orbit the camera around in a circle with radius 5 m.
(let* ((rad (meters 5.0))
(x (* rad (sin (* (degrees 360.0) val))))
(z (* rad (cos (* (degrees 360.0) val))))
(cam-pos (new 'stack 'vector))
(cam-inv-rot (new 'stack 'matrix))
)
;; this matrix will look directly at the origin...
(set! (-> cam-pos x) x)
(set! (-> cam-pos z) z)
(set! (-> cam-pos y) (meters 1.))
(forward-down->inv-matrix cam-inv-rot cam-pos (new 'static 'vector :y 1.0))
;; if the camera is here.
(set! (-> cam-pos x) (- 0. x))
(set! (-> cam-pos z) (- 0. z))
(set! (-> cam-pos y) (meters -3.))
(hack-update-camera cam-pos cam-inv-rot)
;; create some test points
(let ((p0 (new 'static 'vector :x (meters .8) :y (meters .2) :z (meters 2.0)))
(p1 (new 'static 'vector :x (meters .3) :y (meters .3) :z (meters 2.5)))
(p2 (new 'static 'vector :x (meters .5) :y (meters .7) :z (meters 1.5)))
(b0 (new 'static 'vector :x (meters .5) :y (meters .5) :z (meters .5)))
(b1 (new 'static 'vector :x (meters -.5) :y (meters -.5) :z (meters -.5)))
)
(add-debug-cross #t (bucket-id debug-no-zbuf) (new 'static 'vector) (meters 2.0))
(add-debug-box #t (bucket-id debug-no-zbuf) p0 p2 (new 'static 'rgba :b #x80 :r #x80 :g #x80 :a #x80))
(add-debug-flat-triangle #t (bucket-id debug-no-zbuf) p0 p1 p2 (new 'static 'rgba :r #x80 :a #x80))
(add-debug-text-3d #t (bucket-id debug-no-zbuf) "triangle!" p0 (the font-color 1) (the vector2h #f))
(add-debug-sphere #t (bucket-id debug-no-zbuf) p0 (meters 0.5) (new 'static 'rgba :r #x80 :a #x80))
(add-debug-line-sphere #t (bucket-id debug-no-zbuf)
(new 'static 'vector :x (meters 0.8))
(new 'static 'vector :y (meters -4.0))
(meters 1.0) (new 'static 'rgba :r #x40 :g #x80 :a #x80))
)
)
)
(none)
)
(defun launch-test-process ()
"Call this to launch a process that draws the debug demo"
(let ((proc (get-process *nk-dead-pool* process 1024)))
(activate proc *active-pool* "test" *kernel-dram-stack*)
(run-next-time-in-process proc (lambda ()
(let ((iter 0))
(while #t
(test-function iter)
(suspend)
(+! iter 1)
)
)
)
)
proc)
)
+20
View File
@@ -0,0 +1,20 @@
("PRI.DGO"
("intro-texture.o" "intro-texture")
("prison-part.o" "prison-part")
("prison-obs.o" "prison-obs")
("tpage-1578.go" "tpage-1578")
("tpage-1950.go" "tpage-1950")
("tpage-1579.go" "tpage-1579")
("tpage-2647.go" "tpage-2647")
("daxter-highres-ag.go" "daxter-highres")
("prsn-torture-ag.go" "prsn-torture")
("prsn-chair-shackle-ag.go" "prsn-chair-shackle")
("prsn-hang-cell-ag.go" "prsn-hang-cell")
("warp-gate-b-ag.go" "warp-gate-b")
("prsn-vent-fan-ag.go" "prsn-vent-fan")
("fort-entry-gate-ag.go" "fort-entry-gate")
("prsn-cell-door-ag.go" "prsn-cell-door")
("prison-vis.go" "prison-vis")
)
+1 -1
View File
@@ -126,7 +126,7 @@
(defun-debug joint-mod-debug-draw ((arg0 joint-mod))
(add-debug-matrix #t (bucket-id bucket-318) (-> arg0 joint bone transform) (meters 2.0))
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2.0))
0
(none)
)
+3 -3
View File
@@ -966,7 +966,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
@@ -1090,7 +1090,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
@@ -1202,7 +1202,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
+11 -11
View File
@@ -241,7 +241,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
a2-0
(the-as (pointer dma-tag) a3-16)
)
@@ -676,7 +676,7 @@
(new 'static 'vector :z 1024.0)
(-> *cam-debug-los-tri* gp-1 intersect)
(-> *cam-debug-los-tri* gp-1 color)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -702,7 +702,7 @@
(new 'static 'vector :z 1024.0)
(-> *cam-debug-coll-tri* gp-2 intersect)
(-> *cam-debug-coll-tri* gp-2 color)
(the-as meters #x44800000)
(meters 0.25)
)
)
#f
@@ -949,7 +949,7 @@
(new 'static 'vector :z 1024.0)
s3-0
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
(tracking-spline-method-19 obj (-> obj sample-len) s3-0 (the-as tracking-spline-sampler #f))
(camera-cross
@@ -957,7 +957,7 @@
(new 'static 'vector :z 1024.0)
s3-0
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -977,7 +977,7 @@
(new 'static 'vector :z 1024.0)
(the-as vector (-> obj point s5-0))
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -1109,7 +1109,7 @@
(new 'static 'vector :z 1024.0)
(-> *setting-control* cam-current point-of-interest)
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
(let ((f30-0 (* 0.5 (-> *camera-combiner* fov))))
@@ -1462,7 +1462,7 @@
(set! (-> a0-3 w) 1.0)
(vector+! a1-4 v1-4 a0-3)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
(add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
(let ((a1-7 s5-0)
(v1-5 gp-0)
(a0-5 s5-0)
@@ -1473,7 +1473,7 @@
(set! (-> a0-5 w) 1.0)
(vector+! a1-7 v1-5 a0-5)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :g #xff :a #x80) #f (the-as rgba -1))
(add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :g #xff :a #x80) #f (the-as rgba -1))
(let ((a1-10 s5-0)
(v1-6 gp-0)
(a0-7 s5-0)
@@ -1484,14 +1484,14 @@
(set! (-> a0-7 w) 1.0)
(vector+! a1-10 v1-6 a0-7)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :b #xff :a #x80) #f (the-as rgba -1))
(add-debug-line #t (bucket-id debug-no-zbuf1) gp-0 s5-0 (new 'static 'rgba :b #xff :a #x80) #f (the-as rgba -1))
(when arg0
(set! (-> s5-0 quad) (-> arg0 quad))
(vector-normalize! s5-0 4096.0)
(vector+! s5-0 gp-0 s5-0)
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
gp-0
s5-0
(new 'static 'rgba :r #x7f :g #x7f :a #x80)
+11 -11
View File
@@ -296,7 +296,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-324)
(bucket-id debug2)
gp-0
(the-as (pointer dma-tag) a3-2)
)
@@ -721,7 +721,7 @@
(new 'static 'vector :z 1024.0)
s5-0
(-> arg1 color)
(the-as meters #x45800000)
(meters 1.0)
)
)
(none)
@@ -748,7 +748,7 @@
(new 'static 'vector :z 1024.0)
s5-0
(-> arg1 color)
(the-as meters #x45800000)
(meters 1.0)
)
)
(none)
@@ -778,7 +778,7 @@
(new 'static 'vector :z 1024.0)
s5-1
(new 'static 'vector4w :x #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -791,7 +791,7 @@
(new 'static 'vector :z 1024.0)
s5-2
(new 'static 'vector4w :y #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -806,7 +806,7 @@
(new 'static 'vector :z 1024.0)
s5-3
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -857,7 +857,7 @@
(new 'static 'vector :z 1024.0)
s5-4
(new 'static 'vector4w :x #xff :y #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -900,7 +900,7 @@
(new 'static 'vector :z 1024.0)
s5-5
(new 'static 'vector4w :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue 0.0) s3-2)
(vector+! s5-5 s5-5 s4-2)
@@ -909,7 +909,7 @@
(new 'static 'vector :z 1024.0)
s5-5
(new 'static 'vector4w :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -939,7 +939,7 @@
(new 'static 'vector :z 1024.0)
s5-6
(new 'static 'vector4w :x #xff :y #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -965,7 +965,7 @@
(new 'static 'vector :z 1024.0)
s5-7
(new 'static 'vector4w :y #xff :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
+1 -1
View File
@@ -1007,7 +1007,7 @@
(let ((t1-0 #x40000080))
(add-debug-flat-triangle
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(the-as vector (-> (the-as (inline-array collide-cache-tri) gp-0) 0))
(-> (the-as (inline-array collide-cache-tri) gp-0) 0 vertex 1)
(-> (the-as (inline-array collide-cache-tri) gp-0) 0 vertex 2)
@@ -90,3 +90,4 @@
)
(define-extern *anim-tester* (pointer anim-tester))
(set! *anim-tester* #f) ;; temp
+2 -2
View File
@@ -1558,7 +1558,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-324)
(bucket-id debug2)
tag-start
(the-as (pointer dma-tag) tag-end)
)
@@ -1705,7 +1705,7 @@
(if (!= (+ i 1) (-> history h-first))
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> history points i)
(-> history points (+ i 1))
(new 'static 'rgba :r #x80 :g #xc0 :b #x80 :a #x80)
+45 -31
View File
@@ -1184,8 +1184,8 @@
(string= (the-as string s5-1) "outro-nest")
)
)
(set! (-> palout memory-mode) (the-as uint 4))
(set! (-> hiphog memory-mode) (the-as uint 1))
(set! (-> palout memory-mode) (load-buffer-mode borrow))
(set! (-> hiphog memory-mode) (load-buffer-mode small-center))
)
(process-spawn scene-player :init scene-player-init s5-1 #t (car arg0))
)
@@ -3325,11 +3325,11 @@
#f
(lambda ((arg0 object) (arg1 debug-menu-msg))
(if (= arg1 (debug-menu-msg press))
(set! (-> *setting-control* user-default unknown-uint32-00)
(the-as uint (not (-> *setting-control* user-default unknown-uint32-00)))
(set! (-> *setting-control* user-default use-progressive-scan)
(not (-> *setting-control* user-default use-progressive-scan))
)
)
(-> *setting-control* user-default unknown-uint32-00)
(-> *setting-control* user-default use-progressive-scan)
)
)
(flag
@@ -5871,8 +5871,15 @@
)
)
)
(debug-menu-append-item s5-0 (debug-menu-make-task-menu arg0))
(debug-menu-append-item s5-0 (the-as debug-menu-node (debug-menu-make-play-menu (the-as symbol arg0))))
;; added these checks
(when (nonzero? (-> *game-info* sub-task-list))
(debug-menu-append-item s5-0 (debug-menu-make-task-menu arg0))
)
(when (nonzero? (-> *game-info* play-list))
(debug-menu-append-item s5-0 (the-as debug-menu-node (debug-menu-make-play-menu (the-as symbol arg0))))
)
)
arg0
)
@@ -5997,36 +6004,43 @@
arg0
)
;; NOTE - disabled for now to prevent a crash at startup
;; The debug menu stuff accesses a lot of stuff that is currently undefined, which will crash the game
;; (debug-menu-context-make-default-menus *debug-menu-context*)
;; (popup-menu-context-make-default-menus *popup-menu-context*)
(debug-menu-context-make-default-menus *debug-menu-context*)
(popup-menu-context-make-default-menus *popup-menu-context*)
(defun menu-respond-to-pause ()
(case *master-mode*
(('menu)
(cond
((and (cpad-hold? 0 l3) (cpad-hold? 0 select))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
((and (cpad-hold? 1 start) *editable*)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
((and (cpad-hold? 0 l3) (cpad-hold? 0 start))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
)
(('menu)
(cond
((and (cpad-hold? 0 l3) (cpad-hold? 0 select))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
;; added
(when (nonzero? *editable-menu-context*)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
((and (cpad-hold? 1 start) *editable*)
(when (nonzero? *editable-menu-context*)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
)
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
((and (cpad-hold? 0 l3) (cpad-hold? 0 start))
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg activate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(when (nonzero? *editable-menu-context*)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
)
)
(else
(debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
(when (nonzero? *editable-menu-context*)
(debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation))
)
)
)
#f
+7 -7
View File
@@ -125,7 +125,7 @@
(defmethod editable-region-method-11 editable-region ((obj editable-region) (arg0 vector) (arg1 int))
(local-vars (sv-32 vector2h))
(set! sv-32 (new 'stack 'vector2h))
(add-debug-x #t (bucket-id bucket-318) arg0 (the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0)))
(add-debug-x #t (bucket-id debug-no-zbuf1) arg0 (the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0)))
(let ((s3-0 add-debug-text-3d)
(s2-0 #t)
(s1-0 318)
@@ -329,12 +329,12 @@
(let ((s5-0 (new 'stack-no-clear 'vector)))
(when (editable-method-11 obj s5-0)
(set! (-> s5-0 y) (-> s5-0 y))
(add-debug-x #t (bucket-id bucket-318) s5-0 (the-as rgba (-> (new 'static 'array uint64 1 #x80ffffff) 0)))
(add-debug-x #t (bucket-id debug-no-zbuf1) s5-0 (the-as rgba (-> (new 'static 'array uint64 1 #x80ffffff) 0)))
)
)
(add-debug-x
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
)
@@ -666,7 +666,7 @@
)
)
(add-debug-sphere-from-table
(bucket-id bucket-324)
(bucket-id debug2)
(-> obj trans)
(-> obj radius)
(get-color obj (the-as int a1-0))
@@ -974,7 +974,7 @@
(if (!= (-> obj direction w) 0.0)
(add-debug-vector
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
(-> obj direction)
(* -1.2 (-> obj radius))
@@ -1160,7 +1160,7 @@
(let ((s1-0 (editable-face-method-31 obj (new 'stack-no-clear 'vector))))
(add-debug-vector
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
s1-0
(the-as meters #x46000000)
@@ -1473,7 +1473,7 @@
(when (>= s4-0 3)
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans (-> obj vertex 0))
(edit-get-trans (-> obj vertex 1))
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
+7 -6
View File
@@ -529,6 +529,7 @@
(defun debug-menu-item-get-max-width ((arg0 debug-menu-item) (arg1 debug-menu))
(local-vars (v0-1 int))
0
(cond
((= (-> arg0 type) debug-menu-item-submenu)
(set! v0-1 (+ (the int (-> (get-string-length (-> arg0 name) (-> arg1 context font)) length)) 16))
@@ -919,7 +920,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
s4-0
(the-as (pointer dma-tag) a3-1)
)
@@ -968,7 +969,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
s5-0
(the-as (pointer dma-tag) a3-1)
)
@@ -1017,7 +1018,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
s5-0
(the-as (pointer dma-tag) a3-1)
)
@@ -1085,7 +1086,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
s4-0
(the-as (pointer dma-tag) a3-1)
)
@@ -1156,7 +1157,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
s1-0
(the-as (pointer dma-tag) a3-2)
)
@@ -1193,7 +1194,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-unknown-326)
(bucket-id debug3)
sv-32
(the-as (pointer dma-tag) a3-3)
)
+37 -39
View File
@@ -27,45 +27,43 @@
(define *vif-disasm-table*
(the-as (array vif-disasm-element)
(new 'static 'boxed-array :type vif-disasm-element
(new 'static 'vif-disasm-element :mask #x7f :string1 "nop")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print #x2 :string1 "stcycl")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 offset) :print #x1 :string1 "offset" :string2 "offset")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 base) :print #x1 :string1 "base" :string2 "base")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 itop) :print #x1 :string1 "itop" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stmod) :print #x1 :string1 "stmod" :string2 "mode")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mskpath3) :print #x1 :string1 "mskpath3" :string2 "mask")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mark) :print #x1 :string1 "mark" :string2 "mark")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flushe) :string1 "flushe")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flush) :string1 "flush")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flusha) :string1 "flusha")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscal) :print #x1 :string1 "mscal" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscnt) :string1 "mscnt")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscalf) :print #x1 :string1 "mscalf" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stmask) :print #x3 :string1 "stmask" :string2 "mask")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 strow) :print #x4 :string1 "strow" :string2 "row")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcol) :print #x4 :string1 "stcol" :string2 "col")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mpg) :print #x5 :string1 "mpg")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 direct) :print #x6 :string1 "direct")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 directhl) :print #x6 :string1 "directhl")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-32) :val #x10 :print #x7 :string1 "unpack-s-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-16) :val #x8 :print #x7 :string1 "unpack-s-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-8) :val #x4 :print #x7 :string1 "unpack-s-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-32) :val #x8 :print #x7 :string1 "unpack-v2-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-16) :val #x4 :print #x7 :string1 "unpack-v2-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-8) :val #x2 :print #x7 :string1 "unpack-v2-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-32) :val #xc :print #x7 :string1 "unpack-v3-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-16) :val #x6 :print #x7 :string1 "unpack-v3-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-8) :val #x3 :print #x7 :string1 "unpack-v3-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-32) :val #x10 :print #x7 :string1 "unpack-v4-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-16) :val #x8 :print #x7 :string1 "unpack-v4-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-8) :val #x4 :print #x7 :string1 "unpack-v4-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-5) :val #x2 :print #x7 :string1 "unpack-v4-5")
(new 'static 'vif-disasm-element :print #x8)
)
)
)
(new 'static 'boxed-array :type vif-disasm-element
(new 'static 'vif-disasm-element :mask #x7f :string1 "nop")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print #x2 :string1 "stcycl")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 offset) :print #x1 :string1 "offset" :string2 "offset")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 base) :print #x1 :string1 "base" :string2 "base")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 itop) :print #x1 :string1 "itop" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stmod) :print #x1 :string1 "stmod" :string2 "mode")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mskpath3) :print #x1 :string1 "mskpath3" :string2 "mask")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mark) :print #x1 :string1 "mark" :string2 "mark")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flushe) :string1 "flushe")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flush) :string1 "flush")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flusha) :string1 "flusha")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscal) :print #x1 :string1 "mscal" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscnt) :string1 "mscnt")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscalf) :print #x1 :string1 "mscalf" :string2 "addr")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stmask) :print #x3 :string1 "stmask" :string2 "mask")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 strow) :print #x4 :string1 "strow" :string2 "row")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcol) :print #x4 :string1 "stcol" :string2 "col")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mpg) :print #x5 :string1 "mpg")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 direct) :print #x6 :string1 "direct")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 directhl) :print #x6 :string1 "directhl")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-32) :val #x10 :print #x7 :string1 "unpack-s-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-16) :val #x8 :print #x7 :string1 "unpack-s-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-s-8) :val #x4 :print #x7 :string1 "unpack-s-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-32) :val #x8 :print #x7 :string1 "unpack-v2-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-16) :val #x4 :print #x7 :string1 "unpack-v2-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v2-8) :val #x2 :print #x7 :string1 "unpack-v2-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-32) :val #xc :print #x7 :string1 "unpack-v3-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-16) :val #x6 :print #x7 :string1 "unpack-v3-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v3-8) :val #x3 :print #x7 :string1 "unpack-v3-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-32) :val #x10 :print #x7 :string1 "unpack-v4-32")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-16) :val #x8 :print #x7 :string1 "unpack-v4-16")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-8) :val #x4 :print #x7 :string1 "unpack-v4-8")
(new 'static 'vif-disasm-element :mask #x6f :tag (vif-cmd-32 unpack-v4-5) :val #x2 :print #x7 :string1 "unpack-v4-5")
(new 'static 'vif-disasm-element :print #x8)
)
)
(defun disasm-vif-details ((arg0 symbol) (arg1 (pointer uint8)) (arg2 vif-cmd) (arg3 int))
(let ((s4-0 arg3))
+2
View File
@@ -16,6 +16,8 @@
(define-extern prototype-bucket-type (function prototype-bucket type))
(define-extern print-prototype-list (function none))
(define-extern prototype-bucket-recalc-fields (function prototype-bucket prototype-bucket))
(define-extern determine-pause-mode (function int))
;; DECOMP BEGINS
+310 -14
View File
@@ -7,14 +7,272 @@
;; DECOMP BEGINS
;; sphere-cull
;; guard-band-cull
;; sphere-in-view-frustum?
;; line-in-view-frustum?
;; vis-cull
;; error-sphere
;; TODO
(defmacro spr-work ()
`(the work-area *fake-scratchpad-data*))
(defun sphere-cull ((arg0 vector))
"Is the given sphere in the view frustum?"
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf10 :class vf)
(vf16 :class vf)
(vf17 :class vf)
(vf18 :class vf)
(vf19 :class vf)
(vf9 :class vf)
)
;; modified for PC: these register would be loaded by the draw method of bsp.
(let ((at-0 *math-camera*))
(.lvf vf16 (&-> at-0 guard-plane 0 quad))
(.lvf vf17 (&-> at-0 guard-plane 1 quad))
(.lvf vf18 (&-> at-0 guard-plane 2 quad))
(.lvf vf19 (&-> at-0 guard-plane 3 quad))
)
(init-vf0-vector)
(.lvf vf10 (&-> arg0 quad))
(.mul.x.vf acc vf16 vf10)
(.add.mul.y.vf acc vf17 vf10 acc)
(.add.mul.z.vf acc vf18 vf10 acc)
(.sub.mul.w.vf vf9 vf19 vf0 acc)
(.add.w.vf vf9 vf9 vf10)
(.mov v1-0 vf9)
(.pcgtw v1-1 0 v1-0)
(.ppach v1-2 (the-as uint128 0) v1-1)
(zero? (the-as int v1-2))
)
)
(defun guard-band-cull ((arg0 vector))
"Is the given sphere within the guard band, and possibly needs clipping?"
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf10 :class vf)
(vf20 :class vf)
(vf21 :class vf)
(vf22 :class vf)
(vf23 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
;; modified for PC: these registers would be loaded in dma-add-process-drawable
(let ((at-0 *math-camera*))
(.lvf vf20 (&-> at-0 guard-plane 0 quad))
(.lvf vf21 (&-> at-0 guard-plane 1 quad))
(.lvf vf22 (&-> at-0 guard-plane 2 quad))
(.lvf vf23 (&-> at-0 guard-plane 3 quad))
)
(.lvf vf10 (&-> arg0 quad))
(.mul.x.vf acc vf20 vf10)
(.add.mul.y.vf acc vf21 vf10 acc)
(.add.mul.z.vf acc vf22 vf10 acc)
(.sub.mul.w.vf vf9 vf23 vf0 acc)
(.sub.w.vf vf9 vf9 vf10)
(.mov v1-0 vf9)
(.pcgtw v1-1 0 v1-0)
(.ppach v1-2 (the-as uint128 0) v1-1)
(nonzero? (the-as int v1-2))
)
)
(defun sphere-in-view-frustum? ((arg0 sphere))
"Is the given sphere in the view frustum?
Safe to use anywhere (unlike sphere-cull, which only works if service-mouse
registers are still set from draw bsp.)
"
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
)
(init-vf0-vector)
(let ((v1-0 *math-camera*))
(.lvf vf6 (&-> arg0 quad))
(.lvf vf1 (&-> v1-0 plane 0 quad))
(.lvf vf2 (&-> v1-0 plane 1 quad))
(.lvf vf3 (&-> v1-0 plane 2 quad))
(.lvf vf4 (&-> v1-0 plane 3 quad))
)
(.mul.x.vf acc vf1 vf6)
(.add.mul.y.vf acc vf2 vf6 acc)
(.add.mul.z.vf acc vf3 vf6 acc)
(.sub.mul.w.vf vf5 vf4 vf0 acc)
(.add.w.vf vf5 vf5 vf6)
(.mov v1-1 vf5)
(.pcgtw v1-2 0 v1-1)
(.ppach v1-3 (the-as uint128 0) v1-2)
(zero? (the-as int v1-3))
)
)
(defun line-in-view-frustum? ((arg0 vector) (arg1 vector))
"Is the line segment at least partially in the view frustum?"
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a0-2 uint128) (a0-3 uint128))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf10 :class vf)
(vf16 :class vf)
(vf17 :class vf)
(vf18 :class vf)
(vf19 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(let ((v1-0 *math-camera*))
(.lvf vf9 (&-> arg0 quad))
(.lvf vf10 (&-> arg1 quad))
(.lvf vf16 (&-> v1-0 plane 0 quad))
(.lvf vf17 (&-> v1-0 plane 1 quad))
(.lvf vf18 (&-> v1-0 plane 2 quad))
(.lvf vf19 (&-> v1-0 plane 3 quad))
)
(.mul.x.vf acc vf16 vf9)
(.add.mul.y.vf acc vf17 vf9 acc)
(.add.mul.z.vf acc vf18 vf9 acc)
(.sub.mul.w.vf vf9 vf19 vf0 acc)
(.mul.x.vf acc vf16 vf10)
(.add.mul.y.vf acc vf17 vf10 acc)
(.add.mul.z.vf acc vf18 vf10 acc)
(.sub.mul.w.vf vf10 vf19 vf0 acc)
(.mov v1-1 vf9)
(.pcgtw v1-2 0 v1-1)
(.ppach v1-3 (the-as uint128 0) v1-2)
(.mov a0-1 vf10)
(.pcgtw a0-2 0 a0-1)
(.ppach a0-3 (the-as uint128 0) a0-2)
(zero? (logand (the-as int v1-3) (the-as int a0-3)))
)
)
(defun vis-cull ((id int))
"Is this thing visible in the precomputed visiblity data? By draw-node id.
Assumes the scratchpad has the vis-list loaded."
(let* ((vis-byte (-> (spr-work) background vis-list (/ id 8))) ;; vis byte
(shift-amount (+ 56 (logand id 7)))
(shifted (shl vis-byte shift-amount))
)
(< (the-as int shifted) 0)
)
)
(defun-debug vis-cull-debug ((a0-0 work-area) (id int))
"Like vis-cull, but you can specify a different work-area.
Unused."
(let* ((vis-byte (-> a0-0 background vis-list (/ id 8))) ;; vis byte
(shift-amount (+ 56 (logand id 7)))
(shifted (shl vis-byte shift-amount))
)
(< (the-as int shifted) 0)
)
)
(defun error-sphere ((arg0 drawable-error) (arg1 string))
"Draw a sphere with an error message around this drawable-error."
(when *artist-error-spheres*
(when (vis-cull (-> arg0 id))
(when (sphere-cull (-> arg0 bsphere))
(add-debug-sphere
#t
(bucket-id debug2)
(-> arg0 bsphere)
(-> arg0 bsphere w)
(new 'static 'rgba :r #x80 :a #x80)
)
(add-debug-text-3d
#t
(bucket-id debug-no-zbuf1)
arg1
(-> arg0 bsphere)
(font-color #dadada)
(the-as vector2h #f)
)
)
)
)
0
(none)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; drawable methods
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the drawable class is the base class for tons of things
;; basically anything in the a tree-like structure in the level uses this
;; so these methods are super vague and not well defined.
;; Generally, you shouldn't call any of these unless you know the type and
;; what they will do.
(defmethod login drawable ((obj drawable))
"Initialize a drawable after load."
obj
)
(defmethod draw drawable ((obj drawable) (arg0 drawable) (arg1 display-frame))
"Draw something. The meaning of this depends on the exact drawable class,
but in general the heavy work isn't here - this just adds stuff to lists."
0
(none)
)
(defmethod drawable-method-11 drawable ()
0
(none)
)
(defmethod drawable-method-12 drawable ()
0
(none)
)
(defmethod collect-regions drawable ((obj drawable) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Collect a list of regions that we're in, recursively."
0
(none)
)
(defmethod collect-stats drawable ((obj drawable))
"Collect statistics for debugging"
0
(none)
)
(defmethod debug-draw drawable ((obj drawable) (arg0 drawable) (arg1 display-frame))
"Draw debug visualizations"
0
(none)
)
(defmethod draw drawable-error ((obj drawable-error) (arg0 drawable-error) (arg1 display-frame))
"Draw a debug sphere."
(error-sphere arg0 (-> arg0 name))
0
(none)
)
(defmethod unpack-vis drawable ((obj drawable) (arg0 (pointer int8)) (arg1 (pointer int8)))
"Unpack vis data from arg1 to arg0, unpacking it. Return pointer to next thing."
arg1
)
;; instance debug
(define *edit-instance* (the-as string #f))
(when *debug-segment*
(define *instance-mem-usage* (new 'debug 'memory-usage-block))
)
;;hack
(defun find-instance-by-name ((a0-0 string))
(the prototype-bucket #f))
(defun real-main-draw-hook ()
(local-vars (a0-96 int) (a0-98 int))
@@ -33,7 +291,7 @@
;; update render/texture upload masks
(set! (-> *display* vu1-enable-user) (-> *display* vu1-enable-user-menu))
;(set! (-> *texture-pool* texture-enable-user) (-> *texture-pool* texture-enable-user-menu))
(set! (-> *texture-pool* texture-enable-user) (-> *texture-pool* texture-enable-user-menu))
;; display memory stats
; (when *debug-segment*
@@ -126,7 +384,7 @@
;; debug draw collision stuff before processing it.
(when *debug-segment*
; (debug-draw-actors *level* *display-actor-marks*)
(debug-draw-actors *level* *display-actor-marks*)
; (collide-shape-draw-debug-marks)
)
@@ -482,8 +740,8 @@
(set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) 327))
)
; (service-cpads)
; (service-mouse)
(service-cpads)
(service-mouse)
; (execute-connections *pad-engine* #f)
(none)
)
@@ -698,7 +956,7 @@
)
;; screenshot/pause stuff.
; (determine-pause-mode)
(determine-pause-mode)
; (when (and (nonzero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (!= (-> *screen-shot-work* size) -1))
; (let ((v1-77 (-> *screen-shot-work* size)))
; (set! (-> *screen-shot-work* count) (* v1-77 v1-77))
@@ -776,17 +1034,17 @@
;; initialize buckets with weird custom settings (disable z buffer)
(default-init-buffer
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1)
(new 'static 'gs-test :zte #x1 :ztst (gs-ztest always))
)
(default-init-buffer
(bucket-id debug-no-zbuf)
(bucket-id debug-no-zbuf2)
(new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1)
(new 'static 'gs-test :zte #x1 :ztst (gs-ztest always))
)
(default-init-buffer
(bucket-id bucket-321)
(bucket-id screen-filter)
(new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1)
(new 'static 'gs-test :zte #x1 :ztst (gs-ztest always))
)
@@ -840,6 +1098,44 @@
)
)
;; definition for function determine-pause-mode
(defun determine-pause-mode ()
(when (and (or (not *progress-process*) (can-go-back? (-> *progress-process* 0)))
(or (!= *master-mode* 'freeze) (and *debug-segment* (cpad-pressed? 0 select start) (cpad-hold? 0 l3)))
)
(if (or (cpad-pressed? 0 select start)
(cond
((= *master-mode* 'menu)
(cpad-pressed? 0 r3 r2 triangle circle)
)
(*cam-layout*
#f
)
(else
#f
)
)
(or (and (logtest? (-> *cpad-list* cpads 0 valid) 128)
(= *master-mode* 'game)
(>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time))
(= (-> *setting-control* user-current bg-a) 0.0)
(and (= (-> *setting-control* user-current bg-a-force) 0.0)
(< (seconds 1003) (-> *display* real-clock frame-counter))
)
)
(and (cpad-pressed? 0 r2) (or (= *master-mode* 'pause) (= *master-mode* 'menu)))
*pause-lock*
)
)
(toggle-pause)
)
)
(if (and *progress-process* (!= *master-mode* 'progress))
(deactivate-progress)
)
0
)
(defun swap-display ((arg0 display))
(display-frame-finish arg0)
(display-sync arg0)
+11 -10
View File
@@ -11,7 +11,7 @@
(bit-0 0)
(bit-1 1)
(dead 2)
(bit-3 3)
(no-kill 3)
(bit-4 4)
(bit-5 5)
(subtask-complete 6)
@@ -66,7 +66,7 @@
:size-assert #x10
:flag-assert #xa00000010
(:methods
(entity-perm-method-9 () none 9)
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
)
)
@@ -90,7 +90,7 @@
:size-assert #x40
:flag-assert #xa00000040
(:methods
(entity-links-method-9 () none 9)
(birth? (_type_ vector) symbol 9)
)
)
@@ -125,11 +125,11 @@
:size-assert #x34
:flag-assert #x1b00000034
(:methods
(entity-method-22 (_type_) _type_ 22)
(birth! (_type_) _type_ 22)
(kill! (_type_) _type_ 23)
(entity-method-24 () none 24)
(entity-method-25 () none 25)
(entity-method-26 () none 26)
(add-to-level! (_type_ level-group level actor-id) none 24)
(remove-from-level! (_type_ level-group) _type_ 25)
(get-level (_type_) level 26)
)
)
@@ -178,17 +178,18 @@
(:methods
(next-actor (_type_) entity-actor 27)
(prev-actor (_type_) entity-actor 28)
(entity-actor-method-29 () none 29)
(entity-actor-method-30 (_type_ entity-perm-status symbol) none 30)
(debug-print (_type_ symbol type) none 29)
(toggle-status (_type_ entity-perm-status symbol) none 30)
(entity-actor-method-31 (_type_ vector vector vector object float) nav-mesh 31)
(entity-actor-method-32 (_type_ vector vector nav-poly float) nav-poly 32)
)
)
(deftype actor-reference (structure)
((actor basic :offset-assert 0)
((actor entity :offset-assert 0)
(id uint32 :offset-assert 4)
)
:pack-me
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
+184 -185
View File
@@ -7,191 +7,190 @@
;; DECOMP BEGINS
(define *entity-info* (the-as (array entity-info) (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref stadium-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref citywide-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctywide-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref tomb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyslumb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctygena-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyindb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref jellyfish :method-count 167)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref widow :method-count 47)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref nav-graph :method-count 47)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref pal-electric-fan :method-count 23)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x6000
)
(new 'static 'entity-info
:ptype (type-ref lurker-pipe-lid :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyn-lamp :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref burning-bush :method-count 35)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref sail-boat-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref barge :method-count 151)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref propa :method-count 35)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref city-window-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-window-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref parking-spot :method-count 27)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref security-wall :method-count 27)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-guard-turret :method-count 39)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-fruit-stand :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref fruit-stand :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref torn :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref neon-baron :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
)
)
(define *entity-info* (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref stadium-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref citywide-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctywide-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref tomb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyslumb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctygena-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyindb-part :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref jellyfish :method-count 167)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref widow :method-count 47)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref nav-graph :method-count 47)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref pal-electric-fan :method-count 23)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x6000
)
(new 'static 'entity-info
:ptype (type-ref lurker-pipe-lid :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref ctyn-lamp :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref burning-bush :method-count 35)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref sail-boat-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref barge :method-count 151)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref propa :method-count 35)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref city-window-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-window-a :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref parking-spot :method-count 27)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref security-wall :method-count 27)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-guard-turret :method-count 39)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref cty-fruit-stand :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref fruit-stand :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref torn :method-count 179)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref neon-baron :method-count 19)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x10000
)
)
)
(defun entity-info-lookup ((arg0 type))
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -212,12 +212,12 @@
(want-display-level (_type_ symbol symbol) int 13)
(want-vis-level (_type_ symbol) none 14)
(want-force-vis (_type_ symbol symbol) int 15)
(execute-command (_type_ pair object) none 16)
(want-force-inside (_type_ symbol symbol) none 16)
(execute-commands-up-to (_type_ float) none 17)
(backup-load-state-and-set-cmds (_type_ pair) int 18)
(restore-load-state-and-cleanup (_type_) int 19)
(restore-load-state (_type_) int 20)
(set-force-inside! (_type_ symbol symbol) none 21)
(add-borrow-levels (_type_) none 21)
)
)
@@ -364,7 +364,7 @@
(game-info-method-18 () none 18)
(get-current-continue-point (_type_) continue-point 19)
(get-continue-by-name (_type_ string) continue-point 20)
(set-continue! (_type_ basic symbol) continue-point 21)
(set-continue! (_type_ basic object) continue-point 21)
(game-info-method-22 () none 22)
(game-info-method-23 () none 23)
(game-info-method-24 () none 24)
+8
View File
@@ -7,3 +7,11 @@
;; DECOMP BEGINS
(defmethod invert-analog-if-needed cpad-info ((obj cpad-info))
(when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
(set! (-> obj leftx) (- 255 (the-as int (-> obj leftx))))
(set! (-> obj rightx) (- 255 (the-as int (-> obj rightx))))
)
0
(none)
)
+5
View File
@@ -105,6 +105,9 @@
;; NOTE - for default-menu
(define-extern set-master-mode (function symbol none))
(define-extern set-blackout-frames (function time-frame none))
;; DECOMP BEGINS
;; engine debug settings
@@ -316,5 +319,7 @@
(define-extern movie? (function symbol))
(define-extern paused? (function symbol))
(define-extern set-master-mode (function symbol none))
(define-extern toggle-pause (function int))
(define-extern on (function symbol process))
(define-extern menu-respond-to-pause (function symbol))
+332 -31
View File
@@ -7,14 +7,314 @@
;; DECOMP BEGINS
(defun set-letterbox-frames ((arg0 time-frame))
"Set the remaining time until letterboxing is removed.
This uses the current clock ratio of the process and the game-clock.
This overrides any previous letterboxing."
(with-pp
(set! (-> *game-info* letterbox-time)
(+ (-> *display* base-clock frame-counter)
(the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio)))
)
)
(none)
)
)
(defun letterbox ()
"Draw letterbox bars."
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
(gp-0 (-> s5-0 base))
)
(draw-sprite2d-xy-absolute s5-0 0 0 512 46 (new 'static 'rgba :a #x80))
(draw-sprite2d-xy-absolute s5-0 0 370 512 47 (new 'static 'rgba :a #x80))
(let ((a3-2 (-> s5-0 base)))
(let ((v1-7 (the-as dma-packet (-> s5-0 base))))
(set! (-> v1-7 dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> v1-7 vif0) (new 'static 'vif-tag))
(set! (-> v1-7 vif1) (new 'static 'vif-tag))
(set! (-> s5-0 base) (the-as pointer (&+ v1-7 16)))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id screen-filter)
gp-0
(the-as (pointer dma-tag) a3-2)
)
)
)
(none)
)
(defun set-blackout-frames ((arg0 time-frame))
"Set the remaining time until blackout is removed.
Unlike letterbox, this only can increase the time, unless
you request 0, in which case blackout is disabled immediately"
(with-pp
(if (zero? arg0)
(set! (-> *game-info* blackout-time) (-> *display* base-clock frame-counter))
(set! (-> *game-info* blackout-time)
(the-as time-frame
(max (-> *game-info* blackout-time)
(+ (-> *display* base-clock frame-counter)
(the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio)))
arg0
)
)
)
)
)
(none)
)
)
(defun blackout ()
"Draw blackout over the whole screen.
This isn't used - instead they adjust some GS setting to fade the whole
screen to black, which is much faster than drawing over the entire screen."
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
(gp-0 (-> s5-0 base))
)
(draw-sprite2d-xy-absolute s5-0 0 0 512 416 (new 'static 'rgba :a #x80))
(let ((a3-1 (-> s5-0 base)))
(let ((v1-6 (the-as object (-> s5-0 base))))
(set! (-> (the-as dma-packet v1-6) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag))
(set! (-> s5-0 base) (&+ (the-as pointer v1-6) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id debug-no-zbuf2)
gp-0
(the-as (pointer dma-tag) a3-1)
)
)
)
(none)
)
(defun paused? ()
"Are we paused, or in some menu that should make us pause?"
(or (= *master-mode* 'pause) (= *master-mode* 'progress) (= *master-mode* 'menu) (= *master-mode* 'freeze))
)
(defun movie? ()
"Are we in a movie?"
(logtest? (-> *kernel-context* prevent-from-run) (process-mask movie))
)
(defun demo? ()
"Are we a demo version?"
(or (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared))
)
;; the "master-mode" is a single "mode" for the game:
;; - 'game: normal play
;; - 'pause: select pause (with PAUSE on screen)
;; - 'freeze: a pause, but without PAUSE on screen
;; - 'menu: debug menu system open
;; - 'progress: progress menu open (start menu)
(define *last-master-mode* 'game)
(defun set-master-mode ((arg0 symbol))
"Change the master mode, updating pause masks in the kernel/sound system as needed."
(when (!= arg0 *master-mode*)
(set! *last-master-mode* *master-mode*)
(set! *master-mode* arg0)
;; transition stuff:
(case *master-mode*
(('pause)
;; entering pause, set pause bit in masks
(if (not *debug-pause*)
(logior! (-> *setting-control* user-default process-mask) (process-mask pause))
)
(logclear! (-> *setting-control* user-default process-mask) (process-mask freeze menu))
(set! *pause-lock* #f)
(sound-group-pause (sound-group sfx sog1 sog2 sog3 sog4 sog5 sog6 sog7))
(set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter))
)
(('freeze)
(logior! (-> *setting-control* user-default process-mask) (process-mask freeze))
(logclear! (-> *setting-control* user-default process-mask) (process-mask pause menu))
(sound-group-pause (sound-group sfx sog4))
(set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter))
)
(('menu)
(logior! (-> *setting-control* user-default process-mask) (process-mask menu))
(logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause progress))
(sound-group-pause (sound-group sfx sog1 sog2 sog3 sog4 sog5 sog6 sog7))
(set! *pause-lock* #f)
)
(('progress)
;; entering progress, start the process
(logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu))
(sound-group-pause (sound-group sfx sog1 sog2 sog3 sog4 sog5 sog6 sog7))
(when (not *progress-process*)
(activate-progress *dproc* 'main)
(if (not *progress-process*) ;; process didn't start, back to game.
(set-master-mode 'game)
)
)
(set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter))
)
(('game)
(logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu))
(sound-group-continue (sound-group sfx sog1 sog2 sog3 sog4 sog5 sog6 sog7))
)
)
;; update from setting-control to kernel
(apply-settings *setting-control*)
)
;; tell the debug menu system we changed modes.
(if *debug-segment*
(menu-respond-to-pause)
)
0
(none)
)
(defun pause-allowed? ()
"Are you allowed to pause?"
(not (or (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time))
(!= (-> *setting-control* user-current bg-a) 0.0)
(!= (-> *setting-control* user-current bg-a-force) 0.0)
(not (-> *setting-control* user-current allow-pause))
(handle->process (-> *game-info* auto-save-proc))
(= *master-mode* 'freeze)
(not *target*)
*master-exit*
(not *common-text*)
)
)
)
(defun toggle-pause ()
"Update the current master mode because a pause has been requested.
This can reject the transition, or decide to go to any mode."
(case *master-mode*
(('game)
(set-master-mode
(cond
((and (logtest? (-> *cpad-list* cpads 0 valid) 128)
*target*
(>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time))
(= (-> *setting-control* user-current bg-a) 0.0)
(and (= (-> *setting-control* user-current bg-a-force) 0.0)
(< (seconds 1003) (-> *display* real-clock frame-counter))
)
)
;; in 'game, controller fell out, target is spawned, can pause if it's allowed, and not in progress.
(if (or *progress-process* (not (-> *setting-control* user-current allow-pause)))
*master-mode*
'pause
)
)
;; game -> debug menu when pressing select/start with L3.
((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*)
'menu
)
;; select in debug pauses (also check R2 here for the frame-advance feature)
((and (or (cpad-hold? 0 select) (cpad-hold? 0 r2)) *debug-segment*)
'pause
)
;; not debugging, not pressing start, should pause if possible
((and (not *debug-segment*) (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
(if (pause-allowed?)
'pause
*master-mode* ;; and if we can't, reject
)
)
;; if we can't open progress, fall back to pause
((not (progress-allowed?))
(if (pause-allowed?)
'pause
*master-mode* ;; otherwise reject
)
)
((cpad-hold? 0 start) ;; finally, if we're pressing start and pausing is impossible, open progress
'progress
)
(else
*master-mode* ;; otherwise reject
)
)
)
)
(('menu)
(set-master-mode (cond
((and *debug-segment* (cpad-hold? 0 l3) (cpad-pressed? 0 select start))
'menu
)
((cpad-hold? 0 select r2)
(if *debug-segment*
'pause
*master-mode*
)
)
((cpad-hold? 0 r3 r2 triangle circle)
'game
)
((cpad-hold? 0 start)
'game
)
(else
*master-mode*
)
)
)
(set! *pause-lock* #f)
)
(('pause)
(set-master-mode (cond
((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*)
'menu
)
((and (not *debug-segment*) (cpad-hold? 0 select))
'game
)
((and *cheat-mode* (cpad-hold? 0 select r2))
'game
)
((cpad-hold? 0 start)
'game
)
(else
*master-mode*
)
)
)
(set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2)))
)
(('freeze)
(set-master-mode (if (and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*)
'menu
*master-mode*
)
)
)
(('progress)
(if (cpad-hold? 0 start)
(hide-progress-screen)
)
(set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2)))
)
)
0
)
;; TODO screen filter
(define *cheat-temp* (the-as (pointer int32) (malloc 'global 20)))
(define *master-exit* #f)
(define *progress-cheat* #f)
(define *first-boot* #t)
;; TODO cheats
;; Rough loop outline:
;; (while *run*
@@ -56,7 +356,7 @@
(when *debug-segment*
;; do all debug drawing.
; (debug-draw-buffers)
(with-dma-buffer-add-bucket ((s3-0 (-> arg0 frames (-> arg0 on-screen) debug-buf)) (bucket-id debug-no-zbuf))
(with-dma-buffer-add-bucket ((s3-0 (-> arg0 frames (-> arg0 on-screen) debug-buf)) (bucket-id debug-no-zbuf2))
(when (or *display-profile* *stats-profile-bars*)
(setup-categories! (-> arg0 frames (-> arg0 on-screen) profile-array))
(let ((a2-0 7))
@@ -68,13 +368,13 @@
(draw-text! *profile-array*)
)
)
; (when *display-deci-count*
; (let ((s2-0 draw-string-xy))
; (format (clear *temp-string*) "~D" *deci-count*)
; (s2-0 *temp-string* s3-0 448 210 (font-color default-#cddbcd) (font-flags shadow))
; )
; )
; (display-file-info)
(when *display-deci-count*
(let ((s2-0 draw-string-xy))
(format (clear *temp-string*) "~D" *deci-count*)
(s2-0 *temp-string* s3-0 448 210 (font-color default-#cddbcd) (font-flags shadow))
)
)
(display-file-info)
)
)
@@ -85,7 +385,7 @@
)
)
)
(with-dma-buffer-add-bucket ((s3-0 buf) (bucket-id debug-no-zbuf))
(with-dma-buffer-add-bucket ((s3-0 buf) (bucket-id debug-no-zbuf2))
(if (and (= *master-mode* 'pause)
(and (!= *cheat-mode* 'camera) (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)))
)
@@ -173,9 +473,9 @@
(with-pp
; ;; LOAD LEVEL
; (if (-> *level* loading-level)
; (load-continue (-> *level* loading-level))
; )
(if (-> *level* loading-level)
(load-continue (-> *level* loading-level))
)
; ;; Run blerc to modify foreground models
; (with-profiler 'merc *profile-merc-color*
@@ -225,18 +525,18 @@
)
;; another level load
; (if (-> *level* loading-level)
; (load-continue (-> *level* loading-level))
; )
(if (-> *level* loading-level)
(load-continue (-> *level* loading-level))
)
; (if *display-color-bars*
; (draw-color-bars)
; )
;; draw and update menus
; (with-profiler 'menu-hook *profile-menu-hook-color*
; (*menu-hook*)
; )
(with-profiler 'menu-hook *profile-menu-hook-color*
(*menu-hook*)
)
;; load text files as needed from the menu update
; (load-level-text-files -1)
@@ -350,7 +650,7 @@
; (str-play-kick)
;; handle spawning/despawning as needed.
; (level-update *level*)
(level-update *level*)
;; do some memory card operations, check auto-save
; (mc-run)
@@ -474,12 +774,12 @@
)
)
(format 0 "SKIP: level activation in on~%")
; (cond
; ((or (level-get-with-status *level* 'loaded)
; (level-get-with-status *level* 'alive)
; (level-get-with-status *level* 'active)
; )
; (activate-levels! *level*)
(cond
((or (level-get-with-status *level* 'loaded)
(level-get-with-status *level* 'alive)
(level-get-with-status *level* 'active)
)
(activate-levels! *level*)
; (when (not arg0)
; (let ((gp-1 (entity-by-type camera-start)))
; (when (and gp-1 (type? gp-1 entity-actor))
@@ -492,12 +792,13 @@
; (if (and (= *kernel-boot-message* 'art-group) *kernel-boot-art-group*)
; (anim-tester-add-object *kernel-boot-art-group*)
; )
; )
; (else
; (kill-by-name "display" *active-pool*)
; (set! *dproc* #f)
; )
; )
)
(else
(format 0 "startup failed, killing dproc~%")
(kill-by-name "display" *active-pool*)
(set! *dproc* #f)
)
)
)
*dproc*
)
+4 -4
View File
@@ -83,8 +83,8 @@
(process-mask process-mask :offset-assert 4)
(unknown-int32-00 int32 :offset-assert 8)
(language language-enum :offset 16)
(unknown-int32-01 int32 :offset-assert 24)
(unknown-int32-02 int32 :offset-assert 28)
(display-dx int32 :offset-assert 24)
(display-dy int32 :offset-assert 28)
(vibration symbol :offset 32)
(play-hints symbol :offset 36)
(movie (pointer process) :offset 40)
@@ -94,7 +94,7 @@
(ambient (pointer process) :offset-assert 56)
(video-mode symbol :offset-assert 60)
(aspect-ratio symbol :offset-assert 64)
(unknown-uint32-00 uint32 :offset 68)
(use-progressive-scan symbol :offset 68)
(auto-save symbol :offset 72)
(bg-r float :offset-assert 76)
(bg-g float :offset-assert 80)
@@ -168,7 +168,7 @@
(movie-skip-frame float :offset-assert 356)
(allow-blackout symbol :offset-assert 360)
(race-minimap int32 :offset-assert 364)
(extra-bank symbol :offset-assert 368)
(extra-bank pair :offset-assert 368)
(beard symbol :offset-assert 372)
(ignore-target symbol :offset-assert 376)
(subtitle-language language-enum :offset-assert 384)
+22 -18
View File
@@ -108,7 +108,7 @@
(set! (-> obj music) arg1)
)
(('extra-bank)
(set! (-> obj extra-bank) arg1)
(set! (-> obj extra-bank) (the-as pair arg1))
)
(('process-mask)
(case arg1
@@ -904,8 +904,12 @@
)
(defmethod apply-settings setting-control ((obj setting-control))
*speech-control*
((method-of-type speech-control speech-control-method-11))
;; added
(when (nonzero? *speech-control*)
*speech-control*
((method-of-type speech-control speech-control-method-11))
)
(let ((s5-0 (-> obj user-current)))
(let ((s4-0 (-> obj user-target)))
(mem-copy! (the-as pointer s4-0) (the-as pointer (-> obj user-default)) 528)
@@ -1205,21 +1209,21 @@
(set! (-> s5-0 aspect-ratio) (-> s4-0 aspect-ratio))
(set-aspect-ratio (-> s5-0 aspect-ratio))
)
(when (!= (-> s5-0 unknown-uint32-00) (-> s4-0 unknown-uint32-00))
(set! (-> s5-0 unknown-uint32-00) (-> s4-0 unknown-uint32-00))
(set! (-> *video-params* set-video-mode) (the-as basic #t))
(when (!= (-> s5-0 use-progressive-scan) (-> s4-0 use-progressive-scan))
(set! (-> s5-0 use-progressive-scan) (-> s4-0 use-progressive-scan))
(set! (-> *video-params* set-video-mode) #t)
)
(when (!= (-> s5-0 video-mode) (-> s4-0 video-mode))
(set! (-> s5-0 video-mode) (-> s4-0 video-mode))
(set-video-mode (-> s5-0 video-mode))
)
(when (!= (-> s5-0 unknown-int32-01) (-> s4-0 unknown-int32-01))
(set! (-> s5-0 unknown-int32-01) (-> s4-0 unknown-int32-01))
(set! (-> *video-params* display-dx) (/ (-> s4-0 unknown-int32-01) 2))
(when (!= (-> s5-0 display-dx) (-> s4-0 display-dx))
(set! (-> s5-0 display-dx) (-> s4-0 display-dx))
(set! (-> *video-params* display-dx) (/ (-> s4-0 display-dx) 2))
)
(when (!= (-> s5-0 unknown-int32-02) (-> s4-0 unknown-int32-02))
(set! (-> s5-0 unknown-int32-02) (-> s4-0 unknown-int32-02))
(set! (-> *video-params* display-dy) (* (/ (-> s4-0 unknown-int32-02) 2) 2))
(when (!= (-> s5-0 display-dy) (-> s4-0 display-dy))
(set! (-> s5-0 display-dy) (-> s4-0 display-dy))
(set! (-> *video-params* display-dy) (* (/ (-> s4-0 display-dy) 2) 2))
)
(set! (-> *blit-displays-work* horizontal-flip-flag)
(the-as basic (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)))
@@ -1425,9 +1429,9 @@
(set! (-> gp-0 language) (scf-get-language))
(set! (-> gp-0 subtitle-language) (-> gp-0 language))
(set! (-> gp-0 process-mask) (process-mask execute sleep))
(set! (-> gp-0 unknown-uint32-00) (the-as uint #f))
(set! (-> gp-0 unknown-int32-01) 0)
(set! (-> gp-0 unknown-int32-02) 0)
(set! (-> gp-0 use-progressive-scan) #f)
(set! (-> gp-0 display-dx) 0)
(set! (-> gp-0 display-dy) 0)
(set! (-> gp-0 vibration)
(if (or (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared) (nonzero? (scf-get-territory)))
#f
@@ -1486,7 +1490,7 @@
(set! (-> gp-0 sound-reverb) 0.0)
(set! (-> gp-0 mode-sound-bank) (the-as uint #f))
(set! (-> gp-0 music) #f)
(set! (-> gp-0 extra-bank) (the-as symbol '()))
(set! (-> gp-0 extra-bank) '())
(set! (-> gp-0 bg-a-speed) 8.0)
(set! (-> gp-0 under-water-pitch-mod) 0.0)
(set! (-> gp-0 allow-pause) #t)
@@ -1532,10 +1536,10 @@
(set! (-> s5-0 language) (+ (-> gp-0 language) -1))
(set! (-> s5-0 subtitle-language) (-> gp-0 subtitle-language))
(set! (-> s5-0 aspect-ratio) #f)
(set! (-> s5-0 unknown-uint32-00) (the-as uint #f))
(set! (-> s5-0 use-progressive-scan) #f)
(set! (-> s5-0 video-mode) #f)
(set! (-> s5-0 music) #f)
(set! (-> s5-0 extra-bank) (the-as symbol '()))
(set! (-> s5-0 extra-bank) '())
(set! (-> s5-0 allow-blackout) (-> gp-0 allow-blackout))
(set! (-> s5-0 bg-a-speed) (-> gp-0 bg-a-speed))
(set! (-> s5-0 under-water-pitch-mod) (-> gp-0 under-water-pitch-mod))
@@ -5,6 +5,8 @@
;; name in dgo: task-control-h
;; dgos: ENGINE, GAME
(define-extern task-node-reset (function symbol none))
(defenum game-task-actor
:bitfield #f
:type uint8
+1 -1
View File
@@ -31,7 +31,7 @@
:flag-assert #x1b00000024
(:methods
(new (symbol type process symbol float entity symbol) _type_ 0)
(path-control-method-9 () none 9)
(debug-draw (_type_) none 9)
(path-control-method-10 () none 10)
(path-control-method-11 () none 11)
(path-control-method-12 () none 12)
+1 -1
View File
@@ -52,7 +52,7 @@
:flag-assert #xc0000061c
(:methods
(new (symbol type process-drawable) _type_ 0)
(vol-control-method-9 (_type_) none 9)
(debug-draw (_type_) none 9)
(vol-control-method-10 (_type_ plane) symbol 10)
(should-display? (_type_) symbol 11)
)
+2 -2
View File
@@ -271,7 +271,7 @@
(dotimes (s3-0 (/ (-> obj point-count) 2))
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(the-as vector s4-0)
(the-as vector (&-> s4-0 4))
(the-as rgba s5-0)
@@ -296,7 +296,7 @@
)
;; WARN: Return type mismatch int vs none.
(defmethod vol-control-method-9 vol-control ((obj vol-control))
(defmethod debug-draw vol-control ((obj vol-control))
(with-pp
(let ((a0-1 obj))
(when (and (and *display-vol-marks* (logtest? (-> a0-1 flags) (vol-flags display?)))
@@ -7,3 +7,4 @@
;; DECOMP BEGINS
(define *subdivide-settings* (new 'global 'subdivide-settings (meters 30.0) (meters 70.0)))
+61
View File
@@ -5,5 +5,66 @@
;; name in dgo: blit-displays
;; dgos: ENGINE, GAME
(define *blit-displays-work* (new 'static 'blit-displays-work
:adgif-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x1000000000008005 #xe)
)
:sprite-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x51 :id (dma-tag-id cnt))
:vif1 (new 'static 'vif-tag :imm #x51 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x508b400000008010 #x53531)
)
:sprite-slow-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt))
:vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x508b400000008001 #x53531)
)
:line-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt))
:vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x2020c00000008020 #x55)
)
:scan-tmpl (new 'static 'dma-gif-packet
:dma-vif (new 'static 'dma-packet
:dma (new 'static 'dma-tag :qwc #x4c :id (dma-tag-id cnt))
:vif1 (new 'static 'vif-tag :imm #x4c :cmd (vif-cmd direct) :msk #x1)
)
:gif (new 'static 'array uint64 2 #x5020c0000000800f #x55551)
)
:color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)
:line-color #x3f80000000000000
:scan-colors (new 'static 'inline-array vector4w 15
(new 'static 'vector4w :y 1 :z 1)
(new 'static 'vector4w :y 1 :z 1)
(new 'static 'vector4w :y 1 :z 1)
(new 'static 'vector4w :y 1 :z 1)
(new 'static 'vector4w :x 1 :y 3 :z 2)
(new 'static 'vector4w :x 1 :y 4 :z 3)
(new 'static 'vector4w :x 2 :y 6 :z 5)
(new 'static 'vector4w :x 3 :y 8 :z 7)
(new 'static 'vector4w :x 5 :y 11 :z 10)
(new 'static 'vector4w :x 6 :y 14 :z 13)
(new 'static 'vector4w :x 9 :y 20 :z 17)
(new 'static 'vector4w :x 13 :y 27 :z 21)
(new 'static 'vector4w :x 17 :y 36 :z 24)
(new 'static 'vector4w :x 22 :y 45 :z 28)
(new 'static 'vector4w :x 32 :y 63 :z 32)
)
:menu-mode #f
:screen-copied #f
:horizontal-flip-flag #f
)
)
;; DECOMP BEGINS
+9 -9
View File
@@ -14,15 +14,15 @@
;; very basic settings for video output.
(deftype video-params (structure)
((set-video-mode basic :offset-assert 0)
(reset-video-mode basic :offset-assert 4)
(display-fbp int32 :offset-assert 8)
(relative-x-scale float :offset 16)
(display-dx int32 :offset-assert 20)
(display-dy int32 :offset-assert 24)
(display-sy int32 :offset-assert 28)
(relative-x-scale-reciprical float :offset-assert 32)
(screen-pages-high int32 :offset-assert 36)
((set-video-mode symbol :offset-assert 0)
(reset-video-mode symbol :offset-assert 4)
(display-fbp int32 :offset-assert 8)
(relative-x-scale float :offset 16)
(display-dx int32 :offset-assert 20)
(display-dy int32 :offset-assert 24)
(display-sy int32 :offset-assert 28)
(relative-x-scale-reciprical float :offset-assert 32)
(screen-pages-high int32 :offset-assert 36)
)
:method-count-assert 9
:size-assert #x28
+115
View File
@@ -5,8 +5,123 @@
;; name in dgo: video
;; dgos: ENGINE, GAME
(define-extern *video-mode* int)
;; DECOMP BEGINS
(defun set-video-mode ((arg0 symbol))
(case arg0
(('ntsc)
(set! (-> *setting-control* user-default display-dx) 0)
(set! (-> *setting-control* user-default display-dy) 8)
(set! (-> *video-params* display-fbp) 164)
(set! (-> *video-params* display-sy) 224)
(set! *video-mode* 0)
(sound-set-fps 60)
)
(('pal)
(set! (-> *setting-control* user-default display-dx) 0)
(set! (-> *setting-control* user-default display-dy) 24)
(set! (-> *video-params* display-fbp) 144)
(set! (-> *video-params* display-sy) 256)
(set! *video-mode* 1)
(sound-set-fps 50)
)
)
(set-time-ratios *display* (-> *display* dog-ratio))
(set! (-> *video-params* reset-video-mode) #t)
(set! (-> *math-camera* isometric vector 1 y) 0.5)
(set! (-> *math-camera* y-clip) 416.0)
(set! (-> *math-camera* y-pix) (* 0.5 (-> *math-camera* y-clip)))
(set! *profile-y* 1848)
(set! (-> *video-params* set-video-mode) #t)
0
(none)
)
(defun get-video-mode ()
(-> *setting-control* user-current video-mode)
)
(defun set-aspect-ratio ((arg0 symbol))
(case arg0
(('aspect4x3)
(set! (-> *video-params* relative-x-scale) 1.0)
(set! (-> *video-params* relative-x-scale-reciprical) 1.0)
)
(('aspect16x9)
(set! (-> *video-params* relative-x-scale) 0.75)
(set! (-> *video-params* relative-x-scale-reciprical) 1.3333334)
)
)
0
(none)
)
(defun get-aspect-ratio ()
(-> *setting-control* user-current aspect-ratio)
)
(defun set-progressive-scan ((arg0 symbol))
(set! (-> *setting-control* user-default use-progressive-scan) arg0)
(none)
)
(defun get-progressive-scan ()
(-> *setting-control* user-current use-progressive-scan)
)
(define *smode2* 0)
(defun set-graphics-mode ()
(let ((v1-0 *setting-control*)
(gp-0 (the-as gs-bank #x12000000))
(s5-0 *video-params*)
)
(let ((s4-0 *display*))
(cond
((-> v1-0 user-current use-progressive-scan)
(when (nonzero? *smode2*)
(reset-graph 0 0 80 0)
(set! *smode2* 0)
0
)
(set! (-> gp-0 display1) (new 'static 'gs-display
:magh #x1
:dw #x4ff
:dy (+ (-> s5-0 display-dy) 50)
:dx (+ (* (-> s5-0 display-dx) 2) 326)
:dh (+ (* (-> s5-0 display-sy) 2) -1)
)
)
)
(else
(when (or (!= *smode2* 1) (-> *video-params* set-video-mode))
(if (= (-> *setting-control* user-current video-mode) 'ntsc)
(reset-graph 0 1 2 0)
(reset-graph 0 1 3 0)
)
(set! *smode2* 1)
(set! (-> *video-params* set-video-mode) #f)
)
(set! (-> gp-0 display1) (new 'static 'gs-display
:magh #x3
:dw #x9ff
:dy (+ (-> s5-0 display-dy) 50)
:dx (+ (* (-> s5-0 display-dx) 4) 652)
:dh (+ (* (-> s5-0 display-sy) 2) -1)
)
)
)
)
(set! (-> gp-0 pmode) (-> s4-0 pmode))
(set! (-> gp-0 bgcolor) (the-as gs-bgcolor (-> s4-0 bgcolor)))
)
(set! (-> gp-0 dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> s5-0 display-fbp)))
)
0
(none)
)
+3
View File
@@ -23,6 +23,9 @@
(lm3 3)
)
(define-extern unlink-lightning-spec-by-heap (function kheap none))
;; DECOMP BEGINS
(deftype lightning-spec (basic)
+41 -65
View File
@@ -393,79 +393,55 @@
)
)
(define *flash0*
(the-as (array float)
(new 'static 'boxed-array :type float 1.0 0.0 0.5 1.0 0.5 0.0 0.5 0.35 0.4 0.35 0.25 0.1 0.04)
)
)
(define *flash0* (new 'static 'boxed-array :type float 1.0 0.0 0.5 1.0 0.5 0.0 0.5 0.35 0.4 0.35 0.25 0.1 0.04))
(define *flash1*
(the-as (array float) (new 'static 'boxed-array :type float 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1))
)
(define *flash1* (new 'static 'boxed-array :type float 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1))
(define *flash2*
(the-as (array float) (new 'static 'boxed-array :type float 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5))
)
(define *flash2* (new 'static 'boxed-array :type float 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5))
(define *flash3*
(the-as (array float)
(new 'static 'boxed-array :type float 0.5 0.0 1.0 0.9 1.0 0.8 0.3 0.0 0.0 0.5 0.1 0.5 0.35)
)
)
(define *flash3* (new 'static 'boxed-array :type float 0.5 0.0 1.0 0.9 1.0 0.8 0.3 0.0 0.0 0.5 0.1 0.5 0.35))
(define *flash4*
(the-as (array float)
(new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1)
)
)
(define *flash4* (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1))
(define *flash5* (new 'static 'boxed-array :type float
1.0
0.0
1.0
0.0
1.0
0.95
0.9
0.85
0.8
0.75
0.7
0.65
0.6
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
)
(define *flash5* (the-as (array float) (new 'static 'boxed-array :type float
1.0
0.0
1.0
0.0
1.0
0.95
0.9
0.85
0.8
0.75
0.7
0.65
0.6
0.55
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.5
0.45
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
)
)
)
(define *flash6*
(the-as (array float)
(new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 0.5 0.0 0.5 0.35 0.0 0.0 1.0 0.0 0.2 0.1)
)
)
(define *flash6* (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 0.5 0.0 0.5 0.35 0.0 0.0 1.0 0.0 0.2 0.1))
(define *flash7*
(the-as (array float)
(new 'static 'boxed-array :type float 1.0 0.8 0.3 0.0 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1)
)
)
(define *flash7* (new 'static 'boxed-array :type float 1.0 0.8 0.3 0.0 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1))
(deftype light-state (structure)
((time float :offset-assert 0)
@@ -16,7 +16,7 @@
;; og:ignore-form:sparticle-motion-blur
;; og:ignore-form:birth-func-texture-group
;; og:ignore-form:sparticle-launcher-method-10
(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)) ;; 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
@@ -707,12 +707,12 @@
(when (or *display-sprite-marks* *display-sprite-spheres* (and *display-actor-vis* (= (-> obj proc) *debug-actor*)))
(add-debug-sphere
*display-sprite-spheres*
(bucket-id bucket-324)
(bucket-id debug2)
s5-1
(-> s5-1 w)
(new 'static 'rgba :g #xff :a #x80)
)
(add-debug-matrix *display-sprite-marks* (bucket-id bucket-324) (-> obj origin) (meters 2.0))
(add-debug-matrix *display-sprite-marks* (bucket-id debug2) (-> obj origin) (meters 2.0))
)
(sphere-in-view-frustum? (the-as sphere s5-1))
)
+6 -5
View File
@@ -385,15 +385,16 @@
(bucket-315 315) ;; effects
(tex-all-warp 316) ;; tex
(bucket-317 317) ;; mercneric
(bucket-318 318) ;; debug, no zbuf
(debug-no-zbuf1 318) ;; debug, no zbuf
(tex-all-map 319) ;; tex
(bucket-320 320) ;; hud
(bucket-321 321) ;; hud letterbox, no zbuf
(screen-filter 321) ;; hud letterbox, no zbuf
(bucket-322 322) ;; hud
(bucket-323 323) ;; hud
(bucket-324 324) ;; debug
(debug-no-zbuf 325) ;; debug
(debug-unknown-326 326) ;; debug
(debug2 324) ;; debug
(debug-no-zbuf2 325) ;; debug
(debug3 326)
)
(defenum vu1-renderer-mask
+15 -6
View File
@@ -14,7 +14,9 @@
(defenum texture-page-flag
:type uint16
:bitfield #t)
:bitfield #t
(alpha-enable 0)
)
;; DECOMP BEGINS
@@ -64,12 +66,12 @@
;; 0 (maybe current-leaf-idx?) 128
(texture-flags texture-page-flag 10 :offset 130)
;; 0 (maybe padding) 150
;; 0 (was boxes, current back flags?, byte?) 152
(ambients symbol :offset 156)
(require-force-inside uint8 :offset 152)
(ambients symbol :offset 156) ;; now just #t?
(subdivide-close float :offset 160)
(subdivide-far float :offset-assert 164)
(race-meshes (array entity-race-mesh) :offset-assert 168)
;; pointer to table of sorted floats 172
(actor-birth-order (pointer uint32) :offset 172)
(light-hash light-hash :offset 176)
(nav-meshes (array entity-nav-mesh) :offset-assert 180)
(actor-groups (array actor-group) :offset-assert 184)
@@ -79,13 +81,19 @@
;; 200 is some array
;; 204 is maybe that array's length
;; 216 is a vector array
;; (vec-array (pointer vector) :offset 216) ; TODO see - `update-visible` hits assertion
;; (vec-array (pointer vector) :offset 216) ; TODO see - `update-visible` hits assertion
(region-tree drawable-tree-region-prim :offset 252)
; (actor-birth-order (pointer uint32) :offset-assert 172)
; (split-box-indices (pointer uint16) :offset-assert 176)
(unk-data-8 uint32 55 :offset 180)
(unk-data uint32 18 :offset 180)
(tfrag-texture-masks-array texture-masks-array)
(tmask0 texture-masks-array :offset 272)
(tmask2 texture-masks-array :offset 280)
(end uint8 :offset 399)
)
:method-count-assert 19
:size-assert #x190
@@ -197,3 +205,4 @@
(define-extern level-remap-texture (function texture-id texture-id))
(define-extern build-masks (function bsp-header none))
+31 -17
View File
@@ -93,6 +93,20 @@
(movie0 16) ;; 0x10000
(movie1 17) ;; 0x20000
(movie2 18) ;; 0x40000
(tm19)
(tm20)
(tm21)
(tm22)
(tm23)
(tm24)
(tm25)
(tm26)
(tm27)
(tm28)
(tm29)
(tm30)
(tm31)
)
(declare-type game-text-id uint32)
@@ -139,7 +153,7 @@
(taskname symbol :offset 20)
(other-name-1 symbol :offset 24)
(packages pair :offset-assert 32)
(memory-mode uint32 :offset-assert 36)
(memory-mode load-buffer-mode :offset-assert 36)
(music-bank symbol :offset-assert 40)
(ambient-sounds symbol :offset-assert 44)
(sound-reverb float :offset-assert 48)
@@ -243,7 +257,7 @@
(vis-bits pointer :offset-assert 2392)
(all-visible? symbol :offset-assert 2396)
(force-all-visible? symbol :offset-assert 2400)
(linking basic :offset-assert 2404)
(linking symbol :offset-assert 2404)
(vis-info level-vis-info 8 :offset-assert 2408)
(vis-self-index int32 :offset-assert 2440)
(vis-adj-index int32 :offset-assert 2444)
@@ -261,7 +275,7 @@
(display-start-time time-frame :offset-assert 4552)
(memory-mask uint32 :offset-assert 4560)
(task-mask task-mask :offset-assert 4564)
(tfrag-gs-test uint64 :offset-assert 4568)
(tfrag-gs-test gs-test :offset-assert 4568)
(texture-dirty-masks texture-mask 10 :inline :offset-assert 4576)
(texture-mask texture-mask 18 :inline :offset-assert 4736)
(sky-mask texture-mask :inline :offset-assert 5024)
@@ -291,12 +305,12 @@
:flag-assert #x1e0000146c
(:methods
(deactivate (_type_) _type_ 9)
(level-method-10 () none 10)
(is-object-visible? (_type_ int) symbol 10)
(level-method-11 () none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
(compute-memory-usage (_type_ object) memory-usage-block 14)
(point-in-boxes? (_type_ vector) symbol 15)
(inside-boxes-check (_type_ vector) symbol 15)
(level-method-16 () none 16)
(load-continue (_type_) _type_ 17)
(load-begin (_type_) _type_ 18)
@@ -357,23 +371,23 @@
(:methods
(level-get (_type_ symbol) level 9)
(level-get-with-status (_type_ symbol) level 10)
(get-level-by-heap-ptr-and-status (_type_ pointer symbol) level 11)
(get-level-by-heap-ptr-and-status (_type_ pointer symbol) level 11) ;;
(level-get-for-use (_type_ symbol symbol) level 12)
(activate-levels! (_type_) int 13)
(level-group-method-14 () none 14)
(debug-print-entities (_type_ symbol type) none 14)
(debug-draw-actors (_type_ symbol) none 15)
(assign-draw-indices (_type_) none 16)
(actors-update (_type_) none 17)
(level-group-method-18 () none 18)
(level-update (_type_) none 19)
(level-get-target-inside (_type_) level 20)
(assign-draw-indices (_type_) none 16) ;; (level-update (_type_) int 16)
(actors-update (_type_) none 17) ;; (level-get-target-inside (_type_) level 17)
(level-group-method-18 (_type_) none 18) ;; (alloc-levels! (_type_ symbol) int 18)
(level-update (_type_) none 19) ;;
(level-get-target-inside (_type_) level 20) ;; (art-group-get-by-name (_type_ string) art-group 20)
(alloc-levels-if-needed (_type_ symbol) none 21)
(load-commands-set! (_type_ pair) none 22)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23)
(load-command-get-index (_type_ symbol int) pair 24)
(level-group-method-25 () none 25)
(level-group-method-26 () none 26)
(level-group-method-27 () none 27)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23) ;; (update-vis-volumes-from-nav-mesh (_type_) none 23)
(alt-load-command-get-index (_type_ symbol int) pair 24) ;; (print-volume-sizes (_type_) none 24)
(update-vis-volumes (_type_) none 25) ;; (level-status (_type_ symbol) symbol 25)
(update-vis-volumes-from-nav-mesh (_type_) none 26)
(print-volume-sizes (_type_) none 27)
(level-status (_type_ symbol) symbol 28)
(load-in-progress? (_type_) symbol 29)
(level-get-most-disposable (_type_) level 30)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -37,7 +37,7 @@
:size-assert #x20
:flag-assert #x1400000020
(:methods
(drawable-region-prim-method-17 () none 17)
(debug-draw-region (_type_ int) none 17)
(drawable-region-prim-method-18 () none 18)
(drawable-region-prim-method-19 () none 19)
)
+317
View File
@@ -5,5 +5,322 @@
;; name in dgo: load-state
;; dgos: ENGINE, GAME
(define-extern *backup-load-state* load-state)
;; DECOMP BEGINS
(defmethod print level-buffer-state ((obj level-buffer-state))
(format
#t
"#<level-buffer-state ~A ~A ~A ~A @ #x~X>"
(-> obj name)
(-> obj display?)
(-> obj force-vis?)
(-> obj force-inside?)
obj
)
obj
)
(defmethod reset! load-state ((obj load-state))
(dotimes (v1-0 6)
(set! (-> obj want v1-0 name) #f)
(set! (-> obj want v1-0 display?) #f)
(set! (-> obj want v1-0 force-vis?) #f)
(set! (-> obj want v1-0 force-inside?) #f)
)
(dotimes (v1-3 3)
(set! (-> obj want-sound v1-3) #f)
)
(set! (-> obj command-list) '())
(dotimes (v1-7 256)
(set! (-> obj object-name v1-7) #f)
(set! (-> obj object-status v1-7) (the-as basic 0))
)
obj
)
(defmethod want-levels load-state ((obj load-state) (arg0 (pointer symbol)))
(dotimes (v1-0 6)
(dotimes (a2-0 6)
(when (= (-> obj want v1-0 name) (-> arg0 a2-0))
(set! (-> arg0 a2-0) #f)
(goto cfg-8)
)
)
(set! (-> obj want v1-0 name) #f)
(label cfg-8)
)
(dotimes (v1-3 6)
(when (-> arg0 v1-3)
(dotimes (a2-13 6)
(when (not (-> obj want a2-13 name))
(set! (-> obj want a2-13 name) (-> arg0 v1-3))
(set! (-> obj want a2-13 display?) #f)
(set! (-> obj want a2-13 force-vis?) #f)
(set! (-> obj want a2-13 force-inside?) #f)
(goto cfg-19)
)
)
)
(label cfg-19)
)
(add-borrow-levels obj)
0
)
(defmethod want-sound-banks load-state ((obj load-state) (arg0 (pointer symbol)))
(dotimes (v1-0 3)
(dotimes (a2-0 3)
(when (= (-> obj want-sound v1-0) (-> arg0 a2-0))
(set! (-> arg0 a2-0) #f)
(goto cfg-8)
)
)
(set! (-> obj want-sound v1-0) #f)
(label cfg-8)
)
(dotimes (v1-3 3)
(when (-> arg0 v1-3)
(dotimes (a2-13 3)
(when (not (-> obj want-sound a2-13))
(set! (-> obj want-sound a2-13) (-> arg0 v1-3))
(goto cfg-19)
)
)
)
(label cfg-19)
)
0
(none)
)
(defmethod want-display-level load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 display?) arg1)
(add-borrow-levels obj)
(return 0)
)
)
(if arg1
(format 0 "ERROR: can't display ~A because it isn't loaded~%" arg0)
)
0
)
(defmethod want-vis-level load-state ((obj load-state) (arg0 symbol))
(let ((v1-0 (lookup-level-info arg0)))
(if v1-0
(set! arg0 (-> v1-0 name))
)
)
(set! (-> obj vis-nick) arg0)
0
(none)
)
(defmethod want-force-vis load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 force-vis?) arg1)
(return 0)
)
)
(format 0 "ERROR: can't force vis on ~A because it isn't loaded~%" arg0)
0
)
(defmethod want-force-inside load-state ((obj load-state) (arg0 symbol) (arg1 symbol))
(dotimes (v1-0 6)
(when (= (-> obj want v1-0 name) arg0)
(set! (-> obj want v1-0 force-inside?) arg1)
(return 0)
)
)
(format 0 "ERROR: can't force inside on ~A because it isn't loaded~%" arg0)
0
(none)
)
(defmethod add-borrow-levels load-state ((obj load-state))
"Update the load state so it includes the 'borrow' levels associated with the desired levels.
This will also remove borrow levels that are no longer needed."
;; remove borrow levels
(dotimes (s5-0 6)
(let ((a0-1 (-> obj want s5-0 name)))
(when a0-1
(let ((a0-2 (lookup-level-info a0-1)))
(when (= (-> a0-2 memory-mode) (load-buffer-mode borrow))
(set! (-> obj want s5-0 name) #f)
(set! (-> obj want s5-0 display?) #f)
(set! (-> obj want s5-0 force-vis?) #f)
(set! (-> obj want s5-0 force-inside?) #f)
)
)
)
)
)
;; add 4 symbols to this array per level: name, display, force-vis, force-inside.
;(let ((s5-1 (the-as (array symbol) (new 'stack 'array symbol 24))))
(let ((symbol-array (new 'stack-no-clear 'array 'symbol 24))
(used-slots 0))
; (set! (-> s5-1 length) 0)
(dotimes (s4-0 6)
(let ((a0-5 (-> obj want s4-0 name)))
;; add level from the want state
(when a0-5
(set! (-> symbol-array used-slots) a0-5)
(set! (-> symbol-array (+ used-slots 1)) (-> obj want s4-0 display?))
(set! (-> symbol-array (+ used-slots 2)) (-> obj want s4-0 force-vis?))
(set! (-> symbol-array (+ used-slots 3)) (-> obj want s4-0 force-inside?))
(+! used-slots 4)
;; and add borrows.
(let ((v1-34 (lookup-level-info a0-5)))
(countdown (a0-6 2)
(when (and (-> v1-34 borrow-level a0-6) (< used-slots 24))
(set! (-> symbol-array used-slots) (-> v1-34 borrow-level a0-6))
(set! (-> symbol-array (+ used-slots 1)) (if (-> obj want s4-0 display?)
(-> v1-34 borrow-display? a0-6)
)
)
(set! (-> symbol-array (+ used-slots 2)) #f)
(set! (-> symbol-array (+ used-slots 3)) #f)
(+! used-slots 4)
)
)
)
)
)
)
;; copy back to actual load-state.
(dotimes (v1-39 6)
(cond
((< (* v1-39 4) used-slots)
(set! (-> obj want v1-39 name) (-> symbol-array (* v1-39 4)))
(set! (-> obj want v1-39 display?) (-> symbol-array (+ (* v1-39 4) 1)))
(set! (-> obj want v1-39 force-vis?) (-> symbol-array (+ (* v1-39 4) 2)))
(set! (-> obj want v1-39 force-inside?) (-> symbol-array (+ (* v1-39 4) 3)))
)
(else
(set! (-> obj want v1-39 name) #f)
(set! (-> obj want v1-39 display?) #f)
(set! (-> obj want v1-39 force-vis?) #f)
(set! (-> obj want v1-39 force-inside?) #f)
)
)
)
)
0
(none)
)
(define *display-load-commands* #f)
(defmethod backup-load-state-and-set-cmds load-state ((obj load-state) (arg0 pair))
(dotimes (s4-0 256)
(when (-> obj object-name s4-0)
(format 0 "WARNING: load state somehow aquired object command ~A~%" (-> obj object-name s4-0))
(set! (-> obj object-name s4-0) #f)
)
)
(mem-copy! (&-> *backup-load-state* type) (&-> obj type) 2168)
(set! (-> *backup-load-state* command-list) '())
(set! (-> obj command-list) arg0)
0
)
(defmethod restore-load-state-and-cleanup load-state ((obj load-state))
(with-pp
(execute-commands-up-to obj 100000.0)
(dotimes (s5-0 256)
(when (-> obj object-name s5-0)
(let ((a0-3 (entity-by-name (-> obj object-name s5-0))))
(set! (-> a0-3 extra perm status) (the-as entity-perm-status (-> obj object-status s5-0)))
(if (-> a0-3 extra process)
(kill! a0-3)
)
)
(set! (-> obj object-name s5-0) #f)
)
)
(let ((s5-1 (new 'stack-no-clear 'inline-array 'level-buffer-state 6)))
(dotimes (s4-0 6)
((method-of-type level-buffer-state new) (the-as symbol (-> s5-1 s4-0)) level-buffer-state)
)
(dotimes (s4-1 6)
(mem-copy! (the-as pointer (-> s5-1 s4-1)) (the-as pointer (-> *load-state* want s4-1)) 16)
)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) 2168)
(when (!= (-> pp type) scene-player)
(dotimes (gp-1 6)
(mem-copy! (the-as pointer (-> *load-state* want gp-1)) (the-as pointer (-> s5-1 gp-1)) 16)
)
)
)
(add-borrow-levels *load-state*)
0
)
)
(defmethod restore-load-state load-state ((obj load-state))
(dotimes (v1-0 256)
(if (-> obj object-name v1-0)
(set! (-> obj object-name v1-0) #f)
)
)
(mem-copy! (&-> obj type) (&-> *backup-load-state* type) 2168)
0
)
(defmethod execute-commands-up-to load-state ((obj load-state) (arg0 float))
(with-pp
(let ((s4-0 (new 'stack 'script-context (the-as basic (process->ppointer pp)) pp (the-as vector #f))))
(set! (-> s4-0 load-state) obj)
(while (not (null? (-> obj command-list)))
(let ((f0-0 (command-get-float (car (car (-> obj command-list))) 0.0))
(s3-0 (cdr (car (-> obj command-list))))
)
(if (< arg0 f0-0)
(return #f)
)
(if *display-load-commands*
(format 0 "NOTICE: ~D: ~f: execute command ~A~%" (-> pp clock frame-counter) f0-0 s3-0)
)
(cond
((pair? (car s3-0))
(let ((a1-4 (car s3-0)))
(while (not (null? s3-0))
(eval! s4-0 (the-as structure a1-4))
(set! s3-0 (cdr s3-0))
(set! a1-4 (car s3-0))
)
)
)
(else
(eval! s4-0 (the-as structure s3-0))
)
)
)
(set! (-> obj command-list) (cdr (-> obj command-list)))
)
)
0
(none)
)
)
(kmemopen global "load-state")
(define *backup-load-state* (new 'global 'load-state))
(define-perm *load-state* load-state (new 'global 'load-state))
(kmemclose)
+1 -1
View File
@@ -192,7 +192,7 @@
:size-assert #x120
:flag-assert #x2f00000120
(:methods
(nav-control-method-9 () none 9)
(debug-draw (_type_) none 9)
(point-in-bounds? (_type_ vector) symbol 10)
(nav-control-method-11 (_type_ vector) vector 11)
(nav-control-method-12 () none 12)
+4 -4
View File
@@ -148,7 +148,7 @@
(let ((f0-1 (* (-> obj time) (/ (+ 1.0 (the float s2-0)) (the float s3-0)))))
(compute-trans-at-time obj f0-1 s4-0)
)
(add-debug-line #t (bucket-id bucket-318) s5-0 s4-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
(add-debug-line #t (bucket-id debug-no-zbuf1) s5-0 s4-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
)
)
0
@@ -517,16 +517,16 @@
(s4-0 10)
)
(cubic-curve-method-10 obj (-> s5-0 initial-velocity) 0.0)
(add-debug-x #t (bucket-id bucket-318) (-> s5-0 initial-velocity) *color-red*)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 initial-velocity) *color-red*)
(dotimes (s3-0 s4-0)
(set! (-> s5-0 initial-position quad) (-> s5-0 initial-velocity quad))
(let ((f0-2 (/ (+ 1.0 (the float s3-0)) (the float s4-0))))
(cubic-curve-method-10 obj (-> s5-0 initial-velocity) f0-2)
)
(add-debug-x #t (bucket-id bucket-318) (-> s5-0 initial-velocity) *color-red*)
(add-debug-x #t (bucket-id debug-no-zbuf1) (-> s5-0 initial-velocity) *color-red*)
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> s5-0 initial-position)
(-> s5-0 initial-velocity)
*color-red*
@@ -33,6 +33,11 @@
)
)
(defun draw-joint-axes ((arg0 process-drawable))
(format 0 "draw-joint-axes not yet implemented~%")
(none)
)
;; DECOMP BEGINS
;; ERROR: top level function was not converted to expressions. Cannot decompile.
+1 -1
View File
@@ -605,7 +605,7 @@
(if (and (-> gp-0 active) (-> gp-0 valid) (-> gp-0 cursor))
(add-debug-cursor
#t
(bucket-id debug-no-zbuf)
(bucket-id debug-no-zbuf2)
(+ (the int (-> gp-0 posx)) 256)
(+ (the int (-> gp-0 posy)) 208)
(the-as int (-> gp-0 button0-abs 0))
+25 -27
View File
@@ -987,34 +987,32 @@
(defun sound-bank-reload ()
(process-spawn-function
process
(lambda ()
(with-pp
(let ((gp-0 (the-as (array symbol) (new 'static 'boxed-array :type symbol :length 0 :allocated-length 3))))
(dotimes (v1-0 3)
(set! (-> gp-0 v1-0) (the-as symbol (-> *level* sound-bank v1-0)))
(lambda () (with-pp
(let ((gp-0 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 3)))
(dotimes (v1-0 3)
(set! (-> gp-0 v1-0) (the-as symbol (-> *level* sound-bank v1-0)))
)
(let ((a1-3 (new 'stack-no-clear 'array 'symbol 4)))
(set! (-> a1-3 2) 'empty2)
(set! (-> a1-3 1) 'empty1)
(set! (-> a1-3 0) 'empty0)
(want-sound-banks *load-state* a1-3)
)
(let ((s5-0 (-> pp clock frame-counter)))
(until (>= (- (-> pp clock frame-counter) s5-0) (seconds 1))
(suspend)
)
)
(let ((a1-4 (new 'stack-no-clear 'array 'symbol 4)))
(set! (-> a1-4 2) (-> gp-0 2))
(set! (-> a1-4 1) (-> gp-0 1))
(set! (-> a1-4 0) (-> gp-0 0))
(want-sound-banks *load-state* a1-4)
)
)
(none)
)
)
(let ((a1-3 (new 'stack-no-clear 'array 'symbol 4)))
(set! (-> a1-3 2) 'empty2)
(set! (-> a1-3 1) 'empty1)
(set! (-> a1-3 0) 'empty0)
(want-sound-banks *load-state* a1-3)
)
(let ((s5-0 (-> pp clock frame-counter)))
(until (>= (- (-> pp clock frame-counter) s5-0) (seconds 1))
(suspend)
)
)
(let ((a1-4 (new 'stack-no-clear 'array 'symbol 4)))
(set! (-> a1-4 2) (-> gp-0 2))
(set! (-> a1-4 1) (-> gp-0 1))
(set! (-> a1-4 0) (-> gp-0 0))
(want-sound-banks *load-state* a1-4)
)
)
(none)
)
)
:name (symbol->string (-> process symbol))
:to *display-pool*
)
0
@@ -7,6 +7,7 @@
;; NOTE - for trajectory
(define-extern *actor-hash* spatial-hash)
(define-extern update-actor-hash (function none))
;; DECOMP BEGINS
+118 -43
View File
@@ -30,6 +30,8 @@
;; DECOMP BEGINS
;; definition for function build-conversions
;; INFO: Used lq/sq
(defbehavior build-conversions target ((arg0 vector))
(when (!= (-> self control unknown-surface02) (-> self control surf))
(set! (-> self control unknown-surface02) (-> self control surf))
@@ -84,6 +86,8 @@
)
)
;; definition for function vector-turn-to
;; INFO: Used lq/sq
(defbehavior vector-turn-to target ((arg0 vector))
(forward-up-nopitch->quaternion
(-> self control dir-targ)
@@ -94,6 +98,7 @@
(build-conversions (-> self control transv))
)
;; definition for function reverse-conversions
;; WARN: Return type mismatch cshape-moving-flags vs none.
(defbehavior reverse-conversions target ((arg0 vector))
(let ((v1-1 (-> self control unknown-vector00)))
@@ -104,6 +109,7 @@
(none)
)
;; definition (debug) for function draw-history
(defun-debug draw-history ((arg0 control-info))
(when (nonzero? *display-collide-history*)
(when (cpad-pressed? 0 l3)
@@ -142,8 +148,11 @@
(none)
)
;; definition (debug) for function target-history-print
;; ERROR: function was not converted to expressions. Cannot decompile.
;; definition (debug) for function target-print-stats
;; INFO: Used lq/sq
(defun-debug target-print-stats ((arg0 target) (arg1 symbol))
(local-vars
(sv-64 int)
@@ -527,6 +536,8 @@
)
)
;; definition for function read-pad
;; INFO: Used lq/sq
(defbehavior read-pad target ((arg0 vector))
(when (!= (-> self control unknown-dword01) (-> *display* real-clock frame-counter))
(set! (-> self control unknown-vector13 quad) (-> self control unknown-vector12 quad))
@@ -560,6 +571,7 @@
(vector-matrix*! arg0 arg0 (-> self control unknown-matrix03))
)
;; definition for function set-pad
(defbehavior set-pad target ((arg0 vector))
(set! (-> self control unknown-float12) (vector-length arg0))
(let ((s5-0 vector-matrix*!)
@@ -573,12 +585,16 @@
arg0
)
;; definition for function warp-vector-into-surface!
;; INFO: Used lq/sq
(defun warp-vector-into-surface! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 matrix))
(let ((a2-1 (matrix-from-two-vectors! (new-stack-matrix0) (-> arg3 vector 1) arg2)))
(vector-matrix*! arg0 arg1 a2-1)
)
)
;; definition for function vector<-pad-in-surface!
;; INFO: Used lq/sq
(defbehavior vector<-pad-in-surface! target ((arg0 vector) (arg1 symbol))
(let ((a1-1 (read-pad (new-stack-vector0))))
(warp-vector-into-surface! arg0 a1-1 (-> self control local-normal) (-> self control unknown-matrix03))
@@ -589,6 +605,7 @@
arg0
)
;; definition for function vector<-pad-in-matrix!
;; WARN: Return type mismatch vector vs none.
(defun vector<-pad-in-matrix! ((arg0 vector) (arg1 cpad-info) (arg2 matrix))
(let ((gp-0 (new 'stack-no-clear 'vector))
@@ -611,6 +628,8 @@
(none)
)
;; definition for function local-pad-angle
;; INFO: Used lq/sq
(defbehavior local-pad-angle target ()
(let ((a0-1 (vector<-pad-in-surface! (new-stack-vector0) #f)))
(vector-dot
@@ -620,6 +639,8 @@
)
)
;; definition for function turn-around?
;; INFO: Used lq/sq
(defbehavior turn-around? target ()
(let* ((a0-1 (vector<-pad-in-surface! (new-stack-vector0) #f))
(gp-0 (vector-normalize! a0-1 1.0))
@@ -668,6 +689,8 @@
)
)
;; definition for function wall-hide?
;; INFO: Used lq/sq
(defbehavior wall-hide? target ()
(when (and (< 0.7 (-> self control unknown-float12))
(< 0.7 (-> self control unknown-float26))
@@ -739,6 +762,8 @@
)
)
;; definition for function target-log-trans
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior target-log-trans target ()
(let ((v1-1 (-> self control unknown-word00)))
@@ -750,6 +775,8 @@
(none)
)
;; definition for function target-move-dist
;; INFO: Used lq/sq
(defbehavior target-move-dist target ((arg0 time-frame))
(let ((s5-0 (new-stack-vector0))
(f30-0 0.0)
@@ -780,6 +807,8 @@
)
)
;; definition for function turn-to-vector
;; INFO: Used lq/sq
(defbehavior turn-to-vector target ((arg0 vector) (arg1 float))
(let ((gp-0 (new-stack-vector0)))
(warp-vector-into-surface! gp-0 arg0 (-> self control local-normal) (-> self control unknown-matrix03))
@@ -818,15 +847,16 @@
(vector+! gp-1 gp-1 (-> self control trans))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
gp-1
(the-as meters #x444ccccd)
(meters 0.2)
"target"
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
)
)
)
;; definition for function target-bend-vel-turn
(defbehavior target-bend-vel-turn target ((arg0 vector))
(cond
((= (-> self control unknown-surface01 vel-turn) 0.0)
@@ -854,6 +884,8 @@
arg0
)
;; definition for function target-add-slide-factor
;; INFO: Used lq/sq
(defbehavior target-add-slide-factor target ((arg0 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -941,6 +973,8 @@
)
)
;; definition for function add-thrust
;; INFO: Used lq/sq
(defbehavior add-thrust target ()
(let ((s5-0 (-> self control unknown-vector01))
(gp-0 (-> self control unknown-vector00))
@@ -1080,9 +1114,9 @@
(vector+! gp-1 gp-1 (-> self control trans))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
gp-1
(the-as meters #x444ccccd)
(meters 0.2)
"ltransv"
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0))
)
@@ -1091,15 +1125,17 @@
(vector+! gp-1 gp-1 (-> self control trans))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
gp-1
(the-as meters #x444ccccd)
(meters 0.2)
"btransv"
(the-as rgba (-> (new 'static 'array uint64 1 #x80ffffff) 0))
)
)
)
;; definition for function add-gravity
;; INFO: Used lq/sq
(defbehavior add-gravity target ()
(let ((s5-0 (new-stack-vector0))
(gp-0 (new-stack-vector0))
@@ -1142,6 +1178,7 @@
)
)
;; definition for function target-compute-slopes
(defbehavior target-compute-slopes target ((arg0 vector))
(let ((gp-0 (new 'stack-no-clear 'vector))
(s4-0 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control unknown-quaternion00)))
@@ -1173,6 +1210,7 @@
0
)
;; definition for function do-rotations1
(defbehavior do-rotations1 target ()
(rotate-toward-orientation!
(-> self control)
@@ -1185,6 +1223,8 @@
)
)
;; definition for function do-rotations2
;; INFO: Used lq/sq
(defbehavior do-rotations2 target ()
(let ((gp-0 (vector-z-quaternion! (new-stack-vector0) (-> self control dir-targ)))
(s5-0
@@ -1246,27 +1286,27 @@
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
gp-0
(the-as meters #x46000000)
(meters 2.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
s5-0
(the-as meters #x46000000)
(meters 2.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x800080ff) 0))
)
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(-> self control unknown-matrix01 vector 2)
(the-as meters #x46000000)
(meters 2.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
)
(rotate-toward-orientation!
@@ -1299,6 +1339,8 @@
(target-compute-slopes (-> self control dynam gravity-normal))
)
;; definition for function leg-ik-callback
;; INFO: Used lq/sq
(defun leg-ik-callback ((arg0 joint-mod-ik) (arg1 object) (arg2 object) (arg3 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -1397,6 +1439,8 @@
)
)
;; definition for function target-update-ik
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior target-update-ik target ()
(rlet ((acc :class vf)
@@ -1570,6 +1614,8 @@
)
)
;; definition for function pre-collide-setup
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior pre-collide-setup target ()
(if (>= (-> self clock frame-counter) (-> self control unknown-time-frame04))
@@ -1605,6 +1651,7 @@
(none)
)
;; definition for function level-setup
;; WARN: Return type mismatch int vs none.
(defbehavior level-setup target ()
(let ((gp-0 (-> self current-level)))
@@ -1622,6 +1669,8 @@
(none)
)
;; definition for function flag-setup
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior flag-setup target ()
(cond
@@ -1901,6 +1950,7 @@
(none)
)
;; definition for function post-flag-setup
;; WARN: Return type mismatch int vs none.
(defbehavior post-flag-setup target ()
(if (logtest? (-> self control status) (cshape-moving-flags t-wall t-act))
@@ -1990,6 +2040,8 @@
(none)
)
;; definition for function bend-gravity
;; INFO: Used lq/sq
(defbehavior bend-gravity target ()
(if (and (logtest? (-> self control root-prim prim-core action) (collide-action no-normal-reset))
(zero? (logand (-> self control status) (cshape-moving-flags on-surface)))
@@ -2043,56 +2095,58 @@
(vector-normalize! (-> self control unknown-vector02) 1.0)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
gp-0
(the-as meters #x46000000)
(meters 2.0)
(new 'static 'rgba :b #xff :a #x80)
)
)
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(-> self control local-normal)
(the-as meters #x46000000)
(meters 2.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(-> self control unknown-dynamics00 gravity-normal)
(the-as meters #x46200000)
(meters 2.5)
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(-> self control dynam gravity-normal)
(the-as meters #x46400000)
(meters 3.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(-> self control unknown-vector02)
(the-as meters #x46400000)
(meters 3.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
)
(add-debug-vector
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> self control trans)
(vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control unknown-quaternion00))
(the-as meters #x46400000)
(meters 3.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
)
)
;; definition for function target-compute-edge
;; INFO: Used lq/sq
(defbehavior target-compute-edge target ()
(let ((s5-0 *edge-grab-info*))
(cond
@@ -2242,6 +2296,8 @@
(none)
)
;; definition for function target-compute-edge-rider
;; INFO: Used lq/sq
(defbehavior target-compute-edge-rider target ()
(let ((gp-0 *edge-grab-info*))
(cond
@@ -2306,6 +2362,8 @@
(none)
)
;; definition for function target-compute-pole
;; INFO: Used lq/sq
(defbehavior target-compute-pole target ()
(rlet ((acc :class vf)
(vf0 :class vf)
@@ -2366,40 +2424,34 @@
(when *display-edge-collision-marks*
(add-debug-vector
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> (the-as swingpole s2-0) root trans)
(the-as vector (&-> s2-0 stack 96))
(the-as meters #x46400000)
(meters 3.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x80ff00ff) 0))
)
(add-debug-sphere
#t
(bucket-id bucket-324)
(bucket-id debug2)
(-> self control unknown-vector30)
(the-as meters #x444ccccd)
(meters 0.2)
(the-as rgba (-> (new 'static 'array uint64 1 #x800000ff) 0))
)
(add-debug-sphere
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
s4-0
(the-as meters #x444ccccd)
(meters 0.2)
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ff00) 0))
)
(add-debug-sphere
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
s3-0
(the-as meters #x444ccccd)
(meters 0.2)
(the-as rgba (-> (new 'static 'array uint64 1 #x8040ff00) 0))
)
(add-debug-sphere
#t
(bucket-id bucket-318)
s5-0
(the-as meters #x444ccccd)
(new 'static 'rgba :b #xff :a #x80)
)
(add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-0 (meters 0.2) (new 'static 'rgba :b #xff :a #x80))
)
)
)
@@ -2439,6 +2491,8 @@
)
)
;; definition for function target-calc-camera-pos
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior target-calc-camera-pos target ()
(let ((s5-0 (new 'stack-no-clear 'vector))
@@ -2530,6 +2584,8 @@
(none)
)
;; definition for function joint-points
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior joint-points target ()
(let ((f0-1 (* 0.00078125 (the float (-> self neck loock-at-count)))))
@@ -2627,6 +2683,8 @@
(none)
)
;; definition for function do-target-gspot
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defbehavior do-target-gspot target ()
(cond
@@ -2659,6 +2717,8 @@
(none)
)
;; definition for function target-real-post
;; INFO: Used lq/sq
(defbehavior target-real-post target ()
(let ((f30-0 (-> self clock clock-ratio)))
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
@@ -2825,11 +2885,14 @@
(none)
)
;; definition for function target-post
(defbehavior target-post target ()
(target-real-post)
(none)
)
;; definition for function target-swim-post
;; INFO: Used lq/sq
(defbehavior target-swim-post target ()
(let ((f30-0 (-> self clock clock-ratio)))
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
@@ -2957,6 +3020,8 @@
(none)
)
;; definition for function target-no-stick-post
;; INFO: Used lq/sq
(defbehavior target-no-stick-post target ()
(let ((f30-0 (-> self clock clock-ratio)))
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
@@ -3085,6 +3150,8 @@
(none)
)
;; definition for function target-no-move-post
;; INFO: Used lq/sq
(defbehavior target-no-move-post target ()
(let ((f30-0 (-> self clock clock-ratio)))
(let ((gp-1 (max 1 (the int (-> self clock time-adjust-ratio)))))
@@ -3182,6 +3249,7 @@
(none)
)
;; definition for function target-no-ja-move-post
(defbehavior target-no-ja-move-post target ()
(vector-!
(-> self control unknown-vector05)
@@ -3201,6 +3269,8 @@
(none)
)
;; definition for function reset-target-state
;; INFO: Used lq/sq
(defbehavior reset-target-state target ((arg0 symbol))
(when arg0
(vector-identity! (-> self control scale))
@@ -3230,6 +3300,8 @@
self
)
;; definition for method 28 of type target
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod init-target target ((obj target) (arg0 continue-point) (arg1 symbol))
(local-vars (s1-0 int) (s2-0 int) (s3-0 int) (s4-0 int) (sv-16 collide-shape-prim-group))
@@ -3465,6 +3537,7 @@
(none)
)
;; definition for function target-init
;; WARN: Return type mismatch object vs none.
(defbehavior target-init target ((arg0 continue-point))
(init-target self arg0 #f)
@@ -3474,6 +3547,7 @@
(none)
)
;; definition for function tobot-init
;; WARN: Return type mismatch object vs none.
(defbehavior tobot-init target ((arg0 symbol))
(init-target self (the-as continue-point #f) 'tobot)
@@ -3484,6 +3558,7 @@
(none)
)
;; definition for method 10 of type target
(defmethod deactivate target ((obj target))
(kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed)
(if (nonzero? (-> obj darkjak))
@@ -3495,6 +3570,7 @@
(none)
)
;; definition for function stop
(defun stop ((arg0 symbol))
(when *target*
(kill-by-name "target" *active-pool*)
@@ -3504,6 +3580,7 @@
0
)
;; definition for function start
(defun start ((arg0 symbol) (arg1 continue-point))
(let ((v1-0 arg0))
(set! (-> *level* play?) (if (= v1-0 'play)
@@ -3534,6 +3611,7 @@
*target*
)
;; definition for function tobot-start
;; WARN: Return type mismatch (pointer process) vs target.
(defun tobot-start ((arg0 symbol))
(the-as target (process-spawn
@@ -3547,11 +3625,8 @@
)
)
;; definition for function tobot-stop
(defun tobot-stop ()
(kill-by-name "tobot" *active-pool*)
0
)
+17 -1
View File
@@ -118,4 +118,20 @@
)
(define-extern *target-shadow-control* shadow-control)
(define-extern *TARGET-bank* target-bank)
(define-extern *TARGET-bank* target-bank)
(defun target-pos ((arg0 int))
(let ((a1-0 *target*))
(cond
(a1-0
(if (zero? arg0)
(-> a1-0 control trans)
(vector<-cspace! (new 'static 'vector) (-> a1-0 node-list data arg0))
)
)
(else
(camera-pos)
)
)
)
)
@@ -5,6 +5,10 @@
;; name in dgo: progress-h
;; dgos: ENGINE, GAME
(define-extern deactivate-progress (function none))
(define-extern progress-allowed? (function symbol))
(define-extern hide-progress-screen (function none))
;; DECOMP BEGINS
(deftype progress (process-drawable)
@@ -46,7 +50,7 @@
(progress-method-24 () none 24)
(progress-method-25 () none 25)
(progress-method-26 () none 26)
(progress-method-27 () none 27)
(can-go-back? (_type_) symbol 27)
(progress-method-28 () none 28)
(progress-method-29 () none 29)
(progress-method-30 () none 30)
@@ -5,5 +5,6 @@
;; name in dgo: progress
;; dgos: ENGINE, GAME
(set! *progress-process* #f)
;; DECOMP BEGINS
+1 -1
View File
@@ -31,6 +31,6 @@
)
)
(define *text-group-names* (the-as (array string) (new 'static 'boxed-array :type string "common")))
(define *text-group-names* (new 'static 'boxed-array :type string "common"))
(define *common-text-heap* (new 'global 'kheap))
(define *common-text* (the-as game-text-info #f))
+247
View File
@@ -0,0 +1,247 @@
(defun hack-update-camera ((location vector) (inv-rot matrix))
"Debugging function to set the camera's position and orientation"
;; update to compute the perspective matrix.
(update-math-camera
*math-camera*
'ntsc
'aspect4x3
(-> *math-camera* fov)
)
;; need to set this - math-camera starts up wrong
(set-video-mode 'ntsc)
;; copy the input rotation
(matrix-copy! (-> *math-camera* inv-camera-rot) inv-rot)
;; inverse of rotation matrix matrix is its transpose
(matrix-transpose! (-> *math-camera* camera-rot) (-> *math-camera* inv-camera-rot))
;; fake some value here
(set! (-> *math-camera* fov-correction-factor) 1.0)
;; do the math
(set! (-> *math-camera* trans quad) (-> location quad))
(let ((cam-temp (-> *math-camera* camera-temp))
(cam-rot (-> *math-camera* camera-rot))
(inv-cam-rot (-> *math-camera* inv-camera-rot))
(cam-trans (-> *math-camera* trans))
)
(let ((rotated-trans (new-stack-vector0)))
(set! (-> rotated-trans x) (- (-> cam-trans x)))
(set! (-> rotated-trans y) (- (-> cam-trans y)))
(set! (-> rotated-trans z) (- (-> cam-trans z)))
(set! (-> rotated-trans w) 1.0)
(vector-matrix*! rotated-trans rotated-trans cam-rot)
(set! (-> cam-rot vector 3 quad) (-> rotated-trans quad))
)
(matrix*! cam-temp cam-rot (-> *math-camera* perspective))
(set! (-> inv-cam-rot vector 3 quad) (-> cam-trans quad))
;; fixes it!
;(set! (-> *math-camera* camera-temp data 15) -6.)
)
(none)
)
(defun test-function ((iter int))
"This function draws the debug stuff. You can edit this, then reload this file to play with it."
;; val will increase from 0 to 1, then reset back to 0.
(let* ((frame (the float (mod (* 4 iter) 1600)))
(val (/ frame 1600.0)))
(format *stdcon* "~0kval ~f~%" val)
;; orbit the camera around in a circle with radius 5 m.
(let* ((rad (meters 5.0))
(x (* rad (sin (* (degrees 360.0) val))))
(z (* rad (cos (* (degrees 360.0) val))))
(cam-pos (new 'stack 'vector))
(cam-inv-rot (new 'stack 'matrix))
)
;; this matrix will look directly at the origin...
(set! (-> cam-pos x) x)
(set! (-> cam-pos z) z)
(set! (-> cam-pos y) (meters 1.))
(forward-down->inv-matrix cam-inv-rot cam-pos (new 'static 'vector :y 1.0))
;; if the camera is here.
(set! (-> cam-pos x) (- 0. x))
(set! (-> cam-pos z) (- 0. z))
(set! (-> cam-pos y) (meters -3.))
;; (hack-update-camera cam-pos cam-inv-rot)
;; create some test points
(let ((p0 (new 'static 'vector :x (meters .8) :y (meters .2) :z (meters 2.0)))
(p1 (new 'static 'vector :x (meters .3) :y (meters .3) :z (meters 2.5)))
(p2 (new 'static 'vector :x (meters .5) :y (meters .7) :z (meters 1.5)))
(b0 (new 'static 'vector :x (meters .5) :y (meters .5) :z (meters .5)))
(b1 (new 'static 'vector :x (meters -.5) :y (meters -.5) :z (meters -.5)))
)
(add-debug-cross #t (bucket-id debug-no-zbuf1) (new 'static 'vector) (meters 2.0))
(add-debug-box #t (bucket-id debug-no-zbuf1) p0 p2 (new 'static 'rgba :b #x80 :r #x80 :g #x80 :a #x80))
(add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) p0 p1 p2 (new 'static 'rgba :r #x80 :a #x80))
(add-debug-text-3d #t (bucket-id debug-no-zbuf1) "triangle!" p0 (the font-color 1) (the vector2h #f))
(add-debug-sphere #t (bucket-id debug-no-zbuf1) p0 (meters 0.5) (new 'static 'rgba :r #x80 :a #x80))
(add-debug-line-sphere #t (bucket-id debug-no-zbuf1)
(new 'static 'vector :x (meters 0.8))
(new 'static 'vector :y (meters -4.0))
(meters 1.0) (new 'static 'rgba :r #x40 :g #x80 :a #x80))
)
)
)
(none)
)
(defun launch-test-process ()
"Call this to launch a process that draws the debug demo"
(let ((proc (get-process *nk-dead-pool* process 1024)))
(activate proc *active-pool* "test" *kernel-dram-stack*)
(run-next-time-in-process proc (lambda ()
(let ((iter 0))
(while #t
(test-function iter)
(suspend)
(+! iter 1)
)
)
)
)
proc)
)
(define *wasd-camera-transform* (new 'global 'transform))
(defun wasd-camera-update ()
(let ((local-trans (new-stack-vector0))
(trans *wasd-camera-transform*)
(fast-mode (cpad-hold? 0 r2))
(pad-idx 0))
;; circle/square move camera relative x (left and right)
(set! (-> local-trans x)
(cond
((cpad-hold? 0 circle)
-1600.0
)
((cpad-hold? 0 square)
1600.0
)
(else
0.0
)
)
)
;; no way to move camera relative y (up/down)
(set! (-> local-trans y) 0.0)
;; in and out movement
(set! (-> local-trans z)
(cond
((cpad-hold? 0 down)
-1600.0
)
((cpad-hold? 0 up)
1600.0
)
(else
0.0
)
)
)
(set! (-> local-trans w) 1.0)
(when fast-mode
(vector-float*! local-trans local-trans 10.)
)
;; rotate this into world frame
(let ((inv-cam-rot (new-stack-vector0))
(cam-rot-mat (new-stack-matrix0)))
;; unused.
(vector-negate! inv-cam-rot (-> trans rot))
;; convert rotation to rotation matrix.
(matrix-rotate-xyz! cam-rot-mat (-> trans rot))
;; and rotate the translation.
(vector-matrix*! local-trans local-trans cam-rot-mat)
)
;; and update the transform
(vector+! (-> trans trans) (-> trans trans) local-trans)
;; don't forget to fix w.
(set! (-> trans trans w) 1.0)
;; global translation
(let ((diff (if fast-mode 10000.0 2000.0)))
(if (cpad-hold? 0 l1)
(set! (-> trans trans y) (+ diff (-> trans trans y)))
)
(if (cpad-hold? 0 r1)
(set! (-> trans trans y) (+ (- diff) (-> trans trans y)))
)
)
;; rotation (don't allow camera roll)
(if (cpad-hold? 0 x)
(set! (-> trans rot x) (+ 200. (-> trans rot x)))
)
(if (cpad-hold? 0 triangle)
(set! (-> trans rot x) (+ -200. (-> trans rot x)))
)
(if (cpad-hold? 0 left)
(set! (-> trans rot y) (+ 300. (-> trans rot y)))
)
(if (cpad-hold? 0 right)
(set! (-> trans rot y) (+ -300. (-> trans rot y)))
)
(set! (-> trans scale x) 1.)
(set! (-> trans scale y) 1.)
(set! (-> trans scale z) 1.)
(set! (-> trans scale w) 1.)
)
)
(defun launch-wasd-process ()
"Launch a process to control the camera with keyboard.
Note that the test process above also controls the camera and should be killed first.
For example, after loading this file, do
(kill-test-procs)
(launch-wasd-process)"
(let ((proc (get-process *nk-dead-pool* process 1024)))
(activate proc *active-pool* "test" *kernel-dram-stack*)
(set! (-> *wasd-camera-transform* trans y) (meters 4.0))
(run-next-time-in-process proc (lambda ()
(let ((iter 0))
(while #t
(wasd-camera-update)
(let ((mat (new-stack-matrix0)))
(transform-matrix-calc! *wasd-camera-transform* mat)
(set! (-> mat data 3) 0.)
(set! (-> mat data 7) 0.)
(set! (-> mat data 11) 0.)
(set! (-> mat data 12) 0.)
(set! (-> mat data 13) 0.)
(set! (-> mat data 14) 0.)
(set! (-> mat data 15) 1.)
;;(matrix-transpose! mat mat)
(hack-update-camera (-> *wasd-camera-transform* trans) mat)
)
(suspend)
(+! iter 1)
)
)
)
)
proc)
)
+27
View File
@@ -660,6 +660,33 @@
)
;;;;;;;;;;;;;;;;;;;;;
;; PRISON
;;;;;;;;;;;;;;;;;;;;;
(cgo "PRI.DGO" "pri.gd")
(goal-src-sequence
"levels/"
:deps ("$OUT/obj/los-control.o")
"fortress/prison/intro-texture.gc"
"fortress/prison/prison-part.gc"
"fortress/prison/prison-obs.gc"
)
(copy-textures 1578 1950 1579 2647)
(copy-gos
"daxter-highres-ag"
"prsn-torture-ag"
"prsn-chair-shackle-ag"
"prsn-hang-cell-ag"
"warp-gate-b-ag"
"prsn-vent-fan-ag"
"fort-entry-gate-ag"
"prsn-cell-door-ag"
"prison-vis"
)
;;;;;;;;;;;;;;;;;;;;;
+8
View File
@@ -154,6 +154,8 @@
(define-extern string->symbol (function string symbol))
(define-extern link-begin (function pointer (pointer uint8) int kheap link-flag int))
(define-extern link-reset (function none))
(define-extern kset-language (function language-enum int))
(define-extern syncv (function int int))
(define-extern __pc-get-mips2c (function string function))
@@ -163,6 +165,12 @@
(define-extern __pc-texture-upload-now (function object object none))
(define-extern __pc-texture-relocate (function object object object none))
(define-extern link-resume (function int))
(define-extern unload (function string none))
(define-extern reset-graph (function int int int int none))
;; PC stuff
(defenum pc-prof-event
(begin 0)
+8 -1
View File
@@ -18,6 +18,13 @@ def get_failures(root_dir):
for f in glob.glob(os.path.join(file[0], "*.gc"))
]
# removesuffix only added in python 3.9....
def removesuffix(self: str, suffix: str, /) -> str:
if self.endswith(suffix):
return self[:-len(suffix)]
else:
return self[:]
def main():
parser = argparse.ArgumentParser()
parser.add_argument(dest="diff", help="the failures folder")
@@ -26,7 +33,7 @@ def main():
args = parser.parse_args()
for replacement in get_failures(args.diff):
obj_name = os.path.basename(replacement).removesuffix(".gc").replace("_REF", "")
obj_name = removesuffix(os.path.basename(replacement), ".gc").replace("_REF", "")
# Find gsrc path, given game-name
ref_path = get_ref_path_from_filename(args.game, obj_name, args.reference)
+14 -15
View File
@@ -2,19 +2,18 @@
(in-package goal)
;; definition for symbol *collide-vif0-init*, type (array uint32)
(define *collide-vif0-init* (the-as (array uint32) (new 'static 'boxed-array :type uint32
#x30000000
#x4d000000
#x4d000000
#x4d000000
#x3f800000
#x5000001
#x20000000
#x40404040
#x1000404
#x0
#x0
#x0
)
)
(define *collide-vif0-init* (new 'static 'boxed-array :type uint32
#x30000000
#x4d000000
#x4d000000
#x4d000000
#x3f800000
#x5000001
#x20000000
#x40404040
#x1000404
#x0
#x0
#x0
)
)
+160 -162
View File
@@ -32,169 +32,167 @@
;; definition for symbol *vif-disasm-table*, type (array vif-disasm-element)
(define *vif-disasm-table*
(the-as (array vif-disasm-element)
(new 'static 'boxed-array :type vif-disasm-element
(new 'static 'vif-disasm-element :mask #x7f :string1 "nop")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print #x2 :string1 "stcycl")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 offset)
:print #x1
:string1 "offset"
:string2 "offset"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 base) :print #x1 :string1 "base" :string2 "base")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 itop) :print #x1 :string1 "itop" :string2 "addr")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stmod)
:print #x1
:string1 "stmod"
:string2 "mode"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mskpath3)
:print #x1
:string1 "mskpath3"
:string2 "mask"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mark) :print #x1 :string1 "mark" :string2 "mark")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flushe) :string1 "flushe")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flush) :string1 "flush")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flusha) :string1 "flusha")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mscal)
:print #x1
:string1 "mscal"
:string2 "addr"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscnt) :string1 "mscnt")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mscalf)
:print #x1
:string1 "mscalf"
:string2 "addr"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stmask)
:print #x3
:string1 "stmask"
:string2 "mask"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 strow)
:print #x4
:string1 "strow"
:string2 "row"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stcol)
:print #x4
:string1 "stcol"
:string2 "col"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mpg) :print #x5 :string1 "mpg")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 direct) :print #x6 :string1 "direct")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 directhl) :print #x6 :string1 "directhl")
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-32)
:val #x10
:print #x7
:string1 "unpack-s-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-16)
:val #x8
:print #x7
:string1 "unpack-s-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-8)
:val #x4
:print #x7
:string1 "unpack-s-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-32)
:val #x8
:print #x7
:string1 "unpack-v2-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-16)
:val #x4
:print #x7
:string1 "unpack-v2-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-8)
:val #x2
:print #x7
:string1 "unpack-v2-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-32)
:val #xc
:print #x7
:string1 "unpack-v3-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-16)
:val #x6
:print #x7
:string1 "unpack-v3-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-8)
:val #x3
:print #x7
:string1 "unpack-v3-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-32)
:val #x10
:print #x7
:string1 "unpack-v4-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-16)
:val #x8
:print #x7
:string1 "unpack-v4-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-8)
:val #x4
:print #x7
:string1 "unpack-v4-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-5)
:val #x2
:print #x7
:string1 "unpack-v4-5"
)
(new 'static 'vif-disasm-element :print #x8)
(new 'static 'boxed-array :type vif-disasm-element
(new 'static 'vif-disasm-element :mask #x7f :string1 "nop")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print #x2 :string1 "stcycl")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 offset)
:print #x1
:string1 "offset"
:string2 "offset"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 base) :print #x1 :string1 "base" :string2 "base")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 itop) :print #x1 :string1 "itop" :string2 "addr")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stmod)
:print #x1
:string1 "stmod"
:string2 "mode"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mskpath3)
:print #x1
:string1 "mskpath3"
:string2 "mask"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mark) :print #x1 :string1 "mark" :string2 "mark")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flushe) :string1 "flushe")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flush) :string1 "flush")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flusha) :string1 "flusha")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mscal)
:print #x1
:string1 "mscal"
:string2 "addr"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscnt) :string1 "mscnt")
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 mscalf)
:print #x1
:string1 "mscalf"
:string2 "addr"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stmask)
:print #x3
:string1 "stmask"
:string2 "mask"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 strow)
:print #x4
:string1 "strow"
:string2 "row"
)
(new 'static 'vif-disasm-element
:mask #x7f
:tag (vif-cmd-32 stcol)
:print #x4
:string1 "stcol"
:string2 "col"
)
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mpg) :print #x5 :string1 "mpg")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 direct) :print #x6 :string1 "direct")
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 directhl) :print #x6 :string1 "directhl")
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-32)
:val #x10
:print #x7
:string1 "unpack-s-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-16)
:val #x8
:print #x7
:string1 "unpack-s-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-s-8)
:val #x4
:print #x7
:string1 "unpack-s-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-32)
:val #x8
:print #x7
:string1 "unpack-v2-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-16)
:val #x4
:print #x7
:string1 "unpack-v2-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v2-8)
:val #x2
:print #x7
:string1 "unpack-v2-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-32)
:val #xc
:print #x7
:string1 "unpack-v3-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-16)
:val #x6
:print #x7
:string1 "unpack-v3-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v3-8)
:val #x3
:print #x7
:string1 "unpack-v3-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-32)
:val #x10
:print #x7
:string1 "unpack-v4-32"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-16)
:val #x8
:print #x7
:string1 "unpack-v4-16"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-8)
:val #x4
:print #x7
:string1 "unpack-v4-8"
)
(new 'static 'vif-disasm-element
:mask #x6f
:tag (vif-cmd-32 unpack-v4-5)
:val #x2
:print #x7
:string1 "unpack-v4-5"
)
(new 'static 'vif-disasm-element :print #x8)
)
)
+135 -136
View File
@@ -2,142 +2,141 @@
(in-package goal)
;; definition for symbol *entity-info*, type (array entity-info)
(define *entity-info* (the-as (array entity-info) (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref sage-finalboss :method-count 53)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref robotboss :method-count 21)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref assistant-levitator :method-count 53)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref babak :method-count 76)
:package "l1"
:art-group '("babak")
:pool '*16k-dead-pool*
:heap-size #x2800
)
(new 'static 'entity-info
:ptype (type-ref racer :method-count 24)
:package "game"
:art-group '("racer")
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref springbox :method-count 20)
:package "game"
:art-group '("bounceytarp")
:pool '*16k-dead-pool*
:heap-size #x1400
)
(new 'static 'entity-info
:ptype (type-ref launcher :method-count 20)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x400
)
(new 'static 'entity-info
:ptype (type-ref pickup-spawner :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref bucket :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref barrel :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref crate :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref orb-cache-top :method-count 29)
:package "game"
:art-group '("orb-cache-top")
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref eco :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref ecovent :method-count 21)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref fuel-cell :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1400
)
(new 'static 'entity-info
:ptype (type-ref buzzer :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref money :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x800
)
(new 'static 'entity-info
:ptype (type-ref water-vol :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref target-start :method-count 15)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x400
)
)
)
(define *entity-info* (new 'static 'boxed-array :type entity-info
(new 'static 'entity-info
:ptype (type-ref sage-finalboss :method-count 53)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref robotboss :method-count 21)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref assistant-levitator :method-count 53)
:package "l1"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x8000
)
(new 'static 'entity-info
:ptype (type-ref babak :method-count 76)
:package "l1"
:art-group '("babak")
:pool '*16k-dead-pool*
:heap-size #x2800
)
(new 'static 'entity-info
:ptype (type-ref racer :method-count 24)
:package "game"
:art-group '("racer")
:pool '*16k-dead-pool*
:heap-size #x4000
)
(new 'static 'entity-info
:ptype (type-ref springbox :method-count 20)
:package "game"
:art-group '("bounceytarp")
:pool '*16k-dead-pool*
:heap-size #x1400
)
(new 'static 'entity-info
:ptype (type-ref launcher :method-count 20)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x400
)
(new 'static 'entity-info
:ptype (type-ref pickup-spawner :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref bucket :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref barrel :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref crate :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref orb-cache-top :method-count 29)
:package "game"
:art-group '("orb-cache-top")
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref eco :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref ecovent :method-count 21)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref fuel-cell :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1400
)
(new 'static 'entity-info
:ptype (type-ref buzzer :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x1000
)
(new 'static 'entity-info
:ptype (type-ref money :method-count 31)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x800
)
(new 'static 'entity-info
:ptype (type-ref water-vol :method-count 30)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #xc00
)
(new 'static 'entity-info
:ptype (type-ref target-start :method-count 15)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
:heap-size #x400
)
)
)
;; definition for function entity-info-lookup
+1 -3
View File
@@ -3,9 +3,7 @@
;; definition for symbol *generic-foreground-sinks*, type (array generic-dma-foreground-sink)
(define *generic-foreground-sinks*
(the-as (array generic-dma-foreground-sink)
(new 'static 'boxed-array :type generic-dma-foreground-sink :length 0 :allocated-length 9)
)
(new 'static 'boxed-array :type generic-dma-foreground-sink :length 0 :allocated-length 9)
)
;; failed to figure out what this is:
+272 -280
View File
@@ -144,307 +144,299 @@
)
;; definition for symbol ct32-24-block-table, type (array int32)
(define ct32-24-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
0
1
4
5
16
17
20
21
2
3
6
7
18
19
22
23
8
9
12
13
24
25
28
29
10
11
14
15
26
27
30
31
)
)
(define ct32-24-block-table (new 'static 'boxed-array :type int32
0
1
4
5
16
17
20
21
2
3
6
7
18
19
22
23
8
9
12
13
24
25
28
29
10
11
14
15
26
27
30
31
)
)
;; definition for symbol mz32-24-block-table, type (array int32)
(define mz32-24-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
16
17
20
21
0
1
4
5
18
19
22
23
2
3
6
7
24
25
28
29
8
9
12
13
26
27
30
31
10
11
14
15
)
)
(define mz32-24-block-table (new 'static 'boxed-array :type int32
16
17
20
21
0
1
4
5
18
19
22
23
2
3
6
7
24
25
28
29
8
9
12
13
26
27
30
31
10
11
14
15
)
)
;; definition for symbol ct16-block-table, type (array int32)
(define ct16-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
)
)
(define ct16-block-table (new 'static 'boxed-array :type int32
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
)
)
;; definition for symbol ct16s-block-table, type (array int32)
(define ct16s-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
0
2
16
18
1
3
17
19
8
10
24
26
9
11
25
27
4
6
20
22
5
7
21
23
12
14
28
30
13
15
29
31
)
)
(define ct16s-block-table (new 'static 'boxed-array :type int32
0
2
16
18
1
3
17
19
8
10
24
26
9
11
25
27
4
6
20
22
5
7
21
23
12
14
28
30
13
15
29
31
)
)
;; definition for symbol mz16-block-table, type (array int32)
(define mz16-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
)
)
(define mz16-block-table (new 'static 'boxed-array :type int32
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
)
)
;; definition for symbol mz16s-block-table, type (array int32)
(define mz16s-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
16
18
0
2
17
19
1
3
24
26
8
10
25
27
9
11
20
22
4
6
21
23
5
7
28
30
12
14
29
31
13
15
)
)
(define mz16s-block-table (new 'static 'boxed-array :type int32
16
18
0
2
17
19
1
3
24
26
8
10
25
27
9
11
20
22
4
6
21
23
5
7
28
30
12
14
29
31
13
15
)
)
;; definition for symbol mt8-block-table, type (array int32)
(define mt8-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
0
1
4
5
16
17
20
21
2
3
6
7
18
19
22
23
8
9
12
13
24
25
28
29
10
11
14
15
26
27
30
31
)
)
(define mt8-block-table (new 'static 'boxed-array :type int32
0
1
4
5
16
17
20
21
2
3
6
7
18
19
22
23
8
9
12
13
24
25
28
29
10
11
14
15
26
27
30
31
)
)
;; definition for symbol mt4-block-table, type (array int32)
(define mt4-block-table (the-as (array int32) (new 'static 'boxed-array :type int32
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
)
)
(define mt4-block-table (new 'static 'boxed-array :type int32
0
2
8
10
1
3
9
11
4
6
12
14
5
7
13
15
16
18
24
26
17
19
25
27
20
22
28
30
21
23
29
31
)
)
;; definition for function gs-find-block
+34 -35
View File
@@ -20,41 +20,40 @@
)
;; definition for symbol *wind-scales*, type (array uint8)
(define *wind-scales* (the-as (array uint8) (new 'static 'boxed-array :type uint8
#x2
#x5
#x2
#x3
#x2
#x2
#x3
#x10
#xa
#x2
#x4
#x2
#x8
#x2
#x2
#x10
#x2
#x2
#x8
#x2
#x10
#x2
#x4
#x10
#xa
#x2
#x4
#x2
#x8
#x2
#x2
#x10
)
)
(define *wind-scales* (new 'static 'boxed-array :type uint8
#x2
#x5
#x2
#x3
#x2
#x2
#x3
#x10
#xa
#x2
#x4
#x2
#x8
#x2
#x2
#x10
#x2
#x2
#x8
#x2
#x10
#x2
#x4
#x10
#xa
#x2
#x4
#x2
#x8
#x2
#x2
#x10
)
)
;; definition of type wind-work
+2 -2
View File
@@ -2,10 +2,10 @@
(in-package goal)
;; definition for symbol EulSafe, type (array int32)
(define EulSafe (the-as (array int32) (new 'static 'boxed-array :type int32 0 1 2 0)))
(define EulSafe (new 'static 'boxed-array :type int32 0 1 2 0))
;; definition for symbol EulNext, type (array int32)
(define EulNext (the-as (array int32) (new 'static 'boxed-array :type int32 1 2 0 1)))
(define EulNext (new 'static 'boxed-array :type int32 1 2 0 1))
;; definition of type euler-angles
(deftype euler-angles (vector)
+68 -70
View File
@@ -81,79 +81,77 @@
)
;; definition for symbol binary-table, type (array float)
(define binary-table (the-as (array float) (new 'static 'boxed-array :type float
1.0
0.5
0.25
0.125
0.0625
0.03125
0.015625
0.0078125
0.00390625
0.001953125
0.0009765625
0.00048828125
0.00024414062
0.00012207031
0.000061035156
0.000030517578
0.000015258789
0.0000076293945
0.0000038146973
0.0000019073486
0.0000009536743
0.00000047683716
0.00000023841858
0.00000011920929
0.000000059604645
0.000000029802322
0.000000014901161
0.000000007450581
0.0000000037252903
0.0000000018626451
0.0000000009313226
0.0000000004656613
)
)
(define binary-table (new 'static 'boxed-array :type float
1.0
0.5
0.25
0.125
0.0625
0.03125
0.015625
0.0078125
0.00390625
0.001953125
0.0009765625
0.00048828125
0.00024414062
0.00012207031
0.000061035156
0.000030517578
0.000015258789
0.0000076293945
0.0000038146973
0.0000019073486
0.0000009536743
0.00000047683716
0.00000023841858
0.00000011920929
0.000000059604645
0.000000029802322
0.000000014901161
0.000000007450581
0.0000000037252903
0.0000000018626451
0.0000000009313226
0.0000000004656613
)
)
;; definition for symbol sincos-table, type (array float)
(define sincos-table (the-as (array float) (new 'static 'boxed-array :type float
0.7853982
0.4636476
0.24497867
0.124354996
0.06241881
0.031239834
0.015623729
0.007812341
0.0039062302
0.0019531226
0.0009765622
0.0004882812
0.00024414062
0.00012207031
0.000061035156
0.000030517578
0.000015258789
0.0000076293945
0.0000038146973
0.0000019073486
0.0000009536743
0.00000047683716
0.00000023841858
0.00000011920929
0.000000059604645
0.000000029802322
0.000000014901161
0.000000007450581
0.0000000037252903
0.0000000018626451
0.0000000009313226
0.0000000004656613
)
)
(define sincos-table (new 'static 'boxed-array :type float
0.7853982
0.4636476
0.24497867
0.124354996
0.06241881
0.031239834
0.015623729
0.007812341
0.0039062302
0.0019531226
0.0009765622
0.0004882812
0.00024414062
0.00012207031
0.000061035156
0.000030517578
0.000015258789
0.0000076293945
0.0000038146973
0.0000019073486
0.0000009536743
0.00000047683716
0.00000023841858
0.00000011920929
0.000000059604645
0.000000029802322
0.000000014901161
0.000000007450581
0.0000000037252903
0.0000000018626451
0.0000000009313226
0.0000000004656613
)
)
;; definition for function sin
+3 -3
View File
@@ -279,13 +279,13 @@
)
;; definition for symbol *edge-vert0-table*, type (array int8)
(define *edge-vert0-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 0)))
(define *edge-vert0-table* (new 'static 'boxed-array :type int8 1 2 0))
;; definition for symbol *edge-vert1-table*, type (array int8)
(define *edge-vert1-table* (the-as (array int8) (new 'static 'boxed-array :type int8 2 0 1)))
(define *edge-vert1-table* (new 'static 'boxed-array :type int8 2 0 1))
;; definition for symbol *edge-mask-table*, type (array int8)
(define *edge-mask-table* (the-as (array int8) (new 'static 'boxed-array :type int8 1 2 4)))
(define *edge-mask-table* (new 'static 'boxed-array :type int8 1 2 4))
;; definition for function inc-mod3
(defun inc-mod3 ((arg0 int))
+12 -14
View File
@@ -976,20 +976,18 @@
;; definition for symbol *death-spool-array*, type (array spool-anim)
(define *death-spool-array*
(the-as (array spool-anim)
(new 'static 'boxed-array :type spool-anim
(new 'static 'spool-anim :name "death-0181" :index 3 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0182" :index 4 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0184" :index 5 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0186" :index 6 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0187" :index 7 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0191" :index 8 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0193" :index 9 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0195" :index 10 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0197" :index 11 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0199" :index 12 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0202" :index 13 :parts 1 :command-list '())
)
(new 'static 'boxed-array :type spool-anim
(new 'static 'spool-anim :name "death-0181" :index 3 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0182" :index 4 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0184" :index 5 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0186" :index 6 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0187" :index 7 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0191" :index 8 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0193" :index 9 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0195" :index 10 :parts 1 :command-list '())
(new 'static 'spool-anim :name "death-0197" :index 11 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0199" :index 12 :parts 2 :command-list '())
(new 'static 'spool-anim :name "death-0202" :index 13 :parts 1 :command-list '())
)
)
+1 -1
View File
@@ -47,7 +47,7 @@
)
;; definition for symbol *text-group-names*, type (array string)
(define *text-group-names* (the-as (array string) (new 'static 'boxed-array :type string "common")))
(define *text-group-names* (new 'static 'boxed-array :type string "common"))
;; definition for symbol *common-text-heap*, type kheap
(define *common-text-heap* (new 'global 'kheap))
+7 -8
View File
@@ -476,14 +476,13 @@
)
;; definition for symbol *warp-info*, type (array string)
(define *warp-info* (the-as (array string) (new 'static 'boxed-array :type string
"training-warp"
"village1-warp"
"village2-warp"
"village3-warp"
"citadel-warp"
)
)
(define *warp-info* (new 'static 'boxed-array :type string
"training-warp"
"village1-warp"
"village2-warp"
"village3-warp"
"citadel-warp"
)
)
;; definition of type warp-gate
+196 -198
View File
@@ -350,205 +350,203 @@
;; definition for symbol *water-anim-look*, type (array water-anim-look)
(define *water-anim-look*
(the-as (array water-anim-look)
(new 'static 'boxed-array :type water-anim-look
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-big-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 70 :fo-max 80)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-first-room-from-entrance-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 50 :fo-max 60)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-qbert-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 48 :fo-max 58)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-first-right-branch-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 30 :fo-max 40)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-circular-with-bullys-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 15 :fo-max 25)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-with-one-whirlpool-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-with-three-whirlpools-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 26 :fo-max 36)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-start-of-helix-slide-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 25 :fo-max 35)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-room-above-exit-chamber-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 45 :fo-max 55)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-before-big-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-qbert-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-short-piece-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-big-room-upper-water-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-platform-room-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 22 :fo-max 32)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-water-with-crystal-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-center-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 70 :fo-max 80)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-lower-right-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-mid-right-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 37 :fo-max 47)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-lower-left-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-mid-left-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 51 :fo-max 61)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-robocave-main-pool-sg*
:anim 3
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 54 :fo-max 64)
)
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-arena-sg* :anim 24 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skeleton-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-behind-skeleton-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skull-back-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skull-front-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-other-near-skull-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-near-skull-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-under-spine-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-dock-sg* :anim 24 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-island-near-dock-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-lonely-island-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-dark-eco-pool-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 17 :fo-max 27)
)
(new 'static 'water-anim-look :skel-group '*water-anim-ogre-lava-sg* :anim 2 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-jungle-river-sg* :anim 3 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-village3-lava-sg* :anim 3 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-training-lake-sg* :anim 2 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-darkcave-water-with-crystal-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-back-sg* :anim 4 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-front-sg* :anim 4 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-helix-room-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "helix-dark-eco" :fo-min 120 :fo-max 130)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-finalboss-dark-eco-pool-sg*
:anim 2
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 19 :fo-max 29)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-lavatube-energy-lava-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-village1-rice-paddy-sg* :anim 8 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-village1-fountain-sg* :anim 8 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-village1-rice-paddy-mid-sg*
:anim 8
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-village1-rice-paddy-top-sg*
:anim 8
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-village2-bucket-sg* :anim 2 :ambient-sound-spec #f)
(new 'static 'boxed-array :type water-anim-look
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-big-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 70 :fo-max 80)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-first-room-from-entrance-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 50 :fo-max 60)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-qbert-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 48 :fo-max 58)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-first-right-branch-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 30 :fo-max 40)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-circular-with-bullys-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 15 :fo-max 25)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-with-one-whirlpool-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-with-three-whirlpools-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 26 :fo-max 36)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-start-of-helix-slide-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 25 :fo-max 35)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-room-above-exit-chamber-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 45 :fo-max 55)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-hall-before-big-room-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-qbert-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-short-piece-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-big-room-upper-water-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-platform-room-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 22 :fo-max 32)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-water-with-crystal-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-center-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 70 :fo-max 80)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-lower-right-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-mid-right-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 37 :fo-max 47)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-lower-left-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 20 :fo-max 30)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-maincave-mid-left-pool-sg*
:anim 10
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 51 :fo-max 61)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-robocave-main-pool-sg*
:anim 3
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 54 :fo-max 64)
)
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-arena-sg* :anim 24 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skeleton-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-behind-skeleton-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skull-back-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-above-skull-front-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-other-near-skull-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-near-skull-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-under-spine-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-dock-sg* :anim 24 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-island-near-dock-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-mud-lonely-island-sg*
:anim 24
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-misty-dark-eco-pool-sg*
:anim 24
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 17 :fo-max 27)
)
(new 'static 'water-anim-look :skel-group '*water-anim-ogre-lava-sg* :anim 2 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-jungle-river-sg* :anim 3 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-village3-lava-sg* :anim 3 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-training-lake-sg* :anim 2 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-darkcave-water-with-crystal-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-back-sg* :anim 4 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-rolling-water-front-sg* :anim 4 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-sunken-dark-eco-helix-room-sg*
:anim 6
:ambient-sound-spec (static-sound-spec "helix-dark-eco" :fo-min 120 :fo-max 130)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-finalboss-dark-eco-pool-sg*
:anim 2
:ambient-sound-spec (static-sound-spec "darkeco-pool" :fo-min 19 :fo-max 29)
)
(new 'static 'water-anim-look
:skel-group '*water-anim-lavatube-energy-lava-sg*
:anim 2
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-village1-rice-paddy-sg* :anim 8 :ambient-sound-spec #f)
(new 'static 'water-anim-look :skel-group '*water-anim-village1-fountain-sg* :anim 8 :ambient-sound-spec #f)
(new 'static 'water-anim-look
:skel-group '*water-anim-village1-rice-paddy-mid-sg*
:anim 8
:ambient-sound-spec #f
)
(new 'static 'water-anim-look
:skel-group '*water-anim-village1-rice-paddy-top-sg*
:anim 8
:ambient-sound-spec #f
)
(new 'static 'water-anim-look :skel-group '*water-anim-village2-bucket-sg* :anim 2 :ambient-sound-spec #f)
)
)
+1 -3
View File
@@ -58,9 +58,7 @@
)
;; definition for symbol *dark-crystal-flash-delays*, type (array int32)
(define *dark-crystal-flash-delays*
(the-as (array int32) (new 'static 'boxed-array :type int32 #xb4 #x96 #x78 90 60 30 15 7 3))
)
(define *dark-crystal-flash-delays* (new 'static 'boxed-array :type int32 #xb4 #x96 #x78 90 60 30 15 7 3))
;; definition for symbol *dark-crystal-exploder-params*, type joint-exploder-static-params
(define *dark-crystal-exploder-params*
+1 -3
View File
@@ -505,9 +505,7 @@
)
;; definition for symbol *keg-conveyor-keg-spawn-table*, type (array int8)
(define *keg-conveyor-keg-spawn-table*
(the-as (array int8) (new 'static 'boxed-array :type int8 1 2 1 1 2 1))
)
(define *keg-conveyor-keg-spawn-table* (new 'static 'boxed-array :type int8 1 2 1 1 2 1))
;; failed to figure out what this is:
(defstate keg-conveyor-idle (keg-conveyor)
+55 -57
View File
@@ -1257,63 +1257,61 @@
)
;; definition for symbol *lurker-army*, type (array army-info)
(define *lurker-army*
(the-as (array army-info) (new 'static 'boxed-array :type army-info
(new 'static 'army-info
:pos (new 'static 'vector :x -920633.4 :y 83546.11 :z 4210409.5)
:rot 28556.04
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -873488.4 :y 86441.984 :z 4225454.0)
:rot 37861.24
:start-frame 5.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -905871.4 :y 83132.414 :z 4231934.0)
:rot 32054.021
:start-frame 10.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -926765.06 :y 83496.96 :z 4236230.5)
:rot 30001.652
:start-frame 15.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -893345.8 :y 83517.44 :z 4212961.5)
:rot 32755.074
:start-frame 20.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -842797.06 :y 84041.73 :z 4218855.5)
:rot 43916.402
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -839274.5 :y 82644.99 :z 4248723.5)
:rot 40510.715
:start-frame 6.0
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -871485.44 :y 85909.51 :z 4243181.5)
:rot 37046.043
:start-frame 12.0
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -947523.56 :y 85835.77 :z 4219314.0)
:rot 26980.078
:start-frame 18.0
:skel 'bonelurker
)
)
)
)
(define *lurker-army* (new 'static 'boxed-array :type army-info
(new 'static 'army-info
:pos (new 'static 'vector :x -920633.4 :y 83546.11 :z 4210409.5)
:rot 28556.04
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -873488.4 :y 86441.984 :z 4225454.0)
:rot 37861.24
:start-frame 5.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -905871.4 :y 83132.414 :z 4231934.0)
:rot 32054.021
:start-frame 10.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -926765.06 :y 83496.96 :z 4236230.5)
:rot 30001.652
:start-frame 15.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -893345.8 :y 83517.44 :z 4212961.5)
:rot 32755.074
:start-frame 20.0
:skel 'babak
)
(new 'static 'army-info
:pos (new 'static 'vector :x -842797.06 :y 84041.73 :z 4218855.5)
:rot 43916.402
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -839274.5 :y 82644.99 :z 4248723.5)
:rot 40510.715
:start-frame 6.0
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -871485.44 :y 85909.51 :z 4243181.5)
:rot 37046.043
:start-frame 12.0
:skel 'bonelurker
)
(new 'static 'army-info
:pos (new 'static 'vector :x -947523.56 :y 85835.77 :z 4219314.0)
:rot 26980.078
:start-frame 18.0
:skel 'bonelurker
)
)
)
;; definition for function evilsib-trans-hook-hover
;; INFO: Return type mismatch int vs none.
+1 -3
View File
@@ -1154,9 +1154,7 @@
)
;; definition for symbol *ogre-bridge-joint-array*, type (array uint8)
(define *ogre-bridge-joint-array*
(the-as (array uint8) (new 'static 'boxed-array :type uint8 #x4 #x9 #xc #x11 #x7 #xa #xf #x12))
)
(define *ogre-bridge-joint-array* (new 'static 'boxed-array :type uint8 #x4 #x9 #xc #x11 #x7 #xa #xf #x12))
;; definition for method 11 of type ogre-bridge
;; INFO: Return type mismatch object vs none.
+1 -1
View File
@@ -156,7 +156,7 @@
;; definition (debug) for function joint-mod-debug-draw
;; WARN: Return type mismatch int vs none.
(defun-debug joint-mod-debug-draw ((arg0 joint-mod))
(add-debug-matrix #t (bucket-id bucket-318) (-> arg0 joint bone transform) (meters 2.0))
(add-debug-matrix #t (bucket-id debug-no-zbuf1) (-> arg0 joint bone transform) (meters 2.0))
0
(none)
)
+3 -3
View File
@@ -1004,7 +1004,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
@@ -1131,7 +1131,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
@@ -1248,7 +1248,7 @@
(if (and (= (-> gp-0 process type) target) (!= (-> gp-0 blend) 0.0))
(add-debug-text-sphere
*display-target-marks*
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> gp-0 target)
(meters 0.2)
"look"
+35 -11
View File
@@ -269,7 +269,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
a2-0
(the-as (pointer dma-tag) a3-16)
)
@@ -754,7 +754,7 @@
(new 'static 'vector :z 1024.0)
(-> *cam-debug-los-tri* gp-1 intersect)
(-> *cam-debug-los-tri* gp-1 color)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -780,7 +780,7 @@
(new 'static 'vector :z 1024.0)
(-> *cam-debug-coll-tri* gp-2 intersect)
(-> *cam-debug-coll-tri* gp-2 color)
(the-as meters #x44800000)
(meters 0.25)
)
)
#f
@@ -1037,7 +1037,7 @@
(new 'static 'vector :z 1024.0)
s3-0
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
(tracking-spline-method-19 obj (-> obj sample-len) s3-0 (the-as tracking-spline-sampler #f))
(camera-cross
@@ -1045,7 +1045,7 @@
(new 'static 'vector :z 1024.0)
s3-0
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -1065,7 +1065,7 @@
(new 'static 'vector :z 1024.0)
(the-as vector (-> obj point s5-0))
(new 'static 'vector4w :x #xff :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
)
@@ -1202,7 +1202,7 @@
(new 'static 'vector :z 1024.0)
(-> *setting-control* cam-current point-of-interest)
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
(the-as meters #x44800000)
(meters 0.25)
)
)
(let ((f30-0 (* 0.5 (-> *camera-combiner* fov))))
@@ -1558,7 +1558,15 @@
(set! (-> a0-3 w) 1.0)
(vector+! a1-4 v1-4 a0-3)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1))
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
gp-0
s5-0
(new 'static 'rgba :r #xff :a #x80)
#f
(the-as rgba -1)
)
(let ((a1-7 s5-0)
(v1-5 gp-0)
(a0-5 s5-0)
@@ -1569,7 +1577,15 @@
(set! (-> a0-5 w) 1.0)
(vector+! a1-7 v1-5 a0-5)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :g #xff :a #x80) #f (the-as rgba -1))
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
gp-0
s5-0
(new 'static 'rgba :g #xff :a #x80)
#f
(the-as rgba -1)
)
(let ((a1-10 s5-0)
(v1-6 gp-0)
(a0-7 s5-0)
@@ -1580,14 +1596,22 @@
(set! (-> a0-7 w) 1.0)
(vector+! a1-10 v1-6 a0-7)
)
(add-debug-line #t (bucket-id bucket-318) gp-0 s5-0 (new 'static 'rgba :b #xff :a #x80) #f (the-as rgba -1))
(add-debug-line
#t
(bucket-id debug-no-zbuf1)
gp-0
s5-0
(new 'static 'rgba :b #xff :a #x80)
#f
(the-as rgba -1)
)
(when arg0
(set! (-> s5-0 quad) (-> arg0 quad))
(vector-normalize! s5-0 4096.0)
(vector+! s5-0 gp-0 s5-0)
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
gp-0
s5-0
(new 'static 'rgba :r #x7f :g #x7f :a #x80)
+11 -11
View File
@@ -310,7 +310,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-324)
(bucket-id debug2)
gp-0
(the-as (pointer dma-tag) a3-2)
)
@@ -745,7 +745,7 @@
(new 'static 'vector :z 1024.0)
s5-0
(-> arg1 color)
(the-as meters #x45800000)
(meters 1.0)
)
)
(none)
@@ -774,7 +774,7 @@
(new 'static 'vector :z 1024.0)
s5-0
(-> arg1 color)
(the-as meters #x45800000)
(meters 1.0)
)
)
(none)
@@ -806,7 +806,7 @@
(new 'static 'vector :z 1024.0)
s5-1
(new 'static 'vector4w :x #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -819,7 +819,7 @@
(new 'static 'vector :z 1024.0)
s5-2
(new 'static 'vector4w :y #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -834,7 +834,7 @@
(new 'static 'vector :z 1024.0)
s5-3
(new 'static 'vector4w :x #x80 :z #x80 :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -885,7 +885,7 @@
(new 'static 'vector :z 1024.0)
s5-4
(new 'static 'vector4w :x #xff :y #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -928,7 +928,7 @@
(new 'static 'vector :z 1024.0)
s5-5
(new 'static 'vector4w :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
(curve-get-pos! s5-5 (cam-slave-get-float arg0 'intro-exitValue 0.0) s3-2)
(vector+! s5-5 s5-5 s4-2)
@@ -937,7 +937,7 @@
(new 'static 'vector :z 1024.0)
s5-5
(new 'static 'vector4w :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -967,7 +967,7 @@
(new 'static 'vector :z 1024.0)
s5-6
(new 'static 'vector4w :x #xff :y #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
@@ -993,7 +993,7 @@
(new 'static 'vector :z 1024.0)
s5-7
(new 'static 'vector4w :y #xff :z #xff :w #x80)
(the-as meters #x45800000)
(meters 1.0)
)
)
)
+1 -1
View File
@@ -1333,7 +1333,7 @@
(let ((t1-0 #x40000080))
(add-debug-flat-triangle
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(the-as vector (-> (the-as (inline-array collide-cache-tri) gp-0) 0))
(-> (the-as (inline-array collide-cache-tri) gp-0) 0 vertex 1)
(-> (the-as (inline-array collide-cache-tri) gp-0) 0 vertex 2)
+2 -2
View File
@@ -1644,7 +1644,7 @@
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(bucket-id bucket-324)
(bucket-id debug2)
tag-start
(the-as (pointer dma-tag) tag-end)
)
@@ -1799,7 +1799,7 @@
(if (!= (+ i 1) (-> history h-first))
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(-> history points i)
(-> history points (+ i 1))
(new 'static 'rgba :r #x80 :g #xc0 :b #x80 :a #x80)
+5 -5
View File
@@ -1249,8 +1249,8 @@
(string= (the-as string s5-1) "outro-nest")
)
)
(set! (-> palout memory-mode) (the-as uint 4))
(set! (-> hiphog memory-mode) (the-as uint 1))
(set! (-> palout memory-mode) (load-buffer-mode borrow))
(set! (-> hiphog memory-mode) (load-buffer-mode small-center))
)
(process-spawn scene-player :init scene-player-init s5-1 #t (car arg0))
)
@@ -3459,11 +3459,11 @@
#f
(lambda ((arg0 object) (arg1 debug-menu-msg))
(if (= arg1 (debug-menu-msg press))
(set! (-> *setting-control* user-default unknown-uint32-00)
(the-as uint (not (-> *setting-control* user-default unknown-uint32-00)))
(set! (-> *setting-control* user-default use-progressive-scan)
(not (-> *setting-control* user-default use-progressive-scan))
)
)
(-> *setting-control* user-default unknown-uint32-00)
(the-as uint (-> *setting-control* user-default use-progressive-scan))
)
)
(flag
+8 -8
View File
@@ -118,7 +118,7 @@
(defmethod editable-region-method-11 editable-region ((obj editable-region) (arg0 vector) (arg1 int))
(local-vars (sv-32 vector2h))
(set! sv-32 (new 'stack 'vector2h))
(add-debug-x #t (bucket-id bucket-318) arg0 (the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0)))
(add-debug-x #t (bucket-id debug-no-zbuf1) arg0 (the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0)))
(let ((s3-0 add-debug-text-3d)
(s2-0 #t)
(s1-0 318)
@@ -329,12 +329,12 @@
(let ((s5-0 (new 'stack-no-clear 'vector)))
(when (editable-method-11 obj s5-0)
(set! (-> s5-0 y) (-> s5-0 y))
(add-debug-x #t (bucket-id bucket-318) s5-0 (the-as rgba (-> (new 'static 'array uint64 1 #x80ffffff) 0)))
(add-debug-x #t (bucket-id debug-no-zbuf1) s5-0 (the-as rgba (-> (new 'static 'array uint64 1 #x80ffffff) 0)))
)
)
(add-debug-x
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
)
@@ -689,7 +689,7 @@
)
)
(add-debug-sphere-from-table
(bucket-id bucket-324)
(bucket-id debug2)
(-> obj trans)
(-> obj radius)
(get-color obj (the-as int a1-0))
@@ -1014,7 +1014,7 @@
(if (!= (-> obj direction w) 0.0)
(add-debug-vector
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
(-> obj direction)
(* -1.2 (-> obj radius))
@@ -1628,10 +1628,10 @@
(let ((s1-0 (editable-face-method-31 obj (new 'stack-no-clear 'vector))))
(add-debug-vector
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans obj)
s1-0
(the-as meters #x46000000)
(meters 2.0)
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))
)
)
@@ -2134,7 +2134,7 @@
(when (>= s4-0 3)
(add-debug-line
#t
(bucket-id bucket-318)
(bucket-id debug-no-zbuf1)
(edit-get-trans (-> obj vertex 0))
(edit-get-trans (-> obj vertex 1))
(the-as rgba (-> (new 'static 'array uint64 1 #x8000ffff) 0))

Some files were not shown because too many files have changed in this diff Show More