133 lines
3.1 KiB
Text
133 lines
3.1 KiB
Text
|
|
/* synthesized appendix for TIMER */
|
|
/* sparse lines above preserve recovered debugger line numbers where available */
|
|
|
|
/* ===== slot 0x0A equip ===== */
|
|
function timer_equip() /* entry=275 class_id=0x04C9 slot=0x0A */
|
|
{
|
|
set_info(0x0211, *(arg_06));
|
|
process_exclude();
|
|
if (arg_0A == 1) {
|
|
if ((Item.getStatus(arg_06) & 0x1000) == 0) {
|
|
spawn TIMER.slot_20(arg_06);
|
|
}
|
|
return;
|
|
}
|
|
else if (arg_0A == 0) {
|
|
/* bit_not */
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x0F enterFastArea ===== */
|
|
function timer_enterFastArea() /* entry=275 class_id=0x04C9 slot=0x0F */
|
|
{
|
|
set_info(0x021B, *(arg_06));
|
|
process_exclude();
|
|
if (!(Item.getQHi(arg_06) & 2)) {
|
|
if ((Item.getStatus(arg_06) & 0x1000) == 0) {
|
|
spawn TIMER.slot_20(arg_06);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x10 leaveFastArea ===== */
|
|
function timer_leaveFastArea() /* entry=275 class_id=0x04C9 slot=0x10 */
|
|
{
|
|
set_info(0x021C, *(arg_06));
|
|
process_exclude();
|
|
if (!(Item.getQHi(arg_06) & 4)) {
|
|
if (!(Item.getStatus(arg_06) & 0x1000)) {
|
|
/* bit_not */
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
|
|
/* ===== slot 0x20 slot_20 ===== */
|
|
function timer_slot_20() /* entry=275 class_id=0x04C9 slot=0x20 */
|
|
{
|
|
set_info(1, 0);
|
|
local_04 = ((Item.getMapNum(arg_06) * 0x0100) + Item.getNpcNum(arg_06));
|
|
if (local_04 == 0) {
|
|
return;
|
|
}
|
|
else {
|
|
local_02 = Item.getQHi(arg_06);
|
|
local_08 = (local_02 / 32);
|
|
if (local_08 == 0) {
|
|
local_06 = 0;
|
|
}
|
|
else if (local_08 == 1) {
|
|
local_06 = 10;
|
|
}
|
|
else if (local_08 == 2) {
|
|
local_06 = 25;
|
|
}
|
|
else if (local_08 == 3) {
|
|
local_06 = 40;
|
|
}
|
|
else if (local_08 == 4) {
|
|
local_06 = 50;
|
|
}
|
|
else if (local_08 == 5) {
|
|
local_06 = 60;
|
|
}
|
|
else if (local_08 == 6) {
|
|
local_06 = 75;
|
|
}
|
|
else if (local_08 == 7) {
|
|
local_06 = 90;
|
|
}
|
|
/* word_to_dword */
|
|
local_0C = local_04;
|
|
/* word_to_dword */
|
|
local_10 = local_06;
|
|
local_0C = (local_0C * local_10);
|
|
/* word_to_dword */
|
|
local_14 = 100;
|
|
local_0C = (local_0C / local_14);
|
|
/* dword_to_word */
|
|
local_06 = local_0C;
|
|
local_04 = (local_04 - local_06);
|
|
while (!(1)) {
|
|
if (!local_06) {
|
|
spawn FREE.slot_3B(pid, local_06, 0x00000000);
|
|
suspend;
|
|
if ((Item.getStatus(arg_06) & 0x1000) == 0) {
|
|
return;
|
|
}
|
|
if ((Intrinsic00AD(arg_06) == 1) || ((local_02 & 8) != 0)) {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
spawn FREE.slot_3B(pid, local_04, 0x00000000);
|
|
suspend;
|
|
if ((Item.getStatus(arg_06) & 0x1000) == 0) {
|
|
if (!(local_02 & 16)) {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
return;
|
|
}
|
|
if ((Intrinsic00AD(arg_06) == 1) || ((local_02 & 8) != 0)) {
|
|
if (!local_06) {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
else {
|
|
spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06);
|
|
suspend;
|
|
}
|
|
}
|
|
if ((local_02 & 1) == 0) {
|
|
/* bit_not */
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|