mirror of
https://github.com/open-goal/jak-project
synced 2026-08-01 08:27:22 -04:00
jak 1
This commit is contained in:
@@ -1421,55 +1421,70 @@ TypeState CallOp::propagate_types_internal(const TypeState& input,
|
||||
|
||||
if (in_tp.kind == TP_Type::Kind::FIND_PARENT_METHOD_FUNCTION) {
|
||||
bool can_use_call_parent = true;
|
||||
// should be calling this from a method:
|
||||
if (env.func->guessed_name.kind != FunctionName::FunctionKind::METHOD) {
|
||||
TypeSpec call_parent_result_type;
|
||||
const auto& guessed_name = env.func->guessed_name;
|
||||
|
||||
if (guessed_name.kind == FunctionName::FunctionKind::METHOD ||
|
||||
guessed_name.kind == FunctionName::FunctionKind::V_STATE) {
|
||||
// should call something like:
|
||||
// (find-parent-method sharkey 39)
|
||||
const auto& type_arg = input.get(Register(Reg::GPR, Reg::A0));
|
||||
if (can_use_call_parent && type_arg.kind != TP_Type::Kind::TYPE_OF_TYPE_NO_VIRTUAL) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the first argument to find-parent-method is a "
|
||||
"{}, which should be a type",
|
||||
type_arg.print());
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
|
||||
if (can_use_call_parent && type_arg.get_type_objects_typespec() != guessed_name.type_name) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the first argument type is wrong: got {}, but "
|
||||
"expected {}",
|
||||
type_arg.get_type_objects_typespec().print(), guessed_name.type_name);
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
const auto& id_arg = input.get(Register(Reg::GPR, Reg::A1));
|
||||
int expected_id = -1;
|
||||
if (guessed_name.kind == FunctionName::FunctionKind::V_STATE) {
|
||||
auto state_info = dts.ts.lookup_method(guessed_name.type_name, guessed_name.state_name);
|
||||
expected_id = state_info.id;
|
||||
call_parent_result_type =
|
||||
state_info.type.substitute_for_method_call(guessed_name.type_name);
|
||||
} else {
|
||||
expected_id = guessed_name.method_id;
|
||||
call_parent_result_type = env.func->type; // same type as this method!
|
||||
}
|
||||
if (can_use_call_parent && !id_arg.is_integer_constant(expected_id)) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the second argument is wrong: got {}, but "
|
||||
"expected a constant integer {}",
|
||||
id_arg.print(), expected_id);
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
|
||||
} else {
|
||||
can_use_call_parent = false;
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because find-parent-method was called in {}, which isn't a "
|
||||
"method.",
|
||||
"method or state handler.",
|
||||
env.func->name());
|
||||
}
|
||||
// should call something like:
|
||||
// (find-parent-method sharkey 39)
|
||||
const auto& type_arg = input.get(Register(Reg::GPR, Reg::A0));
|
||||
if (can_use_call_parent && type_arg.kind != TP_Type::Kind::TYPE_OF_TYPE_NO_VIRTUAL) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the first argument to find-parent-method is a {}, "
|
||||
"which should be a type",
|
||||
type_arg.print());
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
|
||||
if (can_use_call_parent && type_arg.get_type_objects_typespec() != env.func->method_of_type) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the first argument type is wrong: got {}, but "
|
||||
"expected {}",
|
||||
type_arg.get_type_objects_typespec().print(), env.func->method_of_type);
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
const auto& id_arg = input.get(Register(Reg::GPR, Reg::A1));
|
||||
if (can_use_call_parent && !id_arg.is_integer_constant(env.func->guessed_name.method_id)) {
|
||||
lg::warn(
|
||||
"Can't use call-parent-method because the second argument is wrong: got {}, but expected "
|
||||
"a constant integer {}",
|
||||
id_arg.print(), env.func->guessed_name.method_id);
|
||||
can_use_call_parent = false;
|
||||
}
|
||||
|
||||
if (can_use_call_parent) {
|
||||
end_types.get(Register(Reg::GPR, Reg::V0)) = TP_Type::make_from_ts(env.func->type);
|
||||
end_types.get(Register(Reg::GPR, Reg::V0)) = TP_Type::make_from_ts(call_parent_result_type);
|
||||
use_normal_last_arg = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (use_normal_last_arg) {
|
||||
end_types.get(Register(Reg::GPR, Reg::V0)) = TP_Type::make_from_ts(in_type.last_arg());
|
||||
}
|
||||
|
||||
if (in_type.arg_count() < 1) {
|
||||
throw std::runtime_error("Called a function, but we do not know its type");
|
||||
}
|
||||
|
||||
if (use_normal_last_arg) {
|
||||
end_types.get(Register(Reg::GPR, Reg::V0)) = TP_Type::make_from_ts(in_type.last_arg());
|
||||
}
|
||||
|
||||
// set the call type!
|
||||
m_call_type = in_type;
|
||||
m_call_type_set = true;
|
||||
|
||||
@@ -3896,6 +3896,7 @@ void FunctionCallElement::update_from_stack(const Env& env,
|
||||
{
|
||||
const auto& guessed_name = env.func->guessed_name;
|
||||
if (guessed_name.kind == FunctionName::FunctionKind::METHOD) {
|
||||
// detect stuff like: ((find-parent-method...) arg...)
|
||||
auto mr_find_parent =
|
||||
match(Matcher::func(Matcher::symbol("find-parent-method"),
|
||||
{Matcher::symbol(env.func->method_of_type),
|
||||
@@ -3908,6 +3909,22 @@ void FunctionCallElement::update_from_stack(const Env& env,
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("call-parent-method")),
|
||||
arg_forms);
|
||||
}
|
||||
} else if (guessed_name.kind == FunctionName::FunctionKind::V_STATE && arg_forms.size() == 2) {
|
||||
// here, simply detect (find-parent-method...)
|
||||
//
|
||||
auto mr_find_parent = match(Matcher::symbol("find-parent-method"), unstacked.at(0));
|
||||
if (mr_find_parent.matched) {
|
||||
auto state_info =
|
||||
env.dts->ts.lookup_method(guessed_name.type_name, guessed_name.state_name);
|
||||
if (arg_forms.at(0)->to_string(env) == guessed_name.type_name &&
|
||||
arg_forms.at(1)->to_string(env) == std::to_string(state_info.id)) {
|
||||
new_form = pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(pool.form<ConstantTokenElement>("find-parent-state")));
|
||||
} else {
|
||||
printf("BAD match [%s] [%s]\n", arg_forms.at(0)->to_string(env).c_str(),
|
||||
arg_forms.at(1)->to_string(env).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1603,10 +1603,6 @@
|
||||
[49, "v1", "village2cam"]
|
||||
],
|
||||
|
||||
"(trans plat-button-move-downward sunken-elevator)": [
|
||||
[13, "v0", "(state sunken-elevator)"]
|
||||
],
|
||||
|
||||
"(method 27 sunken-elevator)": [[37, "v1", "art-joint-anim"]],
|
||||
|
||||
"nav-enemy-set-base-collide-sphere-collide-with": [
|
||||
@@ -2288,10 +2284,6 @@
|
||||
[42, "s3", "(inline-array sparticle-cpuinfo)"]
|
||||
],
|
||||
|
||||
"(trans plat-button-move-downward jungle-elevator)": [
|
||||
[11, "v0", "(state plat-button)"]
|
||||
],
|
||||
|
||||
"(code plat-button-at-end jungle-elevator)": [
|
||||
[43, "t9", "(function none :behavior plat-button)"]
|
||||
],
|
||||
@@ -2760,8 +2752,6 @@
|
||||
|
||||
"(code babak-with-cannon-jump-off-cannon)": [[28, "v1", "art-joint-anim"]],
|
||||
|
||||
"(trans nav-enemy-die babak-with-cannon)": [[40, "v0", "(state nav-enemy)"]],
|
||||
|
||||
"(enter othercam-running)": [
|
||||
[50, "gp", "process-taskable"],
|
||||
[53, "gp", "process-taskable"]
|
||||
@@ -3155,6 +3145,8 @@
|
||||
[20, "s3", "hud-fuel-cell"]
|
||||
],
|
||||
|
||||
"(enter pickup fuel-cell)": [[9, "v0", "(state eco-collectable)"]],
|
||||
|
||||
"(method 15 hud-pickups)": [
|
||||
[51, "v1", "dma-packet"],
|
||||
[52, "v1", "dma-packet"]
|
||||
@@ -3671,10 +3663,6 @@
|
||||
[69, "v1", "float"]
|
||||
],
|
||||
|
||||
"(trans play-accept fisher)": [[101, "v0", "state"]],
|
||||
|
||||
"(trans idle fisher)": [[4, "v0", "state"]],
|
||||
|
||||
"(code idle fisher)": [
|
||||
[132, "v1", "art-joint-anim"],
|
||||
[35, "v1", "float"]
|
||||
@@ -4135,7 +4123,6 @@
|
||||
],
|
||||
|
||||
"(code battlecontroller-die citb-battlecontroller)": [
|
||||
[9, "v0", "(state battlecontroller)"],
|
||||
[11, "t9", "(function none :behavior battlecontroller)"]
|
||||
],
|
||||
|
||||
@@ -4749,8 +4736,6 @@
|
||||
[22, "v1", "collide-shape-prim-group"]
|
||||
],
|
||||
|
||||
"(enter nav-enemy-victory billy-rat)": [[4, "v0", "(state nav-enemy)"]],
|
||||
|
||||
"(code billy-rat-salivate)": [[43, "v1", "art-joint-anim"]],
|
||||
|
||||
"(code idle billy)": [
|
||||
@@ -4884,8 +4869,6 @@
|
||||
|
||||
"(event wait fuel-cell)": [[95, "a0", "vector"]],
|
||||
|
||||
"(enter pickup fuel-cell)": [[9, "v0", "(state eco-collectable)"]],
|
||||
|
||||
"(code ecovalve-idle)": [[41, "v1", "process-drawable"]],
|
||||
|
||||
"(code vent-pickup)": [
|
||||
|
||||
@@ -1495,7 +1495,7 @@
|
||||
:enter (behavior ((arg0 object) (arg1 handle))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((t9-1 (-> (the-as (state eco-collectable) (find-parent-method fuel-cell 23)) enter)))
|
||||
(let ((t9-1 (-> (the-as (state eco-collectable) (find-parent-state)) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
)
|
||||
(enable-hud)
|
||||
(set! (-> *target* fp-hud) (the-as handle #f))
|
||||
((the-as (function process none) (find-parent-method first-person-hud 10)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -144,6 +144,10 @@ It type checks the arguments for the entry function.
|
||||
(set! *defstate-type-stack* '())
|
||||
`(none)
|
||||
)
|
||||
|
||||
(seval (define *defstate-current-type* #f))
|
||||
(seval (define *defstate-current-state-name* #f))
|
||||
|
||||
;; *no-state* is just used for the compiler to know whether a handler was actually set or not
|
||||
(defmacro defstate (state-name parents
|
||||
&key (virtual #f)
|
||||
@@ -163,6 +167,11 @@ It type checks the arguments for the entry function.
|
||||
*defstate-type-stack*)
|
||||
)
|
||||
(set! *defstate-type-stack* '())
|
||||
(when virtual
|
||||
(set! *defstate-current-type* defstate-type)
|
||||
(set! *defstate-current-state-name* state-name)
|
||||
)
|
||||
|
||||
;; check for default handlers
|
||||
(let ((default-handlers (assoc defstate-type *default-state-handlers*)))
|
||||
(when default-handlers
|
||||
@@ -225,6 +234,18 @@ It type checks the arguments for the entry function.
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro find-parent-state ()
|
||||
(when (or (not *defstate-current-type*)
|
||||
(not *defstate-current-state-name*))
|
||||
(error "use of find-parent-state outside of a defstate.")
|
||||
)
|
||||
`(cast-to-method-type
|
||||
,*defstate-current-type*
|
||||
,*defstate-current-state-name*
|
||||
(find-parent-method ,*defstate-current-type* (method-id-of-type ,*defstate-current-type* ,*defstate-current-state-name*))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro behavior (bindings &rest body)
|
||||
"Define an anonymous behavior for a process state. This may only be used inside a defstate!"
|
||||
|
||||
|
||||
@@ -95,10 +95,7 @@
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
)
|
||||
(the-as
|
||||
pelican
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method pelican 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
(defskelgroup *pelican-sg* pelican pelican-lod0-jg pelican-fly-ja
|
||||
|
||||
@@ -1541,7 +1541,7 @@
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((t9-2 (-> (the-as (state battlecontroller) (find-parent-method citb-battlecontroller 26)) code)))
|
||||
(let ((t9-2 (-> (find-parent-state) code)))
|
||||
(if t9-2
|
||||
((the-as (function none :behavior battlecontroller) t9-2))
|
||||
)
|
||||
|
||||
@@ -1035,7 +1035,7 @@
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method citb-exit-plat 23)) trans)))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-state)) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
@@ -1051,7 +1051,7 @@
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method citb-exit-plat 24)) trans)))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-state)) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -1755,7 +1755,7 @@
|
||||
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 80 bone transform vector 1))))
|
||||
)
|
||||
)
|
||||
(let ((t9-14 (-> (the-as state (find-parent-method fisher 24)) trans)))
|
||||
(let ((t9-14 (-> (find-parent-state) trans)))
|
||||
(if t9-14
|
||||
(t9-14)
|
||||
)
|
||||
@@ -1766,7 +1766,7 @@
|
||||
(defstate idle (fisher)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(let ((t9-1 (-> (the-as state (find-parent-method fisher 30)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method jungle-elevator 23)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -308,7 +308,7 @@ nav-enemy-default-event-handler
|
||||
(if (and *target* (= (-> *target* current-level name) 'misty))
|
||||
(spool-push *art-control* "mistycam-cannon" 0 self -1.0)
|
||||
)
|
||||
(let ((t9-3 (-> (the-as (state nav-enemy) (find-parent-method babak-with-cannon 23)) trans)))
|
||||
(let ((t9-3 (-> (find-parent-state) trans)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
(defstate nav-enemy-victory (billy-rat)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (the-as (state nav-enemy) (find-parent-method billy-rat 33)) enter)))
|
||||
(let ((t9-1 (-> (find-parent-state) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
)
|
||||
|
||||
(defmethod rigid-body-platform-method-23 tar-plat ((obj tar-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform basic none) (find-parent-method tar-plat 23)) obj (the-as basic arg0))
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
|
||||
@@ -85,7 +85,7 @@ swamp-rat-default-event-handler
|
||||
(vector-z-quaternion! (new-stack-vector0) (-> obj collide-info quat))
|
||||
(-> obj up-vector)
|
||||
)
|
||||
((the-as (function nav-enemy none) (find-parent-method swamp-rat 39)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
@@ -1218,13 +1218,7 @@
|
||||
(if (nonzero? (-> obj propeller))
|
||||
(&+! (-> obj propeller) arg0)
|
||||
)
|
||||
(the-as
|
||||
fishermans-boat
|
||||
((the-as (function rigid-body-platform int rigid-body-platform) (find-parent-method fishermans-boat 7))
|
||||
obj
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-platform-method-30 fishermans-boat ((obj fishermans-boat))
|
||||
|
||||
@@ -924,10 +924,7 @@
|
||||
(if (nonzero? (-> obj pivot))
|
||||
(&+! (-> obj pivot) arg0)
|
||||
)
|
||||
(the-as
|
||||
hutlamp
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method hutlamp 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
(defskelgroup *hutlamp-sg* hutlamp hutlamp-lod0-jg hutlamp-idle-ja
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
)
|
||||
(set! *teleport* #t)
|
||||
(set! (-> s5-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state sunken-elevator) (find-parent-method sunken-elevator 23)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
@@ -842,7 +842,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-10 (-> (the-as (state basebutton) (find-parent-method warp-gate-switch 21)) code)))
|
||||
(let ((t9-10 (-> (the-as (state basebutton) (find-parent-state)) code)))
|
||||
(if t9-10
|
||||
((the-as (function none :behavior basebutton) t9-10))
|
||||
)
|
||||
|
||||
@@ -219,8 +219,8 @@ class Compiler {
|
||||
const std::vector<std::optional<goos::ObjectType>>& unnamed,
|
||||
const std::unordered_map<std::string,
|
||||
std::pair<bool, std::optional<goos::ObjectType>>>& named);
|
||||
std::string as_string(const goos::Object& o);
|
||||
std::string symbol_string(const goos::Object& o);
|
||||
const std::string& as_string(const goos::Object& o);
|
||||
const std::string& symbol_string(const goos::Object& o);
|
||||
std::string quoted_sym_as_string(const goos::Object& o);
|
||||
goos::Object unquote(const goos::Object& o);
|
||||
bool is_quoted_sym(const goos::Object& o);
|
||||
@@ -696,6 +696,7 @@ class Compiler {
|
||||
Val* compile_car(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_cdr(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_method_of_type(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_method_id_of_type(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_method_of_object(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_addr_of(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_declare_type(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
@@ -706,7 +707,7 @@ class Compiler {
|
||||
Val* compile_psize_of(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_current_method_id(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
Val* compile_current_method_type(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
|
||||
Val* compile_cast_to_method_type(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
|
||||
// State
|
||||
Val* compile_define_state_hook(const goos::Object& form, const goos::Object& rest, Env* env);
|
||||
|
||||
@@ -214,14 +214,14 @@ void Compiler::for_each_in_list(const goos::Object& list,
|
||||
/*!
|
||||
* Convert a goos::Object that's a string to a std::string. Must be a string.
|
||||
*/
|
||||
std::string Compiler::as_string(const goos::Object& o) {
|
||||
const std::string& Compiler::as_string(const goos::Object& o) {
|
||||
return o.as_string()->data;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Convert a goos::Object that's a symbol to a std::string. Must be a string.
|
||||
*/
|
||||
std::string Compiler::symbol_string(const goos::Object& o) {
|
||||
const std::string& Compiler::symbol_string(const goos::Object& o) {
|
||||
return o.as_symbol()->name;
|
||||
}
|
||||
|
||||
|
||||
@@ -207,12 +207,14 @@ const std::unordered_map<
|
||||
{"car", {"", &Compiler::compile_car}},
|
||||
{"cdr", {"", &Compiler::compile_cdr}},
|
||||
{"method-of-type", {"", &Compiler::compile_method_of_type}},
|
||||
{"method-id-of-type", {"", &Compiler::compile_method_id_of_type}},
|
||||
{"method-of-object", {"", &Compiler::compile_method_of_object}},
|
||||
{"declare-type", {"", &Compiler::compile_declare_type}},
|
||||
{"none", {"", &Compiler::compile_none}},
|
||||
{"size-of", {"", &Compiler::compile_size_of}},
|
||||
{"psize-of", {"", &Compiler::compile_psize_of}},
|
||||
{"current-method-id", {"", &Compiler::compile_current_method_id}},
|
||||
{"cast-to-method-type", {"", &Compiler::compile_cast_to_method_type}},
|
||||
|
||||
// LAMBDA
|
||||
{"lambda", {"", &Compiler::compile_lambda}},
|
||||
|
||||
@@ -1309,6 +1309,47 @@ Val* Compiler::compile_method_of_type(const goos::Object& form,
|
||||
return get_none();
|
||||
}
|
||||
|
||||
Val* Compiler::compile_method_id_of_type(const goos::Object& form,
|
||||
const goos::Object& rest,
|
||||
Env* env) {
|
||||
auto args = get_va(form, rest);
|
||||
va_check(form, args, {{goos::ObjectType::SYMBOL}, {goos::ObjectType::SYMBOL}}, {});
|
||||
auto arg = args.unnamed.at(0);
|
||||
if (m_ts.fully_defined_type_exists(symbol_string(arg))) {
|
||||
auto info = m_ts.lookup_method(symbol_string(arg), symbol_string(args.unnamed.at(1)));
|
||||
return compile_integer(info.id, env);
|
||||
} else if (m_ts.partially_defined_type_exists(symbol_string(arg))) {
|
||||
throw_compiler_error(
|
||||
form, "The method-id-of-type form is ambiguous when used on a forward declared type.");
|
||||
} else {
|
||||
throw_compiler_error(form, "unknown type");
|
||||
}
|
||||
}
|
||||
|
||||
Val* Compiler::compile_cast_to_method_type(const goos::Object& form,
|
||||
const goos::Object& rest,
|
||||
Env* env) {
|
||||
auto args = get_va(form, rest);
|
||||
va_check(form, args, {{goos::ObjectType::SYMBOL}, {goos::ObjectType::SYMBOL}, {}}, {});
|
||||
auto arg = args.unnamed.at(0);
|
||||
if (m_ts.fully_defined_type_exists(symbol_string(arg))) {
|
||||
auto info = m_ts.lookup_method(symbol_string(arg), symbol_string(args.unnamed.at(1)));
|
||||
|
||||
auto base = compile_error_guard(args.unnamed.at(2), env);
|
||||
auto result = env->function_env()->alloc_val<AliasVal>(info.type, base);
|
||||
if (base->settable()) {
|
||||
result->mark_as_settable();
|
||||
}
|
||||
|
||||
return result;
|
||||
} else if (m_ts.partially_defined_type_exists(symbol_string(arg))) {
|
||||
throw_compiler_error(
|
||||
form, "The cast-to-method-type form is ambiguous when used on a forward declared type.");
|
||||
} else {
|
||||
throw_compiler_error(form, "unknown type");
|
||||
}
|
||||
}
|
||||
|
||||
Val* Compiler::compile_method_of_object(const goos::Object& form,
|
||||
const goos::Object& rest,
|
||||
Env* env) {
|
||||
|
||||
+20
@@ -395,6 +395,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
(seval (define *defstate-current-type* #f))
|
||||
(seval (define *defstate-current-state-name* #f))
|
||||
|
||||
;; use a compile-time list to keep track of the type of an anonymous behavior.
|
||||
(seval (define *defstate-type-stack* '()))
|
||||
(desfun def-state-check-behavior (beh-form beh-type)
|
||||
@@ -427,6 +430,11 @@
|
||||
*defstate-type-stack*)
|
||||
)
|
||||
(set! *defstate-type-stack* '())
|
||||
(when virtual
|
||||
(set! *defstate-current-type* defstate-type)
|
||||
(set! *defstate-current-state-name* state-name)
|
||||
)
|
||||
|
||||
;; check for default handlers
|
||||
(let ((default-handlers (assoc defstate-type *default-state-handlers*)))
|
||||
(when default-handlers
|
||||
@@ -489,6 +497,18 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro find-parent-state ()
|
||||
(when (or (not *defstate-current-type*)
|
||||
(not *defstate-current-state-name*))
|
||||
(error "use of find-parent-state outside of a defstate.")
|
||||
)
|
||||
`(cast-to-method-type
|
||||
,*defstate-current-type*
|
||||
,*defstate-current-state-name*
|
||||
(find-parent-method ,*defstate-current-type* (method-id-of-type ,*defstate-current-type* ,*defstate-current-state-name*))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro behavior (bindings &rest body)
|
||||
"Define an anonymous behavior for a process state. This may only be used inside a defstate!"
|
||||
|
||||
|
||||
+1
-1
@@ -1635,7 +1635,7 @@
|
||||
:enter (behavior ((arg0 object) (arg1 handle))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((t9-1 (-> (the-as (state eco-collectable) (find-parent-method fuel-cell 23)) enter)))
|
||||
(let ((t9-1 (-> (the-as (state eco-collectable) (find-parent-state)) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
+1
-3
@@ -36,7 +36,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 9 of type trajectory
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod eval-position! trajectory ((obj trajectory) (time float) (result vector))
|
||||
(vector+float*! result (-> obj initial-position) (-> obj initial-velocity) time)
|
||||
(+! (-> result y) (* 0.5 time time (-> obj gravity)))
|
||||
@@ -44,7 +43,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type nav-enemy
|
||||
;; INFO: Return type mismatch none vs nav-enemy.
|
||||
(defmethod relocate nav-enemy ((obj nav-enemy) (arg0 int))
|
||||
(if (nonzero? (-> obj neck))
|
||||
(set! (-> obj neck) (the-as joint-mod (+ (the-as int (-> obj neck)) arg0)))
|
||||
@@ -52,7 +50,7 @@
|
||||
(if (nonzero? (-> obj rand-gen))
|
||||
(set! (-> obj rand-gen) (the-as random-generator (+ (the-as int (-> obj rand-gen)) arg0)))
|
||||
)
|
||||
(the-as nav-enemy ((the-as (function process-drawable int none) (find-parent-method nav-enemy 7)) obj arg0))
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 42 of type nav-enemy
|
||||
|
||||
+1
-8
@@ -401,20 +401,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type rigid-body-platform
|
||||
;; INFO: Return type mismatch process-drawable vs rigid-body-platform.
|
||||
(defmethod relocate rigid-body-platform ((obj rigid-body-platform) (arg0 int))
|
||||
(if (nonzero? (-> obj control-point-array))
|
||||
(set! (-> obj control-point-array)
|
||||
(the-as rigid-body-control-point-inline-array (+ (the-as int (-> obj control-point-array)) arg0))
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
rigid-body-platform
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method rigid-body-platform 7))
|
||||
obj
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type rigid-body-platform
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> obj last-y) f28-0)
|
||||
)
|
||||
)
|
||||
((the-as (function nav-enemy none) (find-parent-method sharkey 39)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+1
-1
@@ -2106,7 +2106,7 @@
|
||||
;; definition for method 10 of type target
|
||||
(defmethod deactivate target ((obj target))
|
||||
(set-zero! *camera-smush-control*)
|
||||
((the-as (function process-drawable none) (find-parent-method target 10)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -184,7 +184,7 @@
|
||||
)
|
||||
(enable-hud)
|
||||
(set! (-> *target* fp-hud) (the-as handle #f))
|
||||
((the-as (function process none) (find-parent-method first-person-hud 10)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+1
-5
@@ -1067,15 +1067,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type flutflutegg
|
||||
;; INFO: Return type mismatch process-drawable vs flutflutegg.
|
||||
(defmethod relocate flutflutegg ((obj flutflutegg) (arg0 int))
|
||||
(if (nonzero? (-> obj wobbler))
|
||||
(&+! (-> obj wobbler) arg0)
|
||||
)
|
||||
(the-as
|
||||
flutflutegg
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method flutflutegg 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 20 of type flutflutegg
|
||||
|
||||
+2
-3
@@ -267,7 +267,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type beach-rock
|
||||
;; INFO: Return type mismatch none vs beach-rock.
|
||||
(defmethod relocate beach-rock ((obj beach-rock) (arg0 int))
|
||||
(if (nonzero? (-> obj part-falling))
|
||||
(set! (-> obj part-falling) (the-as sparticle-launch-control (+ (the-as int (-> obj part-falling)) arg0)))
|
||||
@@ -275,7 +274,7 @@
|
||||
(if (nonzero? (-> obj part-landing))
|
||||
(set! (-> obj part-landing) (the-as sparticle-launch-control (+ (the-as int (-> obj part-landing)) arg0)))
|
||||
)
|
||||
(the-as beach-rock ((the-as (function process-drawable int none) (find-parent-method beach-rock 7)) obj arg0))
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type beach-rock
|
||||
@@ -286,7 +285,7 @@
|
||||
(if (nonzero? (-> obj part-landing))
|
||||
(kill-and-free-particles (-> obj part-landing))
|
||||
)
|
||||
((the-as (function process-drawable none) (find-parent-method beach-rock 10)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+1
-5
@@ -126,7 +126,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type pelican
|
||||
;; INFO: Return type mismatch process-drawable vs pelican.
|
||||
(defmethod relocate pelican ((obj pelican) (arg0 int))
|
||||
(countdown (v1-0 8)
|
||||
(if (nonzero? (-> obj path-data v1-0))
|
||||
@@ -139,10 +138,7 @@
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
)
|
||||
(the-as
|
||||
pelican
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method pelican 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+10
-10
@@ -213,7 +213,7 @@
|
||||
;; definition for method 21 of type citb-arm
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm ((obj citb-arm))
|
||||
((the-as (function citb-arm-section none) (find-parent-method citb-arm 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 4))
|
||||
(set-vector! (-> obj cull-dir-local) 0.0 0.0 -1.0 1.0)
|
||||
(set! (-> obj cull-dot) (cos 5461.3335))
|
||||
@@ -241,7 +241,7 @@
|
||||
;; definition for method 21 of type citb-arm-shoulder
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-shoulder ((obj citb-arm-shoulder))
|
||||
((the-as (function citb-arm-section none) (find-parent-method citb-arm-shoulder 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 4))
|
||||
(set-vector! (-> obj cull-dir-local) 1.0 0.0 1.0 1.0)
|
||||
(set! (-> obj cull-dot) (cos 8374.045))
|
||||
@@ -355,7 +355,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-a ((obj citb-arm-a))
|
||||
(initialize-skeleton obj *citb-arm-a-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-a 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj root-override root-prim local-sphere z) -184320.0)
|
||||
0
|
||||
(none)
|
||||
@@ -365,7 +365,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-b ((obj citb-arm-b))
|
||||
(initialize-skeleton obj *citb-arm-b-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-b 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj root-override root-prim local-sphere z) -225280.0)
|
||||
0
|
||||
(none)
|
||||
@@ -375,7 +375,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-c ((obj citb-arm-c))
|
||||
(initialize-skeleton obj *citb-arm-c-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-c 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj root-override root-prim local-sphere z) -266240.0)
|
||||
0
|
||||
(none)
|
||||
@@ -385,7 +385,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-d ((obj citb-arm-d))
|
||||
(initialize-skeleton obj *citb-arm-d-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-d 21)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj root-override root-prim local-sphere z) -307200.0)
|
||||
0
|
||||
(none)
|
||||
@@ -395,7 +395,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-shoulder-a ((obj citb-arm-shoulder-a))
|
||||
(initialize-skeleton obj *citb-arm-shoulder-a-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-shoulder-a 21)) (the-as citb-arm obj))
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -404,7 +404,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod setup-new-process! citb-arm-shoulder-b ((obj citb-arm-shoulder-b))
|
||||
(initialize-skeleton obj *citb-arm-shoulder-b-sg* '())
|
||||
((the-as (function citb-arm none) (find-parent-method citb-arm-shoulder-b 21)) (the-as citb-arm obj))
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1883,7 +1883,7 @@
|
||||
:virtual #t
|
||||
:code (behavior ()
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(let ((t9-2 (-> (the-as (state battlecontroller) (find-parent-method citb-battlecontroller 26)) code)))
|
||||
(let ((t9-2 (-> (find-parent-state) code)))
|
||||
(if t9-2
|
||||
((the-as (function none :behavior battlecontroller) t9-2))
|
||||
)
|
||||
@@ -1894,7 +1894,7 @@
|
||||
;; definition for method 27 of type citb-battlecontroller
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod battlecontroller-method-27 citb-battlecontroller ((obj citb-battlecontroller))
|
||||
((the-as (function battlecontroller none) (find-parent-method citb-battlecontroller 27)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj activate-distance) 143360.0)
|
||||
0
|
||||
(none)
|
||||
|
||||
+4
-4
@@ -587,7 +587,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) "redsage-fires")
|
||||
((the-as (function citb-sage none) (find-parent-method red-sagecage 44)) obj)
|
||||
(call-parent-method obj)
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) "bluesage-fires")
|
||||
((the-as (function citb-sage none) (find-parent-method blue-sagecage 44)) obj)
|
||||
(call-parent-method obj)
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
@@ -854,7 +854,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) "yellsage-fire")
|
||||
((the-as (function citb-sage none) (find-parent-method yellow-sagecage 44)) obj)
|
||||
(call-parent-method obj)
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
@@ -953,7 +953,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) "greensage-fires")
|
||||
((the-as (function citb-sage none) (find-parent-method green-sagecage 44)) obj)
|
||||
(call-parent-method obj)
|
||||
(the-as symbol 0)
|
||||
)
|
||||
|
||||
|
||||
+3
-3
@@ -517,7 +517,7 @@
|
||||
;; definition for method 23 of type citb-chain-plat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 citb-chain-plat ((obj citb-chain-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform float none) (find-parent-method citb-chain-plat 23)) obj arg0)
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj orig-trans))
|
||||
0
|
||||
(none)
|
||||
@@ -1206,7 +1206,7 @@
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method citb-exit-plat 23)) trans)))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-state)) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
@@ -1223,7 +1223,7 @@
|
||||
:trans (behavior ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method citb-exit-plat 24)) trans)))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-state)) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
+2
-6
@@ -664,7 +664,6 @@ battlecontroller-default-event-handler
|
||||
)
|
||||
|
||||
;; definition for method 7 of type battlecontroller
|
||||
;; INFO: Return type mismatch process-drawable vs battlecontroller.
|
||||
(defmethod relocate battlecontroller ((obj battlecontroller) (arg0 int))
|
||||
(dotimes (v1-0 (-> obj spawner-count))
|
||||
(let ((a0-3 (-> obj spawner-array v1-0)))
|
||||
@@ -676,10 +675,7 @@ battlecontroller-default-event-handler
|
||||
(if (nonzero? (-> obj path-spawn))
|
||||
(&+! (-> obj path-spawn) arg0)
|
||||
)
|
||||
(the-as
|
||||
battlecontroller
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method battlecontroller 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type battlecontroller
|
||||
@@ -691,7 +687,7 @@ battlecontroller-default-event-handler
|
||||
(battlecontroller-off)
|
||||
(set! pp gp-0)
|
||||
)
|
||||
((the-as (function process-drawable none) (find-parent-method battlecontroller 10)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+3
-3
@@ -1275,7 +1275,7 @@
|
||||
(go (method-of-object obj play-anim))
|
||||
)
|
||||
(else
|
||||
((the-as (function fisher none) (find-parent-method fisher 38)) obj)
|
||||
(call-parent-method obj)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -1828,7 +1828,7 @@
|
||||
(fisher-fish-water gp-0 (+ 32768.0 (vector-y-angle (-> self node-list data 80 bone transform vector 1))))
|
||||
)
|
||||
)
|
||||
(let ((t9-14 (-> (the-as state (find-parent-method fisher 24)) trans)))
|
||||
(let ((t9-14 (-> (find-parent-state) trans)))
|
||||
(if t9-14
|
||||
(t9-14)
|
||||
)
|
||||
@@ -1840,7 +1840,7 @@
|
||||
(defstate idle (fisher)
|
||||
:virtual #t
|
||||
:trans (behavior ()
|
||||
(let ((t9-1 (-> (the-as state (find-parent-method fisher 30)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> v1-1 settings bot-plane w) (- (- (-> obj shadow-min-y) (-> obj collide-info trans y))))
|
||||
)
|
||||
0
|
||||
((the-as (function nav-enemy none) (find-parent-method hopper 39)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
(gp-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> s5-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state plat-button) (find-parent-method jungle-elevator 23)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
+1
-5
@@ -1266,15 +1266,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type jngpusher
|
||||
;; INFO: Return type mismatch process-drawable vs jngpusher.
|
||||
(defmethod relocate jngpusher ((obj jngpusher) (arg0 int))
|
||||
(if (nonzero? (-> obj back-prim))
|
||||
(&+! (-> obj back-prim) arg0)
|
||||
)
|
||||
(the-as
|
||||
jngpusher
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method jngpusher 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ nav-enemy-default-event-handler
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod common-post junglefish ((obj junglefish))
|
||||
(water-control-method-10 (-> obj water))
|
||||
((the-as (function nav-enemy none) (find-parent-method junglefish 39)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+1
-5
@@ -72,7 +72,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type plant-boss
|
||||
;; INFO: Return type mismatch process-drawable vs plant-boss.
|
||||
(defmethod relocate plant-boss ((obj plant-boss) (arg0 int))
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
@@ -88,10 +87,7 @@
|
||||
(&+! (-> obj death-prim v1-8) arg0)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
plant-boss
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method plant-boss 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition of type plant-boss-arm
|
||||
|
||||
+1
-5
@@ -482,15 +482,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type darkecobarrel
|
||||
;; INFO: Return type mismatch darkecobarrel-base vs darkecobarrel.
|
||||
(defmethod relocate darkecobarrel ((obj darkecobarrel) (arg0 int))
|
||||
(if (nonzero? (-> obj spawn-array))
|
||||
(&+! (-> obj spawn-array) arg0)
|
||||
)
|
||||
(the-as
|
||||
darkecobarrel
|
||||
((the-as (function darkecobarrel-base int darkecobarrel-base) (find-parent-method darkecobarrel 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ baby-spider-default-event-handler
|
||||
(vector-z-quaternion! (new-stack-vector0) (-> obj collide-info quat))
|
||||
(-> obj up-vector)
|
||||
)
|
||||
((the-as (function nav-enemy none) (find-parent-method baby-spider 39)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+1
-5
@@ -984,7 +984,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type driller-lurker
|
||||
;; INFO: Return type mismatch process-drawable vs driller-lurker.
|
||||
(defmethod relocate driller-lurker ((obj driller-lurker) (arg0 int))
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
@@ -995,10 +994,7 @@
|
||||
(if (nonzero? (-> obj sound2))
|
||||
(&+! (-> obj sound2) arg0)
|
||||
)
|
||||
(the-as
|
||||
driller-lurker
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method driller-lurker 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type driller-lurker
|
||||
|
||||
+1
-5
@@ -1413,7 +1413,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type gnawer
|
||||
;; INFO: Return type mismatch nav-enemy vs gnawer.
|
||||
(defmethod relocate gnawer ((obj gnawer) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
@@ -1421,10 +1420,7 @@
|
||||
(if (nonzero? (-> obj sound2))
|
||||
(&+! (-> obj sound2) arg0)
|
||||
)
|
||||
(the-as
|
||||
gnawer
|
||||
((the-as (function nav-enemy int nav-enemy) (find-parent-method gnawer 7)) (the-as nav-enemy obj) arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type gnawer
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ nav-enemy-default-event-handler
|
||||
(if (and *target* (= (-> *target* current-level name) 'misty))
|
||||
(spool-push *art-control* "mistycam-cannon" 0 self -1.0)
|
||||
)
|
||||
(let ((t9-3 (-> (the-as (state nav-enemy) (find-parent-method babak-with-cannon 23)) trans)))
|
||||
(let ((t9-3 (-> (find-parent-state) trans)))
|
||||
(if t9-3
|
||||
(t9-3)
|
||||
)
|
||||
|
||||
+1
-5
@@ -894,7 +894,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type balloonlurker
|
||||
;; INFO: Return type mismatch process-drawable vs balloonlurker.
|
||||
(defmethod relocate balloonlurker ((obj balloonlurker) (arg0 int))
|
||||
(if (nonzero? (-> obj propeller))
|
||||
(&+! (-> obj propeller) arg0)
|
||||
@@ -908,10 +907,7 @@
|
||||
(if (nonzero? (-> obj mine 1))
|
||||
(&+! (-> obj mine 1) arg0)
|
||||
)
|
||||
(the-as
|
||||
balloonlurker
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method balloonlurker 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-5
@@ -612,15 +612,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type keg-conveyor
|
||||
;; INFO: Return type mismatch process-drawable vs keg-conveyor.
|
||||
(defmethod relocate keg-conveyor ((obj keg-conveyor) (arg0 int))
|
||||
(if (nonzero? (-> obj pivot))
|
||||
(&+! (-> obj pivot) arg0)
|
||||
)
|
||||
(the-as
|
||||
keg-conveyor
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method keg-conveyor 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type keg-conveyor
|
||||
|
||||
+2
-5
@@ -1725,10 +1725,7 @@
|
||||
;; definition for method 23 of type bone-platform
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 bone-platform ((obj bone-platform) (arg0 float))
|
||||
((the-as (function rigid-body-platform basic none) (find-parent-method bone-platform 23))
|
||||
obj
|
||||
(the-as basic arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
@@ -1960,7 +1957,7 @@
|
||||
;; definition for method 27 of type misty-battlecontroller
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod battlecontroller-method-27 misty-battlecontroller ((obj misty-battlecontroller))
|
||||
((the-as (function battlecontroller none) (find-parent-method misty-battlecontroller 27)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj misty-ambush-collision-hack) #t)
|
||||
0
|
||||
(none)
|
||||
|
||||
+11
-15
@@ -489,7 +489,7 @@
|
||||
;; definition for method 23 of type ogre-plat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 ogre-plat ((obj ogre-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform basic none) (find-parent-method ogre-plat 23)) obj (the-as basic arg0))
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
@@ -674,7 +674,7 @@
|
||||
(set! (-> obj float-y-offset) 0.0)
|
||||
(+! (-> obj root-overlay trans y) (-> obj idle-y-offset))
|
||||
(rigid-body-platform-method-29 obj *ogre-step-constants*)
|
||||
((the-as (function ogre-plat none) (find-parent-method ogre-step 31)) obj)
|
||||
(call-parent-method obj)
|
||||
(let ((a0-5 (entity-actor-lookup (-> obj entity) 'alt-actor 0)))
|
||||
(if (and a0-5 (logtest? (-> a0-5 extra perm status) (entity-perm-status complete)))
|
||||
(set! (-> obj active) #t)
|
||||
@@ -768,7 +768,7 @@
|
||||
(defmethod rigid-body-platform-method-31 ogre-step-a ((obj ogre-step-a))
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 12288.0 0.0 20480.0)
|
||||
(initialize-skeleton obj *ogre-step-a-sg* '())
|
||||
((the-as (function ogre-step none) (find-parent-method ogre-step-a 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -778,7 +778,7 @@
|
||||
(defmethod rigid-body-platform-method-31 ogre-step-b ((obj ogre-step-b))
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 12288.0 0.0 20480.0)
|
||||
(initialize-skeleton obj *ogre-step-b-sg* '())
|
||||
((the-as (function ogre-step none) (find-parent-method ogre-step-b 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -788,7 +788,7 @@
|
||||
(defmethod rigid-body-platform-method-31 ogre-step-c ((obj ogre-step-c))
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 12288.0 0.0 26624.0)
|
||||
(initialize-skeleton obj *ogre-step-c-sg* '())
|
||||
((the-as (function ogre-step none) (find-parent-method ogre-step-c 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -798,7 +798,7 @@
|
||||
(defmethod rigid-body-platform-method-31 ogre-step-d ((obj ogre-step-d))
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 12288.0 0.0 20480.0)
|
||||
(initialize-skeleton obj *ogre-step-b-sg* '())
|
||||
((the-as (function ogre-step none) (find-parent-method ogre-step-d 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -854,7 +854,7 @@
|
||||
(set! (-> obj idle-y-offset) -6144.0)
|
||||
(set! (-> obj float-y-offset) 4096.0)
|
||||
(rigid-body-platform-method-29 obj *ogre-isle-constants*)
|
||||
((the-as (function ogre-plat none) (find-parent-method ogre-isle 31)) obj)
|
||||
(call-parent-method obj)
|
||||
(set! (-> obj active) #t)
|
||||
0
|
||||
(none)
|
||||
@@ -917,7 +917,7 @@
|
||||
(+! (-> obj root-overlay trans x) -8192.0)
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 8192.0 0.0 24576.0)
|
||||
(initialize-skeleton obj *ogre-isle-b-sg* '())
|
||||
((the-as (function ogre-isle none) (find-parent-method ogre-isle-b 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -928,7 +928,7 @@
|
||||
(+! (-> obj root-overlay trans x) -8192.0)
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 8192.0 0.0 24576.0)
|
||||
(initialize-skeleton obj *ogre-isle-b-sg* '())
|
||||
((the-as (function ogre-isle none) (find-parent-method ogre-isle-c 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -940,7 +940,7 @@
|
||||
(+! (-> obj root-overlay trans z) -8192.0)
|
||||
(set-vector! (-> obj root-overlay root-prim local-sphere) 0.0 8192.0 0.0 22528.0)
|
||||
(initialize-skeleton obj *ogre-isle-d-sg* '())
|
||||
((the-as (function ogre-isle none) (find-parent-method ogre-isle-d 31)) obj)
|
||||
(call-parent-method obj)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -981,17 +981,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type ogre-bridge
|
||||
;; INFO: Return type mismatch process-drawable vs ogre-bridge.
|
||||
(defmethod relocate ogre-bridge ((obj ogre-bridge) (arg0 int))
|
||||
(dotimes (v1-0 8)
|
||||
(if (nonzero? (-> obj joint-mod-array v1-0))
|
||||
(&+! (-> obj joint-mod-array v1-0) arg0)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
ogre-bridge
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method ogre-bridge 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for function ogre-bridge-update-joints
|
||||
|
||||
+1
-8
@@ -771,18 +771,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type ogreboss-super-boulder
|
||||
;; INFO: Return type mismatch process-drawable vs ogreboss-super-boulder.
|
||||
(defmethod relocate ogreboss-super-boulder ((obj ogreboss-super-boulder) (arg0 int))
|
||||
(if (nonzero? (-> obj joint))
|
||||
(&+! (-> obj joint) arg0)
|
||||
)
|
||||
(the-as
|
||||
ogreboss-super-boulder
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method ogreboss-super-boulder 7))
|
||||
obj
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-5
@@ -322,15 +322,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type cave-trap
|
||||
;; INFO: Return type mismatch process-drawable vs cave-trap.
|
||||
(defmethod relocate cave-trap ((obj cave-trap) (arg0 int))
|
||||
(if (nonzero? (-> obj alt-actors))
|
||||
(&+! (-> obj alt-actors) arg0)
|
||||
)
|
||||
(the-as
|
||||
cave-trap
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method cave-trap 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type cave-trap
|
||||
|
||||
+1
-2
@@ -623,7 +623,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type ice-cube
|
||||
;; INFO: Return type mismatch nav-enemy vs ice-cube.
|
||||
(defmethod relocate ice-cube ((obj ice-cube) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
@@ -634,7 +633,7 @@
|
||||
(if (nonzero? (-> obj part4))
|
||||
(&+! (-> obj part4) arg0)
|
||||
)
|
||||
(the-as ice-cube ((the-as (function nav-enemy int nav-enemy) (find-parent-method ice-cube 7)) obj arg0))
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type ice-cube
|
||||
|
||||
+1
-6
@@ -633,18 +633,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type snow-ball
|
||||
;; INFO: Return type mismatch process-drawable vs snow-ball.
|
||||
(defmethod relocate snow-ball ((obj snow-ball) (arg0 int))
|
||||
(dotimes (v1-0 2)
|
||||
(if (nonzero? (-> obj path v1-0))
|
||||
(&+! (-> obj path v1-0) arg0)
|
||||
)
|
||||
)
|
||||
(the-as snow-ball ((the-as (function process-drawable int process-drawable) (find-parent-method snow-ball 7))
|
||||
(the-as process-drawable obj)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type snow-ball
|
||||
|
||||
+1
-5
@@ -316,15 +316,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type snow-bumper
|
||||
;; INFO: Return type mismatch process-drawable vs snow-bumper.
|
||||
(defmethod relocate snow-bumper ((obj snow-bumper) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
)
|
||||
(the-as
|
||||
snow-bumper
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method snow-bumper 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type snow-bumper
|
||||
|
||||
+1
-5
@@ -1089,7 +1089,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type snow-fort-gate
|
||||
;; INFO: Return type mismatch process-drawable vs snow-fort-gate.
|
||||
(defmethod relocate snow-fort-gate ((obj snow-fort-gate) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
@@ -1097,10 +1096,7 @@
|
||||
(if (nonzero? (-> obj part3))
|
||||
(&+! (-> obj part3) arg0)
|
||||
)
|
||||
(the-as
|
||||
snow-fort-gate
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method snow-fort-gate 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type snow-fort-gate
|
||||
|
||||
+1
-2
@@ -572,12 +572,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type yeti-slave
|
||||
;; INFO: Return type mismatch nav-enemy vs yeti-slave.
|
||||
(defmethod relocate yeti-slave ((obj yeti-slave) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
)
|
||||
(the-as yeti-slave ((the-as (function nav-enemy int nav-enemy) (find-parent-method yeti-slave 7)) obj arg0))
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for function yeti-slave-init-by-other
|
||||
|
||||
+1
-5
@@ -779,15 +779,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type bully
|
||||
;; INFO: Return type mismatch process-drawable vs bully.
|
||||
(defmethod relocate bully ((obj bully) (arg0 int))
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
)
|
||||
(the-as
|
||||
bully
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method bully 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type bully
|
||||
|
||||
+1
-5
@@ -715,15 +715,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type helix-water
|
||||
;; INFO: Return type mismatch process-drawable vs helix-water.
|
||||
(defmethod relocate helix-water ((obj helix-water) (arg0 int))
|
||||
(if (nonzero? (-> obj alt-actors))
|
||||
(&+! (-> obj alt-actors) arg0)
|
||||
)
|
||||
(the-as
|
||||
helix-water
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method helix-water 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type helix-water
|
||||
|
||||
+1
-5
@@ -1124,15 +1124,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type puffer
|
||||
;; INFO: Return type mismatch process-drawable vs puffer.
|
||||
(defmethod relocate puffer ((obj puffer) (arg0 int))
|
||||
(if (nonzero? (-> obj neck))
|
||||
(&+! (-> obj neck) arg0)
|
||||
)
|
||||
(the-as
|
||||
puffer
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method puffer 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type puffer
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@
|
||||
;; definition for method 23 of type qbert-plat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 qbert-plat ((obj qbert-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform float none) (find-parent-method qbert-plat 23)) obj arg0)
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
|
||||
+1
-5
@@ -446,7 +446,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type square-platform
|
||||
;; INFO: Return type mismatch baseplat vs square-platform.
|
||||
(defmethod relocate square-platform ((obj square-platform) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
@@ -457,10 +456,7 @@
|
||||
(if (nonzero? (-> obj part4))
|
||||
(&+! (-> obj part4) arg0)
|
||||
)
|
||||
(the-as
|
||||
square-platform
|
||||
((the-as (function baseplat int baseplat) (find-parent-method square-platform 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type square-platform
|
||||
|
||||
+1
-5
@@ -690,7 +690,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type steam-cap
|
||||
;; INFO: Return type mismatch process-drawable vs steam-cap.
|
||||
(defmethod relocate steam-cap ((obj steam-cap) (arg0 int))
|
||||
(if (nonzero? (-> obj part2))
|
||||
(&+! (-> obj part2) arg0)
|
||||
@@ -698,10 +697,7 @@
|
||||
(if (nonzero? (-> obj part3))
|
||||
(&+! (-> obj part3) arg0)
|
||||
)
|
||||
(the-as
|
||||
steam-cap
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method steam-cap 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type steam-cap
|
||||
|
||||
+1
-5
@@ -972,7 +972,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type sunken-pipegame
|
||||
;; INFO: Return type mismatch process-drawable vs sunken-pipegame.
|
||||
(defmethod relocate sunken-pipegame ((obj sunken-pipegame) (arg0 int))
|
||||
(dotimes (v1-0 3)
|
||||
(let ((a0-4 (-> obj prize v1-0)))
|
||||
@@ -988,10 +987,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
sunken-pipegame
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method sunken-pipegame 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type sunken-pipegame
|
||||
|
||||
+3
-7
@@ -52,17 +52,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type billy
|
||||
;; INFO: Return type mismatch process-drawable vs billy.
|
||||
(defmethod relocate billy ((obj billy) (arg0 int))
|
||||
(countdown (v1-0 3)
|
||||
(if (nonzero? (-> obj path-data v1-0))
|
||||
(&+! (-> obj path-data v1-0) arg0)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
billy
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method billy 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition of type billy-snack
|
||||
@@ -257,7 +253,7 @@
|
||||
(defstate nav-enemy-victory (billy-rat)
|
||||
:virtual #t
|
||||
:enter (behavior ()
|
||||
(let ((t9-1 (-> (the-as (state nav-enemy) (find-parent-method billy-rat 33)) enter)))
|
||||
(let ((t9-1 (-> (find-parent-state) enter)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
@@ -499,7 +495,7 @@
|
||||
(go (method-of-object obj play-anim))
|
||||
)
|
||||
(else
|
||||
((the-as (function nav-enemy none) (find-parent-method billy 38)) (the-as nav-enemy obj))
|
||||
(call-parent-method obj)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
|
||||
+1
-1
@@ -926,7 +926,7 @@ nav-enemy-default-event-handler
|
||||
;; definition for method 39 of type kermit
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod common-post kermit ((obj kermit))
|
||||
((the-as (function nav-enemy none) (find-parent-method kermit 39)) obj)
|
||||
(call-parent-method obj)
|
||||
(when (-> obj charged-up)
|
||||
)
|
||||
0
|
||||
|
||||
+1
-5
@@ -74,17 +74,13 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type swamp-bat
|
||||
;; INFO: Return type mismatch process-drawable vs swamp-bat.
|
||||
(defmethod relocate swamp-bat ((obj swamp-bat) (arg0 int))
|
||||
(dotimes (v1-0 2)
|
||||
(if (nonzero? (-> obj path-list v1-0))
|
||||
(&+! (-> obj path-list v1-0) arg0)
|
||||
)
|
||||
)
|
||||
(the-as
|
||||
swamp-bat
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method swamp-bat 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition of type swamp-bat-slave
|
||||
|
||||
+1
-1
@@ -821,7 +821,7 @@
|
||||
;; definition for method 23 of type tar-plat
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 tar-plat ((obj tar-plat) (arg0 float))
|
||||
((the-as (function rigid-body-platform basic none) (find-parent-method tar-plat 23)) obj (the-as basic arg0))
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ swamp-rat-default-event-handler
|
||||
(vector-z-quaternion! (new-stack-vector0) (-> obj collide-info quat))
|
||||
(-> obj up-vector)
|
||||
)
|
||||
((the-as (function nav-enemy none) (find-parent-method swamp-rat 39)) obj)
|
||||
(call-parent-method obj)
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@
|
||||
;; definition for method 23 of type tra-pontoon
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 tra-pontoon ((obj tra-pontoon) (arg0 float))
|
||||
((the-as (function rigid-body-platform float none) (find-parent-method tra-pontoon 23)) obj arg0)
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
|
||||
+1
-8
@@ -1347,19 +1347,12 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type fishermans-boat
|
||||
;; INFO: Return type mismatch rigid-body-platform vs fishermans-boat.
|
||||
(defmethod relocate fishermans-boat ((obj fishermans-boat) (arg0 int))
|
||||
(relocate (-> obj controller) arg0)
|
||||
(if (nonzero? (-> obj propeller))
|
||||
(&+! (-> obj propeller) arg0)
|
||||
)
|
||||
(the-as
|
||||
fishermans-boat
|
||||
((the-as (function rigid-body-platform int rigid-body-platform) (find-parent-method fishermans-boat 7))
|
||||
obj
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; definition for method 30 of type fishermans-boat
|
||||
|
||||
+1
-5
@@ -1060,15 +1060,11 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type hutlamp
|
||||
;; INFO: Return type mismatch process-drawable vs hutlamp.
|
||||
(defmethod relocate hutlamp ((obj hutlamp) (arg0 int))
|
||||
(if (nonzero? (-> obj pivot))
|
||||
(&+! (-> obj pivot) arg0)
|
||||
)
|
||||
(the-as
|
||||
hutlamp
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method hutlamp 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@
|
||||
)
|
||||
(set! *teleport* #t)
|
||||
(set! (-> s5-0 quad) (-> self root-override trans quad))
|
||||
(let ((t9-1 (-> (the-as (state sunken-elevator) (find-parent-method sunken-elevator 23)) trans)))
|
||||
(let ((t9-1 (-> (find-parent-state) trans)))
|
||||
(if t9-1
|
||||
(t9-1)
|
||||
)
|
||||
|
||||
+1
-5
@@ -747,7 +747,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type swamp-blimp
|
||||
;; INFO: Return type mismatch process-drawable vs swamp-blimp.
|
||||
(defmethod relocate swamp-blimp ((obj swamp-blimp) (arg0 int))
|
||||
(if (nonzero? (-> obj gondola))
|
||||
(&+! (-> obj gondola) arg0)
|
||||
@@ -755,10 +754,7 @@
|
||||
(if (nonzero? (-> obj bag))
|
||||
(&+! (-> obj bag) arg0)
|
||||
)
|
||||
(the-as
|
||||
swamp-blimp
|
||||
((the-as (function process-drawable int process-drawable) (find-parent-method swamp-blimp 7)) obj arg0)
|
||||
)
|
||||
(call-parent-method obj arg0)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@
|
||||
;; definition for method 23 of type pontoon
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod rigid-body-platform-method-23 pontoon ((obj pontoon) (arg0 float))
|
||||
((the-as (function rigid-body-platform basic none) (find-parent-method pontoon 23)) obj (the-as basic arg0))
|
||||
(call-parent-method obj arg0)
|
||||
(rigid-body-platform-method-27 obj (-> obj anchor-point))
|
||||
0
|
||||
(none)
|
||||
|
||||
+2
-7
@@ -629,7 +629,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 31 of type warp-gate-switch
|
||||
;; INFO: Return type mismatch none vs int.
|
||||
(defmethod press! warp-gate-switch ((obj warp-gate-switch) (arg0 symbol))
|
||||
(with-pp
|
||||
(when arg0
|
||||
@@ -664,11 +663,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int ((the-as (function basebutton symbol none) (find-parent-method warp-gate-switch 31))
|
||||
(the-as basebutton arg0)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(call-parent-method (the-as warp-gate-switch arg0) arg0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -888,7 +883,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-10 (-> (the-as (state basebutton) (find-parent-method warp-gate-switch 21)) code)))
|
||||
(let ((t9-10 (-> (the-as (state basebutton) (find-parent-state)) code)))
|
||||
(if t9-10
|
||||
((the-as (function none :behavior basebutton) t9-10))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user