Crusader_Decomp/USECODE/EUSECODE_extracted/pseudocode/VARDESK/slot_01_use.txt

60 lines
1.5 KiB
Text
Raw Normal View History

2026-03-25 23:32:36 +01:00
function vardesk_use() /* entry=238 class_id=0x0442 slot=0x01 */
{
var
referent, /* [BP+00h] type=0x69 */
item, /* [BP-02h] type=0x24 */
counter; /* [BP-04h] type=0x69 */
2026-03-26 00:37:17 +01:00
set_info(0x0207, *(arg_06));
process_exclude();
FREE.slot_33(0x021B, *(arg_06));
2026-03-26 00:37:17 +01:00
/* global_address global_id=0x3C */
/* global_address global_id=0x3C */
while (Item.getFrame(arg_06) >= 4) {
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
2026-03-26 00:37:17 +01:00
}
spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
2026-03-26 00:37:17 +01:00
suspend;
if (global[0x001F] == 9) {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
else if (global[0x001F] == 10) {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
else if (global[0x001F] == 11) {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
else if (global[0x001F] == 12) {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
else if (global[0x001F] == 13) {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
else {
2026-03-25 23:32:36 +01:00
/* str_to_ptr */
/* free_stack_string value_u8=0x4 target=[SP+04h] */
suspend;
2026-03-26 00:37:17 +01:00
}
for item in nearby_items(shape=0x043D, origin=arg_06) {
2026-03-25 23:32:36 +01:00
/* loopnext */
2026-03-26 00:37:17 +01:00
}
counter = 0;
while (counter > 4) {
spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
2026-03-25 23:32:36 +01:00
suspend;
counter = (1 + counter);
2026-03-26 00:37:17 +01:00
}
spawn VARDESK.enterFastArea(arg_06);
2026-03-26 00:37:17 +01:00
return;
2026-03-25 23:32:36 +01:00
}