89 lines
2.1 KiB
Text
89 lines
2.1 KiB
Text
|
|
/* synthesized appendix for SWITCH */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x20 slot_20 ===== */
|
|
function switch_slot_20() /* entry=467 class_id=0x0A15 slot=0x20 */
|
|
{
|
|
set_info(0x0207, *(arg_06));
|
|
local_02 = 0;
|
|
while (local_02 > 11) {
|
|
spawn FREE.slot_3B(pid, 10, 0x00000000);
|
|
suspend;
|
|
local_02 = (1 + local_02);
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x21 slot_21 ===== */
|
|
function switch_slot_21() /* entry=467 class_id=0x0A15 slot=0x21 */
|
|
{
|
|
set_info(0x0207, *(arg_06));
|
|
if (!Item.getFrame(arg_06)) {
|
|
local_02 = 0;
|
|
while (local_02 > 5) {
|
|
spawn FREE.slot_3B(pid, 3, 0x00000000);
|
|
suspend;
|
|
local_02 = (1 + local_02);
|
|
}
|
|
return;
|
|
}
|
|
else {
|
|
local_02 = 0;
|
|
while (local_02 > 5) {
|
|
spawn FREE.slot_3B(pid, 3, 0x00000000);
|
|
suspend;
|
|
local_02 = (1 + local_02);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x22 slot_22 ===== */
|
|
function switch_slot_22() /* entry=467 class_id=0x0A15 slot=0x22 */
|
|
{
|
|
set_info(0x0207, *(arg_06));
|
|
local_01 = MainActor.hasKeycard(Item.getQLo(arg_06));
|
|
if (Item.getFrame(arg_06) == 4) {
|
|
spawn FREE.slot_21(pid, 0x00AD, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
|
suspend;
|
|
spawn FREE.slot_3B(pid, 1, 0x00000000);
|
|
suspend;
|
|
return;
|
|
}
|
|
else if (!World.getAlertActive()) {
|
|
spawn FREE.slot_21(pid, 0x0181, 0x00000000);
|
|
suspend;
|
|
if (UCMachine.rndRange(100, 0) <= 50) {
|
|
spawn FREE.slot_21(pid, 0x018D, 0x00000000);
|
|
suspend;
|
|
}
|
|
else {
|
|
spawn FREE.slot_21(pid, 0x018B, 0x00000000);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
else if (!local_01) {
|
|
spawn FREE.slot_21(pid, 0x0183, 0x00000000);
|
|
suspend;
|
|
spawn FREE.slot_3B(pid, 1, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
|
|
suspend;
|
|
return;
|
|
}
|
|
else {
|
|
spawn FREE.slot_21(pid, 0x0181, 0x00000000);
|
|
suspend;
|
|
spawn FREE.slot_21(pid, 0x018F, 0x00000000);
|
|
suspend;
|
|
spawn FREE.slot_3B(pid, 1, 0x00000000);
|
|
suspend;
|
|
spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|