166 lines
3.9 KiB
Text
166 lines
3.9 KiB
Text
|
|
/* synthesized appendix for SSWITCHE */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x01 use ===== */
|
|
function sswitche_use() /* entry=253 class_id=0x0457 slot=0x01 */
|
|
{
|
|
set_info(0x0207, *(arg_06));
|
|
process_exclude();
|
|
local_01 = Item.getFrame(arg_06);
|
|
if (Item.getMapNum(arg_06) == 0) {
|
|
if (local_01 == 2) {
|
|
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
else if (local_01 >= 2) {
|
|
local_02 = ((local_01 + 1) & 1);
|
|
spawn TRIGGER.slot_20(pid, local_01, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
else {
|
|
local_1B = Item.getQLo(arg_06);
|
|
/* loop_selector local_07 in nearby_items(shape=0x0457, origin=arg_06) */
|
|
while (!condition) {
|
|
if (!(local_07 == *(arg_06))) {
|
|
if (Item.getMapNum(local_07) == 0) {
|
|
if (Item.getQLo(local_07) == 29) {
|
|
local_09 = local_07;
|
|
local_03 = Item.getFrame(local_09);
|
|
}
|
|
else if (Item.getQLo(local_07) == 30) {
|
|
local_0B = local_07;
|
|
local_04 = Item.getFrame(local_0B);
|
|
}
|
|
else if (Item.getQLo(local_07) == 31) {
|
|
local_0D = local_07;
|
|
local_05 = Item.getFrame(local_0D);
|
|
}
|
|
}
|
|
}
|
|
local_19 = (1 + local_19);
|
|
/* loopnext */
|
|
}
|
|
for local_11 in nearby_items(shape=0x0452, origin=arg_06) {
|
|
if (Item.getMapNum(local_11) == 0) {
|
|
if (Item.getQLo(local_11) == 29) {
|
|
local_13 = local_11;
|
|
}
|
|
else if (Item.getQLo(local_11) == 30) {
|
|
local_15 = local_11;
|
|
}
|
|
else if (Item.getQLo(local_11) == 31) {
|
|
local_17 = local_11;
|
|
}
|
|
}
|
|
/* loopnext */
|
|
}
|
|
if (local_1B == 29) {
|
|
local_03 = Item.getFrame(arg_06);
|
|
local_09 = *(arg_06);
|
|
if (!(local_0B && local_0D)) {
|
|
if (!local_03) {
|
|
local_03 = 0;
|
|
local_04 = 1;
|
|
}
|
|
else {
|
|
local_03 = 1;
|
|
local_04 = 0;
|
|
}
|
|
}
|
|
}
|
|
else if (local_1B == 30) {
|
|
local_04 = Item.getFrame(arg_06);
|
|
local_0B = *(arg_06);
|
|
if (!(local_09 && local_0D)) {
|
|
if (!local_04) {
|
|
local_04 = 0;
|
|
local_03 = 1;
|
|
local_05 = 1;
|
|
}
|
|
else {
|
|
local_04 = 1;
|
|
local_03 = 0;
|
|
local_05 = 0;
|
|
}
|
|
}
|
|
}
|
|
else if (local_1B == 31) {
|
|
local_05 = Item.getFrame(arg_06);
|
|
local_0D = *(arg_06);
|
|
if (!(local_09 && local_0B)) {
|
|
if (!local_05) {
|
|
local_05 = 0;
|
|
local_04 = 1;
|
|
}
|
|
else {
|
|
local_05 = 1;
|
|
local_04 = 0;
|
|
}
|
|
}
|
|
}
|
|
if (!local_03) {
|
|
if (!(local_04 || local_05)) {
|
|
return;
|
|
}
|
|
else {
|
|
for local_0F in nearby_items(shape=0x04C9, origin=arg_06) {
|
|
if (Item.getQLo(local_0F) == 29) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
}
|
|
}
|
|
else if (!local_04) {
|
|
if (!local_05) {
|
|
return;
|
|
}
|
|
else {
|
|
for local_0F in nearby_items(shape=0x04C9, origin=arg_06) {
|
|
if (Item.getQLo(local_0F) == 30) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
}
|
|
}
|
|
else if (!local_05) {
|
|
for local_0F in nearby_items(shape=0x04C9, origin=arg_06) {
|
|
if (Item.getQLo(local_0F) == 31) {
|
|
suspend;
|
|
}
|
|
/* loopnext */
|
|
}
|
|
}
|
|
spawn FREE.slot_3B(pid, 20, 0x00000000);
|
|
suspend;
|
|
}
|
|
spawn FREE.slot_3B(pid, 20, 0x00000000);
|
|
suspend;
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x06 gotHit ===== */
|
|
function sswitche_gotHit() /* entry=253 class_id=0x0457 slot=0x06 */
|
|
{
|
|
set_info(0x020C, *(arg_06));
|
|
process_exclude();
|
|
if (Item.isEntirelyOnScreen(arg_06)) {
|
|
return;
|
|
}
|
|
else {
|
|
FREE.slot_34(arg_0C, arg_0A);
|
|
if (retval == 4) {
|
|
if (arg_0A == 1) {
|
|
return;
|
|
}
|
|
else {
|
|
spawn SSWITCHE.use(pid, arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|