Crusader_Decomp/USECODE/REGRET/KEYPADNS.unk

147 lines
3.7 KiB
Text

/* synthesized appendix for KEYPADNS */
/* sparse lines above preserve recovered debugger line numbers where available */
/* ===== slot 0x01 use ===== */
function keypadns_use() /* entry=246 class_id=0x044B slot=0x01 */
{
entry:
set_info(0x0207, *(arg_06));
process_exclude();
/* global_address global_id=0x1E */
if ((Actor.getMap() != 26) && (Item.getQLo(arg_06) != 0)) goto block_03A3;
block_018E:
/* free_local_string bp_offset=0xFA target=[BP-06h] */
local_06 = "Cheaters Menu^_____________^^Select a mission^number (1-10)^and Col. Shepherd^will assign it to you.";
local_02 = KeypadGump.showKeypad(0);
if (local_02 > 10) goto block_0219;
block_0215:
local_02 = 10;
block_0219:
/* pop_global global_id=0x6 size=0x1 */
if local_02 goto block_022A;
block_0224:
/* pop_global global_id=0xF size=0x1 */
block_022A:
if (global[0x000F] == 4) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else if (global[0x000F] == 5) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else if (global[0x000F] == 6) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else if (global[0x000F] == 7) {
if (!(global[0x0016])) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
}
else if (global[0x000F] == 8) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else if (global[0x000F] == 9) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
else if (global[0x000F] == 10) {
/* str_to_ptr */
/* free_stack_string value_u8=0x0 target=[SP+00h] */
}
block_039C:
goto block_051A;
block_03A3:
/* global_address global_id=0x1E */
/* global_address global_id=0x1E */
if ((Actor.getMap(((Actor.getMap() != 25) && (Item.getQLo(arg_06) != 1))) != 26) && (Item.getQLo(arg_06) != 1)) goto block_048C;
block_03DB:
/* free_local_string bp_offset=0xFA target=[BP-06h] */
local_06 = "VIDEO PLAYER^_____________^^Mission video 0-72^Mission MVAs 73-89^Game Flicks 90-102";
local_02 = KeypadGump.showKeypad(0);
if (local_02 != 0) goto block_0456;
block_0453:
goto block_051A;
block_0456:
if (local_02 > 102) goto block_0468;
block_0462:
goto block_051A;
block_0465:
goto block_047C;
block_0468:
spawn FLICTEST.slot_20(pid, local_02, local_04);
suspend;
block_047C:
/* global_address global_id=0x1E */
goto block_051A;
block_048C:
if (Item.getMapNum(arg_06) != 0) goto block_051A;
block_049B:
local_07 = (Item.getStatus(arg_06) & 4);
if (local_07 != 0) goto block_04FF;
block_04B1:
if World.getAlertActive() goto block_04EC;
block_04B9:
spawn FREE.slot_21(pid, 0x0184, 0x00000000);
suspend;
spawn FREE.slot_21(pid, 0x0181, 0x00000000);
suspend;
goto block_051A;
block_04EC:
spawn KEYPAD.slot_20(pid, arg_06);
suspend;
goto block_0517;
block_04FF:
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
suspend;
block_0517:
goto block_051A;
block_051A:
/* free_local_string bp_offset=0xFA target=[BP-06h] */
return;
}
/* ===== slot 0x11 cast ===== */
function keypadns_cast() /* entry=246 class_id=0x044B slot=0x11 */
{
set_info(0x021D, *(arg_06));
process_exclude();
spawn FREE.slot_3B(pid, 60, 0x00000000);
suspend;
spawn FREE.slot_21(pid, 0x0183, 0x00000000);
suspend;
spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06);
suspend;
return;
}