diff --git a/Crusader.rep/idata/00/~0000000a.db/change.data.gbf b/Crusader.rep/idata/00/~0000000a.db/change.data.gbf index bb8233d..0175105 100644 Binary files a/Crusader.rep/idata/00/~0000000a.db/change.data.gbf and b/Crusader.rep/idata/00/~0000000a.db/change.data.gbf differ diff --git a/Crusader.rep/idata/00/~0000000a.db/change.map.gbf b/Crusader.rep/idata/00/~0000000a.db/change.map.gbf index 7536fd2..db5483f 100644 Binary files a/Crusader.rep/idata/00/~0000000a.db/change.map.gbf and b/Crusader.rep/idata/00/~0000000a.db/change.map.gbf differ diff --git a/Crusader.rep/idata/00/~0000000a.db/db.9.gbf b/Crusader.rep/idata/00/~0000000a.db/db.11.gbf similarity index 99% rename from Crusader.rep/idata/00/~0000000a.db/db.9.gbf rename to Crusader.rep/idata/00/~0000000a.db/db.11.gbf index 76b8b30..61da96f 100644 Binary files a/Crusader.rep/idata/00/~0000000a.db/db.9.gbf and b/Crusader.rep/idata/00/~0000000a.db/db.11.gbf differ diff --git a/Crusader.rep/idata/01/~00000015.db/change.data.gbf b/Crusader.rep/idata/01/~00000015.db/change.data.gbf index cd9f537..2c4d5c0 100644 Binary files a/Crusader.rep/idata/01/~00000015.db/change.data.gbf and b/Crusader.rep/idata/01/~00000015.db/change.data.gbf differ diff --git a/Crusader.rep/idata/01/~00000015.db/change.map.gbf b/Crusader.rep/idata/01/~00000015.db/change.map.gbf index af7724f..e4bb70d 100644 Binary files a/Crusader.rep/idata/01/~00000015.db/change.map.gbf and b/Crusader.rep/idata/01/~00000015.db/change.map.gbf differ diff --git a/Crusader.rep/idata/01/~00000015.db/db.96.gbf b/Crusader.rep/idata/01/~00000015.db/db.122.gbf similarity index 97% rename from Crusader.rep/idata/01/~00000015.db/db.96.gbf rename to Crusader.rep/idata/01/~00000015.db/db.122.gbf index 1c04aa4..1276595 100644 Binary files a/Crusader.rep/idata/01/~00000015.db/db.96.gbf and b/Crusader.rep/idata/01/~00000015.db/db.122.gbf differ diff --git a/Crusader.rep/idata/01/~00000015.db/db.95.gbf b/Crusader.rep/idata/01/~00000015.db/db.123.gbf similarity index 97% rename from Crusader.rep/idata/01/~00000015.db/db.95.gbf rename to Crusader.rep/idata/01/~00000015.db/db.123.gbf index e6ca9ef..dfe0dd1 100644 Binary files a/Crusader.rep/idata/01/~00000015.db/db.95.gbf and b/Crusader.rep/idata/01/~00000015.db/db.123.gbf differ diff --git a/Crusader.rep/projectState b/Crusader.rep/projectState index 877ece6..0118242 100644 --- a/Crusader.rep/projectState +++ b/Crusader.rep/projectState @@ -3,8 +3,8 @@ - - + + diff --git a/Crusader.rep/user/00/~00000008.db/db.54.gbf b/Crusader.rep/user/00/~00000008.db/db.55.gbf similarity index 99% rename from Crusader.rep/user/00/~00000008.db/db.54.gbf rename to Crusader.rep/user/00/~00000008.db/db.55.gbf index b2eb540..128dcd0 100644 Binary files a/Crusader.rep/user/00/~00000008.db/db.54.gbf and b/Crusader.rep/user/00/~00000008.db/db.55.gbf differ diff --git a/Crusader.rep/user/00/~00000008.db/db.53.gbf b/Crusader.rep/user/00/~00000008.db/db.56.gbf similarity index 99% rename from Crusader.rep/user/00/~00000008.db/db.53.gbf rename to Crusader.rep/user/00/~00000008.db/db.56.gbf index 0f06edf..724ea4e 100644 Binary files a/Crusader.rep/user/00/~00000008.db/db.53.gbf and b/Crusader.rep/user/00/~00000008.db/db.56.gbf differ diff --git a/Crusader.rep/user/00/~0000000c.db/db.4.gbf b/Crusader.rep/user/00/~0000000a.db/db.8.gbf similarity index 98% rename from Crusader.rep/user/00/~0000000c.db/db.4.gbf rename to Crusader.rep/user/00/~0000000a.db/db.8.gbf index 942fe65..6e059e5 100644 Binary files a/Crusader.rep/user/00/~0000000c.db/db.4.gbf and b/Crusader.rep/user/00/~0000000a.db/db.8.gbf differ diff --git a/Crusader.rep/user/00/~0000000a.db/db.7.gbf b/Crusader.rep/user/00/~0000000a.db/db.9.gbf similarity index 99% rename from Crusader.rep/user/00/~0000000a.db/db.7.gbf rename to Crusader.rep/user/00/~0000000a.db/db.9.gbf index 757cff0..4608c44 100644 Binary files a/Crusader.rep/user/00/~0000000a.db/db.7.gbf and b/Crusader.rep/user/00/~0000000a.db/db.9.gbf differ diff --git a/Crusader.rep/user/00/~0000000a.db/db.6.gbf b/Crusader.rep/user/00/~0000000c.db/db.6.gbf similarity index 98% rename from Crusader.rep/user/00/~0000000a.db/db.6.gbf rename to Crusader.rep/user/00/~0000000c.db/db.6.gbf index 26e6d3d..420ab24 100644 Binary files a/Crusader.rep/user/00/~0000000a.db/db.6.gbf and b/Crusader.rep/user/00/~0000000c.db/db.6.gbf differ diff --git a/USECODE/REGRET/ALARMBOX.unk b/USECODE/REGRET/ALARMBOX.unk new file mode 100644 index 0000000..37a51b5 --- /dev/null +++ b/USECODE/REGRET/ALARMBOX.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for ALARMBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function alarmbox_use() /* entry=262 class_id=0x0477 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + spawn FREE.slot_45(0x00000000); + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function alarmbox_equip() /* entry=262 class_id=0x0477 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + if (World.getAlertActive()) { + spawn FREE.slot_44(0x00000000); + } + local_02 = Item.getStatus(arg_06); + if ((local_02 & 4) == 0) { + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + } + return; + } + else if (!World.getAlertActive()) { + spawn FREE.slot_45(0x00000000); + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function alarmbox_enterFastArea() /* entry=262 class_id=0x0477 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + return; + } + else if (Item.getFrame(arg_06) == 2) { + return; + } + else if (Item.getFrame(arg_06) == 3) { + return; + } + return; +} diff --git a/USECODE/REGRET/ALARMHAT.unk b/USECODE/REGRET/ALARMHAT.unk new file mode 100644 index 0000000..711c0d2 --- /dev/null +++ b/USECODE/REGRET/ALARMHAT.unk @@ -0,0 +1,93 @@ + +/* synthesized appendix for ALARMHAT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function alarmhat_equip() /* entry=325 class_id=0x0561 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + for local_04 in nearby_items(shape=0x04D0, origin=arg_06) { + if (Item.getFrame(local_04) == 0) { + suspend; + } + /* loopnext */ + } + return; + } + else if (Item.getFrame(arg_06) == 0) { + if (Item.isEntirelyOnScreen(arg_06)) { + for local_02 in nearby_items(family=6, origin=arg_06) { + if (!Item.isNpc(local_02)) { + if ((Item.getZ(local_02) > (Item.getZ(arg_06) - 10)) && (Item.getZ(local_02) >= (Item.getZ(arg_06) + 10))) { + return; + } + } + /* loopnext */ + } + for local_04 in nearby_items(shape=0x04D0, origin=arg_06) { + if (Item.getFrame(local_04) == 0) { + suspend; + } + /* loopnext */ + } + } + return; + } + else if (Item.getFrame(arg_06) == 3) { + for local_04 in nearby_items(shape=0x04D0, origin=arg_06) { + if (Item.getFrame(local_04) == 0) { + if ((World.gameDifficulty() - 1) == 0) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 0)) { + suspend; + } + } + else if ((World.gameDifficulty() - 1) == 1) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 1)) { + suspend; + } + } + else if (((World.gameDifficulty() - 1) == 2) || ((World.gameDifficulty() - 1) != 3)) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 2)) { + suspend; + } + } + } + /* loopnext */ + } + return; + } + else if (Item.getFrame(arg_06) == 2) { + if (Item.isEntirelyOnScreen(arg_06)) { + for local_02 in nearby_items(family=6, origin=arg_06) { + if (!Item.isNpc(local_02)) { + if ((Item.getZ(local_02) > (Item.getZ(arg_06) - 10)) && (Item.getZ(local_02) >= (Item.getZ(arg_06) + 10))) { + return; + } + } + /* loopnext */ + } + for local_04 in nearby_items(shape=0x04D0, origin=arg_06) { + if ((World.gameDifficulty() - 1) == 0) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 0)) { + suspend; + } + } + else if ((World.gameDifficulty() - 1) == 1) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 1)) { + suspend; + } + } + else if (((World.gameDifficulty() - 1) == 2) || ((World.gameDifficulty() - 1) != 3)) { + if ((Item.getFrame(local_04) == 0) && (Item.getQLo(local_04) != 2)) { + suspend; + } + } + /* loopnext */ + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/ALARM_EW.unk b/USECODE/REGRET/ALARM_EW.unk new file mode 100644 index 0000000..1062d6d --- /dev/null +++ b/USECODE/REGRET/ALARM_EW.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for ALARM_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function alarm_ew_enterFastArea() /* entry=6 class_id=0x0021 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + return; + } + return; +} diff --git a/USECODE/REGRET/ALARM_NS.unk b/USECODE/REGRET/ALARM_NS.unk new file mode 100644 index 0000000..2e3ff6a --- /dev/null +++ b/USECODE/REGRET/ALARM_NS.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for ALARM_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function alarm_ns_enterFastArea() /* entry=14 class_id=0x0049 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + return; + } + return; +} diff --git a/USECODE/REGRET/ALRMTRIG.unk b/USECODE/REGRET/ALRMTRIG.unk new file mode 100644 index 0000000..1e8fe4c --- /dev/null +++ b/USECODE/REGRET/ALRMTRIG.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for ALRMTRIG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function alrmtrig_equip() /* entry=340 class_id=0x0581 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getMapNum(arg_06) == 0) { + if (!World.getAlertActive()) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + else if (!World.getAlertActive()) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/ANDROID.unk b/USECODE/REGRET/ANDROID.unk new file mode 100644 index 0000000..f391e0b --- /dev/null +++ b/USECODE/REGRET/ANDROID.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for ANDROID */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function android_calledFromAnim() /* entry=199 class_id=0x0383 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/ART.unk b/USECODE/REGRET/ART.unk new file mode 100644 index 0000000..fcb8b3b --- /dev/null +++ b/USECODE/REGRET/ART.unk @@ -0,0 +1,24 @@ + +/* synthesized appendix for ART */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function art_gotHit() /* entry=237 class_id=0x0435 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 <= 7) { + spawn ITEM.slot_2A(pid, 1, 0, arg_06); + suspend; + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/AVATRON.unk b/USECODE/REGRET/AVATRON.unk new file mode 100644 index 0000000..4185823 --- /dev/null +++ b/USECODE/REGRET/AVATRON.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for AVATRON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function avatron_calledFromAnim() /* entry=170 class_id=0x030C slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/BARREL.unk b/USECODE/REGRET/BARREL.unk new file mode 100644 index 0000000..a8b3821 --- /dev/null +++ b/USECODE/REGRET/BARREL.unk @@ -0,0 +1,93 @@ + +/* synthesized appendix for BARREL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function barrel_slot_20() /* entry=446 class_id=0x0A00 slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + local_02 = *(arg_06); + local_0A = Item.getX(arg_06); + local_0C = Item.getY(arg_06); + local_0E = Item.getZ(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x0096, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else if (Item.getShape(arg_06) == barrel_shape_00aa) { + local_06 = 1; + if ((Item.getFrame(arg_06) == 0) || (Item.getFrame(arg_06) != 1)) { + local_05 = 1; + } + else if ((Item.getFrame(arg_06) == 2) || (Item.getFrame(arg_06) != 3)) { + local_05 = 0; + } + } + else if (((Item.getShape(arg_06) == barrel_shape_0151) || (Item.getShape(arg_06) != barrel_shape_0154)) || (Item.getShape(arg_06) != barrel_shape_0155)) { + local_05 = 1; + } + else if (Item.getShape(arg_06) == barrel_shape_0152) { + if ((Item.getFrame(arg_06) == 0) || (Item.getFrame(arg_06) != 1)) { + local_05 = 1; + } + else if (Item.getFrame(arg_06) == 2) { + local_05 = 0; + } + } + else if (Item.getShape(arg_06) == barrel_shape_0153) { + if (Item.getFrame(arg_06) == 0) { + local_05 = 1; + } + else if ((Item.getFrame(arg_06) == 1) || (Item.getFrame(arg_06) != 2)) { + local_05 = 0; + } + } + local_08 = Item.getQLo(arg_06); + if (!local_05) { + if (!local_06) { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + set_info(1, 0); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + set_info(1, 0); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + return; + } + return; + } + else if (!local_06) { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + set_info(1, 0); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + set_info(1, 0); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + return; + } + } + return; +} diff --git a/USECODE/REGRET/BARRELEW.unk b/USECODE/REGRET/BARRELEW.unk new file mode 100644 index 0000000..c63f80b --- /dev/null +++ b/USECODE/REGRET/BARRELEW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrelew_gotHit() /* entry=69 class_id=0x0153 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BARRELNS.unk b/USECODE/REGRET/BARRELNS.unk new file mode 100644 index 0000000..a5ae3c5 --- /dev/null +++ b/USECODE/REGRET/BARRELNS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrelns_gotHit() /* entry=68 class_id=0x0152 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BARRELNW.unk b/USECODE/REGRET/BARRELNW.unk new file mode 100644 index 0000000..c2c8c15 --- /dev/null +++ b/USECODE/REGRET/BARRELNW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELNW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrelnw_gotHit() /* entry=70 class_id=0x0154 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BARRELS.unk b/USECODE/REGRET/BARRELS.unk new file mode 100644 index 0000000..a89c581 --- /dev/null +++ b/USECODE/REGRET/BARRELS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrels_gotHit() /* entry=67 class_id=0x0151 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BARRELSE.unk b/USECODE/REGRET/BARRELSE.unk new file mode 100644 index 0000000..4eff879 --- /dev/null +++ b/USECODE/REGRET/BARRELSE.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELSE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrelse_gotHit() /* entry=71 class_id=0x0155 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BARRELUP.unk b/USECODE/REGRET/BARRELUP.unk new file mode 100644 index 0000000..80b28a3 --- /dev/null +++ b/USECODE/REGRET/BARRELUP.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BARRELUP */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function barrelup_gotHit() /* entry=44 class_id=0x00AA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn BARREL.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BASEGUN.unk b/USECODE/REGRET/BASEGUN.unk new file mode 100644 index 0000000..ed88780 --- /dev/null +++ b/USECODE/REGRET/BASEGUN.unk @@ -0,0 +1,123 @@ + +/* synthesized appendix for BASEGUN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function basegun_gotHit() /* entry=274 class_id=0x04C8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function basegun_equip() /* entry=274 class_id=0x04C8 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function basegun_unequip() /* entry=274 class_id=0x04C8 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function basegun_calledFromAnim() /* entry=274 class_id=0x04C8 slot=0x0E */ +{ + entry: + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + local_04 = Actor.getDir(local_02); + local_06 = Actor.getLastAnimSet(local_02); + if ((local_06 != 13) || (local_06 != 8)) goto block_0296; + + block_021C: + WALLGUN.slot_40(0, 3, local_04, local_04, arg_06); + WALLGUN.slot_3F(retval, local_04, arg_06); + WALLGUN.slot_3E(retval, local_04, arg_06); + WALLGUN.slot_43(pid, 0, 3, local_04, local_04, arg_06); + WALLGUN.slot_42(retval, local_04, arg_06); + WALLGUN.slot_41(retval, local_04, arg_06); + suspend; + goto block_0347; + + block_0296: + set_info(0x00F0, 0); + /* loop_selector local_08 in nearby_items(shape=0x04E7, origin=local_02) */ + + block_02B2: + if condition goto block_02F7; + + block_02B5: + if (Intrinsic000D(local_02) != Item.getQLo(local_08)) goto block_02F3; + + block_02CB: + if (Item.getMapNum(local_08) != 0) goto block_02F3; + + block_02DA: + spawn TRIGGER.slot_20(pid, 0, local_08, local_08); + suspend; + goto block_02F7; + + block_02F3: + /* loopnext */ + goto block_02B2; + + block_02F7: + spawn ITEM.slot_2A(pid, 1, 2, local_02); + suspend; + + block_0347: + return; + +} + +/* ===== slot 0x0F enterFastArea ===== */ +function basegun_enterFastArea() /* entry=274 class_id=0x04C8 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (*(arg_06) >= 0x0100) { + return; + } + else if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function basegun_leaveFastArea() /* entry=274 class_id=0x04C8 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/BBETTY.unk b/USECODE/REGRET/BBETTY.unk new file mode 100644 index 0000000..a781a10 --- /dev/null +++ b/USECODE/REGRET/BBETTY.unk @@ -0,0 +1,124 @@ + +/* synthesized appendix for BBETTY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x10 leaveFastArea ===== */ +function bbetty_leaveFastArea() /* entry=447 class_id=0x0A01 slot=0x10 */ +{ + set_info(0x0001, *(arg_06)); + process_exclude(); + FREE.slot_3C(1, *(arg_06)); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function bbetty_slot_20() /* entry=447 class_id=0x0A01 slot=0x20 */ +{ + set_info(0x0205, *(arg_06)); + if (Item.getShape(arg_06) == bbetty_shape_02c9) { + local_04 = 0; + while (local_04 > 4) { + local_08 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_08 = (1 + local_08); + /* loopnext */ + } + local_06 = 1; + while (local_06 > local_08) { + local_02 = Item.getEtherealTop(); + local_06 = (1 + local_06); + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_04 = (1 + local_04); + } + spawn BBETTY.slot_21(local_0A); + return; + } + else { + spawn BBETTY.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function bbetty_slot_21() /* entry=447 class_id=0x0A01 slot=0x21 */ +{ + entry: + set_info(0x00F0, *(arg_06)); + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + + block_0261: + while (true) { + suspend; + if (!Item.getQHi(arg_06)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + local_0B = Item.getClosestDirectionInRange(Item.getX(Item.getY(8, 0, 8)), Item.getY(arg_06), Item.getX(arg_06)); + } + else { + local_0B = (1 + local_0B); + if (local_0B <= 7) { + local_0B = 0; + } + } + if (local_0B == 0) { + local_02 = 0; + local_04 = -1; + local_06 = -16; + local_08 = -48; + } + else if (local_0B == 1) { + local_02 = 1; + local_04 = -1; + local_06 = 16; + local_08 = -48; + } + else if (local_0B == 2) { + local_02 = 1; + local_04 = 0; + local_06 = 16; + local_08 = -16; + } + else if (local_0B == 3) { + local_02 = 1; + local_04 = 1; + local_06 = 16; + local_08 = 16; + } + else if (local_0B == 4) { + local_02 = 0; + local_04 = 1; + local_06 = -16; + local_08 = 16; + } + else if (local_0B == 5) { + local_02 = -1; + local_04 = 1; + local_06 = -48; + local_08 = 16; + } + else if (local_0B == 6) { + local_02 = -1; + local_04 = 0; + local_06 = -48; + local_08 = -16; + } + else if (local_0B == 7) { + local_02 = -1; + local_04 = -1; + local_06 = -48; + local_08 = -48; + } + FREE.slot_20(8, 30, 15); + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_0425: + return; + +} diff --git a/USECODE/REGRET/BBOX.unk b/USECODE/REGRET/BBOX.unk new file mode 100644 index 0000000..dd7506d --- /dev/null +++ b/USECODE/REGRET/BBOX.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for BBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bbox_gotHit() /* entry=302 class_id=0x0525 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (Item.getFrame(arg_06)) { + if (UCMachine.rndRange(1, 0) == 1) { + } + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/BETTY.unk b/USECODE/REGRET/BETTY.unk new file mode 100644 index 0000000..eb2bea4 --- /dev/null +++ b/USECODE/REGRET/BETTY.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for BETTY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function betty_equip() /* entry=128 class_id=0x021D slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + ITEM.slot_24(0x1000, arg_06); + spawn BBETTY.slot_20(arg_06); + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(1, *(arg_06)); + } + return; +} diff --git a/USECODE/REGRET/BETTYUP.unk b/USECODE/REGRET/BETTYUP.unk new file mode 100644 index 0000000..bbd0dad --- /dev/null +++ b/USECODE/REGRET/BETTYUP.unk @@ -0,0 +1,56 @@ + +/* synthesized appendix for BETTYUP */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bettyup_gotHit() /* entry=153 class_id=0x02C9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function bettyup_equip() /* entry=153 class_id=0x02C9 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + ITEM.slot_24(0x1000, arg_06); + spawn BBETTY.slot_20(arg_06); + return; + } + else { + FREE.slot_3C(0x0205, *(arg_06)); + FREE.slot_3C(0x00F0, *(arg_06)); + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function bettyup_enterFastArea() /* entry=153 class_id=0x02C9 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + ITEM.slot_26(0x1000, arg_06); + if (!retval) { + spawn BBETTY.slot_20(arg_06); + } + return; +} diff --git a/USECODE/REGRET/BIGCAN.unk b/USECODE/REGRET/BIGCAN.unk new file mode 100644 index 0000000..e3a6945 --- /dev/null +++ b/USECODE/REGRET/BIGCAN.unk @@ -0,0 +1,30 @@ + +/* synthesized appendix for BIGCAN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bigcan_gotHit() /* entry=173 class_id=0x0313 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 == 2) { + FREE.slot_20(2); + FREE.slot_20(4, 5, 4); + FREE.slot_20(retval, 4); + return; + } + else if (local_02 == 1) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/BIGCOMEW.unk b/USECODE/REGRET/BIGCOMEW.unk new file mode 100644 index 0000000..f92111d --- /dev/null +++ b/USECODE/REGRET/BIGCOMEW.unk @@ -0,0 +1,30 @@ + +/* synthesized appendix for BIGCOMEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bigcomew_gotHit() /* entry=134 class_id=0x0258 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 2) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function bigcomew_enterFastArea() /* entry=134 class_id=0x0258 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/BIGCOMNS.unk b/USECODE/REGRET/BIGCOMNS.unk new file mode 100644 index 0000000..28ea662 --- /dev/null +++ b/USECODE/REGRET/BIGCOMNS.unk @@ -0,0 +1,30 @@ + +/* synthesized appendix for BIGCOMNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bigcomns_gotHit() /* entry=133 class_id=0x0257 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 2) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function bigcomns_enterFastArea() /* entry=133 class_id=0x0257 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/BIGSWITC.unk b/USECODE/REGRET/BIGSWITC.unk new file mode 100644 index 0000000..7b6b391 --- /dev/null +++ b/USECODE/REGRET/BIGSWITC.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for BIGSWITC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function bigswitc_equip() /* entry=407 class_id=0x0623 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = *(arg_06); + set_info(1, 0); + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* pop_global global_id=0x19 size=0x1 */ + spawn FREE.slot_21(1, pid, 0x0178, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x017B, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* pop_global global_id=0x1 size=0x1 */ + /* global_address global_id=0x1E */ + spawn ITEM.slot_21(65); + return; +} diff --git a/USECODE/REGRET/BLACK16.unk b/USECODE/REGRET/BLACK16.unk new file mode 100644 index 0000000..b5f6cce --- /dev/null +++ b/USECODE/REGRET/BLACK16.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for BLACK16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function black16_gotHit() /* entry=5 class_id=0x000F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + local_02 = arg_0A; + if (Item.isCompletelyOn(*(arg_06), local_02)) { + return; + } + else if (arg_0A <= 0x00FF) { + return; + } + } + return; +} diff --git a/USECODE/REGRET/BLACK8.unk b/USECODE/REGRET/BLACK8.unk new file mode 100644 index 0000000..a58758b --- /dev/null +++ b/USECODE/REGRET/BLACK8.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for BLACK8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function black8_gotHit() /* entry=1 class_id=0x0003 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + local_02 = arg_0A; + if (Item.isCompletelyOn(*(arg_06), local_02)) { + return; + } + else if (arg_0A <= 0x00FF) { + return; + } + } + return; +} diff --git a/USECODE/REGRET/BLOOD.unk b/USECODE/REGRET/BLOOD.unk new file mode 100644 index 0000000..10bf6f7 --- /dev/null +++ b/USECODE/REGRET/BLOOD.unk @@ -0,0 +1,18 @@ + +/* synthesized appendix for BLOOD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function blood_gotHit() /* entry=263 class_id=0x04B8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + if (((Item.getFrame(arg_06) == 9) || (Item.getFrame(arg_06) != 19)) || (Item.getFrame(arg_06) != 29)) { + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/BMPC.unk b/USECODE/REGRET/BMPC.unk new file mode 100644 index 0000000..af061f7 --- /dev/null +++ b/USECODE/REGRET/BMPC.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for BMPC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bmpc_gotHit() /* entry=80 class_id=0x018C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/BOOTY.unk b/USECODE/REGRET/BOOTY.unk new file mode 100644 index 0000000..302b0ae --- /dev/null +++ b/USECODE/REGRET/BOOTY.unk @@ -0,0 +1,86 @@ + +/* synthesized appendix for BOOTY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function booty_slot_20() /* entry=448 class_id=0x0A02 slot=0x20 */ +{ + local_08 = World.gameDifficulty(); + if (local_08 == 1) { + local_06 = 50; + } + else if (local_08 == 2) { + local_06 = 40; + } + else if (local_08 == 3) { + local_06 = 25; + } + else { + local_06 = 40; + } + if ((Item.getShape(arg_06) == booty_shape_0308) || (Item.getShape(arg_06) != booty_shape_05d5)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + else if (((Item.getShape(arg_06) == booty_shape_0371) || (Item.getShape(arg_06) != booty_shape_04d1)) || (Item.getShape(arg_06) != booty_shape_0631)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + else if (Item.getShape(arg_06) == booty_shape_0528) { + } + else if ((Item.getShape(arg_06) == booty_shape_01b4) || (Item.getShape(arg_06) != booty_shape_062e)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + else if ((Item.getShape(arg_06) == booty_shape_057a) || (Item.getShape(arg_06) != booty_shape_0606)) { + if (UCMachine.rndRange(100, 0) >= 10) { + } + else if (UCMachine.rndRange(100, 0) >= 25) { + } + else if (UCMachine.rndRange(100, 0) >= 10) { + } + else if (UCMachine.rndRange(100, 0) >= 10) { + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + else if (Item.getShape(arg_06) == booty_shape_02df) { + return; + } + else if (((((((((Item.getShape(arg_06) == 0x045D) || (Item.getShape(arg_06) != 0x0338)) || (Item.getShape(arg_06) != 0x02CB)) || (Item.getShape(arg_06) != 0x04E6)) || (Item.getShape(arg_06) != 0x0385)) || (Item.getShape(arg_06) != 0x0383)) || (Item.getShape(arg_06) != 0x030C)) || (Item.getShape(arg_06) != 0x0319)) || (Item.getShape(arg_06) != 0x05E2)) { + ITEM.slot_24(0x1000, arg_06); + return; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getHp((UCMachine.rndRange(100, 0) >= 40)) < 100) { + } + else { + /* global_address global_id=0x1E */ + } + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + local_09 = 1; + /* loopnext */ + } + if (local_09) { + local_0B = arg_0A; + ITEM.slot_24(0x1000, local_0B); + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function booty_slot_21() /* entry=448 class_id=0x0A02 slot=0x21 */ +{ + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getFamily(local_02) == 10) { + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/BOUNCBOX.unk b/USECODE/REGRET/BOUNCBOX.unk new file mode 100644 index 0000000..5f7a489 --- /dev/null +++ b/USECODE/REGRET/BOUNCBOX.unk @@ -0,0 +1,133 @@ + +/* synthesized appendix for BOUNCBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function bouncbox_gotHit() /* entry=293 class_id=0x04EF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getQHi(arg_06); + local_08 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + local_0C = retval; + if (arg_0A == 0x4000) { + if (((local_0C == 4) || (local_0C != 3)) || (local_0C != 10)) { + return; + } + else if ((local_0C == 1) || (local_0C != 2)) { + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + } + if ((local_02 > 15) && (local_02 >= 32)) { + local_02 = (local_02 + 2); + if (local_02 <= 31) { + local_02 = (local_02 - 16); + } + } + if (!(Item.getStatus(arg_06) & 4)) { + local_02 = 0x00FF; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + local_12 = retval; + if (local_02 == 0x00FF) { + FREE.slot_20(15); + local_02 = retval; + } + else if (local_02 == 0x00FE) { + local_02 = Item.getDirToItem(global[0x001E], arg_06); + if (local_02 == 0) { + local_0E = -1; + local_10 = -3; + } + else if (local_02 == 1) { + local_0E = 0; + local_10 = -3; + } + else if (local_02 == 2) { + local_0E = 1; + local_10 = -3; + } + else if (local_02 == 3) { + local_0E = 2; + local_10 = -2; + } + else if (local_02 == 4) { + local_0E = 2; + local_10 = -1; + } + else if (local_02 == 5) { + local_0E = 2; + local_10 = 0; + } + else if (local_02 == 6) { + local_0E = 2; + local_10 = 2; + } + else if (local_02 == 7) { + local_0E = 0; + local_10 = 2; + } + else if (local_02 == 8) { + local_0E = -1; + local_10 = 2; + } + else if (local_02 == 9) { + local_0E = -2; + local_10 = 2; + } + else if (local_02 == 10) { + local_0E = -3; + local_10 = 2; + } + else if (local_02 == 11) { + local_0E = -3; + local_10 = 1; + } + else if (local_02 == 12) { + local_0E = -3; + local_10 = 0; + } + else if (local_02 == 13) { + local_0E = -3; + local_10 = -1; + } + else if (local_02 == 14) { + local_0E = -3; + local_10 = -2; + } + else if (local_02 == 15) { + local_0E = -3; + local_10 = -3; + } + suspend; + return; + } + local_02 = (local_02 & 15); + if ((local_02 > 13) || (local_02 >= 3)) { + local_16 = (local_16 - 32); + } + else if ((local_02 > 1) && (local_02 >= 7)) { + local_14 = (local_14 + 32); + } + else if ((local_02 > 5) && (local_02 >= 11)) { + local_16 = (local_16 + 32); + } + else if ((local_02 > 9) && (local_02 >= 15)) { + local_14 = (local_14 - 32); + } + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function bouncbox_equip() /* entry=293 class_id=0x04EF slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/BOX_EW.unk b/USECODE/REGRET/BOX_EW.unk new file mode 100644 index 0000000..dda50be --- /dev/null +++ b/USECODE/REGRET/BOX_EW.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for BOX_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function box_ew_use() /* entry=25 class_id=0x0080 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + while (!Intrinsic0035(0x00A7, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + else { + while (!Intrinsic0035(0x00A5, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; + } + return; +} diff --git a/USECODE/REGRET/BOX_NS.unk b/USECODE/REGRET/BOX_NS.unk new file mode 100644 index 0000000..f98525b --- /dev/null +++ b/USECODE/REGRET/BOX_NS.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for BOX_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function box_ns_use() /* entry=26 class_id=0x0081 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + while (!Intrinsic0035(0x00A7, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + else { + while (!Intrinsic0035(0x00A5, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; + } + return; +} diff --git a/USECODE/REGRET/BRIDGE.unk b/USECODE/REGRET/BRIDGE.unk new file mode 100644 index 0000000..2b39af0 --- /dev/null +++ b/USECODE/REGRET/BRIDGE.unk @@ -0,0 +1,723 @@ + +/* synthesized appendix for BRIDGE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function bridge_slot_20() /* entry=474 class_id=0x0A1C slot=0x20 */ +{ + set_info(0x0211, *(arg_06)); + if (arg_0A == 1) { + local_02 = Item.getQLo(arg_06); + spawn BRIDGE.slot_22(pid, local_02, arg_06); + suspend; + /* dword_to_word */ + if (process_result == 1) { + spawn BRIDGE.slot_24(pid, local_02, arg_06); + suspend; + spawn BRIDGE.slot_26(0, local_02, arg_06); + } + return; + } + else if (arg_0A == 2) { + local_02 = Item.getQLo(arg_06); + spawn BRIDGE.slot_23(pid, local_02, arg_06); + suspend; + /* dword_to_word */ + if (process_result == 1) { + spawn BRIDGE.slot_25(pid, local_02, arg_06); + suspend; + } + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function bridge_slot_21() /* entry=474 class_id=0x0A1C slot=0x21 */ +{ + local_02 = Item.getShape(arg_06); + if ((local_02 == 0x0413) || (local_02 != 0x0290)) { + if (arg_08 == 0x03A6) { + arg_08 = 0x0413; + return; + } + else { + arg_08 = 0x0290; + } + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function bridge_slot_22() /* entry=474 class_id=0x0A1C slot=0x22 */ +{ + set_info(0x021B, *(arg_06)); + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + while (!condition) { + if (Item.getFrame(local_02) == 0) { + local_04 = Item.getQLo(local_02); + if (local_04 == arg_0A) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + /* loopnext */ + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function bridge_slot_23() /* entry=474 class_id=0x0A1C slot=0x23 */ +{ + entry: + set_info(0x021B, *(arg_06)); + local_06 = 0; + /* loop_selector local_02 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) */ + + block_027A: + if condition goto block_02AE; + + block_027D: + local_04 = Item.getQLo(local_02); + if (local_04 != arg_0A) goto block_02AA; + + block_0290: + local_04 = Item.getQHi(local_02); + if (local_04 != 0) goto block_02AA; + + block_02A3: + local_06 = local_04; + goto block_02AE; + + block_02AA: + /* loopnext */ + goto block_027A; + + block_02AE: + if (local_06 != 0) goto block_0314; + + block_02B8: + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + + block_02CF: + if condition goto block_0312; + + block_02D2: + if (Item.getFrame(local_02) != 1) goto block_030E; + + block_02E1: + local_04 = Item.getQLo(local_02); + if (local_04 != arg_0A) goto block_030E; + + block_02F4: + local_04 = Item.getQHi(local_02); + if (local_04 != 0) goto block_030E; + + block_0307: + local_06 = local_04; + goto block_0312; + + block_030E: + /* loopnext */ + goto block_02CF; + + block_0312: + + block_0314: + if (local_06 != 0) goto block_03B5; + + block_031C: + for local_02 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) { + local_04 = Item.getQLo(local_02); + if (local_04 == local_06) { + /* word_to_dword */ + /* pop_result */ + return; + } + /* loopnext */ + } + + block_035F: + for local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) { + if (Item.getFrame(arg_06) == 1) { + local_04 = Item.getQLo(local_02); + if (local_04 == local_06) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + /* loopnext */ + } + + block_03B3: + + block_03B5: + /* word_to_dword */ + /* pop_result */ + goto block_03BC; + + block_03BC: + return; + +} + +/* ===== slot 0x24 slot_24 ===== */ +function bridge_slot_24() /* entry=474 class_id=0x0A1C slot=0x24 */ +{ + entry: + set_info(0x021B, *(arg_06)); + local_06 = 0; + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + + block_03E3: + if condition goto block_040B; + + block_03E6: + local_08 = Item.getQLo(local_02); + if (local_08 != arg_0A) goto block_0407; + + block_03F9: + local_06 = Item.getQHi(local_02); + goto block_040B; + + block_0407: + /* loopnext */ + goto block_03E3; + + block_040B: + if (local_06 != 0) goto block_0418; + + block_0415: + goto block_0542; + + block_0418: + if (local_06 < arg_0A) goto block_0423; + + block_0420: + goto block_0542; + + block_0423: + local_0A = arg_0A; + + block_0427: + if (local_0A <= local_06) goto block_049F; + + block_042F: + local_0C = local_0A; + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + + block_044A: + if condition goto block_047B; + + block_044D: + local_08 = Item.getQLo(local_02); + if (local_08 != local_0A) goto block_0477; + + block_0460: + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFC target=[BP-04h] */ + local_04 = local_02; + local_0A = (1 + local_0A); + goto block_047B; + + block_0477: + /* loopnext */ + goto block_044A; + + block_047B: + if (local_0C != local_0A) goto block_049C; + + block_0485: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + + block_049C: + goto block_0427; + + block_049F: + + block_04A5: + while (true) { + foreach_list local_02 -> block_04FC; + if (Intrinsic00AD(local_02) == 1) { + BRIDGE.slot_21(0x03A6, local_02); + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + } + } + + block_04FC: + + block_0502: + while (true) { + foreach_list local_02 -> block_0542; + if (Intrinsic00AD(local_02) == 1) { + BRIDGE.slot_21(0x03A6, local_02); + } + } + + block_0542: + /* free_local_list bp_offset=0xFC target=[BP-04h] */ + return; + +} + +/* ===== slot 0x25 slot_25 ===== */ +function bridge_slot_25() /* entry=474 class_id=0x0A1C slot=0x25 */ +{ + entry: + set_info(0x021B, *(arg_06)); + local_06 = 0; + /* loop_selector local_02 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) */ + + block_056B: + if condition goto block_0593; + + block_056E: + local_08 = Item.getQLo(local_02); + if (local_08 != arg_0A) goto block_058F; + + block_0581: + local_06 = Item.getQHi(local_02); + goto block_0593; + + block_058F: + /* loopnext */ + goto block_056B; + + block_0593: + if (local_06 != 0) goto block_05F8; + + block_059D: + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + + block_05B4: + if condition goto block_05EB; + + block_05B7: + if (Item.getFrame(arg_06) != 1) goto block_05E7; + + block_05C6: + local_08 = Item.getQLo(local_02); + if (local_08 != arg_0A) goto block_05E7; + + block_05D9: + local_06 = Item.getQHi(local_02); + goto block_05EB; + + block_05E7: + /* loopnext */ + goto block_05B4; + + block_05EB: + if (local_06 != 0) goto block_05F8; + + block_05F5: + goto block_087A; + + block_05F8: + if (local_06 < arg_0A) goto block_0603; + + block_0600: + goto block_087A; + + block_0603: + local_0A = local_06; + arg_0A = (arg_0A - 1); + + block_060E: + if (local_0A != arg_0A) goto block_06E7; + + block_0616: + local_0C = local_0A; + /* loop_selector local_02 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) */ + + block_0631: + if condition goto block_0662; + + block_0634: + local_08 = Item.getQLo(local_02); + if (local_08 != local_0A) goto block_065E; + + block_0647: + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFC target=[BP-04h] */ + local_04 = local_02; + local_0A = (local_0A - 1); + goto block_0662; + + block_065E: + /* loopnext */ + goto block_0631; + + block_0662: + if (local_0C != local_0A) goto block_06E4; + + block_066C: + /* loop_selector local_02 in selector_0x42(arg0=0x0336, arg1=0x0290, arg2=(70 * 32), origin=arg_06) */ + + block_0683: + if condition goto block_06C3; + + block_0686: + if (Item.getFrame(arg_06) != 1) goto block_06BF; + + block_0695: + local_08 = Item.getQLo(local_02); + if (local_08 != local_0A) goto block_06BF; + + block_06A8: + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFC target=[BP-04h] */ + local_04 = local_02; + local_0A = (local_0A - 1); + goto block_06C3; + + block_06BF: + /* loopnext */ + goto block_0683; + + block_06C3: + if (local_0C != local_0A) goto block_06E4; + + block_06CD: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + + block_06E4: + goto block_060E; + + block_06E7: + + block_06ED: + while (true) { + foreach_list local_02 -> block_07BC; + if (Intrinsic00AD(local_02) == 1) { + BRIDGE.slot_21(0x0336, local_02); + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF2 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if ((Item.getFamily(local_0E) == 6) && (Item.isNpc(local_0E) != 0)) { + for local_10 in nearby_items(shape=0x04B8, origin=local_0E) { + /* loopnext */ + } + spawn ITEM.slot_2A(pid, 1, 0, local_0E); + suspend; + } + /* loopnext */ + } + } + + block_07BC: + + block_07C2: + while (true) { + foreach_list local_02 -> block_087A; + if (Intrinsic00AD(local_02) == 1) { + BRIDGE.slot_21(0x0336, local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF2 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if ((Item.getFamily(local_0E) == 6) && (Item.isNpc(local_0E) != 0)) { + for local_10 in nearby_items(shape=0x04B8, origin=local_0E) { + /* loopnext */ + } + spawn ITEM.slot_2A(pid, 1, 0, local_0E); + suspend; + } + /* loopnext */ + } + } + + block_087A: + /* free_local_list bp_offset=0xFC target=[BP-04h] */ + return; + +} + +/* ===== slot 0x26 slot_26 ===== */ +function bridge_slot_26() /* entry=474 class_id=0x0A1C slot=0x26 */ +{ + entry: + set_info(0x021B, *(arg_06)); + local_12 = 0; + local_14 = 1; + local_08 = arg_0C; + if (local_08 != 0) goto block_08E8; + + block_089C: + /* loop_selector local_04 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) */ + + block_08B3: + if condition goto block_08DB; + + block_08B6: + local_0A = Item.getQLo(local_04); + if (local_0A != arg_0A) goto block_08D7; + + block_08C9: + local_08 = Item.getQHi(local_04); + goto block_08DB; + + block_08D7: + /* loopnext */ + goto block_08B3; + + block_08DB: + if (local_08 != 0) goto block_08E8; + + block_08E5: + goto block_0CEF; + + block_08E8: + if (local_08 < arg_0A) goto block_08F3; + + block_08F0: + goto block_0CEF; + + block_08F3: + local_0C = arg_0A; + local_16 = 100; + + block_08FB: + if (local_0C <= local_08) goto block_09F5; + + block_0903: + local_0E = local_0C; + /* loop_selector local_04 in selector_0x42(arg0=0x03A6, arg1=0x0413, arg2=(70 * 32), origin=arg_06) */ + + block_091E: + if condition goto block_09A8; + + block_0921: + local_0A = Item.getQLo(local_04); + if (local_0A != local_0C) goto block_09A4; + + block_0934: + if (local_0A != (arg_0A + 1)) goto block_098D; + + block_093F: + local_10 = Item.getQHi(local_04); + if (local_10 < 0) goto block_095A; + + block_0952: + local_10 = (local_10 + 0x0100); + + block_095A: + local_10 = (local_10 & 127); + local_12 = (local_10 & 7); + local_14 = (local_10 / 8); + if (local_14 != 0) goto block_097B; + + block_0977: + local_14 = 1; + + block_097B: + local_14 = (local_14 * 5); + if (local_12 != 0) goto block_098D; + + block_098A: + goto block_0CEF; + + block_098D: + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + local_06 = local_04; + local_0C = (1 + local_0C); + goto block_09A8; + + block_09A4: + /* loopnext */ + goto block_091E; + + block_09A8: + if (local_0E != local_0C) goto block_09F2; + + block_09B2: + if (local_16 != 0) goto block_09D4; + + block_09BA: + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + goto block_09F2; + + block_09D4: + local_16 = (local_16 - 1); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + + block_09F2: + goto block_08FB; + + block_09F5: + if (local_12 != 3) goto block_0B84; + + block_09FD: + if 1 goto block_0B84; + + block_0A02: + local_0A = 0; + + block_0A0C: + while (true) { + foreach_list local_04 -> block_0A2A; + if (Intrinsic00AD(local_04) == 0) { + local_0A = (1 + local_0A); + } + } + + block_0A2A: + if (local_0A != 0) goto block_0B6A; + + block_0A32: + + block_0A38: + while (true) { + foreach_list local_04 -> block_0A77; + if (local_0A == 0) { + local_0C = Item.getFrame(local_04); + local_1D = local_04; + local_0A = 1; + } + else { + local_0E = Item.getFrame(local_04); + local_0C = local_0E; + } + } + + block_0A77: + + block_0A87: + while (true) { + foreach_list local_04 -> block_0B6A; + local_0A = Item.getFrame(local_04); + if (local_0A == 1) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE3 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_02 = local_1D; + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, local_04, local_02); + suspend; + /* loopnext */ + } + } + else if (local_0A == 2) { + BRIDGE.slot_21(0x0336, local_04); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE3 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, local_14, 0x00000000); + suspend; + if (Item.getFrame(local_04) == 1) { + BRIDGE.slot_21(0x03A6, local_04); + } + } + } + + block_0B6A: + spawn FREE.slot_3B(pid, local_14, 0x00000000); + suspend; + goto block_09FD; + + block_0B84: + + block_0B8A: + while (true) { + foreach_list local_04 -> block_0BAB; + } + + block_0BAB: + if 1 goto block_0CEF; + + block_0BB0: + + block_0BB6: + foreach_list local_04 -> block_0CEC; + + block_0BBB: + if (Intrinsic00AD(local_04) != 0) goto block_0BCD; + + block_0BCA: + goto block_0CEF; + + block_0BCD: + local_0A = Item.getShape(local_04); + if ((local_0A != 0x0336) || (local_0A != 0x0290)) goto block_0BEB; + + block_0BE8: + goto block_0CEF; + + block_0BEB: + if (local_12 != 1) goto block_0C57; + + block_0BF3: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE3 string_bytes=0x1 loop_type=0x6 */ + + block_0C08: + while (!condition) { + local_02 = local_1D; + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, local_04, local_02); + suspend; + /* loopnext */ + } + + block_0C31: + spawn FREE.slot_3B(pid, local_14, 0x00000000); + suspend; + goto block_0CE9; + + block_0C57: + if (local_12 != 2) goto block_0CE6; + + block_0C5F: + BRIDGE.slot_21(0x0336, local_04); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE3 string_bytes=0x1 loop_type=0x6 */ + + block_0C8B: + while (!condition) { + /* loopnext */ + } + + block_0C9A: + spawn FREE.slot_3B(pid, local_14, 0x00000000); + suspend; + if (Item.getFrame(local_04) != 1) goto block_0CE3; + + block_0CC2: + BRIDGE.slot_21(0x03A6, local_04); + + block_0CE3: + goto block_0CE9; + + block_0CE6: + goto block_0CEF; + + block_0CE9: + goto block_0BB6; + + block_0CEC: + goto block_0BAB; + + block_0CEF: + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + return; + +} diff --git a/USECODE/REGRET/BROKENCW.unk b/USECODE/REGRET/BROKENCW.unk new file mode 100644 index 0000000..0d00570 --- /dev/null +++ b/USECODE/REGRET/BROKENCW.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for BROKENCW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function brokencw_gotHit() /* entry=48 class_id=0x00D1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */ + while (!condition) { + if (Item.getShape(local_02) == 0x00D1) { + } + else if ((Item.getFamily(local_02) == 6) && (Item.isNpc(local_02) != 0)) { + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/CAMERACO.unk b/USECODE/REGRET/CAMERACO.unk new file mode 100644 index 0000000..ae5bf87 --- /dev/null +++ b/USECODE/REGRET/CAMERACO.unk @@ -0,0 +1,135 @@ + +/* synthesized appendix for CAMERACO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cameraco_gotHit() /* entry=96 class_id=0x01B6 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) == 5)) { + FREE.slot_3C(0x021B, *(arg_06)); + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cameraco_enterFastArea() /* entry=96 class_id=0x01B6 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = ((5 - World.gameDifficulty()) * 15); + local_04 = (5 - (World.gameDifficulty() * 15)); + if (Item.getFrame(arg_06) != 5) goto block_010B; + + block_0108: + goto block_0372; + + block_010B: + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + + block_0132: + local_0C = 0; + local_0E = 1; + + block_013A: + while (true) { + suspend; + local_12 = 0; + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + if (World.getControlledNPCNum() == 0) { + local_10 = World.getControlledNPCNum(); + } + else { + local_10 = 1; + } + local_14 = Item.getClosestDirectionInRange(15, 0, 16, Item.getY(local_10), Item.getX(local_10), Item.getY(arg_06), Item.getX(arg_06)); + local_08 = Item.getFrame(arg_06); + if (((local_14 / 2) - 1) == local_08) { + local_12 = Intrinsic0036(local_10, arg_06); + if (!local_12) { + local_0C = 1; + local_06 = (1 + local_06); + if ((local_06 <= local_04) && (!(Item.getStatus(arg_06) & 4))) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + ITEM.slot_24(4, arg_06); + } + } + else { + local_0C = 0; + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 4) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + } + else if (!(local_06 && local_0C)) { + if (((local_14 / 2) - 1) <= local_08) { + local_0E = 1; + } + else { + local_0E = -1; + } + } + else { + local_06 = 0; + local_0C = 0; + /* bit_not */ + } + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 4) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + + block_0372: + return; + +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function cameraco_leaveFastArea() /* entry=96 class_id=0x01B6 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/CAMERAEW.unk b/USECODE/REGRET/CAMERAEW.unk new file mode 100644 index 0000000..abff6b8 --- /dev/null +++ b/USECODE/REGRET/CAMERAEW.unk @@ -0,0 +1,135 @@ + +/* synthesized appendix for CAMERAEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cameraew_gotHit() /* entry=117 class_id=0x01D7 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) == 9)) { + FREE.slot_3C(0x021B, *(arg_06)); + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cameraew_enterFastArea() /* entry=117 class_id=0x01D7 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = ((5 - World.gameDifficulty()) * 5); + local_04 = (5 - (World.gameDifficulty() * 5)); + if (Item.getFrame(arg_06) != 9) goto block_010B; + + block_0108: + goto block_036C; + + block_010B: + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + + block_0132: + local_0C = 0; + local_0E = 1; + + block_013A: + while (true) { + suspend; + local_12 = 0; + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + if (World.getControlledNPCNum() == 0) { + local_10 = World.getControlledNPCNum(); + } + else { + local_10 = 1; + } + local_14 = Item.getClosestDirectionInRange(15, 0, 16, Item.getY(local_10), Item.getX(local_10), Item.getY(arg_06), Item.getX(arg_06)); + local_08 = Item.getFrame(arg_06); + if ((8 - local_14) == local_08) { + local_12 = Intrinsic0036(local_10, arg_06); + if (!local_12) { + local_0C = 1; + local_06 = (1 + local_06); + if ((local_06 <= local_04) && (!(Item.getStatus(arg_06) & 4))) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + ITEM.slot_24(4, arg_06); + } + } + else { + local_0C = 0; + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 8) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + } + else if (!(local_06 && local_0C)) { + if ((8 - local_14) <= local_08) { + local_0E = 1; + } + else { + local_0E = -1; + } + } + else { + local_06 = 0; + local_0C = 0; + /* bit_not */ + } + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 8) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + + block_036C: + return; + +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function cameraew_leaveFastArea() /* entry=117 class_id=0x01D7 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/CAMERANS.unk b/USECODE/REGRET/CAMERANS.unk new file mode 100644 index 0000000..2de4c59 --- /dev/null +++ b/USECODE/REGRET/CAMERANS.unk @@ -0,0 +1,135 @@ + +/* synthesized appendix for CAMERANS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function camerans_gotHit() /* entry=98 class_id=0x01B8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) == 9)) { + FREE.slot_3C(0x021B, *(arg_06)); + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function camerans_enterFastArea() /* entry=98 class_id=0x01B8 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = ((5 - World.gameDifficulty()) * 5); + local_04 = (5 - (World.gameDifficulty() * 5)); + if (Item.getFrame(arg_06) != 9) goto block_010B; + + block_0108: + goto block_036C; + + block_010B: + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + + block_0132: + local_0C = 0; + local_0E = 1; + + block_013A: + while (true) { + suspend; + local_12 = 0; + while (Item.isEntirelyOnScreen(arg_06)) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + if (World.getControlledNPCNum() == 0) { + local_10 = World.getControlledNPCNum(); + } + else { + local_10 = 1; + } + local_14 = Item.getClosestDirectionInRange(13, 3, 16, Item.getY(local_10), Item.getX(local_10), Item.getY(arg_06), Item.getX(arg_06)); + local_08 = Item.getFrame(arg_06); + if ((12 - local_14) == local_08) { + local_12 = Intrinsic0036(local_10, arg_06); + if (!local_12) { + local_0C = 1; + local_06 = (1 + local_06); + if ((local_06 <= local_04) && (!(Item.getStatus(arg_06) & 4))) { + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + ITEM.slot_24(4, arg_06); + } + } + else { + local_0C = 0; + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 8) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + } + else if (!(local_06 && local_0C)) { + if ((12 - local_14) <= local_08) { + local_0E = 1; + } + else { + local_0E = -1; + } + } + else { + local_06 = 0; + local_0C = 0; + /* bit_not */ + } + if ((local_08 + local_0E) >= 0) { + local_0E = 1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else if ((local_08 + local_0E) <= 8) { + local_0E = -1; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + } + + block_036C: + return; + +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function camerans_leaveFastArea() /* entry=98 class_id=0x01B8 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/CAMETRON.unk b/USECODE/REGRET/CAMETRON.unk new file mode 100644 index 0000000..d539633 --- /dev/null +++ b/USECODE/REGRET/CAMETRON.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for CAMETRON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function cametron_calledFromAnim() /* entry=175 class_id=0x0319 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/CAM_EW.unk b/USECODE/REGRET/CAM_EW.unk new file mode 100644 index 0000000..44e4261 --- /dev/null +++ b/USECODE/REGRET/CAM_EW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for CAM_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cam_ew_gotHit() /* entry=99 class_id=0x01B9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function cam_ew_equip() /* entry=99 class_id=0x01B9 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function cam_ew_unequip() /* entry=99 class_id=0x01B9 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cam_ew_enterFastArea() /* entry=99 class_id=0x01B9 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function cam_ew_leaveFastArea() /* entry=99 class_id=0x01B9 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/CAM_NS.unk b/USECODE/REGRET/CAM_NS.unk new file mode 100644 index 0000000..7bd36f1 --- /dev/null +++ b/USECODE/REGRET/CAM_NS.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for CAM_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cam_ns_gotHit() /* entry=100 class_id=0x01BA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function cam_ns_equip() /* entry=100 class_id=0x01BA slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function cam_ns_unequip() /* entry=100 class_id=0x01BA slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cam_ns_enterFastArea() /* entry=100 class_id=0x01BA slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function cam_ns_leaveFastArea() /* entry=100 class_id=0x01BA slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/CARD_EW.unk b/USECODE/REGRET/CARD_EW.unk new file mode 100644 index 0000000..826ccb2 --- /dev/null +++ b/USECODE/REGRET/CARD_EW.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for CARD_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function card_ew_use() /* entry=177 class_id=0x031E slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn SWITCH.slot_22(arg_06); + return; +} + +/* ===== slot 0x11 cast ===== */ +function card_ew_cast() /* entry=177 class_id=0x031E 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 FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/CARD_NS.unk b/USECODE/REGRET/CARD_NS.unk new file mode 100644 index 0000000..738c763 --- /dev/null +++ b/USECODE/REGRET/CARD_NS.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for CARD_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function card_ns_use() /* entry=176 class_id=0x031D slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn SWITCH.slot_22(arg_06); + return; +} + +/* ===== slot 0x11 cast ===== */ +function card_ns_cast() /* entry=176 class_id=0x031D 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 FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/CATWALK1.unk b/USECODE/REGRET/CATWALK1.unk new file mode 100644 index 0000000..bb78707 --- /dev/null +++ b/USECODE/REGRET/CATWALK1.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for CATWALK1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function catwalk1_gotHit() /* entry=38 class_id=0x0096 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + return; + } + else { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/CATWALK2.unk b/USECODE/REGRET/CATWALK2.unk new file mode 100644 index 0000000..902ae53 --- /dev/null +++ b/USECODE/REGRET/CATWALK2.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for CATWALK2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function catwalk2_gotHit() /* entry=61 class_id=0x0132 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + return; + } + else { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/CHANGER.unk b/USECODE/REGRET/CHANGER.unk new file mode 100644 index 0000000..454d11e --- /dev/null +++ b/USECODE/REGRET/CHANGER.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for CHANGER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function changer_hatch() /* entry=427 class_id=0x0908 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Item.getQLo(arg_06); + local_08 = Egg.getEggId(arg_06); + if (!local_08) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4C */ + /* loop current_var=0xFE string_bytes=0x1A loop_type=0x2 */ + while (!condition) { + local_06 = Item.getQLo(local_02); + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/CHEDITRO.unk b/USECODE/REGRET/CHEDITRO.unk new file mode 100644 index 0000000..9c9e1b7 --- /dev/null +++ b/USECODE/REGRET/CHEDITRO.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for CHEDITRO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function cheditro_calledFromAnim() /* entry=201 class_id=0x0385 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/CHEMSUIT.unk b/USECODE/REGRET/CHEMSUIT.unk new file mode 100644 index 0000000..3f2a6e3 --- /dev/null +++ b/USECODE/REGRET/CHEMSUIT.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for CHEMSUIT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function chemsuit_calledFromAnim() /* entry=167 class_id=0x02F6 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/CHEST_EW.unk b/USECODE/REGRET/CHEST_EW.unk new file mode 100644 index 0000000..0e248cb --- /dev/null +++ b/USECODE/REGRET/CHEST_EW.unk @@ -0,0 +1,99 @@ + +/* synthesized appendix for CHEST_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function chest_ew_use() /* entry=321 class_id=0x0550 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + return; + } + else if (Item.getFrame(arg_06) == 1) { + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 6, 0x054B, *(arg_06)); + if (!retval) { + local_06 = 6; + while (local_06 > 10) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + return; + } + } + else { + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 1, 0x054B, *(arg_06)); + if (!retval) { + local_06 = 1; + while (local_06 > 5) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + return; + } + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function chest_ew_gotHit() /* entry=321 class_id=0x0550 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + if (local_02 >= 2) { + spawn ITEM.slot_29(pid, 0x008C, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + ITEM.slot_24(0x1000, arg_06); + } + } + } + return; +} diff --git a/USECODE/REGRET/CHEST_NS.unk b/USECODE/REGRET/CHEST_NS.unk new file mode 100644 index 0000000..4224570 --- /dev/null +++ b/USECODE/REGRET/CHEST_NS.unk @@ -0,0 +1,101 @@ + +/* synthesized appendix for CHEST_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function chest_ns_use() /* entry=320 class_id=0x054F slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + return; + } + else if (Item.getFrame(arg_06) == 1) { + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 6, 0x054A, *(arg_06)); + if (!retval) { + local_06 = 6; + while (local_06 > 10) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + return; + } + } + else { + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 1, 0x054A, *(arg_06)); + if (!retval) { + local_06 = 1; + while (local_06 > 5) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + return; + } + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + local_08 = (Item.getX(arg_06) + 56); + local_0A = (Item.getY(arg_06) + 64); + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function chest_ns_gotHit() /* entry=320 class_id=0x054F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + if (local_02 >= 2) { + spawn ITEM.slot_29(pid, 0x008C, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + ITEM.slot_24(0x1000, arg_06); + } + } + } + return; +} diff --git a/USECODE/REGRET/CHEST_OE.unk b/USECODE/REGRET/CHEST_OE.unk new file mode 100644 index 0000000..9ea094a --- /dev/null +++ b/USECODE/REGRET/CHEST_OE.unk @@ -0,0 +1,41 @@ + +/* synthesized appendix for CHEST_OE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function chest_oe_use() /* entry=317 class_id=0x054B slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 9) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function chest_oe_gotHit() /* entry=317 class_id=0x054B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.getFrame(arg_06) >= 10) { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/CHEST_ON.unk b/USECODE/REGRET/CHEST_ON.unk new file mode 100644 index 0000000..2a3baa1 --- /dev/null +++ b/USECODE/REGRET/CHEST_ON.unk @@ -0,0 +1,41 @@ + +/* synthesized appendix for CHEST_ON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function chest_on_use() /* entry=316 class_id=0x054A slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 9) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function chest_on_gotHit() /* entry=316 class_id=0x054A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.getFrame(arg_06) >= 10) { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/CONGRESS.unk b/USECODE/REGRET/CONGRESS.unk new file mode 100644 index 0000000..d619692 --- /dev/null +++ b/USECODE/REGRET/CONGRESS.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for CONGRESS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function congress_calledFromAnim() /* entry=159 class_id=0x02DF slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/CONTAIN.unk b/USECODE/REGRET/CONTAIN.unk new file mode 100644 index 0000000..5cbceab --- /dev/null +++ b/USECODE/REGRET/CONTAIN.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for CONTAIN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function contain_slot_20() /* entry=449 class_id=0x0A03 slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + FREE.slot_35(arg_0C, arg_0A); + ITEM.slot_26((retval < 1), 0x1000, arg_06); + if (retval == 1) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x0096, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + local_04 = *(arg_06); + local_06 = Item.getQLo(arg_06); + if (!(global[0x0007])) { + return; + } + else { + /* pop_global global_id=0x7 size=0x1 */ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + if (local_06 == Item.getQLo(local_02)) { + if (Item.getShape(local_02) == 52) { + if (Item.getFrame(arg_06) == 0) { + suspend; + } + } + else if (Item.getShape(local_02) == 0x034B) { + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + } + else if (Item.getShape(local_02) == 11) { + ITEM.slot_24(0x1000, local_02); + if (Item.getFrame(local_02)) { + spawn ITEM.slot_2A(pid, 0, 1, local_02); + suspend; + } + } + else if (Item.getShape(local_02) == 0x0127) { + ITEM.slot_24(0x1000, local_02); + if (Item.getFrame(local_02)) { + spawn ITEM.slot_2A(pid, 0, 1, local_02); + suspend; + } + } + } + /* loopnext */ + } + /* pop_global global_id=0x7 size=0x1 */ + } + } + } + return; +} diff --git a/USECODE/REGRET/CONT_EW.unk b/USECODE/REGRET/CONT_EW.unk new file mode 100644 index 0000000..c1d94cf --- /dev/null +++ b/USECODE/REGRET/CONT_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for CONT_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cont_ew_gotHit() /* entry=4 class_id=0x000B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn CONTAIN.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/CONT_FL.unk b/USECODE/REGRET/CONT_FL.unk new file mode 100644 index 0000000..df208b7 --- /dev/null +++ b/USECODE/REGRET/CONT_FL.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for CONT_FL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x11 cast ===== */ +function cont_fl_cast() /* entry=11 class_id=0x0034 slot=0x11 */ +{ + set_info(0x021D, *(arg_06)); + process_exclude(); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/CONT_NS.unk b/USECODE/REGRET/CONT_NS.unk new file mode 100644 index 0000000..52e7ee0 --- /dev/null +++ b/USECODE/REGRET/CONT_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for CONT_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cont_ns_gotHit() /* entry=57 class_id=0x0127 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn CONTAIN.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/CONVEYOR.unk b/USECODE/REGRET/CONVEYOR.unk new file mode 100644 index 0000000..65bed04 --- /dev/null +++ b/USECODE/REGRET/CONVEYOR.unk @@ -0,0 +1,78 @@ + +/* synthesized appendix for CONVEYOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x10 leaveFastArea ===== */ +function conveyor_leaveFastArea() /* entry=478 class_id=0x0A20 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function conveyor_slot_20() /* entry=478 class_id=0x0A20 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + set_info(0x0205, *(arg_06)); + local_02 = 0; + local_02 = Item.getFrame(arg_06); + if (Intrinsic0035(115, arg_06) != 0) goto block_0120; + + block_0116: + + block_0120: + while (true) { + suspend; + local_03 = 0; + if (!Item.getQHi(arg_06)) { + local_02 = (local_02 - 1); + if (arg_0A >= 0) { + arg_0A = (arg_0A * -1); + } + if (arg_0C >= 0) { + arg_0C = (arg_0C * -1); + } + } + else { + local_02 = (1 + local_02); + if (arg_0A <= 0) { + arg_0A = (arg_0A * -1); + } + if (arg_0C <= 0) { + arg_0C = (arg_0C * -1); + } + } + if (local_02 <= 2) { + local_02 = 0; + } + if (local_02 >= 0) { + local_02 = 2; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFB string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_09 = Item.getShape(local_05); + if ((local_09 == 0x0476) && (local_09 != 0x04D0)) { + local_06 = Item.isOn(*(arg_06), local_05); + local_0E = (Item.getX(local_05) + arg_0A); + local_0C = (Item.getY(local_05) + arg_0C); + local_0A = Item.getZ(local_05); + local_07 = Item.isOn(*(arg_06), local_05); + local_03 = 1; + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (local_03) { + return; + } + } + + block_02C0: + return; + +} diff --git a/USECODE/REGRET/CONVEY_E.unk b/USECODE/REGRET/CONVEY_E.unk new file mode 100644 index 0000000..94137ef --- /dev/null +++ b/USECODE/REGRET/CONVEY_E.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONVEY_E */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function convey_e_gotHit() /* entry=63 class_id=0x0134 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = 0; + local_02 = -3; + if (!Item.getQHi(arg_06)) { + local_02 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function convey_e_equip() /* entry=63 class_id=0x0134 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(-3, 0, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(3, 0, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/CONVEY_N.unk b/USECODE/REGRET/CONVEY_N.unk new file mode 100644 index 0000000..ffa9b48 --- /dev/null +++ b/USECODE/REGRET/CONVEY_N.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONVEY_N */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function convey_n_gotHit() /* entry=22 class_id=0x006B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = -3; + local_02 = 0; + if (!Item.getQHi(arg_06)) { + local_01 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function convey_n_equip() /* entry=22 class_id=0x006B slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, -3, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, 3, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/CONVFLR.unk b/USECODE/REGRET/CONVFLR.unk new file mode 100644 index 0000000..1a4d33e --- /dev/null +++ b/USECODE/REGRET/CONVFLR.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONVFLR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function convflr_gotHit() /* entry=130 class_id=0x022C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = 0; + local_02 = -3; + if (!Item.getQHi(arg_06)) { + local_02 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function convflr_equip() /* entry=130 class_id=0x022C slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(-3, 0, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(3, 0, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/CONVFLR2.unk b/USECODE/REGRET/CONVFLR2.unk new file mode 100644 index 0000000..fe99e52 --- /dev/null +++ b/USECODE/REGRET/CONVFLR2.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONVFLR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function convflr2_gotHit() /* entry=326 class_id=0x0563 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = -3; + local_02 = 0; + if (!Item.getQHi(arg_06)) { + local_01 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function convflr2_equip() /* entry=326 class_id=0x0563 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, -3, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, 3, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/CONV_EL.unk b/USECODE/REGRET/CONV_EL.unk new file mode 100644 index 0000000..90f829d --- /dev/null +++ b/USECODE/REGRET/CONV_EL.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONV_EL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function conv_el_gotHit() /* entry=146 class_id=0x0293 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = 0; + local_02 = -3; + if (!Item.getQHi(arg_06)) { + local_02 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function conv_el_equip() /* entry=146 class_id=0x0293 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(-3, 0, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(3, 0, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/CONV_NL.unk b/USECODE/REGRET/CONV_NL.unk new file mode 100644 index 0000000..f6dc935 --- /dev/null +++ b/USECODE/REGRET/CONV_NL.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for CONV_NL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function conv_nl_gotHit() /* entry=145 class_id=0x0292 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = -3; + local_02 = 0; + if (!Item.getQHi(arg_06)) { + local_01 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function conv_nl_equip() /* entry=145 class_id=0x0292 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, -3, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, 3, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/COPY_EW.unk b/USECODE/REGRET/COPY_EW.unk new file mode 100644 index 0000000..7fd3858 --- /dev/null +++ b/USECODE/REGRET/COPY_EW.unk @@ -0,0 +1,25 @@ + +/* synthesized appendix for COPY_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function copy_ew_gotHit() /* entry=235 class_id=0x0433 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = 2; + if (local_02 <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + FREE.slot_20(1); + FREE.slot_20(local_04, 10); + } + } + return; +} diff --git a/USECODE/REGRET/COPY_NS.unk b/USECODE/REGRET/COPY_NS.unk new file mode 100644 index 0000000..e98fce4 --- /dev/null +++ b/USECODE/REGRET/COPY_NS.unk @@ -0,0 +1,25 @@ + +/* synthesized appendix for COPY_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function copy_ns_gotHit() /* entry=236 class_id=0x0434 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = 2; + if (local_02 <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + FREE.slot_20(1); + FREE.slot_20(local_04, 10); + } + } + return; +} diff --git a/USECODE/REGRET/COURIER.unk b/USECODE/REGRET/COURIER.unk new file mode 100644 index 0000000..9102e31 --- /dev/null +++ b/USECODE/REGRET/COURIER.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for COURIER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function courier_gotHit() /* entry=256 class_id=0x045D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function courier_calledFromAnim() /* entry=256 class_id=0x045D slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/CRAZYEW.unk b/USECODE/REGRET/CRAZYEW.unk new file mode 100644 index 0000000..d4a86ab --- /dev/null +++ b/USECODE/REGRET/CRAZYEW.unk @@ -0,0 +1,18 @@ + +/* synthesized appendix for CRAZYEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function crazyew_gotHit() /* entry=250 class_id=0x0451 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A >= 0x00FF) { + local_02 = arg_0A; + NPC.slot_2A(local_02); + if ((retval == 1) && (Actor.getCurrentActivityNo(local_02) != 12)) { + spawn NPC.slot_2C(local_02); + } + } + return; +} diff --git a/USECODE/REGRET/CRAZYNS.unk b/USECODE/REGRET/CRAZYNS.unk new file mode 100644 index 0000000..9505dcc --- /dev/null +++ b/USECODE/REGRET/CRAZYNS.unk @@ -0,0 +1,18 @@ + +/* synthesized appendix for CRAZYNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function crazyns_gotHit() /* entry=356 class_id=0x05AE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A >= 0x00FF) { + local_02 = arg_0A; + NPC.slot_2A(local_02); + if ((retval == 1) && (Actor.getCurrentActivityNo(local_02) != 12)) { + spawn NPC.slot_2C(local_02); + } + } + return; +} diff --git a/USECODE/REGRET/CRUMORPH.unk b/USECODE/REGRET/CRUMORPH.unk new file mode 100644 index 0000000..d36d4bd --- /dev/null +++ b/USECODE/REGRET/CRUMORPH.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for CRUMORPH */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function crumorph_equip() /* entry=174 class_id=0x0318 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (Intrinsic000D(local_02) == Item.getQLo(arg_06)) { + if (Actor.isDead(local_02) == 0) { + NPC.slot_2A(local_02); + if (retval) { + return; + } + local_04 = Actor.getCurrentActivityNo(local_02); + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn NPC.slot_28(pid, local_02); + suspend; + while (World.getControlledNPCNum() <= 1) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (Actor.isDead(local_02) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + return; + } + } + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/CRUSADER.unk b/USECODE/REGRET/CRUSADER.unk new file mode 100644 index 0000000..b93b3af --- /dev/null +++ b/USECODE/REGRET/CRUSADER.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for CRUSADER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function crusader_use() /* entry=418 class_id=0x0801 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + while (Actor.isDead()) { + /* global_address global_id=0x1E */ + } + return; +} + +/* ===== slot 0x04 cachein ===== */ +function crusader_cachein() /* entry=418 class_id=0x0801 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x11 cast ===== */ +function crusader_cast() /* entry=418 class_id=0x0801 slot=0x11 */ +{ + set_info(0x021D, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/CRUZTRIG.unk b/USECODE/REGRET/CRUZTRIG.unk new file mode 100644 index 0000000..3b435b2 --- /dev/null +++ b/USECODE/REGRET/CRUZTRIG.unk @@ -0,0 +1,60 @@ + +/* synthesized appendix for CRUZTRIG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cruztrig_gotHit() /* entry=191 class_id=0x0365 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A == World.getControlledNPCNum()) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + local_02 = arg_0A; + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCentreOn(*(arg_06), local_02) != 0)) { + return; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + while (!(Item.getStatus(local_04) & 0x1000)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (Item.getZ() >= (Item.getZ(local_04) - 5)) { + ELEVAT.slot_21(Item.getZ(local_04), local_04); + if (!retval) { + spawn ELEVAT.slot_20(local_04); + } + } + /* loopnext */ + } + return; + } + } + } + } + return; +} diff --git a/USECODE/REGRET/CRU_MINE.unk b/USECODE/REGRET/CRU_MINE.unk new file mode 100644 index 0000000..8e76434 --- /dev/null +++ b/USECODE/REGRET/CRU_MINE.unk @@ -0,0 +1,338 @@ + +/* synthesized appendix for CRU_MINE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function cru_mine_use() /* entry=55 class_id=0x011E slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + local_05 = *(arg_06); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + local_0D = Actor.getLastAnimSet(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_13 = 0; + local_15 = -1; + local_0F = -1; + local_11 = -3; + } + else if (Actor.getDir() == 1) { + local_13 = 0; + local_15 = -1; + local_0F = 0; + local_11 = -3; + } + else if (Actor.getDir() == 2) { + local_13 = 1; + local_15 = -1; + local_0F = 1; + local_11 = -3; + } + else if (Actor.getDir() == 3) { + local_13 = 1; + local_15 = -1; + local_0F = 2; + local_11 = -2; + } + else if (Actor.getDir() == 4) { + local_13 = 1; + local_15 = 0; + local_0F = 2; + local_11 = -1; + } + else if (Actor.getDir() == 5) { + local_13 = 1; + local_15 = 0; + local_0F = 2; + local_11 = 0; + } + else if (Actor.getDir() == 6) { + local_13 = 1; + local_15 = 1; + local_0F = 2; + local_11 = 2; + } + else if (Actor.getDir() == 7) { + local_13 = 1; + local_15 = 1; + local_0F = 0; + local_11 = 2; + } + else if (Actor.getDir() == 8) { + local_13 = 0; + local_15 = 1; + local_0F = -1; + local_11 = 2; + } + else if (Actor.getDir() == 9) { + local_13 = 0; + local_15 = 1; + local_0F = -2; + local_11 = 2; + } + else if (Actor.getDir() == 10) { + local_13 = -1; + local_15 = 1; + local_0F = -3; + local_11 = 2; + } + else if (Actor.getDir() == 11) { + local_13 = -1; + local_15 = 1; + local_0F = -3; + local_11 = 1; + } + else if (Actor.getDir() == 12) { + local_13 = -1; + local_15 = 0; + local_0F = -3; + local_11 = 0; + } + else if (Actor.getDir() == 13) { + local_13 = -1; + local_15 = 0; + local_0F = -3; + local_11 = -1; + } + else if (Actor.getDir() == 14) { + local_13 = -1; + local_15 = -1; + local_0F = -3; + local_11 = -3; + } + else if (Actor.getDir() == 15) { + local_13 = -1; + local_15 = -1; + local_0F = -3; + local_11 = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_03 = 1; + } + else { + local_03 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_1A = (Item.getX() + (local_0F * 16)); + /* global_address global_id=0x1E */ + local_18 = (Item.getY() + (local_11 * 16)); + /* global_address global_id=0x1E */ + local_16 = (Item.getZ() + 12); + if (Item.legalCreateAtPoint(local_1A, 0, 0x011E, local_02)) { + if (local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + return; + } + else { + while (!Kernel.getNumProcesses(0x0203, local_02)) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_0B = 1; + while (local_0B > 3) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + spawn CRU_MINE.slot_20(local_02, arg_06); + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function cru_mine_slot_20() /* entry=55 class_id=0x011E slot=0x20 */ +{ + entry: + local_17 = arg_0A; + set_info(0x00F0, local_19); + + block_0580: + if (!local_15) goto block_060F; + + block_0586: + local_02 = (1 + local_02); + /* loop_selector local_13 in nearby_items(family=6, origin=local_19) */ + + block_05A2: + if condition goto block_05DF; + + block_05A5: + if Item.isNpc(local_13) goto block_05DB; + + block_05B1: + if ((local_13 > 1) && (Actor.isDead(local_13) != 0)) goto block_05DB; + + block_05C6: + if Intrinsic0036(local_13, local_19) goto block_05DB; + + block_05D4: + local_15 = local_13; + goto block_05DF; + + block_05DB: + /* loopnext */ + goto block_05A2; + + block_05DF: + if (local_02 > 5) goto block_05F5; + + block_05E9: + local_02 = 0; + + block_05F5: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + goto block_0580; + + block_060F: + local_02 = 0; + + block_0613: + if (local_02 < 0x0190) goto block_08CA; + + block_061C: + if (Item.getZ(local_15) > (Item.getZ(local_19) + 9)) goto block_06AD; + + block_0635: + local_15 = 0; + + block_0639: + if (!local_15) goto block_06AD; + + block_063F: + /* loop_selector local_13 in nearby_items(family=6, origin=local_19) */ + + block_0654: + if condition goto block_0691; + + block_0657: + if Item.isNpc(local_13) goto block_068D; + + block_0663: + if ((local_13 > 1) && (Actor.isDead(local_13) != 0)) goto block_068D; + + block_0678: + if Intrinsic0036(local_13, local_19) goto block_068D; + + block_0686: + local_15 = local_13; + goto block_0691; + + block_068D: + /* loopnext */ + goto block_0654; + + block_0691: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + goto block_0639; + + block_06AD: + while (!Intrinsic0036(local_15, local_13)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + + block_06D5: + if ((local_1B == 0) || (local_1B != 1)) { + local_04 = 0; + local_06 = -1; + } + else if ((local_1B == 2) || (local_1B != 3)) { + local_04 = 1; + local_06 = -1; + } + else if ((local_1B == 4) || (local_1B != 5)) { + local_04 = 1; + local_06 = 0; + } + else if ((local_1B == 6) || (local_1B != 7)) { + local_04 = 1; + local_06 = 1; + } + else if ((local_1B == 8) || (local_1B != 9)) { + local_04 = 0; + local_06 = 1; + } + else if ((local_1B == 10) || (local_1B != 11)) { + local_04 = -1; + local_06 = 1; + } + else if ((local_1B == 12) || (local_1B != 13)) { + local_04 = -1; + local_06 = 0; + } + else if ((local_1B == 14) || (local_1B != 15)) { + local_04 = -1; + local_06 = -1; + } + + block_07C5: + local_11 = (local_11 + (local_04 * 8)); + local_0F = (local_0F + (local_06 * 8)); + if (!Item.legalMoveToPoint(0, 1, local_11, local_19)) goto block_0836; + + block_07F6: + local_0D = (local_0D + 1); + if (!Item.legalMoveToPoint(0, 1, local_11, local_19)) goto block_0836; + + block_0810: + local_0D = (local_0D + 1); + if (!Item.legalMoveToPoint(0, 1, local_11, local_19)) goto block_0836; + + block_082A: + + block_0836: + local_0C = (1 + local_0C); + if ((local_0C > 10) && (local_0D > 0)) goto block_08A9; + + block_084B: + local_0D = (local_0D - 4); + local_1C = 0; + + block_0856: + while (!Item.legalMoveToPoint(0, 1, local_11, local_19)) { + local_0D = (local_0D - 4); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_1C = 1; + } + + block_088D: + local_0C = 0; + if local_1C goto block_08A9; + + block_0896: + + block_08A9: + local_02 = (1 + local_02); + spawn FREE.slot_3B(pid, 4, 0x00000000); + suspend; + goto block_0613; + + block_08CA: + return; + +} diff --git a/USECODE/REGRET/CRU_SPID.unk b/USECODE/REGRET/CRU_SPID.unk new file mode 100644 index 0000000..6d33394 --- /dev/null +++ b/USECODE/REGRET/CRU_SPID.unk @@ -0,0 +1,203 @@ + +/* synthesized appendix for CRU_SPID */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function cru_spid_use() /* entry=324 class_id=0x0560 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + local_05 = *(arg_06); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + local_0D = Actor.getLastAnimSet(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_0F = -1; + local_11 = -3; + } + else if (Actor.getDir() == 1) { + local_0F = 0; + local_11 = -3; + } + else if (Actor.getDir() == 2) { + local_0F = 1; + local_11 = -3; + } + else if (Actor.getDir() == 3) { + local_0F = 2; + local_11 = -2; + } + else if (Actor.getDir() == 4) { + local_0F = 2; + local_11 = -1; + } + else if (Actor.getDir() == 5) { + local_0F = 2; + local_11 = 0; + } + else if (Actor.getDir() == 6) { + local_0F = 2; + local_11 = 2; + } + else if (Actor.getDir() == 7) { + local_0F = 0; + local_11 = 2; + } + else if (Actor.getDir() == 8) { + local_0F = -1; + local_11 = 2; + } + else if (Actor.getDir() == 9) { + local_0F = -2; + local_11 = 2; + } + else if (Actor.getDir() == 10) { + local_0F = -3; + local_11 = 2; + } + else if (Actor.getDir() == 11) { + local_0F = -3; + local_11 = 1; + } + else if (Actor.getDir() == 12) { + local_0F = -3; + local_11 = 0; + } + else if (Actor.getDir() == 13) { + local_0F = -3; + local_11 = -1; + } + else if (Actor.getDir() == 14) { + local_0F = -3; + local_11 = -3; + } + else if (Actor.getDir() == 15) { + local_0F = -3; + local_11 = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_03 = 1; + } + else { + local_03 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_16 = (Item.getX() + (local_0F * 16)); + /* global_address global_id=0x1E */ + local_14 = (Item.getY() + (local_11 * 16)); + /* global_address global_id=0x1E */ + local_12 = (Item.getZ() + 2); + if (Item.legalCreateAtPoint(local_16, 0, 0x0560, local_02)) { + if (local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + return; + } + else { + local_0B = 1; + while (local_0B > 9) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + spawn CRU_SPID.slot_20(local_02, arg_06); + } + } + return; +} + +/* ===== slot 0x05 hit ===== */ +function cru_spid_hit() /* entry=324 class_id=0x0560 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function cru_spid_slot_20() /* entry=324 class_id=0x0560 slot=0x20 */ +{ + set_info(0x00F0, *(arg_06)); + local_0F = arg_0A; + set_info(0x00F0, local_11); + while (local_02 >= 0x01F4) { + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getDir((Actor.getDir() == 0)) != 1) { + local_04 = 0; + local_06 = -1; + } + else if (Actor.getDir((Actor.getDir() == 2)) != 3) { + local_04 = 1; + local_06 = -1; + } + else if (Actor.getDir((Actor.getDir() == 4)) != 5) { + local_04 = 1; + local_06 = 0; + } + else if (Actor.getDir((Actor.getDir() == 6)) != 7) { + local_04 = 1; + local_06 = 1; + } + else if (Actor.getDir((Actor.getDir() == 8)) != 9) { + local_04 = 0; + local_06 = 1; + } + else if (Actor.getDir((Actor.getDir() == 10)) != 11) { + local_04 = -1; + local_06 = 1; + } + else if (Actor.getDir((Actor.getDir() == 12)) != 13) { + local_04 = -1; + local_06 = 0; + } + else if (Actor.getDir((Actor.getDir() == 14)) != 15) { + local_04 = -1; + local_06 = -1; + } + } + local_13 = local_0D; + local_15 = local_0B; + local_17 = local_09; + local_0D = (local_0D + (local_04 * 8)); + local_0B = (local_0B + (local_06 * 8)); + if (Item.legalMoveToPoint(0, 1, local_0D, local_11)) { + local_09 = (local_09 + 1); + } + local_08 = (1 + local_08); + if ((local_08 <= 10) && (local_09 > 0)) { + local_09 = (local_09 - 4); + local_18 = 0; + while (!Item.legalMoveToPoint(0, 1, local_0D, local_11)) { + local_09 = (local_09 - 4); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_18 = 1; + } + local_08 = 0; + } + local_02 = (1 + local_02); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/CRYO1.unk b/USECODE/REGRET/CRYO1.unk new file mode 100644 index 0000000..825133a --- /dev/null +++ b/USECODE/REGRET/CRYO1.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for CRYO1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cryo1_gotHit() /* entry=377 class_id=0x05DD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_25(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cryo1_enterFastArea() /* entry=377 class_id=0x05DD slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/CRYO2.unk b/USECODE/REGRET/CRYO2.unk new file mode 100644 index 0000000..a9f0918 --- /dev/null +++ b/USECODE/REGRET/CRYO2.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for CRYO2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cryo2_gotHit() /* entry=378 class_id=0x05DE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_25(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function cryo2_enterFastArea() /* entry=378 class_id=0x05DE slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/CRYOBOX.unk b/USECODE/REGRET/CRYOBOX.unk new file mode 100644 index 0000000..cb09561 --- /dev/null +++ b/USECODE/REGRET/CRYOBOX.unk @@ -0,0 +1,119 @@ + +/* synthesized appendix for CRYOBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function cryobox_equip() /* entry=379 class_id=0x05E1 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (!(Item.getStatus(local_02) & 0x1000)) { + } + else if ((Item.getShape(local_02) == 0x05DD) || (Item.getShape(local_02) != 0x05D9)) { + spawn CRYOBOX.slot_21(0, local_02, arg_06); + } + else if ((Item.getShape(local_02) == 0x05DE) || (Item.getShape(local_02) != 0x05DA)) { + spawn CRYOBOX.slot_21(1, local_02, arg_06); + } + } + /* loopnext */ + } + return; + } + else if (arg_0A == 1) { + for local_02 in selector_0x42(arg0=0x05E0, arg1=0x05DF, arg2=(32 * 32), origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getShape(local_02) == 0x05DF) { + spawn CRYOBOX.slot_20(0, local_04, arg_06); + } + else if (Item.getShape(local_02) == 0x05E0) { + spawn CRYOBOX.slot_20(1, local_04, arg_06); + } + } + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function cryobox_slot_20() /* entry=379 class_id=0x05E1 slot=0x20 */ +{ + set_info(0x00F0, *(arg_06)); + if (!Intrinsic006A()) { + while ((Item.getFrame(arg_0A) == 39) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (Item.getFrame(arg_0A) == 12) { + ITEM.slot_24(4, arg_0A); + spawn STEAM.slot_24(arg_0A); + } + } + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + if (arg_0C == 0) { + if (!Intrinsic006A()) { + } + } + else if (arg_0C == 1) { + if (!Intrinsic006A()) { + } + } + ITEM.slot_24(4, local_04); + spawn STEAM.slot_24(local_04); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function cryobox_slot_21() /* entry=379 class_id=0x05E1 slot=0x21 */ +{ + set_info(1, *(arg_06)); + ITEM.slot_24(0x1000, arg_0A); + if (!Intrinsic006A()) { + if ((Item.getShape(arg_0A) == 0x05D9) || (Item.getShape(arg_0A) != 0x05DA)) { + while ((Item.getFrame(arg_0A) == 39) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + while ((Item.getFrame(arg_0A) == 23) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + if (arg_0C == 0) { + local_06 = 0x05DF; + } + else if (arg_0C == 1) { + local_06 = 0x05E0; + } + ITEM.slot_24(0x1000, local_04); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_04) == 29) && (Item.isEntirelyOnScreen(local_04) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + ITEM.slot_25(0x1000, local_04); + return; +} diff --git a/USECODE/REGRET/CRYOTRON.unk b/USECODE/REGRET/CRYOTRON.unk new file mode 100644 index 0000000..86b6e86 --- /dev/null +++ b/USECODE/REGRET/CRYOTRON.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for CRYOTRON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function cryotron_calledFromAnim() /* entry=380 class_id=0x05E2 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/CSPID.unk b/USECODE/REGRET/CSPID.unk new file mode 100644 index 0000000..393d6d7 --- /dev/null +++ b/USECODE/REGRET/CSPID.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for CSPID */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function cspid_gotHit() /* entry=342 class_id=0x0584 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + return; +} diff --git a/USECODE/REGRET/DAMNLUGG.unk b/USECODE/REGRET/DAMNLUGG.unk new file mode 100644 index 0000000..4d70d9b --- /dev/null +++ b/USECODE/REGRET/DAMNLUGG.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for DAMNLUGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function damnlugg_gotHit() /* entry=352 class_id=0x059F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/DAMNMCR8.unk b/USECODE/REGRET/DAMNMCR8.unk new file mode 100644 index 0000000..b3d2ec5 --- /dev/null +++ b/USECODE/REGRET/DAMNMCR8.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for DAMNMCR8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function damnmcr8_gotHit() /* entry=353 class_id=0x05A0 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/DATALINK.unk b/USECODE/REGRET/DATALINK.unk new file mode 100644 index 0000000..eb5ad1b --- /dev/null +++ b/USECODE/REGRET/DATALINK.unk @@ -0,0 +1,266 @@ + +/* synthesized appendix for DATALINK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function datalink_use() /* entry=282 class_id=0x04D4 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xA size=0x1 */ + set_info(0, 1, 0); + /* global_address global_id=0x1E */ + local_05 = Actor.getDir(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Intrinsic0061()) { + local_03 = 1; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + spawn FREE.slot_21(pid, 0x00A7, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "MISSION OBJECTIVE:^------------------^^"; + } + if (global[0x0001] == 0) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 1)) != 2) { + if (global[0x0011]) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Secure transport back to Earth and make contact with General Maxis."; + } + else if (global[0x0010]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "Destroy Plasma Turbine on level 5."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "to the LMC Lunar Mining Base."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 3)) != 4) { + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "Locate elevator on level 4 to rendezvous with the rebels' colonel."; + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 5)) != 6) { + if (global[0x0013]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Insert Trojan Horse program into TGT system."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Take the tram to rebels' rendezvous point."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 7)) != 8) { + if (global[0x0014]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Download rebel prisoner files from LMC security system."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to return to the rebel meeting area."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 9)) != 10) { + if (global[0x0015]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "Locate rebel prisoners^on level 4^and liberate them."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to return to rebel meeting area."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 11)) != 12) { + if (global[0x0016]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Place FusionPac on conveyor.^^Exit area quickly."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^FusionPac will detonate shortly."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 13)) != 14) { + if (global[0x0017]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Disarm nerve gas^canister before it^contaminates O2^regeneration system."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to return to rebel meeting area."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 15)) != 16) { + if (global[0x0018]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Destroy WEC troop transport before it lands at Lunar Base."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to return to rebel camp."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap() == 17)) != 18) { + if (global[0x0019]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Disarm self-destruction system before Lunar Base is destroyed."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to take you to LMC Headquarters."; + } + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap((Actor.getMap((Actor.getMap((Actor.getMap() == 19)) != 20)) != 21)) != 22) { + if (global[0x001A]) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Destroy objective with any means available."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^Tram has been programmed to return to Rebel Headquarters."; + } + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^REBEL CAMP^__________^^Replenish supplies.^^Talk to officer in charge for next mission."; + } + else { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + local_07 = "^^Head can only be destroyed by securing DetPacs to his ears."; + } + } + } + } + } + } + } + } + } + } + } + } + else { + spawn FLICTEST.slot_20(pid, global[0x0001], local_02); + suspend; + } + if (!local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xF7 string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* free_local_string bp_offset=0xF9 target=[BP-07h] */ + return; +} diff --git a/USECODE/REGRET/DATAPICK.unk b/USECODE/REGRET/DATAPICK.unk new file mode 100644 index 0000000..2eeef79 --- /dev/null +++ b/USECODE/REGRET/DATAPICK.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for DATAPICK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function datapick_use() /* entry=400 class_id=0x0613 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + local_04 = local_02; + suspend; + /* loopnext */ + } + if (local_04) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + return; + } + return; +} diff --git a/USECODE/REGRET/DEATHBOX.unk b/USECODE/REGRET/DEATHBOX.unk new file mode 100644 index 0000000..5249f12 --- /dev/null +++ b/USECODE/REGRET/DEATHBOX.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for DEATHBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function deathbox_equip() /* entry=289 class_id=0x04E7 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_3B(pid, 12, 0x00000000); + suspend; + ITEM.slot_24(0x1000, arg_06); + if (arg_0A == 2) { + for local_02 in nearby_items(shape=48, origin=arg_06) { + if (Item.getQLo(local_02) == 10) { + local_03 = Item.getFrame(local_02); + } + else if (Item.getQLo(local_02) == 11) { + local_04 = Item.getFrame(local_02); + } + local_07 = (1 + local_07); + /* loopnext */ + } + if ((local_04 == 4) && (local_03 != 0)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0x0080, *(arg_06), arg_06); + suspend; + } + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/DEL16.unk b/USECODE/REGRET/DEL16.unk new file mode 100644 index 0000000..5a38d1e --- /dev/null +++ b/USECODE/REGRET/DEL16.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for DEL16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function del16_cachein() /* entry=127 class_id=0x021A slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/DEL8.unk b/USECODE/REGRET/DEL8.unk new file mode 100644 index 0000000..3576472 --- /dev/null +++ b/USECODE/REGRET/DEL8.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for DEL8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function del8_cachein() /* entry=59 class_id=0x012E slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/DENNING.unk b/USECODE/REGRET/DENNING.unk new file mode 100644 index 0000000..da1b65c --- /dev/null +++ b/USECODE/REGRET/DENNING.unk @@ -0,0 +1,56 @@ + +/* synthesized appendix for DENNING */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function denning_use() /* entry=138 class_id=0x0277 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (global[0x000F] == 4) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function denning_enterFastArea() /* entry=138 class_id=0x0277 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + /* global_address global_id=0x1E */ + if (Actor.getMap() != 25) goto block_0136; + + block_0133: + goto block_01C5; + + block_0136: + while (true) { + suspend; + local_02 = 0x00CD; + while (local_02 > 0x00D2) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = 0; + while (local_02 > 5) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + } + + block_01C5: + return; + +} diff --git a/USECODE/REGRET/DETPAC.unk b/USECODE/REGRET/DETPAC.unk new file mode 100644 index 0000000..7a3e72a --- /dev/null +++ b/USECODE/REGRET/DETPAC.unk @@ -0,0 +1,123 @@ + +/* synthesized appendix for DETPAC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function detpac_use() /* entry=323 class_id=0x055F slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + local_03 = *(arg_06); + if (!Item.isInNpc(arg_06)) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + set_info(0x00F0, 0); + local_07 = 0; + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_09 = -1; + local_0B = -3; + } + else if (Actor.getDir() == 1) { + local_09 = 0; + local_0B = -3; + } + else if (Actor.getDir() == 2) { + local_09 = 1; + local_0B = -3; + } + else if (Actor.getDir() == 3) { + local_09 = 2; + local_0B = -2; + } + else if (Actor.getDir() == 4) { + local_09 = 2; + local_0B = -1; + } + else if (Actor.getDir() == 5) { + local_09 = 2; + local_0B = 0; + } + else if (Actor.getDir() == 6) { + local_09 = 2; + local_0B = 2; + } + else if (Actor.getDir() == 7) { + local_09 = 0; + local_0B = 2; + } + else if (Actor.getDir() == 8) { + local_09 = -1; + local_0B = 2; + } + else if (Actor.getDir() == 9) { + local_09 = -2; + local_0B = 2; + } + else if (Actor.getDir() == 10) { + local_09 = -3; + local_0B = 2; + } + else if (Actor.getDir() == 11) { + local_09 = -3; + local_0B = 1; + } + else if (Actor.getDir() == 12) { + local_09 = -3; + local_0B = 0; + } + else if (Actor.getDir() == 13) { + local_09 = -3; + local_0B = -1; + } + else if (Actor.getDir() == 14) { + local_09 = -3; + local_0B = -2; + } + else if (Actor.getDir() == 15) { + local_09 = -3; + local_0B = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_01 = 1; + } + else { + local_01 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_12 = (Item.getX() + (local_09 * 16)); + /* global_address global_id=0x1E */ + local_10 = (Item.getY() + (local_0B * 16)); + /* global_address global_id=0x1E */ + local_0E = Item.getZ(); + if (!Item.legalCreateAtPoint(local_12, 0, 0x055F, local_0D)) { + } + else { + /* global_address global_id=0x1E */ + } + if (local_01) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + return; + } + else { + /* global_address global_id=0x1E */ + } + return; +} diff --git a/USECODE/REGRET/DICOR1.unk b/USECODE/REGRET/DICOR1.unk new file mode 100644 index 0000000..322faec --- /dev/null +++ b/USECODE/REGRET/DICOR1.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for DICOR1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function dicor1_gotHit() /* entry=171 class_id=0x030D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (global[0x0005]) { + suspend; + } + for local_06 in nearby_items(family=6, origin=arg_06) { + NPC.slot_2A(local_06); + if (!retval) { + spawn NPC.slot_2C(local_06); + } + else if (Actor.isDead(local_06)) { + spawn NPC.slot_2D(3, local_06); + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/DICOR2.unk b/USECODE/REGRET/DICOR2.unk new file mode 100644 index 0000000..42a4f3f --- /dev/null +++ b/USECODE/REGRET/DICOR2.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for DICOR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function dicor2_gotHit() /* entry=172 class_id=0x030E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (global[0x0005]) { + suspend; + } + for local_06 in nearby_items(family=6, origin=arg_06) { + NPC.slot_2A(local_06); + if (!retval) { + spawn NPC.slot_2C(local_06); + } + else if (Actor.isDead(local_06)) { + spawn NPC.slot_2D(3, local_06); + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/DICOR3.unk b/USECODE/REGRET/DICOR3.unk new file mode 100644 index 0000000..77f6498 --- /dev/null +++ b/USECODE/REGRET/DICOR3.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for DICOR3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function dicor3_gotHit() /* entry=43 class_id=0x00A9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (global[0x0005]) { + suspend; + } + for local_06 in nearby_items(family=6, origin=arg_06) { + NPC.slot_2A(local_06); + if (!retval) { + spawn NPC.slot_2C(local_06); + } + else if (Actor.isDead(local_06)) { + spawn NPC.slot_2D(3, local_06); + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/DISRUPT.unk b/USECODE/REGRET/DISRUPT.unk new file mode 100644 index 0000000..bb37fd6 --- /dev/null +++ b/USECODE/REGRET/DISRUPT.unk @@ -0,0 +1,138 @@ + +/* synthesized appendix for DISRUPT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function disrupt_use() /* entry=401 class_id=0x0616 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + local_05 = *(arg_06); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + local_0D = Actor.getLastAnimSet(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_0F = -1; + local_11 = -3; + } + else if (Actor.getDir() == 1) { + local_0F = 0; + local_11 = -3; + } + else if (Actor.getDir() == 2) { + local_0F = 1; + local_11 = -3; + } + else if (Actor.getDir() == 3) { + local_0F = 2; + local_11 = -2; + } + else if (Actor.getDir() == 4) { + local_0F = 2; + local_11 = -1; + } + else if (Actor.getDir() == 5) { + local_0F = 2; + local_11 = 0; + } + else if (Actor.getDir() == 6) { + local_0F = 2; + local_11 = 2; + } + else if (Actor.getDir() == 7) { + local_0F = 0; + local_11 = 2; + } + else if (Actor.getDir() == 8) { + local_0F = -1; + local_11 = 2; + } + else if (Actor.getDir() == 9) { + local_0F = -2; + local_11 = 2; + } + else if (Actor.getDir() == 10) { + local_0F = -3; + local_11 = 2; + } + else if (Actor.getDir() == 11) { + local_0F = -3; + local_11 = 1; + } + else if (Actor.getDir() == 12) { + local_0F = -3; + local_11 = 0; + } + else if (Actor.getDir() == 13) { + local_0F = -3; + local_11 = -1; + } + else if (Actor.getDir() == 14) { + local_0F = -3; + local_11 = -2; + } + else if (Actor.getDir() == 15) { + local_0F = -3; + local_11 = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_03 = 1; + } + else { + local_03 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_16 = (Item.getX() + (local_0F * 16)); + /* global_address global_id=0x1E */ + local_14 = (Item.getY() + (local_11 * 16)); + /* global_address global_id=0x1E */ + local_12 = Item.getZ(); + if (Item.legalCreateAtPoint(local_16, 0, 0x0616, local_02)) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + } + else { + local_17 = 0; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xF7 string_bytes=0xA loop_type=0x2 */ + while (!condition) { + local_17 = 1; + /* loopnext */ + } + if (local_17) { + spawn FREE.slot_21(pid, 0x01AA, 0x00000000); + suspend; + } + else { + spawn FREE.slot_21(pid, 0x01A9, 0x00000000); + suspend; + } + } + if (local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/DOOR.unk b/USECODE/REGRET/DOOR.unk new file mode 100644 index 0000000..82f2b49 --- /dev/null +++ b/USECODE/REGRET/DOOR.unk @@ -0,0 +1,1683 @@ + +/* synthesized appendix for DOOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function door_slot_20() /* entry=450 class_id=0x0A04 slot=0x20 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_21(pid, 0, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function door_slot_21() /* entry=450 class_id=0x0A04 slot=0x21 */ +{ + set_info(0x0207, *(arg_06)); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_02 = Item.getShape(arg_06); + if (local_02 == 0x05A2) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_20(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05A5) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_21(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05A1) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_22(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05A4) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_23(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x04DD) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_25(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x037E) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_24(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 49) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_26(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0363) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_27(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x037A) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_28(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 100) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_29(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x053B) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2A(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00AC) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2B(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00AF) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2C(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0193) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4E(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x028D) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4F(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00C0) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_50(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0287) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_51(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 75) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2D(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00DB) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2E(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x02D8) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_2F(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00D9) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_30(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x013F) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_31(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0301) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_32(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0156) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_33(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00D4) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_34(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x056F) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_24(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x055A) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_25(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0574) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_26(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0575) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_27(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0098) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_20(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0228) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_21(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0227) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_22(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00A8) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_23(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0571) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_28(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0570) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_29(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0573) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2A(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0572) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2B(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x02F1) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_41(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x051A) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_42(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x04CF) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_43(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x022D) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_44(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x016F) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2E(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x016E) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2F(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00DA) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2C(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x00A5) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_2D(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x01AB) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_42(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0215) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_43(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0393) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_44(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0394) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_45(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0353) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_30(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0368) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_32(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0359) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_31(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0358) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_33(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x018D) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_46(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0289) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_47(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x01C6) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_48(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x01C7) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_49(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x01EE) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4A(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x01ED) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4B(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x03AD) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4C(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x03C7) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_4D(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x03B9) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_39(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0240) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3A(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x03BA) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3B(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0241) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3C(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0167) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_35(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x04F3) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_36(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0168) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_37(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0551) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_38(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x03C6) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3D(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x046A) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3E(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x046B) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_3F(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x046C) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR3.slot_40(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 51) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3A(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x009C) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3B(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 108) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3C(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0400) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3D(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x013B) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_34(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x02DB) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_35(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x018A) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_36(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05E8) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_37(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0460) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_38(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05E9) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_39(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x047D) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR4.slot_21(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05F9) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR4.slot_20(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05AA) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3E(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x0129) { + if (arg_0A == 2) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_40(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x05AB) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_3F(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (local_02 == 0x028A) { + if (arg_0A == 1) { + /* word_to_dword */ + /* pop_result */ + return; + } + spawn DOOR2.slot_41(pid, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function door_slot_22() /* entry=450 class_id=0x0A04 slot=0x22 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_04 = 0; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4C */ + /* loop current_var=0xFE string_bytes=0x1A loop_type=0x2 */ + + block_14CB: + if condition goto block_14DC; + + block_14CE: + local_04 = (1 + local_04); + goto block_14DC; + + block_14D8: + /* loopnext */ + goto block_14CB; + + block_14DC: + local_08 = Item.getQLo(arg_06); + local_06 = Item.getQHi(arg_06); + if local_04 goto block_1561; + + block_14F9: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4C */ + /* loop current_var=0xFE string_bytes=0x1A loop_type=0x2 */ + + block_152E: + while (!condition) { + local_0A = Item.getQLo(local_02); + /* loopnext */ + } + + block_155F: + + block_1561: + return; + +} + +/* ===== slot 0x23 slot_23 ===== */ +function door_slot_23() /* entry=450 class_id=0x0A04 slot=0x23 */ +{ + set_info(0x0207, *(arg_06)); + FREE.slot_35(arg_0C, arg_0A); + local_08 = retval; + if (((local_08 == 3) || (local_08 != 4)) || (local_08 != 10)) { + FREE.slot_34(arg_0C, arg_0A); + /* rsh */ + local_0A = 2; + } + else { + return; + } + spawn ITEM.slot_29(pid, 0x00FA, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(10); + if (retval <= 5) { + } + return; + } + else if (Item.getFrame(arg_06) <= 0) { + return; + } + else { + for local_02 in nearby_items(shape=0x04F8, origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getMapNum(local_02) == 0) { + spawn TRIGGER.slot_20(pid, 0, local_02, arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + } + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + if (World.getAlertActive() == 0) { + spawn FREE.slot_44(0x00000000); + } + if (Item.getShape(arg_06) == door_shape_03ba) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_03b9) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_02d8) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_004b) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0064) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_053b) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0363) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_037a) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0574) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_056f) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0573) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0571) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_006c) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + else if (Item.getShape(arg_06) == door_shape_0033) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn DOOR.slot_22(pid, arg_06); + suspend; + return; + } + } + return; +} diff --git a/USECODE/REGRET/DOOR2.unk b/USECODE/REGRET/DOOR2.unk new file mode 100644 index 0000000..15287a9 --- /dev/null +++ b/USECODE/REGRET/DOOR2.unk @@ -0,0 +1,1249 @@ + +/* synthesized appendix for DOOR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function door2_slot_20() /* entry=451 class_id=0x0A05 slot=0x20 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function door2_slot_21() /* entry=451 class_id=0x0A05 slot=0x21 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 3, 0x0098, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function door2_slot_22() /* entry=451 class_id=0x0A05 slot=0x22 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function door2_slot_23() /* entry=451 class_id=0x0A05 slot=0x23 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 3, 0x0227, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function door2_slot_24() /* entry=451 class_id=0x0A05 slot=0x24 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function door2_slot_25() /* entry=451 class_id=0x0A05 slot=0x25 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 3, 0x056F, local_04)) { + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function door2_slot_26() /* entry=451 class_id=0x0A05 slot=0x26 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function door2_slot_27() /* entry=451 class_id=0x0A05 slot=0x27 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 3, 0x0574, local_04)) { + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x28 slot_28 ===== */ +function door2_slot_28() /* entry=451 class_id=0x0A05 slot=0x28 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x29 slot_29 ===== */ +function door2_slot_29() /* entry=451 class_id=0x0A05 slot=0x29 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 3, 0x0571, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function door2_slot_2A() /* entry=451 class_id=0x0A05 slot=0x2A */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function door2_slot_2B() /* entry=451 class_id=0x0A05 slot=0x2B */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 3, 0x0573, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2C slot_2C ===== */ +function door2_slot_2C() /* entry=451 class_id=0x0A05 slot=0x2C */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function door2_slot_2D() /* entry=451 class_id=0x0A05 slot=0x2D */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0090), 7, 0x00DA, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2E slot_2E ===== */ +function door2_slot_2E() /* entry=451 class_id=0x0A05 slot=0x2E */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function door2_slot_2F() /* entry=451 class_id=0x0A05 slot=0x2F */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0090), Item.getX(arg_06), 7, 0x016F, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function door2_slot_30() /* entry=451 class_id=0x0A05 slot=0x30 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x31 slot_31 ===== */ +function door2_slot_31() /* entry=451 class_id=0x0A05 slot=0x31 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 7, 0x0353, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x32 slot_32 ===== */ +function door2_slot_32() /* entry=451 class_id=0x0A05 slot=0x32 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x33 slot_33 ===== */ +function door2_slot_33() /* entry=451 class_id=0x0A05 slot=0x33 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 7, 0x0368, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x34 slot_34 ===== */ +function door2_slot_34() /* entry=451 class_id=0x0A05 slot=0x34 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_04 = 7; + local_02 = 1; + while (local_02 > local_04) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x35 slot_35 ===== */ +function door2_slot_35() /* entry=451 class_id=0x0A05 slot=0x35 */ +{ + set_info(0x0207, *(arg_06)); + local_06 = 7; + FREE.slot_36((Item.getZ(arg_06) - 72), Item.getY(arg_06), Item.getX(arg_06), local_06, 0x013B, *(arg_06)); + if (!retval) { + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + local_02 = (local_06 - 1); + while (local_02 <= 0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (local_02 - 1); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x36 slot_36 ===== */ +function door2_slot_36() /* entry=451 class_id=0x0A05 slot=0x36 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_04 = 4; + local_02 = 1; + while (local_02 > local_04) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x37 slot_37 ===== */ +function door2_slot_37() /* entry=451 class_id=0x0A05 slot=0x37 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_06 = 4; + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), local_06, 0x018A, *(arg_06)); + if (!retval) { + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + local_02 = (local_06 - 1); + while (local_02 <= 0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (local_02 - 1); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x38 slot_38 ===== */ +function door2_slot_38() /* entry=451 class_id=0x0A05 slot=0x38 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_04 = 4; + local_02 = 1; + while (local_02 > local_04) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x39 slot_39 ===== */ +function door2_slot_39() /* entry=451 class_id=0x0A05 slot=0x39 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_06 = 4; + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), local_06, 0x0460, *(arg_06)); + if (!retval) { + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + local_02 = (local_06 - 1); + while (local_02 <= 0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (local_02 - 1); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x3A slot_3A ===== */ +function door2_slot_3A() /* entry=451 class_id=0x0A05 slot=0x3A */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = 1; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3B slot_3B ===== */ +function door2_slot_3B() /* entry=451 class_id=0x0A05 slot=0x3B */ +{ + set_info(0x0207, *(arg_06)); + /* loop_selector local_04 in nearby_items(shape=0x00AD, origin=arg_06) */ + while (!condition) { + if (Item.getFrame(arg_06) == 0) { + } + else { + return; + } + /* loopnext */ + } + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 4, 51, *(arg_06)); + if (retval) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3C slot_3C ===== */ +function door2_slot_3C() /* entry=451 class_id=0x0A05 slot=0x3C */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = 1; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3D slot_3D ===== */ +function door2_slot_3D() /* entry=451 class_id=0x0A05 slot=0x3D */ +{ + set_info(0x0207, *(arg_06)); + /* loop_selector local_04 in nearby_items(shape=0x0401, origin=arg_06) */ + while (!condition) { + if (Item.getFrame(arg_06) == 0) { + } + else { + return; + } + /* loopnext */ + } + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 4, 108, *(arg_06)); + if (retval) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3E slot_3E ===== */ +function door2_slot_3E() /* entry=451 class_id=0x0A05 slot=0x3E */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3F slot_3F ===== */ +function door2_slot_3F() /* entry=451 class_id=0x0A05 slot=0x3F */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 9, 0x05AA, local_04)) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x40 slot_40 ===== */ +function door2_slot_40() /* entry=451 class_id=0x0A05 slot=0x40 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x41 slot_41 ===== */ +function door2_slot_41() /* entry=451 class_id=0x0A05 slot=0x41 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 9, 0x0129, local_04)) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x42 slot_42 ===== */ +function door2_slot_42() /* entry=451 class_id=0x0A05 slot=0x42 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 1; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x43 slot_43 ===== */ +function door2_slot_43() /* entry=451 class_id=0x0A05 slot=0x43 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 8, 0x01AB, local_04)) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x44 slot_44 ===== */ +function door2_slot_44() /* entry=451 class_id=0x0A05 slot=0x44 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 1; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x45 slot_45 ===== */ +function door2_slot_45() /* entry=451 class_id=0x0A05 slot=0x45 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 8, 0x0393, local_04)) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x46 slot_46 ===== */ +function door2_slot_46() /* entry=451 class_id=0x0A05 slot=0x46 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 1; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x47 slot_47 ===== */ +function door2_slot_47() /* entry=451 class_id=0x0A05 slot=0x47 */ +{ + set_info(0x0207, *(arg_06)); + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 3, 0x018D, *(arg_06)); + if (!retval) { + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x48 slot_48 ===== */ +function door2_slot_48() /* entry=451 class_id=0x0A05 slot=0x48 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 1; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x49 slot_49 ===== */ +function door2_slot_49() /* entry=451 class_id=0x0A05 slot=0x49 */ +{ + set_info(0x0207, *(arg_06)); + FREE.slot_36(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 3, 0x01C6, *(arg_06)); + if (!retval) { + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x4A slot_4A ===== */ +function door2_slot_4A() /* entry=451 class_id=0x0A05 slot=0x4A */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + set_info(1, 0); + local_04 = 7; + local_02 = 1; + while (local_02 > local_04) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_06 = Item.getQLo(arg_06); + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x4B slot_4B ===== */ +function door2_slot_4B() /* entry=451 class_id=0x0A05 slot=0x4B */ +{ + set_info(0x0207, *(arg_06)); + set_info(1, 0); + local_0C = 7; + local_08 = *(arg_06); + local_0E = Item.getX(arg_06); + local_10 = Item.getY(arg_06); + local_12 = Item.getZ(arg_06); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (Item.getFrame(local_02) == 0) { + local_14 = Item.getX(local_02); + local_16 = Item.getY(local_02); + local_1C = Item.getZ(local_02); + } + else { + local_18 = Item.getX(local_02); + local_1A = Item.getY(local_02); + local_1E = Item.getZ(local_02); + } + /* loopnext */ + } + local_20 = Item.getQLo(arg_06); + if (Item.legalCreateAtCoords((local_12 - 80), local_10, local_0E, 7, 0x01EE, local_04) == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0A = 1; + while (local_0A > local_0C) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0A = (1 + local_0A); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x4C slot_4C ===== */ +function door2_slot_4C() /* entry=451 class_id=0x0A05 slot=0x4C */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + set_info(1, 0); + local_04 = 7; + local_02 = 1; + while (local_02 > local_04) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_06 = Item.getQLo(arg_06); + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x4D slot_4D ===== */ +function door2_slot_4D() /* entry=451 class_id=0x0A05 slot=0x4D */ +{ + set_info(0x0207, *(arg_06)); + set_info(1, 0); + local_0A = 7; + local_06 = *(arg_06); + local_0C = Item.getX(arg_06); + local_0E = Item.getY(arg_06); + local_10 = Item.getZ(arg_06); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (Item.getFrame(local_02) == 0) { + local_12 = Item.getX(local_02); + local_14 = Item.getY(local_02); + local_1A = Item.getZ(local_02); + } + else { + local_16 = Item.getX(local_02); + local_18 = Item.getY(local_02); + local_1C = Item.getZ(local_02); + } + /* loopnext */ + } + local_1E = Item.getQLo(arg_06); + if (Item.legalCreateAtCoords((local_10 - 80), local_0E, local_0C, local_0A, 0x03AD, local_04) == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_08 = 1; + while (local_08 > local_0A) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x4E slot_4E ===== */ +function door2_slot_4E() /* entry=451 class_id=0x0A05 slot=0x4E */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x4F slot_4F ===== */ +function door2_slot_4F() /* entry=451 class_id=0x0A05 slot=0x4F */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) - 64), Item.getX(arg_06), 0, 0x032A, local_04)) { + for local_04 in nearby_items(shape=0x028D, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x50 slot_50 ===== */ +function door2_slot_50() /* entry=451 class_id=0x0A05 slot=0x50 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x51 slot_51 ===== */ +function door2_slot_51() /* entry=451 class_id=0x0A05 slot=0x51 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) - 64), 0, 0x0120, local_04)) { + for local_04 in nearby_items(shape=0x0287, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} diff --git a/USECODE/REGRET/DOOR3.unk b/USECODE/REGRET/DOOR3.unk new file mode 100644 index 0000000..da70c97 --- /dev/null +++ b/USECODE/REGRET/DOOR3.unk @@ -0,0 +1,1025 @@ + +/* synthesized appendix for DOOR3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function door3_slot_20() /* entry=452 class_id=0x0A06 slot=0x20 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function door3_slot_21() /* entry=452 class_id=0x0A06 slot=0x21 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) - 64), Item.getX(arg_06), 0, 0x032A, local_04)) { + for local_04 in nearby_items(shape=0x05A5, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function door3_slot_22() /* entry=452 class_id=0x0A06 slot=0x22 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function door3_slot_23() /* entry=452 class_id=0x0A06 slot=0x23 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) - 64), 0, 0x0120, local_04)) { + for local_04 in nearby_items(shape=0x05A4, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function door3_slot_24() /* entry=452 class_id=0x0A06 slot=0x24 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function door3_slot_25() /* entry=452 class_id=0x0A06 slot=0x25 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function door3_slot_26() /* entry=452 class_id=0x0A06 slot=0x26 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 112), 0, 4, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (Item.getFrame(arg_06) == 1) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 112), Item.getX(arg_06), 0, 0x0084, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (Item.getFrame(arg_06) == 2) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 0, 0x0120, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else if (Item.getFrame(arg_06) == 3) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 0, 0x032A, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function door3_slot_27() /* entry=452 class_id=0x0A06 slot=0x27 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x28 slot_28 ===== */ +function door3_slot_28() /* entry=452 class_id=0x0A06 slot=0x28 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x29 slot_29 ===== */ +function door3_slot_29() /* entry=452 class_id=0x0A06 slot=0x29 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function door3_slot_2A() /* entry=452 class_id=0x0A06 slot=0x2A */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function door3_slot_2B() /* entry=452 class_id=0x0A06 slot=0x2B */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 0, 0x0120, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2C slot_2C ===== */ +function door3_slot_2C() /* entry=452 class_id=0x0A06 slot=0x2C */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 0, 0x032A, local_04)) { + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function door3_slot_2D() /* entry=452 class_id=0x0A06 slot=0x2D */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x2E slot_2E ===== */ +function door3_slot_2E() /* entry=452 class_id=0x0A06 slot=0x2E */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) - 64), Item.getX(arg_06), 0, 0x0140, local_04)) { + for local_04 in nearby_items(shape=0x00DB, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function door3_slot_2F() /* entry=452 class_id=0x0A06 slot=0x2F */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function door3_slot_30() /* entry=452 class_id=0x0A06 slot=0x30 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) - 64), 0, 0x0281, local_04)) { + for local_04 in nearby_items(shape=0x00D9, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x31 slot_31 ===== */ +function door3_slot_31() /* entry=452 class_id=0x0A06 slot=0x31 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x32 slot_32 ===== */ +function door3_slot_32() /* entry=452 class_id=0x0A06 slot=0x32 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) - 64), Item.getX(arg_06), 0, 0x0140, local_04)) { + for local_04 in nearby_items(shape=0x0301, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x33 slot_33 ===== */ +function door3_slot_33() /* entry=452 class_id=0x0A06 slot=0x33 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x34 slot_34 ===== */ +function door3_slot_34() /* entry=452 class_id=0x0A06 slot=0x34 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) - 64), 0, 0x0281, local_04)) { + for local_04 in nearby_items(shape=0x00D4, origin=arg_06) { + /* loopnext */ + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x35 slot_35 ===== */ +function door3_slot_35() /* entry=452 class_id=0x0A06 slot=0x35 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x36 slot_36 ===== */ +function door3_slot_36() /* entry=452 class_id=0x0A06 slot=0x36 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 7, 0x0167, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x37 slot_37 ===== */ +function door3_slot_37() /* entry=452 class_id=0x0A06 slot=0x37 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x38 slot_38 ===== */ +function door3_slot_38() /* entry=452 class_id=0x0A06 slot=0x38 */ +{ + set_info(0x0207, *(arg_06)); + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 7, 0x0168, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x39 slot_39 ===== */ +function door3_slot_39() /* entry=452 class_id=0x0A06 slot=0x39 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3A slot_3A ===== */ +function door3_slot_3A() /* entry=452 class_id=0x0A06 slot=0x3A */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 1) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 0, 0x0236, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x3B slot_3B ===== */ +function door3_slot_3B() /* entry=452 class_id=0x0A06 slot=0x3B */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3C slot_3C ===== */ +function door3_slot_3C() /* entry=452 class_id=0x0A06 slot=0x3C */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 1) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 0, 0x0233, local_04)) { + local_02 = 0; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x3D slot_3D ===== */ +function door3_slot_3D() /* entry=452 class_id=0x0A06 slot=0x3D */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 9) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3E slot_3E ===== */ +function door3_slot_3E() /* entry=452 class_id=0x0A06 slot=0x3E */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 1) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), (Item.getY(arg_06) + 0x0080), Item.getX(arg_06), 0, 0x0236, local_04)) { + for local_04 in nearby_items(shape=0x046A, origin=arg_06) { + if ((Item.getFrame(local_04) == 1) && (Item.getQLo(local_04) != Item.getQLo(arg_06))) { + local_06 = local_04; + } + /* loopnext */ + } + if (local_06) { + return; + } + local_02 = 0; + while (local_02 > 9) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x3F slot_3F ===== */ +function door3_slot_3F() /* entry=452 class_id=0x0A06 slot=0x3F */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 9) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x40 slot_40 ===== */ +function door3_slot_40() /* entry=452 class_id=0x0A06 slot=0x40 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 1) { + if (!Item.legalCreateAtCoords(Item.getZ(arg_06), Item.getY(arg_06), (Item.getX(arg_06) + 0x0080), 0, 0x0233, local_04)) { + for local_04 in nearby_items(shape=0x046C, origin=arg_06) { + if ((Item.getFrame(local_04) == 1) && (Item.getQLo(local_04) != Item.getQLo(arg_06))) { + local_06 = local_04; + } + /* loopnext */ + } + if (local_06) { + return; + } + local_02 = 0; + while (local_02 > 9) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x41 slot_41 ===== */ +function door3_slot_41() /* entry=452 class_id=0x0A06 slot=0x41 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x42 slot_42 ===== */ +function door3_slot_42() /* entry=452 class_id=0x0A06 slot=0x42 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + for local_04 in nearby_items(shape=0x051A, origin=arg_06) { + if ((Item.getFrame(local_04) == 1) && (Item.getQLo(local_04) != Item.getQLo(arg_06))) { + local_06 = local_04; + } + /* loopnext */ + } + if (local_06) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x4 target=[SP+04h] */ + suspend; + return; + } + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 8, 0x02F1, *(arg_06)); + if (!retval) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x43 slot_43 ===== */ +function door3_slot_43() /* entry=452 class_id=0x0A06 slot=0x43 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) <= 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x44 slot_44 ===== */ +function door3_slot_44() /* entry=452 class_id=0x0A06 slot=0x44 */ +{ + set_info(0x0207, *(arg_06)); + if (Item.getFrame(arg_06) == 0) { + for local_04 in nearby_items(shape=0x022D, origin=arg_06) { + if ((Item.getFrame(local_04) == 1) && (Item.getQLo(local_04) != Item.getQLo(arg_06))) { + local_06 = local_04; + } + /* loopnext */ + } + if (local_06) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x4 target=[SP+04h] */ + suspend; + return; + } + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 8, 0x04CF, *(arg_06)); + if (!retval) { + local_02 = 0; + while (local_02 > 8) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} diff --git a/USECODE/REGRET/DOOR4.unk b/USECODE/REGRET/DOOR4.unk new file mode 100644 index 0000000..6df88b4 --- /dev/null +++ b/USECODE/REGRET/DOOR4.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for DOOR4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function door4_slot_20() /* entry=453 class_id=0x0A07 slot=0x20 */ +{ + set_info(0x0207, *(arg_06)); + spawn DOOR.slot_22(pid, arg_06); + suspend; + local_02 = 1; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function door4_slot_21() /* entry=453 class_id=0x0A07 slot=0x21 */ +{ + set_info(0x0207, *(arg_06)); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x45 */ + /* loop current_var=0xFC string_bytes=0xC loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + FREE.slot_36(Item.getZ(arg_06), Item.getY(arg_06), Item.getX(arg_06), 4, 0x05F9, *(arg_06)); + if (retval) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} diff --git a/USECODE/REGRET/DOOREGG.unk b/USECODE/REGRET/DOOREGG.unk new file mode 100644 index 0000000..8da3987 --- /dev/null +++ b/USECODE/REGRET/DOOREGG.unk @@ -0,0 +1,51 @@ + +/* synthesized appendix for DOOREGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function dooregg_hatch() /* entry=429 class_id=0x090A slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + spawn DOOREGG.slot_20(pid, arg_06); + suspend; + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function dooregg_unhatch() /* entry=429 class_id=0x090A slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + spawn DOOREGG.slot_21(pid, arg_06); + suspend; + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function dooregg_slot_20() /* entry=429 class_id=0x090A slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + /* loop_selector local_02 in nearby_items(family=1, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == Egg.getEggId(arg_06)) { + spawn DOOR.slot_21(1, local_02); + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function dooregg_slot_21() /* entry=429 class_id=0x090A slot=0x21 */ +{ + set_info(0x0001, *(arg_06)); + /* loop_selector local_02 in nearby_items(family=1, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == Egg.getEggId(arg_06)) { + spawn DOOR.slot_21(2, local_02); + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/DUCK_EW.unk b/USECODE/REGRET/DUCK_EW.unk new file mode 100644 index 0000000..ace5651 --- /dev/null +++ b/USECODE/REGRET/DUCK_EW.unk @@ -0,0 +1,141 @@ + +/* synthesized appendix for DUCK_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function duck_ew_gotHit() /* entry=87 class_id=0x019A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_02 = Item.getQHi(arg_06); + if (Item.getFrame(arg_06) <= 0) { + if (Item.getFrame(arg_06) == 5) { + return; + } + else if (local_02 <= 99) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function duck_ew_equip() /* entry=87 class_id=0x019A slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 5) { + return; + } + else if (arg_0A == 0) { + if (Item.getFrame(arg_06) == 0) { + return; + } + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (Item.getFrame(arg_06) == 0) { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + if (arg_0A == 1) { + spawn DUCK_EW.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn DUCK_EW.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function duck_ew_leaveFastArea() /* entry=87 class_id=0x019A slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 5) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function duck_ew_slot_20() /* entry=87 class_id=0x019A slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_02B3; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + + block_0119: + while (true) { + suspend; + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + if (local_04 <= 99) { + local_04 = (local_04 - 100); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_02B3: + return; + +} diff --git a/USECODE/REGRET/DUCK_NS.unk b/USECODE/REGRET/DUCK_NS.unk new file mode 100644 index 0000000..5650f80 --- /dev/null +++ b/USECODE/REGRET/DUCK_NS.unk @@ -0,0 +1,141 @@ + +/* synthesized appendix for DUCK_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function duck_ns_gotHit() /* entry=85 class_id=0x0196 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_02 = Item.getQHi(arg_06); + if (Item.getFrame(arg_06) <= 0) { + if (Item.getFrame(arg_06) == 5) { + return; + } + else if (local_02 <= 99) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function duck_ns_equip() /* entry=85 class_id=0x0196 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 5) { + return; + } + else if (arg_0A == 0) { + if (Item.getFrame(arg_06) == 0) { + return; + } + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (Item.getFrame(arg_06) == 0) { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + if (arg_0A == 1) { + spawn DUCK_NS.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn DUCK_NS.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function duck_ns_leaveFastArea() /* entry=85 class_id=0x0196 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 5) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function duck_ns_slot_20() /* entry=85 class_id=0x0196 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_02B0; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + + block_0119: + while (true) { + suspend; + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + if (local_04 <= 99) { + local_04 = (local_04 - 100); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_02B0: + return; + +} diff --git a/USECODE/REGRET/D_BARREL.unk b/USECODE/REGRET/D_BARREL.unk new file mode 100644 index 0000000..8a075b9 --- /dev/null +++ b/USECODE/REGRET/D_BARREL.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for D_BARREL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function d_barrel_gotHit() /* entry=129 class_id=0x022B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + FREE.slot_20(10); + if (retval <= 5) { + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/D_CHEM.unk b/USECODE/REGRET/D_CHEM.unk new file mode 100644 index 0000000..c7d0fc6 --- /dev/null +++ b/USECODE/REGRET/D_CHEM.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_CHEM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_chem_use() /* entry=264 class_id=0x04B9 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_chem_gotHit() /* entry=264 class_id=0x04B9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_CONG.unk b/USECODE/REGRET/D_CONG.unk new file mode 100644 index 0000000..e3b8313 --- /dev/null +++ b/USECODE/REGRET/D_CONG.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_CONG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_cong_use() /* entry=265 class_id=0x04BA slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_cong_gotHit() /* entry=265 class_id=0x04BA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_COUR.unk b/USECODE/REGRET/D_COUR.unk new file mode 100644 index 0000000..b4223f8 --- /dev/null +++ b/USECODE/REGRET/D_COUR.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for D_COUR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function d_cour_gotHit() /* entry=270 class_id=0x04C2 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (UCMachine.rndRange(100, 0) <= 50) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + /* loopnext */ + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/D_EM_GUY.unk b/USECODE/REGRET/D_EM_GUY.unk new file mode 100644 index 0000000..6ec422e --- /dev/null +++ b/USECODE/REGRET/D_EM_GUY.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for D_EM_GUY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_em_guy_calledFromAnim() /* entry=351 class_id=0x059C slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function d_em_guy_enterFastArea() /* entry=351 class_id=0x059C slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_ENFOR2.unk b/USECODE/REGRET/D_ENFOR2.unk new file mode 100644 index 0000000..4d2c7cb --- /dev/null +++ b/USECODE/REGRET/D_ENFOR2.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_ENFOR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_enfor2_calledFromAnim() /* entry=410 class_id=0x062E slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_ENFORC.unk b/USECODE/REGRET/D_ENFORC.unk new file mode 100644 index 0000000..124c443 --- /dev/null +++ b/USECODE/REGRET/D_ENFORC.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_ENFORC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_enforc_use() /* entry=322 class_id=0x055D slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_enforc_gotHit() /* entry=322 class_id=0x055D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_ESTORM.unk b/USECODE/REGRET/D_ESTORM.unk new file mode 100644 index 0000000..476a0a7 --- /dev/null +++ b/USECODE/REGRET/D_ESTORM.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_ESTORM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_estorm_use() /* entry=280 class_id=0x04D2 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_estorm_gotHit() /* entry=280 class_id=0x04D2 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_FLAMEX.unk b/USECODE/REGRET/D_FLAMEX.unk new file mode 100644 index 0000000..a395ef2 --- /dev/null +++ b/USECODE/REGRET/D_FLAMEX.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for D_FLAMEX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_flamex_calledFromAnim() /* entry=416 class_id=0x0656 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function d_flamex_enterFastArea() /* entry=416 class_id=0x0656 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_FREIGH.unk b/USECODE/REGRET/D_FREIGH.unk new file mode 100644 index 0000000..830a342 --- /dev/null +++ b/USECODE/REGRET/D_FREIGH.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_FREIGH */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_freigh_use() /* entry=187 class_id=0x0360 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_freigh_gotHit() /* entry=187 class_id=0x0360 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_GRENAD.unk b/USECODE/REGRET/D_GRENAD.unk new file mode 100644 index 0000000..2c873aa --- /dev/null +++ b/USECODE/REGRET/D_GRENAD.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_GRENAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_grenad_use() /* entry=318 class_id=0x054D slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_grenad_gotHit() /* entry=318 class_id=0x054D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_HQ2.unk b/USECODE/REGRET/D_HQ2.unk new file mode 100644 index 0000000..20f4cd3 --- /dev/null +++ b/USECODE/REGRET/D_HQ2.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_HQ2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_hq2_calledFromAnim() /* entry=395 class_id=0x0606 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_HQGUAR.unk b/USECODE/REGRET/D_HQGUAR.unk new file mode 100644 index 0000000..3b293c6 --- /dev/null +++ b/USECODE/REGRET/D_HQGUAR.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_HQGUAR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_hqguar_use() /* entry=389 class_id=0x05FD slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_hqguar_gotHit() /* entry=389 class_id=0x05FD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_KNENFO.unk b/USECODE/REGRET/D_KNENFO.unk new file mode 100644 index 0000000..e9891ec --- /dev/null +++ b/USECODE/REGRET/D_KNENFO.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_KNENFO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_knenfo_use() /* entry=413 class_id=0x0633 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_knenfo_gotHit() /* entry=413 class_id=0x0633 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_KNHQ.unk b/USECODE/REGRET/D_KNHQ.unk new file mode 100644 index 0000000..e204e59 --- /dev/null +++ b/USECODE/REGRET/D_KNHQ.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_KNHQ */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_knhq_use() /* entry=398 class_id=0x060C slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_knhq_gotHit() /* entry=398 class_id=0x060C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_KNSTOR.unk b/USECODE/REGRET/D_KNSTOR.unk new file mode 100644 index 0000000..11fe58e --- /dev/null +++ b/USECODE/REGRET/D_KNSTOR.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_KNSTOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_knstor_use() /* entry=412 class_id=0x0632 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_knstor_gotHit() /* entry=412 class_id=0x0632 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_LMC2.unk b/USECODE/REGRET/D_LMC2.unk new file mode 100644 index 0000000..a80e7da --- /dev/null +++ b/USECODE/REGRET/D_LMC2.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_LMC2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_lmc2_calledFromAnim() /* entry=374 class_id=0x05D5 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_LMC_KN.unk b/USECODE/REGRET/D_LMC_KN.unk new file mode 100644 index 0000000..f795e20 --- /dev/null +++ b/USECODE/REGRET/D_LMC_KN.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_LMC_KN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_lmc_kn_use() /* entry=396 class_id=0x0607 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_lmc_kn_gotHit() /* entry=396 class_id=0x0607 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_LMC_ST.unk b/USECODE/REGRET/D_LMC_ST.unk new file mode 100644 index 0000000..7fd4c46 --- /dev/null +++ b/USECODE/REGRET/D_LMC_ST.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_LMC_ST */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_lmc_st_use() /* entry=397 class_id=0x0608 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_lmc_st_gotHit() /* entry=397 class_id=0x0608 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_LNR.unk b/USECODE/REGRET/D_LNR.unk new file mode 100644 index 0000000..4bdaa7b --- /dev/null +++ b/USECODE/REGRET/D_LNR.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for D_LNR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_lnr_calledFromAnim() /* entry=409 class_id=0x062D slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function d_lnr_enterFastArea() /* entry=409 class_id=0x062D slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_MAINT.unk b/USECODE/REGRET/D_MAINT.unk new file mode 100644 index 0000000..764a252 --- /dev/null +++ b/USECODE/REGRET/D_MAINT.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_MAINT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_maint_use() /* entry=266 class_id=0x04BB slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_maint_gotHit() /* entry=266 class_id=0x04BB slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_NMINE.unk b/USECODE/REGRET/D_NMINE.unk new file mode 100644 index 0000000..841f8fa --- /dev/null +++ b/USECODE/REGRET/D_NMINE.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_NMINE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_nmine_use() /* entry=399 class_id=0x0610 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_nmine_gotHit() /* entry=399 class_id=0x0610 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_OWORK.unk b/USECODE/REGRET/D_OWORK.unk new file mode 100644 index 0000000..8df425e --- /dev/null +++ b/USECODE/REGRET/D_OWORK.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_OWORK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_owork_use() /* entry=267 class_id=0x04BC slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_owork_gotHit() /* entry=267 class_id=0x04BC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_PLASMA.unk b/USECODE/REGRET/D_PLASMA.unk new file mode 100644 index 0000000..dbb9d83 --- /dev/null +++ b/USECODE/REGRET/D_PLASMA.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for D_PLASMA */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_plasma_calledFromAnim() /* entry=347 class_id=0x058F slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function d_plasma_enterFastArea() /* entry=347 class_id=0x058F slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_ROBO.unk b/USECODE/REGRET/D_ROBO.unk new file mode 100644 index 0000000..a3bdeb1 --- /dev/null +++ b/USECODE/REGRET/D_ROBO.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_ROBO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_robo_calledFromAnim() /* entry=357 class_id=0x05B1 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_SCIEN.unk b/USECODE/REGRET/D_SCIEN.unk new file mode 100644 index 0000000..01e3adf --- /dev/null +++ b/USECODE/REGRET/D_SCIEN.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_SCIEN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_scien_use() /* entry=268 class_id=0x04BD slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_scien_gotHit() /* entry=268 class_id=0x04BD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_SITMAN.unk b/USECODE/REGRET/D_SITMAN.unk new file mode 100644 index 0000000..dde6360 --- /dev/null +++ b/USECODE/REGRET/D_SITMAN.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_SITMAN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_sitman_calledFromAnim() /* entry=37 class_id=0x0095 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_SKELET.unk b/USECODE/REGRET/D_SKELET.unk new file mode 100644 index 0000000..076a4a6 --- /dev/null +++ b/USECODE/REGRET/D_SKELET.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for D_SKELET */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_skelet_calledFromAnim() /* entry=349 class_id=0x0596 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function d_skelet_enterFastArea() /* entry=349 class_id=0x0596 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_STORM.unk b/USECODE/REGRET/D_STORM.unk new file mode 100644 index 0000000..e9ca01c --- /dev/null +++ b/USECODE/REGRET/D_STORM.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for D_STORM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_storm_use() /* entry=269 class_id=0x04BE slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function d_storm_gotHit() /* entry=269 class_id=0x04BE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if ((retval == 4) || (Game.isViolenceEnabled() != 0)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (Item.getShape(local_02) == 0x0111) { + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/D_STORM2.unk b/USECODE/REGRET/D_STORM2.unk new file mode 100644 index 0000000..cb0009f --- /dev/null +++ b/USECODE/REGRET/D_STORM2.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for D_STORM2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function d_storm2_calledFromAnim() /* entry=411 class_id=0x0631 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/D_SUSAN.unk b/USECODE/REGRET/D_SUSAN.unk new file mode 100644 index 0000000..5f5caf7 --- /dev/null +++ b/USECODE/REGRET/D_SUSAN.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for D_SUSAN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function d_susan_gotHit() /* entry=271 class_id=0x04C4 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (UCMachine.rndRange(100, 0) <= 50) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + /* loopnext */ + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/D_TANKEW.unk b/USECODE/REGRET/D_TANKEW.unk new file mode 100644 index 0000000..47d0ea7 --- /dev/null +++ b/USECODE/REGRET/D_TANKEW.unk @@ -0,0 +1,32 @@ + +/* synthesized appendix for D_TANKEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function d_tankew_gotHit() /* entry=257 class_id=0x045F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + for local_02 in nearby_items(family=6, origin=arg_06) { + NPC.slot_2A(local_02); + if (!retval) { + spawn NPC.slot_2C(local_02); + } + else if (Actor.isDead(local_02)) { + spawn NPC.slot_2D(6, local_02); + } + /* loopnext */ + } + if (global[0x0005]) { + suspend; + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/D_TANKNS.unk b/USECODE/REGRET/D_TANKNS.unk new file mode 100644 index 0000000..07305a5 --- /dev/null +++ b/USECODE/REGRET/D_TANKNS.unk @@ -0,0 +1,32 @@ + +/* synthesized appendix for D_TANKNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function d_tankns_gotHit() /* entry=258 class_id=0x0461 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + for local_02 in nearby_items(family=6, origin=arg_06) { + NPC.slot_2A(local_02); + if (!retval) { + spawn NPC.slot_2C(local_02); + } + else if (Actor.isDead(local_02)) { + spawn NPC.slot_2D(6, local_02); + } + /* loopnext */ + } + if (global[0x0005]) { + suspend; + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/D_THERM.unk b/USECODE/REGRET/D_THERM.unk new file mode 100644 index 0000000..a5cc4b9 --- /dev/null +++ b/USECODE/REGRET/D_THERM.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for D_THERM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function d_therm_use() /* entry=272 class_id=0x04C5 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn FREE.slot_49(pid, *(arg_06), 0x00000000); + suspend; + /* dword_to_word */ + if (!process_result) { + ITEM.slot_24(0x1000, arg_06); + } + } + return; +} diff --git a/USECODE/REGRET/EBRIDGE.unk b/USECODE/REGRET/EBRIDGE.unk new file mode 100644 index 0000000..3cc0394 --- /dev/null +++ b/USECODE/REGRET/EBRIDGE.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for EBRIDGE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function ebridge_equip() /* entry=208 class_id=0x03A6 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn BRIDGE.slot_20(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function ebridge_enterFastArea() /* entry=208 class_id=0x03A6 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = Item.getQLo(arg_06); + if (local_02 == 0) { + return; + } + else { + local_04 = Item.getQHi(arg_06); + if ((local_04 >= 1) || (local_04 > 127)) { + return; + } + else { + spawn BRIDGE.slot_26(pid, local_04, local_02, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/EBRIDGE2.unk b/USECODE/REGRET/EBRIDGE2.unk new file mode 100644 index 0000000..8579f03 --- /dev/null +++ b/USECODE/REGRET/EBRIDGE2.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for EBRIDGE2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function ebridge2_equip() /* entry=226 class_id=0x0413 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn BRIDGE.slot_20(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function ebridge2_enterFastArea() /* entry=226 class_id=0x0413 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = Item.getQLo(arg_06); + if (local_02 == 0) { + return; + } + else { + local_04 = Item.getQHi(arg_06); + if ((local_04 >= 1) || (local_04 > 127)) { + return; + } + else { + spawn BRIDGE.slot_26(pid, local_04, local_02, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/EGRENADE.unk b/USECODE/REGRET/EGRENADE.unk new file mode 100644 index 0000000..8cff8a1 --- /dev/null +++ b/USECODE/REGRET/EGRENADE.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for EGRENADE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function egrenade_calledFromAnim() /* entry=305 class_id=0x0528 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/ELEEW16.unk b/USECODE/REGRET/ELEEW16.unk new file mode 100644 index 0000000..36b3169 --- /dev/null +++ b/USECODE/REGRET/ELEEW16.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for ELEEW16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function eleew16_equip() /* entry=3 class_id=0x0007 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELEEW16.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044E, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function eleew16_enterFastArea() /* entry=3 class_id=0x0007 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + local_04 = (Item.getX(arg_06) + 64); + local_06 = Item.getY(arg_06); + local_08 = Item.getZ(arg_06); + suspend; + suspend; + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELEEW4.unk b/USECODE/REGRET/ELEEW4.unk new file mode 100644 index 0000000..8e6aaf6 --- /dev/null +++ b/USECODE/REGRET/ELEEW4.unk @@ -0,0 +1,41 @@ + +/* synthesized appendix for ELEEW4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function eleew4_equip() /* entry=92 class_id=0x01A7 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELEEW4.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044E, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function eleew4_enterFastArea() /* entry=92 class_id=0x01A7 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_04 = (Item.getX(arg_06) + 64); + local_06 = Item.getY(arg_06); + local_08 = Item.getZ(arg_06); + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELEEW8.unk b/USECODE/REGRET/ELEEW8.unk new file mode 100644 index 0000000..51db07d --- /dev/null +++ b/USECODE/REGRET/ELEEW8.unk @@ -0,0 +1,42 @@ + +/* synthesized appendix for ELEEW8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function eleew8_equip() /* entry=56 class_id=0x0126 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELEEW8.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044E, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function eleew8_enterFastArea() /* entry=56 class_id=0x0126 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + local_04 = (Item.getX(arg_06) + 64); + local_06 = Item.getY(arg_06); + local_08 = Item.getZ(arg_06); + suspend; + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELENS16.unk b/USECODE/REGRET/ELENS16.unk new file mode 100644 index 0000000..16b9629 --- /dev/null +++ b/USECODE/REGRET/ELENS16.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for ELENS16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function elens16_equip() /* entry=2 class_id=0x0006 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELENS16.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044D, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function elens16_enterFastArea() /* entry=2 class_id=0x0006 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + local_04 = Item.getX(arg_06); + local_06 = (Item.getY(arg_06) + 64); + local_08 = Item.getZ(arg_06); + suspend; + suspend; + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELENS4.unk b/USECODE/REGRET/ELENS4.unk new file mode 100644 index 0000000..31ee8dd --- /dev/null +++ b/USECODE/REGRET/ELENS4.unk @@ -0,0 +1,41 @@ + +/* synthesized appendix for ELENS4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function elens4_equip() /* entry=93 class_id=0x01A8 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELENS4.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044D, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function elens4_enterFastArea() /* entry=93 class_id=0x01A8 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + local_04 = Item.getX(arg_06); + local_06 = (Item.getY(arg_06) + 64); + local_08 = Item.getZ(arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELENS8.unk b/USECODE/REGRET/ELENS8.unk new file mode 100644 index 0000000..ca6ecf5 --- /dev/null +++ b/USECODE/REGRET/ELENS8.unk @@ -0,0 +1,42 @@ + +/* synthesized appendix for ELENS8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function elens8_equip() /* entry=58 class_id=0x0128 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn ELENS8.enterFastArea(pid, arg_06); + suspend; + return; + } + else { + for local_02 in nearby_items(shape=0x044D, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function elens8_enterFastArea() /* entry=58 class_id=0x0128 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_0A = Item.getQLo(arg_06); + ITEM.slot_24(0x1000, arg_06); + local_04 = Item.getX(arg_06); + local_06 = (Item.getY(arg_06) + 64); + local_08 = Item.getZ(arg_06); + suspend; + suspend; + } + return; +} diff --git a/USECODE/REGRET/ELEVAT.unk b/USECODE/REGRET/ELEVAT.unk new file mode 100644 index 0000000..a06bff5 --- /dev/null +++ b/USECODE/REGRET/ELEVAT.unk @@ -0,0 +1,198 @@ + +/* synthesized appendix for ELEVAT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function elevat_slot_20() /* entry=454 class_id=0x0A08 slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (Item.getNpcNum(arg_06)) { + return; + } + else { + ELEVAT.slot_22(Item.getZ(arg_06), arg_06); + if (!retval) { + spawn ELEVAT.slot_23(pid, arg_06); + suspend; + return; + } + else { + spawn ELEVAT.slot_24(pid, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function elevat_slot_21() /* entry=454 class_id=0x0A08 slot=0x21 */ +{ + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function elevat_slot_22() /* entry=454 class_id=0x0A08 slot=0x22 */ +{ + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function elevat_slot_23() /* entry=454 class_id=0x0A08 slot=0x23 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = Item.getZ(arg_06); + local_08 = Item.getQHi(arg_06); + local_0A = ((Item.getQHi(arg_06) - local_06) / 2); + local_05 = 1; + while (local_05 > local_0A) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (Item.getShape(local_02) == 0x04FE) { + local_0E = (1 + local_0E); + } + /* loopnext */ + } + local_0C = 1; + while (local_0C > local_0E) { + local_02 = Item.getEtherealTop(); + local_0C = (1 + local_0C); + } + local_0E = 0; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_05 = (1 + local_05); + } + if (!((local_08 - local_06) & 1)) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_0E = (1 + local_0E); + /* loopnext */ + } + local_0C = 1; + while (local_0C > local_0E) { + local_02 = Item.getEtherealTop(); + local_0C = (1 + local_0C); + } + } + /* bit_not */ + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function elevat_slot_24() /* entry=454 class_id=0x0A08 slot=0x24 */ +{ + set_info(0x0001, *(arg_06)); + local_05 = Item.getZ(arg_06); + ELEVAT.slot_21(arg_06); + local_07 = retval; + local_09 = ((local_05 - local_07) / 2); + local_02 = 1; + while (local_02 > local_09) { + local_10 = Item.getX(arg_06); + local_0E = Item.getY(arg_06); + local_0C = (Item.getZ(arg_06) - 2); + local_18 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF5 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (!Item.isCentreOn(*(arg_06), local_0B)) { + if (local_0B >= 0x0100) { + if (!Item.isCompletelyOn(*(arg_06), local_0B)) { + local_18 = (1 + local_18); + } + else { + local_18 = (1 + local_18); + } + } + else { + local_18 = (1 + local_18); + } + } + /* loopnext */ + } + if (!Item.legalMoveToPoint(0, 0, local_10, arg_06)) { + local_04 = 1; + while (local_04 > local_18) { + local_0B = Item.getEtherealTop(); + local_04 = (1 + local_04); + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + else { + local_04 = 1; + while (local_04 > local_18) { + local_0B = Item.getEtherealTop(); + local_04 = (1 + local_04); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn ELEVAT.slot_23(pid, arg_06); + suspend; + return; + } + local_18 = 0; + local_02 = (1 + local_02); + } + if (!((local_05 - local_07) & 1)) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF5 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (!Item.isCentreOn(*(arg_06), local_0B)) { + local_18 = (1 + local_18); + } + /* loopnext */ + } + local_04 = 1; + while (local_04 > local_18) { + local_0B = Item.getEtherealTop(); + local_04 = (1 + local_04); + } + } + /* bit_not */ + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function elevat_slot_25() /* entry=454 class_id=0x0A08 slot=0x25 */ +{ + set_info(0x0001, *(arg_06)); + local_04 = 5; + /* loop_selector local_02 in nearby_items(shape=0x02DE, origin=arg_06) */ + while (!condition) { + FREE.slot_48((Item.getX(arg_06) - Item.getX(local_02))); + local_06 = retval; + FREE.slot_48((Item.getY(arg_06) - Item.getY(local_02))); + local_08 = retval; + if ((local_06 >= 2) && (local_08 < 2)) { + if ((Item.getStatus(local_02) & 0x1000) == 0) { + if (Item.getFrame(local_02) == 0) { + local_03 = 1; + while (local_03 > local_04) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_03 = (1 + local_03); + } + } + else { + local_03 = local_04; + while (local_03 <= 0) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_03 = (local_03 - 1); + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* bit_not */ + } + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/ELEVATOR.unk b/USECODE/REGRET/ELEVATOR.unk new file mode 100644 index 0000000..04f4f09 --- /dev/null +++ b/USECODE/REGRET/ELEVATOR.unk @@ -0,0 +1,363 @@ + +/* synthesized appendix for ELEVATOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function elevator_gotHit() /* entry=83 class_id=0x0190 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A >= 0x0100) { + local_02 = arg_0A; + NPC.slot_2A(local_02); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 2, local_02); + suspend; + while (Actor.isDead(local_02)) { + } + } + } + if ((arg_0A == 1) || (Ultima8Engine.getUnkCrusaderFlag() != 1)) { + return; + } + else if (Item.getQLo(arg_06) >= 100) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x4 target=[SP+04h] */ + suspend; + return; + } + else { + /* pop_global global_id=0x9 size=0x1 */ + FREE.slot_3C(0x0220, 0); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + else { + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + local_04 = arg_0A; + local_06 = Item.getQLo(arg_06); + local_08 = Item.getQHi(arg_06); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (local_04 == *(arg_06)) { + if (!Item.isNpc(local_04)) { + if (local_04 == 1) { + local_0A = local_04; + } + } + else { + local_0C = Item.getShape(local_04); + } + } + /* loopnext */ + } + set_info(0x0220, 0); + if (local_08 == 0) { + } + else { + local_08 = (local_08 - 1); + } + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + else if (local_06 >= 0x00C8) { + /* global_address global_id=0x1E */ + spawn ELEVATOR.slot_20(Actor.getMap(pid, local_06), local_08, arg_06); + suspend; + } + else if (local_06 == 0x00C8) { + spawn ELEVATOR.slot_20(pid, 18, 24, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00C9) { + spawn ELEVATOR.slot_20(pid, 0x00C9, 5, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CA) { + spawn ELEVATOR.slot_20(pid, 0x00CA, 10, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CB) { + spawn ELEVATOR.slot_20(pid, 0x00CB, 10, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CC) { + spawn ELEVATOR.slot_20(pid, 0x00CC, 2, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CD) { + spawn ELEVATOR.slot_20(pid, 0x00CD, 8, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CE) { + spawn ELEVATOR.slot_20(pid, 0x00CE, 6, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00CF) { + spawn ELEVATOR.slot_20(pid, 0x00CF, 16, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00D0) { + spawn ELEVATOR.slot_20(pid, 0x00D0, 18, local_08, arg_06); + suspend; + } + else if (local_06 == 0x00D1) { + spawn ELEVATOR.slot_20(pid, 99, 14, local_08, arg_06); + suspend; + } + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + FREE.slot_3C(0x0220, 0); + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function elevator_release() /* entry=83 class_id=0x0190 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + local_02 = Item.getSurfaceWeight(arg_06); + if (local_02 == 0) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + /* loop_selector local_04 in selector_0x42(arg0=0x0289, arg1=0x01C7, arg2=(10 * 32), origin=global[0x001E]) */ + while (!condition) { + local_06 = local_04; + spawn DOOR.slot_21(pid, 2, local_06); + suspend; + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function elevator_slot_20() /* entry=83 class_id=0x0190 slot=0x20 */ +{ + set_info(1, 0); + /* loop_selector local_06 in selector_0x42(arg0=0x0289, arg1=0x01C7, arg2=(10 * 32), origin=arg_06) */ + while (!condition) { + local_0A = local_06; + /* loopnext */ + } + if (local_0A) { + return; + } + else { + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + else if (Item.getShape(local_0A) == 0x0289) { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + } + else { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn DOOR.slot_21(pid, 2, local_0A); + suspend; + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + /* loop_selector local_06 in selector_0x42(arg0=0x01C4, arg1=0x0186, arg2=(20 * 32), origin=arg_06) */ + while (!condition) { + local_02 = local_06; + /* loopnext */ + } + for local_06 in selector_0x42(arg0=0x01C5, arg1=0x0184, arg2=(20 * 32), origin=arg_06) { + local_04 = local_06; + /* loopnext */ + } + if (!(local_02 && local_04)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + while (!Intrinsic0035(0x00F4)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!arg_0A) { + local_08 = 5; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + else { + local_08 = 1; + while (local_08 > 4) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + } + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + suspend; + spawn FREE.slot_45(pid, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (!Actor.getMap(arg_0C)) { + local_0D = 1; + FREE.slot_22(); + if (arg_0C == 5) { + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + if (arg_0C == 6) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn FLICTEST.slot_20(pid, 19, local_0F); + suspend; + } + } + if ((arg_0C == 2) && (arg_0E != 0x0082)) { + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + } + if ((arg_0C == 16) && (arg_0E != 100)) { + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + spawn FREE.slot_2A(0x00000000); + } + if ((arg_0C == 14) && (arg_0E != 0x00C7)) { + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + suspend; + if ((arg_0C == 14) && (arg_0E != 0x00C7)) { + /* pop_global global_id=0x17 size=0x1 */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + /* global_address global_id=0x1E */ + } + if (!local_0D) { + FREE.slot_23(); + /* global_address global_id=0x1E */ + } + for local_06 in nearby_items(shape=0x0190, origin=global[0x001E]) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + FREE.slot_3C(12, local_06); + /* loopnext */ + } + if (arg_0E == 18) { + /* global_address global_id=0x1E */ + suspend; + } + suspend; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + /* loop_selector local_06 in selector_0x42(arg0=0x01C4, arg1=0x0186, arg2=(10 * 32), origin=global[0x001E]) */ + while (!condition) { + local_02 = local_06; + /* loopnext */ + } + for local_06 in selector_0x42(arg0=0x01C5, arg1=0x0184, arg2=(10 * 32), origin=global[0x001E]) { + local_04 = local_06; + /* loopnext */ + } + if (!(local_02 && local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + while (!Intrinsic0035(0x00F2)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!arg_0A) { + local_08 = 1; + while (local_08 > 4) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + } + else { + local_08 = 0; + while (local_08 > 3) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* loop_selector local_06 in selector_0x42(arg0=0x018D, arg1=0x01C6, arg2=(10 * 32), origin=global[0x001E]) */ + while (!condition) { + local_0A = local_06; + spawn DOOR.slot_21(pid, 1, local_0A); + suspend; + /* loopnext */ + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + } + return; +} diff --git a/USECODE/REGRET/ELEVPLAT.unk b/USECODE/REGRET/ELEVPLAT.unk new file mode 100644 index 0000000..b383ff5 --- /dev/null +++ b/USECODE/REGRET/ELEVPLAT.unk @@ -0,0 +1,74 @@ + +/* synthesized appendix for ELEVPLAT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function elevplat_hit() /* entry=60 class_id=0x012F slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + local_02 = arg_0A; + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function elevplat_equip() /* entry=60 class_id=0x012F slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + /* pop_global global_id=0x0 size=0x1 */ + local_02 = Item.getZ(arg_06); + if ((arg_0A < 0x00A0) && (arg_0A < 0x00FF)) { + /* pop_global global_id=0x0 size=0x1 */ + arg_0A = (arg_0A - 0x00A0); + } + if (arg_0A == 0x00FF) { + local_04 = Item.getQHi(arg_06); + if ((local_04 == 88) || ((local_02 + 1) <= local_04)) { + } + } + else if (!arg_0A) { + } + spawn ELEVAT.slot_20(pid, arg_06); + suspend; + if (global[0x0000] == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFA string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function elevplat_enterFastArea() /* entry=60 class_id=0x012F slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getQuality(arg_06) == 101) { + suspend; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function elevplat_leaveFastArea() /* entry=60 class_id=0x012F slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/ELITE.unk b/USECODE/REGRET/ELITE.unk new file mode 100644 index 0000000..de5963a --- /dev/null +++ b/USECODE/REGRET/ELITE.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for ELITE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function elite_calledFromAnim() /* entry=279 class_id=0x04D1 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/ELY.unk b/USECODE/REGRET/ELY.unk new file mode 100644 index 0000000..8139e5e --- /dev/null +++ b/USECODE/REGRET/ELY.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for ELY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function ely_enterFastArea() /* entry=186 class_id=0x035D slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + + block_00DF: + while (true) { + suspend; + local_02 = 0x0096; + while (local_02 > 0x00A1) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 0x008C, 0x00000000); + suspend; + local_02 = 0; + while (local_02 > 10) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + + block_0186: + return; + +} diff --git a/USECODE/REGRET/ENERGY.unk b/USECODE/REGRET/ENERGY.unk new file mode 100644 index 0000000..f5bb340 --- /dev/null +++ b/USECODE/REGRET/ENERGY.unk @@ -0,0 +1,56 @@ + +/* synthesized appendix for ENERGY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function energy_use() /* entry=341 class_id=0x0582 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + if (MainActor.getMaxEnergy() == 0x09C4) { + local_04 = 0x03E8; + } + else { + /* global_address global_id=0x1E */ + if (MainActor.getMaxEnergy() == 0x1388) { + local_04 = 0x07D0; + } + else { + /* global_address global_id=0x1E */ + if (MainActor.getMaxEnergy() == 0x2710) { + local_04 = 0x0BB8; + } + else { + /* global_address global_id=0x1E */ + } + } + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (!MainActor.getMaxEnergy(Actor.getMana())) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + return; + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (!MainActor.getMaxEnergy((Actor.getMana() + local_04))) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_21(pid, 0x010D, 0x00000000); + suspend; + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_21(pid, 0x010D, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/ENFORCER.unk b/USECODE/REGRET/ENFORCER.unk new file mode 100644 index 0000000..d1cf299 --- /dev/null +++ b/USECODE/REGRET/ENFORCER.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for ENFORCER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function enforcer_calledFromAnim() /* entry=95 class_id=0x01B4 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/ESPACE.unk b/USECODE/REGRET/ESPACE.unk new file mode 100644 index 0000000..49c98e1 --- /dev/null +++ b/USECODE/REGRET/ESPACE.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for ESPACE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function espace_equip() /* entry=178 class_id=0x0336 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn BRIDGE.slot_20(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function espace_enterFastArea() /* entry=178 class_id=0x0336 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + return; + } + else { + local_02 = Item.getQLo(arg_06); + if (local_02 == 0) { + return; + } + else { + local_04 = Item.getQHi(arg_06); + if ((local_04 >= 1) || (local_04 > 127)) { + return; + } + else { + spawn BRIDGE.slot_26(pid, local_04, local_02, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/ESPACE2.unk b/USECODE/REGRET/ESPACE2.unk new file mode 100644 index 0000000..c97e36c --- /dev/null +++ b/USECODE/REGRET/ESPACE2.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for ESPACE2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function espace2_equip() /* entry=144 class_id=0x0290 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn BRIDGE.slot_20(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function espace2_enterFastArea() /* entry=144 class_id=0x0290 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + return; + } + else { + local_02 = Item.getQLo(arg_06); + if (local_02 == 0) { + return; + } + else { + local_04 = Item.getQHi(arg_06); + if ((local_04 >= 1) || (local_04 > 127)) { + return; + } + else { + spawn BRIDGE.slot_26(pid, local_04, local_02, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/EVENT.unk b/USECODE/REGRET/EVENT.unk new file mode 100644 index 0000000..738df79 --- /dev/null +++ b/USECODE/REGRET/EVENT.unk @@ -0,0 +1,1116 @@ + +/* synthesized appendix for EVENT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function event_equip() /* entry=188 class_id=0x0361 slot=0x0A */ +{ + entry: + set_info(0x0211, *(arg_06)); + process_exclude(); + local_1D = Item.getQLo(arg_06); + if (arg_0A != 0) goto block_0119; + + block_00F2: + /* global_address global_id=0x1E */ + goto block_218C; + + block_0119: + if (arg_0A != 1) goto block_01F7; + + block_0121: + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_0148: + /* global_address global_id=0x1E */ + local_1F = Camera.getX(); + local_21 = Camera.getY(); + local_23 = Item.getX(arg_06); + local_25 = Item.getY(arg_06); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + /* global_address global_id=0x1E */ + goto block_218C; + + block_01F7: + if (arg_0A != 2) goto block_028B; + + block_01FF: + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_0226: + spawn FREE.slot_46(pid, Item.getY(arg_06), Item.getX(arg_06), 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + goto block_218C; + + block_028B: + if (arg_0A != 3) goto block_02CD; + + block_0293: + spawn FREE.slot_47(pid, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + goto block_218C; + + block_02CD: + if (arg_0A != 5) goto block_02E4; + + block_02D5: + goto block_218C; + + block_02E4: + if (arg_0A != 6) goto block_02FB; + + block_02EC: + goto block_218C; + + block_02FB: + if (arg_0A != 7) goto block_0312; + + block_0303: + goto block_218C; + + block_0312: + if (arg_0A != 8) goto block_038A; + + block_031A: + local_0F = Item.getQHi(arg_06); + if (local_0F != 0) goto block_034C; + + block_032D: + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + goto block_0387; + + block_034C: + local_11 = Item.getQLo(arg_06); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + + block_0387: + goto block_218C; + + block_038A: + if (arg_0A != 9) goto block_0406; + + block_0392: + local_0F = Item.getQLo(arg_06); + /* loop_selector local_02 in nearby_items(family=1, origin=arg_06) */ + + block_03B4: + while (!condition) { + /* loopnext */ + } + + block_0401: + goto block_218C; + + block_0406: + if (arg_0A != 10) goto block_050F; + + block_040E: + for local_02 in nearby_items(shape=0x033A, origin=arg_06) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + if (Item.getFrame(local_02) == 0) { + local_04 = local_02; + } + } + /* loopnext */ + } + + block_0456: + for local_02 in nearby_items(shape=0x033A, origin=arg_06) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + if (Item.getFrame(local_02) == 1) { + local_06 = local_02; + } + } + /* loopnext */ + } + + block_04A0: + if (local_04 && local_06) goto block_050C; + + block_04AA: + local_0D = Item.getX(local_06); + local_0B = Item.getY(local_06); + local_09 = Item.getZ(local_06); + + block_050C: + goto block_218C; + + block_050F: + if (arg_0A != 15) goto block_0548; + + block_0517: + /* global_address global_id=0x1E */ + goto block_218C; + + block_0548: + if (arg_0A != 16) goto block_0583; + + block_0550: + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + goto block_218C; + + block_0583: + if (arg_0A != 22) goto block_05C9; + + block_058B: + for local_02 in nearby_items(family=1, origin=arg_06) { + if (Item.getQLo(local_02) == local_1D) { + ITEM.slot_25(0x1000, local_02); + } + /* loopnext */ + } + + block_05C4: + goto block_218C; + + block_05C9: + if (arg_0A != 23) goto block_0600; + + block_05D1: + for local_02 in nearby_items(family=1, origin=arg_06) { + ITEM.slot_25(0x1000, local_02); + /* loopnext */ + } + + block_05FB: + goto block_218C; + + block_0600: + if (arg_0A != 30) goto block_0627; + + block_0608: + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + goto block_218C; + + block_0627: + if (arg_0A != 45) goto block_0741; + + block_062F: + local_27 = (Item.getNpcNum(arg_06) * 5); + + block_063D: + while (!(1)) { + local_0F = 0; + FREE.slot_32((Item.getQHi(arg_06) != 0), *(arg_06), global[0x001E]); + if (retval <= 50) { + return; + } + for local_02 in nearby_items(family=6, origin=global[0x001E]) { + if (!Item.isNpc(local_02)) { + local_0F = (1 + local_0F); + } + /* loopnext */ + } + if (local_0F > 4) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + + block_073E: + goto block_218C; + + block_0741: + if (arg_0A != 46) goto block_0865; + + block_0749: + local_27 = (Item.getNpcNum(arg_06) * 5); + + block_0757: + while (!(1)) { + local_0F = 0; + FREE.slot_32((Item.getQHi(arg_06) != 0), *(arg_06), global[0x001E]); + if ((retval > 50) || (Item.isEntirelyOnScreen(arg_06) == 1)) { + return; + } + for local_02 in nearby_items(family=6, origin=global[0x001E]) { + if (local_02 >= 0x00FF) { + local_0F = (1 + local_0F); + } + /* loopnext */ + } + if (local_0F > 4) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + + block_0862: + goto block_218C; + + block_0865: + if (arg_0A != 47) goto block_0A0D; + + block_086D: + local_27 = Item.getNpcNum(arg_06); + local_11 = Item.getQHi(arg_06); + + block_0883: + while (!(1)) { + if (Item.getQHi(arg_06) == 1) { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, (local_27 * 3), 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, (local_27 * 3), 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + } + else if (Item.getQHi(arg_06) <= 1) { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + local_0F = (1 + local_0F); + } + } + else { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + return; + } + } + + block_0A0A: + goto block_218C; + + block_0A0D: + if (arg_0A != 48) goto block_0AE4; + + block_0A15: + local_27 = Item.getNpcNum(arg_06); + local_11 = Item.getQHi(arg_06); + local_0F = 0; + + block_0A2F: + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_0A7E: + local_0F = 0; + + block_0A82: + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_0AD4: + goto block_218C; + + block_0AE1: + goto block_218C; + + block_0AE4: + if (arg_0A != 49) goto block_0BE1; + + block_0AEC: + local_27 = Item.getNpcNum(arg_06); + local_11 = Item.getQHi(arg_06); + + block_0B02: + while (!(1)) { + if (!Item.getQHi(arg_06)) { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + local_0F = (1 + local_0F); + } + } + else { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + return; + } + } + + block_0BDE: + goto block_218C; + + block_0BE1: + if (arg_0A != 50) goto block_0C23; + + block_0BE9: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF8 string_bytes=0x1 loop_type=0x2 */ + + block_0BF8: + while (!condition) { + if (Item.getQLo(local_08) == 100) { + spawn DOOR.slot_20(pid, local_08); + suspend; + } + /* loopnext */ + } + + block_0C1E: + goto block_218C; + + block_0C23: + if (arg_0A != 51) goto block_0E2C; + + block_0C2B: + for local_02 in selector_0x42(arg0=0x01C4, arg1=0x0186, arg2=(30 * 32), origin=arg_06) { + local_29 = local_02; + /* loopnext */ + } + + block_0C4D: + for local_02 in selector_0x42(arg0=0x01C5, arg1=0x0184, arg2=(30 * 32), origin=arg_06) { + local_2B = local_02; + /* loopnext */ + } + + block_0C71: + if (local_29 && local_2B) goto block_0DAA; + + block_0C7B: + + block_0C86: + while (!Intrinsic0035(0x00F2, local_2B)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_0CAF: + if local_2D goto block_0D22; + + block_0CBF: + local_0F = 1; + + block_0CD7: + while (local_0F > 4) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_0D1F: + goto block_0D74; + + block_0D22: + local_0F = 0; + + block_0D26: + while (local_0F > 3) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_0D74: + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + + block_0DAA: + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in selector_0x42(arg0=0x018D, arg1=0x01C6, arg2=(30 * 32), origin=arg_06) */ + + block_0DF0: + while (!condition) { + local_08 = local_02; + spawn DOOR.slot_21(pid, 1, local_08); + suspend; + /* loopnext */ + } + + block_0E0F: + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + goto block_218C; + + block_0E2C: + if (arg_0A != 52) goto block_0EF5; + + block_0E34: + local_27 = (Item.getNpcNum(arg_06) * 5); + + block_0E42: + while (!(1)) { + for local_19 in nearby_items(family=6, origin=arg_06) { + if (!Item.isNpc(local_19)) { + if (Intrinsic000D(local_19) == Item.getQLo(arg_06)) { + if (Actor.isDead(local_19)) { + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + } + } + /* loopnext */ + } + return; + } + + block_0EF2: + goto block_218C; + + block_0EF5: + if (arg_0A != 53) goto block_0FBC; + + block_0EFD: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xE7 string_bytes=0xA loop_type=0x2 */ + + block_0F1A: + while (!condition) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), local_02); + suspend; + /* loopnext */ + } + + block_0FB7: + goto block_218C; + + block_0FBC: + if (arg_0A != 54) goto block_1004; + + block_0FC4: + for local_19 in nearby_items(shape=0x04C8, origin=arg_06) { + /* loopnext */ + } + + block_0FFF: + goto block_218C; + + block_1004: + if (arg_0A != 60) goto block_109D; + + block_100C: + for local_19 in nearby_items(shape=0x04C8, origin=arg_06) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + + block_1098: + goto block_218C; + + block_109D: + if (arg_0A != 61) goto block_1136; + + block_10A5: + for local_19 in nearby_items(shape=0x01CD, origin=arg_06) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + + block_1131: + goto block_218C; + + block_1136: + if (arg_0A != 62) goto block_11CF; + + block_113E: + for local_19 in nearby_items(shape=0x01CD, origin=arg_06) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + + block_11CA: + goto block_218C; + + block_11CF: + if (arg_0A != 75) goto block_1227; + + block_11D7: + for local_02 in nearby_items(family=6, origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + suspend; + } + /* loopnext */ + } + + block_1222: + goto block_218C; + + block_1227: + if (arg_0A != 80) goto block_12E1; + + block_122F: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + + block_124C: + while (!condition) { + /* loopnext */ + } + + block_125B: + for local_02 in nearby_items(shape=0x054E, origin=arg_06) { + /* loopnext */ + } + + block_12DC: + goto block_218C; + + block_12E1: + if (arg_0A != 85) goto block_13FB; + + block_12E9: + local_27 = (Item.getNpcNum(arg_06) * 5); + + block_12F7: + while (!(1)) { + local_0F = 0; + FREE.slot_32((Item.getQHi(arg_06) != 0), *(arg_06), global[0x001E]); + if (retval <= 50) { + return; + } + for local_02 in nearby_items(family=6, origin=global[0x001E]) { + if (!Item.isNpc(local_02)) { + local_0F = (1 + local_0F); + } + /* loopnext */ + } + if (local_0F > 4) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + + block_13F8: + goto block_218C; + + block_13FB: + if (arg_0A != 97) goto block_1473; + + block_1403: + /* global_address global_id=0x1E */ + + block_1427: + while (Ultima8Engine.moveKeyDownRecently()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_144A: + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + goto block_218C; + + block_1473: + if (arg_0A != 98) goto block_14A9; + + block_147B: + for local_02 in nearby_items(shape=0x0361, origin=arg_06) { + /* loopnext */ + } + + block_14A4: + goto block_218C; + + block_14A9: + if (arg_0A != 99) goto block_14DF; + + block_14B1: + for local_02 in nearby_items(shape=0x0361, origin=arg_06) { + /* loopnext */ + } + + block_14DA: + goto block_218C; + + block_14DF: + if (arg_0A != 100) goto block_1519; + + block_14E7: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + suspend; + goto block_218C; + + block_1519: + if (arg_0A != 120) goto block_15C6; + + block_1521: + local_2F = World.gameDifficulty(); + local_31 = Item.getQLo(arg_06); + if (local_2F != 1) goto block_1556; + + block_153B: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + goto block_15B6; + + block_1556: + if (local_2F != 2) goto block_1586; + + block_155E: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + goto block_15B6; + + block_1586: + if (local_2F >= 3) goto block_15B6; + + block_158E: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + goto block_15B6; + + block_15B6: + goto block_218C; + + block_15C3: + goto block_218C; + + block_15C6: + if (arg_0A != 125) goto block_168C; + + block_15CE: + local_33 = World.gameDifficulty(); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x49 */ + /* loop current_var=0xFE string_bytes=0x14 loop_type=0x2 */ + + block_1601: + while (!condition) { + /* loopnext */ + } + + block_1684: + goto block_218C; + + block_1689: + goto block_218C; + + block_168C: + if (arg_0A != 0x0091) goto block_17B7; + + block_1695: + local_27 = (Item.getNpcNum(arg_06) * 5); + local_15 = World.gameDifficulty(); + if (local_15 != 3) goto block_16B6; + + block_16B2: + local_15 = 4; + + block_16B6: + local_17 = ((Item.getQHi(arg_06) - 1) + local_15); + + block_16C7: + while (!(1)) { + local_0F = 0; + FREE.slot_32((local_17 != 0), *(arg_06), global[0x001E]); + if (retval <= 50) { + return; + } + for local_02 in nearby_items(family=6, origin=global[0x001E]) { + if (!Item.isNpc(local_02)) { + local_0F = (1 + local_0F); + } + /* loopnext */ + } + if (local_0F > 4) { + local_17 = (local_17 - 1); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + + block_17B4: + goto block_218C; + + block_17B7: + if (arg_0A != 0x0092) goto block_18EC; + + block_17C0: + local_27 = (Item.getNpcNum(arg_06) * 5); + local_15 = World.gameDifficulty(); + if (local_15 != 3) goto block_17E1; + + block_17DD: + local_15 = 4; + + block_17E1: + local_17 = ((Item.getQHi(arg_06) - 1) + local_15); + + block_17F2: + while (!(1)) { + local_0F = 0; + FREE.slot_32((local_17 != 0), *(arg_06), global[0x001E]); + if ((retval > 50) || (Item.isEntirelyOnScreen(arg_06) == 1)) { + return; + } + for local_02 in nearby_items(family=6, origin=global[0x001E]) { + if (local_02 >= 0x00FF) { + local_0F = (1 + local_0F); + } + /* loopnext */ + } + if (local_0F > 4) { + local_17 = (local_17 - 1); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + + block_18E9: + goto block_218C; + + block_18EC: + if (arg_0A != 0x0094) goto block_19D5; + + block_18F5: + local_27 = Item.getNpcNum(arg_06); + local_11 = (Item.getQHi(arg_06) + 1); + local_13 = Item.getQLo(arg_06); + local_0F = local_13; + + block_191D: + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_196C: + local_0F = local_13; + + block_1970: + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + + block_19C5: + goto block_218C; + + block_19D2: + goto block_218C; + + block_19D5: + if (arg_0A != 0x0095) goto block_1AD3; + + block_19DE: + local_27 = Item.getNpcNum(arg_06); + local_11 = Item.getQHi(arg_06); + + block_19F4: + while (!(1)) { + if (!Item.getQHi(arg_06)) { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + local_0F = (1 + local_0F); + } + } + else { + local_0F = 1; + while (local_0F > local_11) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, local_27, 0x00000000); + suspend; + local_0F = (1 + local_0F); + } + return; + } + } + + block_1AD0: + goto block_218C; + + block_1AD3: + if (arg_0A != 0x0096) goto block_1AF7; + + block_1ADC: + suspend; + goto block_218C; + + block_1AF7: + if (arg_0A != 0x00C8) goto block_1F2E; + + block_1B00: + for local_02 in selector_0x42(arg0=0x028C, arg1=0x05AC, arg2=(32 * 32), origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getQHi(local_02) <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + /* loopnext */ + } + + block_1BCD: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4B */ + /* loop current_var=0xFE string_bytes=0x18 loop_type=0x2 */ + + block_1C01: + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getQHi(local_02) <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + /* loopnext */ + } + + block_1CB7: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFE string_bytes=0x12 loop_type=0x2 */ + + block_1CE2: + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getQHi(local_02) <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + /* loopnext */ + } + + block_1D6E: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + + block_1D8D: + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + ITEM.slot_26(0x1000, local_02); + if (!retval) { + ITEM.slot_25(0x1000, local_02); + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + /* loopnext */ + } + + block_1E3C: + for local_02 in selector_0x42(arg0=0x019A, arg1=0x0196, arg2=(32 * 32), origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getQHi(local_02) <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + /* loopnext */ + } + + block_1F29: + goto block_218C; + + block_1F2E: + if (arg_0A != 0x00C9) goto block_1F7D; + + block_1F37: + local_35 = Item.getQHi(arg_06); + if (local_35 < 4) goto block_1F5E; + + block_1F4A: + local_35 = (1 + local_35); + goto block_1F7A; + + block_1F5E: + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + + block_1F7A: + goto block_218C; + + block_1F7D: + if (arg_0A != 0x00CA) goto block_1FCB; + + block_1F86: + for local_02 in nearby_items(family=1, origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + ITEM.slot_25(0x1000, local_02); + } + /* loopnext */ + } + + block_1FC6: + goto block_218C; + + block_1FCB: + if (arg_0A != 0x00CF) goto block_2081; + + block_1FD4: + for local_02 in nearby_items(family=6, origin=arg_06) { + if (local_02 >= 0x0100) { + local_1B = local_02; + if ((local_1B == World.getControlledNPCNum()) && (local_1B != 1)) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn ITEM.slot_2A(pid, 0, 2, local_1B); + suspend; + while (Actor.isDead(local_1B)) { + } + } + } + /* loopnext */ + } + + block_207C: + goto block_218C; + + block_2081: + if (arg_0A != 0x00D2) goto block_218C; + + block_208A: + /* loop_selector local_02 in selector_0x42(arg0=0x05BA, arg1=0x05E6, arg2=(5 * 32), origin=arg_06) */ + + block_20A1: + if condition goto block_2187; + + block_20A4: + ITEM.slot_24(2, local_1B); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + + block_2153: + while (World.getControlledNPCNum() == 1) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_2178: + goto block_2187; + + block_2183: + /* loopnext */ + goto block_20A1; + + block_2187: + goto block_218C; + + block_218C: + return; + +} diff --git a/USECODE/REGRET/EWALLEW.unk b/USECODE/REGRET/EWALLEW.unk new file mode 100644 index 0000000..852a1bf --- /dev/null +++ b/USECODE/REGRET/EWALLEW.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for EWALLEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function ewallew_unequip() /* entry=328 class_id=0x0565 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function ewallew_enterFastArea() /* entry=328 class_id=0x0565 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function ewallew_avatarStoleSomething() /* entry=328 class_id=0x0565 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/EWALLNS.unk b/USECODE/REGRET/EWALLNS.unk new file mode 100644 index 0000000..4b8e587 --- /dev/null +++ b/USECODE/REGRET/EWALLNS.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for EWALLNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function ewallns_unequip() /* entry=327 class_id=0x0564 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function ewallns_enterFastArea() /* entry=327 class_id=0x0564 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function ewallns_avatarStoleSomething() /* entry=327 class_id=0x0564 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/EYECAMEW.unk b/USECODE/REGRET/EYECAMEW.unk new file mode 100644 index 0000000..a491724 --- /dev/null +++ b/USECODE/REGRET/EYECAMEW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for EYECAMEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function eyecamew_gotHit() /* entry=136 class_id=0x0260 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function eyecamew_equip() /* entry=136 class_id=0x0260 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function eyecamew_unequip() /* entry=136 class_id=0x0260 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function eyecamew_enterFastArea() /* entry=136 class_id=0x0260 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function eyecamew_leaveFastArea() /* entry=136 class_id=0x0260 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/EYECAMNS.unk b/USECODE/REGRET/EYECAMNS.unk new file mode 100644 index 0000000..2c3ab90 --- /dev/null +++ b/USECODE/REGRET/EYECAMNS.unk @@ -0,0 +1,69 @@ + +/* synthesized appendix for EYECAMNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function eyecamns_gotHit() /* entry=135 class_id=0x025F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* bit_not */ + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function eyecamns_equip() /* entry=135 class_id=0x025F slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function eyecamns_unequip() /* entry=135 class_id=0x025F slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function eyecamns_enterFastArea() /* entry=135 class_id=0x025F slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function eyecamns_leaveFastArea() /* entry=135 class_id=0x025F slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/FADE.unk b/USECODE/REGRET/FADE.unk new file mode 100644 index 0000000..07539d8 --- /dev/null +++ b/USECODE/REGRET/FADE.unk @@ -0,0 +1,268 @@ + +/* synthesized appendix for FADE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function fade_equip() /* entry=296 class_id=0x04FC slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_1B = Item.getQLo(arg_06); + if (arg_0A == 1) { + spawn FREE.slot_44(0x00000000); + spawn FREE.slot_3B(pid, 0x03E8, 0x00000000); + suspend; + spawn FADE.slot_20(0x00000000); + return; + } + else if (arg_0A == 3) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* pop_global global_id=0x13 size=0x1 */ + spawn FREE.slot_3B(1, pid, 60, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + else if (arg_0A == 5) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_44(0x00000000); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* pop_global global_id=0x14 size=0x1 */ + spawn FREE.slot_3B(1, pid, 2, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + else if (arg_0A == 8) { + /* pop_global global_id=0x18 size=0x1 */ + spawn FREE.slot_21(1, pid, 0x017A, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + else if (arg_0A == 0x00D2) { + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in nearby_items(shape=0x053A, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == 1) { + FREE.slot_32(local_02, global[0x001E]); + while ((retval > 3) && (local_0F == 10)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn NPC.slot_22(Item.getDirFromTo16(Item.getX(pid, 1, Item.getY((Item.getY(local_02) - 32), (Item.getX(local_02) - 16))))); + suspend; + local_0F = (1 + local_0F); + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in selector_0x42(arg0=0x04D9, arg1=0x03AC, arg2=(32 * 32), origin=arg_06) */ + while (!condition) { + if (Item.getShape(local_02) == 0x04D9) { + local_27 = local_02; + } + if (Item.getShape(local_02) == 0x03AC) { + local_29 = local_02; + } + /* loopnext */ + } + if (!local_27) { + suspend; + suspend; + suspend; + suspend; + suspend; + } + if (!local_29) { + suspend; + suspend; + suspend; + suspend; + suspend; + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* loop_selector local_02 in nearby_items(shape=0x01DB, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (arg_0A == 0x00D3) { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + /* loop_selector local_02 in selector_0x42(arg0=0x04D9, arg1=0x03AC, arg2=(32 * 32), origin=arg_06) */ + while (!condition) { + if (Item.getShape(local_02) == 0x04D9) { + local_27 = local_02; + } + if (Item.getShape(local_02) == 0x03AC) { + local_29 = local_02; + } + /* loopnext */ + } + if (!local_27) { + suspend; + suspend; + suspend; + suspend; + suspend; + suspend; + spawn NPC.slot_24(pid, local_27); + suspend; + } + if (!local_29) { + suspend; + suspend; + suspend; + suspend; + suspend; + suspend; + suspend; + suspend; + suspend; + spawn NPC.slot_24(pid, local_29); + suspend; + } + for local_02 in nearby_items(shape=0x03AD, origin=arg_06) { + if (Item.getQLo(local_02) == 78) { + local_08 = local_02; + spawn DOOR.slot_21(pid, 0, local_08); + suspend; + } + /* loopnext */ + } + for local_02 in nearby_items(shape=0x01EE, origin=arg_06) { + if (Item.getQLo(local_02) == 0x0084) { + local_08 = local_02; + spawn DOOR.slot_21(pid, 0, local_08); + suspend; + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* pop_global global_id=0x15 size=0x1 */ + spawn TRIGGER.slot_20(1, pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_44(0x00000000); + return; + } + else if (arg_0A == 0x00DE) { + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + for local_02 in nearby_items(shape=0x053A, origin=arg_06) { + if (Item.getQLo(local_02) == 1) { + FREE.slot_32(local_02, global[0x001E]); + while ((retval > 3) && (local_0F == 10)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn NPC.slot_22(Item.getDirFromTo16(Item.getX(pid, 1, Item.getY((Item.getY(local_02) - 32), (Item.getX(local_02) - 16))))); + suspend; + local_0F = (1 + local_0F); + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_08 in nearby_items(shape=0x05A4, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_08) == 2) { + spawn DOOR.slot_21(pid, 2, local_08); + suspend; + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x01E5, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x01E6, 0x00000000); + suspend; + /* loop_selector local_19 in nearby_items(shape=0x05B1, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + /* global_address global_id=0x1E */ + suspend; + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function fade_slot_20() /* entry=296 class_id=0x04FC slot=0x20 */ +{ + set_info(0x0223, 0); + while (!(1)) { + while (!(global[0x000E])) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + local_02 = 1; + while (local_02 > 3) { + while (!AudioProcess.isSFXPlaying(0x0118)) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + local_02 = (1 + local_02); + } + while (!(global[0x000E])) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 0x0320, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/FALLINGC.unk b/USECODE/REGRET/FALLINGC.unk new file mode 100644 index 0000000..3052638 --- /dev/null +++ b/USECODE/REGRET/FALLINGC.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for FALLINGC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fallingc_gotHit() /* entry=18 class_id=0x005F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (Item.getShape(local_02) == 95) { + } + else if ((Item.getFamily(local_02) == 6) && (Item.isNpc(local_02) != 0)) { + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/FFFLOOR.unk b/USECODE/REGRET/FFFLOOR.unk new file mode 100644 index 0000000..bb5c074 --- /dev/null +++ b/USECODE/REGRET/FFFLOOR.unk @@ -0,0 +1,103 @@ + +/* synthesized appendix for FFFLOOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fffloor_gotHit() /* entry=64 class_id=0x0135 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (arg_0A > 0x0100)) { + return; + } + else { + local_02 = arg_0A; + while (!Item.isOn(*(arg_06), local_02)) { + if (Item.getFrame(arg_06) == 1) { + return; + } + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_02); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function fffloor_equip() /* entry=64 class_id=0x0135 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else if (arg_0A == 1) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + /* bit_not */ + return; + } + else if (arg_0A == 29) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_04 in nearby_items(shape=0x0135, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (arg_0A == 30) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=17, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + /* loop_selector local_04 in nearby_items(shape=0x0135, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (arg_0A == 31) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function fffloor_unequip() /* entry=64 class_id=0x0135 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + return; + } + else { + for local_02 in nearby_items(family=6, origin=arg_06) { + if (Item.isNpc(local_02) == 1) { + if (!Item.overlaps(local_02, arg_06)) { + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_02); + suspend; + } + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/FFFLOOR2.unk b/USECODE/REGRET/FFFLOOR2.unk new file mode 100644 index 0000000..bc6a7cf --- /dev/null +++ b/USECODE/REGRET/FFFLOOR2.unk @@ -0,0 +1,101 @@ + +/* synthesized appendix for FFFLOOR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fffloor2_gotHit() /* entry=104 class_id=0x01C8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 1) || (arg_0A > 0x0100)) { + return; + } + else { + local_02 = arg_0A; + while (!Item.isOn(*(arg_06), local_02)) { + if (Item.getFrame(arg_06) == 1) { + return; + } + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_02); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function fffloor2_equip() /* entry=104 class_id=0x01C8 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + return; + } + else if (arg_0A == 1) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + /* bit_not */ + return; + } + else if (arg_0A == 29) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_04 in nearby_items(shape=0x0135, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (arg_0A == 30) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=17, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_04 in nearby_items(shape=0x01C8, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (arg_0A == 31) { + for local_02 in nearby_items(shape=17, origin=arg_06) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function fffloor2_unequip() /* entry=104 class_id=0x01C8 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + return; + } + else { + for local_02 in nearby_items(family=6, origin=arg_06) { + if (Item.isNpc(local_02) == 1) { + if (!Item.overlaps(local_02, arg_06)) { + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_02); + suspend; + } + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/FIREEGG.unk b/USECODE/REGRET/FIREEGG.unk new file mode 100644 index 0000000..fc23ec7 --- /dev/null +++ b/USECODE/REGRET/FIREEGG.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for FIREEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function fireegg_hatch() /* entry=423 class_id=0x0904 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0403, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == local_04) { + suspend; + spawn FREE.slot_3B(pid, 0x015E, 0x00000000); + suspend; + suspend; + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/FLAME1.unk b/USECODE/REGRET/FLAME1.unk new file mode 100644 index 0000000..7a8ca77 --- /dev/null +++ b/USECODE/REGRET/FLAME1.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for FLAME1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function flame1_gotHit() /* entry=240 class_id=0x043B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_23(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function flame1_enterFastArea() /* entry=240 class_id=0x043B slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/FLAME2.unk b/USECODE/REGRET/FLAME2.unk new file mode 100644 index 0000000..3f25341 --- /dev/null +++ b/USECODE/REGRET/FLAME2.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for FLAME2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function flame2_gotHit() /* entry=298 class_id=0x050A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_23(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function flame2_enterFastArea() /* entry=298 class_id=0x050A slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/FLAMEBOX.unk b/USECODE/REGRET/FLAMEBOX.unk new file mode 100644 index 0000000..4855330 --- /dev/null +++ b/USECODE/REGRET/FLAMEBOX.unk @@ -0,0 +1,109 @@ + +/* synthesized appendix for FLAMEBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function flamebox_equip() /* entry=225 class_id=0x0403 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (!(Item.getStatus(local_02) & 0x1000)) { + } + else if ((Item.getShape(local_02) == 0x043B) || (Item.getShape(local_02) != 0x043A)) { + spawn FLAMEBOX.slot_21(0, local_02, arg_06); + } + else if ((Item.getShape(local_02) == 0x050A) || (Item.getShape(local_02) != 0x0518)) { + spawn FLAMEBOX.slot_21(1, local_02, arg_06); + } + } + /* loopnext */ + } + return; + } + else if (arg_0A == 1) { + for local_02 in selector_0x42(arg0=0x0438, arg1=0x0439, arg2=(32 * 32), origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getShape(local_02) == 0x0439) { + spawn FLAMEBOX.slot_20(0, local_04, arg_06); + } + else if (Item.getShape(local_02) == 0x0438) { + spawn FLAMEBOX.slot_20(1, local_04, arg_06); + } + } + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function flamebox_slot_20() /* entry=225 class_id=0x0403 slot=0x20 */ +{ + set_info(0x00F0, *(arg_06)); + if (!Intrinsic006A()) { + while ((Item.getFrame(arg_0A) == 5) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + ITEM.slot_24(4, arg_0A); + spawn STEAM.slot_22(arg_0A); + if (arg_0C == 0) { + if (!Intrinsic006A()) { + } + } + else if (arg_0C == 1) { + if (!Intrinsic006A()) { + } + } + ITEM.slot_24(4, local_04); + spawn STEAM.slot_22(local_04); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function flamebox_slot_21() /* entry=225 class_id=0x0403 slot=0x21 */ +{ + set_info(1, *(arg_06)); + ITEM.slot_24(0x1000, arg_0A); + if (!Intrinsic006A()) { + if ((Item.getShape(arg_0A) == 0x043A) || (Item.getShape(arg_0A) != 0x0518)) { + while ((Item.getFrame(arg_0A) == 5) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + while ((Item.getFrame(arg_0A) == 27) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + } + if (arg_0C == 0) { + local_06 = 0x0439; + } + else if (arg_0C == 1) { + local_06 = 0x0438; + } + ITEM.slot_24(0x1000, local_04); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_04) == 4) && (Item.isEntirelyOnScreen(local_04) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + ITEM.slot_25(0x1000, local_04); + return; +} diff --git a/USECODE/REGRET/FLAMELP.unk b/USECODE/REGRET/FLAMELP.unk new file mode 100644 index 0000000..8e727ce --- /dev/null +++ b/USECODE/REGRET/FLAMELP.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for FLAMELP */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function flamelp_gotHit() /* entry=300 class_id=0x0516 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_23(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function flamelp_enterFastArea() /* entry=300 class_id=0x0516 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/FLICTEST.unk b/USECODE/REGRET/FLICTEST.unk new file mode 100644 index 0000000..e8e355c --- /dev/null +++ b/USECODE/REGRET/FLICTEST.unk @@ -0,0 +1,526 @@ + +/* synthesized appendix for FLICTEST */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function flictest_slot_20() /* entry=456 class_id=0x0A0A slot=0x20 */ +{ + set_info(1, *(arg_06)); + if (arg_0A == 1) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 2) { + /* pop_global global_id=0x11 size=0x1 */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 3) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 4) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 5) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 6) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 7) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 8) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 9) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 10) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 11) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 12) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 13) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 14) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 15) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 16) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 17) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 18) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 19) { + if (World.gameDifficulty() == 1) { + if (global[0x001B] >= 4) { + /* 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 (World.gameDifficulty() == 2) { + if (global[0x001B] >= 5) { + /* 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 ((World.gameDifficulty() == 3) || (World.gameDifficulty() != 4)) { + if (global[0x001B] >= 7) { + /* 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] */ + } + } + return; + } + else if (arg_0A == 20) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 21) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 22) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 23) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 24) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 25) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 26) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 27) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 28) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 29) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 30) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 31) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 32) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 33) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 34) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 35) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 36) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 37) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 38) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 39) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 40) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 41) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 42) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 43) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 44) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 45) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 46) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 47) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 48) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 49) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 50) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 51) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 52) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 53) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 55) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 56) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 57) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 58) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 59) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 60) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 61) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 62) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 63) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 64) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 65) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 66) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 67) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 68) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 69) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 70) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 71) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 72) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 73) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 74) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 75) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 76) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 77) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 78) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 79) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 80) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 81) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 82) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 83) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 84) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 85) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 86) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 87) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 88) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 89) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 90) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 91) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 92) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 93) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 94) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 95) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 96) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (arg_0A == 97) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function flictest_slot_21() /* entry=456 class_id=0x0A0A slot=0x21 */ +{ + set_info(1, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/FLOAT.unk b/USECODE/REGRET/FLOAT.unk new file mode 100644 index 0000000..6d106c1 --- /dev/null +++ b/USECODE/REGRET/FLOAT.unk @@ -0,0 +1,81 @@ + +/* synthesized appendix for FLOAT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function float_gotHit() /* entry=339 class_id=0x057F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_08 = retval; + if (!local_08) { + if (local_08 == 4) { + return; + } + else { + for local_02 in nearby_items(shape=0x01F5, origin=arg_06) { + if ((Item.getX(local_02) == Item.getX(arg_06)) && (Item.getY(local_02) != Item.getY(arg_06))) { + return; + } + /* loopnext */ + } + } + return; + } + else { + local_0A = arg_0A; + if (((arg_0A < 0x00FF) && (arg_0A == World.getControlledNPCNum())) && (Item.isEntirelyOnScreen(arg_06) != 0)) { + return; + } + else { + for local_02 in nearby_items(shape=0x01F5, origin=arg_06) { + if ((Item.getX(local_02) == Item.getX(arg_06)) && (Item.getY(local_02) != Item.getY(arg_06))) { + return; + } + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function float_equip() /* entry=339 class_id=0x057F slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + for local_02 in nearby_items(shape=0x01F5, origin=arg_06) { + if ((Item.getX(local_02) == Item.getX(arg_06)) && (Item.getY(local_02) != Item.getY(arg_06))) { + return; + } + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function float_unequip() /* entry=339 class_id=0x057F slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn FLOAT.enterFastArea(pid, arg_06); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function float_enterFastArea() /* entry=339 class_id=0x057F slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/FLOOR1.unk b/USECODE/REGRET/FLOOR1.unk new file mode 100644 index 0000000..da12519 --- /dev/null +++ b/USECODE/REGRET/FLOOR1.unk @@ -0,0 +1,173 @@ + +/* synthesized appendix for FLOOR1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function floor1_enterFastArea() /* entry=421 class_id=0x0902 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + local_02 = 0; + local_08 = 0; + local_0A = 0x0100; + local_0C = 0; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_16 = Egg.getEggId(arg_06); + local_14 = (local_16 * 10); + if (local_14 != 0) goto block_0125; + + block_0121: + local_14 = 5; + + block_0125: + for local_04 in selector_0x42(arg0=0x0135, arg1=0x01C8, arg2=(35 * 32), origin=arg_06) { + local_12 = 1; + local_0C = Item.getQLo(local_04); + if ((local_0C > 0) && (local_0C >= 0x00FA)) { + if (local_08 >= local_0C) { + local_08 = local_0C; + } + if (local_0A <= local_0C) { + local_0A = local_0C; + } + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xF2 target=[BP-0Eh] */ + local_0E = local_04; + } + /* loopnext */ + } + + block_0190: + if (!local_12) goto block_019B; + + block_0198: + goto block_0366; + + block_019B: + if 1 goto block_0366; + + block_01A0: + local_10 = 0; + local_02 = local_0A; + + block_01A8: + if (local_02 <= local_08) goto block_02E9; + + block_01B0: + + block_01B6: + foreach_list local_04 -> block_024E; + + block_01BB: + if (Item.getStatus(local_04) & 0x1000) goto block_01D2; + + block_01CB: + local_10 = 1; + goto block_02E9; + + block_01D2: + if (Item.getQLo(local_04) != local_02) goto block_024B; + + block_01E1: + if (!Intrinsic0035(112, arg_06)) goto block_0204; + + block_01FA: + + block_0204: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + + block_020F: + while (!condition) { + if (Item.isNpc(local_06) == 1) { + local_18 = local_06; + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_18); + suspend; + } + /* loopnext */ + } + + block_0249: + + block_024B: + goto block_01B6; + + block_024E: + if (local_10 != 1) goto block_0259; + + block_0256: + goto block_02E9; + + block_0259: + spawn FREE.slot_3B(pid, local_14, 0x00000000); + suspend; + + block_0270: + while (Egg.getEggXRange(arg_06) <= 0) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + + block_0299: + + block_029F: + while (true) { + foreach_list local_04 -> block_02C8; + } + + block_02C8: + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_02 = (1 + local_02); + goto block_01A8; + + block_02E9: + if (local_10 != 1) goto block_0363; + + block_02F1: + + block_02F7: + while (true) { + foreach_list local_04 -> block_031B; + } + + block_031B: + if (local_10 != 1) goto block_0363; + + block_0323: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + local_10 = 0; + + block_0344: + while (true) { + foreach_list local_04 -> block_0360; + if (!(Item.getStatus(local_04) & 0x1000)) { + local_10 = 1; + } + } + + block_0360: + goto block_031B; + + block_0363: + goto block_019B; + + block_0366: + /* free_local_list bp_offset=0xF2 target=[BP-0Eh] */ + return; + +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function floor1_leaveFastArea() /* entry=421 class_id=0x0902 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/FLORMINE.unk b/USECODE/REGRET/FLORMINE.unk new file mode 100644 index 0000000..f0cb926 --- /dev/null +++ b/USECODE/REGRET/FLORMINE.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for FLORMINE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function flormine_cachein() /* entry=149 class_id=0x029F slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function flormine_gotHit() /* entry=149 class_id=0x029F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (!local_02) { + if (local_02 == 4) { + return; + } + return; + } + else { + local_04 = arg_0A; + if (!Item.isOn(*(arg_06), local_04)) { + if (((arg_0A < 0x00FF) && (arg_0A == World.getControlledNPCNum())) && (Item.isEntirelyOnScreen(arg_06) != 0)) { + return; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function flormine_equip() /* entry=149 class_id=0x029F slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/FREE.unk b/USECODE/REGRET/FREE.unk new file mode 100644 index 0000000..b3196e0 --- /dev/null +++ b/USECODE/REGRET/FREE.unk @@ -0,0 +1,1243 @@ + +/* synthesized appendix for FREE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function free_slot_20() /* entry=475 class_id=0x0A1D slot=0x20 */ +{ + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function free_slot_21() /* entry=475 class_id=0x0A1D slot=0x21 */ +{ + set_info(1, 0); + local_02 = 0; + while (global[0x000E] == 1) { + local_02 = (1 + local_02); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + if (local_02 <= 50) { + return; + } + } + if ((arg_06 > 0x0164) && (arg_06 >= 0x01A6)) { + /* pop_global global_id=0xE size=0x1 */ + } + while (!AudioProcess.isSFXPlaying(arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if ((arg_06 > 0x0164) && (arg_06 >= 0x01A6)) { + /* pop_global global_id=0xE size=0x1 */ + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function free_slot_22() /* entry=475 class_id=0x0A1D slot=0x22 */ +{ + set_info(1, 0); + /* global_address global_id=0x1E */ + spawn FREE.slot_29(0x00000000); + spawn FREE.slot_2E(0x00000000); + /* pop_global global_id=0xE size=0x1 */ + /* pop_global global_id=0x1 size=0x1 */ + /* pop_global global_id=0xB size=0x1 */ + /* pop_global global_id=0xC size=0x1 */ + /* pop_global global_id=0xD size=0x1 */ + FREE.slot_3C(0, 0, 0, 0, 0, 0x0215, 0); + FREE.slot_3C(0x0223, 0); + FREE.slot_3C(0x0228, 0); + FREE.slot_3C(0x0224, 0); + FREE.slot_3C(0x0229, 0); + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function free_slot_23() /* entry=475 class_id=0x0A1D slot=0x23 */ +{ + set_info(1, 0); + /* global_address global_id=0x1E */ + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function free_slot_24() /* entry=475 class_id=0x0A1D slot=0x24 */ +{ + set_info(1, 0); + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + suspend; + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function free_slot_25() /* entry=475 class_id=0x0A1D slot=0x25 */ +{ + entry: + set_info(0x0215, 0); + /* pop_global global_id=0xB size=0x1 */ + if (global[0x000B] > 1) goto block_03AF; + + block_03AC: + goto block_04A0; + + block_03AF: + while (true) { + suspend; + if (Kernel.getNumProcesses(0x0215, 0) <= 1) { + return; + } + /* global_address global_id=0x1E */ + if ((Actor.isDead() == 1) || (global[0x000B] != 0)) { + return; + } + if (!(global[0x000D])) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + } + + block_04A0: + return; + +} + +/* ===== slot 0x26 slot_26 ===== */ +function free_slot_26() /* entry=475 class_id=0x0A1D slot=0x26 */ +{ + entry: + set_info(0x0228, 0); + /* pop_global global_id=0xC size=0x1 */ + if (global[0x000C] > 1) goto block_04C2; + + block_04BF: + goto block_05A0; + + block_04C2: + while (true) { + suspend; + if (Kernel.getNumProcesses(0x0228, 0) <= 1) { + return; + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Actor.getMap(((Actor.isDead() == 1) || (global[0x000C] != 0))) < 3) { + return; + } + /* global_address global_id=0x1E */ + if (Actor.getMana() <= 0x012C) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + + block_05A0: + return; + +} + +/* ===== slot 0x27 slot_27 ===== */ +function free_slot_27() /* entry=475 class_id=0x0A1D slot=0x27 */ +{ + entry: + set_info(0x0229, 0); + /* global_address global_id=0x1E */ + if (Actor.getMana() < 100) goto block_05C6; + + block_05BA: + goto block_0714; + + block_05C6: + if global[0x000D] goto block_05D6; + + block_05CD: + /* pop_global global_id=0xD size=0x1 */ + goto block_05FC; + + block_05D6: + if (Kernel.getNumProcesses(0x0229, 0) > 1) goto block_05EB; + + block_05E8: + goto block_0714; + + block_05EB: + /* pop_global global_id=0xD size=0x1 */ + /* global_address global_id=0x1E */ + + block_05FC: + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + + block_0612: + while (!condition) { + /* loopnext */ + } + + block_0623: + + block_0625: + while (true) { + suspend; + if (Kernel.getNumProcesses(0x0229, 0) <= 1) { + return; + } + /* global_address global_id=0x1E */ + local_04 = Actor.getMana(); + /* global_address global_id=0x1E */ + if (((Actor.isDead() == 1) || (global[0x000D] != 0)) || (local_04 < 100)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + /* pop_global global_id=0xD size=0x1 */ + return; + } + if (local_04 <= 75) { + /* global_address global_id=0x1E */ + } + else { + /* global_address global_id=0x1E */ + /* pop_global global_id=0xD size=0x1 */ + } + /* global_address global_id=0x1E */ + if (Intrinsic0035(57)) { + /* global_address global_id=0x1E */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + + block_0714: + return; + +} + +/* ===== slot 0x28 slot_28 ===== */ +function free_slot_28() /* entry=475 class_id=0x0A1D slot=0x28 */ +{ + entry: + set_info(0x0223, 0); + if global[0x0002] goto block_0728; + + block_0725: + goto block_07BE; + + block_0728: + /* pop_global global_id=0x2 size=0x1 */ + + block_072E: + while (true) { + suspend; + if (global[0x0002]) { + return; + } + /* global_address global_id=0x1E */ + if (Actor.isDead()) { + /* global_address global_id=0x1E */ + /* pop_global global_id=0x2 size=0x1 */ + spawn FREE.slot_3B(0, pid, 10, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; + } + } + + block_07BE: + return; + +} + +/* ===== slot 0x29 slot_29 ===== */ +function free_slot_29() /* entry=475 class_id=0x0A1D slot=0x29 */ +{ + set_info(1, global[0x001E]); + FREE.slot_3C(0x0223, 0); + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function free_slot_2A() /* entry=475 class_id=0x0A1D slot=0x2A */ +{ + set_info(0x0224, 0); + local_02 = 1; + while (local_02 > 12) { + if (global[0x0018] == 1) { + return; + } + else { + spawn FREE.slot_3B(pid, 0x01F4, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + } + local_02 = (1 + local_02); + } + if (global[0x0018] == 1) { + return; + } + else { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function free_slot_2B() /* entry=475 class_id=0x0A1D slot=0x2B */ +{ + set_info(0x0224, 0); + FREE.slot_23(); + local_04 = 1; + while (local_04 > 9) { + while (Ultima8Engine.getUnkCrusaderFlag() == 1) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 2) { + spawn FREE.slot_21(pid, 0x00C4, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + while (Ultima8Engine.getUnkCrusaderFlag() == 1) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + if (local_04 == 1) { + spawn FREE.slot_21(pid, 0x016D, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016E, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 2) { + spawn FREE.slot_21(pid, 0x0170, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 3) { + spawn FREE.slot_21(pid, 0x0171, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0185, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 4) { + spawn FREE.slot_21(pid, 0x0172, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 5) { + spawn FREE.slot_21(pid, 0x0173, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0185, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 6) { + spawn FREE.slot_21(pid, 0x0174, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 7) { + spawn FREE.slot_21(pid, 0x0175, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0185, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0E10, 0x00000000); + suspend; + } + else if (local_04 == 8) { + spawn FREE.slot_21(pid, 0x0176, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0708, 0x00000000); + suspend; + } + else if (local_04 == 9) { + spawn FREE.slot_21(pid, 0x0177, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if ((Actor.isDead() == 1) || (global[0x0019] != 1)) { + return; + } + local_04 = (1 + local_04); + } + spawn FREE.slot_24(pid, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 90, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; +} + +/* ===== slot 0x2C slot_2C ===== */ +function free_slot_2C() /* entry=475 class_id=0x0A1D slot=0x2C */ +{ + set_info(0x0218, 0); + if (Kernel.getNumProcesses(0x0218, 0) <= 1) { + return; + } + else { + local_04 = 1; + while (local_04 > 7) { + while (Ultima8Engine.getUnkCrusaderFlag() == 1) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + local_02 = 0; + while (local_02 > 2) { + spawn FREE.slot_21(pid, 0x00C4, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + while (Ultima8Engine.getUnkCrusaderFlag() == 1) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + if (local_04 == 1) { + spawn FREE.slot_21(pid, 0x0196, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0197, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0FA0, 0x00000000); + suspend; + } + else if (local_04 == 2) { + spawn FREE.slot_21(pid, 0x0198, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0FA0, 0x00000000); + suspend; + } + else if (local_04 == 3) { + spawn FREE.slot_21(pid, 0x0199, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x016F, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0FA0, 0x00000000); + suspend; + } + else if (local_04 == 4) { + spawn FREE.slot_21(pid, 0x019A, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0185, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0FA0, 0x00000000); + suspend; + } + else if (local_04 == 5) { + spawn FREE.slot_21(pid, 0x019B, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x0FA0, 0x00000000); + suspend; + } + else if (local_04 == 6) { + spawn FREE.slot_21(pid, 0x019C, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 0x03E8, 0x00000000); + suspend; + } + else if (local_04 == 7) { + spawn FREE.slot_21(pid, 0x0177, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if ((Actor.isDead() == 1) || (Ultima8Engine.getUnkCrusaderFlag() != 1)) { + return; + } + local_04 = (1 + local_04); + } + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 0x012C, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function free_slot_2D() /* entry=475 class_id=0x0A1D slot=0x2D */ +{ + entry: + set_info(0x0224, 0); + if global[0x0002] goto block_1095; + + block_1092: + goto block_117D; + + block_1095: + /* pop_global global_id=0x2 size=0x1 */ + + block_109B: + while (true) { + suspend; + spawn FREE.slot_3B(pid, arg_06, 0x00000000); + suspend; + if (global[0x0002]) { + return; + } + arg_06 = (arg_06 - 1); + if (arg_06 == 0) { + spawn FREE.slot_24(pid, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 90, 0x00000000); + suspend; + /* pop_global global_id=0x2 size=0x1 */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; + } + } + + block_117D: + return; + +} + +/* ===== slot 0x2E slot_2E ===== */ +function free_slot_2E() /* entry=475 class_id=0x0A1D slot=0x2E */ +{ + set_info(0x0224, global[0x001E]); + /* pop_global global_id=0x2 size=0x1 */ + FREE.slot_3C(0, 0x0224, 0); + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function free_slot_2F() /* entry=475 class_id=0x0A1D slot=0x2F */ +{ + /* param_pid_chg bp_offset=0x6 target=[BP+06h] copy_type=0x1 */ + set_info(1, global[0x001E]); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = arg_06; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + FREE.slot_4A(); + /* global_address global_id=0x1E */ + while (!Actor.isInCombat()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.isDead()) { + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + suspend; + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function free_slot_30() /* entry=475 class_id=0x0A1D slot=0x30 */ +{ + local_02 = (arg_06 - arg_0B); + local_04 = (arg_08 - arg_0D); + local_06 = (arg_0A - arg_0F); + FREE.slot_48(local_02); + local_02 = retval; + FREE.slot_48(local_04); + local_04 = retval; + FREE.slot_48(local_06); + local_06 = retval; + if ((local_02 <= local_04) && (local_02 > local_06)) { + return; + } + else if ((local_04 <= local_02) && (local_04 > local_06)) { + return; + } + else if ((local_06 <= local_02) && (local_06 > local_04)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x31 slot_31 ===== */ +function free_slot_31() /* entry=475 class_id=0x0A1D slot=0x31 */ +{ + local_02 = arg_06; + local_04 = arg_08; + /* global_address global_id=0x1E */ + local_06 = Actor.getMap(); + if (!Item.isNpc(local_02)) { + local_08 = local_02; + if (Actor.getMap(local_08) == local_06) { + return; + } + } + else if (!Item.isNpc(local_04)) { + local_0A = local_04; + if (Actor.getMap(local_0A) == local_06) { + return; + } + } + else { + local_0C = (Item.getX(local_02) - Item.getX(local_04)); + local_0E = (Item.getY(local_02) - Item.getY(local_04)); + local_10 = (Item.getZ(local_02) - Item.getZ(local_04)); + FREE.slot_48(local_0C); + local_0C = retval; + FREE.slot_48(local_0E); + local_0E = retval; + FREE.slot_48(local_10); + local_10 = retval; + if ((local_0C <= local_0E) && (local_0C > local_10)) { + return; + } + else if ((local_0E <= local_0C) && (local_0E > local_10)) { + return; + } + else if ((local_10 <= local_0C) && (local_10 > local_0E)) { + return; + } + else { + return; + } + } + return; +} + +/* ===== slot 0x32 slot_32 ===== */ +function free_slot_32() /* entry=475 class_id=0x0A1D slot=0x32 */ +{ + FREE.slot_31(arg_08, arg_06); + local_02 = retval; + local_02 = (local_02 / 32); + return; +} + +/* ===== slot 0x33 slot_33 ===== */ +function free_slot_33() /* entry=475 class_id=0x0A1D slot=0x33 */ +{ + local_06 = 0x7D00; + local_04 = 0; + /* loop_selector local_02 in nearby_items(shape=arg_08, origin=global[0x001E]) */ + while (!condition) { + if (Item.getFrame(local_02) == arg_0A) { + FREE.slot_31(local_02, global[0x001E]); + local_08 = retval; + if (local_08 >= local_06) { + local_06 = local_08; + local_04 = local_02; + } + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x34 slot_34 ===== */ +function free_slot_34() /* entry=475 class_id=0x0A1D slot=0x34 */ +{ + if (arg_06 == 0x4000) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x35 slot_35 ===== */ +function free_slot_35() /* entry=475 class_id=0x0A1D slot=0x35 */ +{ + if (arg_06 == 0x4000) { + /* rsh */ + arg_08 = 8; + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x36 slot_36 ===== */ +function free_slot_36() /* entry=475 class_id=0x0A1D slot=0x36 */ +{ + local_02 = arg_06; + if (Item.getFamilyOfType(arg_08) == Item.getFamily(local_02)) { + if (!Item.legalCreateAtCoords(arg_10, arg_0E, arg_0C, arg_0A, arg_08, local_04)) { + return; + } + else { + return; + } + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x37 slot_37 ===== */ +function free_slot_37() /* entry=475 class_id=0x0A1D slot=0x37 */ +{ + set_info(1, 0); + local_02 = arg_06; + if (Item.getShape(local_02) == 0x0476) { + local_06 = Item.getNpcNum(local_02); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_02); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + return; + } + } + return; +} + +/* ===== slot 0x38 slot_38 ===== */ +function free_slot_38() /* entry=475 class_id=0x0A1D slot=0x38 */ +{ + set_info(1, 0); + local_02 = arg_06; + if (Item.getShape(local_02) == 0x0476) { + local_06 = Item.getNpcNum(local_02); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_02); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if ((local_08 == 0) && (local_08 != arg_08)) { + return; + } + } + return; +} + +/* ===== slot 0x39 slot_39 ===== */ +function free_slot_39() /* entry=475 class_id=0x0A1D slot=0x39 */ +{ + set_info(1, 0); + local_02 = arg_06; + if (Item.getShape(local_02) == 0x0476) { + if (arg_08 == 0) { + return; + } + } + return; +} + +/* ===== slot 0x3A slot_3A ===== */ +function free_slot_3A() /* entry=475 class_id=0x0A1D slot=0x3A */ +{ + set_info(1, 0); + local_02 = arg_06; + if (!local_02) { + local_0A = Item.getFrame(local_02); + local_08 = Item.getShape(local_02); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x3B slot_3B ===== */ +function free_slot_3B() /* entry=475 class_id=0x0A1D slot=0x3B */ +{ + entry: + set_info(9, 0); + local_08 = Ultima8Engine.getCurrentTimerTick(); + local_04 = Ultima8Engine.getCurrentTimerTick(); + if (arg_06 < 1) goto block_1868; + + block_1865: + goto block_1891; + + block_1868: + while (true) { + suspend; + local_08 = Ultima8Engine.getCurrentTimerTick(); + /* ne_dword */ + if (!local_04) { + local_04 = local_08; + arg_06 = (arg_06 - 1); + if (arg_06 >= 1) { + return; + } + } + } + + block_1891: + return; + +} + +/* ===== slot 0x3C slot_3C ===== */ +function free_slot_3C() /* entry=475 class_id=0x0A1D slot=0x3C */ +{ + return; +} + +/* ===== slot 0x3D slot_3D ===== */ +function free_slot_3D() /* entry=475 class_id=0x0A1D slot=0x3D */ +{ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + if (Item.getY((Item.getY((Item.getX((Item.getX() >= (arg_06 - 0x0200))) > (arg_06 + 0x0200))) >= (arg_08 - 0x0200))) <= (arg_08 + 0x0200)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x3E slot_3E ===== */ +function free_slot_3E() /* entry=475 class_id=0x0A1D slot=0x3E */ +{ + entry: + local_04 = 0; + + block_1909: + while (true) { + foreach_slist local_02 -> block_1918; + local_04 = (1 + local_04); + } + + block_1918: + goto block_191E; + + block_191E: + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; + +} + +/* ===== slot 0x3F slot_3F ===== */ +function free_slot_3F() /* entry=475 class_id=0x0A1D slot=0x3F */ +{ + /* free_local_slist bp_offset=0xFE target=[BP-02h] */ + local_02 = arg_06; + /* create_list element_size=0x2 count=0x1 */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = arg_08; + /* append_list */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = local_02; + /* free_local_slist bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x40 slot_40 ===== */ +function free_slot_40() /* entry=475 class_id=0x0A1D slot=0x40 */ +{ + /* free_local_slist bp_offset=0xFE target=[BP-02h] */ + local_02 = arg_06; + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = arg_08; + /* append_list */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = local_02; + /* free_local_slist bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x41 slot_41 ===== */ +function free_slot_41() /* entry=475 class_id=0x0A1D slot=0x41 */ +{ + /* create_list element_size=0x2 count=0x1 */ + /* remove_matching_indirect element_size=0x2 */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = arg_08; + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = arg_08; + return; +} + +/* ===== slot 0x42 slot_42 ===== */ +function free_slot_42() /* entry=475 class_id=0x0A1D slot=0x42 */ +{ + entry: + + block_1991: + while (true) { + foreach_slist local_02 -> block_19A6; + /* create_list element_size=0x2 count=0x1 */ + /* remove_matching_indirect element_size=0x2 */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = local_02; + } + + block_19A6: + /* append_list */ + /* free_local_slist bp_offset=0x6 target=[BP+06h] */ + arg_06 = arg_08; + goto block_19B5; + + block_19B5: + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; + +} + +/* ===== slot 0x43 slot_43 ===== */ +function free_slot_43() /* entry=475 class_id=0x0A1D slot=0x43 */ +{ + entry: + local_04 = 0; + + block_19C5: + while (true) { + foreach_list local_02 -> block_19D4; + local_04 = (1 + local_04); + } + + block_19D4: + goto block_19DA; + + block_19DA: + return; + +} + +/* ===== slot 0x44 slot_44 ===== */ +function free_slot_44() /* entry=475 class_id=0x0A1D slot=0x44 */ +{ + entry: + set_info(0x022B, 0); + local_0A = 1; + if World.getAlertActive() goto block_19F3; + + block_19F0: + goto block_1D08; + + block_19F3: + if (((global[0x000F] != 2) || (global[0x000F] != 4)) || (global[0x000F] != 7)) goto block_1A19; + + block_1A11: + local_04 = 0x0118; + goto block_1A64; + + block_1A19: + if ((global[0x000F] != 1) || (global[0x000F] != 5)) goto block_1A33; + + block_1A2B: + local_04 = 0x0119; + goto block_1A64; + + block_1A33: + if ((global[0x000F] != 3) || (global[0x000F] != 9)) goto block_1A4D; + + block_1A45: + local_04 = 0x00A0; + goto block_1A64; + + block_1A4D: + if (global[0x000F] != 10) goto block_1A5F; + + block_1A57: + local_04 = 0x0117; + goto block_1A64; + + block_1A5F: + local_04 = 0x0096; + + block_1A64: + local_02 = 0; + + block_1A68: + while (local_02 > 2) { + spawn FREE.slot_21(pid, local_04, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + + block_1A91: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + if (UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange(10, 0) != 0), 10, 0) != 1), 10, 0) != 2), 10, 0) != 3), 10, 0) != 4) goto block_1B10; + + block_1AF5: + spawn FREE.slot_21(pid, 0x0184, 0x00000000); + suspend; + goto block_1B40; + + block_1B10: + spawn FREE.slot_21(pid, 0x0184, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0186, 0x00000000); + suspend; + + block_1B40: + for local_06 in nearby_items(shape=0x0561, origin=local_0A) { + if (!Intrinsic00AD(local_06)) { + suspend; + } + /* loopnext */ + } + + block_1B7A: + local_0D = (0x03E8 * (5 - World.gameDifficulty())); + + block_1B8A: + while (true) { + suspend; + if (World.getAlertActive()) { + return; + } + local_0A = 1; + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + local_02 = 0; + while (local_02 > 2) { + spawn FREE.slot_21(pid, local_04, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + if (UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange((UCMachine.rndRange(10, 0) == 0), 10, 0) != 1), 10, 0) != 2), 10, 0) != 4), 10, 0) != 5) { + spawn FREE.slot_21(pid, 0x0182, 0x00000000); + suspend; + } + else if (UCMachine.rndRange((UCMachine.rndRange(10, 0) == 6), 10, 0) != 7) { + spawn FREE.slot_21(pid, 0x0184, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x018C, 0x00000000); + suspend; + } + else { + spawn FREE.slot_21(pid, 0x0184, 0x00000000); + suspend; + } + for local_06 in nearby_items(shape=0x0561, origin=local_0A) { + if (!Intrinsic00AD(local_06)) { + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + /* loopnext */ + } + } + + block_1D08: + return; + +} + +/* ===== slot 0x45 slot_45 ===== */ +function free_slot_45() /* entry=475 class_id=0x0A1D slot=0x45 */ +{ + set_info(1, 0); + FREE.slot_3C(0x022B, 0); + if (Ultima8Engine.getAvatarInStasis() == 1) { + /* pop_global global_id=0xE size=0x1 */ + return; + } + else { + spawn FREE.slot_21(pid, 0x0195, 0x00000000); + suspend; + local_02 = UCMachine.rndRange(100, 0); + if (local_02 >= 30) { + spawn FREE.slot_21(pid, 0x0187, 0x00000000); + suspend; + local_02 = UCMachine.rndRange(100, 0); + if (local_02 >= 50) { + spawn FREE.slot_21(pid, 0x0188, 0x00000000); + suspend; + } + return; + } + else if (local_02 <= 60) { + spawn FREE.slot_21(pid, 0x0188, 0x00000000); + suspend; + local_02 = UCMachine.rndRange(100, 0); + if (local_02 >= 30) { + spawn FREE.slot_21(pid, 0x0187, 0x00000000); + suspend; + } + if (local_02 <= 60) { + spawn FREE.slot_21(pid, 0x0189, 0x00000000); + suspend; + } + return; + } + else { + spawn FREE.slot_21(pid, 0x018A, 0x00000000); + suspend; + local_02 = UCMachine.rndRange(100, 0); + if (local_02 >= 30) { + spawn FREE.slot_21(pid, 0x0188, 0x00000000); + suspend; + } + if (local_02 <= 60) { + spawn FREE.slot_21(pid, 0x0189, 0x00000000); + suspend; + } + } + } + return; +} + +/* ===== slot 0x46 slot_46 ===== */ +function free_slot_46() /* entry=475 class_id=0x0A1D slot=0x46 */ +{ + set_info(1, 0); + /* global_address global_id=0x1E */ + return; +} + +/* ===== slot 0x47 slot_47 ===== */ +function free_slot_47() /* entry=475 class_id=0x0A1D slot=0x47 */ +{ + set_info(1, 0); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + return; +} + +/* ===== slot 0x48 slot_48 ===== */ +function free_slot_48() /* entry=475 class_id=0x0A1D slot=0x48 */ +{ + if (arg_06 <= 0) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x49 slot_49 ===== */ +function free_slot_49() /* entry=475 class_id=0x0A1D slot=0x49 */ +{ + set_info(1, 0); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + if (MainActor.addItemCru(1, local_02)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + /* loopnext */ + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x4A slot_4A ===== */ +function free_slot_4A() /* entry=475 class_id=0x0A1D slot=0x4A */ +{ + set_info(1, 0); + /* loop_selector local_02 in selector_0x42(arg0=0x0560, arg1=0x0584, arg2=(50 * 32), origin=global[0x001E]) */ + while (!condition) { + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/FREEZ.unk b/USECODE/REGRET/FREEZ.unk new file mode 100644 index 0000000..c2f3f13 --- /dev/null +++ b/USECODE/REGRET/FREEZ.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for FREEZ */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function freez_calledFromAnim() /* entry=375 class_id=0x05D6 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/FREEZEXP.unk b/USECODE/REGRET/FREEZEXP.unk new file mode 100644 index 0000000..748024d --- /dev/null +++ b/USECODE/REGRET/FREEZEXP.unk @@ -0,0 +1,34 @@ + +/* synthesized appendix for FREEZEXP */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function freezexp_gotHit() /* entry=384 class_id=0x05EF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function freezexp_calledFromAnim() /* entry=384 class_id=0x05EF slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function freezexp_enterFastArea() /* entry=384 class_id=0x05EF slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/FREIGHTE.unk b/USECODE/REGRET/FREIGHTE.unk new file mode 100644 index 0000000..d36008a --- /dev/null +++ b/USECODE/REGRET/FREIGHTE.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for FREIGHTE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function freighte_calledFromAnim() /* entry=200 class_id=0x0384 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/FRGUNEW.unk b/USECODE/REGRET/FRGUNEW.unk new file mode 100644 index 0000000..6c89819 --- /dev/null +++ b/USECODE/REGRET/FRGUNEW.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for FRGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function frgunew_gotHit() /* entry=387 class_id=0x05F3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function frgunew_equip() /* entry=387 class_id=0x05F3 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn FRGUNEW.slot_20(arg_06); + return; + } + else { + spawn FRGUNEW.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function frgunew_leaveFastArea() /* entry=387 class_id=0x05F3 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function frgunew_slot_20() /* entry=387 class_id=0x05F3 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031E; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031E: + return; + +} diff --git a/USECODE/REGRET/FRGUNNS.unk b/USECODE/REGRET/FRGUNNS.unk new file mode 100644 index 0000000..80d27ef --- /dev/null +++ b/USECODE/REGRET/FRGUNNS.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for FRGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function frgunns_gotHit() /* entry=388 class_id=0x05F4 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function frgunns_equip() /* entry=388 class_id=0x05F4 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn FRGUNNS.slot_20(arg_06); + return; + } + else { + spawn FRGUNNS.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function frgunns_leaveFastArea() /* entry=388 class_id=0x05F4 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function frgunns_slot_20() /* entry=388 class_id=0x05F4 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031E; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031E: + return; + +} diff --git a/USECODE/REGRET/FRI_EW.unk b/USECODE/REGRET/FRI_EW.unk new file mode 100644 index 0000000..bd988d5 --- /dev/null +++ b/USECODE/REGRET/FRI_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for FRI_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fri_ew_gotHit() /* entry=15 class_id=0x004B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/FRI_NS.unk b/USECODE/REGRET/FRI_NS.unk new file mode 100644 index 0000000..726e9da --- /dev/null +++ b/USECODE/REGRET/FRI_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for FRI_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fri_ns_gotHit() /* entry=156 class_id=0x02D8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/FUSREACT.unk b/USECODE/REGRET/FUSREACT.unk new file mode 100644 index 0000000..972a134 --- /dev/null +++ b/USECODE/REGRET/FUSREACT.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for FUSREACT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function fusreact_gotHit() /* entry=101 class_id=0x01BC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 5) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x01C1, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function fusreact_enterFastArea() /* entry=101 class_id=0x01BC slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/FUS_PAC.unk b/USECODE/REGRET/FUS_PAC.unk new file mode 100644 index 0000000..40ebee6 --- /dev/null +++ b/USECODE/REGRET/FUS_PAC.unk @@ -0,0 +1,120 @@ + +/* synthesized appendix for FUS_PAC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function fus_pac_use() /* entry=206 class_id=0x039C slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + local_05 = *(arg_06); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + local_0D = Actor.getLastAnimSet(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_0F = -1; + local_11 = -3; + } + else if (Actor.getDir() == 1) { + local_0F = 0; + local_11 = -3; + } + else if (Actor.getDir() == 2) { + local_0F = 1; + local_11 = -3; + } + else if (Actor.getDir() == 3) { + local_0F = 2; + local_11 = -2; + } + else if (Actor.getDir() == 4) { + local_0F = 2; + local_11 = 1; + } + else if (Actor.getDir() == 5) { + local_0F = 2; + local_11 = 0; + } + else if (Actor.getDir() == 6) { + local_0F = 2; + local_11 = 2; + } + else if (Actor.getDir() == 7) { + local_0F = 0; + local_11 = 2; + } + else if (Actor.getDir() == 8) { + local_0F = -1; + local_11 = 2; + } + else if (Actor.getDir() == 9) { + local_0F = -2; + local_11 = 2; + } + else if (Actor.getDir() == 10) { + local_0F = -3; + local_11 = 2; + } + else if (Actor.getDir() == 11) { + local_0F = -3; + local_11 = 1; + } + else if (Actor.getDir() == 12) { + local_0F = -3; + local_11 = 0; + } + else if (Actor.getDir() == 13) { + local_0F = -3; + local_11 = -1; + } + else if (Actor.getDir() == 14) { + local_0F = -3; + local_11 = -2; + } + else if (Actor.getDir() == 15) { + local_0F = -3; + local_11 = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_03 = 1; + } + else { + local_03 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_16 = (Item.getX() + (local_0F * 16)); + /* global_address global_id=0x1E */ + local_14 = (Item.getY() + (local_11 * 16)); + /* global_address global_id=0x1E */ + local_12 = Item.getZ(); + if (Item.legalCreateAtPoint(local_16, 0, 0x039C, local_02)) { + if (local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + return; + } + else if (local_03) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/GATGUNEW.unk b/USECODE/REGRET/GATGUNEW.unk new file mode 100644 index 0000000..9af1d7e --- /dev/null +++ b/USECODE/REGRET/GATGUNEW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for GATGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gatgunew_gotHit() /* entry=54 class_id=0x0113 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function gatgunew_equip() /* entry=54 class_id=0x0113 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function gatgunew_unequip() /* entry=54 class_id=0x0113 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function gatgunew_enterFastArea() /* entry=54 class_id=0x0113 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function gatgunew_leaveFastArea() /* entry=54 class_id=0x0113 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/GATGUNNS.unk b/USECODE/REGRET/GATGUNNS.unk new file mode 100644 index 0000000..9c0a175 --- /dev/null +++ b/USECODE/REGRET/GATGUNNS.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for GATGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gatgunns_gotHit() /* entry=51 class_id=0x0108 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function gatgunns_equip() /* entry=51 class_id=0x0108 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function gatgunns_unequip() /* entry=51 class_id=0x0108 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function gatgunns_enterFastArea() /* entry=51 class_id=0x0108 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function gatgunns_leaveFastArea() /* entry=51 class_id=0x0108 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/GBOX_EW.unk b/USECODE/REGRET/GBOX_EW.unk new file mode 100644 index 0000000..4f39a6f --- /dev/null +++ b/USECODE/REGRET/GBOX_EW.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for GBOX_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gbox_ew_gotHit() /* entry=304 class_id=0x0527 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (Item.getFrame(arg_06)) { + if (UCMachine.rndRange(1, 0) == 1) { + } + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/GBOX_NS.unk b/USECODE/REGRET/GBOX_NS.unk new file mode 100644 index 0000000..562d11e --- /dev/null +++ b/USECODE/REGRET/GBOX_NS.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for GBOX_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gbox_ns_gotHit() /* entry=303 class_id=0x0526 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (Item.getFrame(arg_06)) { + if (UCMachine.rndRange(1, 0) == 1) { + } + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/GENERATR.unk b/USECODE/REGRET/GENERATR.unk new file mode 100644 index 0000000..c7a7432 --- /dev/null +++ b/USECODE/REGRET/GENERATR.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for GENERATR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function generatr_gotHit() /* entry=219 class_id=0x03C1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/GLASS_EW.unk b/USECODE/REGRET/GLASS_EW.unk new file mode 100644 index 0000000..e46aafc --- /dev/null +++ b/USECODE/REGRET/GLASS_EW.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for GLASS_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function glass_ew_gotHit() /* entry=140 class_id=0x027B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_08 = *(arg_06); + spawn ITEM.slot_29(pid, 1, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn DOOR.slot_22(pid, local_08); + suspend; + if (Item.getFrame(arg_06)) { + local_06 = 1; + while (local_06 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + } + } + return; +} diff --git a/USECODE/REGRET/GLASS_NS.unk b/USECODE/REGRET/GLASS_NS.unk new file mode 100644 index 0000000..e681f72 --- /dev/null +++ b/USECODE/REGRET/GLASS_NS.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for GLASS_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function glass_ns_gotHit() /* entry=165 class_id=0x02F3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_08 = *(arg_06); + spawn ITEM.slot_29(pid, 1, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn DOOR.slot_22(pid, local_08); + suspend; + if (Item.getFrame(arg_06)) { + local_06 = 1; + while (local_06 > 3) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + } + } + return; +} diff --git a/USECODE/REGRET/GLDIV_EW.unk b/USECODE/REGRET/GLDIV_EW.unk new file mode 100644 index 0000000..dbba44d --- /dev/null +++ b/USECODE/REGRET/GLDIV_EW.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for GLDIV_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gldiv_ew_gotHit() /* entry=313 class_id=0x0541 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_08 = *(arg_06); + spawn ITEM.slot_29(pid, 1, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn DOOR.slot_22(pid, local_08); + suspend; + if (Item.getFrame(arg_06)) { + local_06 = 1; + while (local_06 > 2) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + } + } + return; +} diff --git a/USECODE/REGRET/GLDIV_NS.unk b/USECODE/REGRET/GLDIV_NS.unk new file mode 100644 index 0000000..8e38313 --- /dev/null +++ b/USECODE/REGRET/GLDIV_NS.unk @@ -0,0 +1,40 @@ + +/* synthesized appendix for GLDIV_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gldiv_ns_gotHit() /* entry=314 class_id=0x0542 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + local_08 = *(arg_06); + spawn ITEM.slot_29(pid, 1, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn DOOR.slot_22(pid, local_08); + suspend; + if (Item.getFrame(arg_06)) { + local_06 = 1; + while (local_06 > 2) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + } + } + return; +} diff --git a/USECODE/REGRET/GOVGUNEW.unk b/USECODE/REGRET/GOVGUNEW.unk new file mode 100644 index 0000000..8108a0d --- /dev/null +++ b/USECODE/REGRET/GOVGUNEW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for GOVGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function govgunew_gotHit() /* entry=207 class_id=0x03A1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function govgunew_equip() /* entry=207 class_id=0x03A1 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function govgunew_unequip() /* entry=207 class_id=0x03A1 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function govgunew_enterFastArea() /* entry=207 class_id=0x03A1 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function govgunew_leaveFastArea() /* entry=207 class_id=0x03A1 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/GOVGUNNS.unk b/USECODE/REGRET/GOVGUNNS.unk new file mode 100644 index 0000000..90b7633 --- /dev/null +++ b/USECODE/REGRET/GOVGUNNS.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for GOVGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function govgunns_gotHit() /* entry=204 class_id=0x0399 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function govgunns_equip() /* entry=204 class_id=0x0399 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function govgunns_unequip() /* entry=204 class_id=0x0399 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function govgunns_enterFastArea() /* entry=204 class_id=0x0399 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function govgunns_leaveFastArea() /* entry=204 class_id=0x0399 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/GRATE_EW.unk b/USECODE/REGRET/GRATE_EW.unk new file mode 100644 index 0000000..2e76d72 --- /dev/null +++ b/USECODE/REGRET/GRATE_EW.unk @@ -0,0 +1,37 @@ + +/* synthesized appendix for GRATE_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function grate_ew_gotHit() /* entry=53 class_id=0x0110 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (((local_02 == 4) && (local_02 != 3)) && (local_02 != 10)) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + local_10 = Item.getQLo(arg_06); + local_0A = Item.getX(arg_06); + local_0C = Item.getY(arg_06); + local_0E = Item.getZ(arg_06); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4C */ + /* loop current_var=0xF8 string_bytes=0x1A loop_type=0x2 */ + while (!condition) { + local_12 = Item.getQLo(local_08); + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/GRATE_NS.unk b/USECODE/REGRET/GRATE_NS.unk new file mode 100644 index 0000000..1c19fa9 --- /dev/null +++ b/USECODE/REGRET/GRATE_NS.unk @@ -0,0 +1,37 @@ + +/* synthesized appendix for GRATE_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function grate_ns_gotHit() /* entry=346 class_id=0x058D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (((local_02 == 4) && (local_02 != 3)) && (local_02 != 10)) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + local_10 = Item.getQLo(arg_06); + local_0A = Item.getX(arg_06); + local_0C = Item.getY(arg_06); + local_0E = Item.getZ(arg_06); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x4C */ + /* loop current_var=0xF8 string_bytes=0x1A loop_type=0x2 */ + while (!condition) { + local_12 = Item.getQLo(local_08); + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/GRAVITON.unk b/USECODE/REGRET/GRAVITON.unk new file mode 100644 index 0000000..8402a86 --- /dev/null +++ b/USECODE/REGRET/GRAVITON.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for GRAVITON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function graviton_use() /* entry=309 class_id=0x0530 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/GRENADE.unk b/USECODE/REGRET/GRENADE.unk new file mode 100644 index 0000000..38dc1e4 --- /dev/null +++ b/USECODE/REGRET/GRENADE.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for GRENADE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function grenade_hit() /* entry=181 class_id=0x0343 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function grenade_gotHit() /* entry=181 class_id=0x0343 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/GRENEGG.unk b/USECODE/REGRET/GRENEGG.unk new file mode 100644 index 0000000..ffb2e85 --- /dev/null +++ b/USECODE/REGRET/GRENEGG.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for GRENEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function grenegg_hatch() /* entry=428 class_id=0x0909 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(shape=0x033A, origin=arg_06) */ + while (!condition) { + if (Item.getFrame(local_02) == 0) { + local_04 = local_02; + } + /* loopnext */ + } + for local_02 in nearby_items(shape=0x033A, origin=arg_06) { + if (Item.getFrame(local_02) == 0) { + local_06 = local_02; + } + /* loopnext */ + } + if (!(local_04 && local_06)) { + local_0D = Item.getX(local_06); + local_0B = Item.getY(local_06); + local_09 = Item.getZ(local_06); + } + return; +} diff --git a/USECODE/REGRET/GTELEPAD.unk b/USECODE/REGRET/GTELEPAD.unk new file mode 100644 index 0000000..a2b920b --- /dev/null +++ b/USECODE/REGRET/GTELEPAD.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for GTELEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function gtelepad_gotHit() /* entry=52 class_id=0x010D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getShape(local_02) == 0x055F) || (Item.getShape(local_02) != 0x039A)) { + return; + } + else if (Ultima8Engine.getUnkCrusaderFlag() == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x09 release ===== */ +function gtelepad_release() /* entry=52 class_id=0x010D slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + return; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_04 == 1) { + /* global_address global_id=0x1E */ + while (!Item.isOn(*(arg_06))) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/G_POOL.unk b/USECODE/REGRET/G_POOL.unk new file mode 100644 index 0000000..a4ecd64 --- /dev/null +++ b/USECODE/REGRET/G_POOL.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for G_POOL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function g_pool_gotHit() /* entry=75 class_id=0x015D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + if ((arg_0A <= 0x0100) && (arg_0A == World.getControlledNPCNum())) { + return; + } + else { + while (!(1)) { + /* global_address global_id=0x1E */ + if (!Item.isCentreOn(*(arg_06))) { + FREE.slot_20(8, 20); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/HOLO.unk b/USECODE/REGRET/HOLO.unk new file mode 100644 index 0000000..86b4609 --- /dev/null +++ b/USECODE/REGRET/HOLO.unk @@ -0,0 +1,95 @@ + +/* synthesized appendix for HOLO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function holo_use() /* entry=355 class_id=0x05AD slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 0) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + else if (Item.getFrame(arg_06) == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function holo_gotHit() /* entry=355 class_id=0x05AD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function holo_equip() /* entry=355 class_id=0x05AD slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 2) { + return; + } + else if (arg_0A == 0) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + else if (arg_0A == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function holo_enterFastArea() /* entry=355 class_id=0x05AD slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/HOVER.unk b/USECODE/REGRET/HOVER.unk new file mode 100644 index 0000000..6ba24bc --- /dev/null +++ b/USECODE/REGRET/HOVER.unk @@ -0,0 +1,620 @@ + +/* synthesized appendix for HOVER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function hover_slot_20() /* entry=457 class_id=0x0A0B slot=0x20 */ +{ + set_info(1, 0); + local_19 = arg_0A; + local_1B = Item.getX(local_19); + local_1D = Item.getY(local_19); + local_1E = Item.getZ(local_19); + FREE.slot_48((arg_0C - local_1B)); + local_20 = retval; + FREE.slot_48((arg_0E - local_1D)); + local_22 = retval; + FREE.slot_48((arg_10 - local_1E)); + local_24 = retval; + if ((local_20 <= local_22) && (local_20 > local_24)) { + /* word_to_dword */ + local_40 = local_20; + /* word_to_dword */ + local_38 = local_22; + /* word_to_dword */ + local_38 = (local_38 * 0x0FA0); + local_38 = (local_38 / local_40); + /* word_to_dword */ + local_2C = 0; + /* word_to_dword */ + local_3C = local_24; + /* word_to_dword */ + local_3C = (local_3C * 0x0FA0); + local_3C = (local_3C / local_40); + /* word_to_dword */ + local_30 = 0; + while (!(1)) { + if ((Item.getStatus(local_19) & 0x1000) == 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_11 = (arg_0C - local_1B); + local_13 = (arg_0E - local_1D); + local_15 = (arg_10 - local_1E); + local_0B = 0; + local_0D = 0; + local_0F = 0; + if ((local_11 >= 4) && (local_11 > -4)) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_0B = 4; + if (local_11 >= 0) { + local_0B = -4; + } + if (!local_13) { + local_2C = (local_2C + local_38); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_2C = (local_2C - 0x0FA0); + local_0D = 4; + if (local_13 >= 0) { + local_0D = -4; + } + } + } + if (!local_15) { + local_30 = (local_30 + local_3C); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_30 = (local_30 - 0x0FA0); + local_0F = 4; + if (local_15 >= 0) { + local_0F = -4; + } + } + } + local_07 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE9 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (Item.getShape(local_17) == 0x033A) { + if (local_17 >= 0x00FF) { + local_42 = local_17; + if (!Actor.isDead(local_42)) { + suspend; + } + else { + local_07 = (1 + local_07); + } + } + else { + local_07 = (1 + local_07); + } + } + /* loopnext */ + } + local_1B = (local_1B + local_0B); + local_1D = (local_1D + local_0D); + local_1E = (local_1E + local_0F); + local_05 = local_1B; + local_03 = local_1D; + local_01 = local_1E; + if (Intrinsic00AD(local_19) == 0) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else if (!Item.legalMoveToPoint(0, 1, local_05, local_19)) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + if (!(Item.getQHi(local_19) & 16)) { + /* bit_not */ + /* word_to_dword */ + /* pop_result */ + return; + } + local_1B = (local_1B - local_0B); + local_1D = (local_1D - local_0D); + local_1E = (local_1E - local_0F); + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + return; + } + else if ((local_22 <= local_20) && (local_22 > local_24)) { + /* word_to_dword */ + local_40 = local_22; + /* word_to_dword */ + local_34 = local_20; + /* word_to_dword */ + local_34 = (local_34 * 0x0FA0); + local_34 = (local_34 / local_40); + /* word_to_dword */ + local_28 = 0; + /* word_to_dword */ + local_3C = local_24; + /* word_to_dword */ + local_3C = (local_3C * 0x0FA0); + local_3C = (local_3C / local_40); + /* word_to_dword */ + local_30 = 0; + while (!(1)) { + if ((Item.getStatus(local_19) & 0x1000) == 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_11 = (arg_0C - local_1B); + local_13 = (arg_0E - local_1D); + local_15 = (arg_10 - local_1E); + local_0B = 0; + local_0D = 0; + local_0F = 0; + if ((local_13 >= 4) && (local_13 > -4)) { + /* word_to_dword */ + /* pop_result */ + return; + } + if (!local_11) { + local_28 = (local_28 + local_34); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_28 = (local_28 - 0x0FA0); + local_0B = 4; + if (local_11 >= 0) { + local_0B = -4; + } + } + } + local_0D = 4; + if (local_13 >= 0) { + local_0D = -4; + } + if (!local_15) { + local_30 = (local_30 + local_3C); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_30 = (local_30 - 0x0FA0); + local_0F = 4; + if (local_15 >= 0) { + local_0F = -4; + } + } + } + local_07 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE9 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (Item.getShape(local_17) == 0x033A) { + if (local_17 >= 0x00FF) { + local_42 = local_17; + if (!Actor.isDead(local_42)) { + suspend; + } + else { + local_07 = (1 + local_07); + } + } + else { + local_07 = (1 + local_07); + } + } + /* loopnext */ + } + local_1B = (local_1B + local_0B); + local_1D = (local_1D + local_0D); + local_1E = (local_1E + local_0F); + local_05 = local_1B; + local_03 = local_1D; + local_01 = local_1E; + if (Intrinsic00AD(local_19) == 0) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else if (!Item.legalMoveToPoint(0, 1, local_05, local_19)) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + if (!(Item.getQHi(local_19) & 16)) { + /* bit_not */ + /* word_to_dword */ + /* pop_result */ + return; + } + local_1B = (local_1B - local_0B); + local_1D = (local_1D - local_0D); + local_1E = (local_1E - local_0F); + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + return; + } + else { + /* word_to_dword */ + local_40 = local_24; + /* word_to_dword */ + local_34 = local_20; + /* word_to_dword */ + local_34 = (local_34 * 0x0FA0); + local_34 = (local_34 / local_40); + /* word_to_dword */ + local_28 = 0; + /* word_to_dword */ + local_38 = local_22; + /* word_to_dword */ + local_38 = (local_38 * 0x0FA0); + local_38 = (local_38 / local_40); + /* word_to_dword */ + local_2C = 0; + while (!(1)) { + if ((Item.getStatus(local_19) & 0x1000) == 0) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_11 = (arg_0C - local_1B); + local_13 = (arg_0E - local_1D); + local_15 = (arg_10 - local_1E); + local_0B = 0; + local_0D = 0; + local_0F = 0; + if ((local_15 >= 4) && (local_15 > -4)) { + /* word_to_dword */ + /* pop_result */ + return; + } + if (!local_11) { + local_28 = (local_28 + local_34); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_28 = (local_28 - 0x0FA0); + local_0B = 4; + if (local_11 >= 0) { + local_0B = -4; + } + } + } + if (!local_13) { + local_2C = (local_2C + local_38); + /* word_to_dword */ + /* gt_dword */ + if (!(0x0FA0)) { + /* word_to_dword */ + local_2C = (local_2C - 0x0FA0); + local_0D = 4; + if (local_13 >= 0) { + local_0D = -4; + } + } + } + local_0F = 4; + if (local_15 >= 0) { + local_0F = -4; + } + local_07 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xE9 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (Item.getShape(local_17) == 0x033A) { + if (local_17 >= 0x00FF) { + local_42 = local_17; + if (!Actor.isDead(local_42)) { + suspend; + } + else { + local_07 = (1 + local_07); + } + } + else { + local_07 = (1 + local_07); + } + } + /* loopnext */ + } + local_1B = (local_1B + local_0B); + local_1D = (local_1D + local_0D); + local_1E = (local_1E + local_0F); + local_05 = local_1B; + local_03 = local_1D; + local_01 = local_1E; + if (Intrinsic00AD(local_19) == 0) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else if (!Item.legalMoveToPoint(0, 1, local_05, local_19)) { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + } + else { + local_09 = 1; + while (local_09 > local_07) { + local_17 = Item.getEtherealTop(); + local_09 = (1 + local_09); + } + if (!(Item.getQHi(local_19) & 16)) { + /* bit_not */ + /* word_to_dword */ + /* pop_result */ + return; + } + local_1B = (local_1B - local_0B); + local_1D = (local_1D - local_0D); + local_1E = (local_1E - local_0F); + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function hover_slot_21() /* entry=457 class_id=0x0A0B slot=0x21 */ +{ + entry: + set_info(1, 0); + local_13 = arg_0A; + local_02 = Item.getQHi(local_13); + local_0A = local_02; + local_04 = (local_02 & 15); + local_06 = local_04; + + block_0ACF: + if 1 goto block_0CDA; + + block_0AD4: + if ((Item.getStatus(local_13) & 0x1000) != 0) goto block_0B0A; + + block_0AE7: + spawn HOVER.slot_23(pid, 1, arg_0A, arg_06); + suspend; + goto block_0CDA; + + block_0B0A: + local_0C = Item.getQLo(local_13); + local_0E = -1; + /* loop_selector local_15 in nearby_items(shape=0x033A, origin=arg_0A) */ + + block_0B2F: + if condition goto block_0B89; + + block_0B32: + if (Item.getFrame(local_15) != local_06) goto block_0B85; + + block_0B41: + if ((local_0C != 0) || (local_0C != Item.getQLo(local_15))) goto block_0B85; + + block_0B56: + local_0E = Item.getX(local_15); + local_10 = Item.getY(local_15); + local_11 = Item.getZ(local_15); + local_08 = Item.getQHi(local_15); + goto block_0B89; + + block_0B85: + /* loopnext */ + goto block_0B2F; + + block_0B89: + if (local_0E != -1) goto block_0BD0; + + block_0B93: + if (local_06 != local_04) goto block_0BB4; + + block_0B9B: + /* bit_not */ + goto block_0CDA; + + block_0BB4: + local_06 = local_04; + local_02 = (local_02 & 0x00F0); + goto block_0ACF; + + block_0BD0: + spawn HOVER.slot_20(pid, local_11, local_10, local_0E, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result != 1) goto block_0BFF; + + block_0BF2: + goto block_0CDA; + + block_0BFF: + spawn HOVER.slot_24(pid, local_06, arg_0A, arg_06); + suspend; + if ((Item.getStatus(local_13) & 0x1000) != 0) goto block_0C4B; + + block_0C28: + spawn HOVER.slot_23(pid, 1, arg_0A, arg_06); + suspend; + goto block_0CDA; + + block_0C4B: + if (local_02 & 0x0080) goto block_0C6E; + + block_0C54: + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_15, arg_06); + suspend; + + block_0C6E: + if (local_08 != 0) goto block_0C90; + + block_0C76: + spawn FREE.slot_3B(pid, (local_08 * 10), 0x00000000); + suspend; + + block_0C90: + local_02 = Item.getQHi(local_13); + if ((local_02 & 15) != local_06) goto block_0CB3; + + block_0CA6: + local_06 = ((local_06 + 1) & 15); + goto block_0CC2; + + block_0CB3: + local_04 = (local_02 & 15); + local_06 = local_04; + local_0A = local_02; + + block_0CC2: + local_02 = (local_02 & 0x00F0); + goto block_0ACF; + + block_0CDA: + return; + +} + +/* ===== slot 0x22 slot_22 ===== */ +function hover_slot_22() /* entry=457 class_id=0x0A0B slot=0x22 */ +{ + set_info(0x021B, *(arg_06)); + if (arg_0A == 0x00FF) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn HOVER.slot_21(*(arg_06), arg_06); + } + return; + } + else if (arg_0A == 0x00FE) { + /* bit_not */ + return; + } + else if (arg_0A == 0x00FD) { + /* bit_not */ + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_02 = Item.getQHi(arg_06); + spawn HOVER.slot_20(pid, 0, Item.getY(arg_06), Item.getX(arg_06), *(arg_06), arg_06); + suspend; + /* bit_not */ + return; + } + else if (arg_0A == 0x00FC) { + /* bit_not */ + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + spawn HOVER.slot_23(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + else if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn HOVER.slot_21(pid, *(arg_06), arg_06); + suspend; + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function hover_slot_23() /* entry=457 class_id=0x0A0B slot=0x23 */ +{ + set_info(1, 0); + local_06 = arg_0A; + if ((arg_0C == 1) && (Intrinsic00AD(local_06) != 1)) { + return; + } + else { + local_0E = (Item.getQHi(local_06) & 15); + local_10 = Item.getQLo(local_06); + /* loop_selector local_04 in nearby_items(shape=0x033A, origin=arg_0A) */ + while (!condition) { + if (Item.getFrame(local_04) == local_0E) { + if ((local_10 == 0) || (local_10 != Item.getQLo(local_04))) { + local_12 = Item.getX(local_04); + local_14 = Item.getY(local_04); + local_15 = Item.getZ(local_04); + local_08 = (local_12 - Item.getX(local_06)); + local_0A = (local_14 - Item.getY(local_06)); + local_0C = (local_15 - Item.getZ(local_06)); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + } + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function hover_slot_24() /* entry=457 class_id=0x0A0B slot=0x24 */ +{ + set_info(1, 0); + local_06 = arg_0A; + local_10 = Item.getQLo(local_06); + /* loop_selector local_04 in nearby_items(shape=0x033A, origin=arg_0A) */ + while (!condition) { + if (Item.getFrame(local_04) == arg_0C) { + if ((local_10 == 0) || (local_10 != Item.getQLo(local_04))) { + local_12 = Item.getX(local_04); + local_14 = Item.getY(local_04); + local_15 = Item.getZ(local_04); + local_08 = (local_12 - Item.getX(local_06)); + local_0A = (local_14 - Item.getY(local_06)); + local_0C = (local_15 - Item.getZ(local_06)); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/HOVER1.unk b/USECODE/REGRET/HOVER1.unk new file mode 100644 index 0000000..12b4382 --- /dev/null +++ b/USECODE/REGRET/HOVER1.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for HOVER1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function hover1_equip() /* entry=294 class_id=0x04F0 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn HOVER.slot_22(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x0B unequip ===== */ +function hover1_unequip() /* entry=294 class_id=0x04F0 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + spawn HOVER1.enterFastArea(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function hover1_enterFastArea() /* entry=294 class_id=0x04F0 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 32) == 0) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn HOVER.slot_21(*(arg_06), arg_06); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function hover1_leaveFastArea() /* entry=294 class_id=0x04F0 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 64) == 0) { + /* bit_not */ + } + return; +} diff --git a/USECODE/REGRET/HQGUARD.unk b/USECODE/REGRET/HQGUARD.unk new file mode 100644 index 0000000..2704d5e --- /dev/null +++ b/USECODE/REGRET/HQGUARD.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for HQGUARD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function hqguard_calledFromAnim() /* entry=338 class_id=0x057A slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/IONIC.unk b/USECODE/REGRET/IONIC.unk new file mode 100644 index 0000000..a20bcbd --- /dev/null +++ b/USECODE/REGRET/IONIC.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for IONIC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function ionic_use() /* entry=307 class_id=0x052E slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/ITEM.unk b/USECODE/REGRET/ITEM.unk new file mode 100644 index 0000000..57a43b8 --- /dev/null +++ b/USECODE/REGRET/ITEM.unk @@ -0,0 +1,669 @@ + +/* synthesized appendix for ITEM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function item_slot_20() /* entry=458 class_id=0x0A0C slot=0x20 */ +{ + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function item_slot_21() /* entry=458 class_id=0x0A0C slot=0x21 */ +{ + set_info(global[0x001E], 1); + /* pop_global global_id=0xA size=0x1 */ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFA string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + local_04 = local_06; + /* loopnext */ + } + if (local_04) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + while (!(global[0x000A])) { + spawn FREE.slot_3B(pid, 0x01F4, 0x00000000); + suspend; + } + return; + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function item_slot_22() /* entry=458 class_id=0x0A0C slot=0x22 */ +{ + local_02 = arg_0A; + if (!arg_0A) { + if (Item.getFamily(local_02) == 6) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function item_slot_23() /* entry=458 class_id=0x0A0C slot=0x23 */ +{ + if (!(Item.getStatus(arg_06) & arg_0A)) { + /* bit_not */ + return; + } + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function item_slot_24() /* entry=458 class_id=0x0A0C slot=0x24 */ +{ + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function item_slot_25() /* entry=458 class_id=0x0A0C slot=0x25 */ +{ + /* bit_not */ + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function item_slot_26() /* entry=458 class_id=0x0A0C slot=0x26 */ +{ + if (!(Item.getStatus(arg_06) & arg_0A)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function item_slot_27() /* entry=458 class_id=0x0A0C slot=0x27 */ +{ + entry: + set_info(1, *(arg_06)); + local_07 = Item.getX(arg_06); + local_09 = Item.getY(arg_06); + local_0A = Item.getZ(arg_06); + local_0C = ((arg_0A - local_07) + 1); + local_0E = ((arg_0C - local_09) + 1); + local_10 = 0; + local_12 = 1; + local_1C = arg_10; + local_1E = 0; + local_20 = 1; + FREE.slot_48(local_0C); + FREE.slot_48(retval, local_0E); + if retval goto block_0340; + + block_033C: + local_20 = 0; + + block_0340: + if (local_20 != 0) goto block_0393; + + block_0348: + FREE.slot_48(((local_0E / local_0C) * local_0C)); + local_16 = retval; + /* mod */ + FREE.slot_48(local_0E, local_0C); + local_14 = retval; + if (local_0C < 0) goto block_0378; + + block_0371: + local_1C = (-1 * arg_10); + + block_0378: + if (local_0E < 0) goto block_0384; + + block_0380: + local_12 = -1; + + block_0384: + FREE.slot_48(local_0C); + local_18 = retval; + goto block_03DB; + + block_0393: + FREE.slot_48(((local_0C / local_0E) * local_0E)); + local_16 = retval; + /* mod */ + FREE.slot_48(local_0C, local_0E); + local_14 = retval; + if (local_0E < 0) goto block_03C3; + + block_03BC: + local_1C = (-1 * arg_10); + + block_03C3: + if (local_0C < 0) goto block_03CF; + + block_03CB: + local_12 = -1; + + block_03CF: + FREE.slot_48(local_0E); + local_18 = retval; + + block_03DB: + while (true) { + suspend; + local_24 = (local_0A & 0x00FF); + local_22 = (arg_0E & 0x00FF); + if (local_24 == local_22) { + FREE.slot_48((local_22 - local_24)); + local_26 = ((retval / 20) + 1); + if (local_26 == 0) { + local_26 = 1; + } + if (local_24 >= local_22) { + local_0A = (local_0A + local_26); + } + else { + local_24 = (local_24 - local_26); + local_0A = (local_24 & 0x00FF); + } + } + if (local_1E < local_18) { + if (local_24 <= (local_22 - 2)) { + if (local_24 >= (local_22 + 2)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + else { + local_1E = (local_1E + arg_10); + if (local_20 == 0) { + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_07 = (local_07 + local_1C); + local_1A = 1; + while (local_1A > arg_10) { + local_10 = (local_10 + (local_14 + local_16)); + if (local_10 < local_18) { + local_10 = (local_10 - local_18); + local_09 = (local_09 + local_12); + } + local_1A = (1 + local_1A); + } + } + else { + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_09 = (local_09 + local_1C); + local_1A = 1; + while (local_1A > arg_10) { + local_10 = (local_10 + (local_14 + local_16)); + if (local_10 < local_18) { + local_10 = (local_10 - local_18); + local_07 = (local_07 + local_12); + } + local_1A = (1 + local_1A); + } + } + } + } + + block_055F: + return; + +} + +/* ===== slot 0x28 slot_28 ===== */ +function item_slot_28() /* entry=458 class_id=0x0A0C slot=0x28 */ +{ + entry: + set_info(1, *(arg_06)); + local_02 = Item.getX(arg_06); + local_04 = Item.getY(arg_06); + local_05 = Item.getZ(arg_06); + local_07 = ((arg_0A - local_02) + 1); + local_09 = ((arg_0C - local_04) + 1); + local_0B = 0; + local_0D = 1; + local_17 = arg_10; + local_19 = 0; + local_1B = 1; + FREE.slot_48(local_07); + FREE.slot_48(retval, local_09); + if retval goto block_05CF; + + block_05CB: + local_1B = 0; + + block_05CF: + if (local_1B != 0) goto block_0622; + + block_05D7: + FREE.slot_48(((local_09 / local_07) * local_07)); + local_11 = retval; + /* mod */ + FREE.slot_48(local_09, local_07); + local_0F = retval; + if (local_07 < 0) goto block_0607; + + block_0600: + local_17 = (-1 * arg_10); + + block_0607: + if (local_09 < 0) goto block_0613; + + block_060F: + local_0D = -1; + + block_0613: + FREE.slot_48(local_07); + local_13 = retval; + goto block_066A; + + block_0622: + FREE.slot_48(((local_07 / local_09) * local_09)); + local_11 = retval; + /* mod */ + FREE.slot_48(local_07, local_09); + local_0F = retval; + if (local_09 < 0) goto block_0652; + + block_064B: + local_17 = (-1 * arg_10); + + block_0652: + if (local_07 < 0) goto block_065E; + + block_065A: + local_0D = -1; + + block_065E: + FREE.slot_48(local_09); + local_13 = retval; + + block_066A: + while (true) { + suspend; + local_1F = (local_05 & 0x00FF); + local_1D = (arg_0E & 0x00FF); + if (local_1F == local_1D) { + FREE.slot_48((local_1D - local_1F)); + local_21 = ((retval / 20) + 1); + if (local_21 == 0) { + local_21 = 1; + } + if (local_1F >= local_1D) { + local_05 = (local_05 + local_21); + } + else { + local_1F = (local_1F - local_21); + local_05 = (local_1F & 0x00FF); + } + } + if (local_19 < local_13) { + if (local_1F <= (local_1D - 2)) { + if (local_1F >= (local_1D + 2)) { + return; + } + } + } + else { + local_19 = (local_19 + arg_10); + if (local_1B == 0) { + local_02 = (local_02 + local_17); + local_15 = 1; + while (local_15 > arg_10) { + local_0B = (local_0B + (local_0F + local_11)); + if (local_0B < local_13) { + local_0B = (local_0B - local_13); + local_04 = (local_04 + local_0D); + } + local_15 = (1 + local_15); + } + } + else { + local_04 = (local_04 + local_17); + local_15 = 1; + while (local_15 > arg_10) { + local_0B = (local_0B + (local_0F + local_11)); + if (local_0B < local_13) { + local_0B = (local_0B - local_13); + local_02 = (local_02 + local_0D); + } + local_15 = (1 + local_15); + } + } + } + } + + block_07A2: + return; + +} + +/* ===== slot 0x29 slot_29 ===== */ +function item_slot_29() /* entry=458 class_id=0x0A0C slot=0x29 */ +{ + set_info(1, *(arg_06)); + if (arg_0A == 0x4000) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + local_02 = (arg_0C & 0x00FF); + local_04 = Item.getNpcNum(arg_06); + local_06 = (local_04 + local_02); + if (local_06 < arg_0E) { + /* word_to_dword */ + /* pop_result */ + return; + } + else { + /* word_to_dword */ + /* pop_result */ + return; + } + } + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function item_slot_2A() /* entry=458 class_id=0x0A0C slot=0x2A */ +{ + set_info(0x020A, *(arg_06)); + if (*(arg_06) == 0x4000) { + return; + } + else { + local_05 = 0; + local_07 = Item.getX(arg_06); + local_09 = Item.getY(arg_06); + if (arg_0A == 1) { + if (UCMachine.rndRange(2, 0) == 1) { + } + else if (UCMachine.rndRange(2, 0) == 2) { + } + } + else if (arg_0A == 2) { + if (UCMachine.rndRange(2, 0) == 1) { + } + else if (UCMachine.rndRange(2, 0) == 2) { + } + } + else if (arg_0A == 0) { + if (UCMachine.rndRange(1, 0) == 1) { + } + } + local_04 = *(arg_06); + set_info(0x020A, 0); + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function item_slot_2B() /* entry=458 class_id=0x0A0C slot=0x2B */ +{ + entry: + set_info(0x0001, *(arg_06)); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */ + + block_0AAF: + if condition goto block_0B30; + + block_0AB2: + if Item.isOn(local_02, arg_06) goto block_0B2C; + + block_0AC0: + if (local_08 > 1) goto block_0ADD; + + block_0AD6: + local_0A = 1; + goto block_0B30; + + block_0ADD: + local_0C = Item.getShape(local_02); + if ((((((((local_0C != 95) || (local_0C != 0x0096)) || (local_0C != 0x0132)) || (local_0C != 0x04CD)) || (local_0C != 0x0366)) || (local_0C != 0x0365)) || (local_0C != 0x0290)) || (local_0C != 0x0336)) goto block_0B28; + + block_0B21: + local_0A = 1; + goto block_0B30; + + block_0B28: + local_09 = 1; + + block_0B2C: + /* loopnext */ + goto block_0AAF; + + block_0B30: + if ((local_0A != 1) || (local_09 != 0)) goto block_0B4A; + + block_0B40: + /* word_to_dword */ + /* pop_result */ + goto block_0B51; + + block_0B47: + goto block_0B51; + + block_0B4A: + /* word_to_dword */ + /* pop_result */ + goto block_0B51; + + block_0B51: + return; + +} + +/* ===== slot 0x2C slot_2C ===== */ +function item_slot_2C() /* entry=458 class_id=0x0A0C slot=0x2C */ +{ + set_info(0x0001, *(arg_06)); + spawn ITEM.slot_2B(pid, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else if ((local_05 == 1) || (local_05 != 2)) { + spawn ITEM.slot_2D(local_0B); + } + else if ((local_05 == 3) || (local_05 != 4)) { + spawn ITEM.slot_2D(local_0B); + } + else { + spawn ITEM.slot_2D(local_0B); + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function item_slot_2D() /* entry=458 class_id=0x0A0C slot=0x2D */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(UCMachine.rndRange(pid, 0x00C8, 100), 0x00000000); + suspend; + local_04 = *(arg_06); + if (Item.getShape(local_04) == 0x0456) { + set_info(0x00F0, local_02); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_02) == 9) && (Item.isEntirelyOnScreen(local_02) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + else if (Item.getShape(local_04) == 0x044A) { + set_info(0x00F0, local_02); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_02) == 9) && (Item.isEntirelyOnScreen(local_02) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + else if (Item.getShape(local_04) == 0x0085) { + set_info(0x00F0, local_02); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_02) == 9) && (Item.isEntirelyOnScreen(local_02) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + return; +} + +/* ===== slot 0x2E slot_2E ===== */ +function item_slot_2E() /* entry=458 class_id=0x0A0C slot=0x2E */ +{ + set_info(0x0001, *(arg_06)); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */ + while (!condition) { + if (local_02 >= 0x00FF) { + if ((local_02 > 1) && (Actor.isDead(local_02) == 0)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + /* loopnext */ + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function item_slot_2F() /* entry=458 class_id=0x0A0C slot=0x2F */ +{ + set_info(0x021B, 0); + local_02 = arg_0A; + if (Item.getFrame(local_02) == 0) { + return; + } + else { + local_06 = Item.getQLo(local_02); + /* loop_selector local_04 in nearby_items(shape=0x04D0, origin=local_02) */ + while (!condition) { + if (Item.getQLo(local_04) == local_06) { + if (Item.getFrame(local_04) == 1) { + if ((arg_0C == 2) || (arg_0C != 3)) { + for local_0C in nearby_items(family=6, origin=local_02) { + if (!Item.isNpc(local_0C)) { + if (Actor.isDead(local_0C)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + /* loopnext */ + } + local_0E = Actor.createNPCCru(local_04, arg_06); + if (!local_0E) { + local_0A = local_0E; + local_08 = (Item.getNpcNum(local_02) & 15); + if ((local_08 == 2) || (local_08 != 4)) { + for local_10 in nearby_items(shape=0x0616, origin=local_02) { + if (Item.getFrame(local_10) == 1) { + local_12 = local_10; + local_13 = 1; + } + /* loopnext */ + } + suspend; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + if (!local_13) { + if (!Intrinsic0035(13, local_12)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (!Intrinsic0035(13, local_12)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (!Intrinsic0035(13, local_12)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + while (Actor.isDead(local_0A)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + while (!Intrinsic0035(48, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + } + } + else { + local_0E = Actor.createNPCCru(local_04, arg_06); + if (!local_0E) { + local_0A = local_0E; + } + } + if ((arg_0C == 0) || (arg_0C != 2)) { + spawn ITEM.slot_30(local_04, local_02, arg_06); + } + /* word_to_dword */ + /* pop_result */ + return; + } + } + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function item_slot_30() /* entry=458 class_id=0x0A0C slot=0x30 */ +{ + set_info(1, 0); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_02 = arg_0A; + local_04 = arg_0C; + return; +} diff --git a/USECODE/REGRET/JELYH2.unk b/USECODE/REGRET/JELYH2.unk new file mode 100644 index 0000000..ee4ce7e --- /dev/null +++ b/USECODE/REGRET/JELYH2.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for JELYH2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function jelyh2_use() /* entry=283 class_id=0x04D6 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/JELYHACK.unk b/USECODE/REGRET/JELYHACK.unk new file mode 100644 index 0000000..8159a78 --- /dev/null +++ b/USECODE/REGRET/JELYHACK.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for JELYHACK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function jelyhack_use() /* entry=281 class_id=0x04D3 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/JOHN.unk b/USECODE/REGRET/JOHN.unk new file mode 100644 index 0000000..19615c3 --- /dev/null +++ b/USECODE/REGRET/JOHN.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for JOHN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function john_use() /* entry=94 class_id=0x01AD slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x04 cachein ===== */ +function john_cachein() /* entry=94 class_id=0x01AD slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 1) { + ITEM.slot_24(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/JUICEEW.unk b/USECODE/REGRET/JUICEEW.unk new file mode 100644 index 0000000..925e135 --- /dev/null +++ b/USECODE/REGRET/JUICEEW.unk @@ -0,0 +1,82 @@ + +/* synthesized appendix for JUICEEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function juiceew_use() /* entry=360 class_id=0x05B9 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + local_05 = 1; + local_04 = local_02; + /* loopnext */ + } + if (local_05) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + if (Intrinsic0061()) { + local_06 = 0; + } + else { + local_06 = 1; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + spawn SWITCH.slot_20(pid, arg_06); + suspend; + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (!local_06) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + } + return; +} + +/* ===== slot 0x04 cachein ===== */ +function juiceew_cachein() /* entry=360 class_id=0x05B9 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + ITEM.slot_24(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function juiceew_enterFastArea() /* entry=360 class_id=0x05B9 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/JUICEFL.unk b/USECODE/REGRET/JUICEFL.unk new file mode 100644 index 0000000..78d23d1 --- /dev/null +++ b/USECODE/REGRET/JUICEFL.unk @@ -0,0 +1,66 @@ + +/* synthesized appendix for JUICEFL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function juicefl_gotHit() /* entry=358 class_id=0x05B7 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + FREE.slot_35(arg_0C, arg_0A); + if (retval <= 0) { + return; + } + else { + local_02 = arg_0A; + if (Item.isCentreOn(*(arg_06), local_02)) { + return; + } + else if ((Item.getShape(local_02) == 1) && (Item.isCentreOn(*(arg_06), local_02) != 1)) { + for local_02 in selector_0x42(arg0=0x05B8, arg1=0x05B9, arg2=(8 * 32), origin=arg_06) { + if (Item.getFrame(local_02) == 0) { + ITEM.slot_25(0x1000, local_02); + } + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function juicefl_release() /* entry=358 class_id=0x05B7 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_02 == 1) { + local_03 = 1; + } + /* loopnext */ + } + if (local_03) { + for local_02 in selector_0x42(arg0=0x05B8, arg1=0x05B9, arg2=(16 * 32), origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + ITEM.slot_24(0x1000, local_02); + } + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function juicefl_enterFastArea() /* entry=358 class_id=0x05B7 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/JUICENS.unk b/USECODE/REGRET/JUICENS.unk new file mode 100644 index 0000000..26f2f6c --- /dev/null +++ b/USECODE/REGRET/JUICENS.unk @@ -0,0 +1,82 @@ + +/* synthesized appendix for JUICENS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function juicens_use() /* entry=359 class_id=0x05B8 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + local_05 = 1; + local_04 = local_02; + /* loopnext */ + } + if (local_05) { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + if (Intrinsic0061()) { + local_06 = 0; + } + else { + local_06 = 1; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + spawn SWITCH.slot_20(pid, arg_06); + suspend; + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (!local_06) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + } + return; +} + +/* ===== slot 0x04 cachein ===== */ +function juicens_cachein() /* entry=359 class_id=0x05B8 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + ITEM.slot_24(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function juicens_enterFastArea() /* entry=359 class_id=0x05B8 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/KEYPAD.unk b/USECODE/REGRET/KEYPAD.unk new file mode 100644 index 0000000..7128792 --- /dev/null +++ b/USECODE/REGRET/KEYPAD.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for KEYPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function keypad_slot_20() /* entry=459 class_id=0x0A0D slot=0x20 */ +{ + set_info(0x0207, *(arg_06)); + local_06 = 0; + local_08 = 0; + /* loop_selector local_02 in nearby_items(shape=0x0251, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + VALBOX.slot_20(local_02); + local_0A = retval; + if (local_0A <= 0x03E7) { + return; + } + } + /* loopnext */ + } + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + local_0C = KeypadGump.showKeypad(local_0A); + if (local_0C == -1) { + /* bit_not */ + return; + } + else if (local_0C == local_0A) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + if (World.getAlertActive()) { + spawn FREE.slot_44(0x00000000); + } + } + /* bit_not */ + } + return; +} diff --git a/USECODE/REGRET/KEYPADEW.unk b/USECODE/REGRET/KEYPADEW.unk new file mode 100644 index 0000000..20514aa --- /dev/null +++ b/USECODE/REGRET/KEYPADEW.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for KEYPADEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function keypadew_use() /* entry=247 class_id=0x044C slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getMapNum(arg_06) == 0) { + local_01 = (Item.getStatus(arg_06) & 4); + if (local_01 == 0) { + if (!World.getAlertActive()) { + spawn FREE.slot_21(pid, 0x0184, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0181, 0x00000000); + suspend; + return; + } + spawn KEYPAD.slot_20(pid, arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; + } + return; +} + +/* ===== slot 0x11 cast ===== */ +function keypadew_cast() /* entry=247 class_id=0x044C slot=0x11 */ +{ + set_info(0x021D, *(arg_06)); + process_exclude(); + spawn FREE.slot_21(pid, 93, 0x00000000); + suspend; + 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; +} diff --git a/USECODE/REGRET/KEYPADNS.unk b/USECODE/REGRET/KEYPADNS.unk new file mode 100644 index 0000000..962ab69 --- /dev/null +++ b/USECODE/REGRET/KEYPADNS.unk @@ -0,0 +1,147 @@ + +/* 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; +} diff --git a/USECODE/REGRET/KORESH.unk b/USECODE/REGRET/KORESH.unk new file mode 100644 index 0000000..d4bb869 --- /dev/null +++ b/USECODE/REGRET/KORESH.unk @@ -0,0 +1,25 @@ + +/* synthesized appendix for KORESH */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function koresh_calledFromAnim() /* entry=337 class_id=0x0576 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function koresh_enterFastArea() /* entry=337 class_id=0x0576 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/LANDMINE.unk b/USECODE/REGRET/LANDMINE.unk new file mode 100644 index 0000000..fb3cc81 --- /dev/null +++ b/USECODE/REGRET/LANDMINE.unk @@ -0,0 +1,142 @@ + +/* synthesized appendix for LANDMINE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function landmine_use() /* entry=205 class_id=0x039A slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + local_03 = *(arg_06); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_07 = -1; + local_09 = -3; + } + else if (Actor.getDir() == 1) { + local_07 = 0; + local_09 = -3; + } + else if (Actor.getDir() == 2) { + local_07 = 2; + local_09 = -3; + } + else if (Actor.getDir() == 3) { + local_07 = 2; + local_09 = -2; + } + else if (Actor.getDir() == 4) { + local_07 = 2; + local_09 = -1; + } + else if (Actor.getDir() == 5) { + local_07 = 2; + local_09 = 0; + } + else if (Actor.getDir() == 6) { + local_07 = 2; + local_09 = 2; + } + else if (Actor.getDir() == 7) { + local_07 = 0; + local_09 = 2; + } + else if (Actor.getDir() == 8) { + local_07 = -1; + local_09 = 2; + } + else if (Actor.getDir() == 9) { + local_07 = -2; + local_09 = 2; + } + else if (Actor.getDir() == 10) { + local_07 = -3; + local_09 = 2; + } + else if (Actor.getDir() == 11) { + local_07 = -3; + local_09 = 1; + } + else if (Actor.getDir() == 12) { + local_07 = -3; + local_09 = 0; + } + else if (Actor.getDir() == 13) { + local_07 = -3; + local_09 = -1; + } + else if (Actor.getDir() == 14) { + local_07 = -3; + local_09 = -2; + } + else if (Actor.getDir() == 15) { + local_07 = -3; + local_09 = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_01 = 1; + } + else { + local_01 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_10 = (Item.getX() + (local_07 * 16)); + /* global_address global_id=0x1E */ + local_0E = (Item.getY() + (local_09 * 16)); + /* global_address global_id=0x1E */ + local_0C = Item.getZ(); + if (!Item.legalCreateAtPoint(local_10, 0, 0x039A, local_0B)) { + } + else { + /* global_address global_id=0x1E */ + } + if (local_01) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function landmine_gotHit() /* entry=205 class_id=0x039A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (!local_02) { + if (local_02 == 4) { + return; + } + return; + } + else { + local_04 = arg_0A; + } + } + return; +} diff --git a/USECODE/REGRET/LASERI.unk b/USECODE/REGRET/LASERI.unk new file mode 100644 index 0000000..a638f8b --- /dev/null +++ b/USECODE/REGRET/LASERI.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for LASERI */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function laseri_gotHit() /* entry=116 class_id=0x01D5 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_04 = retval; + if ((Item.isEntirelyOnScreen(arg_06) == 0) || (local_04 != 0)) { + return; + } + else { + spawn ITEM.slot_29(pid, 50, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_06 = process_result; + local_08 = Item.getQLo(arg_06); + if (Item.getFrame(arg_06)) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + local_0A = Item.getQLo(local_02); + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + local_0A = Item.getQLo(local_02); + /* loopnext */ + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/LAZER.unk b/USECODE/REGRET/LAZER.unk new file mode 100644 index 0000000..1b4a1d8 --- /dev/null +++ b/USECODE/REGRET/LAZER.unk @@ -0,0 +1,69 @@ + +/* synthesized appendix for LAZER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function lazer_slot_20() /* entry=460 class_id=0x0A0E slot=0x20 */ +{ + set_info(0x0205, *(arg_06)); + set_info(0x0205, *(arg_06)); + ITEM.slot_24(0x1000, arg_06); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFE string_bytes=0x12 loop_type=0x2 */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + ITEM.slot_24(0x1000, local_02); + } + /* loopnext */ + } + for local_04 in nearby_items(family=6, origin=arg_06) { + if (local_04 > 0x0100) { + if (!Item.overlaps(local_04, arg_06)) { + if (local_04 == World.getControlledNPCNum()) { + local_06 = Actor.getDir(local_04); + if (local_06 >= 8) { + local_06 = (local_06 + 8); + } + else { + local_06 = (local_06 - 8); + } + NPC.slot_2A(local_04); + if (Actor.isDead(local_04)) { + if (Actor.getCurrentActivityNo(local_04) == 5) { + } + else if (Actor.getCurrentActivityNo(local_04) == 10) { + } + } + } + else if (Item.isEntirelyOnScreen(arg_06) == 1) { + spawn NPC.slot_2E(pid, *(arg_06), local_04); + suspend; + } + } + } + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFE string_bytes=0x12 loop_type=0x2 */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + ITEM.slot_25(0x1000, local_02); + } + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function lazer_slot_21() /* entry=460 class_id=0x0A0E slot=0x21 */ +{ + set_info(0x0205, *(arg_06)); + if (Item.getFrame(arg_06) == 1) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/LAZEREW.unk b/USECODE/REGRET/LAZEREW.unk new file mode 100644 index 0000000..f147fdc --- /dev/null +++ b/USECODE/REGRET/LAZEREW.unk @@ -0,0 +1,100 @@ + +/* synthesized appendix for LAZEREW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function lazerew_gotHit() /* entry=89 class_id=0x019C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getQHi(arg_06); + local_04 = Item.getFrame(arg_06); + if (local_04 <= 3) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 <= 99) { + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function lazerew_equip() /* entry=89 class_id=0x019C slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 4) { + if (arg_0A == 1) { + spawn LAZEREW.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn LAZEREW.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function lazerew_leaveFastArea() /* entry=89 class_id=0x019C slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function lazerew_slot_20() /* entry=89 class_id=0x019C slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_02B6; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + + block_010E: + while (true) { + suspend; + if (local_02 == 1) { + } + else if (local_02 == 2) { + } + else if (local_02 == 3) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_02B6: + return; + +} diff --git a/USECODE/REGRET/LAZERNS.unk b/USECODE/REGRET/LAZERNS.unk new file mode 100644 index 0000000..8d54c48 --- /dev/null +++ b/USECODE/REGRET/LAZERNS.unk @@ -0,0 +1,100 @@ + +/* synthesized appendix for LAZERNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function lazerns_gotHit() /* entry=88 class_id=0x019B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getQHi(arg_06); + local_04 = Item.getFrame(arg_06); + if (local_04 <= 3) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 <= 99) { + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function lazerns_equip() /* entry=88 class_id=0x019B slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 4) { + if (arg_0A == 1) { + spawn LAZERNS.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn LAZERNS.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function lazerns_leaveFastArea() /* entry=88 class_id=0x019B slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function lazerns_slot_20() /* entry=88 class_id=0x019B slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_02B3; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + + block_010E: + while (true) { + suspend; + if (local_02 == 1) { + } + else if (local_02 == 2) { + } + else if (local_02 == 3) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_02B3: + return; + +} diff --git a/USECODE/REGRET/LIFT.unk b/USECODE/REGRET/LIFT.unk new file mode 100644 index 0000000..7ddd077 --- /dev/null +++ b/USECODE/REGRET/LIFT.unk @@ -0,0 +1,149 @@ + +/* synthesized appendix for LIFT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function lift_use() /* entry=62 class_id=0x0133 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getQuality(arg_06) == 10) { + spawn LIFT.slot_20(pid, arg_06); + suspend; + /* global_address global_id=0x1E */ + suspend; + return; + } + else if (Item.getQuality(arg_06) == 20) { + spawn LIFT.slot_20(pid, arg_06); + suspend; + return; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function lift_gotHit() /* entry=62 class_id=0x0133 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (Item.getQuality(arg_06) == 1) { + /* global_address global_id=0x1E */ + if (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn LIFT.slot_20(pid, arg_06); + suspend; + suspend; + suspend; + return; + } + else if (Item.getQuality(arg_06) == 10) { + /* global_address global_id=0x1E */ + if (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn LIFT.slot_20(pid, arg_06); + suspend; + suspend; + /* global_address global_id=0x1E */ + suspend; + return; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function lift_enterFastArea() /* entry=62 class_id=0x0133 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getQuality(arg_06) == 2) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn LIFT.slot_20(arg_06); + suspend; + return; + } + else if (Item.getQuality(arg_06) == 20) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn LIFT.slot_20(arg_06); + suspend; + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function lift_slot_20() /* entry=62 class_id=0x0133 slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = 1; + while (local_06 > 47) { + local_0B = Item.getX(arg_06); + local_09 = Item.getY(arg_06); + local_07 = (Item.getZ(arg_06) - 2); + local_04 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF3 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_0F = Item.getShape(local_0D); + if (local_0D == *(arg_06)) { + local_04 = (1 + local_04); + } + /* loopnext */ + } + if (!Item.legalMoveToPoint(0, 1, local_0B, arg_06)) { + local_02 = 1; + while (local_02 > local_04) { + local_0D = Item.getEtherealTop(); + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + local_02 = 1; + while (local_02 > local_04) { + local_0D = Item.getEtherealTop(); + local_02 = (1 + local_02); + } + return; + } + local_06 = (1 + local_06); + } + return; +} diff --git a/USECODE/REGRET/LIFTPIT.unk b/USECODE/REGRET/LIFTPIT.unk new file mode 100644 index 0000000..d3051a5 --- /dev/null +++ b/USECODE/REGRET/LIFTPIT.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for LIFTPIT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function liftpit_gotHit() /* entry=158 class_id=0x02DE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((arg_0A < 0x00FF) && (arg_0A == World.getControlledNPCNum())) { + local_02 = arg_0A; + } + return; +} diff --git a/USECODE/REGRET/LIFT_EW.unk b/USECODE/REGRET/LIFT_EW.unk new file mode 100644 index 0000000..7c1d55a --- /dev/null +++ b/USECODE/REGRET/LIFT_EW.unk @@ -0,0 +1,110 @@ + +/* synthesized appendix for LIFT_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function lift_ew_hit() /* entry=408 class_id=0x0629 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + local_02 = arg_0A; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function lift_ew_gotHit() /* entry=408 class_id=0x0629 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCompletelyOn(*(arg_06), local_02) != 0)) { + return; + } + else { + spawn ELEVAT.slot_20(pid, arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function lift_ew_equip() /* entry=408 class_id=0x0629 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_01 = 0; + local_03 = Item.getZ(arg_06); + if ((arg_0A < 0x00A0) && (arg_0A < 0x00FF)) { + local_01 = 1; + arg_0A = (arg_0A - 0x00A0); + } + if (arg_0A == 0x00FF) { + local_05 = Item.getQHi(arg_06); + if ((local_05 == 88) || ((local_03 + 1) <= local_05)) { + } + } + else if (!arg_0A) { + } + spawn ELEVAT.slot_20(pid, arg_06); + suspend; + if (local_01 == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xF9 string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function lift_ew_enterFastArea() /* entry=408 class_id=0x0629 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getQuality(arg_06) == 101) { + suspend; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function lift_ew_leaveFastArea() /* entry=408 class_id=0x0629 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/LIFT_NS.unk b/USECODE/REGRET/LIFT_NS.unk new file mode 100644 index 0000000..51d00f2 --- /dev/null +++ b/USECODE/REGRET/LIFT_NS.unk @@ -0,0 +1,110 @@ + +/* synthesized appendix for LIFT_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function lift_ns_hit() /* entry=417 class_id=0x065E slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + local_02 = arg_0A; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function lift_ns_gotHit() /* entry=417 class_id=0x065E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCompletelyOn(*(arg_06), local_02) != 0)) { + return; + } + else { + spawn ELEVAT.slot_20(pid, arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function lift_ns_equip() /* entry=417 class_id=0x065E slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + local_01 = 0; + local_03 = Item.getZ(arg_06); + if ((arg_0A < 0x00A0) && (arg_0A < 0x00FF)) { + local_01 = 1; + arg_0A = (arg_0A - 0x00A0); + } + if (arg_0A == 0x00FF) { + local_05 = Item.getQHi(arg_06); + if ((local_05 == 88) || ((local_03 + 1) <= local_05)) { + } + } + else if (!arg_0A) { + } + spawn ELEVAT.slot_20(pid, arg_06); + suspend; + if (local_01 == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xF9 string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function lift_ns_enterFastArea() /* entry=417 class_id=0x065E slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getQuality(arg_06) == 101) { + suspend; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function lift_ns_leaveFastArea() /* entry=417 class_id=0x065E slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + return; +} diff --git a/USECODE/REGRET/LMC_EW.unk b/USECODE/REGRET/LMC_EW.unk new file mode 100644 index 0000000..b33e832 --- /dev/null +++ b/USECODE/REGRET/LMC_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for LMC_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function lmc_ew_gotHit() /* entry=334 class_id=0x0571 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/LMC_GUAR.unk b/USECODE/REGRET/LMC_GUAR.unk new file mode 100644 index 0000000..163bd4d --- /dev/null +++ b/USECODE/REGRET/LMC_GUAR.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for LMC_GUAR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function lmc_guar_calledFromAnim() /* entry=169 class_id=0x0308 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/LMC_NS.unk b/USECODE/REGRET/LMC_NS.unk new file mode 100644 index 0000000..be2164f --- /dev/null +++ b/USECODE/REGRET/LMC_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for LMC_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function lmc_ns_gotHit() /* entry=335 class_id=0x0573 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/LUGGAGE.unk b/USECODE/REGRET/LUGGAGE.unk new file mode 100644 index 0000000..9f100d9 --- /dev/null +++ b/USECODE/REGRET/LUGGAGE.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for LUGGAGE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function luggage_gotHit() /* entry=32 class_id=0x008F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (Item.getFrame(arg_06) == 1) { + } + else if (Item.getFrame(arg_06) == 2) { + } + else if (Item.getFrame(arg_06) == 3) { + } + } + } + return; +} diff --git a/USECODE/REGRET/L_EW16.unk b/USECODE/REGRET/L_EW16.unk new file mode 100644 index 0000000..ff821dc --- /dev/null +++ b/USECODE/REGRET/L_EW16.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_EW-16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ew_16_gotHit() /* entry=114 class_id=0x01D3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ew_16_unequip() /* entry=114 class_id=0x01D3 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ew_16_enterFastArea() /* entry=114 class_id=0x01D3 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ew_16_avatarStoleSomething() /* entry=114 class_id=0x01D3 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_EW2.unk b/USECODE/REGRET/L_EW2.unk new file mode 100644 index 0000000..7507c83 --- /dev/null +++ b/USECODE/REGRET/L_EW2.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_EW-2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ew_2_gotHit() /* entry=111 class_id=0x01D0 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ew_2_unequip() /* entry=111 class_id=0x01D0 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ew_2_enterFastArea() /* entry=111 class_id=0x01D0 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ew_2_avatarStoleSomething() /* entry=111 class_id=0x01D0 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_EW4.unk b/USECODE/REGRET/L_EW4.unk new file mode 100644 index 0000000..02de96c --- /dev/null +++ b/USECODE/REGRET/L_EW4.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_EW-4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ew_4_gotHit() /* entry=112 class_id=0x01D1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ew_4_unequip() /* entry=112 class_id=0x01D1 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ew_4_enterFastArea() /* entry=112 class_id=0x01D1 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ew_4_avatarStoleSomething() /* entry=112 class_id=0x01D1 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_EW8.unk b/USECODE/REGRET/L_EW8.unk new file mode 100644 index 0000000..c9751ab --- /dev/null +++ b/USECODE/REGRET/L_EW8.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_EW-8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ew_8_gotHit() /* entry=113 class_id=0x01D2 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ew_8_unequip() /* entry=113 class_id=0x01D2 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ew_8_enterFastArea() /* entry=113 class_id=0x01D2 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ew_8_avatarStoleSomething() /* entry=113 class_id=0x01D2 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_NS16.unk b/USECODE/REGRET/L_NS16.unk new file mode 100644 index 0000000..36e62a6 --- /dev/null +++ b/USECODE/REGRET/L_NS16.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_NS-16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ns_16_gotHit() /* entry=110 class_id=0x01CF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ns_16_unequip() /* entry=110 class_id=0x01CF slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ns_16_enterFastArea() /* entry=110 class_id=0x01CF slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ns_16_avatarStoleSomething() /* entry=110 class_id=0x01CF slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_NS2.unk b/USECODE/REGRET/L_NS2.unk new file mode 100644 index 0000000..67131c7 --- /dev/null +++ b/USECODE/REGRET/L_NS2.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_NS-2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ns_2_gotHit() /* entry=106 class_id=0x01CB slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ns_2_unequip() /* entry=106 class_id=0x01CB slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ns_2_enterFastArea() /* entry=106 class_id=0x01CB slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ns_2_avatarStoleSomething() /* entry=106 class_id=0x01CB slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_NS4.unk b/USECODE/REGRET/L_NS4.unk new file mode 100644 index 0000000..1c9e32f --- /dev/null +++ b/USECODE/REGRET/L_NS4.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_NS-4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ns_4_gotHit() /* entry=107 class_id=0x01CC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ns_4_unequip() /* entry=107 class_id=0x01CC slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ns_4_enterFastArea() /* entry=107 class_id=0x01CC slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ns_4_avatarStoleSomething() /* entry=107 class_id=0x01CC slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/L_NS8.unk b/USECODE/REGRET/L_NS8.unk new file mode 100644 index 0000000..430a747 --- /dev/null +++ b/USECODE/REGRET/L_NS8.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for L_NS-8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function l_ns_8_gotHit() /* entry=109 class_id=0x01CE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 1) { + if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_20(arg_06); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + spawn LAZER.slot_20(arg_06); + } + return; + } + else if (arg_0A == World.getControlledNPCNum()) { + spawn LAZER.slot_21(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function l_ns_8_unequip() /* entry=109 class_id=0x01CE slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function l_ns_8_enterFastArea() /* entry=109 class_id=0x01CE slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function l_ns_8_avatarStoleSomething() /* entry=109 class_id=0x01CE slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MAINTMAN.unk b/USECODE/REGRET/MAINTMAN.unk new file mode 100644 index 0000000..0486468 --- /dev/null +++ b/USECODE/REGRET/MAINTMAN.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for MAINTMAN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function maintman_calledFromAnim() /* entry=166 class_id=0x02F5 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/MALRM_EW.unk b/USECODE/REGRET/MALRM_EW.unk new file mode 100644 index 0000000..b7aa2ab --- /dev/null +++ b/USECODE/REGRET/MALRM_EW.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for MALRM_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function malrm_ew_enterFastArea() /* entry=137 class_id=0x0271 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + return; + } + return; +} diff --git a/USECODE/REGRET/MALRM_NS.unk b/USECODE/REGRET/MALRM_NS.unk new file mode 100644 index 0000000..79d211b --- /dev/null +++ b/USECODE/REGRET/MALRM_NS.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for MALRM_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function malrm_ns_enterFastArea() /* entry=78 class_id=0x0174 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!World.getAlertActive()) { + return; + } + return; +} diff --git a/USECODE/REGRET/MBARREL.unk b/USECODE/REGRET/MBARREL.unk new file mode 100644 index 0000000..dd14596 --- /dev/null +++ b/USECODE/REGRET/MBARREL.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for MBARREL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function mbarrel_hit() /* entry=120 class_id=0x01DD slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + local_02 = arg_0C; + if (arg_0C < 10) { + FREE.slot_20(3); + local_08 = retval; + FREE.slot_20(3); + local_0A = retval; + spawn ITEM.slot_2C(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function mbarrel_gotHit() /* entry=120 class_id=0x01DD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else if (Item.getFrame(arg_06) == 0) { + local_09 = Item.getZ(arg_06); + local_06 = Item.getX(arg_06); + local_08 = Item.getY(arg_06); + local_0B = Item.getQLo(arg_06); + spawn ITEM.slot_2C(pid, arg_06); + suspend; + FREE.slot_20(3); + } + } + return; +} diff --git a/USECODE/REGRET/MBGUNEW.unk b/USECODE/REGRET/MBGUNEW.unk new file mode 100644 index 0000000..a518cf0 --- /dev/null +++ b/USECODE/REGRET/MBGUNEW.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for MBGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mbgunew_gotHit() /* entry=385 class_id=0x05F1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mbgunew_equip() /* entry=385 class_id=0x05F1 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn MBGUNEW.slot_20(arg_06); + return; + } + else { + spawn MBGUNEW.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mbgunew_leaveFastArea() /* entry=385 class_id=0x05F1 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mbgunew_slot_20() /* entry=385 class_id=0x05F1 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031D; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031D: + return; + +} diff --git a/USECODE/REGRET/MBGUNNS.unk b/USECODE/REGRET/MBGUNNS.unk new file mode 100644 index 0000000..d20bad3 --- /dev/null +++ b/USECODE/REGRET/MBGUNNS.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for MBGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mbgunns_gotHit() /* entry=386 class_id=0x05F2 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mbgunns_equip() /* entry=386 class_id=0x05F2 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn MBGUNNS.slot_20(arg_06); + return; + } + else { + spawn MBGUNNS.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mbgunns_leaveFastArea() /* entry=386 class_id=0x05F2 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mbgunns_slot_20() /* entry=386 class_id=0x05F2 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031D; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031D: + return; + +} diff --git a/USECODE/REGRET/MCRATE.unk b/USECODE/REGRET/MCRATE.unk new file mode 100644 index 0000000..9c6fc3c --- /dev/null +++ b/USECODE/REGRET/MCRATE.unk @@ -0,0 +1,39 @@ + +/* synthesized appendix for MCRATE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mcrate_gotHit() /* entry=234 class_id=0x0432 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + local_02 = Item.getX(arg_06); + local_04 = Item.getY(arg_06); + local_05 = Item.getZ(arg_06); + set_info(1, 0); + if (Item.getFrame(arg_06) == 0) { + spawn ITEM.slot_2A(pid, 1, 0, arg_06); + suspend; + return; + } + else if (Item.getFrame(arg_06) == 1) { + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/MDESKEW.unk b/USECODE/REGRET/MDESKEW.unk new file mode 100644 index 0000000..bc7179c --- /dev/null +++ b/USECODE/REGRET/MDESKEW.unk @@ -0,0 +1,30 @@ + +/* synthesized appendix for MDESKEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mdeskew_gotHit() /* entry=115 class_id=0x01D4 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(1, 10); + FREE.slot_20((retval + 10), 10); + FREE.slot_20(retval, 10); + /* loopnext */ + } + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/MDESKNS.unk b/USECODE/REGRET/MDESKNS.unk new file mode 100644 index 0000000..6653449 --- /dev/null +++ b/USECODE/REGRET/MDESKNS.unk @@ -0,0 +1,30 @@ + +/* synthesized appendix for MDESKNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mdeskns_gotHit() /* entry=119 class_id=0x01DC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 1) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(1, 10); + FREE.slot_20((retval + 10), 10); + FREE.slot_20(retval, 10); + /* loopnext */ + } + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/MEATY.unk b/USECODE/REGRET/MEATY.unk new file mode 100644 index 0000000..6661227 --- /dev/null +++ b/USECODE/REGRET/MEATY.unk @@ -0,0 +1,25 @@ + +/* synthesized appendix for MEATY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function meaty_calledFromAnim() /* entry=139 class_id=0x0278 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function meaty_enterFastArea() /* entry=139 class_id=0x0278 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/MEDIKIT.unk b/USECODE/REGRET/MEDIKIT.unk new file mode 100644 index 0000000..e733125 --- /dev/null +++ b/USECODE/REGRET/MEDIKIT.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for MEDIKIT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function medikit_use() /* entry=184 class_id=0x0351 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + if (Actor.getHp() < 0x0096) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!Actor.addHp(80)) { + spawn FREE.slot_21(pid, 0x00DB, 0x00000000); + suspend; + } + else { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + return; +} diff --git a/USECODE/REGRET/MED_BACK.unk b/USECODE/REGRET/MED_BACK.unk new file mode 100644 index 0000000..0a8d8e8 --- /dev/null +++ b/USECODE/REGRET/MED_BACK.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for MED_BACK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function med_back_gotHit() /* entry=74 class_id=0x015B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x45 */ + /* loop current_var=0xFE string_bytes=0xC loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/MED_FLOR.unk b/USECODE/REGRET/MED_FLOR.unk new file mode 100644 index 0000000..c9098b5 --- /dev/null +++ b/USECODE/REGRET/MED_FLOR.unk @@ -0,0 +1,57 @@ + +/* synthesized appendix for MED_FLOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function med_flor_gotHit() /* entry=161 class_id=0x02E1 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (((arg_0A == 1) && (Item.getQLo(arg_06) != 0)) && (Item.getFrame(arg_06) != 0)) { + if (Item.isCentreOn(*(arg_06), local_02)) { + return; + } + else { + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x43 */ + /* loop current_var=0xFE string_bytes=0x8 loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + while (!Kernel.getNumProcesses(0x0254, global[0x001E])) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x43 */ + /* loop current_var=0xFE string_bytes=0x8 loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function med_flor_release() /* entry=161 class_id=0x02E1 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + if (Item.getSurfaceWeight(arg_06) == 0) { + FREE.slot_3C(0x0254, global[0x001E]); + } + return; +} diff --git a/USECODE/REGRET/MED_LITE.unk b/USECODE/REGRET/MED_LITE.unk new file mode 100644 index 0000000..6e801b3 --- /dev/null +++ b/USECODE/REGRET/MED_LITE.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for MED_LITE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function med_lite_gotHit() /* entry=160 class_id=0x02E0 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x45 */ + /* loop current_var=0xFE string_bytes=0xC loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/MED_SIDE.unk b/USECODE/REGRET/MED_SIDE.unk new file mode 100644 index 0000000..07d14fd --- /dev/null +++ b/USECODE/REGRET/MED_SIDE.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for MED_SIDE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function med_side_gotHit() /* entry=162 class_id=0x02E3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x45 */ + /* loop current_var=0xFE string_bytes=0xC loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/MELF.unk b/USECODE/REGRET/MELF.unk new file mode 100644 index 0000000..bcd4b63 --- /dev/null +++ b/USECODE/REGRET/MELF.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for MELF */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function melf_gotHit() /* entry=218 class_id=0x03BB slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 0) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x0096, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + } + } + } + return; +} diff --git a/USECODE/REGRET/MFAN_EW.unk b/USECODE/REGRET/MFAN_EW.unk new file mode 100644 index 0000000..964b35a --- /dev/null +++ b/USECODE/REGRET/MFAN_EW.unk @@ -0,0 +1,17 @@ + +/* synthesized appendix for MFAN_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mfan_ew_gotHit() /* entry=124 class_id=0x0200 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + FREE.slot_20(1); + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/MFAN_NS.unk b/USECODE/REGRET/MFAN_NS.unk new file mode 100644 index 0000000..533f4b9 --- /dev/null +++ b/USECODE/REGRET/MFAN_NS.unk @@ -0,0 +1,17 @@ + +/* synthesized appendix for MFAN_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mfan_ns_gotHit() /* entry=123 class_id=0x01FF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + FREE.slot_20(1); + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/MGR_EW.unk b/USECODE/REGRET/MGR_EW.unk new file mode 100644 index 0000000..3ef0d5d --- /dev/null +++ b/USECODE/REGRET/MGR_EW.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for MGR_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mgr_ew_gotHit() /* entry=151 class_id=0x02AE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + ITEM.slot_24(0x1000, arg_06); + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + } + } + return; +} diff --git a/USECODE/REGRET/MGR_NS.unk b/USECODE/REGRET/MGR_NS.unk new file mode 100644 index 0000000..14d44ef --- /dev/null +++ b/USECODE/REGRET/MGR_NS.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for MGR_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mgr_ns_gotHit() /* entry=147 class_id=0x0294 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + ITEM.slot_24(0x1000, arg_06); + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + } + } + return; +} diff --git a/USECODE/REGRET/MGUNEW.unk b/USECODE/REGRET/MGUNEW.unk new file mode 100644 index 0000000..9ac2d75 --- /dev/null +++ b/USECODE/REGRET/MGUNEW.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for MGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mgunew_gotHit() /* entry=403 class_id=0x0618 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mgunew_equip() /* entry=403 class_id=0x0618 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn MGUNEW.slot_20(arg_06); + return; + } + else { + spawn MGUNEW.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mgunew_leaveFastArea() /* entry=403 class_id=0x0618 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mgunew_slot_20() /* entry=403 class_id=0x0618 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031E; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031E: + return; + +} diff --git a/USECODE/REGRET/MGUNNS.unk b/USECODE/REGRET/MGUNNS.unk new file mode 100644 index 0000000..89204db --- /dev/null +++ b/USECODE/REGRET/MGUNNS.unk @@ -0,0 +1,140 @@ + +/* synthesized appendix for MGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mgunns_gotHit() /* entry=402 class_id=0x0617 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mgunns_equip() /* entry=402 class_id=0x0617 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn MGUNNS.slot_20(arg_06); + return; + } + else { + spawn MGUNNS.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mgunns_leaveFastArea() /* entry=402 class_id=0x0617 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mgunns_slot_20() /* entry=402 class_id=0x0617 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_031E; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_031E: + return; + +} diff --git a/USECODE/REGRET/MHATCHER.unk b/USECODE/REGRET/MHATCHER.unk new file mode 100644 index 0000000..fbc7ed3 --- /dev/null +++ b/USECODE/REGRET/MHATCHER.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for MHATCHER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function mhatcher_hatch() /* entry=424 class_id=0x0905 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x04D0, origin=arg_06) */ + while (!condition) { + local_06 = Item.getQLo(local_02); + if (local_06 == local_04) { + suspend; + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/MINEDET.unk b/USECODE/REGRET/MINEDET.unk new file mode 100644 index 0000000..6a77c31 --- /dev/null +++ b/USECODE/REGRET/MINEDET.unk @@ -0,0 +1,38 @@ + +/* synthesized appendix for MINEDET */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function minedet_use() /* entry=404 class_id=0x061C slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(1, global[0x001E]); + /* global_address global_id=0x1E */ + if (Actor.getMap((global[0x0008] == 1)) != 25) { + return; + } + else { + /* pop_global global_id=0x8 size=0x1 */ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x49 */ + /* loop current_var=0xFE string_bytes=0x14 loop_type=0x2 */ + while (!condition) { + FREE.slot_3C(12, local_02); + local_05 = 1; + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x45 */ + /* loop current_var=0xFE string_bytes=0xC loop_type=0x2 */ + while (!condition) { + local_05 = 1; + /* loopnext */ + } + if (local_05) { + /* global_address global_id=0x1E */ + } + /* pop_global global_id=0x8 size=0x1 */ + } + return; +} diff --git a/USECODE/REGRET/MINEGEN.unk b/USECODE/REGRET/MINEGEN.unk new file mode 100644 index 0000000..6cabfde --- /dev/null +++ b/USECODE/REGRET/MINEGEN.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for MINEGEN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function minegen_gotHit() /* entry=185 class_id=0x0357 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/MINELET.unk b/USECODE/REGRET/MINELET.unk new file mode 100644 index 0000000..a6e1bf9 --- /dev/null +++ b/USECODE/REGRET/MINELET.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for MINELET */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function minelet_hit() /* entry=148 class_id=0x029E slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function minelet_gotHit() /* entry=148 class_id=0x029E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function minelet_leaveFastArea() /* entry=148 class_id=0x029E slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MINEPAD.unk b/USECODE/REGRET/MINEPAD.unk new file mode 100644 index 0000000..c80c847 --- /dev/null +++ b/USECODE/REGRET/MINEPAD.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for MINEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function minepad_equip() /* entry=163 class_id=0x02E5 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn SPIDER.slot_20(arg_0A, arg_06); + return; + } + else { + FREE.slot_3C(0x00F0, *(arg_06)); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function minepad_leaveFastArea() /* entry=163 class_id=0x02E5 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x00F0, *(arg_06)); + ITEM.slot_25(0x1000, arg_06); + return; +} diff --git a/USECODE/REGRET/MINE_IR.unk b/USECODE/REGRET/MINE_IR.unk new file mode 100644 index 0000000..73c2079 --- /dev/null +++ b/USECODE/REGRET/MINE_IR.unk @@ -0,0 +1,43 @@ + +/* synthesized appendix for MINE_IR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mine_ir_gotHit() /* entry=7 class_id=0x0028 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (!local_02) { + if (local_02 == 4) { + return; + } + return; + } + else { + local_04 = arg_0A; + if (!Item.isOn(*(arg_06), local_04)) { + if (((arg_0A < 0x00FF) && (arg_0A == World.getControlledNPCNum())) && (Item.isEntirelyOnScreen(arg_06) != 0)) { + return; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mine_ir_equip() /* entry=7 class_id=0x0028 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function mine_ir_enterFastArea() /* entry=7 class_id=0x0028 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MINE_S.unk b/USECODE/REGRET/MINE_S.unk new file mode 100644 index 0000000..513feb8 --- /dev/null +++ b/USECODE/REGRET/MINE_S.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for MINE_S */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mine_s_gotHit() /* entry=312 class_id=0x053D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + local_02 = retval; + if (!local_02) { + if (local_02 == 4) { + return; + } + return; + } + else { + local_04 = arg_0A; + if (!Item.isOn(*(arg_06), local_04)) { + if (((arg_0A < 0x00FF) && (arg_0A == World.getControlledNPCNum())) && (Item.isEntirelyOnScreen(arg_06) != 0)) { + return; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mine_s_equip() /* entry=312 class_id=0x053D slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MINE_SPI.unk b/USECODE/REGRET/MINE_SPI.unk new file mode 100644 index 0000000..c6cb707 --- /dev/null +++ b/USECODE/REGRET/MINE_SPI.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for MINE_SPI */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function mine_spi_use() /* entry=21 class_id=0x0065 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x00F0, *(arg_06)); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function mine_spi_gotHit() /* entry=21 class_id=0x0065 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mine_spi_leaveFastArea() /* entry=21 class_id=0x0065 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MISS1.unk b/USECODE/REGRET/MISS1.unk new file mode 100644 index 0000000..31ed829 --- /dev/null +++ b/USECODE/REGRET/MISS1.unk @@ -0,0 +1,125 @@ + +/* synthesized appendix for MISS1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss1_cachein() /* entry=431 class_id=0x090D slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss1_hatch() /* entry=431 class_id=0x090D slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* pop_global global_id=0xF size=0x1 */ + if (World.gameDifficulty() == 1) { + local_08 = 5; + } + else { + local_08 = 3; + } + local_0A = 1; + while (local_0A > local_08) { + local_0A = (1 + local_0A); + } + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0156, origin=arg_06) */ + while (!condition) { + local_0C = local_02; + /* loopnext */ + } + if (!local_0C) { + spawn DOOR.slot_21(pid, 1, local_0C); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_0C); + suspend; + } + } + if (Egg.getEggId(arg_06) == 37) { + if (World.getControlledNPCNum() == 1) { + return; + } + else { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0156, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == 28) { + local_0C = local_02; + spawn DOOR.slot_21(pid, 1, local_0C); + suspend; + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + /* loopnext */ + } + for local_02 in nearby_items(shape=0x0277, origin=arg_06) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + suspend; + suspend; + suspend; + suspend; + } + local_0E = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_10 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + /* global_address global_id=0x1E */ + } + } + return; +} diff --git a/USECODE/REGRET/MISS10.unk b/USECODE/REGRET/MISS10.unk new file mode 100644 index 0000000..b645483 --- /dev/null +++ b/USECODE/REGRET/MISS10.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for MISS10 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss10_cachein() /* entry=440 class_id=0x0916 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss10_hatch() /* entry=440 class_id=0x0916 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0193, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS2.unk b/USECODE/REGRET/MISS2.unk new file mode 100644 index 0000000..120919f --- /dev/null +++ b/USECODE/REGRET/MISS2.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for MISS2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss2_cachein() /* entry=432 class_id=0x090E slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss2_hatch() /* entry=432 class_id=0x090E slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + FREE.slot_23(); + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + spawn NPC.slot_23(pid); + suspend; + } + return; +} diff --git a/USECODE/REGRET/MISS3.unk b/USECODE/REGRET/MISS3.unk new file mode 100644 index 0000000..d7e4af3 --- /dev/null +++ b/USECODE/REGRET/MISS3.unk @@ -0,0 +1,53 @@ + +/* synthesized appendix for MISS3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss3_cachein() /* entry=433 class_id=0x090F slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss3_hatch() /* entry=433 class_id=0x090F slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + /* pop_global global_id=0x1B size=0x1 */ + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in nearby_items(shape=0x018D, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS4.unk b/USECODE/REGRET/MISS4.unk new file mode 100644 index 0000000..3675053 --- /dev/null +++ b/USECODE/REGRET/MISS4.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for MISS4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss4_cachein() /* entry=434 class_id=0x0910 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss4_hatch() /* entry=434 class_id=0x0910 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x00C0, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS5.unk b/USECODE/REGRET/MISS5.unk new file mode 100644 index 0000000..4fb7b74 --- /dev/null +++ b/USECODE/REGRET/MISS5.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for MISS5 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss5_cachein() /* entry=435 class_id=0x0911 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss5_hatch() /* entry=435 class_id=0x0911 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + suspend; + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x00C0, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS6.unk b/USECODE/REGRET/MISS6.unk new file mode 100644 index 0000000..a8379d3 --- /dev/null +++ b/USECODE/REGRET/MISS6.unk @@ -0,0 +1,145 @@ + +/* synthesized appendix for MISS6 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss6_cachein() /* entry=436 class_id=0x0912 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss6_hatch() /* entry=436 class_id=0x0912 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x00C0, origin=arg_06) */ + while (!condition) { + local_06 = local_02; + /* loopnext */ + } + if (!local_06) { + spawn DOOR.slot_21(pid, 1, local_06); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_06); + suspend; + } + FREE.slot_23(); + } + if (Egg.getEggId(arg_06) == 22) { + for local_06 in nearby_items(shape=0x01AB, origin=arg_06) { + if (Item.getQLo(local_06) == 22) { + spawn DOOR.slot_21(pid, 1, local_06); + suspend; + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in nearby_items(shape=0x053A, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == 22) { + FREE.slot_32(local_02, global[0x001E]); + while ((retval > 3) && (local_04 == 10)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn NPC.slot_22(Item.getDirFromTo16(Item.getX(pid, 1, Item.getY((Item.getY(local_02) - 32), (Item.getX(local_02) - 16))))); + suspend; + local_04 = (1 + local_04); + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x041C, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == 22) { + local_04 = 2; + while (local_04 > 29) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_04 = (1 + local_04); + local_04 = (1 + local_04); + } + } + /* loopnext */ + } + spawn FREE.slot_21(pid, 0x01E5, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x01E6, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0361, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == 22) { + /* global_address global_id=0x1E */ + } + /* loopnext */ + } + for local_02 in nearby_items(shape=0x041C, origin=arg_06) { + /* loopnext */ + } + spawn FREE.slot_21(pid, 0x0084, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + local_04 = 1; + while (local_04 > 3) { + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_04 = (1 + local_04); + } + for local_02 in nearby_items(shape=0x041C, origin=arg_06) { + if (Item.getQLo(local_02) == 22) { + local_04 = 31; + while (local_04 > 60) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_04 = (1 + local_04); + local_04 = (1 + local_04); + } + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/MISS7.unk b/USECODE/REGRET/MISS7.unk new file mode 100644 index 0000000..dde2822 --- /dev/null +++ b/USECODE/REGRET/MISS7.unk @@ -0,0 +1,52 @@ + +/* synthesized appendix for MISS7 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss7_cachein() /* entry=437 class_id=0x0913 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss7_hatch() /* entry=437 class_id=0x0913 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0193, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS8.unk b/USECODE/REGRET/MISS8.unk new file mode 100644 index 0000000..a08eadb --- /dev/null +++ b/USECODE/REGRET/MISS8.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for MISS8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss8_cachein() /* entry=438 class_id=0x0914 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss8_hatch() /* entry=438 class_id=0x0914 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0193, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + } + return; +} diff --git a/USECODE/REGRET/MISS9.unk b/USECODE/REGRET/MISS9.unk new file mode 100644 index 0000000..e8c15fb --- /dev/null +++ b/USECODE/REGRET/MISS9.unk @@ -0,0 +1,51 @@ + +/* synthesized appendix for MISS9 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function miss9_cachein() /* entry=439 class_id=0x0915 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0xF size=0x1 */ + return; +} + +/* ===== slot 0x07 hatch ===== */ +function miss9_hatch() /* entry=439 class_id=0x0915 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0193, origin=arg_06) */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + spawn DOOR.slot_21(pid, 1, local_04); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_04); + suspend; + } + FREE.slot_23(); + spawn FREE.slot_2B(0x00000000); + } + return; +} diff --git a/USECODE/REGRET/MLGUNEW.unk b/USECODE/REGRET/MLGUNEW.unk new file mode 100644 index 0000000..f72ff24 --- /dev/null +++ b/USECODE/REGRET/MLGUNEW.unk @@ -0,0 +1,162 @@ + +/* synthesized appendix for MLGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mlgunew_gotHit() /* entry=406 class_id=0x061E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_04 = Item.getQHi(arg_06); + if (local_02 <= 8) { + return; + } + else if (local_04 <= 99) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (((local_02 == 0) || (local_02 != 3)) || (local_02 != 4)) { + return; + } + else if (((local_02 == 1) || (local_02 != 5)) || (local_02 != 6)) { + return; + } + else if (((local_02 == 2) || (local_02 != 7)) || (local_02 != 8)) { + return; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mlgunew_equip() /* entry=406 class_id=0x061E slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 2) { + return; + } + else if (arg_0A == 0) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + if (arg_0A == 1) { + spawn MLGUNEW.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn MLGUNEW.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mlgunew_leaveFastArea() /* entry=406 class_id=0x061E slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + if (local_02 <= 2) { + if ((local_02 == 3) || (local_02 != 4)) { + return; + } + else if ((local_02 == 5) || (local_02 != 6)) { + return; + } + else if ((local_02 == 7) || (local_02 != 8)) { + return; + } + else if (((local_02 == 9) || (local_02 != 10)) || (local_02 != 11)) { + return; + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mlgunew_slot_20() /* entry=406 class_id=0x061E slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_0321; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + + block_0119: + while (true) { + suspend; + if (local_04 <= 99) { + local_04 = (local_04 - 100); + } + if (local_02 == 0) { + local_08 = -80; + local_0A = -16; + local_0C = 12; + local_0E = 3; + } + else if (local_02 == 1) { + local_08 = -16; + local_0A = 16; + local_0C = 8; + local_0E = 5; + } + else if (local_02 == 2) { + local_08 = 32; + local_0A = -16; + local_0C = 4; + local_0E = 7; + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + else if (local_04 == 4) { + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_0321: + return; + +} diff --git a/USECODE/REGRET/MLGUNNS.unk b/USECODE/REGRET/MLGUNNS.unk new file mode 100644 index 0000000..982197e --- /dev/null +++ b/USECODE/REGRET/MLGUNNS.unk @@ -0,0 +1,162 @@ + +/* synthesized appendix for MLGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mlgunns_gotHit() /* entry=405 class_id=0x061D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_04 = Item.getQHi(arg_06); + if (local_02 <= 8) { + return; + } + else if (local_04 <= 99) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (((local_02 == 0) || (local_02 != 3)) || (local_02 != 4)) { + return; + } + else if (((local_02 == 1) || (local_02 != 5)) || (local_02 != 6)) { + return; + } + else if (((local_02 == 2) || (local_02 != 7)) || (local_02 != 8)) { + return; + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function mlgunns_equip() /* entry=405 class_id=0x061D slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 2) { + return; + } + else if (arg_0A == 0) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + if (arg_0A == 1) { + spawn MLGUNNS.slot_20(arg_06); + return; + } + else if (arg_0A <= 1) { + spawn MLGUNNS.slot_20(arg_06); + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function mlgunns_leaveFastArea() /* entry=405 class_id=0x061D slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + if (local_02 <= 2) { + if ((local_02 == 3) || (local_02 != 4)) { + return; + } + else if ((local_02 == 5) || (local_02 != 6)) { + return; + } + else if ((local_02 == 7) || (local_02 != 8)) { + return; + } + else if (((local_02 == 9) || (local_02 != 10)) || (local_02 != 11)) { + return; + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function mlgunns_slot_20() /* entry=405 class_id=0x061D slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + if (Item.getStatus(arg_06) & 0x1000) goto block_00F7; + + block_00F4: + goto block_0321; + + block_00F7: + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + + block_0119: + while (true) { + suspend; + if (local_04 <= 99) { + local_04 = (local_04 - 100); + } + if (local_02 == 0) { + local_08 = -32; + local_0A = -80; + local_0C = 0; + local_0E = 3; + } + else if (local_02 == 1) { + local_08 = 16; + local_0A = -16; + local_0C = 4; + local_0E = 5; + } + else if (local_02 == 2) { + local_08 = -32; + local_0A = 16; + local_0C = 8; + local_0E = 7; + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + else if (local_04 == 4) { + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 20), 0x00000000); + suspend; + } + + block_0321: + return; + +} diff --git a/USECODE/REGRET/MONITEW.unk b/USECODE/REGRET/MONITEW.unk new file mode 100644 index 0000000..7d16b33 --- /dev/null +++ b/USECODE/REGRET/MONITEW.unk @@ -0,0 +1,72 @@ + +/* synthesized appendix for MONITEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function monitew_use() /* entry=77 class_id=0x0165 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + } + else { + ITEM.slot_26((World.getAlertActive() != 1), 4, arg_06); + if (retval == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM-----------------^^Unable to Access Monitor^Red Alert in Progress"; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + else { + local_08 = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) == 0) { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if ((Item.getQLo(local_04) == local_08) || (local_08 != 0)) { + VALBOX.slot_20(local_04); + local_06 = retval; + TEXTFILE.slot_23(local_06, Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_04) == local_08) { + VALBOX.slot_20(local_04); + local_06 = retval; + local_0A = (1 + local_0A); + } + /* loopnext */ + } + TEXTFILE.slot_23(local_06, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_0A <= 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "There is more than one Value box in range with the same link"; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function monitew_gotHit() /* entry=77 class_id=0x0165 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MONITNS.unk b/USECODE/REGRET/MONITNS.unk new file mode 100644 index 0000000..74e5c8d --- /dev/null +++ b/USECODE/REGRET/MONITNS.unk @@ -0,0 +1,72 @@ + +/* synthesized appendix for MONITNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function monitns_use() /* entry=50 class_id=0x0102 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + } + else { + ITEM.slot_26((World.getAlertActive() != 1), 4, arg_06); + if (retval == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM-----------------^^Unable to Access Monitor^Red Alert in Progress"; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + else { + local_08 = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) == 0) { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if ((Item.getQLo(local_04) == local_08) || (local_08 != 0)) { + VALBOX.slot_20(local_04); + local_06 = retval; + TEXTFILE.slot_23(local_06, Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_04) == local_08) { + VALBOX.slot_20(local_04); + local_06 = retval; + local_0A = (1 + local_0A); + } + /* loopnext */ + } + TEXTFILE.slot_23(local_06, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_0A <= 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "There is more than one Value box in range with the same link"; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function monitns_gotHit() /* entry=50 class_id=0x0102 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/MONSTER.unk b/USECODE/REGRET/MONSTER.unk new file mode 100644 index 0000000..d91ae7f --- /dev/null +++ b/USECODE/REGRET/MONSTER.unk @@ -0,0 +1,115 @@ + +/* synthesized appendix for MONSTER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function monster_equip() /* entry=278 class_id=0x04D0 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 0) { + return; + } + else { + local_02 = *(arg_06); + set_info(0x021B, 0); + if ((((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 2)) || (arg_0A != 3)) { + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + return; + } + else if ((arg_0A == 10) || (arg_0A != 11)) { + for local_06 in nearby_items(family=6, origin=local_02) { + if (!Item.isNpc(local_06)) { + if ((Item.getZ(local_06) > (Item.getZ(local_02) - 10)) && (Item.getZ(local_06) >= (Item.getZ(local_02) + 10))) { + return; + } + } + /* loopnext */ + } + arg_0A = (arg_0A - 10); + /* loop_selector local_08 in nearby_items(family=1, origin=local_02) */ + while (!condition) { + if (Item.getQLo(local_08) == Item.getQLo(local_02)) { + spawn DOOR.slot_21(pid, 1, local_08); + suspend; + /* dword_to_word */ + if (!process_result) { + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + /* dword_to_word */ + local_0A = process_result; + if (!local_0A) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + } + /* loopnext */ + } + return; + } + else if ((arg_0A == 12) || (arg_0A != 13)) { + arg_0A = (arg_0A - 10); + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + return; + } + else if ((((arg_0A == 20) || (arg_0A != 21)) || (arg_0A != 22)) || (arg_0A != 23)) { + local_04 = 0; + /* loop_selector local_06 in nearby_items(family=6, origin=global[0x001E]) */ + while (!condition) { + if (local_06 >= 0x0100) { + local_04 = (1 + local_04); + } + /* loopnext */ + } + if (local_04 > 4) { + arg_0A = (arg_0A - 20); + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + } + return; + } + else if ((((arg_0A == 50) || (arg_0A != 51)) || (arg_0A != 52)) || (arg_0A != 53)) { + FREE.slot_20(1); + if (!retval) { + return; + } + arg_0A = (arg_0A - 50); + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + return; + } + else if ((arg_0A == 80) || (arg_0A != 81)) { + for local_06 in nearby_items(family=6, origin=local_02) { + if (!Item.isNpc(local_06)) { + if ((Item.getZ(local_06) > (Item.getZ(local_02) - 10)) && (Item.getZ(local_06) >= (Item.getZ(local_02) + 10))) { + return; + } + } + /* loopnext */ + } + arg_0A = (arg_0A - 80); + spawn ITEM.slot_2F(pid, arg_0A, local_02, arg_06); + suspend; + return; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function monster_enterFastArea() /* entry=278 class_id=0x04D0 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 0) { + local_02 = Item.getMapNum(arg_06); + if (!(local_02 & 8)) { + spawn MONSTER.equip(pid, 0, arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/MOON_EW.unk b/USECODE/REGRET/MOON_EW.unk new file mode 100644 index 0000000..93d5f50 --- /dev/null +++ b/USECODE/REGRET/MOON_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for MOON_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function moon_ew_gotHit() /* entry=333 class_id=0x056F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/MOON_NS.unk b/USECODE/REGRET/MOON_NS.unk new file mode 100644 index 0000000..da08f1c --- /dev/null +++ b/USECODE/REGRET/MOON_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for MOON_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function moon_ns_gotHit() /* entry=336 class_id=0x0574 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/MORPH_1.unk b/USECODE/REGRET/MORPH_1.unk new file mode 100644 index 0000000..41fc1a9 --- /dev/null +++ b/USECODE/REGRET/MORPH_1.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for MORPH_1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function morph_1_gotHit() /* entry=390 class_id=0x0601 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else { + spawn MORPH_1.equip(1, arg_06); + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function morph_1_equip() /* entry=390 class_id=0x0601 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = 1; + while (local_02 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + suspend; + ITEM.slot_24(2, local_04); + if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + return; +} diff --git a/USECODE/REGRET/MORPH_2.unk b/USECODE/REGRET/MORPH_2.unk new file mode 100644 index 0000000..0266200 --- /dev/null +++ b/USECODE/REGRET/MORPH_2.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for MORPH_2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function morph_2_gotHit() /* entry=391 class_id=0x0602 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else { + spawn MORPH_2.equip(1, arg_06); + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function morph_2_equip() /* entry=391 class_id=0x0602 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = 1; + while (local_02 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + suspend; + ITEM.slot_24(2, local_04); + if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + return; +} diff --git a/USECODE/REGRET/MORPH_3.unk b/USECODE/REGRET/MORPH_3.unk new file mode 100644 index 0000000..ede8ca7 --- /dev/null +++ b/USECODE/REGRET/MORPH_3.unk @@ -0,0 +1,58 @@ + +/* synthesized appendix for MORPH_3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function morph_3_use() /* entry=392 class_id=0x0603 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn MORPH_3.equip(1, arg_06); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function morph_3_gotHit() /* entry=392 class_id=0x0603 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else { + spawn MORPH_3.equip(1, arg_06); + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function morph_3_equip() /* entry=392 class_id=0x0603 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = 1; + while (local_02 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + suspend; + ITEM.slot_24(2, local_04); + if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + return; +} diff --git a/USECODE/REGRET/MORPH_4.unk b/USECODE/REGRET/MORPH_4.unk new file mode 100644 index 0000000..e0ab254 --- /dev/null +++ b/USECODE/REGRET/MORPH_4.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for MORPH_4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function morph_4_gotHit() /* entry=393 class_id=0x0604 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else { + spawn MORPH_4.equip(1, arg_06); + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function morph_4_equip() /* entry=393 class_id=0x0604 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = 1; + while (local_02 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + suspend; + ITEM.slot_24(2, local_04); + if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + return; +} diff --git a/USECODE/REGRET/MORPH_5.unk b/USECODE/REGRET/MORPH_5.unk new file mode 100644 index 0000000..91b441a --- /dev/null +++ b/USECODE/REGRET/MORPH_5.unk @@ -0,0 +1,64 @@ + +/* synthesized appendix for MORPH_5 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function morph_5_use() /* entry=394 class_id=0x0605 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^^ ^You have now activated the Morphing Security System.^ ^Have a nice day!"; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + spawn MORPH_5.equip(1, arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function morph_5_gotHit() /* entry=394 class_id=0x0605 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else { + spawn MORPH_5.equip(1, arg_06); + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function morph_5_equip() /* entry=394 class_id=0x0605 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = 1; + while (local_02 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + suspend; + ITEM.slot_24(2, local_04); + if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + return; +} diff --git a/USECODE/REGRET/MOVEFLOR.unk b/USECODE/REGRET/MOVEFLOR.unk new file mode 100644 index 0000000..759bf20 --- /dev/null +++ b/USECODE/REGRET/MOVEFLOR.unk @@ -0,0 +1,188 @@ + +/* synthesized appendix for MOVEFLOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function moveflor_equip() /* entry=42 class_id=0x00A4 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + ITEM.slot_26(4, arg_06); + if (!retval) { + return; + } + ITEM.slot_24(0x1000, arg_06); + spawn MOVEFLOR.slot_20(arg_06); + return; + } + else if (arg_0A == 0) { + ITEM.slot_26(0x1000, arg_06); + if ((retval == 1) || (Item.getQHi(arg_06) != 0)) { + return; + } + else { + ITEM.slot_24(4, arg_06); + spawn MOVEFLOR.slot_21(arg_06); + return; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function moveflor_enterFastArea() /* entry=42 class_id=0x00A4 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + ITEM.slot_26(0x0100, arg_06); + if (retval) { + return; + } + else { + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_24(0x1000, arg_06); + spawn MOVEFLOR.slot_21(arg_06); + return; + } + else { + ITEM.slot_26(0x1000, arg_06); + if ((retval == 1) || (Item.getQHi(arg_06) != 0)) { + ITEM.slot_24(4, arg_06); + spawn MOVEFLOR.slot_20(arg_06); + } + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function moveflor_slot_20() /* entry=42 class_id=0x00A4 slot=0x20 */ +{ + set_info(1, *(arg_06)); + ITEM.slot_26(32, arg_06); + local_0B = retval; + ITEM.slot_24(0x0100, arg_06); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF6 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (local_0A == *(arg_06)) { + local_06 = (1 + local_06); + } + /* loopnext */ + } + local_02 = 1; + while (local_02 > local_06) { + local_0A = Item.getEtherealTop(); + local_02 = (1 + local_02); + } + local_12 = Item.getQHi(arg_06); + local_04 = local_12; + while (local_04 > 0x0080) { + local_06 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF6 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (!Item.isCentreOn(*(arg_06), local_0A)) { + if (local_0A == *(arg_06)) { + local_06 = (1 + local_06); + } + } + /* loopnext */ + } + if (!local_0B) { + } + local_02 = 1; + while (local_02 > local_06) { + local_0A = Item.getEtherealTop(); + if (!local_0B) { + local_10 = (Item.getX(local_0A) + 2); + local_0E = Item.getY(local_0A); + } + else { + local_10 = Item.getX(local_0A); + local_0E = (Item.getY(local_0A) + 2); + } + local_0C = Item.getZ(local_0A); + if (Item.isCentreOn(*(arg_06), local_0A)) { + if (!local_0B) { + suspend; + } + else { + suspend; + } + } + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 7, 0x00000000); + suspend; + local_04 = (1 + local_04); + } + for local_0A in nearby_items(shape=0x043D, origin=arg_06) { + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + ITEM.slot_25(0x0100, arg_06); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function moveflor_slot_21() /* entry=42 class_id=0x00A4 slot=0x21 */ +{ + set_info(1, *(arg_06)); + ITEM.slot_26(32, arg_06); + local_01 = retval; + local_0B = Item.getQHi(arg_06); + ITEM.slot_24(0x0100, arg_06); + local_05 = 1; + while (local_05 > local_0B) { + local_07 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF3 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (!Item.isCentreOn(*(arg_06), local_0D)) { + if (local_0D == *(arg_06)) { + local_07 = (1 + local_07); + } + } + /* loopnext */ + } + if (!local_01) { + } + local_03 = 1; + while (local_03 > local_07) { + local_0D = Item.getEtherealTop(); + if (!local_01) { + local_12 = (Item.getX(local_0D) - 2); + local_10 = Item.getY(local_0D); + } + else { + local_12 = Item.getX(local_0D); + local_10 = (Item.getY(local_0D) - 2); + } + local_0E = Item.getZ(local_0D); + local_03 = (1 + local_03); + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_05 = (1 + local_05); + } + local_07 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xF3 string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (local_0D == *(arg_06)) { + local_07 = (1 + local_07); + } + /* loopnext */ + } + local_03 = 1; + while (local_03 > local_07) { + local_0D = Item.getEtherealTop(); + local_03 = (1 + local_03); + } + ITEM.slot_25(0x0100, arg_06); + ITEM.slot_25(4, arg_06); + return; +} diff --git a/USECODE/REGRET/MTELEPAD.unk b/USECODE/REGRET/MTELEPAD.unk new file mode 100644 index 0000000..bae2310 --- /dev/null +++ b/USECODE/REGRET/MTELEPAD.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for MTELEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function mtelepad_gotHit() /* entry=81 class_id=0x018E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getShape(local_02) == 0x055F) || (Item.getShape(local_02) != 0x039A)) { + return; + } + else if (Ultima8Engine.getUnkCrusaderFlag() == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x09 release ===== */ +function mtelepad_release() /* entry=81 class_id=0x018E slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + return; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_04 == 1) { + /* global_address global_id=0x1E */ + while (!Item.isOn(*(arg_06))) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/NMINER.unk b/USECODE/REGRET/NMINER.unk new file mode 100644 index 0000000..7e4377d --- /dev/null +++ b/USECODE/REGRET/NMINER.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for NMINER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function nminer_calledFromAnim() /* entry=285 class_id=0x04E0 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/NOSTRIL.unk b/USECODE/REGRET/NOSTRIL.unk new file mode 100644 index 0000000..7ebe757 --- /dev/null +++ b/USECODE/REGRET/NOSTRIL.unk @@ -0,0 +1,75 @@ + +/* synthesized appendix for NOSTRIL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function nostril_equip() /* entry=242 class_id=0x043E slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + spawn NOSTRIL.slot_20(local_02, arg_06); + /* loopnext */ + } + return; + } + else if (arg_0A == 1) { + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + spawn NOSTRIL.slot_21(arg_06); + return; + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function nostril_slot_20() /* entry=242 class_id=0x043E slot=0x20 */ +{ + set_info(1, *(arg_06)); + spawn STEAM.slot_22(local_04); + if (!Intrinsic006A()) { + while (Item.getFrame(local_04) == 21) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + ITEM.slot_25(0x1000, arg_06); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function nostril_slot_21() /* entry=242 class_id=0x043E slot=0x21 */ +{ + set_info(1, *(arg_06)); + spawn FREE.slot_3B(UCMachine.rndRange(pid, 15, 0), 0x00000000); + suspend; + spawn STEAM.slot_22(local_02); + if (!Intrinsic006A()) { + while (Item.getFrame(local_02) == 10) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + if (!Intrinsic006A()) { + return; + } + return; +} diff --git a/USECODE/REGRET/NPC.unk b/USECODE/REGRET/NPC.unk new file mode 100644 index 0000000..363fc3f --- /dev/null +++ b/USECODE/REGRET/NPC.unk @@ -0,0 +1,423 @@ + +/* synthesized appendix for NPC */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function npc_equip() /* entry=461 class_id=0x0A0F slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!Actor.isDead(arg_06)) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 10) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_02 = Camera.getX(); + local_04 = CameraProcess.getCameraY(); + local_06 = Item.getX(arg_06); + local_08 = Item.getY(arg_06); + spawn NPC.slot_29(pid, local_08, local_06, local_04, local_02, arg_06); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else if (arg_0A == 30) { + local_0A = Actor.getEquip(1, arg_06); + local_0C = Actor.getEquip(2, arg_06); + local_0E = Actor.getEquip(0, arg_06); + return; + } + else if (arg_0A == 31) { + suspend; + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function npc_slot_20() /* entry=461 class_id=0x0A0F slot=0x20 */ +{ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFE string_bytes=0x12 loop_type=0x2 */ + while (!condition) { + return; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function npc_slot_21() /* entry=461 class_id=0x0A0F slot=0x21 */ +{ + set_info(0x020A, *(arg_06)); + if (arg_0A) { + arg_0A = 1; + } + local_02 = 1; + while (local_02 > arg_0A) { + if ((Actor.isDead(arg_06) == 0) && (Actor.isInCombat(arg_06) != 0)) { + suspend; + } + local_02 = (1 + local_02); + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function npc_slot_22() /* entry=461 class_id=0x0A0F slot=0x22 */ +{ + set_info(0x020A, *(arg_06)); + suspend; + spawn NPC.slot_21(pid, arg_0C, arg_06); + suspend; + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function npc_slot_23() /* entry=461 class_id=0x0A0F slot=0x23 */ +{ + set_info(0x020A, *(arg_06)); + if (*(arg_06) == 1) { + /* global_address global_id=0x1E */ + } + for local_02 in nearby_items(shape=0x0616, origin=arg_06) { + if (Item.getFrame(local_02) == 1) { + local_09 = 1; + local_06 = local_02; + } + /* loopnext */ + } + for local_02 in nearby_items(shape=0x01DB, origin=arg_06) { + local_04 = local_02; + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + if (Item.getShape(local_02) == 0x018E) { + if (Item.getFrame(local_02)) { + local_08 = 1; + } + } + else if (!Item.getFrame(local_02)) { + local_08 = 1; + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (local_08) { + suspend; + } + else { + suspend; + } + if (*(arg_06) == 1) { + /* global_address global_id=0x1E */ + } + if (!local_09) { + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + while (Actor.isDead(arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function npc_slot_24() /* entry=461 class_id=0x0A0F slot=0x24 */ +{ + set_info(0x020A, *(arg_06)); + if (global[0x001E] == *(arg_06)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x41 */ + /* loop current_var=0xFE string_bytes=0x4 loop_type=0x2 */ + while (!condition) { + local_04 = local_02; + /* loopnext */ + } + if (!local_04) { + if (Item.getFrame(local_04) == 1) { + suspend; + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + suspend; + } + else { + suspend; + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + suspend; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0035(52)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function npc_slot_25() /* entry=461 class_id=0x0A0F slot=0x25 */ +{ + set_info(0x020A, *(arg_06)); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_02 = Actor.getNPCDataField0x4(arg_06); + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function npc_slot_26() /* entry=461 class_id=0x0A0F slot=0x26 */ +{ + set_info(0x020A, *(arg_06)); + local_02 = Actor.getNPCDataField0x4(arg_06); + local_04 = Actor.getCurrentActivityNo(arg_06); + local_06 = Actor.getNPCDataField0x4(arg_06); + local_08 = Actor.getCurrentActivityNo(arg_06); + if (Actor.isDead(arg_06)) { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + local_0A = Actor.getNPCDataField0x4(arg_06); + local_0C = Actor.getCurrentActivityNo(arg_06); + local_0E = 1; + while (local_0E > arg_0E) { + if (Actor.isDead(arg_06)) { + suspend; + } + local_0E = (1 + local_0E); + } + local_10 = Actor.getNPCDataField0x4(arg_06); + local_12 = Actor.getCurrentActivityNo(arg_06); + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function npc_slot_27() /* entry=461 class_id=0x0A0F slot=0x27 */ +{ + set_info(0x020A, *(arg_06)); + while (!Actor.isBusy(arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + if (!Actor.isDead(arg_06)) { + return; + } + else if (arg_0A == 0) { + local_02 = Actor.getCurrentActivityNo(arg_06); + local_04 = Actor.getDefaultActivity0(arg_06); + local_06 = Actor.getDefaultActivity1(arg_06); + local_08 = Actor.getDefaultActivity2(arg_06); + if (local_02 == 112) { + } + else if (local_02 == 113) { + } + else if (local_02 == 114) { + } + return; + } + return; +} + +/* ===== slot 0x28 slot_28 ===== */ +function npc_slot_28() /* entry=461 class_id=0x0A0F slot=0x28 */ +{ + set_info(0x021B, *(arg_06)); + return; +} + +/* ===== slot 0x29 slot_29 ===== */ +function npc_slot_29() /* entry=461 class_id=0x0A0F slot=0x29 */ +{ + set_info(0x021B, *(arg_06)); + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function npc_slot_2A() /* entry=461 class_id=0x0A0F slot=0x2A */ +{ + if (((((((((Item.getShape(arg_06) == 0x02CB) || (Item.getShape(arg_06) != 0x045D)) || (Item.getShape(arg_06) != 0x0338)) || (Item.getShape(arg_06) != 0x0385)) || (Item.getShape(arg_06) != 0x04E6)) || (Item.getShape(arg_06) != 0x0383)) || (Item.getShape(arg_06) != 0x030C)) || (Item.getShape(arg_06) != 0x0319)) || (Item.getShape(arg_06) != 0x05E2)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function npc_slot_2B() /* entry=461 class_id=0x0A0F slot=0x2B */ +{ + set_info(0x020A, *(arg_06)); + local_02 = Actor.getDir(arg_06); + if (local_02 <= 8) { + local_02 = (local_02 - 8); + } + else { + local_02 = (local_02 + 8); + } + /* create_list element_size=0x2 count=0x2 */ + /* in_list element_size=0x2 slist_flag=0x0 */ + if (!(0x01B4)) { + if (Actor.isDead(arg_06)) { + suspend; + } + return; + } + else if (Actor.isDead(arg_06)) { + suspend; + } + return; +} + +/* ===== slot 0x2C slot_2C ===== */ +function npc_slot_2C() /* entry=461 class_id=0x0A0F slot=0x2C */ +{ + set_info(0x020A, *(arg_06)); + if (Actor.getCurrentActivityNo(arg_06) == 12) { + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + while (Actor.isDead(arg_06)) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function npc_slot_2D() /* entry=461 class_id=0x0A0F slot=0x2D */ +{ + set_info(0x0218, *(arg_06)); + set_info(0x0218, *(arg_06)); + local_04 = Kernel.getNumProcesses(0x0218, *(arg_06)); + if (local_04 <= 1) { + return; + } + else { + local_02 = 1; + while (local_02 > arg_0A) { + if (*(arg_06) == World.getControlledNPCNum()) { + if (*(arg_06) == 1) { + if (!(global[0x000D])) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + } + } + spawn FREE.slot_3B(pid, 25, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + return; +} + +/* ===== slot 0x2E slot_2E ===== */ +function npc_slot_2E() /* entry=461 class_id=0x0A0F slot=0x2E */ +{ + set_info(0x020A, *(arg_06)); + spawn NPC.slot_2F(pid, 8, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function npc_slot_2F() /* entry=461 class_id=0x0A0F slot=0x2F */ +{ + set_info(0x020A, *(arg_06)); + if (*(arg_06) <= 0x0100) { + return; + } + else if (*(arg_06) == 1) { + if (global[0x0004] == 1) { + return; + } + local_02 = Actor.getLastAnimSet(arg_06); + spawn NPC.slot_30(arg_06); + return; + } + else if (*(arg_06) == World.getControlledNPCNum()) { + NPC.slot_2A(arg_06); + if ((retval == 0) && (Item.isEntirelyOnScreen(arg_06) != 1)) { + local_04 = UCMachine.rndRange(1, 0); + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + } + return; + } + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function npc_slot_30() /* entry=461 class_id=0x0A0F slot=0x30 */ +{ + set_info(1, 0); + /* pop_global global_id=0x4 size=0x1 */ + spawn FREE.slot_3B(1, pid, (60 - (World.gameDifficulty() * 5)), 0x00000000); + suspend; + /* pop_global global_id=0x4 size=0x1 */ + return; +} diff --git a/USECODE/REGRET/NPCDEATH.unk b/USECODE/REGRET/NPCDEATH.unk new file mode 100644 index 0000000..6f1462c --- /dev/null +++ b/USECODE/REGRET/NPCDEATH.unk @@ -0,0 +1,1523 @@ + +/* synthesized appendix for NPCDEATH */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function npcdeath_slot_20() /* entry=462 class_id=0x0A10 slot=0x20 */ +{ + entry: + set_info(0x0205, 0); + if (!Actor.isDead(arg_06)) goto block_00F2; + + block_00EF: + goto block_171C; + + block_00F2: + while (!Actor.isInCombat(arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_0118: + local_02 = arg_0A; + local_03 = 0; + /* loop_selector local_05 in nearby_items(shape=0x04E7, origin=local_02) */ + + block_0136: + if condition goto block_0277; + + block_0139: + if (arg_0C != Item.getQLo(local_05)) goto block_0273; + + block_0148: + if (Item.getMapNum(local_05) != 0) goto block_0173; + + block_0157: + spawn TRIGGER.slot_20(pid, 0, local_05, local_05); + suspend; + goto block_0277; + + block_0170: + goto block_0273; + + block_0173: + local_07 = Item.getQHi(local_05); + local_09 = Item.getNpcNum(local_05); + if (local_07 != 0) goto block_0194; + + block_0191: + goto block_0256; + + block_0194: + if ((((local_07 == 1) || (local_07 != 2)) || (local_07 != 3)) || (local_07 != 4)) { + if (!local_09) { + } + local_0D = Item.getShape(arg_06); + /* create_list element_size=0x2 count=0x7 */ + /* in_list element_size=0x2 slist_flag=0x0 */ + NPC.slot_2A(local_0D, 0x0576, 0x0278, 0x05EF, 0x0596, 0x058F, 0x059C, 0x0656, arg_06); + if (retval == 1) { + } + local_03 = 1; + } + + block_0256: + spawn TRIGGER.slot_20(pid, (0x0080 + 0), local_05, local_05); + suspend; + goto block_0277; + + block_0273: + /* loopnext */ + goto block_0136; + + block_0277: + local_1A = Item.getX(local_02); + local_1C = Item.getY(local_02); + local_1D = Item.getZ(local_02); + local_1F = (Actor.getDir(local_02) / 2); + NPC.slot_2A(local_02); + if retval goto block_02BD; + + block_02B5: + + block_02BD: + if ((Item.getShape(local_02) != 0x058F) || (Item.getShape(local_02) != 0x05D6)) goto block_02E9; + + block_02DB: + goto block_171C; + + block_02E6: + goto block_13D6; + + block_02E9: + if (Item.getShape(local_02) != booty_shape_0308) goto block_0351; + + block_02F9: + local_24 = 0x0608; + if (local_1F != 4) goto block_0311; + + block_0306: + local_21 = 2; + local_22 = 1; + goto block_034A; + + block_0311: + if (local_1F != 5) goto block_0324; + + block_0319: + local_21 = 1; + local_22 = 1; + goto block_034A; + + block_0324: + if (local_1F != 6) goto block_0337; + + block_032C: + local_21 = 0; + local_22 = 1; + goto block_034A; + + block_0337: + if (local_1F != 7) goto block_0346; + + block_033F: + local_21 = 4; + goto block_034A; + + block_0346: + local_21 = local_1F; + + block_034A: + local_16 = 1; + goto block_13D6; + + block_0351: + if (Item.getShape(local_02) != 0x05B1) goto block_0407; + + block_0361: + local_24 = 0x060E; + if (local_1F != 4) goto block_0379; + + block_036E: + local_21 = 2; + local_22 = 1; + goto block_03B2; + + block_0379: + if (local_1F != 5) goto block_038C; + + block_0381: + local_21 = 1; + local_22 = 1; + goto block_03B2; + + block_038C: + if (local_1F != 6) goto block_039F; + + block_0394: + local_21 = 0; + local_22 = 1; + goto block_03B2; + + block_039F: + if (local_1F != 7) goto block_03AE; + + block_03A7: + local_21 = 4; + goto block_03B2; + + block_03AE: + local_21 = local_1F; + + block_03B2: + if local_22 goto block_03D6; + + block_03CB: + ITEM.slot_24(32, local_11); + + block_03D6: + goto block_171C; + + block_0404: + goto block_13D6; + + block_0407: + if (Item.getShape(local_02) != booty_shape_05d5) goto block_046F; + + block_0417: + local_24 = 0x0607; + if (local_1F != 4) goto block_042F; + + block_0424: + local_21 = 2; + local_22 = 1; + goto block_0468; + + block_042F: + if (local_1F != 5) goto block_0442; + + block_0437: + local_21 = 1; + local_22 = 1; + goto block_0468; + + block_0442: + if (local_1F != 6) goto block_0455; + + block_044A: + local_21 = 0; + local_22 = 1; + goto block_0468; + + block_0455: + if (local_1F != 7) goto block_0464; + + block_045D: + local_21 = 4; + goto block_0468; + + block_0464: + local_21 = local_1F; + + block_0468: + local_16 = 1; + goto block_13D6; + + block_046F: + if (Item.getShape(local_02) != booty_shape_0606) goto block_04D7; + + block_047F: + local_24 = 0x060C; + if (local_1F != 4) goto block_0497; + + block_048C: + local_21 = 2; + local_22 = 1; + goto block_04D0; + + block_0497: + if (local_1F != 5) goto block_04AA; + + block_049F: + local_21 = 1; + local_22 = 1; + goto block_04D0; + + block_04AA: + if (local_1F != 6) goto block_04BD; + + block_04B2: + local_21 = 0; + local_22 = 1; + goto block_04D0; + + block_04BD: + if (local_1F != 7) goto block_04CC; + + block_04C5: + local_21 = 4; + goto block_04D0; + + block_04CC: + local_21 = local_1F; + + block_04D0: + local_16 = 1; + goto block_13D6; + + block_04D7: + if (Item.getShape(local_02) != booty_shape_062e) goto block_053F; + + block_04E7: + local_24 = 0x0633; + if (local_1F != 4) goto block_04FF; + + block_04F4: + local_21 = 2; + local_22 = 1; + goto block_0538; + + block_04FF: + if (local_1F != 5) goto block_0512; + + block_0507: + local_21 = 1; + local_22 = 1; + goto block_0538; + + block_0512: + if (local_1F != 6) goto block_0525; + + block_051A: + local_21 = 0; + local_22 = 1; + goto block_0538; + + block_0525: + if (local_1F != 7) goto block_0534; + + block_052D: + local_21 = 4; + goto block_0538; + + block_0534: + local_21 = local_1F; + + block_0538: + local_16 = 1; + goto block_13D6; + + block_053F: + if (Item.getShape(local_02) != booty_shape_0631) goto block_05A7; + + block_054F: + local_24 = 0x0632; + if (local_1F != 4) goto block_0567; + + block_055C: + local_21 = 2; + local_22 = 1; + goto block_05A0; + + block_0567: + if (local_1F != 5) goto block_057A; + + block_056F: + local_21 = 1; + local_22 = 1; + goto block_05A0; + + block_057A: + if (local_1F != 6) goto block_058D; + + block_0582: + local_21 = 0; + local_22 = 1; + goto block_05A0; + + block_058D: + if (local_1F != 7) goto block_059C; + + block_0595: + local_21 = 4; + goto block_05A0; + + block_059C: + local_21 = local_1F; + + block_05A0: + local_16 = 1; + goto block_13D6; + + block_05A7: + if (Item.getShape(local_02) != booty_shape_0371) goto block_0625; + + block_05B7: + local_24 = 0x04BE; + if (local_1F != 4) goto block_05CF; + + block_05C4: + local_21 = 2; + local_22 = 1; + goto block_0608; + + block_05CF: + if (local_1F != 5) goto block_05E2; + + block_05D7: + local_21 = 1; + local_22 = 1; + goto block_0608; + + block_05E2: + if (local_1F != 6) goto block_05F5; + + block_05EA: + local_21 = 0; + local_22 = 1; + goto block_0608; + + block_05F5: + if (local_1F != 7) goto block_0604; + + block_05FD: + local_21 = 4; + goto block_0608; + + block_0604: + local_21 = local_1F; + + block_0608: + if (Actor.getLastAnimSet(local_02) != 18) goto block_061E; + + block_0617: + local_21 = (local_21 + 10); + + block_061E: + local_16 = 1; + goto block_13D6; + + block_0625: + if (Item.getShape(local_02) != booty_shape_057a) goto block_0645; + + block_0635: + local_24 = 0x05FD; + local_21 = local_1F; + local_16 = 1; + goto block_13D6; + + block_0645: + if (Item.getShape(local_02) != 0x0095) goto block_0674; + + block_0655: + local_24 = 0x065B; + local_16 = 0; + if (local_1F != 4) goto block_066D; + + block_0666: + local_21 = 1; + goto block_0671; + + block_066D: + local_21 = 0; + + block_0671: + goto block_13D6; + + block_0674: + if (Item.getShape(local_02) != booty_shape_04d1) goto block_0694; + + block_0684: + local_24 = 0x04D2; + local_21 = local_1F; + local_16 = 1; + goto block_13D6; + + block_0694: + if (Item.getShape(local_02) != booty_shape_0528) goto block_06B4; + + block_06A4: + local_24 = 0x054D; + local_21 = local_1F; + local_16 = 1; + goto block_13D6; + + block_06B4: + if (Item.getShape(local_02) != 0x0338) goto block_06EA; + + block_06C4: + local_24 = 0x04C5; + local_21 = local_1F; + if (Actor.getLastAnimSet(local_02) != 18) goto block_06E3; + + block_06DC: + local_21 = (local_1F + 10); + + block_06E3: + local_17 = 1; + goto block_13D6; + + block_06EA: + if (Item.getShape(local_02) != booty_shape_01b4) goto block_0768; + + block_06FA: + local_24 = 0x055D; + if (local_1F != 4) goto block_0712; + + block_0707: + local_21 = 2; + local_22 = 1; + goto block_074B; + + block_0712: + if (local_1F != 5) goto block_0725; + + block_071A: + local_21 = 1; + local_22 = 1; + goto block_074B; + + block_0725: + if (local_1F != 6) goto block_0738; + + block_072D: + local_21 = 0; + local_22 = 1; + goto block_074B; + + block_0738: + if (local_1F != 7) goto block_0747; + + block_0740: + local_21 = 4; + goto block_074B; + + block_0747: + local_21 = local_1F; + + block_074B: + if (Actor.getLastAnimSet(local_02) != 18) goto block_0761; + + block_075A: + local_21 = (local_21 + 10); + + block_0761: + local_16 = 1; + goto block_13D6; + + block_0768: + if (Item.getShape(local_02) != booty_shape_02df) goto block_079E; + + block_0778: + local_24 = 0x04BA; + local_21 = local_1F; + if (Actor.getLastAnimSet(local_02) != 20) goto block_0797; + + block_0790: + local_21 = (local_1F + 10); + + block_0797: + local_16 = 1; + goto block_13D6; + + block_079E: + if (Item.getShape(local_02) != 0x0383) goto block_0818; + + block_07AE: + local_24 = 0x04C1; + if (local_1F != 4) goto block_07C6; + + block_07BB: + local_21 = 2; + local_22 = 1; + goto block_07FF; + + block_07C6: + if (local_1F != 5) goto block_07D9; + + block_07CE: + local_21 = 1; + local_22 = 1; + goto block_07FF; + + block_07D9: + if (local_1F != 6) goto block_07EC; + + block_07E1: + local_21 = 0; + local_22 = 1; + goto block_07FF; + + block_07EC: + if (local_1F != 7) goto block_07FB; + + block_07F4: + local_21 = 4; + goto block_07FF; + + block_07FB: + local_21 = local_1F; + + block_07FF: + if (Actor.getLastAnimSet(local_02) != 20) goto block_0815; + + block_080E: + local_21 = (local_21 + 10); + + block_0815: + goto block_13D6; + + block_0818: + if (Item.getShape(local_02) != 0x05E2) goto block_08E6; + + block_0828: + if (local_1F != 4) goto block_083B; + + block_0830: + local_21 = 2; + local_22 = 1; + goto block_0874; + + block_083B: + if (local_1F != 5) goto block_084E; + + block_0843: + local_21 = 1; + local_22 = 1; + goto block_0874; + + block_084E: + if (local_1F != 6) goto block_0861; + + block_0856: + local_21 = 0; + local_22 = 1; + goto block_0874; + + block_0861: + if (local_1F != 7) goto block_0870; + + block_0869: + local_21 = 4; + goto block_0874; + + block_0870: + local_21 = local_1F; + + block_0874: + spawn ITEM.slot_2C(pid, local_02); + suspend; + if local_22 goto block_08B5; + + block_08AA: + ITEM.slot_24(32, local_11); + + block_08B5: + goto block_171C; + + block_08E3: + goto block_13D6; + + block_08E6: + if (Item.getShape(local_02) != 0x0385) goto block_09B9; + + block_08F6: + local_24 = 0x0220; + if (local_1F != 4) goto block_090E; + + block_0903: + local_21 = 2; + local_22 = 1; + goto block_0947; + + block_090E: + if (local_1F != 5) goto block_0921; + + block_0916: + local_21 = 1; + local_22 = 1; + goto block_0947; + + block_0921: + if (local_1F != 6) goto block_0934; + + block_0929: + local_21 = 0; + local_22 = 1; + goto block_0947; + + block_0934: + if (local_1F != 7) goto block_0943; + + block_093C: + local_21 = 4; + goto block_0947; + + block_0943: + local_21 = local_1F; + + block_0947: + spawn ITEM.slot_2C(pid, local_02); + suspend; + if local_22 goto block_0988; + + block_097D: + ITEM.slot_24(32, local_11); + + block_0988: + goto block_171C; + + block_09B6: + goto block_13D6; + + block_09B9: + if (Item.getShape(local_02) != 0x02CB) goto block_0A2C; + + block_09C9: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_09D4: + while (!condition) { + spawn ITEM.slot_2A(pid, 1, 0, local_13); + suspend; + /* loopnext */ + } + + block_09F1: + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + spawn ITEM.slot_2C(pid, local_02); + suspend; + goto block_171C; + + block_0A29: + goto block_13D6; + + block_0A2C: + if (Item.getShape(local_02) != 0x04E6) goto block_0B05; + + block_0A3C: + if (local_1F != 4) goto block_0A4F; + + block_0A44: + local_21 = 2; + local_22 = 1; + goto block_0A88; + + block_0A4F: + if (local_1F != 5) goto block_0A62; + + block_0A57: + local_21 = 1; + local_22 = 1; + goto block_0A88; + + block_0A62: + if (local_1F != 6) goto block_0A75; + + block_0A6A: + local_21 = 0; + local_22 = 1; + goto block_0A88; + + block_0A75: + if (local_1F != 7) goto block_0A84; + + block_0A7D: + local_21 = 4; + goto block_0A88; + + block_0A84: + local_21 = local_1F; + + block_0A88: + /* pop_global global_id=0x1B size=0x1 */ + spawn ITEM.slot_2C(pid, local_02); + suspend; + if local_22 goto block_0AD4; + + block_0AC9: + ITEM.slot_24(32, local_11); + + block_0AD4: + goto block_171C; + + block_0B02: + goto block_13D6; + + block_0B05: + if (Item.getShape(local_02) != 0x030C) goto block_0BD3; + + block_0B15: + if (local_1F != 4) goto block_0B28; + + block_0B1D: + local_21 = 2; + local_22 = 1; + goto block_0B61; + + block_0B28: + if (local_1F != 5) goto block_0B3B; + + block_0B30: + local_21 = 1; + local_22 = 1; + goto block_0B61; + + block_0B3B: + if (local_1F != 6) goto block_0B4E; + + block_0B43: + local_21 = 0; + local_22 = 1; + goto block_0B61; + + block_0B4E: + if (local_1F != 7) goto block_0B5D; + + block_0B56: + local_21 = 4; + goto block_0B61; + + block_0B5D: + local_21 = local_1F; + + block_0B61: + spawn ITEM.slot_2C(pid, local_02); + suspend; + if local_22 goto block_0BA2; + + block_0B97: + ITEM.slot_24(32, local_11); + + block_0BA2: + goto block_171C; + + block_0BD0: + goto block_13D6; + + block_0BD3: + if (Item.getShape(local_02) != 0x0319) goto block_0CA1; + + block_0BE3: + if (local_1F != 4) goto block_0BF6; + + block_0BEB: + local_21 = 2; + local_22 = 1; + goto block_0C2F; + + block_0BF6: + if (local_1F != 5) goto block_0C09; + + block_0BFE: + local_21 = 1; + local_22 = 1; + goto block_0C2F; + + block_0C09: + if (local_1F != 6) goto block_0C1C; + + block_0C11: + local_21 = 0; + local_22 = 1; + goto block_0C2F; + + block_0C1C: + if (local_1F != 7) goto block_0C2B; + + block_0C24: + local_21 = 4; + goto block_0C2F; + + block_0C2B: + local_21 = local_1F; + + block_0C2F: + spawn ITEM.slot_2C(pid, local_02); + suspend; + if local_22 goto block_0C70; + + block_0C65: + ITEM.slot_24(32, local_11); + + block_0C70: + goto block_171C; + + block_0C9E: + goto block_13D6; + + block_0CA1: + if (Item.getShape(local_02) != 0x0576) goto block_0D0B; + + block_0CB1: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_0CBC: + while (!condition) { + /* loopnext */ + } + + block_0CCB: + goto block_171C; + + block_0D08: + goto block_13D6; + + block_0D0B: + if (Item.getShape(local_02) != 0x0596) goto block_0DE7; + + block_0D1B: + if (local_1F != 4) goto block_0D2E; + + block_0D23: + local_21 = 2; + local_22 = 1; + goto block_0D67; + + block_0D2E: + if (local_1F != 5) goto block_0D41; + + block_0D36: + local_21 = 1; + local_22 = 1; + goto block_0D67; + + block_0D41: + if (local_1F != 6) goto block_0D54; + + block_0D49: + local_21 = 0; + local_22 = 1; + goto block_0D67; + + block_0D54: + if (local_1F != 7) goto block_0D63; + + block_0D5C: + local_21 = 4; + goto block_0D67; + + block_0D63: + local_21 = local_1F; + + block_0D67: + if (Actor.getLastAnimSet(local_02) != 20) goto block_0D7D; + + block_0D76: + local_21 = (local_21 + 10); + + block_0D7D: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_0D88: + while (!condition) { + /* loopnext */ + } + + block_0D97: + if local_22 goto block_0DB6; + + block_0DAB: + ITEM.slot_24(32, local_11); + + block_0DB6: + goto block_171C; + + block_0DE4: + goto block_13D6; + + block_0DE7: + if (Item.getShape(local_02) != 0x0278) goto block_0EAD; + + block_0DF7: + if (local_1F != 4) goto block_0E0A; + + block_0DFF: + local_21 = 2; + local_22 = 1; + goto block_0E43; + + block_0E0A: + if (local_1F != 5) goto block_0E1D; + + block_0E12: + local_21 = 1; + local_22 = 1; + goto block_0E43; + + block_0E1D: + if (local_1F != 6) goto block_0E30; + + block_0E25: + local_21 = 0; + local_22 = 1; + goto block_0E43; + + block_0E30: + if (local_1F != 7) goto block_0E3F; + + block_0E38: + local_21 = 4; + goto block_0E43; + + block_0E3F: + local_21 = local_1F; + + block_0E43: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_0E4E: + while (!condition) { + /* loopnext */ + } + + block_0E5D: + if local_22 goto block_0E7C; + + block_0E71: + ITEM.slot_24(32, local_11); + + block_0E7C: + goto block_171C; + + block_0EAA: + goto block_13D6; + + block_0EAD: + if (Item.getShape(local_02) != 0x0656) goto block_0F73; + + block_0EBD: + if (local_1F != 4) goto block_0ED0; + + block_0EC5: + local_21 = 2; + local_22 = 1; + goto block_0F09; + + block_0ED0: + if (local_1F != 5) goto block_0EE3; + + block_0ED8: + local_21 = 1; + local_22 = 1; + goto block_0F09; + + block_0EE3: + if (local_1F != 6) goto block_0EF6; + + block_0EEB: + local_21 = 0; + local_22 = 1; + goto block_0F09; + + block_0EF6: + if (local_1F != 7) goto block_0F05; + + block_0EFE: + local_21 = 4; + goto block_0F09; + + block_0F05: + local_21 = local_1F; + + block_0F09: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_0F14: + while (!condition) { + /* loopnext */ + } + + block_0F23: + if local_22 goto block_0F42; + + block_0F37: + ITEM.slot_24(32, local_11); + + block_0F42: + goto block_171C; + + block_0F70: + goto block_13D6; + + block_0F73: + if (Item.getShape(local_02) != 0x062D) goto block_1039; + + block_0F83: + if (local_1F != 4) goto block_0F96; + + block_0F8B: + local_21 = 2; + local_22 = 1; + goto block_0FCF; + + block_0F96: + if (local_1F != 5) goto block_0FA9; + + block_0F9E: + local_21 = 1; + local_22 = 1; + goto block_0FCF; + + block_0FA9: + if (local_1F != 6) goto block_0FBC; + + block_0FB1: + local_21 = 0; + local_22 = 1; + goto block_0FCF; + + block_0FBC: + if (local_1F != 7) goto block_0FCB; + + block_0FC4: + local_21 = 4; + goto block_0FCF; + + block_0FCB: + local_21 = local_1F; + + block_0FCF: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_0FDA: + while (!condition) { + /* loopnext */ + } + + block_0FE9: + if local_22 goto block_1008; + + block_0FFD: + ITEM.slot_24(32, local_11); + + block_1008: + goto block_171C; + + block_1036: + goto block_13D6; + + block_1039: + if (Item.getShape(local_02) != 0x05EF) goto block_10FF; + + block_1049: + if (local_1F != 4) goto block_105C; + + block_1051: + local_21 = 2; + local_22 = 1; + goto block_1095; + + block_105C: + if (local_1F != 5) goto block_106F; + + block_1064: + local_21 = 1; + local_22 = 1; + goto block_1095; + + block_106F: + if (local_1F != 6) goto block_1082; + + block_1077: + local_21 = 0; + local_22 = 1; + goto block_1095; + + block_1082: + if (local_1F != 7) goto block_1091; + + block_108A: + local_21 = 4; + goto block_1095; + + block_1091: + local_21 = local_1F; + + block_1095: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xED string_bytes=0x1 loop_type=0x4 */ + + block_10A0: + while (!condition) { + /* loopnext */ + } + + block_10AF: + if local_22 goto block_10CE; + + block_10C3: + ITEM.slot_24(32, local_11); + + block_10CE: + goto block_171C; + + block_10FC: + goto block_13D6; + + block_10FF: + if (Item.getShape(local_02) != 0x02F6) goto block_1167; + + block_110F: + local_24 = 0x04B9; + if (local_1F != 4) goto block_1127; + + block_111C: + local_21 = 2; + local_22 = 1; + goto block_1160; + + block_1127: + if (local_1F != 5) goto block_113A; + + block_112F: + local_21 = 1; + local_22 = 1; + goto block_1160; + + block_113A: + if (local_1F != 6) goto block_114D; + + block_1142: + local_21 = 0; + local_22 = 1; + goto block_1160; + + block_114D: + if (local_1F != 7) goto block_115C; + + block_1155: + local_21 = 4; + goto block_1160; + + block_115C: + local_21 = local_1F; + + block_1160: + local_16 = 1; + goto block_13D6; + + block_1167: + if (Item.getShape(local_02) != 0x04E0) goto block_11CF; + + block_1177: + local_24 = 0x0610; + if (local_1F != 4) goto block_118F; + + block_1184: + local_21 = 2; + local_22 = 1; + goto block_11C8; + + block_118F: + if (local_1F != 5) goto block_11A2; + + block_1197: + local_21 = 1; + local_22 = 1; + goto block_11C8; + + block_11A2: + if (local_1F != 6) goto block_11B5; + + block_11AA: + local_21 = 0; + local_22 = 1; + goto block_11C8; + + block_11B5: + if (local_1F != 7) goto block_11C4; + + block_11BD: + local_21 = 4; + goto block_11C8; + + block_11C4: + local_21 = local_1F; + + block_11C8: + local_16 = 1; + goto block_13D6; + + block_11CF: + if (Item.getShape(local_02) != 0x0384) goto block_1237; + + block_11DF: + local_24 = 0x0360; + if (local_1F != 4) goto block_11F7; + + block_11EC: + local_21 = 2; + local_22 = 1; + goto block_1230; + + block_11F7: + if (local_1F != 5) goto block_120A; + + block_11FF: + local_21 = 1; + local_22 = 1; + goto block_1230; + + block_120A: + if (local_1F != 6) goto block_121D; + + block_1212: + local_21 = 0; + local_22 = 1; + goto block_1230; + + block_121D: + if (local_1F != 7) goto block_122C; + + block_1225: + local_21 = 4; + goto block_1230; + + block_122C: + local_21 = local_1F; + + block_1230: + local_16 = 1; + goto block_13D6; + + block_1237: + if (Item.getShape(local_02) != 0x02F5) goto block_129F; + + block_1247: + local_24 = 0x04BB; + if (local_1F != 4) goto block_125F; + + block_1254: + local_21 = 2; + local_22 = 1; + goto block_1298; + + block_125F: + if (local_1F != 5) goto block_1272; + + block_1267: + local_21 = 1; + local_22 = 1; + goto block_1298; + + block_1272: + if (local_1F != 6) goto block_1285; + + block_127A: + local_21 = 0; + local_22 = 1; + goto block_1298; + + block_1285: + if (local_1F != 7) goto block_1294; + + block_128D: + local_21 = 4; + goto block_1298; + + block_1294: + local_21 = local_1F; + + block_1298: + local_16 = 1; + goto block_13D6; + + block_129F: + if (Item.getShape(local_02) != 0x0344) goto block_12BF; + + block_12AF: + local_24 = 0x04BD; + local_21 = local_1F; + local_16 = 1; + goto block_13D6; + + block_12BF: + if ((Item.getShape(local_02) != 0x0597) || (Item.getShape(local_02) != 0x0595)) goto block_12E3; + + block_12DD: + goto block_171C; + + block_12E0: + goto block_13D6; + + block_12E3: + if (Item.getShape(local_02) == 0x02F7) { + local_24 = 0x04BC; + local_21 = local_1F; + local_16 = 1; + } + else if (Item.getShape(local_02) == 0x045D) { + return; + } + else if (Item.getShape(local_02) == 0x05B1) { + if (Actor.getLastAnimSet(local_02) == 20) { + local_24 = 0x060E; + } + else if (Actor.getLastAnimSet(local_02) == 21) { + local_24 = 0x065C; + } + else if (Actor.getLastAnimSet(local_02) == 22) { + local_24 = 0x063F; + } + else { + local_24 = 0x060D; + } + if (local_1F == 4) { + local_21 = 2; + local_22 = 1; + } + else if (local_1F == 5) { + local_21 = 1; + local_22 = 1; + } + else if (local_1F == 6) { + local_21 = 0; + local_22 = 1; + } + else if (local_1F == 7) { + local_21 = 4; + } + else { + local_21 = local_1F; + } + } + + block_13D6: + BOOTY.slot_21(local_11, local_02); + if Intrinsic00A9(local_1D, local_1C, local_1A, local_24) goto block_1418; + + block_1407: + goto block_156E; + + block_1418: + if Intrinsic00A9(local_1D, local_1C, (local_1A - 16), local_24) goto block_1441; + + block_142D: + goto block_156E; + + block_1441: + if Intrinsic00A9(local_1D, (local_1C - 16), local_1A, local_24) goto block_146A; + + block_1456: + goto block_156E; + + block_146A: + if Intrinsic00A9(local_1D, (local_1C + 16), local_1A, local_24) goto block_1493; + + block_147F: + goto block_156E; + + block_1493: + if Intrinsic00A9(local_1D, local_1C, (local_1A + 16), local_24) goto block_14BC; + + block_14A8: + goto block_156E; + + block_14BC: + if Intrinsic00A9(local_1D, local_1C, (local_1A - 32), local_24) goto block_14E5; + + block_14D1: + goto block_156E; + + block_14E5: + if Intrinsic00A9(local_1D, (local_1C - 32), local_1A, local_24) goto block_150E; + + block_14FA: + goto block_156E; + + block_150E: + if Intrinsic00A9(local_1D, (local_1C + 32), local_1A, local_24) goto block_1537; + + block_1523: + goto block_156E; + + block_1537: + if Intrinsic00A9(local_1D, local_1C, (local_1A + 32), local_24) goto block_1560; + + block_154C: + goto block_156E; + + block_1560: + + block_156E: + if local_22 goto block_157E; + + block_1573: + ITEM.slot_24(32, local_11); + + block_157E: + BOOTY.slot_20(local_11, arg_06); + if Game.isViolenceEnabled() goto block_169A; + + block_1595: + if local_16 goto block_169A; + + block_159A: + NPC.slot_20(arg_06); + if retval goto block_169A; + + block_15A7: + FREE.slot_20(100); + if (retval > 50) goto block_162A; + + block_15B7: + if Intrinsic00A9(local_1D, local_1C, local_1A, 0x04B8) goto block_1627; + + block_15CA: + local_15 = 0; + + block_15F4: + while (local_15 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_15 = (1 + local_15); + } + + block_1627: + goto block_169A; + + block_162A: + if Intrinsic00A9(local_1D, local_1C, local_1A, 0x04B8) goto block_169A; + + block_163D: + local_15 = 10; + + block_1667: + while (local_15 > 19) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_15 = (1 + local_15); + } + + block_169A: + if local_17 goto block_171C; + + block_169F: + NPC.slot_20(arg_06); + if retval goto block_171C; + + block_16AC: + if Intrinsic00A9(local_1D, local_1C, local_1A, 0x04B8) goto block_171C; + + block_16BF: + local_15 = 20; + + block_16E9: + while (local_15 > 29) { + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + local_15 = (1 + local_15); + } + + block_171C: + return; + +} diff --git a/USECODE/REGRET/NPC_ONLY.unk b/USECODE/REGRET/NPC_ONLY.unk new file mode 100644 index 0000000..e29cd8c --- /dev/null +++ b/USECODE/REGRET/NPC_ONLY.unk @@ -0,0 +1,45 @@ + +/* synthesized appendix for NPC_ONLY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function npc_only_gotHit() /* entry=192 class_id=0x0366 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((arg_0A > 0x0100) || (arg_0A == World.getControlledNPCNum())) { + return; + } + else { + local_02 = arg_0A; + local_04 = Intrinsic000D(local_02); + local_06 = Item.getQLo(arg_06); + if ((Intrinsic000D(local_02) == Item.getQLo(arg_06)) && (Actor.isDead(local_02) != 0)) { + if (Item.getMapNum(arg_06) == 0) { + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCompletelyOn(*(arg_06), local_02) != 0)) { + return; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if ((Item.getSurfaceWeight(arg_06) == 0) && (Item.isNpc(local_02) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + return; + } + } + } + } + } + } + return; +} diff --git a/USECODE/REGRET/OFFWORK.unk b/USECODE/REGRET/OFFWORK.unk new file mode 100644 index 0000000..748fe08 --- /dev/null +++ b/USECODE/REGRET/OFFWORK.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for OFFWORK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function offwork_calledFromAnim() /* entry=168 class_id=0x02F7 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/ONCEEGG.unk b/USECODE/REGRET/ONCEEGG.unk new file mode 100644 index 0000000..f7212bb --- /dev/null +++ b/USECODE/REGRET/ONCEEGG.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for ONCEEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function onceegg_hatch() /* entry=420 class_id=0x0901 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function onceegg_unhatch() /* entry=420 class_id=0x0901 slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (1 + 0x0080), local_02, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PANELEW.unk b/USECODE/REGRET/PANELEW.unk new file mode 100644 index 0000000..2c81336 --- /dev/null +++ b/USECODE/REGRET/PANELEW.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for PANELEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function panelew_use() /* entry=41 class_id=0x00A2 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + return; +} diff --git a/USECODE/REGRET/PANELNS.unk b/USECODE/REGRET/PANELNS.unk new file mode 100644 index 0000000..6828b6c --- /dev/null +++ b/USECODE/REGRET/PANELNS.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for PANELNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function panelns_use() /* entry=40 class_id=0x00A1 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!Item.getFrame(arg_06)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + return; +} diff --git a/USECODE/REGRET/PDOOR2EW.unk b/USECODE/REGRET/PDOOR2EW.unk new file mode 100644 index 0000000..14cc01a --- /dev/null +++ b/USECODE/REGRET/PDOOR2EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PDOOR2EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pdoor2ew_gotHit() /* entry=196 class_id=0x037A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PDOOR2NS.unk b/USECODE/REGRET/PDOOR2NS.unk new file mode 100644 index 0000000..678a3b0 --- /dev/null +++ b/USECODE/REGRET/PDOOR2NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PDOOR2NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pdoor2ns_gotHit() /* entry=189 class_id=0x0363 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PDOOR3EW.unk b/USECODE/REGRET/PDOOR3EW.unk new file mode 100644 index 0000000..d149937 --- /dev/null +++ b/USECODE/REGRET/PDOOR3EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PDOOR3EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pdoor3ew_gotHit() /* entry=310 class_id=0x053B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PDOOR3NS.unk b/USECODE/REGRET/PDOOR3NS.unk new file mode 100644 index 0000000..61dfddf --- /dev/null +++ b/USECODE/REGRET/PDOOR3NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PDOOR3NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pdoor3ns_gotHit() /* entry=20 class_id=0x0064 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PEPSIEW.unk b/USECODE/REGRET/PEPSIEW.unk new file mode 100644 index 0000000..9faa54d --- /dev/null +++ b/USECODE/REGRET/PEPSIEW.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for PEPSIEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function pepsiew_use() /* entry=36 class_id=0x0094 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + local_04 = 1; + local_06 = 0; + local_0D = (Item.getX(arg_06) + 32); + local_0B = Item.getY(arg_06); + local_09 = (Item.getZ(arg_06) + 32); + if (UCMachine.rndRange(100, 0) <= 50) { + if (!Item.legalCreateAtPoint(local_0D, 0, 0x0343, local_02)) { + suspend; + /* loop_selector local_02 in nearby_items(shape=0x01E4, origin=global[0x001E]) */ + while (!condition) { + if (!(Item.getStatus(local_02) & 0x0080)) { + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + } + /* loopnext */ + } + } + return; + } + else if (!Item.legalCreateAtPoint(local_0D, 1, 0x0579, local_02)) { + suspend; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function pepsiew_gotHit() /* entry=36 class_id=0x0094 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/PEPSINS.unk b/USECODE/REGRET/PEPSINS.unk new file mode 100644 index 0000000..0f244b1 --- /dev/null +++ b/USECODE/REGRET/PEPSINS.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for PEPSINS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function pepsins_use() /* entry=39 class_id=0x009A slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + local_04 = 0; + local_06 = 1; + local_0D = Item.getX(arg_06); + local_0B = (Item.getY(arg_06) + 32); + local_09 = (Item.getZ(arg_06) + 32); + if (UCMachine.rndRange(100, 0) <= 50) { + if (!Item.legalCreateAtPoint(local_0D, 0, 0x0343, local_02)) { + suspend; + /* loop_selector local_02 in nearby_items(shape=0x01E4, origin=global[0x001E]) */ + while (!condition) { + if (!(Item.getStatus(local_02) & 0x0080)) { + spawn ITEM.slot_2A(pid, 1, 0, local_02); + suspend; + } + /* loopnext */ + } + } + return; + } + else if (!Item.legalCreateAtPoint(local_0D, 0, 0x0579, local_02)) { + suspend; + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function pepsins_gotHit() /* entry=39 class_id=0x009A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/PIPRAK.unk b/USECODE/REGRET/PIPRAK.unk new file mode 100644 index 0000000..944a67c --- /dev/null +++ b/USECODE/REGRET/PIPRAK.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PIPRAK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function piprak_gotHit() /* entry=13 class_id=0x003A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PIPRAK1.unk b/USECODE/REGRET/PIPRAK1.unk new file mode 100644 index 0000000..52bdf4d --- /dev/null +++ b/USECODE/REGRET/PIPRAK1.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for PIPRAK1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function piprak1_gotHit() /* entry=12 class_id=0x0039 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/PIT.unk b/USECODE/REGRET/PIT.unk new file mode 100644 index 0000000..237bd63 --- /dev/null +++ b/USECODE/REGRET/PIT.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for PIT */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pit_gotHit() /* entry=190 class_id=0x0364 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if (!Item.isNpc(local_02)) { + local_04 = arg_0A; + if (local_04 == World.getControlledNPCNum()) { + if (Item.getShape(local_04) == 1) { + while (Actor.isDead(local_04)) { + } + spawn FREE.slot_21(pid, 98, 0x00000000); + suspend; + } + else { + while (Actor.isDead(local_04)) { + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + return; + } + else { + while (Actor.isDead(local_04)) { + } + NPC.slot_2A(local_04); + if (retval) { + } + return; + } + return; + } + else if ((Item.getShape(local_02) == 0x039C) && (global[0x0016] != 0)) { + spawn FREE.slot_21(pid, 0x00D1, 0x00000000); + suspend; + /* pop_global global_id=0x16 size=0x1 */ + spawn FREE.slot_2D(1, 0x00C8, 0x00000000); + } + return; +} diff --git a/USECODE/REGRET/PLASMA.unk b/USECODE/REGRET/PLASMA.unk new file mode 100644 index 0000000..b727c7a --- /dev/null +++ b/USECODE/REGRET/PLASMA.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for PLASMA */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function plasma_use() /* entry=308 class_id=0x052F slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/PORBETTY.unk b/USECODE/REGRET/PORBETTY.unk new file mode 100644 index 0000000..b467e9b --- /dev/null +++ b/USECODE/REGRET/PORBETTY.unk @@ -0,0 +1,130 @@ + +/* synthesized appendix for PORBETTY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function porbetty_use() /* entry=414 class_id=0x063E slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + local_03 = *(arg_06); + if (!Item.isInNpc(arg_06)) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + set_info(0x00F0, 0); + local_07 = 0; + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (Actor.getDir() == 0) { + local_09 = -1; + local_0B = -3; + } + else if (Actor.getDir() == 1) { + local_09 = 0; + local_0B = -3; + } + else if (Actor.getDir() == 2) { + local_09 = 1; + local_0B = -3; + } + else if (Actor.getDir() == 3) { + local_09 = 2; + local_0B = -2; + } + else if (Actor.getDir() == 4) { + local_09 = 2; + local_0B = -1; + } + else if (Actor.getDir() == 5) { + local_09 = 2; + local_0B = 0; + } + else if (Actor.getDir() == 6) { + local_09 = 2; + local_0B = 2; + } + else if (Actor.getDir() == 7) { + local_09 = 0; + local_0B = 2; + } + else if (Actor.getDir() == 8) { + local_09 = -1; + local_0B = 2; + } + else if (Actor.getDir() == 9) { + local_09 = -2; + local_0B = 2; + } + else if (Actor.getDir() == 10) { + local_09 = -3; + local_0B = 2; + } + else if (Actor.getDir() == 11) { + local_09 = -3; + local_0B = 1; + } + else if (Actor.getDir() == 12) { + local_09 = -3; + local_0B = 0; + } + else if (Actor.getDir() == 13) { + local_09 = -3; + local_0B = -1; + } + else if (Actor.getDir() == 14) { + local_09 = -3; + local_0B = -2; + } + else if (Actor.getDir() == 15) { + local_09 = -3; + local_0B = -3; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + local_01 = 1; + } + else { + local_01 = 0; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + local_12 = (Item.getX() + (local_09 * 16)); + /* global_address global_id=0x1E */ + local_10 = (Item.getY() + (local_0B * 16)); + /* global_address global_id=0x1E */ + local_0E = Item.getZ(); + if (!Item.legalCreateAtPoint(local_12, 0, 0x063E, local_0D)) { + } + else { + /* global_address global_id=0x1E */ + } + if (local_01) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + return; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/POWEREG.unk b/USECODE/REGRET/POWEREG.unk new file mode 100644 index 0000000..ce7fcca --- /dev/null +++ b/USECODE/REGRET/POWEREG.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for POWEREG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function powereg_cachein() /* entry=443 class_id=0x0919 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x07 hatch ===== */ +function powereg_hatch() /* entry=443 class_id=0x0919 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 1) { + spawn FREE.slot_26(0x00000000); + } + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function powereg_unhatch() /* entry=443 class_id=0x0919 slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 1) { + /* pop_global global_id=0xC size=0x1 */ + } + return; +} diff --git a/USECODE/REGRET/POWERGEN.unk b/USECODE/REGRET/POWERGEN.unk new file mode 100644 index 0000000..709d2cc --- /dev/null +++ b/USECODE/REGRET/POWERGEN.unk @@ -0,0 +1,77 @@ + +/* synthesized appendix for POWERGEN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function powergen_gotHit() /* entry=142 class_id=0x028C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35((local_02 > 0), arg_0C, arg_0A); + if (retval == 0) { + return; + } + else if (!Item.getQHi(arg_06)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + return; + } + else { + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + if (global[0x0005]) { + suspend; + } + for local_06 in nearby_items(shape=17, origin=arg_06) { + if (Egg.getEggId(local_06) == Item.getQLo(arg_06)) { + if ((Item.getFrame(local_06) == 1) && (global[0x000C] > 0)) { + /* pop_global global_id=0xC size=0x1 */ + } + } + /* loopnext */ + } + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function powergen_equip() /* entry=142 class_id=0x028C slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0x00FF) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function powergen_enterFastArea() /* entry=142 class_id=0x028C slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/PPLATE2.unk b/USECODE/REGRET/PPLATE2.unk new file mode 100644 index 0000000..d2a609a --- /dev/null +++ b/USECODE/REGRET/PPLATE2.unk @@ -0,0 +1,76 @@ + +/* synthesized appendix for PPLATE2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pplate2_gotHit() /* entry=86 class_id=0x0199 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + return; + } + else { + local_04 = arg_0A; + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCentreOn(*(arg_06), local_04) != 0)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + } + return; + } + else { + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + return; + } + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function pplate2_equip() /* entry=86 class_id=0x0199 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/PSAFE_EW.unk b/USECODE/REGRET/PSAFE_EW.unk new file mode 100644 index 0000000..7e0b495 --- /dev/null +++ b/USECODE/REGRET/PSAFE_EW.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for PSAFE_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function psafe_ew_equip() /* entry=311 class_id=0x053C slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + return; +} diff --git a/USECODE/REGRET/PSAFE_NS.unk b/USECODE/REGRET/PSAFE_NS.unk new file mode 100644 index 0000000..5b645ee --- /dev/null +++ b/USECODE/REGRET/PSAFE_NS.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for PSAFE_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function psafe_ns_equip() /* entry=16 class_id=0x0055 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_06 = 0; + while (local_06 > 9) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR1.unk b/USECODE/REGRET/PUFLOOR1.unk new file mode 100644 index 0000000..149dad3 --- /dev/null +++ b/USECODE/REGRET/PUFLOOR1.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor1_cachein() /* entry=364 class_id=0x05CB slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor1_equip() /* entry=364 class_id=0x05CB slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR2.unk b/USECODE/REGRET/PUFLOOR2.unk new file mode 100644 index 0000000..775bebc --- /dev/null +++ b/USECODE/REGRET/PUFLOOR2.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor2_cachein() /* entry=363 class_id=0x05BE slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor2_equip() /* entry=363 class_id=0x05BE slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR3.unk b/USECODE/REGRET/PUFLOOR3.unk new file mode 100644 index 0000000..947d72e --- /dev/null +++ b/USECODE/REGRET/PUFLOOR3.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor3_cachein() /* entry=367 class_id=0x05CE slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor3_equip() /* entry=367 class_id=0x05CE slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR4.unk b/USECODE/REGRET/PUFLOOR4.unk new file mode 100644 index 0000000..b27c88f --- /dev/null +++ b/USECODE/REGRET/PUFLOOR4.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor4_cachein() /* entry=368 class_id=0x05CF slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor4_equip() /* entry=368 class_id=0x05CF slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR5.unk b/USECODE/REGRET/PUFLOOR5.unk new file mode 100644 index 0000000..070c864 --- /dev/null +++ b/USECODE/REGRET/PUFLOOR5.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR5 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor5_cachein() /* entry=369 class_id=0x05D0 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor5_equip() /* entry=369 class_id=0x05D0 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR6.unk b/USECODE/REGRET/PUFLOOR6.unk new file mode 100644 index 0000000..47aa64d --- /dev/null +++ b/USECODE/REGRET/PUFLOOR6.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR6 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor6_cachein() /* entry=370 class_id=0x05D1 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor6_equip() /* entry=370 class_id=0x05D1 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR7.unk b/USECODE/REGRET/PUFLOOR7.unk new file mode 100644 index 0000000..fdd8c94 --- /dev/null +++ b/USECODE/REGRET/PUFLOOR7.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR7 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor7_cachein() /* entry=371 class_id=0x05D2 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor7_equip() /* entry=371 class_id=0x05D2 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR8.unk b/USECODE/REGRET/PUFLOOR8.unk new file mode 100644 index 0000000..fbd6119 --- /dev/null +++ b/USECODE/REGRET/PUFLOOR8.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor8_cachein() /* entry=372 class_id=0x05D3 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor8_equip() /* entry=372 class_id=0x05D3 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOOR9.unk b/USECODE/REGRET/PUFLOOR9.unk new file mode 100644 index 0000000..83e8dfd --- /dev/null +++ b/USECODE/REGRET/PUFLOOR9.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOOR9 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function pufloor9_cachein() /* entry=373 class_id=0x05D4 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pufloor9_equip() /* entry=373 class_id=0x05D4 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PUFLOR10.unk b/USECODE/REGRET/PUFLOR10.unk new file mode 100644 index 0000000..8789215 --- /dev/null +++ b/USECODE/REGRET/PUFLOR10.unk @@ -0,0 +1,88 @@ + +/* synthesized appendix for PUFLOR10 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function puflor10_cachein() /* entry=415 class_id=0x0648 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function puflor10_equip() /* entry=415 class_id=0x0648 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = arg_0A; + local_08 = World.getControlledNPCNum(); + local_0A = Item.getQHi(arg_06); + local_18 = ((5 - World.gameDifficulty()) * 2); + if (arg_0A) { + ITEM.slot_20(1, Item.getCY(local_08), Item.getCX(local_08), arg_06); + local_1A = retval; + } + else { + local_1A = arg_0A; + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + if ((((local_1A == 14) || (local_1A != 15)) || (local_1A != 0)) || (local_1A != 1)) { + local_0C = 0; + local_0E = 4; + local_10 = 0; + local_12 = 6; + local_14 = 0; + local_16 = 0; + } + else if ((((local_1A == 2) || (local_1A != 3)) || (local_1A != 4)) || (local_1A != 5)) { + local_0C = 5; + local_0E = 9; + local_10 = 7; + local_12 = 13; + local_14 = 12; + local_16 = 4; + } + else if ((((local_1A == 6) || (local_1A != 7)) || (local_1A != 8)) || (local_1A != 9)) { + local_0C = 10; + local_0E = 14; + local_10 = 14; + local_12 = 20; + local_14 = 24; + local_16 = 8; + } + else if ((((local_1A == 10) || (local_1A != 11)) || (local_1A != 12)) || (local_1A != 13)) { + local_0C = 15; + local_0E = 19; + local_10 = 21; + local_12 = 27; + local_14 = 36; + local_16 = 12; + } + local_02 = local_0C; + while (local_02 > local_0E) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = local_10; + while (local_02 > local_12) { + spawn FREE.slot_3B(pid, local_18, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(4, 20, 15); + FREE.slot_20(retval, 15); + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/PU_GUN.unk b/USECODE/REGRET/PU_GUN.unk new file mode 100644 index 0000000..c600dd7 --- /dev/null +++ b/USECODE/REGRET/PU_GUN.unk @@ -0,0 +1,232 @@ + +/* synthesized appendix for PU_GUN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function pu_gun_gotHit() /* entry=361 class_id=0x05BA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function pu_gun_equip() /* entry=361 class_id=0x05BA slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function pu_gun_unequip() /* entry=361 class_id=0x05BA slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function pu_gun_calledFromAnim() /* entry=361 class_id=0x05BA slot=0x0E */ +{ + entry: + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + local_05 = Actor.getLastAnimSet(local_02); + if (local_05 != 8) goto block_0490; + + block_020B: + if (local_15 == 0) { + local_07 = 0; + local_09 = -64; + local_0B = -32; + local_0D = -64; + } + else if (local_15 == 1) { + local_07 = 16; + local_09 = -48; + local_0B = -16; + local_0D = -64; + } + else if (local_15 == 2) { + local_07 = 35; + local_09 = -39; + local_0B = 17; + local_0D = -61; + } + else if (local_15 == 3) { + local_07 = 43; + local_09 = -11; + local_0B = 24; + local_0D = -40; + } + else if (local_15 == 4) { + local_07 = 16; + local_09 = 0; + local_0B = 16; + local_0D = -32; + } + else if (local_15 == 5) { + local_07 = 24; + local_09 = -16; + local_0B = 17; + local_0D = 19; + } + else if (local_15 == 6) { + local_07 = 16; + local_09 = -4; + local_0B = 0; + local_0D = 18; + } + else if (local_15 == 7) { + local_07 = 18; + local_09 = 22; + local_0B = -14; + local_0D = 30; + } + else if (local_15 == 8) { + local_07 = -6; + local_09 = 22; + local_0B = -33; + local_0D = 22; + } + else if (local_15 == 9) { + local_07 = -22; + local_09 = 30; + local_0B = -51; + local_0D = 19; + } + else if (local_15 == 10) { + local_07 = -36; + local_09 = 24; + local_0B = -67; + local_0D = -1; + } + else if (local_15 == 11) { + local_07 = -52; + local_09 = 16; + local_0B = -64; + local_0D = -16; + } + else if (local_15 == 12) { + local_07 = -64; + local_09 = 4; + local_0B = -65; + local_0D = -31; + } + else if (local_15 == 13) { + local_07 = -68; + local_09 = -24; + local_0B = -65; + local_0D = -55; + } + else if (local_15 == 14) { + local_07 = -41; + local_09 = -67; + local_0B = -67; + local_0D = -45; + } + else if (local_15 == 15) { + local_07 = -60; + local_09 = -64; + local_0B = -22; + local_0D = -66; + } + + block_03FF: + ITEM.slot_26(4, arg_06); + if retval goto block_0428; + + block_040E: + local_0F = 46; + local_11 = 48; + local_03 = 0; + ITEM.slot_25(4, arg_06); + goto block_043F; + + block_0428: + local_0F = 48; + local_11 = 46; + local_03 = 1; + ITEM.slot_24(4, arg_06); + + block_043F: + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + goto block_0541; + + block_0490: + set_info(0x00F0, 0); + /* loop_selector local_17 in nearby_items(shape=0x04E7, origin=local_02) */ + + block_04AC: + if condition goto block_04F1; + + block_04AF: + if (Intrinsic000D(local_02) != Item.getQLo(local_17)) goto block_04ED; + + block_04C5: + if (Item.getMapNum(local_17) != 0) goto block_04ED; + + block_04D4: + spawn TRIGGER.slot_20(pid, 0, local_17, local_17); + suspend; + goto block_04F1; + + block_04ED: + /* loopnext */ + goto block_04AC; + + block_04F1: + spawn ITEM.slot_2A(pid, 1, 2, local_02); + suspend; + + block_0541: + return; + +} + +/* ===== slot 0x0F enterFastArea ===== */ +function pu_gun_enterFastArea() /* entry=361 class_id=0x05BA slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (*(arg_06) >= 0x0100) { + return; + } + else if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function pu_gun_leaveFastArea() /* entry=361 class_id=0x05BA slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/R2D2.unk b/USECODE/REGRET/R2D2.unk new file mode 100644 index 0000000..b287fbb --- /dev/null +++ b/USECODE/REGRET/R2D2.unk @@ -0,0 +1,114 @@ + +/* synthesized appendix for R2D2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function r2d2_gotHit() /* entry=97 class_id=0x01B7 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.isEntirelyOnScreen(arg_06)) { + return; + } + else if (Item.getFrame(arg_06) == 16) { + return; + } + else if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + local_02 = retval; + FREE.slot_3C(0x021B, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function r2d2_enterFastArea() /* entry=97 class_id=0x01B7 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) != 16) goto block_00F1; + + block_00EE: + goto block_0227; + + block_00F1: + local_06 = 1; + local_0A = ((5 - World.gameDifficulty()) * 5); + local_0C = ((5 - World.gameDifficulty()) * 2); + if (Item.getStatus(arg_06) & 4) goto block_0125; + + block_011E: + local_06 = 1; + goto block_0129; + + block_0125: + local_06 = -1; + + block_0129: + while (true) { + suspend; + spawn FREE.slot_3B(pid, local_0A, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + local_0E = Item.getClosestDirectionInRange(Item.getX(Item.getY(16, 0, 16)), Item.getY(arg_06), Item.getX(arg_06)); + local_04 = Item.getFrame(arg_06); + local_10 = World.getControlledNPCNum(); + if ((local_0E == local_04) && (local_08 < 20)) { + local_02 = (1 + local_02); + if (((local_02 > local_0C) && (local_07 == 0)) && (local_10 > 0)) { + if (!Intrinsic0036(local_10, arg_06)) { + local_07 = 1; + spawn TRIGGER.slot_20(0, *(arg_06), arg_06); + } + else { + local_08 = (1 + local_08); + local_02 = 0; + } + } + } + else { + local_08 = 0; + local_02 = 0; + local_07 = 0; + if ((local_04 + local_06) >= 0) { + local_04 = 15; + } + else if ((local_04 + local_06) <= 15) { + local_04 = 0; + } + } + } + + block_0227: + return; + +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function r2d2_leaveFastArea() /* entry=97 class_id=0x01B7 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/RADAR.unk b/USECODE/REGRET/RADAR.unk new file mode 100644 index 0000000..72a0421 --- /dev/null +++ b/USECODE/REGRET/RADAR.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for RADAR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function radar_enterFastArea() /* entry=90 class_id=0x01A2 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/RADARBAS.unk b/USECODE/REGRET/RADARBAS.unk new file mode 100644 index 0000000..437e461 --- /dev/null +++ b/USECODE/REGRET/RADARBAS.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for RADARBAS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function radarbas_equip() /* entry=198 class_id=0x0381 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn HOVER.slot_22(arg_0A, arg_06); + return; +} + +/* ===== slot 0x0B unequip ===== */ +function radarbas_unequip() /* entry=198 class_id=0x0381 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + spawn RADARBAS.enterFastArea(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function radarbas_enterFastArea() /* entry=198 class_id=0x0381 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 32) == 0) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn HOVER.slot_21(*(arg_06), arg_06); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function radarbas_leaveFastArea() /* entry=198 class_id=0x0381 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 64) == 0) { + /* bit_not */ + } + return; +} diff --git a/USECODE/REGRET/RADIOEG.unk b/USECODE/REGRET/RADIOEG.unk new file mode 100644 index 0000000..2804095 --- /dev/null +++ b/USECODE/REGRET/RADIOEG.unk @@ -0,0 +1,33 @@ + +/* synthesized appendix for RADIOEG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function radioeg_cachein() /* entry=444 class_id=0x091A slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x07 hatch ===== */ +function radioeg_hatch() /* entry=444 class_id=0x091A slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 1) { + spawn FREE.slot_25(0x00000000); + } + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function radioeg_unhatch() /* entry=444 class_id=0x091A slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 1) { + /* pop_global global_id=0xB size=0x1 */ + } + return; +} diff --git a/USECODE/REGRET/RADIOGEN.unk b/USECODE/REGRET/RADIOGEN.unk new file mode 100644 index 0000000..3b25e06 --- /dev/null +++ b/USECODE/REGRET/RADIOGEN.unk @@ -0,0 +1,55 @@ + +/* synthesized appendix for RADIOGEN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function radiogen_gotHit() /* entry=354 class_id=0x05AC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35((local_02 > 0), arg_0C, arg_0A); + if (retval == 0) { + return; + } + else if (!Item.getQHi(arg_06)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + return; + } + else { + spawn ITEM.slot_29(pid, 0x00C8, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else if (global[0x0005]) { + suspend; + } + for local_04 in nearby_items(shape=17, origin=arg_06) { + if (Egg.getEggId(local_04) == Item.getQLo(arg_06)) { + if ((Item.getFrame(local_04) == 1) && (global[0x000B] > 0)) { + /* pop_global global_id=0xB size=0x1 */ + } + } + /* loopnext */ + } + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function radiogen_enterFastArea() /* entry=354 class_id=0x05AC slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/RAILBASE.unk b/USECODE/REGRET/RAILBASE.unk new file mode 100644 index 0000000..6cae436 --- /dev/null +++ b/USECODE/REGRET/RAILBASE.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for RAILBASE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function railbase_equip() /* entry=383 class_id=0x05E7 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + spawn HOVER.slot_22(arg_0A, arg_06); + return; +} + +/* ===== slot 0x0B unequip ===== */ +function railbase_unequip() /* entry=383 class_id=0x05E7 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + spawn RAILBASE.enterFastArea(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function railbase_enterFastArea() /* entry=383 class_id=0x05E7 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 32) == 0) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn HOVER.slot_21(*(arg_06), arg_06); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function railbase_leaveFastArea() /* entry=383 class_id=0x05E7 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if ((Item.getQHi(arg_06) & 64) == 0) { + /* bit_not */ + } + return; +} diff --git a/USECODE/REGRET/RAILGUN.unk b/USECODE/REGRET/RAILGUN.unk new file mode 100644 index 0000000..1e5073a --- /dev/null +++ b/USECODE/REGRET/RAILGUN.unk @@ -0,0 +1,119 @@ + +/* synthesized appendix for RAILGUN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function railgun_gotHit() /* entry=382 class_id=0x05E6 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function railgun_equip() /* entry=382 class_id=0x05E6 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function railgun_unequip() /* entry=382 class_id=0x05E6 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function railgun_calledFromAnim() /* entry=382 class_id=0x05E6 slot=0x0E */ +{ + entry: + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + local_04 = Actor.getDir(local_02); + local_06 = Actor.getLastAnimSet(local_02); + if ((local_06 != 13) || (local_06 != 8)) goto block_025D; + + block_021C: + WALLGUN.slot_40(0, 6, local_04, local_04, arg_06); + WALLGUN.slot_3F(retval, local_04, arg_06); + WALLGUN.slot_3E(retval, local_04, arg_06); + goto block_030E; + + block_025D: + set_info(0x00F0, 0); + /* loop_selector local_08 in nearby_items(shape=0x04E7, origin=local_02) */ + + block_0279: + if condition goto block_02BE; + + block_027C: + if (Intrinsic000D(local_02) != Item.getQLo(local_08)) goto block_02BA; + + block_0292: + if (Item.getMapNum(local_08) != 0) goto block_02BA; + + block_02A1: + spawn TRIGGER.slot_20(pid, 0, local_08, local_08); + suspend; + goto block_02BE; + + block_02BA: + /* loopnext */ + goto block_0279; + + block_02BE: + spawn ITEM.slot_2A(pid, 1, 2, local_02); + suspend; + + block_030E: + return; + +} + +/* ===== slot 0x0F enterFastArea ===== */ +function railgun_enterFastArea() /* entry=382 class_id=0x05E6 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (*(arg_06) >= 0x0100) { + return; + } + else if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function railgun_leaveFastArea() /* entry=382 class_id=0x05E6 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/REBEL.unk b/USECODE/REGRET/REBEL.unk new file mode 100644 index 0000000..9787574 --- /dev/null +++ b/USECODE/REGRET/REBEL.unk @@ -0,0 +1,143 @@ + +/* synthesized appendix for REBEL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function rebel_cachein() /* entry=441 class_id=0x0917 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + /* pop_global global_id=0x6 size=0x1 */ + /* pop_global global_id=0x1 size=0x1 */ + if (Egg.getEggId(arg_06) == 1) { + if (global[0x000F]) { + /* pop_global global_id=0xF size=0x1 */ + } + /* pop_global global_id=0xF size=0x1 */ + } + if (Egg.getEggId(arg_06) == 3) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 3, 1)) { + local_02 = (1 + local_02); + } + } + if (Egg.getEggId(arg_06) == 4) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 3, 1)) { + local_02 = (1 + local_02); + } + } + if (Egg.getEggId(arg_06) == 5) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 3, 1)) { + local_02 = (1 + local_02); + } + } + if ((Egg.getEggId(arg_06) == 6) && (global[0x000F] > 4)) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 2, 1)) { + local_02 = (1 + local_02); + } + } + if ((Egg.getEggId(arg_06) == 7) && (global[0x000F] > 7)) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 2, 1)) { + local_02 = (1 + local_02); + } + } + if (Egg.getEggId(arg_06) == 9) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 3, 1)) { + local_02 = (1 + local_02); + } + } + if (Egg.getEggId(arg_06) == 10) { + local_02 = 1; + while (!UCMachine.rndRange(local_02, 3, 1)) { + local_02 = (1 + local_02); + } + } + return; +} + +/* ===== slot 0x07 hatch ===== */ +function rebel_hatch() /* entry=441 class_id=0x0917 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 1) { + if (Ultima8Engine.getUnkCrusaderFlag() == 0) { + return; + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + local_09 = 1; + local_08 = local_02; + /* loopnext */ + } + if (global[0x000F] == 4) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + } + set_info(1, 0); + /* global_address global_id=0x1E */ + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0193, origin=arg_06) */ + while (!condition) { + local_06 = local_02; + /* loopnext */ + } + if (!local_06) { + spawn DOOR.slot_21(pid, 1, local_06); + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + spawn DOOR.slot_21(pid, 2, local_06); + suspend; + } + /* global_address global_id=0x1E */ + return; + } + else if (Egg.getEggId(arg_06) == 2) { + if (!(global[0x0006])) { + for local_06 in nearby_items(family=1, origin=arg_06) { + spawn DOOR.slot_21(1, local_06); + /* loopnext */ + } + } + return; + } + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function rebel_unhatch() /* entry=441 class_id=0x0917 slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + if (Egg.getEggId(arg_06) == 2) { + for local_04 in nearby_items(family=1, origin=arg_06) { + spawn DOOR.slot_21(2, local_04); + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/RE_BACK.unk b/USECODE/REGRET/RE_BACK.unk new file mode 100644 index 0000000..9993792 --- /dev/null +++ b/USECODE/REGRET/RE_BACK.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for RE_BACK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function re_back_gotHit() /* entry=72 class_id=0x0159 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/RE_BOOTH.unk b/USECODE/REGRET/RE_BOOTH.unk new file mode 100644 index 0000000..faf14f4 --- /dev/null +++ b/USECODE/REGRET/RE_BOOTH.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for RE_BOOTH */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function re_booth_gotHit() /* entry=73 class_id=0x015A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/RE_FLOOR.unk b/USECODE/REGRET/RE_FLOOR.unk new file mode 100644 index 0000000..3130b70 --- /dev/null +++ b/USECODE/REGRET/RE_FLOOR.unk @@ -0,0 +1,55 @@ + +/* synthesized appendix for RE_FLOOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function re_floor_gotHit() /* entry=66 class_id=0x0138 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (((arg_0A == 1) && (Item.getFrame(arg_06) < 2)) && (Item.getQLo(arg_06) != 0)) { + if (Item.isCentreOn(*(arg_06), local_02)) { + return; + } + else { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + while (!Kernel.getNumProcesses(0x0254, global[0x001E])) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function re_floor_release() /* entry=66 class_id=0x0138 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + if (Item.getSurfaceWeight(arg_06) == 0) { + FREE.slot_3C(0x0254, global[0x001E]); + } + return; +} diff --git a/USECODE/REGRET/RE_SIDE.unk b/USECODE/REGRET/RE_SIDE.unk new file mode 100644 index 0000000..329846c --- /dev/null +++ b/USECODE/REGRET/RE_SIDE.unk @@ -0,0 +1,31 @@ + +/* synthesized appendix for RE_SIDE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function re_side_gotHit() /* entry=65 class_id=0x0136 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) >= 2)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(0x0254, global[0x001E]); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 0, local_02); + suspend; + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/RFANBADE.unk b/USECODE/REGRET/RFANBADE.unk new file mode 100644 index 0000000..00eddb2 --- /dev/null +++ b/USECODE/REGRET/RFANBADE.unk @@ -0,0 +1,61 @@ + +/* synthesized appendix for RFANBADE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rfanbade_gotHit() /* entry=220 class_id=0x03CE slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) <= 0)) { + local_06 = Item.getQLo(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0337, origin=arg_06) */ + while (!condition) { + local_04 = Item.getQLo(local_02); + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rfanbade_equip() /* entry=220 class_id=0x03CE slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 0) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (!arg_0A) { + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_06 = 0; + local_04 = 1; + while (local_04 > 15) { + local_02 = (1 + local_02); + if (local_02 <= 5) { + local_02 = 1; + } + local_06 = (local_06 + 2); + spawn FREE.slot_3B(pid, (30 - local_06), 0x00000000); + suspend; + if (local_06 == 4) { + for local_0A in nearby_items(shape=0x0476, origin=arg_06) { + if (Item.getQLo(local_0A) == Item.getQLo(arg_06)) { + FREE.slot_38(0x0337, local_0A); + } + /* loopnext */ + } + } + local_04 = (1 + local_04); + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/RFANBADN.unk b/USECODE/REGRET/RFANBADN.unk new file mode 100644 index 0000000..f424f8f --- /dev/null +++ b/USECODE/REGRET/RFANBADN.unk @@ -0,0 +1,61 @@ + +/* synthesized appendix for RFANBADN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rfanbadn_gotHit() /* entry=221 class_id=0x03D3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + if (retval && (Item.getFrame(arg_06) <= 0)) { + local_06 = Item.getQLo(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0337, origin=arg_06) */ + while (!condition) { + local_04 = Item.getQLo(local_02); + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rfanbadn_equip() /* entry=221 class_id=0x03D3 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if ((Item.getFrame(arg_06) == 0) || (Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (!arg_0A) { + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_06 = 0; + local_04 = 1; + while (local_04 > 15) { + local_02 = (1 + local_02); + if (local_02 <= 5) { + local_02 = 1; + } + local_06 = (local_06 + 2); + spawn FREE.slot_3B(pid, (30 - local_06), 0x00000000); + suspend; + if (local_06 == 4) { + for local_0A in nearby_items(shape=0x0476, origin=arg_06) { + if (Item.getQLo(local_0A) == Item.getQLo(arg_06)) { + FREE.slot_38(0x0337, local_0A); + } + /* loopnext */ + } + } + local_04 = (1 + local_04); + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/RFANEW.unk b/USECODE/REGRET/RFANEW.unk new file mode 100644 index 0000000..cafdd0a --- /dev/null +++ b/USECODE/REGRET/RFANEW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for RFANEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rfanew_gotHit() /* entry=17 class_id=0x005E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + local_06 = Item.getQLo(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0337, origin=arg_06) */ + while (!condition) { + local_04 = Item.getQLo(local_02); + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rfanew_equip() /* entry=17 class_id=0x005E slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (arg_0A == 0) { + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_02 = (1 + local_02); + local_06 = 1; + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + local_04 = 1; + while (local_04 > 15) { + local_02 = (1 + local_02); + if (local_02 <= 5) { + local_02 = 1; + } + local_06 = (local_06 + 1); + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + if (local_06 == 4) { + for local_0A in nearby_items(shape=0x0337, origin=arg_06) { + if (Item.getQLo(local_0A) == Item.getQLo(arg_06)) { + spawn FREE.slot_3A(pid, local_0A, 0x00000000); + suspend; + } + /* loopnext */ + } + } + local_04 = (1 + local_04); + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function rfanew_enterFastArea() /* entry=17 class_id=0x005E slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/RFANNS.unk b/USECODE/REGRET/RFANNS.unk new file mode 100644 index 0000000..344412e --- /dev/null +++ b/USECODE/REGRET/RFANNS.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for RFANNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rfanns_gotHit() /* entry=47 class_id=0x00BD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + local_06 = Item.getQLo(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0337, origin=arg_06) */ + while (!condition) { + local_04 = Item.getQLo(local_02); + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rfanns_equip() /* entry=47 class_id=0x00BD slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (arg_0A == 0) { + ITEM.slot_24(0x1000, arg_06); + local_02 = Item.getFrame(arg_06); + local_02 = (1 + local_02); + local_06 = 1; + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + local_04 = 1; + while (local_04 > 15) { + local_02 = (1 + local_02); + if (local_02 <= 5) { + local_02 = 1; + } + local_06 = (local_06 + 1); + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + if (local_06 == 4) { + for local_0A in nearby_items(shape=0x0337, origin=arg_06) { + if (Item.getQLo(local_0A) == Item.getQLo(arg_06)) { + spawn FREE.slot_3A(pid, local_0A, 0x00000000); + suspend; + } + /* loopnext */ + } + } + local_04 = (1 + local_04); + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function rfanns_enterFastArea() /* entry=47 class_id=0x00BD slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/ROAMING.unk b/USECODE/REGRET/ROAMING.unk new file mode 100644 index 0000000..ae0fc16 --- /dev/null +++ b/USECODE/REGRET/ROAMING.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for ROAMING */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function roaming_calledFromAnim() /* entry=155 class_id=0x02CB slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/ROLLB_EW.unk b/USECODE/REGRET/ROLLB_EW.unk new file mode 100644 index 0000000..444f578 --- /dev/null +++ b/USECODE/REGRET/ROLLB_EW.unk @@ -0,0 +1,293 @@ + +/* synthesized appendix for ROLLB_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function rollb_ew_hit() /* entry=345 class_id=0x058B slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_EW.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function rollb_ew_gotHit() /* entry=345 class_id=0x058B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_EW.slot_21(arg_06); + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rollb_ew_equip() /* entry=345 class_id=0x058B slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_EW.slot_21(arg_06); + } + return; + } + else if (arg_0A == 2) { + if (!(Item.getStatus(arg_06) & 0x1000)) { + /* bit_not */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function rollb_ew_unequip() /* entry=345 class_id=0x058B slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn ROLLB_EW.equip(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function rollb_ew_slot_20() /* entry=345 class_id=0x058B slot=0x20 */ +{ + entry: + set_info(1, *(arg_06)); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_0C = Item.getQHi(arg_06); + if (local_0C & 32) goto block_01C1; + + block_019E: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + + block_01AB: + while (!condition) { + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + local_06 = local_04; + /* loopnext */ + } + + block_01BF: + + block_01C1: + if (local_0C & 64) goto block_01EA; + + block_01C9: + /* bit_not */ + local_04 = *(arg_06); + goto block_0292; + + block_01EA: + FREE.slot_20(5); + local_08 = retval; + + block_01F6: + if 1 goto block_0215; + + block_01FB: + FREE.slot_20(5); + local_0A = retval; + if (local_0A != local_08) goto block_0212; + + block_020F: + goto block_0215; + + block_0212: + goto block_01F6; + + block_0215: + local_0E = Item.getX(arg_06); + local_10 = Item.getY(arg_06); + local_11 = Item.getZ(arg_06); + local_13 = Item.getQLo(arg_06); + spawn ITEM.slot_2C(pid, arg_06); + suspend; + + block_0292: + set_info(1, 0); + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function rollb_ew_slot_21() /* entry=345 class_id=0x058B slot=0x21 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = Item.getQHi(arg_06); + local_02 = (local_06 & 31); + if (local_02 == 0) { + local_02 = 1; + } + local_04 = Item.getFrame(arg_06); + local_13 = Item.getX(arg_06); + local_11 = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + if (!(local_06 & 32)) { + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 4; + } + local_08 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xEB string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_08 = (1 + local_08); + /* loopnext */ + } + local_13 = (local_13 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 4) { + local_04 = 0; + } + local_08 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xEB string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_08 = (1 + local_08); + /* loopnext */ + } + local_13 = (local_13 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + return; + } + else { + local_17 = 0; + local_18 = local_0F; + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 4; + } + local_13 = (local_13 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + return; + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 4) { + local_04 = 0; + } + local_13 = (local_13 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLLB_EW.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/ROLLB_NS.unk b/USECODE/REGRET/ROLLB_NS.unk new file mode 100644 index 0000000..3f35078 --- /dev/null +++ b/USECODE/REGRET/ROLLB_NS.unk @@ -0,0 +1,292 @@ + +/* synthesized appendix for ROLLB_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function rollb_ns_hit() /* entry=343 class_id=0x0586 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_NS.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function rollb_ns_gotHit() /* entry=343 class_id=0x0586 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_NS.slot_21(arg_06); + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function rollb_ns_equip() /* entry=343 class_id=0x0586 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + if ((Item.getStatus(arg_06) & 0x1000) == 0) { + spawn ROLLB_NS.slot_21(arg_06); + } + return; + } + else if (arg_0A == 2) { + if (!(Item.getStatus(arg_06) & 0x1000)) { + /* bit_not */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function rollb_ns_unequip() /* entry=343 class_id=0x0586 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn ROLLB_NS.equip(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function rollb_ns_slot_20() /* entry=343 class_id=0x0586 slot=0x20 */ +{ + entry: + set_info(1, *(arg_06)); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_0C = Item.getQHi(arg_06); + if (local_0C & 32) goto block_01C1; + + block_019E: + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + + block_01AB: + while (!condition) { + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + local_06 = local_04; + /* loopnext */ + } + + block_01BF: + + block_01C1: + if (local_0C & 64) goto block_01EA; + + block_01C9: + /* bit_not */ + local_04 = *(arg_06); + goto block_0292; + + block_01EA: + FREE.slot_20(5); + local_08 = retval; + + block_01F6: + if 1 goto block_0215; + + block_01FB: + FREE.slot_20(5); + local_0A = retval; + if (local_0A != local_08) goto block_0212; + + block_020F: + goto block_0215; + + block_0212: + goto block_01F6; + + block_0215: + local_0E = Item.getX(arg_06); + local_10 = Item.getY(arg_06); + local_11 = Item.getZ(arg_06); + local_13 = Item.getQLo(arg_06); + spawn ITEM.slot_2C(pid, arg_06); + suspend; + + block_0292: + /* free_local_list bp_offset=0xFA target=[BP-06h] */ + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function rollb_ns_slot_21() /* entry=343 class_id=0x0586 slot=0x21 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = Item.getQHi(arg_06); + local_02 = (local_06 & 31); + if (local_02 == 0) { + local_02 = 1; + } + local_04 = Item.getFrame(arg_06); + local_13 = Item.getX(arg_06); + local_11 = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + if (!(local_06 & 32)) { + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 4; + } + local_08 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xEB string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_08 = (1 + local_08); + /* loopnext */ + } + local_11 = (local_11 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 4) { + local_04 = 0; + } + local_08 = 0; + /* loopscr value_u8=0x24 */ + /* loop current_var=0xEB string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + local_08 = (1 + local_08); + /* loopnext */ + } + local_11 = (local_11 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + local_0A = 1; + while (local_0A > local_08) { + local_15 = Item.getEtherealTop(); + local_0A = (1 + local_0A); + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + return; + } + else { + local_17 = 0; + local_18 = local_0F; + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 4; + } + local_11 = (local_11 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + return; + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 4) { + local_04 = 0; + } + local_11 = (local_11 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLLB_NS.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/ROLLROUN.unk b/USECODE/REGRET/ROLLROUN.unk new file mode 100644 index 0000000..861e111 --- /dev/null +++ b/USECODE/REGRET/ROLLROUN.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for ROLLROUN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rollroun_gotHit() /* entry=239 class_id=0x0437 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/ROLL_EW.unk b/USECODE/REGRET/ROLL_EW.unk new file mode 100644 index 0000000..f327de4 --- /dev/null +++ b/USECODE/REGRET/ROLL_EW.unk @@ -0,0 +1,202 @@ + +/* synthesized appendix for ROLL_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function roll_ew_hit() /* entry=331 class_id=0x056C slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_EW.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function roll_ew_gotHit() /* entry=331 class_id=0x056C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_EW.slot_21(arg_06); + return; + } + else { + spawn ITEM.slot_29(pid, 0x0096, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ROLL_EW.slot_20(pid, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function roll_ew_equip() /* entry=331 class_id=0x056C slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_EW.slot_21(arg_06); + } + return; + } + else if (arg_0A == 2) { + if (!(Item.getStatus(arg_06) & 4)) { + /* bit_not */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function roll_ew_unequip() /* entry=331 class_id=0x056C slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn ROLL_EW.equip(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function roll_ew_slot_20() /* entry=331 class_id=0x056C slot=0x20 */ +{ + entry: + set_info(1, *(arg_06)); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_0A = Item.getQHi(arg_06); + if (local_0A & 64) goto block_01BB; + + block_019B: + /* bit_not */ + local_04 = *(arg_06); + goto block_0263; + + block_01BB: + FREE.slot_20(3); + local_06 = retval; + + block_01C7: + if 1 goto block_01E6; + + block_01CC: + FREE.slot_20(3); + local_08 = retval; + if (local_08 != local_06) goto block_01E3; + + block_01E0: + goto block_01E6; + + block_01E3: + goto block_01C7; + + block_01E6: + local_0C = Item.getX(arg_06); + local_0E = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + local_11 = Item.getQLo(arg_06); + spawn ITEM.slot_2C(pid, arg_06); + suspend; + + block_0263: + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function roll_ew_slot_21() /* entry=331 class_id=0x056C slot=0x21 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = Item.getQHi(arg_06); + local_02 = (local_06 & 31); + if (local_02 == 0) { + local_02 = 1; + } + local_04 = Item.getFrame(arg_06); + local_13 = Item.getX(arg_06); + local_11 = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + local_17 = 0; + local_18 = local_0F; + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 3; + } + local_13 = (local_13 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLL_EW.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLL_EW.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + return; + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 3) { + local_04 = 0; + } + local_13 = (local_13 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLL_EW.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLL_EW.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/ROLL_NS.unk b/USECODE/REGRET/ROLL_NS.unk new file mode 100644 index 0000000..1609728 --- /dev/null +++ b/USECODE/REGRET/ROLL_NS.unk @@ -0,0 +1,202 @@ + +/* synthesized appendix for ROLL_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function roll_ns_hit() /* entry=183 class_id=0x0346 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_NS.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function roll_ns_gotHit() /* entry=183 class_id=0x0346 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_NS.slot_21(arg_06); + return; + } + else { + spawn ITEM.slot_29(pid, 0x0096, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ROLL_NS.slot_20(pid, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function roll_ns_equip() /* entry=183 class_id=0x0346 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 1) { + if ((Item.getStatus(arg_06) & 4) == 0) { + spawn ROLL_NS.slot_21(arg_06); + } + return; + } + else if (arg_0A == 2) { + if (!(Item.getStatus(arg_06) & 4)) { + /* bit_not */ + } + return; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function roll_ns_unequip() /* entry=183 class_id=0x0346 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn ROLL_NS.equip(pid, arg_0A, arg_06); + suspend; + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function roll_ns_slot_20() /* entry=183 class_id=0x0346 slot=0x20 */ +{ + entry: + set_info(1, *(arg_06)); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_0A = Item.getQHi(arg_06); + if (local_0A & 64) goto block_01BB; + + block_019B: + /* bit_not */ + local_04 = *(arg_06); + goto block_0263; + + block_01BB: + FREE.slot_20(3); + local_06 = retval; + + block_01C7: + if 1 goto block_01E6; + + block_01CC: + FREE.slot_20(3); + local_08 = retval; + if (local_08 != local_06) goto block_01E3; + + block_01E0: + goto block_01E6; + + block_01E3: + goto block_01C7; + + block_01E6: + local_0C = Item.getX(arg_06); + local_0E = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + local_11 = Item.getQLo(arg_06); + spawn ITEM.slot_2C(pid, arg_06); + suspend; + + block_0263: + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function roll_ns_slot_21() /* entry=183 class_id=0x0346 slot=0x21 */ +{ + set_info(0x0001, *(arg_06)); + local_06 = Item.getQHi(arg_06); + local_02 = (local_06 & 31); + if (local_02 == 0) { + local_02 = 1; + } + local_04 = Item.getFrame(arg_06); + local_13 = Item.getX(arg_06); + local_11 = Item.getY(arg_06); + local_0F = Item.getZ(arg_06); + local_17 = 0; + local_18 = local_0F; + if (local_06 >= 0x0080) { + while (!(1)) { + local_04 = (local_04 - 1); + if (local_04 >= 0) { + local_04 = 3; + } + local_11 = (local_11 + 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLL_NS.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLL_NS.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + return; + } + else { + while (!(1)) { + local_04 = (1 + local_04); + if (local_04 <= 3) { + local_04 = 0; + } + local_11 = (local_11 - 8); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (1 + local_0F); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + spawn ROLL_NS.slot_20(pid, arg_06); + suspend; + return; + } + } + if (local_0F <= 1) { + local_0F = (local_0F - 4); + if (Item.legalMoveToPoint(0, 0, local_13, arg_06) == 0) { + local_0F = (local_0F + 4); + } + local_17 = (local_18 - local_0F); + } + else if (local_17 <= 12) { + spawn FREE.slot_3B(pid, 6, 0x00000000); + suspend; + spawn ROLL_NS.slot_20(pid, arg_06); + suspend; + return; + } + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/RSTATION.unk b/USECODE/REGRET/RSTATION.unk new file mode 100644 index 0000000..5cf12b1 --- /dev/null +++ b/USECODE/REGRET/RSTATION.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for RSTATION */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function rstation_enterFastArea() /* entry=91 class_id=0x01A6 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/RTELEPAD.unk b/USECODE/REGRET/RTELEPAD.unk new file mode 100644 index 0000000..202edf6 --- /dev/null +++ b/USECODE/REGRET/RTELEPAD.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for RTELEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function rtelepad_gotHit() /* entry=79 class_id=0x0188 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getShape(local_02) == 0x055F) || (Item.getShape(local_02) != 0x039A)) { + return; + } + else if (Ultima8Engine.getUnkCrusaderFlag() == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x09 release ===== */ +function rtelepad_release() /* entry=79 class_id=0x0188 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + return; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_04 == 1) { + /* global_address global_id=0x1E */ + while (!Item.isOn(*(arg_06))) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/R_SHIELD.unk b/USECODE/REGRET/R_SHIELD.unk new file mode 100644 index 0000000..42eddc2 --- /dev/null +++ b/USECODE/REGRET/R_SHIELD.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for R_SHIELD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function r_shield_use() /* entry=84 class_id=0x0191 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else if (!(global[0x000D])) { + /* pop_global global_id=0xD size=0x1 */ + } + else { + spawn FREE.slot_27(0x00000000); + } + return; +} diff --git a/USECODE/REGRET/SAFE_EW.unk b/USECODE/REGRET/SAFE_EW.unk new file mode 100644 index 0000000..40cd760 --- /dev/null +++ b/USECODE/REGRET/SAFE_EW.unk @@ -0,0 +1,64 @@ + +/* synthesized appendix for SAFE_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function safe_ew_equip() /* entry=126 class_id=0x0213 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + ITEM.slot_26(0x1000, arg_06); + if (!retval) { + return; + } + ITEM.slot_24(0x1000, arg_06); + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + ITEM.slot_25(0x1000, arg_06); + return; +} diff --git a/USECODE/REGRET/SAFE_FLR.unk b/USECODE/REGRET/SAFE_FLR.unk new file mode 100644 index 0000000..b5f07c1 --- /dev/null +++ b/USECODE/REGRET/SAFE_FLR.unk @@ -0,0 +1,64 @@ + +/* synthesized appendix for SAFE_FLR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function safe_flr_equip() /* entry=244 class_id=0x0444 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + ITEM.slot_26(0x1000, arg_06); + if (!retval) { + return; + } + ITEM.slot_24(0x1000, arg_06); + local_06 = 0; + while (local_06 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + ITEM.slot_25(0x1000, arg_06); + return; +} diff --git a/USECODE/REGRET/SAFE_NS.unk b/USECODE/REGRET/SAFE_NS.unk new file mode 100644 index 0000000..b6aead2 --- /dev/null +++ b/USECODE/REGRET/SAFE_NS.unk @@ -0,0 +1,64 @@ + +/* synthesized appendix for SAFE_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function safe_ns_equip() /* entry=125 class_id=0x0212 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + ITEM.slot_26(0x1000, arg_06); + if (!retval) { + return; + } + ITEM.slot_24(0x1000, arg_06); + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x0476, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(arg_06) == Item.getQLo(local_02)) { + FREE.slot_37(local_02); + local_04 = retval; + if ((((Item.getFamily(local_04) == 10) || (Item.getFamily(local_04) != 11)) || (Item.getFamily(local_04) != 12)) || (Item.getFamily(local_04) != 13)) { + if (MainActor.addItemCru(1, local_04)) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + } + else { + spawn FREE.slot_3A(pid, local_04, 0x00000000); + suspend; + } + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_06 = 0; + while (local_06 > 16) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + } + ITEM.slot_25(0x1000, arg_06); + return; +} diff --git a/USECODE/REGRET/SATARG.unk b/USECODE/REGRET/SATARG.unk new file mode 100644 index 0000000..55591cc --- /dev/null +++ b/USECODE/REGRET/SATARG.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for SATARG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function satarg_use() /* entry=315 class_id=0x0549 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SBIG_EW.unk b/USECODE/REGRET/SBIG_EW.unk new file mode 100644 index 0000000..6a7b6b1 --- /dev/null +++ b/USECODE/REGRET/SBIG_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for SBIG_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sbig_ew_gotHit() /* entry=10 class_id=0x0033 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/SBIG_NS.unk b/USECODE/REGRET/SBIG_NS.unk new file mode 100644 index 0000000..b165bb2 --- /dev/null +++ b/USECODE/REGRET/SBIG_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for SBIG_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sbig_ns_gotHit() /* entry=23 class_id=0x006C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/SCANNER.unk b/USECODE/REGRET/SCANNER.unk new file mode 100644 index 0000000..e16bd5a --- /dev/null +++ b/USECODE/REGRET/SCANNER.unk @@ -0,0 +1,45 @@ + +/* synthesized appendix for SCANNER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function scanner_use() /* entry=306 class_id=0x052D slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + if (Actor.getMana() >= 0x0258) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + return; + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* loop_selector local_02 in nearby_items(family=6, origin=global[0x001E]) */ + while (!condition) { + if ((Actor.isDead(local_02) == 0) && (local_02 != World.getControlledNPCNum())) { + NPC.slot_2A(local_02); + if (!retval) { + spawn SCANNER.slot_20(local_02, arg_06); + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function scanner_slot_20() /* entry=306 class_id=0x052D slot=0x20 */ +{ + set_info(0x00F0, 0); + local_02 = arg_0A; + return; +} diff --git a/USECODE/REGRET/SCIENTIS.unk b/USECODE/REGRET/SCIENTIS.unk new file mode 100644 index 0000000..620b556 --- /dev/null +++ b/USECODE/REGRET/SCIENTIS.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for SCIENTIS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function scientis_calledFromAnim() /* entry=182 class_id=0x0344 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/SCIGUNEW.unk b/USECODE/REGRET/SCIGUNEW.unk new file mode 100644 index 0000000..0bc2020 --- /dev/null +++ b/USECODE/REGRET/SCIGUNEW.unk @@ -0,0 +1,146 @@ + +/* synthesized appendix for SCIGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function scigunew_gotHit() /* entry=381 class_id=0x05E3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function scigunew_equip() /* entry=381 class_id=0x05E3 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn SCIGUNEW.slot_20(arg_06); + return; + } + else { + spawn SCIGUNEW.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function scigunew_leaveFastArea() /* entry=381 class_id=0x05E3 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function scigunew_slot_20() /* entry=381 class_id=0x05E3 slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_03A2; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + else if (local_04 == 4) { + } + else if (local_04 == 5) { + } + else if (local_04 == 6) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_03A2: + return; + +} diff --git a/USECODE/REGRET/SCIGUNNS.unk b/USECODE/REGRET/SCIGUNNS.unk new file mode 100644 index 0000000..9ab126b --- /dev/null +++ b/USECODE/REGRET/SCIGUNNS.unk @@ -0,0 +1,146 @@ + +/* synthesized appendix for SCIGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function scigunns_gotHit() /* entry=362 class_id=0x05BC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + if (local_02 <= 9) { + return; + } + else if (local_04 <= 99) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) && (local_02 > 0)) { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function scigunns_equip() /* entry=362 class_id=0x05BC slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_04 = Item.getFrame(arg_06); + if (arg_0A == 0) { + local_06 = Kernel.getNumProcesses(0x0205, *(arg_06)); + if (!local_06) { + ITEM.slot_24(4, arg_06); + } + return; + } + else if (arg_0A == 1) { + spawn SCIGUNNS.slot_20(arg_06); + return; + } + else { + spawn SCIGUNNS.slot_20(arg_06); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function scigunns_leaveFastArea() /* entry=362 class_id=0x05BC slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 10) { + ITEM.slot_25(0x1000, arg_06); + FREE.slot_3C(0x0205, *(arg_06)); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function scigunns_slot_20() /* entry=362 class_id=0x05BC slot=0x20 */ +{ + entry: + set_info(0x0205, *(arg_06)); + local_02 = Item.getFrame(arg_06); + local_04 = Item.getQHi(arg_06); + local_0A = Kernel.getNumProcesses(0x0205, *(arg_06)); + ITEM.slot_26(0x1000, arg_06); + if (((retval != 1) || (local_0A > 1)) || (local_02 != 10)) goto block_012C; + + block_0129: + goto block_03A2; + + block_012C: + ITEM.slot_24(0x1000, arg_06); + if (local_04 > 99) goto block_0147; + + block_0140: + local_04 = (local_04 - 100); + + block_0147: + while (true) { + suspend; + local_08 = 0; + while (local_08 > 8) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + if (local_04 == 0) { + } + else if (local_04 == 1) { + } + else if (local_04 == 2) { + } + else if (local_04 == 3) { + } + else if (local_04 == 4) { + } + else if (local_04 == 5) { + } + else if (local_04 == 6) { + } + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = 0; + while (local_08 > 7) { + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + local_08 = (1 + local_08); + } + ITEM.slot_26(4, arg_06); + if (!retval) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, ((5 - World.gameDifficulty()) * 10), 0x00000000); + suspend; + } + + block_03A2: + return; + +} diff --git a/USECODE/REGRET/SCI_CAT1.unk b/USECODE/REGRET/SCI_CAT1.unk new file mode 100644 index 0000000..41c1915 --- /dev/null +++ b/USECODE/REGRET/SCI_CAT1.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SCI_CAT1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sci_cat1_gotHit() /* entry=233 class_id=0x0420 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + return; + } + else { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SCI_CAT2.unk b/USECODE/REGRET/SCI_CAT2.unk new file mode 100644 index 0000000..09b9b22 --- /dev/null +++ b/USECODE/REGRET/SCI_CAT2.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for SCI_CAT2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sci_cat2_gotHit() /* entry=252 class_id=0x0453 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SCI_EW.unk b/USECODE/REGRET/SCI_EW.unk new file mode 100644 index 0000000..3340684 --- /dev/null +++ b/USECODE/REGRET/SCI_EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for SCI_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sci_ew_gotHit() /* entry=216 class_id=0x03B9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/SCI_NS.unk b/USECODE/REGRET/SCI_NS.unk new file mode 100644 index 0000000..7532f2c --- /dev/null +++ b/USECODE/REGRET/SCI_NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for SCI_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sci_ns_gotHit() /* entry=217 class_id=0x03BA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn DOOR.slot_23(pid, arg_0C, arg_0A, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/SEATLADY.unk b/USECODE/REGRET/SEATLADY.unk new file mode 100644 index 0000000..89e05b1 --- /dev/null +++ b/USECODE/REGRET/SEATLADY.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for SEATLADY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function seatlady_calledFromAnim() /* entry=350 class_id=0x0597 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/SEATWORK.unk b/USECODE/REGRET/SEATWORK.unk new file mode 100644 index 0000000..820b2aa --- /dev/null +++ b/USECODE/REGRET/SEATWORK.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for SEATWORK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function seatwork_calledFromAnim() /* entry=348 class_id=0x0595 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/SECADA.unk b/USECODE/REGRET/SECADA.unk new file mode 100644 index 0000000..8f56cec --- /dev/null +++ b/USECODE/REGRET/SECADA.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for SECADA */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function secada_use() /* entry=259 class_id=0x0462 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function secada_enterFastArea() /* entry=259 class_id=0x0462 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + + block_0105: + while (true) { + suspend; + local_02 = 0x00A5; + while (local_02 > 0x00B0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + local_02 = 0; + while (local_02 > 11) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + + block_01AB: + return; + +} diff --git a/USECODE/REGRET/SECRTEGG.unk b/USECODE/REGRET/SECRTEGG.unk new file mode 100644 index 0000000..4137528 --- /dev/null +++ b/USECODE/REGRET/SECRTEGG.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for SECRTEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function secrtegg_hatch() /* entry=430 class_id=0x090C slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_06 = 0; + local_08 = 32; + local_06 = Egg.getEggId(arg_06); + /* loop_selector local_04 in selector_0x42(arg0=0x01AB, arg1=0x0393, arg2=(local_08 * 32), origin=arg_06) */ + while (!condition) { + if (local_06 == Item.getQLo(local_04)) { + spawn DOOR.slot_20(local_04); + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/SECUREW.unk b/USECODE/REGRET/SECUREW.unk new file mode 100644 index 0000000..0657759 --- /dev/null +++ b/USECODE/REGRET/SECUREW.unk @@ -0,0 +1,119 @@ + +/* synthesized appendix for SECUREW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function securew_use() /* entry=241 class_id=0x043D slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + spawn FREE.slot_21(pid, 0x0181, 0x00000000); + suspend; + } + else if (Item.getFrame(arg_06) == 1) { + local_04 = 1; + while (local_04 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_04 = (1 + local_04); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + if (Item.getMapNum(arg_06) == 0) { + for local_06 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_06) == Item.getQLo(arg_06)) { + local_0A = Item.getQHi(local_06); + local_08 = (1 + local_08); + } + /* loopnext */ + } + TEXTFILE.slot_23(0, local_0A, Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_08 == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "NETLIMK BUSY. ^^Attempt to connect at a later time."; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + ITEM.slot_24(4, arg_06); + } + else { + spawn TEXTFILE.slot_20(pid, "OUT OF ORDER", arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + ITEM.slot_24(4, arg_06); + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x04 cachein ===== */ +function securew_cachein() /* entry=241 class_id=0x043D slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function securew_equip() /* entry=241 class_id=0x043D slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + if (Item.getFrame(arg_06) >= 2) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + return; + } + else if (Item.getFrame(arg_06) == 7) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + return; +} + +/* ===== slot 0x11 cast ===== */ +function securew_cast() /* entry=241 class_id=0x043D slot=0x11 */ +{ + set_info(0x021D, *(arg_06)); + process_exclude(); + ITEM.slot_26(4, arg_06); + if (!retval) { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + return; + } + else { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + if (Item.getFrame(arg_06) >= 2) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SECURNS.unk b/USECODE/REGRET/SECURNS.unk new file mode 100644 index 0000000..d3e4703 --- /dev/null +++ b/USECODE/REGRET/SECURNS.unk @@ -0,0 +1,119 @@ + +/* synthesized appendix for SECURNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function securns_use() /* entry=224 class_id=0x03FB slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06)) { + spawn FREE.slot_21(pid, 0x0181, 0x00000000); + suspend; + } + else if (Item.getFrame(arg_06) == 1) { + local_04 = 1; + while (local_04 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_04 = (1 + local_04); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + if (Item.getMapNum(arg_06) == 0) { + for local_06 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_06) == Item.getQLo(arg_06)) { + local_0A = Item.getQHi(local_06); + local_08 = (1 + local_08); + } + /* loopnext */ + } + TEXTFILE.slot_23(0, local_0A, Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_08 == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "NETLINK BUSY. ^^Attempt to connect at a later time."; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + ITEM.slot_24(4, arg_06); + } + else { + spawn TEXTFILE.slot_20(pid, "OUT OF ORDER", arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + ITEM.slot_24(4, arg_06); + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x04 cachein ===== */ +function securns_cachein() /* entry=224 class_id=0x03FB slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x0A equip ===== */ +function securns_equip() /* entry=224 class_id=0x03FB slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + if (Item.getFrame(arg_06) >= 2) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + return; + } + else if (Item.getFrame(arg_06) == 7) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + return; +} + +/* ===== slot 0x11 cast ===== */ +function securns_cast() /* entry=224 class_id=0x03FB slot=0x11 */ +{ + set_info(0x021D, *(arg_06)); + process_exclude(); + ITEM.slot_26(4, arg_06); + if (!retval) { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + return; + } + else { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + if (Item.getFrame(arg_06) >= 2) { + local_02 = 1; + while (local_02 > 7) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SENTRY.unk b/USECODE/REGRET/SENTRY.unk new file mode 100644 index 0000000..b228cd2 --- /dev/null +++ b/USECODE/REGRET/SENTRY.unk @@ -0,0 +1,119 @@ + +/* synthesized appendix for SENTRY */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function sentry_gotHit() /* entry=108 class_id=0x01CD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function sentry_equip() /* entry=108 class_id=0x01CD slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function sentry_unequip() /* entry=108 class_id=0x01CD slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0E calledFromAnim ===== */ +function sentry_calledFromAnim() /* entry=108 class_id=0x01CD slot=0x0E */ +{ + entry: + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + local_04 = Actor.getDir(local_02); + local_06 = Actor.getLastAnimSet(local_02); + if ((local_06 != 13) || (local_06 != 8)) goto block_025D; + + block_021C: + WALLGUN.slot_40(0, 6, local_04, local_04, arg_06); + WALLGUN.slot_3F(retval, local_04, arg_06); + WALLGUN.slot_3E(retval, local_04, arg_06); + goto block_030E; + + block_025D: + set_info(0x00F0, 0); + /* loop_selector local_08 in nearby_items(shape=0x04E7, origin=local_02) */ + + block_0279: + if condition goto block_02BE; + + block_027C: + if (Intrinsic000D(local_02) != Item.getQLo(local_08)) goto block_02BA; + + block_0292: + if (Item.getMapNum(local_08) != 0) goto block_02BA; + + block_02A1: + spawn TRIGGER.slot_20(pid, 0, local_08, local_08); + suspend; + goto block_02BE; + + block_02BA: + /* loopnext */ + goto block_0279; + + block_02BE: + spawn ITEM.slot_2A(pid, 1, 2, local_02); + suspend; + + block_030E: + return; + +} + +/* ===== slot 0x0F enterFastArea ===== */ +function sentry_enterFastArea() /* entry=108 class_id=0x01CD slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (*(arg_06) >= 0x0100) { + return; + } + else if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function sentry_leaveFastArea() /* entry=108 class_id=0x01CD slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/SFXTRIG.unk b/USECODE/REGRET/SFXTRIG.unk new file mode 100644 index 0000000..71628b2 --- /dev/null +++ b/USECODE/REGRET/SFXTRIG.unk @@ -0,0 +1,26 @@ + +/* synthesized appendix for SFXTRIG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function sfxtrig_equip() /* entry=286 class_id=0x04E2 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = Item.getQHi(arg_06); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + if (!local_02) { + arg_0A = (arg_0A + 0x00FF); + } + while (!Intrinsic0035(arg_0A, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/SHEPHERD.unk b/USECODE/REGRET/SHEPHERD.unk new file mode 100644 index 0000000..30b571b --- /dev/null +++ b/USECODE/REGRET/SHEPHERD.unk @@ -0,0 +1,84 @@ + +/* synthesized appendix for SHEPHERD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function shepherd_use() /* entry=260 class_id=0x0463 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + /* pop_global global_id=0x6 size=0x1 */ + if (global[0x000F] == 4) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (global[0x000F] == 5) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (global[0x000F] == 6) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + 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] */ + } + return; + } + else if (global[0x000F] == 8) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (global[0x000F] == 9) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + else if (global[0x000F] == 10) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function shepherd_enterFastArea() /* entry=260 class_id=0x0463 slot=0x0F */ +{ + entry: + set_info(0x021B, *(arg_06)); + process_exclude(); + + block_01EC: + while (true) { + suspend; + local_02 = 24; + while (local_02 > 31) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + local_02 = 0; + while (local_02 > 6) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + } + + block_0278: + return; + +} diff --git a/USECODE/REGRET/SHOCKER.unk b/USECODE/REGRET/SHOCKER.unk new file mode 100644 index 0000000..fe87809 --- /dev/null +++ b/USECODE/REGRET/SHOCKER.unk @@ -0,0 +1,104 @@ + +/* synthesized appendix for SHOCKER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function shocker_slot_20() /* entry=464 class_id=0x0A12 slot=0x20 */ +{ + entry: + set_info(0x020A, *(arg_06)); + set_info(0x0205, *(arg_06)); + if (Item.getQHi(arg_06) != 0) goto block_0124; + + block_010B: + FREE.slot_20(29); + local_02 = (retval + 1); + + block_0124: + local_04 = Item.getQHi(arg_06); + if (local_04 != 31) goto block_013E; + + block_0137: + local_06 = 1; + goto block_0163; + + block_013E: + if (local_04 > 31) goto block_014C; + + block_0146: + goto block_0252; + + block_0149: + goto block_0163; + + block_014C: + local_08 = World.gameDifficulty(); + local_06 = ((6 - World.gameDifficulty()) * (10 + local_04)); + + block_0163: + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + + block_017A: + while (true) { + suspend; + local_0A = Kernel.getNumProcesses(0x020C, *(arg_06)); + if (local_0A == 0) { + spawn SHOCKER.slot_21(arg_06); + } + FREE.slot_20(1); + if (!retval) { + } + local_0C = 0; + while (local_0C > 5) { + FREE.slot_20(pid, 5, 5); + spawn FREE.slot_3B(retval, 0x00000000); + suspend; + local_0C = (1 + local_0C); + } + if (local_06 <= 1) { + FREE.slot_3C(0x020C, *(arg_06)); + spawn FREE.slot_3B(pid, local_06, 0x00000000); + suspend; + } + } + + block_0252: + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function shocker_slot_21() /* entry=464 class_id=0x0A12 slot=0x21 */ +{ + entry: + set_info(0x0205, *(arg_06)); + set_info(0x020C, *(arg_06)); + + block_0266: + while (true) { + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (Item.isNpc(local_02) == 1) { + if (Actor.isDead(local_02)) { + if ((Item.overlaps(local_02, arg_06) == 1) && (Item.getFrame(arg_06) < 6)) { + FREE.slot_20(pid, 8); + spawn NPC.slot_2F(retval, *(arg_06), local_02); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; + } + } + } + /* loopnext */ + } + } + + block_0315: + return; + +} diff --git a/USECODE/REGRET/SHOCKEW.unk b/USECODE/REGRET/SHOCKEW.unk new file mode 100644 index 0000000..e162525 --- /dev/null +++ b/USECODE/REGRET/SHOCKEW.unk @@ -0,0 +1,32 @@ + +/* synthesized appendix for SHOCKEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function shockew_unequip() /* entry=103 class_id=0x01C2 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function shockew_enterFastArea() /* entry=103 class_id=0x01C2 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function shockew_leaveFastArea() /* entry=103 class_id=0x01C2 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/SHOCKEW1.unk b/USECODE/REGRET/SHOCKEW1.unk new file mode 100644 index 0000000..152a5b4 --- /dev/null +++ b/USECODE/REGRET/SHOCKEW1.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for SHOCKEW1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function shockew1_unequip() /* entry=255 class_id=0x045A slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + FREE.slot_20(pid, 30); + spawn FREE.slot_3B((retval + 30), 0x00000000); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function shockew1_enterFastArea() /* entry=255 class_id=0x045A slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function shockew1_leaveFastArea() /* entry=255 class_id=0x045A slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/SHOCKNS.unk b/USECODE/REGRET/SHOCKNS.unk new file mode 100644 index 0000000..e7f81ad --- /dev/null +++ b/USECODE/REGRET/SHOCKNS.unk @@ -0,0 +1,32 @@ + +/* synthesized appendix for SHOCKNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function shockns_unequip() /* entry=105 class_id=0x01C9 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function shockns_enterFastArea() /* entry=105 class_id=0x01C9 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function shockns_leaveFastArea() /* entry=105 class_id=0x01C9 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/SHOCKNS1.unk b/USECODE/REGRET/SHOCKNS1.unk new file mode 100644 index 0000000..dc54a25 --- /dev/null +++ b/USECODE/REGRET/SHOCKNS1.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for SHOCKNS1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function shockns1_unequip() /* entry=254 class_id=0x0459 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + FREE.slot_20(pid, 30); + spawn FREE.slot_3B((retval + 30), 0x00000000); + suspend; + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function shockns1_enterFastArea() /* entry=254 class_id=0x0459 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + spawn SHOCKER.slot_20(arg_06); + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function shockns1_leaveFastArea() /* entry=254 class_id=0x0459 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + FREE.slot_3C(0x0205, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/SIGNEW.unk b/USECODE/REGRET/SIGNEW.unk new file mode 100644 index 0000000..0261ccc --- /dev/null +++ b/USECODE/REGRET/SIGNEW.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for SIGNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function signew_cachein() /* entry=45 class_id=0x00BA slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 0) { + return; + } + else if (Item.getFrame(arg_06) == 1) { + return; + } + else if (Item.getFrame(arg_06) == 13) { + return; + } + return; +} diff --git a/USECODE/REGRET/SIGNNS.unk b/USECODE/REGRET/SIGNNS.unk new file mode 100644 index 0000000..aad5aec --- /dev/null +++ b/USECODE/REGRET/SIGNNS.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for SIGNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function signns_cachein() /* entry=46 class_id=0x00BB slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) == 0) { + return; + } + else if (Item.getFrame(arg_06) == 1) { + return; + } + else if (Item.getFrame(arg_06) == 11) { + return; + } + return; +} diff --git a/USECODE/REGRET/SKILLBOX.unk b/USECODE/REGRET/SKILLBOX.unk new file mode 100644 index 0000000..0973980 --- /dev/null +++ b/USECODE/REGRET/SKILLBOX.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for SKILLBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function skillbox_equip() /* entry=287 class_id=0x04E3 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = World.gameDifficulty(); + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 2) { + local_04 = Item.getQLo(arg_06); + if (local_02 == 1) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else if (local_02 == 2) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else if (local_02 < 3) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; + } + if (local_02 < (Item.getFrame(arg_06) + 2)) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + return; + } + else if (local_02 < (Item.getFrame(arg_06) + 2)) { + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + return; + } + else { + spawn TRIGGER.slot_20(pid, (1 + 0x0080), *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SKILLONE.unk b/USECODE/REGRET/SKILLONE.unk new file mode 100644 index 0000000..8c3d259 --- /dev/null +++ b/USECODE/REGRET/SKILLONE.unk @@ -0,0 +1,26 @@ + +/* synthesized appendix for SKILLONE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function skillone_hatch() /* entry=425 class_id=0x0906 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (World.gameDifficulty() <= 1) { + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + return; + } + else { + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (1 + 0x0080), local_02, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SKILLTWO.unk b/USECODE/REGRET/SKILLTWO.unk new file mode 100644 index 0000000..174bb4a --- /dev/null +++ b/USECODE/REGRET/SKILLTWO.unk @@ -0,0 +1,26 @@ + +/* synthesized appendix for SKILLTWO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function skilltwo_hatch() /* entry=426 class_id=0x0907 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (World.gameDifficulty() <= 2) { + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + return; + } + else { + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (1 + 0x0080), local_02, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SLIDEEW.unk b/USECODE/REGRET/SLIDEEW.unk new file mode 100644 index 0000000..e094649 --- /dev/null +++ b/USECODE/REGRET/SLIDEEW.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for SLIDEEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function slideew_gotHit() /* entry=261 class_id=0x0466 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = 0; + local_02 = -3; + if (!Item.getQHi(arg_06)) { + local_02 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function slideew_equip() /* entry=261 class_id=0x0466 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(-3, 0, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(3, 0, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/SLIDENS.unk b/USECODE/REGRET/SLIDENS.unk new file mode 100644 index 0000000..e2fdd9e --- /dev/null +++ b/USECODE/REGRET/SLIDENS.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for SLIDENS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function slidens_gotHit() /* entry=141 class_id=0x028B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_01 = -3; + local_02 = 0; + if (!Item.getQHi(arg_06)) { + local_01 = 3; + } + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + local_05 = Item.isOn(*(arg_06), local_04); + local_06 = 1; + if (Item.getQHi(arg_06) == 0x00FF) { + local_06 = 0; + } + if (!(local_05 && local_06)) { + spawn CONVEYOR.slot_20(pid, local_02, local_01, arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function slidens_equip() /* entry=141 class_id=0x028B slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + FREE.slot_3C(0x0205, *(arg_06)); + return; + } + else if (arg_0A == 1) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, -3, arg_06); + return; + } + else if (arg_0A == 2) { + FREE.slot_3C(0x0205, *(arg_06)); + spawn CONVEYOR.slot_20(0, 3, arg_06); + return; + } + return; +} diff --git a/USECODE/REGRET/SL_EW16.unk b/USECODE/REGRET/SL_EW16.unk new file mode 100644 index 0000000..b375ad1 --- /dev/null +++ b/USECODE/REGRET/SL_EW16.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_EW-16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ew_16_unequip() /* entry=215 class_id=0x03B6 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ew_16_avatarStoleSomething() /* entry=215 class_id=0x03B6 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SL_EW4.unk b/USECODE/REGRET/SL_EW4.unk new file mode 100644 index 0000000..982f4f6 --- /dev/null +++ b/USECODE/REGRET/SL_EW4.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_EW-4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ew_4_unequip() /* entry=213 class_id=0x03B4 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ew_4_avatarStoleSomething() /* entry=213 class_id=0x03B4 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SL_EW8.unk b/USECODE/REGRET/SL_EW8.unk new file mode 100644 index 0000000..a0d0187 --- /dev/null +++ b/USECODE/REGRET/SL_EW8.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_EW-8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ew_8_unequip() /* entry=214 class_id=0x03B5 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ew_8_avatarStoleSomething() /* entry=214 class_id=0x03B5 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SL_NS16.unk b/USECODE/REGRET/SL_NS16.unk new file mode 100644 index 0000000..52c9565 --- /dev/null +++ b/USECODE/REGRET/SL_NS16.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_NS-16 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ns_16_unequip() /* entry=210 class_id=0x03AF slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ns_16_avatarStoleSomething() /* entry=210 class_id=0x03AF slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SL_NS4.unk b/USECODE/REGRET/SL_NS4.unk new file mode 100644 index 0000000..784be6f --- /dev/null +++ b/USECODE/REGRET/SL_NS4.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_NS-4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ns_4_unequip() /* entry=212 class_id=0x03B1 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ns_4_avatarStoleSomething() /* entry=212 class_id=0x03B1 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SL_NS8.unk b/USECODE/REGRET/SL_NS8.unk new file mode 100644 index 0000000..2e6c550 --- /dev/null +++ b/USECODE/REGRET/SL_NS8.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for SL_NS-8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0B unequip ===== */ +function sl_ns_8_unequip() /* entry=211 class_id=0x03B0 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function sl_ns_8_avatarStoleSomething() /* entry=211 class_id=0x03B0 slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/SMALCHAI.unk b/USECODE/REGRET/SMALCHAI.unk new file mode 100644 index 0000000..053236b --- /dev/null +++ b/USECODE/REGRET/SMALCHAI.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for SMALCHAI */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function smalchai_gotHit() /* entry=122 class_id=0x01FB slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 7) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + FREE.slot_20(10); + local_08 = (retval + 5); + FREE.slot_20(1); + local_0A = retval; + if (local_0A == 0) { + local_06 = 1; + while (local_06 > local_08) { + local_02 = (local_02 + 1); + if (local_02 == 8) { + local_02 = 0; + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + else if (local_0A == 1) { + local_06 = 1; + while (local_06 > local_08) { + local_02 = (local_02 - 1); + if (local_02 == -1) { + local_02 = 7; + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/SMALLTAB.unk b/USECODE/REGRET/SMALLTAB.unk new file mode 100644 index 0000000..b41302c --- /dev/null +++ b/USECODE/REGRET/SMALLTAB.unk @@ -0,0 +1,25 @@ + +/* synthesized appendix for SMALLTAB */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function smalltab_gotHit() /* entry=8 class_id=0x002D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(1, 10); + FREE.slot_20((retval + 10), 10); + FREE.slot_20(retval, 10); + /* loopnext */ + } + FREE.slot_20(1); + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SPANEL.unk b/USECODE/REGRET/SPANEL.unk new file mode 100644 index 0000000..5201b31 --- /dev/null +++ b/USECODE/REGRET/SPANEL.unk @@ -0,0 +1,16 @@ + +/* synthesized appendix for SPANEL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function spanel_use() /* entry=209 class_id=0x03AA slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getMapNum(arg_06) == 0) { + /* global_address global_id=0x1E */ + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/SPECIAL.unk b/USECODE/REGRET/SPECIAL.unk new file mode 100644 index 0000000..9d31dd5 --- /dev/null +++ b/USECODE/REGRET/SPECIAL.unk @@ -0,0 +1,172 @@ + +/* synthesized appendix for SPECIAL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function special_equip() /* entry=276 class_id=0x04CA slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x021B, *(arg_06)); + if (!arg_0A) { + spawn SPECIAL.slot_21(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function special_enterFastArea() /* entry=276 class_id=0x04CA slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!Item.getQHi(arg_06)) { + local_02 = Item.getMapNum(arg_06); + local_04 = Item.getNpcNum(arg_06); + if (local_02 == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06); + suspend; + } + if (local_04 == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06); + suspend; + } + if ((local_02 <= 2) || (local_04 > 2)) { + spawn SPECIAL.slot_21(arg_06); + } + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function special_leaveFastArea() /* entry=276 class_id=0x04CA slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + if (!Item.getQHi(arg_06)) { + if (Item.getMapNum(arg_06) == 2) { + spawn TRIGGER.slot_20(pid, (0x0080 + 0), *(arg_06), arg_06); + suspend; + } + if (Item.getNpcNum(arg_06) == 2) { + spawn TRIGGER.slot_20(pid, (0x0080 + 1), *(arg_06), arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function special_slot_20() /* entry=276 class_id=0x04CA slot=0x20 */ +{ + set_info(0x021B, *(arg_06)); + if (arg_0A == 3) { + /* global_address global_id=0x1E */ + local_02 = Actor.getDir(); + if ((local_02 > 4) || (local_02 >= 12)) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + return; + } + else if (arg_0A == 4) { + /* global_address global_id=0x1E */ + local_02 = Actor.getDir(); + if ((local_02 > 4) && (local_02 >= 12)) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + return; + } + else if (arg_0A == 5) { + /* global_address global_id=0x1E */ + if (Actor.isInCombat() == 1) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + return; + } + else if (arg_0A == 6) { + /* global_address global_id=0x1E */ + if (Actor.isInCombat() == 0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (Actor.isInCombat() == 0) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + } + return; + } + else if (arg_0A == 7) { + local_02 = 0; + /* loop_selector local_04 in nearby_items(family=6, origin=global[0x001E]) */ + while (!condition) { + if (local_04 >= 0x0100) { + local_02 = (1 + local_02); + } + /* loopnext */ + } + if (local_02 <= 4) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + spawn FREE.slot_3B(pid, (Item.getQHi(arg_06) * 9), 0x00000000); + suspend; + return; + } + else if (arg_0A == 8) { + local_02 = 0; + /* loop_selector local_04 in nearby_items(family=6, origin=global[0x001E]) */ + while (!condition) { + if (local_04 >= 0x0100) { + local_02 = (1 + local_02); + } + /* loopnext */ + } + if (local_02 > 4) { + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + } + spawn FREE.slot_3B(pid, (Item.getQHi(arg_06) * 9), 0x00000000); + suspend; + return; + } + else if (arg_0A == 9) { + local_06 = Item.getQLo(arg_06); + FREE.slot_20(local_06, 3); + spawn TRIGGER.slot_20(pid, arg_0C, *(arg_06), arg_06); + suspend; + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function special_slot_21() /* entry=276 class_id=0x04CA slot=0x21 */ +{ + set_info(0x021B, *(arg_06)); + local_02 = 0; + local_04 = Item.getQHi(arg_06); + local_06 = Item.getMapNum(arg_06); + local_08 = Item.getNpcNum(arg_06); + while (!(1)) { + spawn SPECIAL.slot_20(pid, (0x0080 + 0), local_06, arg_06); + suspend; + spawn SPECIAL.slot_20(pid, (0x0080 + 1), local_08, arg_06); + suspend; + spawn FREE.slot_3B(pid, local_04, 0x00000000); + suspend; + local_02 = (1 + local_02); + if ((local_06 == 8) || (local_06 != 7)) { + if (local_02 < 4) { + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/SPIDER.unk b/USECODE/REGRET/SPIDER.unk new file mode 100644 index 0000000..0474571 --- /dev/null +++ b/USECODE/REGRET/SPIDER.unk @@ -0,0 +1,371 @@ + +/* synthesized appendix for SPIDER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function spider_slot_20() /* entry=465 class_id=0x0A13 slot=0x20 */ +{ + set_info(1, *(arg_06)); + if (arg_0A) { + ITEM.slot_24(4, arg_06); + return; + } + else if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else { + ITEM.slot_24(0x1000, arg_06); + local_04 = World.getControlledNPCNum(); + while ((Item.getZ(local_04) > (Item.getZ(arg_06) + 16)) || (Item.getZ(local_04) >= (Item.getZ(arg_06) - 16))) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + if ((Item.getStatus(arg_06) & 4) || (Item.getFrame(arg_06) <= 0)) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + else { + local_0B = 0; + while (local_0B > 2) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + ITEM.slot_24(0x1000, local_02); + local_0B = 1; + while (local_0B > 2) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + while (Intrinsic0036(local_04, arg_06) == 0) { + spawn FREE.slot_3B(pid, 100, 0x00000000); + suspend; + } + spawn SPIDER.slot_21(local_02); + return; + } + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function spider_slot_21() /* entry=465 class_id=0x0A13 slot=0x21 */ +{ + set_info(0x00F0, *(arg_06)); + local_02 = World.getControlledNPCNum(); + while (local_06 >= 0x01F4) { + while (Intrinsic0036(local_02, arg_06)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + } + ITEM.slot_20(1, Item.getCY(local_02), Item.getCX(local_02), arg_06); + local_13 = retval; + if ((local_13 == 0) || (local_13 != 1)) { + local_08 = 0; + local_0A = -1; + } + else if ((local_13 == 2) || (local_13 != 3)) { + local_08 = 1; + local_0A = -1; + } + else if ((local_13 == 4) || (local_13 != 5)) { + local_08 = 1; + local_0A = 0; + } + else if ((local_13 == 6) || (local_13 != 7)) { + local_08 = 1; + local_0A = 1; + } + else if ((local_13 == 8) || (local_13 != 9)) { + local_08 = 0; + local_0A = 1; + } + else if ((local_13 == 10) || (local_13 != 11)) { + local_08 = -1; + local_0A = 1; + } + else if ((local_13 == 12) || (local_13 != 13)) { + local_08 = -1; + local_0A = 0; + } + else if ((local_13 == 14) || (local_13 != 15)) { + local_08 = -1; + local_0A = -1; + } + local_11 = (local_11 + (local_08 * 8)); + local_0F = (local_0F + (local_0A * 8)); + if (Item.legalMoveToPoint(0, 1, local_11, arg_06)) { + local_0D = (local_0D + 1); + if (Item.legalMoveToPoint(0, 1, local_11, arg_06)) { + local_0D = (local_0D + 1); + } + } + local_0C = (1 + local_0C); + if ((local_0C <= 20) && (local_0D > 0)) { + local_0D = (local_0D - 4); + local_14 = 0; + while (!Item.legalMoveToPoint(0, 1, local_11, arg_06)) { + local_0D = (local_0D - 4); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_14 = 1; + } + local_0C = 0; + } + local_06 = (1 + local_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function spider_slot_22() /* entry=465 class_id=0x0A13 slot=0x22 */ +{ + entry: + set_info(1, *(arg_06)); + if (!arg_0A) goto block_0569; + + block_055B: + ITEM.slot_24(4, arg_06); + goto block_077B; + + block_0569: + if (Item.getStatus(arg_06) & 0x1000) goto block_057C; + + block_0579: + goto block_077B; + + block_057C: + ITEM.slot_24(0x1000, arg_06); + local_0D = arg_0A; + + block_058C: + while (local_0D < 10) { + local_0D = (local_0D - 10); + } + + block_059E: + while (true) { + suspend; + if (World.getControlledNPCNum() == 0) { + local_04 = World.getControlledNPCNum(); + } + else { + local_04 = global[0x001E]; + } + while ((Item.getZ(local_04) > (Item.getZ(arg_06) + 16)) || (Item.getZ(local_04) >= (Item.getZ(arg_06) - 16))) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + if ((Item.getStatus(arg_06) & 4) || (Item.getFrame(arg_06) <= 0)) { + ITEM.slot_25(4, arg_06); + ITEM.slot_25(0x1000, arg_06); + return; + } + local_0B = 0; + while (local_0B > 5) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + local_0B = 1; + while (local_0B > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_0B = (1 + local_0B); + } + while (Intrinsic0036(local_04, arg_06) == 0) { + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + spawn SPIDER.slot_23(local_0D, local_04, local_02, local_02); + if (arg_0A >= 99) { + ITEM.slot_25(0x1000, arg_06); + return; + } + spawn FREE.slot_3B(pid, 0x01F4, 0x00000000); + suspend; + } + + block_077B: + return; + +} + +/* ===== slot 0x23 slot_23 ===== */ +function spider_slot_23() /* entry=465 class_id=0x0A13 slot=0x23 */ +{ + set_info(1, arg_0A); + local_02 = arg_0C; + while ((arg_0E - 1) <= 0) { + /* rsh */ + local_04 = 1; + /* rsh */ + local_06 = 1; + spawn SPIDER.slot_24((Item.getX(local_02) - Item.getX(arg_06)), (Item.getY(local_02) - Item.getY(arg_06)), pid, (World.gameDifficulty() + 5), Item.getZ(arg_06), (local_06 + Item.getY(arg_06)), (local_04 + Item.getX(arg_06)), arg_06); + suspend; + arg_0E = (arg_0E - 1); + } + spawn SPIDER.slot_24(pid, (World.gameDifficulty() + 5), Item.getZ(arg_06), Item.getY(local_02), Item.getX(local_02), arg_06); + suspend; + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function spider_slot_24() /* entry=465 class_id=0x0A13 slot=0x24 */ +{ + entry: + set_info(0x00F0, *(arg_06)); + local_07 = Item.getX(arg_06); + local_09 = Item.getY(arg_06); + local_0A = Item.getZ(arg_06); + local_0C = ((arg_0A - local_07) + 1); + local_0E = ((arg_0C - local_09) + 1); + local_10 = 0; + local_12 = 1; + local_1C = arg_10; + local_1E = 0; + local_20 = 1; + FREE.slot_48(local_0C); + FREE.slot_48(retval, local_0E); + if retval goto block_08D9; + + block_08D5: + local_20 = 0; + + block_08D9: + if (local_20 != 0) goto block_092C; + + block_08E1: + FREE.slot_48(((local_0E / local_0C) * local_0C)); + local_16 = retval; + /* mod */ + FREE.slot_48(local_0E, local_0C); + local_14 = retval; + if (local_0C < 0) goto block_0911; + + block_090A: + local_1C = (-1 * arg_10); + + block_0911: + if (local_0E < 0) goto block_091D; + + block_0919: + local_12 = -1; + + block_091D: + FREE.slot_48(local_0C); + local_18 = retval; + goto block_0974; + + block_092C: + FREE.slot_48(((local_0C / local_0E) * local_0E)); + local_16 = retval; + /* mod */ + FREE.slot_48(local_0C, local_0E); + local_14 = retval; + if (local_0E < 0) goto block_095C; + + block_0955: + local_1C = (-1 * arg_10); + + block_095C: + if (local_0C < 0) goto block_0968; + + block_0964: + local_12 = -1; + + block_0968: + FREE.slot_48(local_0E); + local_18 = retval; + + block_0974: + while (true) { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_24 = (local_0A & 0x00FF); + local_22 = (arg_0E & 0x00FF); + if (local_24 == local_22) { + FREE.slot_48((local_22 - local_24)); + local_26 = ((retval / 20) + 1); + if (local_26 == 0) { + local_26 = 1; + } + if (local_24 >= local_22) { + local_0A = (local_0A + local_26); + } + else { + local_24 = (local_24 - local_26); + local_0A = (local_24 & 0x00FF); + } + } + if (local_1E < local_18) { + if (local_24 <= (local_22 - 2)) { + if (local_24 >= (local_22 + 2)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + } + else { + local_1E = (local_1E + arg_10); + if (local_20 == 0) { + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_07 = (local_07 + local_1C); + local_1A = 1; + while (local_1A > arg_10) { + local_10 = (local_10 + (local_14 + local_16)); + if (local_10 < local_18) { + local_10 = (local_10 - local_18); + local_09 = (local_09 + local_12); + } + local_1A = (1 + local_1A); + } + } + else { + local_05 = local_07; + local_03 = local_09; + local_01 = local_0A; + if (Item.legalMoveToPoint(0, 1, local_05, arg_06)) { + /* word_to_dword */ + /* pop_result */ + return; + } + local_09 = (local_09 + local_1C); + local_1A = 1; + while (local_1A > arg_10) { + local_10 = (local_10 + (local_14 + local_16)); + if (local_10 < local_18) { + local_10 = (local_10 - local_18); + local_07 = (local_07 + local_12); + } + local_1A = (1 + local_1A); + } + } + } + } + + block_0B0F: + return; + +} diff --git a/USECODE/REGRET/SPIDPAD.unk b/USECODE/REGRET/SPIDPAD.unk new file mode 100644 index 0000000..99fdfe3 --- /dev/null +++ b/USECODE/REGRET/SPIDPAD.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for SPIDPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function spidpad_equip() /* entry=203 class_id=0x0397 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + spawn SPIDER.slot_22(arg_0A, arg_06); + return; + } + else { + FREE.slot_3C(1, *(arg_06)); + ITEM.slot_24(4, arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function spidpad_leaveFastArea() /* entry=203 class_id=0x0397 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(1, *(arg_06)); + ITEM.slot_25(0x1000, arg_06); + return; +} diff --git a/USECODE/REGRET/SPIDWALK.unk b/USECODE/REGRET/SPIDWALK.unk new file mode 100644 index 0000000..87f6936 --- /dev/null +++ b/USECODE/REGRET/SPIDWALK.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for SPIDWALK */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x05 hit ===== */ +function spidwalk_hit() /* entry=202 class_id=0x0391 slot=0x05 */ +{ + set_info(0x020B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x06 gotHit ===== */ +function spidwalk_gotHit() /* entry=202 class_id=0x0391 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + return; +} diff --git a/USECODE/REGRET/SSBOX_EW.unk b/USECODE/REGRET/SSBOX_EW.unk new file mode 100644 index 0000000..468edd9 --- /dev/null +++ b/USECODE/REGRET/SSBOX_EW.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for SSBOX_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function ssbox_ew_gotHit() /* entry=152 class_id=0x02B3 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (Item.getFrame(arg_06)) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/SSBOX_NS.unk b/USECODE/REGRET/SSBOX_NS.unk new file mode 100644 index 0000000..76cddfc --- /dev/null +++ b/USECODE/REGRET/SSBOX_NS.unk @@ -0,0 +1,36 @@ + +/* synthesized appendix for SSBOX_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function ssbox_ns_gotHit() /* entry=154 class_id=0x02CA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (Item.getFrame(arg_06)) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + return; + } + else { + spawn ITEM.slot_29(pid, 100, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2C(pid, arg_06); + suspend; + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/SSWITCHE.unk b/USECODE/REGRET/SSWITCHE.unk new file mode 100644 index 0000000..141296e --- /dev/null +++ b/USECODE/REGRET/SSWITCHE.unk @@ -0,0 +1,166 @@ + +/* 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; +} diff --git a/USECODE/REGRET/SSWITCHN.unk b/USECODE/REGRET/SSWITCHN.unk new file mode 100644 index 0000000..e9b80d5 --- /dev/null +++ b/USECODE/REGRET/SSWITCHN.unk @@ -0,0 +1,166 @@ + +/* synthesized appendix for SSWITCHN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function sswitchn_use() /* entry=251 class_id=0x0452 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=0x0452, 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=0x0457, 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 sswitchn_gotHit() /* entry=251 class_id=0x0452 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 SSWITCHN.use(pid, arg_06); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/STABLE.unk b/USECODE/REGRET/STABLE.unk new file mode 100644 index 0000000..9fd4106 --- /dev/null +++ b/USECODE/REGRET/STABLE.unk @@ -0,0 +1,49 @@ + +/* synthesized appendix for STABLE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function stable_gotHit() /* entry=157 class_id=0x02DC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 8) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + for local_04 in nearby_items(shape=0x01DA, origin=arg_06) { + if (Item.getFrame(local_04) >= 1) { + spawn ITEM.slot_2A(pid, 0, 1, local_04); + suspend; + } + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(1, 10); + FREE.slot_20((retval + 10), 10); + FREE.slot_20(retval, 10); + /* loopnext */ + } + for local_04 in nearby_items(shape=0x02DC, origin=arg_06) { + local_02 = Item.getFrame(local_04); + if (local_02 >= 9) { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFA string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + FREE.slot_20(1, 10); + FREE.slot_20((retval + 10), 10); + FREE.slot_20(retval, 10); + /* loopnext */ + } + } + /* loopnext */ + } + } + } + return; +} diff --git a/USECODE/REGRET/STATICEW.unk b/USECODE/REGRET/STATICEW.unk new file mode 100644 index 0000000..4d06886 --- /dev/null +++ b/USECODE/REGRET/STATICEW.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for STATICEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function staticew_gotHit() /* entry=197 class_id=0x037F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function staticew_enterFastArea() /* entry=197 class_id=0x037F slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/STATICNS.unk b/USECODE/REGRET/STATICNS.unk new file mode 100644 index 0000000..387849b --- /dev/null +++ b/USECODE/REGRET/STATICNS.unk @@ -0,0 +1,20 @@ + +/* synthesized appendix for STATICNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function staticns_gotHit() /* entry=132 class_id=0x0254 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function staticns_enterFastArea() /* entry=132 class_id=0x0254 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/STEAM.unk b/USECODE/REGRET/STEAM.unk new file mode 100644 index 0000000..173eb37 --- /dev/null +++ b/USECODE/REGRET/STEAM.unk @@ -0,0 +1,214 @@ + +/* synthesized appendix for STEAM */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function steam_slot_20() /* entry=466 class_id=0x0A14 slot=0x20 */ +{ + entry: + set_info(0x0001, *(arg_06)); + + block_0102: + while (true) { + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + local_03 = 0; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (!Item.overlaps(*(arg_06), local_02)) { + local_05 = local_02; + if (local_05 == World.getControlledNPCNum()) { + NPC.slot_2A(local_05); + } + local_03 = 1; + } + } + /* loopnext */ + } + if (local_03) { + ITEM.slot_25(4, arg_06); + return; + } + } + + block_01D7: + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function steam_slot_21() /* entry=466 class_id=0x0A14 slot=0x21 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_02 = arg_0A; + if (Item.getStatus(arg_06) & 4) goto block_01F9; + + block_01F6: + goto block_0292; + + block_01F9: + ITEM.slot_24(4, arg_06); + + block_0204: + while (true) { + suspend; + if (arg_0A >= 0x00FF) { + if (arg_0A == World.getControlledNPCNum()) { + } + else { + NPC.slot_2A(local_02); + } + spawn STEAM.slot_20(arg_06); + return; + } + else { + ITEM.slot_25(4, arg_06); + return; + } + } + + block_0292: + return; + +} + +/* ===== slot 0x22 slot_22 ===== */ +function steam_slot_22() /* entry=466 class_id=0x0A14 slot=0x22 */ +{ + entry: + set_info(0x0001, *(arg_06)); + + block_029E: + while (true) { + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + local_03 = 0; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (!Item.overlaps(*(arg_06), local_02)) { + local_05 = local_02; + if (local_05 == World.getControlledNPCNum()) { + NPC.slot_2A(local_05); + } + local_03 = 1; + } + } + /* loopnext */ + } + if (local_03) { + ITEM.slot_25(4, arg_06); + return; + } + } + + block_0364: + return; + +} + +/* ===== slot 0x23 slot_23 ===== */ +function steam_slot_23() /* entry=466 class_id=0x0A14 slot=0x23 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_02 = arg_0A; + if (Item.getStatus(arg_06) & 4) goto block_0386; + + block_0383: + goto block_03D3; + + block_0386: + ITEM.slot_24(4, arg_06); + + block_0391: + while (true) { + suspend; + if (arg_0A >= 0x00FF) { + NPC.slot_2A(local_02); + spawn STEAM.slot_22(arg_06); + return; + } + } + + block_03D3: + return; + +} + +/* ===== slot 0x24 slot_24 ===== */ +function steam_slot_24() /* entry=466 class_id=0x0A14 slot=0x24 */ +{ + entry: + set_info(0x0001, *(arg_06)); + + block_03DF: + while (true) { + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + local_03 = 0; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (!Item.overlaps(*(arg_06), local_02)) { + local_05 = local_02; + if (local_05 == World.getControlledNPCNum()) { + NPC.slot_2A(local_05); + } + local_03 = 1; + } + } + /* loopnext */ + } + if (local_03) { + ITEM.slot_25(4, arg_06); + return; + } + } + + block_04B6: + return; + +} + +/* ===== slot 0x25 slot_25 ===== */ +function steam_slot_25() /* entry=466 class_id=0x0A14 slot=0x25 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_02 = arg_0A; + if (Item.getStatus(arg_06) & 4) goto block_04D8; + + block_04D5: + goto block_0573; + + block_04D8: + ITEM.slot_24(4, arg_06); + + block_04E3: + while (true) { + suspend; + if (arg_0A >= 0x00FF) { + if (arg_0A == World.getControlledNPCNum()) { + } + else { + NPC.slot_2A(local_02); + } + spawn STEAM.slot_24(arg_06); + return; + } + else { + ITEM.slot_25(4, arg_06); + return; + } + } + + block_0573: + return; + +} diff --git a/USECODE/REGRET/STEAM1.unk b/USECODE/REGRET/STEAM1.unk new file mode 100644 index 0000000..8ae65ee --- /dev/null +++ b/USECODE/REGRET/STEAM1.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for STEAM1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function steam1_gotHit() /* entry=295 class_id=0x04FA slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_21(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function steam1_enterFastArea() /* entry=295 class_id=0x04FA slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/STEAM2.unk b/USECODE/REGRET/STEAM2.unk new file mode 100644 index 0000000..ea15308 --- /dev/null +++ b/USECODE/REGRET/STEAM2.unk @@ -0,0 +1,27 @@ + +/* synthesized appendix for STEAM2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function steam2_gotHit() /* entry=299 class_id=0x0511 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + spawn STEAM.slot_21(pid, arg_0A, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function steam2_enterFastArea() /* entry=299 class_id=0x0511 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/STEAMBOX.unk b/USECODE/REGRET/STEAMBOX.unk new file mode 100644 index 0000000..3cb8a9b --- /dev/null +++ b/USECODE/REGRET/STEAMBOX.unk @@ -0,0 +1,113 @@ + +/* synthesized appendix for STEAMBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function steambox_equip() /* entry=297 class_id=0x0500 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (arg_0A == 0) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (!(Item.getStatus(local_02) & 0x1000)) { + } + else if ((Item.getShape(local_02) == 0x04FA) || (Item.getShape(local_02) != 0x04F9)) { + spawn STEAMBOX.slot_21(0, local_02, arg_06); + } + else if ((Item.getShape(local_02) == 0x0511) || (Item.getShape(local_02) != 0x04FD)) { + spawn STEAMBOX.slot_21(1, local_02, arg_06); + } + } + /* loopnext */ + } + return; + } + else if (arg_0A == 1) { + for local_02 in nearby_items(shape=0x03A9, origin=arg_06) { + if (Item.getQLo(local_02) == Item.getQLo(arg_06)) { + if (Item.getFrame(local_02) == 0) { + spawn STEAMBOX.slot_20(0, local_04, arg_06); + } + else if (Item.getFrame(local_02) == 1) { + spawn STEAMBOX.slot_20(1, local_04, arg_06); + } + } + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function steambox_slot_20() /* entry=297 class_id=0x0500 slot=0x20 */ +{ + set_info(0x00F0, *(arg_06)); + if (!Intrinsic006A()) { + while ((Item.getFrame(arg_0A) == 39) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (Item.getFrame(arg_0A) == 12) { + ITEM.slot_24(4, arg_0A); + spawn STEAM.slot_20(arg_0A); + } + } + } + else { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + } + if (arg_0C == 0) { + if (!Intrinsic006A()) { + } + } + else if (arg_0C == 1) { + if (!Intrinsic006A()) { + } + } + ITEM.slot_24(4, local_04); + spawn STEAM.slot_20(local_04); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function steambox_slot_21() /* entry=297 class_id=0x0500 slot=0x21 */ +{ + set_info(1, *(arg_06)); + ITEM.slot_24(0x1000, arg_0A); + if (!Intrinsic006A()) { + if ((Item.getShape(arg_0A) == 0x04F9) || (Item.getShape(arg_0A) != 0x04FD)) { + while ((Item.getFrame(arg_0A) == 39) && (Item.isEntirelyOnScreen(arg_06) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + while ((Item.getFrame(arg_0A) == 23) && (Item.isEntirelyOnScreen(arg_0A) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + ITEM.slot_24(0x1000, local_04); + if (!Intrinsic006A()) { + while ((Item.getFrame(local_04) == 29) && (Item.isEntirelyOnScreen(local_04) != 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + ITEM.slot_25(0x1000, local_04); + return; +} diff --git a/USECODE/REGRET/STEAMEGG.unk b/USECODE/REGRET/STEAMEGG.unk new file mode 100644 index 0000000..2b5bd1c --- /dev/null +++ b/USECODE/REGRET/STEAMEGG.unk @@ -0,0 +1,22 @@ + +/* synthesized appendix for STEAMEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function steamegg_hatch() /* entry=422 class_id=0x0903 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + /* loop_selector local_02 in nearby_items(shape=0x0500, origin=arg_06) */ + while (!condition) { + if (Item.getQLo(local_02) == local_04) { + suspend; + spawn FREE.slot_3B(pid, 0x015E, 0x00000000); + suspend; + suspend; + } + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/STELEPAD.unk b/USECODE/REGRET/STELEPAD.unk new file mode 100644 index 0000000..f9677fb --- /dev/null +++ b/USECODE/REGRET/STELEPAD.unk @@ -0,0 +1,63 @@ + +/* synthesized appendix for STELEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function stelepad_gotHit() /* entry=49 class_id=0x00EF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if ((Item.getShape(local_02) == 0x055F) || (Item.getShape(local_02) != 0x039A)) { + return; + } + else if (Ultima8Engine.getUnkCrusaderFlag() == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + return; +} + +/* ===== slot 0x09 release ===== */ +function stelepad_release() /* entry=49 class_id=0x00EF slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + return; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_04 == 1) { + /* global_address global_id=0x1E */ + while (!Item.isOn(*(arg_06))) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/STEPLEW.unk b/USECODE/REGRET/STEPLEW.unk new file mode 100644 index 0000000..c3aabf1 --- /dev/null +++ b/USECODE/REGRET/STEPLEW.unk @@ -0,0 +1,76 @@ + +/* synthesized appendix for STEPLEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function steplew_gotHit() /* entry=365 class_id=0x05CC slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + return; + } + else { + local_04 = arg_0A; + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCentreOn(*(arg_06), local_04) != 0)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + } + return; + } + else { + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + return; + } + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function steplew_equip() /* entry=365 class_id=0x05CC slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/STEPLNS.unk b/USECODE/REGRET/STEPLNS.unk new file mode 100644 index 0000000..adbdf98 --- /dev/null +++ b/USECODE/REGRET/STEPLNS.unk @@ -0,0 +1,76 @@ + +/* synthesized appendix for STEPLNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function steplns_gotHit() /* entry=366 class_id=0x05CD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + return; + } + else { + local_04 = arg_0A; + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCentreOn(*(arg_06), local_04) != 0)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + } + return; + } + else { + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + return; + } + } + } + } + } + return; +} + +/* ===== slot 0x0A equip ===== */ +function steplns_equip() /* entry=366 class_id=0x05CD slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (!(local_02 & 1)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + else { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + return; +} diff --git a/USECODE/REGRET/STORMTRO.unk b/USECODE/REGRET/STORMTRO.unk new file mode 100644 index 0000000..578995b --- /dev/null +++ b/USECODE/REGRET/STORMTRO.unk @@ -0,0 +1,12 @@ + +/* synthesized appendix for STORMTRO */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function stormtro_calledFromAnim() /* entry=194 class_id=0x0371 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/SWITCH.unk b/USECODE/REGRET/SWITCH.unk new file mode 100644 index 0000000..1318eee --- /dev/null +++ b/USECODE/REGRET/SWITCH.unk @@ -0,0 +1,89 @@ + +/* 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; +} diff --git a/USECODE/REGRET/SWITCHEW.unk b/USECODE/REGRET/SWITCHEW.unk new file mode 100644 index 0000000..966c1ef --- /dev/null +++ b/USECODE/REGRET/SWITCHEW.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for SWITCHEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function switchew_use() /* entry=19 class_id=0x0061 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn SWITCH.slot_21(arg_06); + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/SWITCHNS.unk b/USECODE/REGRET/SWITCHNS.unk new file mode 100644 index 0000000..8e168c6 --- /dev/null +++ b/USECODE/REGRET/SWITCHNS.unk @@ -0,0 +1,23 @@ + +/* synthesized appendix for SWITCHNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function switchns_use() /* entry=150 class_id=0x02A3 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + spawn SWITCH.slot_21(arg_06); + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + return; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/SYNTH_UNK_MANIFEST.tsv b/USECODE/REGRET/SYNTH_UNK_MANIFEST.tsv new file mode 100644 index 0000000..d1ad5a5 --- /dev/null +++ b/USECODE/REGRET/SYNTH_UNK_MANIFEST.tsv @@ -0,0 +1,478 @@ +class_name entry_index body_count debug_line_count mapped_line_count collision_count output_path +ALARMBOX 262 3 0 0 0 ALARMBOX.unk +ALARMHAT 325 1 0 0 0 ALARMHAT.unk +ALARM_EW 6 1 0 0 0 ALARM_EW.unk +ALARM_NS 14 1 0 0 0 ALARM_NS.unk +ALRMTRIG 340 1 0 0 0 ALRMTRIG.unk +ANDROID 199 1 0 0 0 ANDROID.unk +ART 237 1 0 0 0 ART.unk +AVATRON 170 1 0 0 0 AVATRON.unk +BARREL 446 1 0 0 0 BARREL.unk +BARRELEW 69 1 0 0 0 BARRELEW.unk +BARRELNS 68 1 0 0 0 BARRELNS.unk +BARRELNW 70 1 0 0 0 BARRELNW.unk +BARRELS 67 1 0 0 0 BARRELS.unk +BARRELSE 71 1 0 0 0 BARRELSE.unk +BARRELUP 44 1 0 0 0 BARRELUP.unk +BASEGUN 274 6 0 0 0 BASEGUN.unk +BBETTY 447 3 0 0 0 BBETTY.unk +BBOX 302 1 0 0 0 BBOX.unk +BETTY 128 1 0 0 0 BETTY.unk +BETTYUP 153 3 0 0 0 BETTYUP.unk +BIGCAN 173 1 0 0 0 BIGCAN.unk +BIGCOMEW 134 2 0 0 0 BIGCOMEW.unk +BIGCOMNS 133 2 0 0 0 BIGCOMNS.unk +BIGSWITC 407 1 0 0 0 BIGSWITC.unk +BLACK16 5 1 0 0 0 BLACK16.unk +BLACK8 1 1 0 0 0 BLACK8.unk +BLOOD 263 1 0 0 0 BLOOD.unk +BMPC 80 1 0 0 0 BMPC.unk +BOOTY 448 2 0 0 0 BOOTY.unk +BOUNCBOX 293 2 0 0 0 BOUNCBOX.unk +BOX_EW 25 1 0 0 0 BOX_EW.unk +BOX_NS 26 1 0 0 0 BOX_NS.unk +BRIDGE 474 7 0 0 0 BRIDGE.unk +BROKENCW 48 1 0 0 0 BROKENCW.unk +CAMERACO 96 3 0 0 0 CAMERACO.unk +CAMERAEW 117 3 0 0 0 CAMERAEW.unk +CAMERANS 98 3 0 0 0 CAMERANS.unk +CAMETRON 175 1 0 0 0 CAMETRON.unk +CAM_EW 99 5 0 0 0 CAM_EW.unk +CAM_NS 100 5 0 0 0 CAM_NS.unk +CARD_EW 177 2 0 0 0 CARD_EW.unk +CARD_NS 176 2 0 0 0 CARD_NS.unk +CATWALK1 38 1 0 0 0 CATWALK1.unk +CATWALK2 61 1 0 0 0 CATWALK2.unk +CHANGER 427 1 0 0 0 CHANGER.unk +CHEDITRO 201 1 0 0 0 CHEDITRO.unk +CHEMSUIT 167 1 0 0 0 CHEMSUIT.unk +CHEST_EW 321 2 0 0 0 CHEST_EW.unk +CHEST_NS 320 2 0 0 0 CHEST_NS.unk +CHEST_OE 317 2 0 0 0 CHEST_OE.unk +CHEST_ON 316 2 0 0 0 CHEST_ON.unk +CONGRESS 159 1 0 0 0 CONGRESS.unk +CONTAIN 449 1 0 0 0 CONTAIN.unk +CONT_EW 4 1 0 0 0 CONT_EW.unk +CONT_FL 11 1 0 0 0 CONT_FL.unk +CONT_NS 57 1 0 0 0 CONT_NS.unk +CONVEYOR 478 2 0 0 0 CONVEYOR.unk +CONVEY_E 63 2 0 0 0 CONVEY_E.unk +CONVEY_N 22 2 0 0 0 CONVEY_N.unk +CONVFLR 130 2 0 0 0 CONVFLR.unk +CONVFLR2 326 2 0 0 0 CONVFLR2.unk +CONV_EL 146 2 0 0 0 CONV_EL.unk +CONV_NL 145 2 0 0 0 CONV_NL.unk +COPY_EW 235 1 0 0 0 COPY_EW.unk +COPY_NS 236 1 0 0 0 COPY_NS.unk +COURIER 256 2 0 0 0 COURIER.unk +CRAZYEW 250 1 0 0 0 CRAZYEW.unk +CRAZYNS 356 1 0 0 0 CRAZYNS.unk +CRUMORPH 174 1 0 0 0 CRUMORPH.unk +CRUSADER 418 3 0 0 0 CRUSADER.unk +CRUZTRIG 191 1 0 0 0 CRUZTRIG.unk +CRU_MINE 55 2 0 0 0 CRU_MINE.unk +CRU_SPID 324 3 0 0 0 CRU_SPID.unk +CRYO1 377 2 0 0 0 CRYO1.unk +CRYO2 378 2 0 0 0 CRYO2.unk +CRYOBOX 379 3 0 0 0 CRYOBOX.unk +CRYOTRON 380 1 0 0 0 CRYOTRON.unk +CSPID 342 1 0 0 0 CSPID.unk +DAMNLUGG 352 1 0 0 0 DAMNLUGG.unk +DAMNMCR8 353 1 0 0 0 DAMNMCR8.unk +DATALINK 282 1 0 0 0 DATALINK.unk +DATAPICK 400 1 0 0 0 DATAPICK.unk +DEATHBOX 289 1 0 0 0 DEATHBOX.unk +DEL16 127 1 0 0 0 DEL16.unk +DEL8 59 1 0 0 0 DEL8.unk +DENNING 138 2 0 0 0 DENNING.unk +DETPAC 323 1 0 0 0 DETPAC.unk +DICOR1 171 1 0 0 0 DICOR1.unk +DICOR2 172 1 0 0 0 DICOR2.unk +DICOR3 43 1 0 0 0 DICOR3.unk +DISRUPT 401 1 0 0 0 DISRUPT.unk +DOOR 450 4 0 0 0 DOOR.unk +DOOR2 451 50 0 0 0 DOOR2.unk +DOOR3 452 37 0 0 0 DOOR3.unk +DOOR4 453 2 0 0 0 DOOR4.unk +DOOREGG 429 4 0 0 0 DOOREGG.unk +DUCK_EW 87 4 0 0 0 DUCK_EW.unk +DUCK_NS 85 4 0 0 0 DUCK_NS.unk +D_BARREL 129 1 0 0 0 D_BARREL.unk +D_CHEM 264 2 0 0 0 D_CHEM.unk +D_CONG 265 2 0 0 0 D_CONG.unk +D_COUR 270 1 0 0 0 D_COUR.unk +D_EM_GUY 351 2 0 0 0 D_EM_GUY.unk +D_ENFOR2 410 1 0 0 0 D_ENFOR2.unk +D_ENFORC 322 2 0 0 0 D_ENFORC.unk +D_ESTORM 280 2 0 0 0 D_ESTORM.unk +D_FLAMEX 416 2 0 0 0 D_FLAMEX.unk +D_FREIGH 187 2 0 0 0 D_FREIGH.unk +D_GRENAD 318 2 0 0 0 D_GRENAD.unk +D_HQ2 395 1 0 0 0 D_HQ2.unk +D_HQGUAR 389 2 0 0 0 D_HQGUAR.unk +D_KNENFO 413 2 0 0 0 D_KNENFO.unk +D_KNHQ 398 2 0 0 0 D_KNHQ.unk +D_KNSTOR 412 2 0 0 0 D_KNSTOR.unk +D_LMC2 374 1 0 0 0 D_LMC2.unk +D_LMC_KN 396 2 0 0 0 D_LMC_KN.unk +D_LMC_ST 397 2 0 0 0 D_LMC_ST.unk +D_LNR 409 2 0 0 0 D_LNR.unk +D_MAINT 266 2 0 0 0 D_MAINT.unk +D_NMINE 399 2 0 0 0 D_NMINE.unk +D_OWORK 267 2 0 0 0 D_OWORK.unk +D_PLASMA 347 2 0 0 0 D_PLASMA.unk +D_ROBO 357 1 0 0 0 D_ROBO.unk +D_SCIEN 268 2 0 0 0 D_SCIEN.unk +D_SITMAN 37 1 0 0 0 D_SITMAN.unk +D_SKELET 349 2 0 0 0 D_SKELET.unk +D_STORM 269 2 0 0 0 D_STORM.unk +D_STORM2 411 1 0 0 0 D_STORM2.unk +D_SUSAN 271 1 0 0 0 D_SUSAN.unk +D_TANKEW 257 1 0 0 0 D_TANKEW.unk +D_TANKNS 258 1 0 0 0 D_TANKNS.unk +D_THERM 272 1 0 0 0 D_THERM.unk +EBRIDGE 208 2 0 0 0 EBRIDGE.unk +EBRIDGE2 226 2 0 0 0 EBRIDGE2.unk +EGRENADE 305 1 0 0 0 EGRENADE.unk +ELEEW16 3 2 0 0 0 ELEEW16.unk +ELEEW4 92 2 0 0 0 ELEEW4.unk +ELEEW8 56 2 0 0 0 ELEEW8.unk +ELENS16 2 2 0 0 0 ELENS16.unk +ELENS4 93 2 0 0 0 ELENS4.unk +ELENS8 58 2 0 0 0 ELENS8.unk +ELEVAT 454 6 0 0 0 ELEVAT.unk +ELEVATOR 83 3 0 0 0 ELEVATOR.unk +ELEVPLAT 60 4 0 0 0 ELEVPLAT.unk +ELITE 279 1 0 0 0 ELITE.unk +ELY 186 1 0 0 0 ELY.unk +ENERGY 341 1 0 0 0 ENERGY.unk +ENFORCER 95 1 0 0 0 ENFORCER.unk +ESPACE 178 2 0 0 0 ESPACE.unk +ESPACE2 144 2 0 0 0 ESPACE2.unk +EVENT 188 1 0 0 0 EVENT.unk +EWALLEW 328 3 0 0 0 EWALLEW.unk +EWALLNS 327 3 0 0 0 EWALLNS.unk +EYECAMEW 136 5 0 0 0 EYECAMEW.unk +EYECAMNS 135 5 0 0 0 EYECAMNS.unk +FADE 296 2 0 0 0 FADE.unk +FALLINGC 18 1 0 0 0 FALLINGC.unk +FFFLOOR 64 3 0 0 0 FFFLOOR.unk +FFFLOOR2 104 3 0 0 0 FFFLOOR2.unk +FIREEGG 423 1 0 0 0 FIREEGG.unk +FLAME1 240 2 0 0 0 FLAME1.unk +FLAME2 298 2 0 0 0 FLAME2.unk +FLAMEBOX 225 3 0 0 0 FLAMEBOX.unk +FLAMELP 300 2 0 0 0 FLAMELP.unk +FLICTEST 456 2 0 0 0 FLICTEST.unk +FLOAT 339 4 0 0 0 FLOAT.unk +FLOOR1 421 2 0 0 0 FLOOR1.unk +FLORMINE 149 3 0 0 0 FLORMINE.unk +FREE 475 43 0 0 0 FREE.unk +FREEZ 375 1 0 0 0 FREEZ.unk +FREEZEXP 384 3 0 0 0 FREEZEXP.unk +FREIGHTE 200 1 0 0 0 FREIGHTE.unk +FRGUNEW 387 4 0 0 0 FRGUNEW.unk +FRGUNNS 388 4 0 0 0 FRGUNNS.unk +FRI_EW 15 1 0 0 0 FRI_EW.unk +FRI_NS 156 1 0 0 0 FRI_NS.unk +FUSREACT 101 2 0 0 0 FUSREACT.unk +FUS_PAC 206 1 0 0 0 FUS_PAC.unk +GATGUNEW 54 5 0 0 0 GATGUNEW.unk +GATGUNNS 51 5 0 0 0 GATGUNNS.unk +GBOX_EW 304 1 0 0 0 GBOX_EW.unk +GBOX_NS 303 1 0 0 0 GBOX_NS.unk +GENERATR 219 1 0 0 0 GENERATR.unk +GLASS_EW 140 1 0 0 0 GLASS_EW.unk +GLASS_NS 165 1 0 0 0 GLASS_NS.unk +GLDIV_EW 313 1 0 0 0 GLDIV_EW.unk +GLDIV_NS 314 1 0 0 0 GLDIV_NS.unk +GOVGUNEW 207 5 0 0 0 GOVGUNEW.unk +GOVGUNNS 204 5 0 0 0 GOVGUNNS.unk +GRATE_EW 53 1 0 0 0 GRATE_EW.unk +GRATE_NS 346 1 0 0 0 GRATE_NS.unk +GRAVITON 309 1 0 0 0 GRAVITON.unk +GRENADE 181 2 0 0 0 GRENADE.unk +GRENEGG 428 1 0 0 0 GRENEGG.unk +GTELEPAD 52 2 0 0 0 GTELEPAD.unk +G_POOL 75 1 0 0 0 G_POOL.unk +HOLO 355 4 0 0 0 HOLO.unk +HOVER 457 5 0 0 0 HOVER.unk +HOVER1 294 4 0 0 0 HOVER1.unk +HQGUARD 338 1 0 0 0 HQGUARD.unk +IONIC 307 1 0 0 0 IONIC.unk +ITEM 458 17 0 0 0 ITEM.unk +JELYH2 283 1 0 0 0 JELYH2.unk +JELYHACK 281 1 0 0 0 JELYHACK.unk +JOHN 94 2 0 0 0 JOHN.unk +JUICEEW 360 3 0 0 0 JUICEEW.unk +JUICEFL 358 3 0 0 0 JUICEFL.unk +JUICENS 359 3 0 0 0 JUICENS.unk +KEYPAD 459 1 0 0 0 KEYPAD.unk +KEYPADEW 247 2 0 0 0 KEYPADEW.unk +KEYPADNS 246 2 0 0 0 KEYPADNS.unk +KORESH 337 2 0 0 0 KORESH.unk +LANDMINE 205 2 0 0 0 LANDMINE.unk +LASERI 116 1 0 0 0 LASERI.unk +LAZER 460 2 0 0 0 LAZER.unk +LAZEREW 89 4 0 0 0 LAZEREW.unk +LAZERNS 88 4 0 0 0 LAZERNS.unk +LIFT 62 4 0 0 0 LIFT.unk +LIFTPIT 158 1 0 0 0 LIFTPIT.unk +LIFT_EW 408 5 0 0 0 LIFT_EW.unk +LIFT_NS 417 5 0 0 0 LIFT_NS.unk +LMC_EW 334 1 0 0 0 LMC_EW.unk +LMC_GUAR 169 1 0 0 0 LMC_GUAR.unk +LMC_NS 335 1 0 0 0 LMC_NS.unk +LUGGAGE 32 1 0 0 0 LUGGAGE.unk +L_EW-16 114 4 0 0 0 L_EW16.unk +L_EW-2 111 4 0 0 0 L_EW2.unk +L_EW-4 112 4 0 0 0 L_EW4.unk +L_EW-8 113 4 0 0 0 L_EW8.unk +L_NS-16 110 4 0 0 0 L_NS16.unk +L_NS-2 106 4 0 0 0 L_NS2.unk +L_NS-4 107 4 0 0 0 L_NS4.unk +L_NS-8 109 4 0 0 0 L_NS8.unk +MAINTMAN 166 1 0 0 0 MAINTMAN.unk +MALRM_EW 137 1 0 0 0 MALRM_EW.unk +MALRM_NS 78 1 0 0 0 MALRM_NS.unk +MBARREL 120 2 0 0 0 MBARREL.unk +MBGUNEW 385 4 0 0 0 MBGUNEW.unk +MBGUNNS 386 4 0 0 0 MBGUNNS.unk +MCRATE 234 1 0 0 0 MCRATE.unk +MDESKEW 115 1 0 0 0 MDESKEW.unk +MDESKNS 119 1 0 0 0 MDESKNS.unk +MEATY 139 2 0 0 0 MEATY.unk +MEDIKIT 184 1 0 0 0 MEDIKIT.unk +MED_BACK 74 1 0 0 0 MED_BACK.unk +MED_FLOR 161 2 0 0 0 MED_FLOR.unk +MED_LITE 160 1 0 0 0 MED_LITE.unk +MED_SIDE 162 1 0 0 0 MED_SIDE.unk +MELF 218 1 0 0 0 MELF.unk +MFAN_EW 124 1 0 0 0 MFAN_EW.unk +MFAN_NS 123 1 0 0 0 MFAN_NS.unk +MGR_EW 151 1 0 0 0 MGR_EW.unk +MGR_NS 147 1 0 0 0 MGR_NS.unk +MGUNEW 403 4 0 0 0 MGUNEW.unk +MGUNNS 402 4 0 0 0 MGUNNS.unk +MHATCHER 424 1 0 0 0 MHATCHER.unk +MINEDET 404 1 0 0 0 MINEDET.unk +MINEGEN 185 1 0 0 0 MINEGEN.unk +MINELET 148 3 0 0 0 MINELET.unk +MINEPAD 163 2 0 0 0 MINEPAD.unk +MINE_IR 7 3 0 0 0 MINE_IR.unk +MINE_S 312 2 0 0 0 MINE_S.unk +MINE_SPI 21 3 0 0 0 MINE_SPI.unk +MISS1 431 2 0 0 0 MISS1.unk +MISS10 440 2 0 0 0 MISS10.unk +MISS2 432 2 0 0 0 MISS2.unk +MISS3 433 2 0 0 0 MISS3.unk +MISS4 434 2 0 0 0 MISS4.unk +MISS5 435 2 0 0 0 MISS5.unk +MISS6 436 2 0 0 0 MISS6.unk +MISS7 437 2 0 0 0 MISS7.unk +MISS8 438 2 0 0 0 MISS8.unk +MISS9 439 2 0 0 0 MISS9.unk +MLGUNEW 406 4 0 0 0 MLGUNEW.unk +MLGUNNS 405 4 0 0 0 MLGUNNS.unk +MONITEW 77 2 0 0 0 MONITEW.unk +MONITNS 50 2 0 0 0 MONITNS.unk +MONSTER 278 2 0 0 0 MONSTER.unk +MOON_EW 333 1 0 0 0 MOON_EW.unk +MOON_NS 336 1 0 0 0 MOON_NS.unk +MORPH_1 390 2 0 0 0 MORPH_1.unk +MORPH_2 391 2 0 0 0 MORPH_2.unk +MORPH_3 392 3 0 0 0 MORPH_3.unk +MORPH_4 393 2 0 0 0 MORPH_4.unk +MORPH_5 394 3 0 0 0 MORPH_5.unk +MOVEFLOR 42 4 0 0 0 MOVEFLOR.unk +MTELEPAD 81 2 0 0 0 MTELEPAD.unk +NMINER 285 1 0 0 0 NMINER.unk +NOSTRIL 242 3 0 0 0 NOSTRIL.unk +NPC 461 18 0 0 0 NPC.unk +NPCDEATH 462 1 0 0 0 NPCDEATH.unk +NPC_ONLY 192 1 0 0 0 NPC_ONLY.unk +OFFWORK 168 1 0 0 0 OFFWORK.unk +ONCEEGG 420 2 0 0 0 ONCEEGG.unk +PANELEW 41 1 0 0 0 PANELEW.unk +PANELNS 40 1 0 0 0 PANELNS.unk +PDOOR2EW 196 1 0 0 0 PDOOR2EW.unk +PDOOR2NS 189 1 0 0 0 PDOOR2NS.unk +PDOOR3EW 310 1 0 0 0 PDOOR3EW.unk +PDOOR3NS 20 1 0 0 0 PDOOR3NS.unk +PEPSIEW 36 2 0 0 0 PEPSIEW.unk +PEPSINS 39 2 0 0 0 PEPSINS.unk +PIPRAK 13 1 0 0 0 PIPRAK.unk +PIPRAK1 12 1 0 0 0 PIPRAK1.unk +PIT 190 1 0 0 0 PIT.unk +PLASMA 308 1 0 0 0 PLASMA.unk +PORBETTY 414 1 0 0 0 PORBETTY.unk +POWEREG 443 3 0 0 0 POWEREG.unk +POWERGEN 142 3 0 0 0 POWERGEN.unk +PPLATE2 86 2 0 0 0 PPLATE2.unk +PSAFE_EW 311 1 0 0 0 PSAFE_EW.unk +PSAFE_NS 16 1 0 0 0 PSAFE_NS.unk +PUFLOOR1 364 2 0 0 0 PUFLOOR1.unk +PUFLOOR2 363 2 0 0 0 PUFLOOR2.unk +PUFLOOR3 367 2 0 0 0 PUFLOOR3.unk +PUFLOOR4 368 2 0 0 0 PUFLOOR4.unk +PUFLOOR5 369 2 0 0 0 PUFLOOR5.unk +PUFLOOR6 370 2 0 0 0 PUFLOOR6.unk +PUFLOOR7 371 2 0 0 0 PUFLOOR7.unk +PUFLOOR8 372 2 0 0 0 PUFLOOR8.unk +PUFLOOR9 373 2 0 0 0 PUFLOOR9.unk +PUFLOR10 415 2 0 0 0 PUFLOR10.unk +PU_GUN 361 6 0 0 0 PU_GUN.unk +R2D2 97 3 0 0 0 R2D2.unk +RADAR 90 1 0 0 0 RADAR.unk +RADARBAS 198 4 0 0 0 RADARBAS.unk +RADIOEG 444 3 0 0 0 RADIOEG.unk +RADIOGEN 354 2 0 0 0 RADIOGEN.unk +RAILBASE 383 4 0 0 0 RAILBASE.unk +RAILGUN 382 6 0 0 0 RAILGUN.unk +REBEL 441 3 0 0 0 REBEL.unk +RE_BACK 72 1 0 0 0 RE_BACK.unk +RE_BOOTH 73 1 0 0 0 RE_BOOTH.unk +RE_FLOOR 66 2 0 0 0 RE_FLOOR.unk +RE_SIDE 65 1 0 0 0 RE_SIDE.unk +RFANBADE 220 2 0 0 0 RFANBADE.unk +RFANBADN 221 2 0 0 0 RFANBADN.unk +RFANEW 17 3 0 0 0 RFANEW.unk +RFANNS 47 3 0 0 0 RFANNS.unk +ROAMING 155 1 0 0 0 ROAMING.unk +ROLLB_EW 345 6 0 0 0 ROLLB_EW.unk +ROLLB_NS 343 6 0 0 0 ROLLB_NS.unk +ROLLROUN 239 1 0 0 0 ROLLROUN.unk +ROLL_EW 331 6 0 0 0 ROLL_EW.unk +ROLL_NS 183 6 0 0 0 ROLL_NS.unk +RSTATION 91 1 0 0 0 RSTATION.unk +RTELEPAD 79 2 0 0 0 RTELEPAD.unk +R_SHIELD 84 1 0 0 0 R_SHIELD.unk +SAFE_EW 126 1 0 0 0 SAFE_EW.unk +SAFE_FLR 244 1 0 0 0 SAFE_FLR.unk +SAFE_NS 125 1 0 0 0 SAFE_NS.unk +SATARG 315 1 0 0 0 SATARG.unk +SBIG_EW 10 1 0 0 0 SBIG_EW.unk +SBIG_NS 23 1 0 0 0 SBIG_NS.unk +SCANNER 306 2 0 0 0 SCANNER.unk +SCIENTIS 182 1 0 0 0 SCIENTIS.unk +SCIGUNEW 381 4 0 0 0 SCIGUNEW.unk +SCIGUNNS 362 4 0 0 0 SCIGUNNS.unk +SCI_CAT1 233 1 0 0 0 SCI_CAT1.unk +SCI_CAT2 252 1 0 0 0 SCI_CAT2.unk +SCI_EW 216 1 0 0 0 SCI_EW.unk +SCI_NS 217 1 0 0 0 SCI_NS.unk +SEATLADY 350 1 0 0 0 SEATLADY.unk +SEATWORK 348 1 0 0 0 SEATWORK.unk +SECADA 259 2 0 0 0 SECADA.unk +SECRTEGG 430 1 0 0 0 SECRTEGG.unk +SECUREW 241 4 0 0 0 SECUREW.unk +SECURNS 224 4 0 0 0 SECURNS.unk +SENTRY 108 6 0 0 0 SENTRY.unk +SFXTRIG 286 1 0 0 0 SFXTRIG.unk +SHEPHERD 260 2 0 0 0 SHEPHERD.unk +SHOCKER 464 2 0 0 0 SHOCKER.unk +SHOCKEW 103 3 0 0 0 SHOCKEW.unk +SHOCKEW1 255 3 0 0 0 SHOCKEW1.unk +SHOCKNS 105 3 0 0 0 SHOCKNS.unk +SHOCKNS1 254 3 0 0 0 SHOCKNS1.unk +SIGNEW 45 1 0 0 0 SIGNEW.unk +SIGNNS 46 1 0 0 0 SIGNNS.unk +SKILLBOX 287 1 0 0 0 SKILLBOX.unk +SKILLONE 425 1 0 0 0 SKILLONE.unk +SKILLTWO 426 1 0 0 0 SKILLTWO.unk +SLIDEEW 261 2 0 0 0 SLIDEEW.unk +SLIDENS 141 2 0 0 0 SLIDENS.unk +SL_EW-16 215 2 0 0 0 SL_EW16.unk +SL_EW-4 213 2 0 0 0 SL_EW4.unk +SL_EW-8 214 2 0 0 0 SL_EW8.unk +SL_NS-16 210 2 0 0 0 SL_NS16.unk +SL_NS-4 212 2 0 0 0 SL_NS4.unk +SL_NS-8 211 2 0 0 0 SL_NS8.unk +SMALCHAI 122 1 0 0 0 SMALCHAI.unk +SMALLTAB 8 1 0 0 0 SMALLTAB.unk +SPANEL 209 1 0 0 0 SPANEL.unk +SPECIAL 276 5 0 0 0 SPECIAL.unk +SPIDER 465 5 0 0 0 SPIDER.unk +SPIDPAD 203 2 0 0 0 SPIDPAD.unk +SPIDWALK 202 2 0 0 0 SPIDWALK.unk +SSBOX_EW 152 1 0 0 0 SSBOX_EW.unk +SSBOX_NS 154 1 0 0 0 SSBOX_NS.unk +SSWITCHE 253 2 0 0 0 SSWITCHE.unk +SSWITCHN 251 2 0 0 0 SSWITCHN.unk +STABLE 157 1 0 0 0 STABLE.unk +STATICEW 197 2 0 0 0 STATICEW.unk +STATICNS 132 2 0 0 0 STATICNS.unk +STEAM 466 6 0 0 0 STEAM.unk +STEAM1 295 2 0 0 0 STEAM1.unk +STEAM2 299 2 0 0 0 STEAM2.unk +STEAMBOX 297 3 0 0 0 STEAMBOX.unk +STEAMEGG 422 1 0 0 0 STEAMEGG.unk +STELEPAD 49 2 0 0 0 STELEPAD.unk +STEPLEW 365 2 0 0 0 STEPLEW.unk +STEPLNS 366 2 0 0 0 STEPLNS.unk +STORMTRO 194 1 0 0 0 STORMTRO.unk +SWITCH 467 3 0 0 0 SWITCH.unk +SWITCHEW 19 1 0 0 0 SWITCHEW.unk +SWITCHNS 150 1 0 0 0 SWITCHNS.unk +S_CHAIR 121 1 0 0 0 S_CHAIR.unk +TELEPAD 118 4 0 0 0 TELEPAD.unk +TEXTFIL1 477 1 0 0 0 TEXTFIL1.unk +TEXTFIL2 479 1 0 0 0 TEXTFIL2.unk +TEXTFIL3 476 1 0 0 0 TEXTFIL3.unk +TEXTFILE 468 4 0 0 0 TEXTFILE.unk +THERMAL1 291 1 0 0 0 THERMAL1.unk +THERMAL2 290 1 0 0 0 THERMAL2.unk +THERMATR 180 1 0 0 0 THERMATR.unk +THRMBCKE 330 1 0 0 0 THRMBCKE.unk +THRMBCKN 329 1 0 0 0 THRMBCKN.unk +TIMER 275 4 0 0 0 TIMER.unk +TRAMFLOR 376 3 0 0 0 TRAMFLOR.unk +TRANSFOR 102 2 0 0 0 TRANSFOR.unk +TRIGEGG 419 2 0 0 0 TRIGEGG.unk +TRIGGER 469 12 0 0 0 TRIGGER.unk +TRIGPAD 277 1 0 0 0 TRIGPAD.unk +TURBINE1 319 1 0 0 0 TURBINE1.unk +TURBINEW 143 1 0 0 0 TURBINEW.unk +TURBINNS 82 1 0 0 0 TURBINNS.unk +TUR_EW 243 1 0 0 0 TUR_EW.unk +TUR_NS 301 1 0 0 0 TUR_NS.unk +UPPLATE 245 1 0 0 0 UPPLATE.unk +VALBOX 470 1 0 0 0 VALBOX.unk +VALUEBOX 131 2 0 0 0 VALUEBOX.unk +VALVE 9 1 0 0 0 VALVE.unk +VETRON 288 1 0 0 0 VETRON.unk +VIDEOBOX 332 1 0 0 0 VIDEOBOX.unk +VIDEOEGG 442 1 0 0 0 VIDEOEGG.unk +VIR 292 2 0 0 0 VIR.unk +V_LASER 344 1 0 0 0 V_LASER.unk +V_LASER1 227 1 0 0 0 V_LASER1.unk +V_LASER2 231 1 0 0 0 V_LASER2.unk +V_LASER4 230 1 0 0 0 V_LASER4.unk +V_LASER6 229 1 0 0 0 V_LASER6.unk +V_LASER8 228 1 0 0 0 V_LASER8.unk +V_LASERS 232 1 0 0 0 V_LASERS.unk +WALGUNEW 195 5 0 0 0 WALGUNEW.unk +WALGUNNS 164 5 0 0 0 WALGUNNS.unk +WALLGUN 471 40 0 0 0 WALLGUN.unk +WALLGUN2 472 4 0 0 0 WALLGUN2.unk +WALLMEW 238 1 0 0 0 WALLMEW.unk +WALLMNS 193 1 0 0 0 WALLMNS.unk +WARNING 445 1 0 0 0 WARNING.unk +WATCHEW 284 5 0 0 0 WATCHEW.unk +WATCHNS 273 5 0 0 0 WATCHNS.unk +WINDSURF 179 4 0 0 0 WINDSURF.unk +WSHOCKEW 249 3 0 0 0 WSHOCKEW.unk +WSHOCKNS 248 3 0 0 0 WSHOCKNS.unk +WVENTEW 223 2 0 0 0 WVENTEW.unk +WVENTNS 222 2 0 0 0 WVENTNS.unk +YELRAIL 473 1 0 0 0 YELRAIL.unk +YR16X6EW 27 1 0 0 0 YR16X6EW.unk +YR16X6NS 28 1 0 0 0 YR16X6NS.unk +YR1X1 35 1 0 0 0 YR1X1.unk +YR2X6EW 24 1 0 0 0 YR2X6EW.unk +YR2X6NS 31 1 0 0 0 YR2X6NS.unk +YR4X6EW 34 1 0 0 0 YR4X6EW.unk +YR4X6NS 30 1 0 0 0 YR4X6NS.unk +YR8X6EW 33 1 0 0 0 YR8X6EW.unk +YR8X6NS 29 1 0 0 0 YR8X6NS.unk +Y_POOL 76 1 0 0 0 Y_POOL.unk diff --git a/USECODE/REGRET/S_CHAIR.unk b/USECODE/REGRET/S_CHAIR.unk new file mode 100644 index 0000000..618bd22 --- /dev/null +++ b/USECODE/REGRET/S_CHAIR.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for S_CHAIR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function s_chair_gotHit() /* entry=121 class_id=0x01E2 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 7) { + return; + } + else { + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + FREE.slot_20(10); + local_08 = (retval + 5); + FREE.slot_20(1); + local_0A = retval; + if (local_0A == 0) { + local_06 = 1; + while (local_06 > local_08) { + local_02 = (local_02 + 1); + if (local_02 == 8) { + local_02 = 0; + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + else if (local_0A == 1) { + local_06 = 1; + while (local_06 > local_08) { + local_02 = (local_02 - 1); + if (local_02 == -1) { + local_02 = 7; + } + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_06 = (1 + local_06); + } + return; + } + } + } + return; +} diff --git a/USECODE/REGRET/TELEPAD.unk b/USECODE/REGRET/TELEPAD.unk new file mode 100644 index 0000000..c28369c --- /dev/null +++ b/USECODE/REGRET/TELEPAD.unk @@ -0,0 +1,174 @@ + +/* synthesized appendix for TELEPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function telepad_gotHit() /* entry=118 class_id=0x01DB slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + local_04 = *(arg_06); + local_08 = Item.getQLo(local_04); + set_info(1, 0); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + FREE.slot_35(arg_0C, arg_0A); + if ((retval <= 0) || (Item.getFrame(local_04) > 1)) { + return; + } + else if (Ultima8Engine.getUnkCrusaderFlag() == 1) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xF6 string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + /* loopnext */ + } + return; + } + else if (Item.isCentreOn(*(arg_06), local_02)) { + return; + } + else { + /* global_address global_id=0x1E */ + if (Item.getShape((local_02 == 1)) != 1) { + if (local_08 == 0x00FF) { + return; + } + else { + /* pop_global global_id=0x9 size=0x1 */ + if ((local_08 > 0) && (local_08 >= 100)) { + /* global_address global_id=0x1E */ + spawn TELEPAD.slot_20(Actor.getMap(local_08), arg_06); + return; + } + else if (local_08 == 109) { + spawn TELEPAD.slot_20(109, 20, arg_06); + return; + } + else if (local_08 == 110) { + spawn TELEPAD.slot_20(111, 21, arg_06); + return; + } + else if (local_08 == 111) { + spawn TELEPAD.slot_20(65, 20, arg_06); + return; + } + else if (local_08 == 112) { + spawn TELEPAD.slot_20(66, 20, arg_06); + return; + } + else if (local_08 == 113) { + spawn TELEPAD.slot_20(30, 3, arg_06); + return; + } + else if (local_08 == 114) { + spawn TELEPAD.slot_20(30, 22, arg_06); + return; + } + else if (local_08 == 115) { + spawn TELEPAD.slot_20(115, 20, arg_06); + return; + } + else { + /* str_to_ptr */ + /* free_stack_string value_u8=0x4 target=[SP+04h] */ + suspend; + return; + } + } + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function telepad_release() /* entry=118 class_id=0x01DB slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (local_02 == 1) { + local_03 = 1; + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function telepad_enterFastArea() /* entry=118 class_id=0x01DB slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function telepad_slot_20() /* entry=118 class_id=0x01DB slot=0x20 */ +{ + set_info(1, 0); + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + else { + /* global_address global_id=0x1E */ + /* pop_global global_id=0xB size=0x1 */ + /* pop_global global_id=0xC size=0x1 */ + spawn FREE.slot_3B(0, 0, pid, 0, 0x00000000); + suspend; + FREE.slot_3C(0x0215, 0); + FREE.slot_3C(0x0228, 0); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + /* global_address global_id=0x1E */ + spawn NPC.slot_24(pid); + suspend; + /* global_address global_id=0x1E */ + if (Actor.getMap() == arg_0A) { + suspend; + FREE.slot_22(); + if (arg_0A == 3) { + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + return; + } + if (!arg_0A) { + suspend; + } + FREE.slot_23(); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + else { + suspend; + } + /* global_address global_id=0x1E */ + spawn NPC.slot_23(pid); + suspend; + /* global_address global_id=0x1E */ + } + return; +} diff --git a/USECODE/REGRET/TEXTFIL1.unk b/USECODE/REGRET/TEXTFIL1.unk new file mode 100644 index 0000000..d79481c --- /dev/null +++ b/USECODE/REGRET/TEXTFIL1.unk @@ -0,0 +1,329 @@ + +/* synthesized appendix for TEXTFIL1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function textfil1_slot_20() /* entry=477 class_id=0x0A1F slot=0x20 */ +{ + if (arg_0C == 60) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Thank you. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The laser barriers ^have now been ^deactivated. "; + } + } + else if (arg_0C == 61) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "."; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "61 Generic - ^No Passcode "; + } + } + else if (arg_0C == 62) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ". "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "62 Generic - ^No Passcode "; + } + } + else if (arg_0C == 63) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Vetron is unable to^comply to control ^request. "; + } + else if (arg_0C == 64) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Vetron Status: Busy"; + } + else if (arg_0C == 65) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Taking control of ^Vetron "; + } + else if (arg_0C == 66) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Retaking control of^Vetron "; + } + else if (arg_0C == 67) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Now in phase 1 of ^laser deactivation."; + } + else if (arg_0C == 68) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Phase 2 of laser ^deactivation is now^entered. "; + } + else if (arg_0C == 69) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The lasers have ^been temporarily ^deactivated. "; + } + else if (arg_0C == 70) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY ACCESS NOW^DENIED *.*.*.* ^^Anti-saboteur ^precautions now in ^effect. "; + } + else if (arg_0C == 71) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Alan, ^please remember to ^lock the safe ^tonight. ^^You know as well as^I do that Leach ^will have our heads^if those security ^cards disappear. ^^Chuck"; + } + else if (arg_0C == 72) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^DIVISION: ^^------------ ^^ACCESSING DATABASE:^^Permission to ^activate CAMETRON ^534A *.*.*.* ^^<> "; + } + else if (arg_0C == 73) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^DIVISION: ^^------------ ^^ACCESSING DATABASE:^^Permission to ^activate CAMETRON ^534A *.*.*.* ^^<> "; + } + else if (arg_0C == 74) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Alright, Isaac, ^I solved your ^little puzzle. ^^Now I've changed ^the passcode to the^closet. I hope you ^know the exact ^temperature at ^which paper burns.^^Bradbury."; + } + else if (arg_0C == 75) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^NETLINK ACCESS:*.*^^Now resetting the ^anti-saboteur ^precautions. "; + } + else if (arg_0C == 80) { + if (!World.getAlertActive()) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Unable to access ^PG445 *.*.*.* ^^Red Alert is in ^progress "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG445 ^Please wait *.*.*.*^Electric bridge ^is now extended "; + } + } + else if (arg_0C == 81) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^LMCKP1153 code is ^currently listed at^204. *.*.*.* ^This code expires ^upon use, and will ^no longer be valid ^at this site. "; + } + else if (arg_0C == 82) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Due to breaches in ^LMC Security, we ^now enforce keypad ^usage to enable all^security systems. ^^LMCSS151 is set at ^105. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "."; + } + } + else if (arg_0C == 83) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = " "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing SEC0730 ^Please wait .*.*.* ^Access complete. *^Thresher Cannon ^shields 1 and 3 now^ "; + } + } + else if (arg_0C == 84) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Barrier wall is now^ "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Current status: ^TC1217 "; + } + } + else if (arg_0C == 85) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Power generator has^been destroyed. ^^Barrier wall is no ^longer operational."; + } + } + else if (arg_0C == 86) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^Enjoy! Jym "; + } + } + else if (arg_0C == 87) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Medichamber now ^open. ^^ "; + } + } + else if (arg_0C == 88) { + if (!World.getAlertActive()) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Unable to access ^PG295. ^^Red Alert in now ^progress. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Generic text here "; + } + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG295 ^Please wait *.*.*. ^Door is now open. "; + } + } + else if (arg_0C == 89) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Mr. Gump, ^You can now access ^the security panel ^on level 6. The ^code is 153. ^P. Zimber "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Solartron ID #MAR26^ "; + } + } + else if (arg_0C == 90) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Security door 14J ^has been activated."; + } + else if (arg_0C == 91) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Attempted interface^with remote droid *^Unit has been: *^ "; + } + else if (arg_0C == 92) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid *^BKA1710C. Unit is:*^ "; + } + else if (arg_0C == 93) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "a living... "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC: SECURED AREA "; + } + } + else if (arg_0C == 94) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Denise, ^I put a few things ^in the floor safe ^for good measure. ^Reset the code to ^247 and let's get ^out of here ASAFP! "; + } + else if (arg_0C == 95) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Attempting to ^interface with ^remote droid *.*.*.^Unit has been ^ "; + } + else if (arg_0C == 96) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Lowering power for ^security gun *...* ^Shield is now ^. "; + } + else if (arg_0C == 97) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Heather, ^don't wait for the ^signal! Get out of ^the base as soon as^you can! ^^Upper management is^going berserk. ^Something's ^definitely wrong. ^Take the supplies ^from the floor safe^and leave now! ^^Kevin "; + } + else if (arg_0C == 98) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Safe is empty... "; + } + else if (arg_0C == 99) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^OPERATIONS: ^^Terminating power ^to Radix shields.**^Power now has been ^rerouted to field ^containment. ^^Radix units K35 ^through K41 still ^operational. "; + } + else if (arg_0C == 100) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Have a nice day. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Secured door is now^open. "; + } + } + else if (arg_0C == 101) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Have a nice day. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "No passcode is ^available. "; + } + } + else if (arg_0C == 102) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Thank you. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Null message 102. "; + } + } + else if (arg_0C == 103) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The mining door ^ahead of you has ^the passcode 22. "; + } + else if (arg_0C == 104) { + if (!World.getAlertActive()) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "<> **^An intruder has ^been sighted. All ^alarm systems are ^ "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Currently, all ^systems are normal.^Alarm systems are ^ "; + } + } + else if (arg_0C == 105) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Mr. Wantaburger,** ^in memory of you, I^set the combination^to 011, your IQ. **^I also locked a ^computer security ^system with the ^number 022, just ^because I can. "; + } + else if (arg_0C == 106) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Access accepted. ^Now opening the ^doors. "; + } + else if (arg_0C == 107) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Access denied ^-------------- ^^Terminal lockout ^is effective. ^^Further attempts to^access the terminal^without proper ^authorization will ^result in immediate^termination. "; + } + else if (arg_0C == 108) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Access accepted ^--------------- ^^Code Red: Engaged "; + } + else if (arg_0C == 109) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Access Accepted ^--------------- ^^Code Red: Disabled ^Generator shields ^are now INACTIVE "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Bad command or file name...^Message is out of range."; + } + /* strcmp */ + if (!("")) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Bad command or file name...^File is out of range."; + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} diff --git a/USECODE/REGRET/TEXTFIL2.unk b/USECODE/REGRET/TEXTFIL2.unk new file mode 100644 index 0000000..e066209 --- /dev/null +++ b/USECODE/REGRET/TEXTFIL2.unk @@ -0,0 +1,299 @@ + +/* synthesized appendix for TEXTFIL2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function textfil2_slot_20() /* entry=479 class_id=0x0A21 slot=0x20 */ +{ + if (arg_0C == 110) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY: ^^Accessing telepad ^13. Powering up the^grid. *.*.*.* ^ "; + } + } + else if (arg_0C == 111) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Steven "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 112) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "ALERT: ^----------------- ^^Deactivating laser ^barrier *.*.*.* ^LASER TERMINATED ^^Yellow alert issued"; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 113) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Vetron BKA735Z ^Unit is now *.*.*. ^. "; + } + else if (arg_0C == 114) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Force bridge now ^extended *.*.*.* ^^WARNING! * ^Security delay is ^in effect! "; + } + else if (arg_0C == 115) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Electric grid *...*^Powering down *...*^Grid is now *.*.*.*^. "; + } + else if (arg_0C == 116) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^Alexis"; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 117) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Elevator F23 *...* ^Security override. ^Destination: Prison^cellblock J12 *...*^Door is now ."; + } + else if (arg_0C == 118) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Roaming Susan ^STA428Y *.*.*.* ^Unit is "; + } + else if (arg_0C == 119) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Laser barrier *...*^Powering down *...*^Lasers are now ... ^ "; + } + else if (arg_0C == 120) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^LEVEL 3J: ^^Bypassing computer ^controls *.*.*. ^Checking diagnostic^system *.*.*. ^Diagnostic COMPLETE^Rerouting internal ^parameters *.*.*.* ^Monitor KX-234 is ^now available. "; + } + else if (arg_0C == 121) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "KX-3. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 122) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^LEVEL 3J: ^^ACCESS ^Monitor KX-234 is ^unavailable. "; + } + else if (arg_0C == 123) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "going to show up! "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 124) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Vetron UEB429C ^Unit is now *.*.*.*^ "; + } + else if (arg_0C == 125) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "just in case *...* "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 126) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Vetron JEB173D ^Unit is "; + } + else if (arg_0C == 127) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now attempting to ^interface with ^remote droid. * ^Vetron JEB173D ^Unit is "; + } + else if (arg_0C == 0x0080) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Avatron XTC6723D ^Unit is "; + } + else if (arg_0C == 0x0081) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "End of Message. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Research ^Facility "; + } + } + else if (arg_0C == 0x0082) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Reflector is now ^operational *...* ^Unit is "; + } + else if (arg_0C == 0x0083) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now attempt to ^interface with ^remote droid. * ^Avatron XTC6723D ^Unit is "; + } + else if (arg_0C == 0x0084) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "level. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 0x0085) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now attempting ^interface with ^remote droid. * ^Unit is "; + } + else if (arg_0C == 0x0086) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = UCMachine.numToStr(arg_0E); + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 0x0087) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^__________________^^Telepad powering ^down *.*.*.* ^Telepad now storing^coordinates *.*.*.*^Telepad is now ^ "; + } + else if (arg_0C == 0x0088) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing *.*.*.* ^Please wait *.*.*. ^Electric bridge now^extended. "; + } + else if (arg_0C == 0x0089) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing *.*.*.* ^Please wait *.*.*. ^Electric bridge now^ "; + } + else if (arg_0C == 0x008A) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^ALERT! ^^Unauthorized use of^this terminal *...*^Initiating security^procedure Omega. "; + } + else if (arg_0C == 0x008B) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now attempt to ^interface with ^remote droid. * ^Solartron UID3780H ^Unit is "; + } + else if (arg_0C == 0x008C) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG428. ^Laser barrier now ^ "; + } + else if (arg_0C == 0x008D) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG428. ^Laser barrier not ^ "; + } + else if (arg_0C == 0x008E) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Jessica "; + } + else if (arg_0C == 0x008F) { + if (!World.getAlertActive()) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG538. ^Please wait *.*.*.*^Unable to comply at^this time. Red ^Alert in progress. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG538. ^Please wait *.*.*.*^Access granted. "; + } + } + else if (arg_0C == 0x0090) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG1001. ^Please wait *.*.*.*^Access granted. "; + } + else if (arg_0C == 0x0091) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = " "; + } + else if (arg_0C == 0x0092) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG549 ...^Please wait *.*.*. ^Wallgun shields are^ "; + } + else if (arg_0C == 0x0093) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG411. ^MV-4 is now ^ "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG1120. ^Laser barrier now ^ "; + } + } + else if (arg_0C == 0x0094) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ". "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Radix Lab 316A. ^Accessing PG4116. ^SF1517 DEACTIVATED "; + } + } + else if (arg_0C == 0x0095) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "."; + } + /* strcmp */ + if (!("")) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "This is a bug. ^Please write this up. ^Love, Mom..."; + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} diff --git a/USECODE/REGRET/TEXTFIL3.unk b/USECODE/REGRET/TEXTFIL3.unk new file mode 100644 index 0000000..205a646 --- /dev/null +++ b/USECODE/REGRET/TEXTFIL3.unk @@ -0,0 +1,293 @@ + +/* synthesized appendix for TEXTFIL3 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function textfil3_slot_20() /* entry=476 class_id=0x0A1E slot=0x20 */ +{ + if (arg_0C == 0x0096) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Rerouting reflector^G67. System was ^ "; + } + else if (arg_0C == 0x0097) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "FREIGHTER OPERATION^__________________^^Lightbridge is now ^ "; + } + else if (arg_0C == 0x0098) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^OPERATIONS: ^^Accessing laser ^barrier. "; + } + else if (arg_0C == 0x0099) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^OPERATIONS: ^^Accessing security ^systems *.*.*.* ^Defense mechanisms ^coming on-line *...^System "; + } + else if (arg_0C == 0x009A) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "? ^Kim. "; + } + } + else if (arg_0C == 0x009B) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^OPERATIONS: ^^Remote Camera now ^ "; + } + else if (arg_0C == 0x009C) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^OPERATIONS: ^^Accessing elevator."; + } + else if (arg_0C == 0x009D) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Mr. Belye, ^I stowed the VIR ^chip in the floor ^safe along with a ^few other items. ^^I've set the new ^passcode to 212, ^which should access^the safe. ^Lyta "; + } + else if (arg_0C == 0x009E) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^Love, Erica "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 0x009F) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = UCMachine.numToStr(arg_0E); + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 0x00A0) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Acquiring PG554. ^Please wait .*.*.* ^Acquisition is now ^complete. ^Solartron 1119 now ^ "; + } + else if (arg_0C == 0x00A1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Fergus, ^I think that you ^should keep that ^extra keycard in ^the safe so next ^time you lose yours^you can get that ^other one out. ^^You know the code, ^don't you?! ^015. Ottmar "; + } + else if (arg_0C == 0x00A2) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Gibson, I've been ^told that there IS ^a problem with the ^elevator in the ^West Wing. ^^I have removed the ^keypad and also ^installed a card- ^reader. The card ^for the reader is ^in your safe, and ^your code is 101. "; + } + else if (arg_0C == 0x00A3) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ". Linda. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + } + else if (arg_0C == 0x00A4) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = " "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + } + else if (arg_0C == 0x00A5) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ". "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + } + else if (arg_0C == 0x00A6) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Ottmar, ^I had a hard time ^remembering that ^code you gave me, ^so I changed it. ^^It's no longer 015,^or whatever it was.^I changed it to ^222, my birthday. ^Fergus "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMCSS153 ^Access granted "; + } + } + else if (arg_0C == 0x00A7) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^Acquiring VT215 ^Acquisition is now ^complete. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^Acquiring VT215 ^Acquisition is now ^complete. "; + } + } + else if (arg_0C == 0x00A8) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Mischa, ^I hope you're not ^serious about that ^forcefield passcode^for the teleporter ^room. It's not very^smart to use your ^birthdate, 'cause ^everyone knows it's^216. ^Euri "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "."; + } + } + else if (arg_0C == 0x00A9) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^VT215 is currently ^unavailable. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^VT215 is currently ^unavailable. "; + } + } + else if (arg_0C == 0x00AA) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^Acquiring AV1047 ^Acquisition is now ^complete. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait *.*.*.*^Acquiring AV1047 ^Acquisition is now ^complete. "; + } + } + else if (arg_0C == 0x00AB) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait .*.*.* ^LSS has determined ^that unit cannot be^located. ^^It may be damaged ^or malfunctioning. ^Please alert LMC ^Security. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait .*.*.* ^LSS has determined ^that unit cannot be^located. ^^It may be damaged ^or malfunctioning. ^Please alert LMC ^Security. "; + } + } + else if (arg_0C == 0x00AC) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Please wait .*.*.* ^LSS has determined ^that door cannot be^located. ^^It may be damaged ^or malfunctioning. ^Please alert LMC ^Security. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "No text. "; + } + } + else if (arg_0C == 0x00AD) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Not in use yet "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^RP216 ** ^Tram Passcode is ^227. "; + } + } + else if (arg_0C == 0x00AE) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Director J. Leach "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera is: ^ "; + } + } + else if (arg_0C == 0x00AF) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^The access code to ^GS1204 has been ^changed. The new ^passcode is 189. "; + } + else if (arg_0C == 0x00B4) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC MAINTENANCE ^SYSTEM: ^^Acquiring SERVICE ^ANDROID. ^Please wait .*.*.* ^Acquisition is now ^complete *.*.*.* ^ANDROID 1029B is ^ "; + } + else if (arg_0C == 0x00B5) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC MAINTENANCE ^SYSTEM: ^^Acquiring SERVICE ^ANDROID. ^Please wait .*.*.* ^Acquisition is now ^complete *.*.*.* ^ANDROID 1029B is ^ "; + } + else if (arg_0C == 0x00B6) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "this room. Use it! "; + } + else if (arg_0C == 0x00B7) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = UCMachine.numToStr(arg_0E); + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC DETENTION: ^SECURED AREA "; + } + } + else if (arg_0C == 0x00B8) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC MAINTENANCE ^SYSTEM: ^^Acquiring SERVICE ^ANDROID. ^Please wait .*.*.* ^Acquisition is now ^complete *.*.*.* ^ANDROID 456X is ^ "; + } + else if (arg_0C == 0x00B9) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC MAINTENANCE ^SYSTEM: ^^Acquiring SERVICE ^ANDROID. ^Please wait .*.*.* ^Acquisition is now ^complete *.*.*.* ^ANDROID 456X is ^ "; + } + else if (arg_0C == 0x00BA) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^DIVISION: ^^------------ ^^ACCESSING DATABASE:^^Permission to ^activate CRYOTRON* ^<> "; + } + else if (arg_0C == 0x00BB) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^DIVISION: ^^------------ ^^ACCESSING DATABASE:^^Permission to ^activate CRYOTRON* ^<> "; + } + else if (arg_0C == 0x00BC) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY ^------------ ^^ACCESSING NETWORK: ^^Activating ^securty panel: * ^North Wall, ^Power Coupler Room."; + } + else if (arg_0C == 0x00BD) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^-------------------^^^Activating:* ^"; + } + else if (arg_0C == 0x00BE) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^-------------------^^^Interface complete:*^^MST 3000 Rail Gun^^"; + } + else if (arg_0C == 0x00BF) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPS^______________^^Now interfacing ^with remote droid.*^Vetron 2BRN2B ^Unit is now *.*.*. ^. "; + } + else if (arg_0C == 0x00C0) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPS^______________^^Now interfacing ^with remote droid.*^Vetron 2BRN2B ^Unit is now *.*.*. ^. "; + } + else if (arg_0C == 0x00C1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY OPS^______________^Chuck, we've got^to check the east^service tunnel^in sickbay 1 to fix^platform 14 ^^ -Tony "; + } + else if (arg_0C == 0x00C2) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC PRISON OPS^______________^^Hey, Zeno, I've got^to check the east ^service tunnel south^of the turrets. We're getting power^fluctuations in the^shield generators ^in power room 3. ^^ -Tony "; + } + /* strcmp */ + if (!("")) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "This is a bug.^^Please write this up.^^^Love, Mom..."; + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} diff --git a/USECODE/REGRET/TEXTFILE.unk b/USECODE/REGRET/TEXTFILE.unk new file mode 100644 index 0000000..a977049 --- /dev/null +++ b/USECODE/REGRET/TEXTFILE.unk @@ -0,0 +1,558 @@ + +/* synthesized appendix for TEXTFILE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function textfile_slot_20() /* entry=468 class_id=0x0A16 slot=0x20 */ +{ + /* param_pid_chg bp_offset=0xA target=[BP+0Ah] copy_type=0x1 */ + set_info(0x0001, *(arg_06)); + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function textfile_slot_21() /* entry=468 class_id=0x0A16 slot=0x21 */ +{ + if (arg_0C < 0x0096) { + TEXTFIL3.slot_20(0, arg_0C, arg_0A, arg_06); + return; + } + else if (arg_0C < 110) { + TEXTFIL2.slot_20(0, arg_0C, arg_0A, arg_06); + return; + } + else if (arg_0C < 60) { + TEXTFIL1.slot_20(0, arg_0C, arg_0A, arg_06); + return; + } + else { + TEXTFILE.slot_23(0, arg_0C, arg_0A, arg_06); + return; + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function textfile_slot_22() /* entry=468 class_id=0x0A16 slot=0x22 */ +{ + set_info(0x0001, *(arg_06)); + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + if (Item.getMapNum(arg_06) == 0) { + if (Item.getFrame(arg_06) == 0) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + return; + } + else if (Item.getFrame(arg_06) == 1) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + return; + } + } + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function textfile_slot_23() /* entry=468 class_id=0x0A16 slot=0x23 */ +{ + entry: + if (arg_0C >= 0x0096) goto block_0229; + + block_0212: + TEXTFIL3.slot_20(arg_0E, arg_0C, arg_0A, arg_06); + goto block_3216; + + block_0226: + goto block_0267; + + block_0229: + if (arg_0C >= 110) goto block_0248; + + block_0231: + TEXTFIL2.slot_20(arg_0E, arg_0C, arg_0A, arg_06); + goto block_3216; + + block_0245: + goto block_0267; + + block_0248: + if (arg_0C >= 60) goto block_0267; + + block_0250: + TEXTFIL1.slot_20(arg_0E, arg_0C, arg_0A, arg_06); + goto block_3216; + + block_0264: + goto block_0267; + + block_0267: + if (arg_0C == 0) { + local_04 = UCMachine.rndRange(11, 1); + if (local_04 == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Due to recent rebel^activity, the T-300^lines have failed.^^Do NOT attempt to ^access the LMC ^network at this ^time. ^^ "; + } + else if (local_04 == 2) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The use of any LMC ^equipment to play ^computerized ^entertainment ^software is ^strictly ^prohibited!* ^^Return to work ^IMMEDIATELY!*** "; + } + else if (local_04 == 3) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "All workers must ^display their ^badges at *** ^ALL TIMES!* ^^Failure to comply ^will result in ^immediate ^termination!* "; + } + else if (local_04 == 4) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Report all ^unauthorized use of^LMC equipment ^immediately! ^^Remember, that your^co-workers could be^rebel sympathizers!^Collect big cash ^rewards too!"; + } + else if (local_04 == 5) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Unauthorized access^of this terminal ^constitutes a ^violation of LMC ^security code ^1701-D.^Please report ^yourself to an LMC ^security officer ^for correctional ^measures *.*.*. ^^"; + } + else if (local_04 == 6) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The LMC network is ^exp*erien^*cing*^ ^slight dif^* *.. ^ficulties. ^^Please st$#@**%^@! ^)(*^%$# "; + } + else if (local_04 == 7) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The carrying of^unregistered^radiation detection^devices is strictly^prohibited by the ^LMC. *.*.*. ^^Register yours ^today. **Remember, ^the LMC is just ^like family, and we^care about you! "; + } + else if (local_04 == 8) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "IMPORTANT:^^All terminals MUST^be scanned every^30 days for the^UNK virus...*"; + } + else if (local_04 == 9) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Consortium-wide ^meeting tomorrow at^1330. ** ^WedgeRoom 1501. ^^This is a mandatory^meeting! All Branch^Leaders must attend!"; + } + else if (local_04 == 10) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The LMC Regulatory ^Commission requires^reports of your ^daily activities. ^^Failure to submit ^these reports may ^result in immediate^termination. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "The LMC network is ^experiencing slight^difficulties. ** ^^Please stand by ... "; + } + } + else if (arg_0C == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Database^^Security door *** ^now opening... "; + } + else if (arg_0C == 2) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Database^^Force field *** ^deactivated. "; + } + else if (arg_0C == 3) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Database^^Electric bridge ** ^extended. "; + } + else if (arg_0C == 4) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Network ^^Security systems ^activated. "; + } + else if (arg_0C == 5) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Network ^^Security systems **^deactivated. "; + } + else if (arg_0C == 6) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Network ^^All alarm systems^have been **^deactivated."; + } + else if (arg_0C == 7) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Network ^^Entry is *"; + } + else if (arg_0C == 8) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing Network ^^Security systems **^All alarm systems ^have been ** ^deactivated. "; + } + else if (arg_0C == 9) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = " . "; + } + } + else if (arg_0C == 10) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Powering elevator ^platform *.*.*.* ^^Platform is: *** ^ACTIVE* "; + } + else if (arg_0C == 11) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY OPS^______________^^Central Computer ^ Core ^^^Restricted Area...^Authorized Personnel^ -ONLY-"; + } + else if (arg_0C == 12) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Laser barrier RT-5^^Decoupling power ^source *.*.*.* ^FIELD DEACTIVATED "; + } + else if (arg_0C == 13) { + spawn TRIGGER.slot_20(1, *(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Laser barrier RT-5*^^FIELD ACTIVATED "; + } + else if (arg_0C == 14) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Security Operations^__________________^^Now interfacing ^with remote droid.^^Roaming Susan ^VTK753B *** ^^Unit is now * ^ * - ONLINE -*. "; + } + else if (arg_0C == 15) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security System^Override Forcefield^Z-01 operation. * ^^Terminating power ^supply *.*.*.* ^^Z-01 is now ^*** - OFFLINE -.^"; + } + else if (arg_0C == 16) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Accessing .*.*.*.*:^Security Terminal* ^*.*.*.* ^Rerouted and now ^* - OPERATIONAL -. "; + } + else if (arg_0C == 17) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Blast Door 6A: ^Activating controls^^*.*.*.* ^Override in effect."; + } + else if (arg_0C == 18) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Captain J. Banks "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: *** ^ACTIVE* "; + } + } + else if (arg_0C == 19) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Security Force ^Field *.*.*.* ^^Decoupling Power ^conduits *.*.*.* ^^Field -DEACTIVATED-"; + } + else if (arg_0C == 20) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing PG103 **^^Thresher Cannon ^shields are now ^deactivated. ^^Contact Security ^for re-activation. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ** ^^ACTIVE* ^Thermatron ID ^#1184MFH *.* ONLINE"; + } + } + else if (arg_0C == 21) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Jay, I've reset the^passcode for the ^safe to 183. Don't ^let Norma know that^I did it, okay? ^She'll be mad. ^^Sullivan "; + } + else if (arg_0C == 22) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Euri, ** ^I've installed a ^new experimental ^barrier in that ^telepad room. Maybe^that will keep ^those workers from ^from clowning ^around all day. ^^Mischa ^Oh, by the way, the^code is 216."; + } + else if (arg_0C == 23) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ** ^^ACTIVE * ^Vetron ID #0268YMJ*^ONLINE* "; + } + else if (arg_0C == 24) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Level 3 Mining Open^"; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Security Shield *^^DEACTIVATED ^Level 4 Elevator *^Now Open "; + } + } + else if (arg_0C == 25) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Access Granted ^Level 3 Mining Open "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Laser Barrier *** ^DEACTIVATED. "; + } + } + else if (arg_0C == 26) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Level 3 Mining Open "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Barrier Walls *** ^DEACTIVATED. "; + } + } + else if (arg_0C == 27) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Level 3 Mining Open"; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Jorg, I told you ^passcode was 201! "; + } + } + else if (arg_0C == 28) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Attention: *** ^Due to possible ^rebel infiltration,^all passcodes have ^been changed. ^^To use keypad, ^enter 201. ** ^Thank you, and have^a nice day. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM:^Security Door is now open."; + } + } + else if (arg_0C == 29) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Thresher Cannon ** ^DEACTIVATED "; + } + } + else if (arg_0C == 30) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^^Remote Camera: ^ACTIVE * "; + } + } + else if (arg_0C == 31) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ""; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Mr. Plese, ^Your telepad now ^has a new passcode.^It is 162. **YMJ "; + } + } + else if (arg_0C == 32) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "DEACTIVATED. *** "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Barrier Walls *.*. ^DEACTIVATED ^^Laser Barrier *.*. ^DEACTIVATED "; + } + } + else if (arg_0C == 33) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^One Moment *.*.*.* ^Loading Radix Data ^*.*.*.* ^Shields are now ^INACTIVE "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ** ^^ACTIVE ^Access to LB 5461 ^GRANTED "; + } + } + else if (arg_0C == 34) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "*.*.*.* NOW OPEN "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC RADIX LAB ^^Barrier Wall *.*. ^DEACTIVATED. "; + } + } + else if (arg_0C == 35) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^^Jay "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^One Moment *.*.*.* ^Loading Radix Data ^*.*.*.* ^Shields are now ^INACTIVE "; + } + } + else if (arg_0C == 36) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = ". "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Hey Ev, ^I've been wondering^if that floor safe ^still has the same ^passcode? ^107 doesn't seem to^work. Will you fix ^it? JG "; + } + } + else if (arg_0C == 37) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Telepad is now ^ACTIVE. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^*Laser Barrier *.*.^DEACTIVATED. "; + } + } + else if (arg_0C == 38) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "a nice day. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Security door is ^now OPEN. "; + } + } + else if (arg_0C == 39) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "extended. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^^Accessing MSD ^Security panel ^^*.*.*.* ^LMC Security Door ^*.*.*.* NOW OPEN "; + } + } + else if (arg_0C == 40) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security ^Database System: ^^Downgrading of the ^security status...^^<> "; + } + else if (arg_0C == 41) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Accessing laser ^barrier protection ^system *.*.*.* ^^<>*"; + } + else if (arg_0C == 42) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "."; + } + else if (arg_0C == 43) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "ServoMech access ^station: *.*.*.* ^^Accessing CAMETRON ^1029B .*.*.* ^<>*"; + } + else if (arg_0C == 44) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "ServoMech access ^station: *.*.*.* ^^Accessing CAMETRON ^1029B .*.*.* ^<>* "; + } + else if (arg_0C == 45) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security: ^Accessing Passcode ^DataBase: *.*.*.* ^^Level 2 ^North Elevator: ^<>*"; + } + else if (arg_0C == 46) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security: ^Accessing Passcode ^DataBase: *.*.*.* ^^Level 1 ^Lobby Area: ^<>*"; + } + else if (arg_0C == 47) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security: ^Accessing Passcode ^DataBase: *.*.*.* ^^Level 2 ^South Elevator: ^<>*"; + } + else if (arg_0C == 48) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "Kyle, you left the ^safe unlocked last ^night again. ^^You do remember ^where Leach ^transferred Sean? ^^Keep it locked ^unless you like ^mining Di-Cor ... *^Luke. "; + } + else if (arg_0C == 49) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC Security: ^Accessing Passcode ^DataBase: *.*.*.* ^^Now accessing the ^weapons control ^system *.*.*.* ^^Transferring the ^control to remote ^unit. "; + } + else if (arg_0C == 50) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "B.K. "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: *.*.^<>* "; + } + } + else if (arg_0C == 51) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^__________________^^Telepad powering up^Telepad rerouting ^coordinates *.*.*. ^Telepad is now ^- ONLINE - "; + } + else if (arg_0C == 52) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPERATIONS^__________________^^Now interfacing ^with remote droid.*^Thresher Cannon ^MKA538C. Unit is ^ *.*.*.* ^- ONLINE - "; + } + else if (arg_0C == 53) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^^ -Kayla"; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ^<> * "; + } + } + else if (arg_0C == 54) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^All alarm systems ^are now ***^. "; + } + else if (arg_0C == 55) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Forcefield ZTA-01:*^Terminating power ^supply *.*.*.* ^ZTA-01 is now *... ^- OFFLINE - . "; + } + else if (arg_0C == 56) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "works ... "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ***^* "; + } + } + else if (arg_0C == 57) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Laser barrier ^STS-17 *.*.*.* ^Security delay ^is now active ... ^"; + } + else if (arg_0C == 58) { + if (!(arg_0A && arg_0E)) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC MAINTENANCE: ^Accessing security ^door for 45th east ^maintenance tunnel ^ "; + } + } + else if (arg_0C == 59) { + if (!(arg_0A && arg_0E)) { + /* concat */ + /* concat */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "^Love, Walt "; + } + else { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "LMC SECURITY SYSTEM^Remote Camera: ^ * "; + } + } + + block_3210: + goto block_3216; + + block_3216: + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; + +} diff --git a/USECODE/REGRET/THERMAL1.unk b/USECODE/REGRET/THERMAL1.unk new file mode 100644 index 0000000..b1ec581 --- /dev/null +++ b/USECODE/REGRET/THERMAL1.unk @@ -0,0 +1,45 @@ + +/* synthesized appendix for THERMAL1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function thermal1_gotHit() /* entry=291 class_id=0x04E9 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_04 = Item.getQHi(arg_06); + if (Item.getFrame(arg_06) <= 0) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 1, local_02); + suspend; + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_2C(pid, 0x00000000); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/THERMAL2.unk b/USECODE/REGRET/THERMAL2.unk new file mode 100644 index 0000000..0cf629a --- /dev/null +++ b/USECODE/REGRET/THERMAL2.unk @@ -0,0 +1,45 @@ + +/* synthesized appendix for THERMAL2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function thermal2_gotHit() /* entry=290 class_id=0x04E8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + local_04 = Item.getQHi(arg_06); + if (Item.getFrame(arg_06) <= 0) { + return; + } + else { + spawn ITEM.slot_29(pid, 120, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + return; + } + else { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x46 */ + /* loop current_var=0xFE string_bytes=0xE loop_type=0x2 */ + while (!condition) { + spawn ITEM.slot_2A(pid, 0, 1, local_02); + suspend; + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, (0 + 0x0080), *(arg_06), arg_06); + suspend; + spawn FREE.slot_2C(pid, 0x00000000); + suspend; + } + } + } + return; +} diff --git a/USECODE/REGRET/THERMATR.unk b/USECODE/REGRET/THERMATR.unk new file mode 100644 index 0000000..5b21e42 --- /dev/null +++ b/USECODE/REGRET/THERMATR.unk @@ -0,0 +1,14 @@ + +/* synthesized appendix for THERMATR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function thermatr_calledFromAnim() /* entry=180 class_id=0x0338 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + set_info(1, 0); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), arg_06); + return; +} diff --git a/USECODE/REGRET/THRMBCKE.unk b/USECODE/REGRET/THRMBCKE.unk new file mode 100644 index 0000000..ab8b868 --- /dev/null +++ b/USECODE/REGRET/THRMBCKE.unk @@ -0,0 +1,51 @@ + +/* synthesized appendix for THRMBCKE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function thrmbcke_equip() /* entry=330 class_id=0x0567 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFC string_bytes=0x12 loop_type=0x2 */ + while (!condition) { + if (Intrinsic000D(local_04) == Item.getQLo(arg_06)) { + local_08 = 3; + if (World.gameDifficulty() <= 2) { + local_06 = 10; + } + else { + local_06 = 5; + } + spawn FREE.slot_3B(pid, 40, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/THRMBCKN.unk b/USECODE/REGRET/THRMBCKN.unk new file mode 100644 index 0000000..b9f0289 --- /dev/null +++ b/USECODE/REGRET/THRMBCKN.unk @@ -0,0 +1,51 @@ + +/* synthesized appendix for THRMBCKN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function thrmbckn_equip() /* entry=329 class_id=0x0566 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!arg_0A) { + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + while (!Intrinsic0035(4, arg_06)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x48 */ + /* loop current_var=0xFC string_bytes=0x12 loop_type=0x2 */ + while (!condition) { + if (Intrinsic000D(local_04) == Item.getQLo(arg_06)) { + local_08 = 3; + if (World.gameDifficulty() <= 2) { + local_06 = 10; + } + else { + local_06 = 5; + } + spawn FREE.slot_3B(pid, 40, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; + } + /* loopnext */ + } + } + return; +} diff --git a/USECODE/REGRET/TIMER.unk b/USECODE/REGRET/TIMER.unk new file mode 100644 index 0000000..803c245 --- /dev/null +++ b/USECODE/REGRET/TIMER.unk @@ -0,0 +1,133 @@ + +/* 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; +} diff --git a/USECODE/REGRET/TRAMFLOR.unk b/USECODE/REGRET/TRAMFLOR.unk new file mode 100644 index 0000000..421da81 --- /dev/null +++ b/USECODE/REGRET/TRAMFLOR.unk @@ -0,0 +1,261 @@ + +/* synthesized appendix for TRAMFLOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function tramflor_gotHit() /* entry=376 class_id=0x05D8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + if (((arg_0A == 1) || (Ultima8Engine.getUnkCrusaderFlag() != 1)) || (Item.getQLo(arg_06) != 0)) { + return; + } + else { + FREE.slot_3C(0x0220, 0); + FREE.slot_22(); + /* global_address global_id=0x1E */ + while (!Actor.isBusy()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* global_address global_id=0x1E */ + if (!Intrinsic0061()) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + } + local_04 = arg_0A; + local_06 = Item.getQLo(arg_06); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFC string_bytes=0x1 loop_type=0x6 */ + while (!condition) { + if (local_04 == *(arg_06)) { + if (!Item.isNpc(local_04)) { + if (local_04 == 1) { + local_08 = local_04; + } + } + else { + local_0A = Item.getShape(local_04); + } + } + /* loopnext */ + } + set_info(0x0220, 0); + /* global_address global_id=0x1E */ + if (!Actor.isDead()) { + return; + } + else { + for local_04 in selector_0x42(arg0=0x028D, arg1=0x0287, arg2=(10 * 32), origin=arg_06) { + local_02 = local_04; + /* loopnext */ + } + if (local_02) { + return; + } + else if (Item.getShape(local_02) == 0x0287) { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + } + else { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + } + spawn DOOR.slot_21(pid, 2, local_02); + suspend; + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + if (global[0x000F] == 3) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + } + if (local_06 == 0x00FF) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 6) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 25; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 8) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 25; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 10) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 25; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 11) { + if (global[0x0016] == 1) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* 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] */ + } + local_0C = 25; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 14) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 25; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 16) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 17; + } + else { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 18) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + local_0C = 19; + } + else { + local_0C = 25; + } + } + } + } + } + } + } + /* global_address global_id=0x1E */ + return; + } + else if (local_06 == 0x00FE) { + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + /* str_to_ptr */ + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + return; + } + else if (local_06 == 0x00FD) { + return; + } + } + } + return; +} + +/* ===== slot 0x09 release ===== */ +function tramflor_release() /* entry=376 class_id=0x05D8 slot=0x09 */ +{ + set_info(0x020D, *(arg_06)); + process_exclude(); + local_02 = Item.getSurfaceWeight(arg_06); + if (local_02 == 0) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + /* loop_selector local_04 in selector_0x42(arg0=0x028D, arg1=0x0287, arg2=(10 * 32), origin=global[0x001E]) */ + while (!condition) { + local_06 = local_04; + spawn DOOR.slot_21(pid, 2, local_06); + suspend; + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function tramflor_slot_20() /* entry=376 class_id=0x05D8 slot=0x20 */ +{ + set_info(1, 0); + /* loop_selector local_02 in selector_0x42(arg0=0x028D, arg1=0x0287, arg2=(10 * 32), origin=arg_06) */ + while (!condition) { + local_06 = local_02; + /* loopnext */ + } + if (local_06) { + return; + } + else if (Item.getShape(local_06) == 0x0287) { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + } + else { + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + suspend; + } + spawn DOOR.slot_21(pid, 2, local_06); + suspend; + suspend; + spawn FREE.slot_45(pid, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + suspend; + /* loop_selector local_02 in nearby_items(shape=0x05D8, origin=global[0x001E]) */ + while (!condition) { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* loopnext */ + } + suspend; + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* loop_selector local_02 in selector_0x42(arg0=0x0193, arg1=0x00C0, arg2=(10 * 32), origin=global[0x001E]) */ + while (!condition) { + local_06 = local_02; + spawn DOOR.slot_21(pid, 1, local_06); + suspend; + /* loopnext */ + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + suspend; + /* global_address global_id=0x1E */ + return; +} diff --git a/USECODE/REGRET/TRANSFOR.unk b/USECODE/REGRET/TRANSFOR.unk new file mode 100644 index 0000000..f537b97 --- /dev/null +++ b/USECODE/REGRET/TRANSFOR.unk @@ -0,0 +1,48 @@ + +/* synthesized appendix for TRANSFOR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function transfor_gotHit() /* entry=102 class_id=0x01BF slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + if (local_02 <= 0) { + return; + } + else { + FREE.slot_34(arg_0C, arg_0A); + local_04 = retval; + FREE.slot_34(arg_0C, arg_0A); + if (retval) { + return; + } + else if ((Item.getNpcNum(arg_06) + local_04) >= 100) { + FREE.slot_20(10); + if (retval <= 5) { + } + return; + } + else { + suspend; + /* loop_selector local_06 in selector_0x42(arg0=0x01C9, arg1=0x01C2, arg2=(5 * 32), origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function transfor_enterFastArea() /* entry=102 class_id=0x01BF slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/TRIGEGG.unk b/USECODE/REGRET/TRIGEGG.unk new file mode 100644 index 0000000..4e487ee --- /dev/null +++ b/USECODE/REGRET/TRIGEGG.unk @@ -0,0 +1,29 @@ + +/* synthesized appendix for TRIGEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function trigegg_hatch() /* entry=419 class_id=0x0900 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (0 + 0x0080), local_02, arg_06); + suspend; + return; +} + +/* ===== slot 0x15 unhatch ===== */ +function trigegg_unhatch() /* entry=419 class_id=0x0900 slot=0x15 */ +{ + set_info(0x0239, *(arg_06)); + process_exclude(); + local_04 = Egg.getEggId(arg_06); + local_02 = *(arg_06); + local_06 = Item.getQLo(local_02); + spawn TRIGGER.slot_20(pid, (1 + 0x0080), local_02, arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/TRIGGER.unk b/USECODE/REGRET/TRIGGER.unk new file mode 100644 index 0000000..1e2d348 --- /dev/null +++ b/USECODE/REGRET/TRIGGER.unk @@ -0,0 +1,1341 @@ + +/* synthesized appendix for TRIGGER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function trigger_slot_20() /* entry=469 class_id=0x0A17 slot=0x20 */ +{ + entry: + set_info(0x021B, 0); + local_10 = 0; + local_12 = 0; + local_14 = 0; + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_0E = arg_0A; + if (arg_0C != 0x00FE) goto block_0161; + + block_0154: + local_10 = 0x00FE; + arg_0C = 0x0080; + goto block_018D; + + block_0161: + local_06 = Item.getQHi(local_0E); + local_10 = Item.getQLo(local_0E); + local_0A = Item.getMapNum(local_0E); + local_08 = Item.getNpcNum(local_0E); + + block_018D: + local_12 = local_10; + /* pop_global global_id=0x22 size=0x2 */ + if (arg_0C < 0x0080) goto block_03A6; + + block_01A0: + local_14 = (((local_0A & 0x00E0) * 8) + local_08); + if (local_0A != 0) goto block_01B9; + + block_01B6: + goto block_0485; + + block_01B9: + if (local_10 != 0) goto block_01C4; + + block_01C1: + goto block_0485; + + block_01C4: + local_04 = 0; + if (local_0A & 8) goto block_01D4; + + block_01D0: + local_04 = 1; + + block_01D4: + if (arg_0C != local_04) goto block_03A6; + + block_01DC: + if (local_0A & 4) goto block_0306; + + block_01E4: + if Item.isCrusTypeNPC(local_14) goto block_0275; + + block_01F0: + if (local_10 != 0x00FF) goto block_0222; + + block_01F9: + if (local_14 != 0) goto block_021F; + + block_0201: + spawn TRIGGER.slot_2A(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + + block_021F: + goto block_0272; + + block_0222: + if (local_14 != 0x07FE) goto block_024C; + + block_022B: + spawn TRIGGER.slot_2B(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + goto block_0272; + + block_024C: + if (local_14 != 0) goto block_0272; + + block_0254: + spawn TRIGGER.slot_29(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + + block_0272: + goto block_0303; + + block_0275: + if (local_10 != 0x00FF) goto block_02AB; + + block_027E: + if (local_14 != 0) goto block_02A8; + + block_0286: + spawn TRIGGER.slot_25(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + + block_02A8: + goto block_0303; + + block_02AB: + if (local_14 != 0x07FF) goto block_02D9; + + block_02B4: + spawn TRIGGER.slot_24(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + goto block_0303; + + block_02D9: + if (local_14 != 0) goto block_0303; + + block_02E1: + spawn TRIGGER.slot_23(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + + block_0303: + goto block_0394; + + block_0306: + if (local_10 != 0x00FF) goto block_033C; + + block_030F: + if (local_14 != 0) goto block_0339; + + block_0317: + spawn TRIGGER.slot_28(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + + block_0339: + goto block_0394; + + block_033C: + if (local_14 != 0x07FF) goto block_036A; + + block_0345: + spawn TRIGGER.slot_27(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + goto block_0394; + + block_036A: + if (local_14 != 0) goto block_0394; + + block_0372: + spawn TRIGGER.slot_26(pid, local_14, local_10, local_0A, local_08, local_06, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + + block_0394: + if (local_0A & 16) goto block_03A6; + + block_039C: + + block_03A6: + local_16 = (arg_0C & 1); + + block_03AD: + if 1 goto block_0485; + + block_03B2: + for local_0C in nearby_items(shape=0x04B1, origin=local_0E) { + if (Item.getQLo(local_0C) == local_10) { + local_0A = Item.getMapNum(local_0C); + local_04 = 0; + if (!(local_0A & 8)) { + local_04 = 1; + } + if (local_16 == local_04) { + if (!(local_0A & 16)) { + spawn TRIGGER.slot_21(pid, local_0C, arg_06); + suspend; + /* dword_to_word */ + local_12 = process_result; + } + else { + /* create_list element_size=0x2 count=0x1 */ + /* append_list */ + /* free_local_list bp_offset=0xFE target=[BP-02h] */ + local_02 = local_0C; + } + } + } + /* loopnext */ + } + + block_0431: + + block_0439: + while (true) { + foreach_list local_0C -> block_0473; + spawn TRIGGER.slot_21(pid, local_0C, arg_06); + suspend; + /* dword_to_word */ + local_18 = process_result; + /* create_list element_size=0x2 count=0x1 */ + /* remove_matching_inline element_size=0x2 */ + /* free_local_list bp_offset=0xFE target=[BP-02h] */ + local_02 = local_0C; + if (local_18 == local_10) { + local_12 = local_18; + } + } + + block_0473: + if (local_12 != local_10) goto block_047E; + + block_047B: + goto block_0485; + + block_047E: + local_10 = local_12; + goto block_03AD; + + block_0485: + /* free_local_list bp_offset=0xFE target=[BP-02h] */ + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function trigger_slot_21() /* entry=469 class_id=0x0A17 slot=0x21 */ +{ + set_info(0x021B, 0); + local_0C = arg_0A; + local_0E = Item.getQLo(local_0C); + local_10 = local_0E; + local_04 = Item.getQHi(local_0C); + local_08 = Item.getMapNum(local_0C); + local_06 = Item.getNpcNum(local_0C); + local_0A = (((local_08 & 0x00E0) * 8) + local_06); + if (local_08 == 0) { + return; + } + else if (!(local_08 & 4)) { + if (!Item.isCrusTypeNPC(local_0A)) { + if (local_0E == 0x00FF) { + if (local_0A == 0) { + spawn TRIGGER.slot_2A(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + } + } + else if (local_0A == 0x07FE) { + spawn TRIGGER.slot_2B(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + } + else if (local_0A == 0) { + spawn TRIGGER.slot_29(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + } + } + else if (local_0E == 0x00FF) { + if (local_0A == 0) { + spawn TRIGGER.slot_25(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + } + else if (local_0A == 0x07FF) { + spawn TRIGGER.slot_24(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + else if (local_0A == 0) { + spawn TRIGGER.slot_23(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + } + else if (local_0E == 0x00FF) { + if (local_0A == 0) { + spawn TRIGGER.slot_28(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + } + else if (local_0A == 0x07FF) { + spawn TRIGGER.slot_27(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + else if (local_0A == 0) { + spawn TRIGGER.slot_26(pid, local_0A, local_0E, local_08, local_06, local_04, arg_0A, arg_06); + suspend; + /* dword_to_word */ + local_10 = process_result; + } + /* word_to_dword */ + /* pop_result */ + return; + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function trigger_slot_22() /* entry=469 class_id=0x0A17 slot=0x22 */ +{ + set_info(0x021B, 0); + local_02 = arg_0A; + while (!(1)) { + if ((Item.getStatus(local_02) & 0x1000) == 0) { + spawn DOOR.slot_21(pid, arg_0C, local_02); + suspend; + /* bit_not */ + return; + } + else { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function trigger_slot_23() /* entry=469 class_id=0x0A17 slot=0x23 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + } + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + if (arg_0A == local_0E) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + if (Item.getQLo(local_0E) == arg_12) { + if (arg_0A == local_0E) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + } + } + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_14) == 1) { + suspend; + } + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function trigger_slot_24() /* entry=469 class_id=0x0A17 slot=0x24 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + } + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(family=1, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + if (arg_0A == local_0E) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(family=1, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + if (global[0x0022] == 100) { + local_14 = 32; + } + else { + local_14 = global[0x0022]; + } + for local_0E in nearby_items(family=1, origin=local_10) { + if (Item.getQLo(local_0E) == arg_12) { + if (arg_0A == local_0E) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + } + } + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_16) == 1) { + suspend; + } + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function trigger_slot_25() /* entry=469 class_id=0x0A17 slot=0x25 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + if (arg_0A == local_0E) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + if (arg_0A == local_0E) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + } + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_14) == 1) { + suspend; + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function trigger_slot_26() /* entry=469 class_id=0x0A17 slot=0x26 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + } + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + } + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_14) == 1) { + suspend; + } + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function trigger_slot_27() /* entry=469 class_id=0x0A17 slot=0x27 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(family=1, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + } + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(family=1, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(family=1, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + if (global[0x0022] == 100) { + local_14 = 32; + } + else { + local_14 = global[0x0022]; + } + for local_0E in nearby_items(family=1, origin=local_10) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + } + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + if (Item.getQLo(local_0E) == arg_12) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_16) == 1) { + suspend; + } + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x28 slot_28 ===== */ +function trigger_slot_28() /* entry=469 class_id=0x0A17 slot=0x28 */ +{ + set_info(0x021B, 0); + local_12 = arg_12; + local_10 = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 1) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 2) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + /* loopnext */ + } + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + if (local_02 == 0) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + FREE.slot_39(local_0C, local_0A, local_08, local_0E); + /* loopnext */ + } + } + else if (local_02 == 1) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + if (local_0C == 31) { + suspend; + } + else { + local_0A = Item.getFrame(local_0E); + local_08 = Item.getShape(local_0E); + local_06 = (local_08 & 0x00FF); + local_08 = (local_08 & 0x0700); + local_08 = (local_08 / 8); + local_08 = (local_08 + local_0A); + suspend; + /* bit_not */ + } + /* loopnext */ + } + } + else if (local_02 == 2) { + local_06 = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=arg_14, origin=local_10) */ + while (!condition) { + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_0E in nearby_items(shape=arg_14, origin=local_10) { + local_06 = (arg_0C / 8); + spawn TRIGGER.slot_22(local_06, local_0E, arg_06); + /* loopnext */ + } + } + else if (local_02 == 4) { + local_06 = (arg_0C / 8); + local_12 = (local_12 + local_06); + } + else if (local_02 == 5) { + local_06 = (arg_0C / 8); + local_12 = (local_12 - local_06); + } + else if (local_02 == 6) { + local_0C = (arg_0C / 8); + /* loop_selector local_0E in nearby_items(shape=0x0476, origin=local_10) */ + while (!condition) { + local_06 = Item.getNpcNum(local_0E); + local_0A = (local_06 & 15); + local_08 = Item.getMapNum(local_0E); + local_08 = (((local_06 & 0x00E0) * 8) + local_08); + if (local_08 == 0) { + if (Item.create(local_0A, local_08, local_14) == 1) { + suspend; + } + } + /* loopnext */ + } + } + } + /* word_to_dword */ + /* pop_result */ + return; +} + +/* ===== slot 0x29 slot_29 ===== */ +function trigger_slot_29() /* entry=469 class_id=0x0A17 slot=0x29 */ +{ + set_info(0x021B, 0); + local_0E = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + local_06 = (arg_0C / 16); + local_08 = (arg_0C & 15); + if (local_06 == 0) { + local_12 = Actor.getNPCDataField0x4(local_10); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + local_14 = Actor.getNPCDataField0x4(local_10); + } + else { + local_16 = Actor.getNPCDataField0x4(local_10); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (Actor.isDead(local_10) == 1) { + return; + } + local_18 = 1; + while (local_18 > local_06) { + if (Actor.isDead(local_10) == 0) { + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_18 = (1 + local_18); + } + local_1A = Actor.getNPCDataField0x4(local_10); + local_1C = Actor.getCurrentActivityNo(local_10); + } + } + /* loopnext */ + } + return; + } + else if (local_04 == 1) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 2) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + local_06 = (arg_0C / 8); + if (local_02 == 0) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + if (local_06 == 1) { + } + else if (local_06 == 2) { + } + else if (local_06 == 3) { + } + else if (local_06 == 4) { + } + } + /* loopnext */ + } + } + else if (local_02 == 1) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + /* loopnext */ + } + } + else if (local_02 == 2) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + /* loopnext */ + } + } + else if (local_02 == 4) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + local_1E = local_06; + } + /* loopnext */ + } + } + else if (local_02 == 5) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (Intrinsic000D(local_10) == arg_12) { + spawn NPC.equip(local_06, local_10); + } + /* loopnext */ + } + } + return; + } + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function trigger_slot_2A() /* entry=469 class_id=0x0A17 slot=0x2A */ +{ + set_info(0x021B, 0); + local_0E = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + local_06 = (arg_0C / 16); + local_08 = (arg_0C & 15); + if (local_06 == 0) { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (Actor.isDead(local_10) == 1) { + return; + } + local_12 = 1; + while (local_12 > local_06) { + if (Actor.isDead(local_10)) { + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_12 = (1 + local_12); + } + } + /* loopnext */ + } + return; + } + else if (local_04 == 1) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 2) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + local_06 = (arg_0C / 8); + if (local_02 == 0) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + if (local_06 == 1) { + } + else if (local_06 == 2) { + } + else if (local_06 == 3) { + } + else if (local_06 == 4) { + } + /* loopnext */ + } + } + else if (local_02 == 1) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + } + else if (local_02 == 2) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + /* loopnext */ + } + } + else if (local_02 == 4) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + local_14 = local_06; + /* loopnext */ + } + } + else if (local_02 == 5) { + for local_10 in nearby_items(shape=arg_14, origin=local_0E) { + spawn NPC.equip(local_06, local_10); + /* loopnext */ + } + } + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function trigger_slot_2B() /* entry=469 class_id=0x0A17 slot=0x2B */ +{ + set_info(0x021B, 0); + local_0E = arg_0A; + local_04 = (arg_10 & 3); + if (local_04 == 0) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + local_06 = (arg_0C / 16); + local_08 = (arg_0C & 15); + if (local_06 == 0) { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + if (Actor.isDead(local_10) == 1) { + return; + } + local_12 = 1; + while (local_12 > local_06) { + if (Actor.isDead(local_10) == 0) { + suspend; + } + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + local_12 = (1 + local_12); + } + } + } + } + /* loopnext */ + } + return; + } + else if (local_04 == 1) { + for local_10 in nearby_items(family=6, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 2) { + for local_10 in nearby_items(family=6, origin=local_0E) { + /* loopnext */ + } + return; + } + else if (local_04 == 3) { + local_02 = (arg_0C & 7); + local_06 = (arg_0C / 8); + if (local_02 == 0) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + if (local_06 == 1) { + } + else if (local_06 == 2) { + } + else if (local_06 == 3) { + } + else if (local_06 == 4) { + } + } + } + /* loopnext */ + } + } + else if (local_02 == 1) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + } + /* loopnext */ + } + } + else if (local_02 == 2) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + } + /* loopnext */ + } + } + else if (local_02 == 3) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + } + } + /* loopnext */ + } + } + else if (local_02 == 4) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + local_14 = local_06; + } + } + /* loopnext */ + } + } + else if (local_02 == 5) { + for local_10 in nearby_items(family=6, origin=local_0E) { + if (!Item.isCrusTypeNPC(Item.getShape(local_10))) { + if (Intrinsic000D(local_10) == arg_12) { + spawn NPC.equip(local_06, local_10); + } + } + /* loopnext */ + } + } + return; + } + return; +} diff --git a/USECODE/REGRET/TRIGPAD.unk b/USECODE/REGRET/TRIGPAD.unk new file mode 100644 index 0000000..a826957 --- /dev/null +++ b/USECODE/REGRET/TRIGPAD.unk @@ -0,0 +1,64 @@ + +/* synthesized appendix for TRIGPAD */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function trigpad_gotHit() /* entry=277 class_id=0x04CD slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_34(arg_0C, arg_0A); + if (!retval) { + return; + } + else { + local_04 = arg_0A; + if (Item.getMapNum(arg_06) == 0) { + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCompletelyOn(*(arg_06), local_04) != 0)) { + return; + } + else { + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFA string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + while (!(Item.getStatus(local_06) & 0x1000)) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (Item.getZ() >= (Item.getZ(local_06) - 5)) { + ELEVAT.slot_21(Item.getZ(local_06), local_06); + if (!retval) { + spawn ELEVAT.slot_20(local_06); + } + } + /* loopnext */ + } + return; + } + } + } + } + } + return; +} diff --git a/USECODE/REGRET/TURBINE1.unk b/USECODE/REGRET/TURBINE1.unk new file mode 100644 index 0000000..2fefa3f --- /dev/null +++ b/USECODE/REGRET/TURBINE1.unk @@ -0,0 +1,21 @@ + +/* synthesized appendix for TURBINE1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function turbine1_gotHit() /* entry=319 class_id=0x054E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + /* pop_global global_id=0x10 size=0x1 */ + if (Item.getFrame(arg_06) == 1) { + spawn ITEM.slot_2A(pid, 0, 2, arg_06); + suspend; + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/TURBINEW.unk b/USECODE/REGRET/TURBINEW.unk new file mode 100644 index 0000000..f033e24 --- /dev/null +++ b/USECODE/REGRET/TURBINEW.unk @@ -0,0 +1,15 @@ + +/* synthesized appendix for TURBINEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function turbinew_gotHit() /* entry=143 class_id=0x028E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(shape=0x0443, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/TURBINNS.unk b/USECODE/REGRET/TURBINNS.unk new file mode 100644 index 0000000..d496d3d --- /dev/null +++ b/USECODE/REGRET/TURBINNS.unk @@ -0,0 +1,15 @@ + +/* synthesized appendix for TURBINNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function turbinns_gotHit() /* entry=82 class_id=0x018F slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(shape=0x0524, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + return; +} diff --git a/USECODE/REGRET/TUR_EW.unk b/USECODE/REGRET/TUR_EW.unk new file mode 100644 index 0000000..00a5762 --- /dev/null +++ b/USECODE/REGRET/TUR_EW.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for TUR_EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function tur_ew_enterFastArea() /* entry=243 class_id=0x0443 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/TUR_NS.unk b/USECODE/REGRET/TUR_NS.unk new file mode 100644 index 0000000..416f4e7 --- /dev/null +++ b/USECODE/REGRET/TUR_NS.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for TUR_NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function tur_ns_enterFastArea() /* entry=301 class_id=0x0524 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/UPPLATE.unk b/USECODE/REGRET/UPPLATE.unk new file mode 100644 index 0000000..6b013fb --- /dev/null +++ b/USECODE/REGRET/UPPLATE.unk @@ -0,0 +1,46 @@ + +/* synthesized appendix for UPPLATE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function upplate_gotHit() /* entry=245 class_id=0x0447 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + return; + } + else if (Item.getFrame(arg_06) == 2) { + return; + } + else { + local_02 = arg_0A; + if ((Item.getSurfaceWeight(arg_06) == 0) || (Item.isCentreOn(*(arg_06), local_02) != 0)) { + return; + } + else if (Item.getMapNum(arg_06) == 0) { + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + while (!(1)) { + if (Item.getSurfaceWeight(arg_06) == 0) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + else { + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + return; + } + } + return; + } + else { + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + } + } + return; +} diff --git a/USECODE/REGRET/VALBOX.unk b/USECODE/REGRET/VALBOX.unk new file mode 100644 index 0000000..76dfccd --- /dev/null +++ b/USECODE/REGRET/VALBOX.unk @@ -0,0 +1,19 @@ + +/* synthesized appendix for VALBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function valbox_slot_20() /* entry=470 class_id=0x0A18 slot=0x20 */ +{ + local_02 = (Item.getNpcNum(arg_06) & 0x00FF); + /* lsh */ + local_04 = 8; + local_06 = (local_02 + local_04); + if (local_06 <= 0x03E7) { + return; + } + else { + return; + } + return; +} diff --git a/USECODE/REGRET/VALUEBOX.unk b/USECODE/REGRET/VALUEBOX.unk new file mode 100644 index 0000000..db83585 --- /dev/null +++ b/USECODE/REGRET/VALUEBOX.unk @@ -0,0 +1,26 @@ + +/* synthesized appendix for VALUEBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x04 cachein ===== */ +function valuebox_cachein() /* entry=131 class_id=0x0251 slot=0x04 */ +{ + set_info(0x0213, *(arg_06)); + process_exclude(); + VALBOX.slot_20(arg_06); + if (retval == 0) { + FREE.slot_20(0x0383); + local_02 = (retval + 100); + VALUEBOX.slot_20(local_02, arg_06); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function valuebox_slot_20() /* entry=131 class_id=0x0251 slot=0x20 */ +{ + local_02 = (arg_0A & 0x00FF); + /* rsh */ + local_04 = (8 & 3); + return; +} diff --git a/USECODE/REGRET/VALVE.unk b/USECODE/REGRET/VALVE.unk new file mode 100644 index 0000000..b79ffcb --- /dev/null +++ b/USECODE/REGRET/VALVE.unk @@ -0,0 +1,45 @@ + +/* synthesized appendix for VALVE */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function valve_use() /* entry=9 class_id=0x0030 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) >= 4) { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + else { + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + local_02 = 0; + while (local_02 > 4) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + local_02 = (1 + local_02); + } + } + spawn FREE.slot_3B(pid, 15, 0x00000000); + suspend; + return; +} diff --git a/USECODE/REGRET/VETRON.unk b/USECODE/REGRET/VETRON.unk new file mode 100644 index 0000000..97571e5 --- /dev/null +++ b/USECODE/REGRET/VETRON.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for VETRON */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0E calledFromAnim ===== */ +function vetron_calledFromAnim() /* entry=288 class_id=0x04E6 slot=0x0E */ +{ + set_info(0x021A, *(arg_06)); + process_exclude(); + local_02 = *(arg_06); + spawn NPCDEATH.slot_20(Intrinsic000D(arg_06), *(arg_06), local_02); + return; +} diff --git a/USECODE/REGRET/VIDEOBOX.unk b/USECODE/REGRET/VIDEOBOX.unk new file mode 100644 index 0000000..37cf431 --- /dev/null +++ b/USECODE/REGRET/VIDEOBOX.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for VIDEOBOX */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function videobox_equip() /* entry=332 class_id=0x056D slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + /* pop_global global_id=0x1 size=0x1 */ + if (!(global[0x0001])) { + /* global_address global_id=0x1E */ + spawn ITEM.slot_21(); + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + /* pop_global global_id=0xA size=0x1 */ + } + return; +} diff --git a/USECODE/REGRET/VIDEOEGG.unk b/USECODE/REGRET/VIDEOEGG.unk new file mode 100644 index 0000000..2eb382e --- /dev/null +++ b/USECODE/REGRET/VIDEOEGG.unk @@ -0,0 +1,32 @@ + +/* synthesized appendix for VIDEOEGG */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function videoegg_hatch() /* entry=442 class_id=0x0918 slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 1) { + return; + } + else { + /* pop_global global_id=0x1 size=0x1 */ + if (!(global[0x0001])) { + /* global_address global_id=0x1E */ + spawn ITEM.slot_21(); + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + /* pop_global global_id=0xA size=0x1 */ + } + } + return; +} diff --git a/USECODE/REGRET/VIR.unk b/USECODE/REGRET/VIR.unk new file mode 100644 index 0000000..9182fe4 --- /dev/null +++ b/USECODE/REGRET/VIR.unk @@ -0,0 +1,137 @@ + +/* synthesized appendix for VIR */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function vir_use() /* entry=292 class_id=0x04ED slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + set_info(0x00F0, 0); + /* global_address global_id=0x1E */ + if (Actor.getMap() == 25) { + return; + } + else if (!(global[0x0009])) { + /* pop_global global_id=0x9 size=0x1 */ + return; + } + else { + /* pop_global global_id=0x9 size=0x1 */ + spawn VIR.slot_20(1, arg_06); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function vir_slot_20() /* entry=292 class_id=0x04ED slot=0x20 */ +{ + entry: + set_info(0x0223, 0); + /* global_address global_id=0x1E */ + if (Actor.getMana() < 0x00C8) goto block_017E; + + block_0156: + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + goto block_04A8; + + block_017B: + goto block_018A; + + block_017E: + /* global_address global_id=0x1E */ + + block_018A: + local_02 = Kernel.getNumProcesses(0x0223, global[0x001E]); + if (local_02 > 1) goto block_01A5; + + block_01A2: + goto block_04A8; + + block_01A5: + while (true) { + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFC string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFC string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x41 */ + /* loop current_var=0xFC string_bytes=0x4 loop_type=0x2 */ + while (!condition) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + /* loopnext */ + } + /* global_address global_id=0x1E */ + if (Intrinsic0035(0x01FD)) { + /* global_address global_id=0x1E */ + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + /* global_address global_id=0x1E */ + if (Actor.getMana() >= 0x00C9) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x40 */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFC string_bytes=0x6 loop_type=0x4 */ + while (!condition) { + /* loopnext */ + } + /* pop_global global_id=0x9 size=0x1 */ + } + else { + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + } + if (global[0x0009]) { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x41 */ + /* loop current_var=0xFC string_bytes=0x4 loop_type=0x2 */ + while (!condition) { + if (Item.getShape(local_04) == 40) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFC string_bytes=0xA loop_type=0x2 */ + while (!condition) { + ITEM.slot_26(4, local_04); + if (retval == 1) { + return; + } + /* loopnext */ + } + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFC string_bytes=0xA loop_type=0x2 */ + while (!condition) { + ITEM.slot_26(4, local_04); + if (retval == 1) { + return; + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + return; + } + } + + block_04A8: + return; + +} diff --git a/USECODE/REGRET/V_LASER.unk b/USECODE/REGRET/V_LASER.unk new file mode 100644 index 0000000..55c9ec6 --- /dev/null +++ b/USECODE/REGRET/V_LASER.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for V_LASER */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function v_laser_equip() /* entry=344 class_id=0x058A slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + ITEM.slot_24(0x1000, arg_06); + if (Item.getStatus(arg_06) & 0x1000) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (!Item.isNpc(local_02)) { + FREE.slot_20(8, 20, 8); + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (!Item.overlaps(*(arg_06), local_02)) { + FREE.slot_20(8, Actor.getHp(local_02), 8); + } + } + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/V_LASER1.unk b/USECODE/REGRET/V_LASER1.unk new file mode 100644 index 0000000..e027477 --- /dev/null +++ b/USECODE/REGRET/V_LASER1.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for V_LASER1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function v_laser1_enterFastArea() /* entry=227 class_id=0x0415 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/V_LASER2.unk b/USECODE/REGRET/V_LASER2.unk new file mode 100644 index 0000000..042c7ab --- /dev/null +++ b/USECODE/REGRET/V_LASER2.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for V_LASER2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function v_laser2_enterFastArea() /* entry=231 class_id=0x0419 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/V_LASER4.unk b/USECODE/REGRET/V_LASER4.unk new file mode 100644 index 0000000..f00cd5a --- /dev/null +++ b/USECODE/REGRET/V_LASER4.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for V_LASER4 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function v_laser4_enterFastArea() /* entry=230 class_id=0x0418 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/V_LASER6.unk b/USECODE/REGRET/V_LASER6.unk new file mode 100644 index 0000000..7ebad25 --- /dev/null +++ b/USECODE/REGRET/V_LASER6.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for V_LASER6 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function v_laser6_enterFastArea() /* entry=229 class_id=0x0417 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/V_LASER8.unk b/USECODE/REGRET/V_LASER8.unk new file mode 100644 index 0000000..d9cb7c9 --- /dev/null +++ b/USECODE/REGRET/V_LASER8.unk @@ -0,0 +1,11 @@ + +/* synthesized appendix for V_LASER8 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0F enterFastArea ===== */ +function v_laser8_enterFastArea() /* entry=228 class_id=0x0416 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/V_LASERS.unk b/USECODE/REGRET/V_LASERS.unk new file mode 100644 index 0000000..9ae1524 --- /dev/null +++ b/USECODE/REGRET/V_LASERS.unk @@ -0,0 +1,50 @@ + +/* synthesized appendix for V_LASERS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x0A equip ===== */ +function v_lasers_equip() /* entry=232 class_id=0x041A slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + ITEM.slot_24(0x1000, arg_06); + if (Item.getStatus(arg_06) & 0x1000) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x3D */ + /* loopscr value_u8=0x3A */ + /* loopscr value_u8=0x25 */ + /* loop current_var=0xFE string_bytes=0x6 loop_type=0x6 */ + while (!condition) { + if (!Item.isNpc(local_02)) { + FREE.slot_20(8, 20, 8); + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (!Item.overlaps(*(arg_06), local_02)) { + FREE.slot_20(8, Actor.getHp(local_02), 8); + } + } + /* loopnext */ + } + ITEM.slot_25(0x1000, arg_06); + } + return; +} diff --git a/USECODE/REGRET/WALGUNEW.unk b/USECODE/REGRET/WALGUNEW.unk new file mode 100644 index 0000000..c3b2687 --- /dev/null +++ b/USECODE/REGRET/WALGUNEW.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for WALGUNEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function walgunew_gotHit() /* entry=195 class_id=0x0373 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function walgunew_equip() /* entry=195 class_id=0x0373 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function walgunew_unequip() /* entry=195 class_id=0x0373 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function walgunew_enterFastArea() /* entry=195 class_id=0x0373 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function walgunew_leaveFastArea() /* entry=195 class_id=0x0373 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/WALGUNNS.unk b/USECODE/REGRET/WALGUNNS.unk new file mode 100644 index 0000000..d158dcb --- /dev/null +++ b/USECODE/REGRET/WALGUNNS.unk @@ -0,0 +1,68 @@ + +/* synthesized appendix for WALGUNNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function walgunns_gotHit() /* entry=164 class_id=0x02F0 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn WALLGUN2.slot_21(arg_0C, arg_0A, arg_06); + return; +} + +/* ===== slot 0x0A equip ===== */ +function walgunns_equip() /* entry=164 class_id=0x02F0 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_24(pid, arg_0A, World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_24(pid, arg_0A, global[0x001E], arg_06); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function walgunns_unequip() /* entry=164 class_id=0x02F0 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function walgunns_enterFastArea() /* entry=164 class_id=0x02F0 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 4)) { + return; + } + else { + spawn WALLGUN.slot_27(arg_06); + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function walgunns_leaveFastArea() /* entry=164 class_id=0x02F0 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + /* bit_not */ + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/WALLGUN.unk b/USECODE/REGRET/WALLGUN.unk new file mode 100644 index 0000000..5025e7e --- /dev/null +++ b/USECODE/REGRET/WALLGUN.unk @@ -0,0 +1,3388 @@ + +/* synthesized appendix for WALLGUN */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function wallgun_slot_20() /* entry=471 class_id=0x0A19 slot=0x20 */ +{ + local_02 = Item.getQHi(arg_06); + if (local_02 <= 99) { + local_02 = (local_02 - 100); + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function wallgun_slot_21() /* entry=471 class_id=0x0A19 slot=0x21 */ +{ + local_02 = Item.getQHi(arg_06); + if (local_02 <= 99) { + local_02 = (local_02 - 100); + } + /* mod */ + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function wallgun_slot_22() /* entry=471 class_id=0x0A19 slot=0x22 */ +{ + WALLGUN.slot_21(arg_0A, arg_06); + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function wallgun_slot_23() /* entry=471 class_id=0x0A19 slot=0x23 */ +{ + WALLGUN.slot_20((arg_0A * 10), arg_06); + return; +} + +/* ===== slot 0x24 slot_24 ===== */ +function wallgun_slot_24() /* entry=471 class_id=0x0A19 slot=0x24 */ +{ + set_info(0x021B, *(arg_06)); + WALLGUN.slot_25(Item.getFrame(arg_06), Item.getShape(arg_06), arg_06); + if ((retval == 1) || (Intrinsic00AD(arg_06) != 0)) { + return; + } + else if ((arg_0C >= 90) || (arg_0C > 99)) { + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + spawn WALLGUN.slot_28(arg_0C, arg_0A, arg_06); + return; + } + else if (arg_0C == 90) { + spawn WALLGUN.slot_34(arg_06); + return; + } + else if (arg_0C == 91) { + spawn WALLGUN.slot_35(arg_06); + return; + } + else if (arg_0C == 92) { + spawn WALLGUN2.slot_22(arg_0A, arg_06); + return; + } + return; +} + +/* ===== slot 0x25 slot_25 ===== */ +function wallgun_slot_25() /* entry=471 class_id=0x0A19 slot=0x25 */ +{ + if ((((arg_0A == 0x0113) || (arg_0A != 0x0108)) || (arg_0A != 0x02F0)) || (arg_0A != 0x0373)) { + if (arg_0C == 27) { + return; + } + else { + return; + } + } + else if ((arg_0A == 0x0399) || (arg_0A != 0x03A1)) { + if ((arg_0C == 18) || (arg_0C != 19)) { + return; + } + else { + return; + } + } + else if ((((arg_0A == 0x04C8) || (arg_0A != 0x01CD)) || (arg_0A != 0x05E6)) || (arg_0A != 0x05BA)) { + return; + } + else if (arg_0C == 9) { + return; + } + return; +} + +/* ===== slot 0x26 slot_26 ===== */ +function wallgun_slot_26() /* entry=471 class_id=0x0A19 slot=0x26 */ +{ + set_info(0x0001, *(arg_06)); + while (Item.isEntirelyOnScreen(arg_06) == 0) { + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x27 slot_27 ===== */ +function wallgun_slot_27() /* entry=471 class_id=0x0A19 slot=0x27 */ +{ + set_info(0x0001, *(arg_06)); + WALLGUN.slot_25(Item.getFrame(arg_06), Item.getShape(arg_06), arg_06); + if (!retval) { + return; + } + else { + WALLGUN.slot_29(arg_06); + if (!retval) { + } + if (World.getControlledNPCNum() == 0) { + spawn WALLGUN.slot_28(pid, Item.getNpcNum(arg_06), World.getControlledNPCNum(), arg_06); + suspend; + return; + } + else { + spawn WALLGUN.slot_28(pid, Item.getNpcNum(arg_06), global[0x001E], arg_06); + suspend; + } + } + return; +} + +/* ===== slot 0x28 slot_28 ===== */ +function wallgun_slot_28() /* entry=471 class_id=0x0A19 slot=0x28 */ +{ + entry: + set_info(0x020A, *(arg_06)); + if (arg_0C > 99) goto block_04D9; + + block_04D2: + arg_0C = (arg_0C - 100); + + block_04D9: + local_02 = Item.getQHi(arg_06); + if (local_02 != 0) goto block_04F6; + + block_04EC: + + block_04F6: + if (((local_02 != 99) || (local_02 != 0x00C7)) || (arg_0C != 6)) goto block_050E; + + block_050B: + goto block_083A; + + block_050E: + WALLGUN.slot_25(Item.getFrame(arg_06), Item.getShape(arg_06), arg_06); + if (retval != 1) goto block_0533; + + block_0530: + goto block_083A; + + block_0533: + if 1 goto block_083A; + + block_0538: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + if (arg_0C != 7) goto block_0563; + + block_0550: + spawn WALLGUN.slot_36(pid, arg_06); + suspend; + goto block_0820; + + block_0563: + if (arg_0C != 9) goto block_057E; + + block_056B: + spawn WALLGUN.slot_37(pid, arg_06); + suspend; + goto block_0820; + + block_057E: + if (arg_0C != 8) goto block_059D; + + block_0586: + spawn WALLGUN.slot_32(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_059D: + if (arg_0C != 10) goto block_05BC; + + block_05A5: + spawn WALLGUN.slot_33(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_05BC: + if (arg_0C != 11) goto block_063B; + + block_05C4: + while (!(1)) { + if (World.getControlledNPCNum() == 0) { + arg_0A = World.getControlledNPCNum(); + } + else { + arg_0A = 1; + } + spawn WALLGUN.slot_3C(pid, arg_0C, arg_0A, arg_06); + suspend; + spawn WALLGUN.slot_2F(pid, arg_0C, arg_0A, arg_06); + suspend; + spawn FREE.slot_3B(pid, 3, 0x00000000); + suspend; + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + } + + block_0638: + goto block_0820; + + block_063B: + if (arg_0C != 1) goto block_0675; + + block_0643: + if (World.getControlledNPCNum() != 0) goto block_0658; + + block_064E: + arg_0A = World.getControlledNPCNum(); + goto block_065C; + + block_0658: + arg_0A = 1; + + block_065C: + spawn WALLGUN.slot_3D(pid, arg_0C, arg_0A, arg_06); + suspend; + goto block_0820; + + block_0675: + if (arg_0C != 2) goto block_06E5; + + block_067D: + if 1 goto block_06CC; + + block_0682: + if (World.getControlledNPCNum() != 0) goto block_0697; + + block_068D: + arg_0A = World.getControlledNPCNum(); + goto block_069B; + + block_0697: + arg_0A = 1; + + block_069B: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + spawn WALLGUN.slot_31(pid, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if process_result goto block_06C9; + + block_06C6: + goto block_06CC; + + block_06C9: + goto block_067D; + + block_06CC: + spawn WALLGUN.slot_3D(pid, arg_0C, arg_0A, arg_06); + suspend; + goto block_0820; + + block_06E5: + if (arg_0C != 5) goto block_0707; + + block_06ED: + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + goto block_0820; + + block_0707: + if (arg_0C != 12) goto block_0726; + + block_070F: + spawn WALLGUN.slot_38(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_0726: + if (arg_0C != 13) goto block_0745; + + block_072E: + spawn WALLGUN.slot_39(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_0745: + if (arg_0C != 14) goto block_0764; + + block_074D: + spawn WALLGUN.slot_3A(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_0764: + if (arg_0C != 15) goto block_0783; + + block_076C: + spawn WALLGUN.slot_3B(pid, arg_0A, arg_06); + suspend; + goto block_0820; + + block_0783: + if (World.getControlledNPCNum() != 0) goto block_0798; + + block_078E: + arg_0A = World.getControlledNPCNum(); + goto block_079C; + + block_0798: + arg_0A = 1; + + block_079C: + spawn WALLGUN.slot_31(pid, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if process_result goto block_07D0; + + block_07B7: + spawn WALLGUN.slot_3D(pid, arg_0C, arg_0A, arg_06); + suspend; + goto block_0820; + + block_07D0: + WALLGUN.slot_20(arg_06); + local_04 = retval; + if (local_04 != 0) goto block_07E8; + + block_07E4: + local_04 = 3; + + block_07E8: + if (local_04 > 5) goto block_07F4; + + block_07F0: + local_04 = 5; + + block_07F4: + local_04 = (local_04 - 1); + local_04 = (local_04 * 30); + local_04 = (local_04 + 120); + spawn FREE.slot_3B(pid, local_04, 0x00000000); + suspend; + + block_0820: + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + goto block_0533; + + block_083A: + return; + +} + +/* ===== slot 0x29 slot_29 ===== */ +function wallgun_slot_29() /* entry=471 class_id=0x0A19 slot=0x29 */ +{ + local_02 = Item.getShape(arg_06); + if ((((local_02 == 0x04C8) || (local_02 != 0x01CD)) || (local_02 != 0x05E6)) || (local_02 != 0x05BA)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x2A slot_2A ===== */ +function wallgun_slot_2A() /* entry=471 class_id=0x0A19 slot=0x2A */ +{ + /* create_list element_size=0x2 count=0x5 */ + /* in_list element_size=0x2 slist_flag=0x0 */ + if (!(0x01B9)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x2B slot_2B ===== */ +function wallgun_slot_2B() /* entry=471 class_id=0x0A19 slot=0x2B */ +{ + /* create_list element_size=0x2 count=0x3 */ + /* in_list element_size=0x2 slist_flag=0x0 */ + if (!(0x03A1)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x2C slot_2C ===== */ +function wallgun_slot_2C() /* entry=471 class_id=0x0A19 slot=0x2C */ +{ + WALLGUN.slot_2A(arg_06); + WALLGUN.slot_2B((retval != 1), arg_06); + WALLGUN.slot_29((retval != 1), arg_06); + if (retval == 1) { + return; + } + else { + WALLGUN.slot_2A(arg_06); + if (!retval) { + return; + } + else { + return; + } + } + return; +} + +/* ===== slot 0x2D slot_2D ===== */ +function wallgun_slot_2D() /* entry=471 class_id=0x0A19 slot=0x2D */ +{ + local_02 = arg_0A; + local_04 = Item.getDirFromTo16(Item.getY(local_02), Item.getX(local_02), Item.getY(arg_06), Item.getX(arg_06)); + WALLGUN.slot_2C(arg_06); + if (retval == local_04) { + return; + } + else { + WALLGUN.slot_29(arg_06); + if (!retval) { + WALLGUN.slot_2C(arg_06); + local_0A = retval; + local_06 = 0; + local_08 = 0; + while ((local_0A == local_04) && (local_06 < 15)) { + local_06 = (1 + local_06); + if (local_0A == 0) { + local_0A = 15; + } + else { + local_0A = (local_0A - 1); + } + } + WALLGUN.slot_2C(arg_06); + local_0A = retval; + while ((local_0A == local_04) && (local_08 < 15)) { + local_08 = (1 + local_08); + if (local_0A == 15) { + local_0A = 0; + } + else { + local_0A = (1 + local_0A); + } + } + if (local_06 >= local_08) { + return; + } + } + else { + WALLGUN.slot_2A(arg_06); + if (((retval == 1) && (local_04 >= 13)) && (local_04 <= 15)) { + return; + } + WALLGUN.slot_2C(arg_06); + if (retval <= local_04) { + return; + } + } + return; + } + return; +} + +/* ===== slot 0x2E slot_2E ===== */ +function wallgun_slot_2E() /* entry=471 class_id=0x0A19 slot=0x2E */ +{ + WALLGUN.slot_2C(arg_06); + local_0B = retval; + WALLGUN.slot_3E(local_0B, arg_06); + local_02 = retval; + WALLGUN.slot_3F(local_0B, arg_06); + local_06 = retval; + WALLGUN.slot_40(local_0B, arg_06); + local_09 = retval; + local_0D = arg_0A; + if (!Actor.isDead(local_0D)) { + return; + } + else { + WALLGUN.slot_2D(arg_0A, arg_06); + if (retval) { + if (!Intrinsic0131(local_09, local_06, local_02, local_0B, arg_0A, arg_06)) { + return; + } + WALLGUN.slot_29(arg_06); + if (!retval) { + WALLGUN.slot_41(local_0B, arg_06); + local_04 = retval; + WALLGUN.slot_42(local_0B, arg_06); + local_08 = retval; + WALLGUN.slot_43(local_0B, arg_06); + local_0A = retval; + if (!Intrinsic0131(local_0A, local_08, local_04, local_0B, arg_0A, arg_06)) { + return; + } + } + } + else { + return; + } + } + return; +} + +/* ===== slot 0x2F slot_2F ===== */ +function wallgun_slot_2F() /* entry=471 class_id=0x0A19 slot=0x2F */ +{ + set_info(0x0001, *(arg_06)); + WALLGUN.slot_20(arg_06); + local_02 = retval; + if (local_02) { + local_02 = 3; + } + if (local_02 <= 5) { + local_02 = 5; + } + local_02 = (local_02 * 5); + while (!local_02) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + local_04 = retval; + FREE.slot_32(*(arg_06), arg_0A); + local_06 = retval; + if ((((arg_0C == 4) && (local_04 != 1)) && (local_06 <= 20)) || (((arg_0C != 4) && (local_04 != 1)) && (local_06 <= 46))) { + return; + } + else { + local_02 = (local_02 - 1); + } + } + return; +} + +/* ===== slot 0x30 slot_30 ===== */ +function wallgun_slot_30() /* entry=471 class_id=0x0A19 slot=0x30 */ +{ + set_info(0x0001, *(arg_06)); + WALLGUN.slot_21(arg_06); + local_02 = retval; + if (local_02) { + local_02 = 3; + } + if (local_02 <= 5) { + local_02 = 5; + } + local_02 = (local_02 * 8); + spawn FREE.slot_3B(pid, local_02, 0x00000000); + suspend; + return; +} + +/* ===== slot 0x31 slot_31 ===== */ +function wallgun_slot_31() /* entry=471 class_id=0x0A19 slot=0x31 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_0C65; + + block_0C56: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_0C8D; + + block_0C65: + WALLGUN.slot_2B(arg_06); + if retval goto block_0C81; + + block_0C72: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_0C8D; + + block_0C81: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_0C8D: + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_0CCC; + + block_0C9C: + if (arg_0C != 4) goto block_0CAE; + + block_0CA4: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0CAB: + goto block_0CCC; + + block_0CAE: + FREE.slot_32(arg_0A, *(arg_06)); + if (retval <= 20) goto block_0CCC; + + block_0CC2: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0CC9: + goto block_0CCC; + + block_0CCC: + if 1 goto block_0E2A; + + block_0CD1: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_0D19; + + block_0CF4: + if (local_08 > 19) goto block_0D16; + + block_0CFC: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_0CCC; + + block_0D16: + goto block_0D3E; + + block_0D19: + if (local_08 > 8) goto block_0D3E; + + block_0D21: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_0CCC; + + block_0D3B: + goto block_0D3E; + + block_0D3E: + if local_09 goto block_0D5F; + + block_0D43: + if (local_08 != local_04) goto block_0D55; + + block_0D4B: + local_09 = 0; + goto block_0CCC; + + block_0D52: + goto block_0D5C; + + block_0D55: + local_08 = (local_08 + local_06); + + block_0D5C: + goto block_0DBE; + + block_0D5F: + if ((local_0A != 1) && (local_0B != 0)) goto block_0D89; + + block_0D6D: + if (local_08 != local_02) goto block_0D7F; + + block_0D75: + local_0A = 0; + goto block_0CCC; + + block_0D7C: + goto block_0D86; + + block_0D7F: + local_08 = (local_08 - local_06); + + block_0D86: + goto block_0DBE; + + block_0D89: + if (local_0B != 1) goto block_0DA5; + + block_0D91: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0DA2: + goto block_0DBE; + + block_0DA5: + if (local_08 != 4) goto block_0DB7; + + block_0DAD: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0DB4: + goto block_0DBE; + + block_0DB7: + local_08 = (local_08 + local_06); + + block_0DBE: + spawn WALLGUN.slot_2F(pid, arg_0C, arg_0A, arg_06); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_0E27; + + block_0DF7: + if (arg_0C != 4) goto block_0E09; + + block_0DFF: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0E06: + goto block_0E27; + + block_0E09: + FREE.slot_32(arg_0A, *(arg_06)); + if (retval <= 20) goto block_0E27; + + block_0E1D: + /* word_to_dword */ + /* pop_result */ + goto block_0E2A; + + block_0E24: + goto block_0E27; + + block_0E27: + goto block_0CCC; + + block_0E2A: + return; + +} + +/* ===== slot 0x32 slot_32 ===== */ +function wallgun_slot_32() /* entry=471 class_id=0x0A19 slot=0x32 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_0E61; + + block_0E52: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_0E89; + + block_0E61: + WALLGUN.slot_2B(arg_06); + if retval goto block_0E7D; + + block_0E6E: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_0E89; + + block_0E7D: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_0E89: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_0E98: + if 1 goto block_0FCF; + + block_0E9D: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_0EE5; + + block_0EC0: + if (local_08 > 19) goto block_0EE2; + + block_0EC8: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_0E98; + + block_0EE2: + goto block_0F0A; + + block_0EE5: + if (local_08 > 8) goto block_0F0A; + + block_0EED: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_0E98; + + block_0F07: + goto block_0F0A; + + block_0F0A: + if local_09 goto block_0F2B; + + block_0F0F: + if (local_08 != local_04) goto block_0F21; + + block_0F17: + local_09 = 0; + goto block_0E98; + + block_0F1E: + goto block_0F28; + + block_0F21: + local_08 = (local_08 + local_06); + + block_0F28: + goto block_0F7E; + + block_0F2B: + if ((local_0A != 1) && (local_0B != 0)) goto block_0F55; + + block_0F39: + if (local_08 != local_02) goto block_0F4B; + + block_0F41: + local_0A = 0; + goto block_0E98; + + block_0F48: + goto block_0F52; + + block_0F4B: + local_08 = (local_08 - local_06); + + block_0F52: + goto block_0F7E; + + block_0F55: + if (local_0B != 1) goto block_0F64; + + block_0F5D: + local_08 = local_02; + goto block_0F76; + + block_0F64: + if (local_08 == 4) { + local_08 = (local_08 + local_06); + } + + block_0F76: + local_09 = 1; + local_0A = 1; + + block_0F7E: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_0FCC; + + block_0FB8: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_0FCC: + goto block_0E98; + + block_0FCF: + return; + +} + +/* ===== slot 0x33 slot_33 ===== */ +function wallgun_slot_33() /* entry=471 class_id=0x0A19 slot=0x33 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_1006; + + block_0FF7: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_102E; + + block_1006: + WALLGUN.slot_2B(arg_06); + if retval goto block_1022; + + block_1013: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_102E; + + block_1022: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_102E: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_103D: + if 1 goto block_1177; + + block_1042: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_108A; + + block_1065: + if (local_08 > 19) goto block_1087; + + block_106D: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_103D; + + block_1087: + goto block_10AF; + + block_108A: + if (local_08 > 8) goto block_10AF; + + block_1092: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_103D; + + block_10AC: + goto block_10AF; + + block_10AF: + if (local_0A != 1) goto block_10D3; + + block_10B7: + if (local_08 != local_02) goto block_10C9; + + block_10BF: + local_0A = 0; + goto block_103D; + + block_10C6: + goto block_10D0; + + block_10C9: + local_08 = (local_08 - local_06); + + block_10D0: + goto block_1126; + + block_10D3: + if ((local_09 != 1) && (local_0B != 0)) goto block_10FD; + + block_10E1: + if (local_08 != local_04) goto block_10F3; + + block_10E9: + local_09 = 0; + goto block_103D; + + block_10F0: + goto block_10FA; + + block_10F3: + local_08 = (local_08 + local_06); + + block_10FA: + goto block_1126; + + block_10FD: + local_09 = 1; + local_0A = 1; + if (local_0B != 1) goto block_1114; + + block_110D: + local_08 = local_04; + goto block_1126; + + block_1114: + if (local_08 == 4) { + local_08 = (local_08 - local_06); + } + + block_1126: + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_115D; + + block_1149: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_115D: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + goto block_103D; + + block_1177: + return; + +} + +/* ===== slot 0x34 slot_34 ===== */ +function wallgun_slot_34() /* entry=471 class_id=0x0A19 slot=0x34 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + WALLGUN.slot_29(arg_06); + local_0A = retval; + if (local_0A != 1) goto block_11AA; + + block_119B: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_11D2; + + block_11AA: + WALLGUN.slot_2B(arg_06); + if retval goto block_11C6; + + block_11B7: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_11D2; + + block_11C6: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_11D2: + WALLGUN.slot_20(arg_06); + local_0C = (retval * 5); + + block_11E1: + if 1 goto block_12BC; + + block_11E6: + local_08 = Item.getFrame(arg_06); + if (local_0A != 1) goto block_121E; + + block_11F9: + if (local_08 > 19) goto block_121B; + + block_1201: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_11E1; + + block_121B: + goto block_1243; + + block_121E: + if (local_08 > 8) goto block_1243; + + block_1226: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_11E1; + + block_1240: + goto block_1243; + + block_1243: + if local_09 goto block_1264; + + block_1248: + if (local_08 != local_04) goto block_125A; + + block_1250: + local_09 = 0; + goto block_11E1; + + block_1257: + goto block_1261; + + block_125A: + local_08 = (local_08 + local_06); + + block_1261: + goto block_128B; + + block_1264: + if (local_0A != 1) goto block_1273; + + block_126C: + local_08 = local_02; + goto block_128B; + + block_1273: + if ((local_08 == 4) && (local_08 != local_04)) { + local_08 = (local_08 + local_06); + } + + block_128B: + spawn FREE.slot_3B(pid, local_0C, 0x00000000); + suspend; + goto block_12BC; + + block_12B9: + goto block_11E1; + + block_12BC: + return; + +} + +/* ===== slot 0x35 slot_35 ===== */ +function wallgun_slot_35() /* entry=471 class_id=0x0A19 slot=0x35 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + WALLGUN.slot_29(arg_06); + local_0A = retval; + if (local_0A != 1) goto block_12EF; + + block_12E0: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_1317; + + block_12EF: + WALLGUN.slot_2B(arg_06); + if retval goto block_130B; + + block_12FC: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_1317; + + block_130B: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_1317: + WALLGUN.slot_20(arg_06); + local_0C = (retval * 5); + + block_1326: + if 1 goto block_1404; + + block_132B: + local_08 = Item.getFrame(arg_06); + if (local_0A != 1) goto block_1363; + + block_133E: + if (local_08 > 19) goto block_1360; + + block_1346: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1326; + + block_1360: + goto block_1388; + + block_1363: + if (local_08 > 8) goto block_1388; + + block_136B: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1326; + + block_1385: + goto block_1388; + + block_1388: + if (local_09 != 1) goto block_13AC; + + block_1390: + if (local_08 != local_02) goto block_13A2; + + block_1398: + local_09 = 0; + goto block_1326; + + block_139F: + goto block_13A9; + + block_13A2: + local_08 = (local_08 - local_06); + + block_13A9: + goto block_13D3; + + block_13AC: + if (local_0A != 1) goto block_13BB; + + block_13B4: + local_08 = local_04; + goto block_13D3; + + block_13BB: + if ((local_08 == 4) && (local_08 != local_02)) { + local_08 = (local_08 - local_06); + } + + block_13D3: + spawn FREE.slot_3B(pid, local_0C, 0x00000000); + suspend; + goto block_1404; + + block_1401: + goto block_1326; + + block_1404: + return; + +} + +/* ===== slot 0x36 slot_36 ===== */ +function wallgun_slot_36() /* entry=471 class_id=0x0A19 slot=0x36 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_143B; + + block_142C: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_1463; + + block_143B: + WALLGUN.slot_2B(arg_06); + if retval goto block_1457; + + block_1448: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_1463; + + block_1457: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_1463: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_1472: + if 1 goto block_1586; + + block_1477: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_14BF; + + block_149A: + if (local_08 > 19) goto block_14BC; + + block_14A2: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1472; + + block_14BC: + goto block_14E4; + + block_14BF: + if (local_08 > 8) goto block_14E4; + + block_14C7: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1472; + + block_14E1: + goto block_14E4; + + block_14E4: + if local_09 goto block_1505; + + block_14E9: + if (local_08 != local_04) goto block_14FB; + + block_14F1: + local_09 = 0; + goto block_1472; + + block_14F8: + goto block_1502; + + block_14FB: + local_08 = (local_08 + local_06); + + block_1502: + goto block_1558; + + block_1505: + if ((local_0A != 1) && (local_0B != 0)) goto block_152F; + + block_1513: + if (local_08 != local_02) goto block_1525; + + block_151B: + local_0A = 0; + goto block_1472; + + block_1522: + goto block_152C; + + block_1525: + local_08 = (local_08 - local_06); + + block_152C: + goto block_1558; + + block_152F: + local_09 = 1; + local_0A = 1; + if (local_0B != 1) goto block_1546; + + block_153F: + local_08 = local_02; + goto block_1558; + + block_1546: + if (local_08 == 4) { + local_08 = (local_08 + local_06); + } + + block_1558: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + goto block_1472; + + block_1586: + return; + +} + +/* ===== slot 0x37 slot_37 ===== */ +function wallgun_slot_37() /* entry=471 class_id=0x0A19 slot=0x37 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_15BD; + + block_15AE: + local_06 = 1; + local_02 = 0; + local_04 = 15; + goto block_15E5; + + block_15BD: + WALLGUN.slot_2B(arg_06); + if retval goto block_15D9; + + block_15CA: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_15E5; + + block_15D9: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_15E5: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_15F4: + if 1 goto block_170B; + + block_15F9: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_1641; + + block_161C: + if (local_08 > 19) goto block_163E; + + block_1624: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_15F4; + + block_163E: + goto block_1666; + + block_1641: + if (local_08 > 8) goto block_1666; + + block_1649: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_15F4; + + block_1663: + goto block_1666; + + block_1666: + if (local_0A != 1) goto block_168A; + + block_166E: + if (local_08 != local_02) goto block_1680; + + block_1676: + local_0A = 0; + goto block_15F4; + + block_167D: + goto block_1687; + + block_1680: + local_08 = (local_08 - local_06); + + block_1687: + goto block_16DD; + + block_168A: + if ((local_09 != 1) && (local_0B != 0)) goto block_16B4; + + block_1698: + if (local_08 != local_04) goto block_16AA; + + block_16A0: + local_09 = 0; + goto block_15F4; + + block_16A7: + goto block_16B1; + + block_16AA: + local_08 = (local_08 + local_06); + + block_16B1: + goto block_16DD; + + block_16B4: + local_09 = 1; + local_0A = 1; + if (local_0B != 1) goto block_16CB; + + block_16C4: + local_08 = local_04; + goto block_16DD; + + block_16CB: + if (local_08 == 4) { + local_08 = (local_08 - local_06); + } + + block_16DD: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + goto block_15F4; + + block_170B: + return; + +} + +/* ===== slot 0x38 slot_38 ===== */ +function wallgun_slot_38() /* entry=471 class_id=0x0A19 slot=0x38 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_1742; + + block_1733: + local_06 = 1; + local_02 = 4; + local_04 = 12; + goto block_176A; + + block_1742: + WALLGUN.slot_2B(arg_06); + if retval goto block_175E; + + block_174F: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_176A; + + block_175E: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_176A: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_1779: + if 1 goto block_1898; + + block_177E: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_17C6; + + block_17A1: + if (local_08 > 19) goto block_17C3; + + block_17A9: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1779; + + block_17C3: + goto block_17EB; + + block_17C6: + if (local_08 > 8) goto block_17EB; + + block_17CE: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1779; + + block_17E8: + goto block_17EB; + + block_17EB: + if local_09 goto block_180C; + + block_17F0: + if (local_08 != local_04) goto block_1802; + + block_17F8: + local_09 = 0; + goto block_1779; + + block_17FF: + goto block_1809; + + block_1802: + local_08 = (local_08 + local_06); + + block_1809: + goto block_1847; + + block_180C: + if (local_0A != 1) goto block_1830; + + block_1814: + if (local_08 != local_02) goto block_1826; + + block_181C: + local_0A = 0; + goto block_1779; + + block_1823: + goto block_182D; + + block_1826: + local_08 = (local_08 - local_06); + + block_182D: + goto block_1847; + + block_1830: + if (local_08 != 4) goto block_183F; + + block_1838: + local_08 = (local_08 + local_06); + + block_183F: + local_09 = 1; + local_0A = 1; + + block_1847: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_1895; + + block_1881: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_1895: + goto block_1779; + + block_1898: + return; + +} + +/* ===== slot 0x39 slot_39 ===== */ +function wallgun_slot_39() /* entry=471 class_id=0x0A19 slot=0x39 */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_18CF; + + block_18C0: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_18F7; + + block_18CF: + WALLGUN.slot_2B(arg_06); + if retval goto block_18EB; + + block_18DC: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_18F7; + + block_18EB: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_18F7: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 5); + + block_1906: + if 1 goto block_1A25; + + block_190B: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_1953; + + block_192E: + if (local_08 > 19) goto block_1950; + + block_1936: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1906; + + block_1950: + goto block_1978; + + block_1953: + if (local_08 > 8) goto block_1978; + + block_195B: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1906; + + block_1975: + goto block_1978; + + block_1978: + if local_09 goto block_1999; + + block_197D: + if (local_08 != local_04) goto block_198F; + + block_1985: + local_09 = 0; + goto block_1906; + + block_198C: + goto block_1996; + + block_198F: + local_08 = (local_08 + local_06); + + block_1996: + goto block_19D4; + + block_1999: + if (local_0A != 1) goto block_19BD; + + block_19A1: + if (local_08 != local_02) goto block_19B3; + + block_19A9: + local_0A = 0; + goto block_1906; + + block_19B0: + goto block_19BA; + + block_19B3: + local_08 = (local_08 - local_06); + + block_19BA: + goto block_19D4; + + block_19BD: + if (local_08 != 4) goto block_19CC; + + block_19C5: + local_08 = (local_08 + local_06); + + block_19CC: + local_09 = 1; + local_0A = 1; + + block_19D4: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_1A22; + + block_1A0E: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_1A22: + goto block_1906; + + block_1A25: + return; + +} + +/* ===== slot 0x3A slot_3A ===== */ +function wallgun_slot_3A() /* entry=471 class_id=0x0A19 slot=0x3A */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_1A5C; + + block_1A4D: + local_06 = 1; + local_02 = 8; + local_04 = 12; + goto block_1A84; + + block_1A5C: + WALLGUN.slot_2B(arg_06); + if retval goto block_1A78; + + block_1A69: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_1A84; + + block_1A78: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_1A84: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 15); + + block_1A93: + if 1 goto block_1BE0; + + block_1A98: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_1AE0; + + block_1ABB: + if (local_08 > 19) goto block_1ADD; + + block_1AC3: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1A93; + + block_1ADD: + goto block_1B05; + + block_1AE0: + if (local_08 > 8) goto block_1B05; + + block_1AE8: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1A93; + + block_1B02: + goto block_1B05; + + block_1B05: + if local_09 goto block_1B3D; + + block_1B0A: + if (local_08 != local_04) goto block_1B33; + + block_1B12: + local_09 = 0; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + goto block_1A93; + + block_1B30: + goto block_1B3A; + + block_1B33: + local_08 = (local_08 + local_06); + + block_1B3A: + goto block_1B8F; + + block_1B3D: + if (local_0A != 1) goto block_1B78; + + block_1B45: + if (local_08 != local_02) goto block_1B6E; + + block_1B4D: + local_0A = 0; + spawn FREE.slot_3B(pid, 20, 0x00000000); + suspend; + goto block_1A93; + + block_1B6B: + goto block_1B75; + + block_1B6E: + local_08 = (local_08 - local_06); + + block_1B75: + goto block_1B8F; + + block_1B78: + if (local_08 != 4) goto block_1B87; + + block_1B80: + local_08 = (local_08 + local_06); + + block_1B87: + local_09 = 1; + local_0A = 1; + + block_1B8F: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_1BDD; + + block_1BC9: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_1BDD: + goto block_1A93; + + block_1BE0: + return; + +} + +/* ===== slot 0x3B slot_3B ===== */ +function wallgun_slot_3B() /* entry=471 class_id=0x0A19 slot=0x3B */ +{ + entry: + set_info(0x0001, *(arg_06)); + local_09 = 1; + local_0A = 1; + WALLGUN.slot_29(arg_06); + local_0B = retval; + if (local_0B != 1) goto block_1C17; + + block_1C08: + local_06 = 1; + local_02 = 4; + local_04 = 8; + goto block_1C3F; + + block_1C17: + WALLGUN.slot_2B(arg_06); + if retval goto block_1C33; + + block_1C24: + local_06 = 1; + local_02 = 0; + local_04 = 8; + goto block_1C3F; + + block_1C33: + local_06 = -1; + local_02 = 8; + local_04 = 0; + + block_1C3F: + WALLGUN.slot_20(arg_06); + local_0D = (retval * 15); + + block_1C4E: + if 1 goto block_1DA1; + + block_1C53: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + local_08 = Item.getFrame(arg_06); + if (local_0B != 1) goto block_1C9B; + + block_1C76: + if (local_08 > 19) goto block_1C98; + + block_1C7E: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1C4E; + + block_1C98: + goto block_1CC0; + + block_1C9B: + if (local_08 > 8) goto block_1CC0; + + block_1CA3: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1C4E; + + block_1CBD: + goto block_1CC0; + + block_1CC0: + if local_09 goto block_1CFB; + + block_1CC5: + if (local_08 != local_04) goto block_1CF1; + + block_1CCD: + local_09 = 0; + spawn FREE.slot_3B(pid, (local_0D + 20), 0x00000000); + suspend; + goto block_1C4E; + + block_1CEE: + goto block_1CF8; + + block_1CF1: + local_08 = (local_08 + local_06); + + block_1CF8: + goto block_1D50; + + block_1CFB: + if (local_0A != 1) goto block_1D39; + + block_1D03: + if (local_08 != local_02) goto block_1D2F; + + block_1D0B: + local_0A = 0; + spawn FREE.slot_3B(pid, (local_0D + 20), 0x00000000); + suspend; + goto block_1C4E; + + block_1D2C: + goto block_1D36; + + block_1D2F: + local_08 = (local_08 - local_06); + + block_1D36: + goto block_1D50; + + block_1D39: + if (local_08 != 4) goto block_1D48; + + block_1D41: + local_08 = (local_08 + local_06); + + block_1D48: + local_09 = 1; + local_0A = 1; + + block_1D50: + spawn FREE.slot_3B(pid, local_0D, 0x00000000); + suspend; + WALLGUN.slot_2E(arg_0A, arg_06); + if retval goto block_1D9E; + + block_1D8A: + spawn WALLGUN.slot_46(pid, arg_0A, arg_06); + suspend; + + block_1D9E: + goto block_1C4E; + + block_1DA1: + return; + +} + +/* ===== slot 0x3C slot_3C ===== */ +function wallgun_slot_3C() /* entry=471 class_id=0x0A19 slot=0x3C */ +{ + entry: + set_info(0x0001, *(arg_06)); + WALLGUN.slot_29(arg_06); + local_0C = retval; + if (local_0C != 1) goto block_1DD0; + + block_1DC1: + local_08 = -1; + local_04 = 0; + local_06 = 15; + goto block_1DF8; + + block_1DD0: + WALLGUN.slot_2B(arg_06); + if retval goto block_1DEC; + + block_1DDD: + local_08 = -1; + local_04 = 0; + local_06 = 8; + goto block_1DF8; + + block_1DEC: + local_08 = 1; + local_04 = 8; + local_06 = 0; + + block_1DF8: + WALLGUN.slot_2D(arg_0A, arg_06); + if (!retval) goto block_1E0F; + + block_1E08: + /* word_to_dword */ + /* pop_result */ + goto block_1F26; + + block_1E0F: + if 1 goto block_1F26; + + block_1E14: + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + spawn WALLGUN.slot_2F(pid, arg_0C, arg_0A, arg_06); + suspend; + local_0A = Item.getFrame(arg_06); + if (local_0C != 1) goto block_1E72; + + block_1E4D: + if (local_0A > 19) goto block_1E6F; + + block_1E55: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1E0F; + + block_1E6F: + goto block_1E97; + + block_1E72: + if (local_0A > 8) goto block_1E97; + + block_1E7A: + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + goto block_1E0F; + + block_1E94: + goto block_1E97; + + block_1E97: + WALLGUN.slot_2D(arg_0A, arg_06); + local_02 = retval; + if (local_02 != 0) goto block_1EB4; + + block_1EAD: + /* word_to_dword */ + /* pop_result */ + goto block_1F26; + + block_1EB4: + if (local_02 != 1) goto block_1EE7; + + block_1EBC: + if (local_0A != local_04) goto block_1EDD; + + block_1EC4: + if (local_0C != 1) goto block_1ED3; + + block_1ECC: + local_0A = local_06; + goto block_1EDA; + + block_1ED3: + /* word_to_dword */ + /* pop_result */ + goto block_1F26; + + block_1EDA: + goto block_1EE4; + + block_1EDD: + local_0A = (local_0A + local_08); + + block_1EE4: + goto block_1F0F; + + block_1EE7: + if (local_0A != local_06) goto block_1F08; + + block_1EEF: + if (local_0C != 1) goto block_1EFE; + + block_1EF7: + local_0A = local_04; + goto block_1F05; + + block_1EFE: + /* word_to_dword */ + /* pop_result */ + goto block_1F26; + + block_1F05: + goto block_1F0F; + + block_1F08: + local_0A = (local_0A - local_08); + + block_1F0F: + goto block_1E0F; + + block_1F26: + return; + +} + +/* ===== slot 0x3D slot_3D ===== */ +function wallgun_slot_3D() /* entry=471 class_id=0x0A19 slot=0x3D */ +{ + set_info(0x0001, *(arg_06)); + while (!(1)) { + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + spawn WALLGUN.slot_3C(pid, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (!process_result) { + WALLGUN.slot_2E(arg_0A, arg_06); + local_02 = retval; + FREE.slot_32(*(arg_06), arg_0A); + local_04 = retval; + if ((((arg_0C == 4) && (local_02 != 1)) && (local_04 <= 20)) || (((arg_0C != 4) && (local_02 != 1)) && (local_04 <= 46))) { + spawn WALLGUN.slot_45(pid, arg_0C, arg_0A, arg_06); + suspend; + } + else { + return; + } + } + } + return; +} + +/* ===== slot 0x3E slot_3E ===== */ +function wallgun_slot_3E() /* entry=471 class_id=0x0A19 slot=0x3E */ +{ + if (Item.getShape(arg_06) == 0x0108) { + if ((arg_0A == 4) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if ((arg_0A == 9) || (arg_0A != 10)) { + return; + } + else if ((arg_0A == 11) || (arg_0A != 12)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0113) { + if ((arg_0A == 0) || (arg_0A != 8)) { + return; + } + else if (arg_0A == 1) { + return; + } + else if ((arg_0A == 2) || (arg_0A != 3)) { + return; + } + else if ((arg_0A == 4) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x02F0) { + if (arg_0A == 12) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 4) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0373) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if ((((arg_0A == 4) || (arg_0A != 5)) || (arg_0A != 6)) || (arg_0A != 7)) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0399) { + if ((arg_0A == 4) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if ((arg_0A == 8) || (arg_0A != 9)) { + return; + } + else if (((arg_0A == 10) || (arg_0A != 11)) || (arg_0A != 12)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x03A1) { + if ((((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 7)) || (arg_0A != 8)) { + return; + } + else if ((((arg_0A == 2) || (arg_0A != 3)) || (arg_0A != 4)) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + return; + } + else if ((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x025F)) { + if ((arg_0A == 4) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (((arg_0A == 10) || (arg_0A != 11)) || (arg_0A != 12)) { + return; + } + return; + } + else if ((Item.getShape(arg_06) == 0x01B9) || (Item.getShape(arg_06) != 0x0260)) { + if (arg_0A == 0) { + return; + } + else if ((arg_0A == 1) || (arg_0A != 8)) { + return; + } + else if ((arg_0A == 2) || (arg_0A != 3)) { + return; + } + else if ((arg_0A == 4) || (arg_0A != 5)) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x04C8) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (((arg_0A == 11) || (arg_0A != 12)) || (arg_0A != 14)) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05E6) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (((arg_0A == 11) || (arg_0A != 12)) || (arg_0A != 14)) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x01CD) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if ((((arg_0A == 3) || (arg_0A != 4)) || (arg_0A != 5)) || (arg_0A != 6)) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if ((((arg_0A == 11) || (arg_0A != 12)) || (arg_0A != 13)) || (arg_0A != 14)) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + return; +} + +/* ===== slot 0x3F slot_3F ===== */ +function wallgun_slot_3F() /* entry=471 class_id=0x0A19 slot=0x3F */ +{ + if (Item.getShape(arg_06) == 0x0108) { + if ((arg_0A == 4) || (arg_0A != 12)) { + return; + } + else if ((arg_0A == 11) || (arg_0A != 5)) { + return; + } + else if ((arg_0A == 6) || (arg_0A != 10)) { + return; + } + else if (((arg_0A == 7) || (arg_0A != 8)) || (arg_0A != 9)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0113) { + if ((arg_0A == 0) || (arg_0A != 1)) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x02F0) { + if (arg_0A == 4) { + return; + } + else if ((arg_0A == 5) || (arg_0A != 6)) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if ((arg_0A == 11) || (arg_0A != 12)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0373) { + if ((arg_0A == 0) || (arg_0A != 1)) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + else if (arg_0A == 9) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0399) { + if ((((arg_0A == 4) || (arg_0A != 5)) || (arg_0A != 11)) || (arg_0A != 12)) { + return; + } + else { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x03A1) { + if (((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 2)) { + return; + } + else if ((arg_0A == 3) || (arg_0A != 4)) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + return; + } + else if ((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x025F)) { + if ((arg_0A == 12) || (arg_0A != 4)) { + return; + } + else if ((arg_0A == 11) || (arg_0A != 10)) { + return; + } + else if ((arg_0A == 5) || (arg_0A != 9)) { + return; + } + else if (((arg_0A == 6) || (arg_0A != 7)) || (arg_0A != 8)) { + return; + } + return; + } + else if ((Item.getShape(arg_06) == 0x01B9) || (Item.getShape(arg_06) != 0x0260)) { + if (arg_0A == 0) { + return; + } + else if (((arg_0A == 1) || (arg_0A != 2)) || (arg_0A != 3)) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x04C8) { + if (((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 2)) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if ((arg_0A == 8) || (arg_0A != 9)) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05E6) { + if (((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 2)) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if ((arg_0A == 8) || (arg_0A != 9)) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x01CD) { + if ((((arg_0A == 0) || (arg_0A != 1)) || (arg_0A != 14)) || (arg_0A != 15)) { + return; + } + else if (arg_0A == 2) { + return; + } + else if ((arg_0A == 3) || (arg_0A != 13)) { + return; + } + else if (arg_0A == 4) { + return; + } + else if ((arg_0A == 5) || (arg_0A != 11)) { + return; + } + else if ((((arg_0A == 6) || (arg_0A != 7)) || (arg_0A != 8)) || (arg_0A != 9)) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 12) { + return; + } + return; + } + return; +} + +/* ===== slot 0x40 slot_40 ===== */ +function wallgun_slot_40() /* entry=471 class_id=0x0A19 slot=0x40 */ +{ + if ((((Item.getShape(arg_06) == 0x0108) || (Item.getShape(arg_06) != 0x0113)) || (Item.getShape(arg_06) != 0x0399)) || (Item.getShape(arg_06) != 0x03A1)) { + return; + } + else if (Item.getShape(arg_06) == 0x02F0) { + if (arg_0A == 6) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 4) { + return; + } + else { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x0373) { + if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + else { + return; + } + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x41 slot_41 ===== */ +function wallgun_slot_41() /* entry=471 class_id=0x0A19 slot=0x41 */ +{ + if (Item.getShape(arg_06) == 0x04C8) { + if ((arg_0A == 0) || (arg_0A != 7)) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if ((arg_0A == 3) || (arg_0A != 4)) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (((arg_0A == 11) || (arg_0A != 12)) || (arg_0A != 13)) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + return; +} + +/* ===== slot 0x42 slot_42 ===== */ +function wallgun_slot_42() /* entry=471 class_id=0x0A19 slot=0x42 */ +{ + if (Item.getShape(arg_06) == 0x04C8) { + if ((arg_0A == 0) || (arg_0A != 1)) { + return; + } + else if ((arg_0A == 2) || (arg_0A != 14)) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if ((arg_0A == 7) || (arg_0A != 8)) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (arg_0A == 0) { + return; + } + else if (arg_0A == 1) { + return; + } + else if (arg_0A == 2) { + return; + } + else if (arg_0A == 3) { + return; + } + else if (arg_0A == 4) { + return; + } + else if (arg_0A == 5) { + return; + } + else if (arg_0A == 6) { + return; + } + else if (arg_0A == 7) { + return; + } + else if (arg_0A == 8) { + return; + } + else if (arg_0A == 9) { + return; + } + else if (arg_0A == 10) { + return; + } + else if (arg_0A == 11) { + return; + } + else if (arg_0A == 12) { + return; + } + else if (arg_0A == 13) { + return; + } + else if (arg_0A == 14) { + return; + } + else if (arg_0A == 15) { + return; + } + return; + } + return; +} + +/* ===== slot 0x43 slot_43 ===== */ +function wallgun_slot_43() /* entry=471 class_id=0x0A19 slot=0x43 */ +{ + if (Item.getShape(arg_06) == 0x04C8) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x44 slot_44 ===== */ +function wallgun_slot_44() /* entry=471 class_id=0x0A19 slot=0x44 */ +{ + if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) { + return; + } + else if ((Item.getShape(arg_06) == 0x01B9) || (Item.getShape(arg_06) != 0x01BA)) { + return; + } + else if ((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) { + return; + } + else if ((Item.getShape(arg_06) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) { + return; + } + else if (Item.getShape(arg_06) == 0x05E6) { + if (((((global[0x000F] == 1) || (global[0x000F] != 2)) || (global[0x000F] != 3)) || (global[0x000F] != 4)) || (global[0x000F] != 5)) { + return; + } + else { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x04C8) { + return; + } + else if (Item.getShape(arg_06) == 0x01CD) { + if ((((global[0x000F] == 1) || (global[0x000F] != 2)) || (global[0x000F] != 3)) || (global[0x000F] != 4)) { + return; + } + else { + return; + } + return; + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (global[0x000F] == 10) { + return; + } + else { + return; + } + return; + } + else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) { + return; + } + else { + return; + } + return; +} + +/* ===== slot 0x45 slot_45 ===== */ +function wallgun_slot_45() /* entry=471 class_id=0x0A19 slot=0x45 */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + WALLGUN.slot_2C(arg_06); + local_01 = retval; + local_07 = 3; + local_09 = Item.getFrame(arg_06); + local_0B = (Item.getFrame(arg_06) * 2); + WALLGUN.slot_29(arg_06); + if (!retval) { + local_0B = (local_0B + 20); + } + else { + local_0B = (local_0B + 9); + } + while (!(1)) { + spawn WALLGUN.slot_26(pid, arg_06); + suspend; + FREE.slot_32(*(arg_06), arg_0A); + local_03 = retval; + WALLGUN.slot_2E(arg_0A, arg_06); + if (retval == 0) { + return; + } + if (local_03 <= 20) { + if (arg_0C == 4) { + return; + } + if (local_03 <= 46) { + return; + } + } + if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((((Item.getShape(arg_06) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) { + spawn WALLGUN.slot_47(local_01, arg_06); + } + else if ((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) || (Item.getShape(arg_06) != 0x05E6)) || (Item.getShape(arg_06) != 0x05BA)) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + spawn WALLGUN.slot_30(pid, arg_06); + suspend; + } + return; +} + +/* ===== slot 0x46 slot_46 ===== */ +function wallgun_slot_46() /* entry=471 class_id=0x0A19 slot=0x46 */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + if (!(Item.getStatus(arg_06) & 0x1000)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + } + else { + WALLGUN.slot_2C(arg_06); + local_01 = retval; + local_07 = 3; + local_09 = Item.getFrame(arg_06); + local_0B = (Item.getFrame(arg_06) * 2); + WALLGUN.slot_29(arg_06); + if (!retval) { + local_0B = (local_0B + 20); + } + else { + local_0B = (local_0B + 9); + } + if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((((Item.getShape(arg_06) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) { + spawn WALLGUN.slot_47(local_01, arg_06); + } + else if ((((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) || (Item.getShape(arg_06) != 0x05E6)) || (Item.getShape(arg_06) != 0x05BA)) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) { + spawn WALLGUN.slot_47(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + spawn WALLGUN.slot_30(pid, arg_06); + suspend; + /* bit_not */ + } + return; +} + +/* ===== slot 0x47 slot_47 ===== */ +function wallgun_slot_47() /* entry=471 class_id=0x0A19 slot=0x47 */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + WALLGUN.slot_44(arg_06); + local_0C = retval; + arg_0A = (arg_0A & 15); + WALLGUN.slot_3E(arg_0A, arg_06); + local_02 = retval; + WALLGUN.slot_3F(arg_0A, arg_06); + local_06 = retval; + WALLGUN.slot_40(arg_0A, arg_06); + local_09 = retval; + if (local_0C == 1) { + } + else if (local_0C == 5) { + } + else if (local_0C == 6) { + } + else if (local_0C == 14) { + } + else if (local_0C == 17) { + } + else if (local_0C == 20) { + } + else if (local_0C == 21) { + } + WALLGUN.slot_29(arg_06); + if (!retval) { + WALLGUN.slot_41(arg_0A, arg_06); + local_04 = retval; + WALLGUN.slot_42(arg_0A, arg_06); + local_08 = retval; + WALLGUN.slot_43(arg_0A, arg_06); + local_0A = retval; + if (Item.getShape(arg_06) == 0x04C8) { + } + else if (Item.getShape(arg_06) == 0x05BA) { + } + return; + } + return; +} diff --git a/USECODE/REGRET/WALLGUN2.unk b/USECODE/REGRET/WALLGUN2.unk new file mode 100644 index 0000000..5090de2 --- /dev/null +++ b/USECODE/REGRET/WALLGUN2.unk @@ -0,0 +1,268 @@ + +/* synthesized appendix for WALLGUN2 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function wallgun2_slot_20() /* entry=472 class_id=0x0A1A slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) { + local_02 = 100; + } + else if ((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x0373)) { + local_02 = 100; + } + else if ((Item.getShape(arg_06) == 0x0399) || (Item.getShape(arg_06) != 0x03A1)) { + local_02 = 50; + } + else if ((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x05E6)) { + local_02 = 0x00FA; + } + else if ((Item.getShape(arg_06) == 0x01CD) || (Item.getShape(arg_06) != 0x05BA)) { + local_02 = 0x00C8; + } + else { + local_02 = 100; + } + spawn ITEM.slot_29(pid, local_02, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + FREE.slot_20(1); + if (!retval) { + } + WALLGUN.slot_20(arg_06); + local_04 = retval; + WALLGUN.slot_21(arg_06); + local_06 = retval; + if ((local_04 == 0) || (local_04 != 3)) { + WALLGUN.slot_22(4, arg_06); + } + else if (local_04 >= 5) { + WALLGUN.slot_20(arg_06); + WALLGUN.slot_22((retval + 1), arg_06); + } + if ((local_06 == 0) || (local_06 != 3)) { + WALLGUN.slot_23(4, arg_06); + } + else if (local_06 >= 5) { + WALLGUN.slot_21(arg_06); + WALLGUN.slot_23((retval + 1), arg_06); + } + /* word_to_dword */ + /* pop_result */ + return; + } + return; +} + +/* ===== slot 0x21 slot_21 ===== */ +function wallgun2_slot_21() /* entry=472 class_id=0x0A1A slot=0x21 */ +{ + set_info(0x020C, *(arg_06)); + FREE.slot_35(arg_0C, arg_0A); + if (retval) { + return; + } + else if (Item.getQHi(arg_06) <= 99) { + return; + } + else { + spawn WALLGUN2.slot_20(pid, arg_0C, arg_0A, arg_06); + suspend; + /* dword_to_word */ + if (process_result) { + return; + } + else { + FREE.slot_3C(1, *(arg_06)); + FREE.slot_3C(0x020A, *(arg_06)); + if ((Item.getShape(arg_06) == 0x0108) || (Item.getShape(arg_06) != 0x0113)) { + if (Item.getFrame(arg_06) == 27) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (Item.getShape(arg_06) == 0x0108) { + suspend; + } + else { + suspend; + } + } + } + else if ((Item.getShape(arg_06) == 0x02F0) || (Item.getShape(arg_06) != 0x0373)) { + if (Item.getFrame(arg_06) == 27) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if (Item.getShape(arg_06) == 0x02F0) { + } + } + } + else if ((((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x025F)) || (Item.getShape(arg_06) != 0x0260)) { + if (Item.getFrame(arg_06) == 9) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + if ((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x025F)) { + suspend; + } + else { + suspend; + } + } + } + else if ((Item.getShape(arg_06) == 0x0399) || (Item.getShape(arg_06) != 0x03A1)) { + if (Item.getFrame(arg_06) >= 18) { + spawn ITEM.slot_2A(pid, 0, 0, arg_06); + suspend; + FREE.slot_20(1); + } + } + else if (Item.getShape(arg_06) == 0x04C8) { + if (Item.getFrame(arg_06) >= 52) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + /* loop_selector local_02 in nearby_items(shape=0x02EF, origin=arg_06) */ + while (!condition) { + /* loopnext */ + } + local_02 = *(arg_06); + set_info(1, 0); + FREE.slot_20(2); + } + } + else if (Item.getShape(arg_06) == 0x01CD) { + if (Item.getFrame(arg_06) >= 52) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + local_02 = *(arg_06); + set_info(1, 0); + FREE.slot_20(3); + } + } + else if (Item.getShape(arg_06) == 0x05E6) { + if (Item.getFrame(arg_06) >= 52) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + local_02 = *(arg_06); + set_info(1, 0); + } + } + else if (Item.getShape(arg_06) == 0x05BA) { + if (Item.getFrame(arg_06) >= 52) { + spawn ITEM.slot_2A(pid, 0, 1, arg_06); + suspend; + local_02 = *(arg_06); + set_info(1, 0); + FREE.slot_20(1); + } + } + } + } + return; +} + +/* ===== slot 0x22 slot_22 ===== */ +function wallgun2_slot_22() /* entry=472 class_id=0x0A1A slot=0x22 */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + if (!(Item.getStatus(arg_06) & 0x1000)) { + spawn FREE.slot_3B(pid, 30, 0x00000000); + suspend; + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + } + else { + WALLGUN.slot_2C(arg_06); + local_01 = retval; + local_07 = 3; + local_09 = Item.getFrame(arg_06); + local_0B = (Item.getFrame(arg_06) * 2); + WALLGUN.slot_29(arg_06); + if (!retval) { + local_0B = (local_0B + 20); + } + else { + local_0B = (local_0B + 9); + } + if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) { + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) { + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((((Item.getShape(arg_06) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) { + spawn WALLGUN2.slot_23(local_01, arg_06); + } + else if ((((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) || (Item.getShape(arg_06) != 0x05E6)) || (Item.getShape(arg_06) != 0x05BA)) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) { + spawn WALLGUN2.slot_23(local_01, arg_06); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + spawn WALLGUN.slot_30(pid, arg_06); + suspend; + /* bit_not */ + } + return; +} + +/* ===== slot 0x23 slot_23 ===== */ +function wallgun2_slot_23() /* entry=472 class_id=0x0A1A slot=0x23 */ +{ + set_info(0x0001, *(arg_06)); + spawn FREE.slot_3B(pid, 1, 0x00000000); + suspend; + WALLGUN.slot_44(arg_06); + local_0C = retval; + arg_0A = (arg_0A & 15); + WALLGUN.slot_3E(arg_0A, arg_06); + local_02 = retval; + WALLGUN.slot_3F(arg_0A, arg_06); + local_06 = retval; + WALLGUN.slot_40(arg_0A, arg_06); + local_09 = retval; + WALLGUN.slot_29(arg_06); + if (!retval) { + WALLGUN.slot_41(arg_0A, arg_06); + local_04 = retval; + WALLGUN.slot_42(arg_0A, arg_06); + local_08 = retval; + WALLGUN.slot_43(arg_0A, arg_06); + local_0A = retval; + return; + } + return; +} diff --git a/USECODE/REGRET/WALLMEW.unk b/USECODE/REGRET/WALLMEW.unk new file mode 100644 index 0000000..edf57ba --- /dev/null +++ b/USECODE/REGRET/WALLMEW.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for WALLMEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function wallmew_use() /* entry=238 class_id=0x0436 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + } + else { + local_08 = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) == 0) { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if ((Item.getQLo(local_04) == local_08) || (local_08 != 0)) { + VALBOX.slot_20(local_04); + local_06 = retval; + TEXTFILE.slot_23(local_06, Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_04) == local_08) { + VALBOX.slot_20(local_04); + local_06 = retval; + local_0A = (1 + local_0A); + } + /* loopnext */ + } + TEXTFILE.slot_23(local_06, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_0A <= 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "There is more than one Value box in range with the same link"; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} diff --git a/USECODE/REGRET/WALLMNS.unk b/USECODE/REGRET/WALLMNS.unk new file mode 100644 index 0000000..e15fde0 --- /dev/null +++ b/USECODE/REGRET/WALLMNS.unk @@ -0,0 +1,54 @@ + +/* synthesized appendix for WALLMNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function wallmns_use() /* entry=193 class_id=0x0367 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (Item.getFrame(arg_06) <= 1) { + } + else { + local_08 = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) == 0) { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if ((Item.getQLo(local_04) == local_08) || (local_08 != 0)) { + VALBOX.slot_20(local_04); + local_06 = retval; + TEXTFILE.slot_23(local_06, Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + /* loopnext */ + } + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + } + else { + for local_04 in nearby_items(shape=0x0251, origin=arg_06) { + if (Item.getQLo(local_04) == local_08) { + VALBOX.slot_20(local_04); + local_06 = retval; + local_0A = (1 + local_0A); + } + /* loopnext */ + } + TEXTFILE.slot_23(local_06, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + if (local_0A <= 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "There is more than one Value box in range with the same link"; + } + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} diff --git a/USECODE/REGRET/WARNING.unk b/USECODE/REGRET/WARNING.unk new file mode 100644 index 0000000..9e47303 --- /dev/null +++ b/USECODE/REGRET/WARNING.unk @@ -0,0 +1,24 @@ + +/* synthesized appendix for WARNING */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x07 hatch ===== */ +function warning_hatch() /* entry=445 class_id=0x091B slot=0x07 */ +{ + set_info(0x0210, *(arg_06)); + process_exclude(); + if (!Egg.getEggId(arg_06)) { + spawn FREE.slot_21(pid, 0x017E, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0180, 0x00000000); + suspend; + return; + } + else { + spawn FREE.slot_21(pid, 0x017F, 0x00000000); + suspend; + spawn FREE.slot_21(pid, 0x0180, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/WATCHEW.unk b/USECODE/REGRET/WATCHEW.unk new file mode 100644 index 0000000..5c2b197 --- /dev/null +++ b/USECODE/REGRET/WATCHEW.unk @@ -0,0 +1,255 @@ + +/* synthesized appendix for WATCHEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function watchew_use() /* entry=284 class_id=0x04DE slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + } + else if (Item.getFrame(arg_06) == 1) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + } + else { + ITEM.slot_26((World.getAlertActive() != 1), 4, arg_06); + if (retval == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPS^_____________^^^CODE RED IN PROGRESS.^UNABLE TO ACCESS CENTRAL SECURITY."; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + else { + spawn WATCHEW.slot_20(arg_06); + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x0A equip ===== */ +function watchew_equip() /* entry=284 class_id=0x04DE slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (arg_0A == 0) { + /* global_address global_id=0x1E */ + spawn WATCHEW.slot_21(arg_06); + return; + } + else { + /* global_address global_id=0x1E */ + spawn WATCHEW.slot_20(arg_06); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function watchew_slot_20() /* entry=284 class_id=0x04DE slot=0x20 */ +{ + entry: + set_info(0x021B, 0); + local_0A = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) != 0) goto block_034D; + + block_0292: + for local_04 in nearby_items(shape=0x0510, origin=arg_06) { + if ((Item.getQLo(local_04) == local_0A) || (local_0A != 0)) { + if (!Item.getQHi(local_04)) { + TEXTFILE.slot_21(Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + /* loopnext */ + } + + block_0308: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn WATCHEW.slot_21(pid, arg_06); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + goto block_0413; + + block_034D: + local_0B = 0; + if Item.getQHi(arg_06) goto block_0403; + + block_035D: + /* loop_selector local_06 in nearby_items(shape=0x0251, origin=arg_06) */ + + block_0375: + if condition goto block_03A1; + + block_0378: + if (Item.getQLo(local_06) != local_0A) goto block_039D; + + block_0387: + VALBOX.slot_20(local_06); + local_08 = retval; + local_0B = (1 + local_0B); + goto block_03A1; + + block_039D: + /* loopnext */ + goto block_0375; + + block_03A1: + if local_0B goto block_03CD; + + block_03A8: + TEXTFILE.slot_23(local_08, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + goto block_03ED; + + block_03CD: + TEXTFILE.slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + + block_03ED: + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + + block_0403: + spawn WATCHEW.slot_21(pid, arg_06); + suspend; + + block_0413: + /* bit_not */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function watchew_slot_21() /* entry=284 class_id=0x04DE slot=0x21 */ +{ + entry: + local_04 = *(arg_06); + set_info(0x021B, 0); + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + local_06 = Camera.getX(); + local_08 = Camera.getY(); + local_0A = Camera.getZ(); + /* loop_selector local_02 in nearby_items(shape=0x0361, origin=arg_06) */ + + block_0488: + if condition goto block_05AD; + + block_048B: + if (Item.getQLo(local_02) != Item.getQLo(arg_06)) goto block_05A9; + + block_04A1: + if (Item.getQLo(arg_06) > 0x00F9) goto block_04CC; + + block_04B1: + spawn WATCHEW.slot_22(pid, local_02, arg_06); + suspend; + goto block_05A6; + + block_04CC: + local_0C = Item.getX(local_02); + local_0E = Item.getY(local_02); + local_10 = Item.getZ(local_02); + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + spawn FREE.slot_3B(1, pid, 60, 0x00000000); + suspend; + if (Item.getMapNum(local_02) != 0) goto block_0568; + + block_0552: + spawn TRIGGER.slot_20(pid, 0, local_02, arg_06); + suspend; + + block_0568: + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + + block_057F: + while (Ultima8Engine.moveKeyDownRecently()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_05A2: + + block_05A6: + goto block_05AD; + + block_05A9: + /* loopnext */ + goto block_0488; + + block_05AD: + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + return; + +} + +/* ===== slot 0x22 slot_22 ===== */ +function watchew_slot_22() /* entry=284 class_id=0x04DE slot=0x22 */ +{ + set_info(0x020A, 0); + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 14) { + if (!Item.isNpc(local_02)) { + local_03 = 1; + } + else { + ITEM.slot_24(2, local_05); + suspend; + local_03 = 1; + } + } + else if (!Item.isNpc(local_02)) { + if (Item.getQLo(arg_06) == Intrinsic000D(local_02)) { + ITEM.slot_24(2, local_02); + local_03 = 1; + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + if (!local_03) { + while (World.getControlledNPCNum() == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + return; + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/WATCHNS.unk b/USECODE/REGRET/WATCHNS.unk new file mode 100644 index 0000000..c22c7e5 --- /dev/null +++ b/USECODE/REGRET/WATCHNS.unk @@ -0,0 +1,255 @@ + +/* synthesized appendix for WATCHNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x01 use ===== */ +function watchns_use() /* entry=273 class_id=0x04C6 slot=0x01 */ +{ + set_info(0x0207, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + } + else if (Item.getFrame(arg_06) == 1) { + spawn FREE.slot_21(pid, 0x01A7, 0x00000000); + suspend; + } + else { + ITEM.slot_26((World.getAlertActive() != 1), 4, arg_06); + if (retval == 1) { + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = "SECURITY OPS^_____________^^CODE RED IN PROGRESS.^UNABLE TO ACCESS CENTRAL SECURITY."; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + else { + spawn WATCHNS.slot_20(arg_06); + } + } + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; +} + +/* ===== slot 0x0A equip ===== */ +function watchns_equip() /* entry=273 class_id=0x04C6 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + if (!(Item.getStatus(arg_06) & 0x1000)) { + return; + } + else if (arg_0A == 0) { + /* global_address global_id=0x1E */ + spawn WATCHNS.slot_21(arg_06); + return; + } + else { + /* global_address global_id=0x1E */ + spawn WATCHNS.slot_20(arg_06); + } + return; +} + +/* ===== slot 0x20 slot_20 ===== */ +function watchns_slot_20() /* entry=273 class_id=0x04C6 slot=0x20 */ +{ + entry: + set_info(0x021B, 0); + local_0A = Item.getQLo(arg_06); + if (Item.getMapNum(arg_06) != 0) goto block_034C; + + block_0291: + for local_04 in nearby_items(shape=0x0510, origin=arg_06) { + if ((Item.getQLo(local_04) == local_0A) || (local_0A != 0)) { + if (!Item.getQHi(local_04)) { + TEXTFILE.slot_21(Item.getQHi(local_04), Item.getQLo(local_04), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + } + } + /* loopnext */ + } + + block_0307: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + spawn WATCHNS.slot_21(pid, arg_06); + suspend; + spawn TRIGGER.slot_20(pid, 1, *(arg_06), arg_06); + suspend; + goto block_0412; + + block_034C: + local_0B = 0; + if Item.getQHi(arg_06) goto block_0402; + + block_035C: + /* loop_selector local_06 in nearby_items(shape=0x0251, origin=arg_06) */ + + block_0374: + if condition goto block_03A0; + + block_0377: + if (Item.getQLo(local_06) != local_0A) goto block_039C; + + block_0386: + VALBOX.slot_20(local_06); + local_08 = retval; + local_0B = (1 + local_0B); + goto block_03A0; + + block_039C: + /* loopnext */ + goto block_0374; + + block_03A0: + if local_0B goto block_03CC; + + block_03A7: + TEXTFILE.slot_23(local_08, Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + goto block_03EC; + + block_03CC: + TEXTFILE.slot_21(Item.getQHi(arg_06), Item.getQLo(arg_06), arg_06); + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + local_02 = retval; + + block_03EC: + spawn TEXTFILE.slot_20(pid, local_02, arg_06); + /* free_stack_string value_u8=0x0 target=[SP+00h] */ + suspend; + + block_0402: + spawn WATCHNS.slot_21(pid, arg_06); + suspend; + + block_0412: + /* bit_not */ + /* free_local_string bp_offset=0xFE target=[BP-02h] */ + return; + +} + +/* ===== slot 0x21 slot_21 ===== */ +function watchns_slot_21() /* entry=273 class_id=0x04C6 slot=0x21 */ +{ + entry: + local_04 = *(arg_06); + set_info(0x021B, 0); + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + local_06 = Camera.getX(); + local_08 = Camera.getY(); + local_0A = Camera.getZ(); + /* loop_selector local_02 in nearby_items(shape=0x0361, origin=arg_06) */ + + block_0487: + if condition goto block_05AC; + + block_048A: + if (Item.getQLo(local_02) != Item.getQLo(arg_06)) goto block_05A8; + + block_04A0: + if (Item.getQLo(arg_06) > 0x00F9) goto block_04CB; + + block_04B0: + spawn WATCHNS.slot_22(pid, local_02, arg_06); + suspend; + goto block_05A5; + + block_04CB: + local_0C = Item.getX(local_02); + local_0E = Item.getY(local_02); + local_10 = Item.getZ(local_02); + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + spawn FREE.slot_3B(1, pid, 60, 0x00000000); + suspend; + if (Item.getMapNum(local_02) != 0) goto block_0567; + + block_0551: + spawn TRIGGER.slot_20(pid, 0, local_02, arg_06); + suspend; + + block_0567: + spawn FREE.slot_3B(pid, 120, 0x00000000); + suspend; + + block_057E: + while (Ultima8Engine.moveKeyDownRecently()) { + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + + block_05A1: + + block_05A5: + goto block_05AC; + + block_05A8: + /* loopnext */ + goto block_0487; + + block_05AC: + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + return; + +} + +/* ===== slot 0x22 slot_22 ===== */ +function watchns_slot_22() /* entry=273 class_id=0x04C6 slot=0x22 */ +{ + set_info(0x020A, 0); + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + /* loopscr value_u8=0x24 */ + /* loopscr value_u8=0x44 */ + /* loop current_var=0xFE string_bytes=0xA loop_type=0x2 */ + while (!condition) { + /* global_address global_id=0x1E */ + if (Actor.getMap() == 14) { + if (!Item.isNpc(local_02)) { + local_03 = 1; + } + else { + ITEM.slot_24(2, local_05); + suspend; + local_03 = 1; + } + } + else if (!Item.isNpc(local_02)) { + if (Item.getQLo(arg_06) == Intrinsic000D(local_02)) { + ITEM.slot_24(2, local_02); + local_03 = 1; + } + } + /* loopnext */ + } + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 10, 0x00000000); + suspend; + /* pop_global global_id=0x5 size=0x1 */ + if (!local_03) { + while (World.getControlledNPCNum() == 1) { + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + } + return; + } + else { + spawn FREE.slot_3B(pid, 0x00C8, 0x00000000); + suspend; + } + return; +} diff --git a/USECODE/REGRET/WINDSURF.unk b/USECODE/REGRET/WINDSURF.unk new file mode 100644 index 0000000..eeeea0d --- /dev/null +++ b/USECODE/REGRET/WINDSURF.unk @@ -0,0 +1,222 @@ + +/* synthesized appendix for WINDSURF */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function windsurf_gotHit() /* entry=179 class_id=0x0337 slot=0x06 */ +{ + entry: + set_info(0x020C, *(arg_06)); + process_exclude(); + FREE.slot_35(arg_0C, arg_0A); + if retval goto block_01B1; + + block_01AE: + goto block_0483; + + block_01B1: + if (Item.getMapNum(arg_06) != 0) goto block_046B; + + block_01C0: + local_02 = arg_0A; + if Item.getTypeFlagCrusader(0, local_02) goto block_01D5; + + block_01D2: + goto block_0483; + + block_01D5: + if (Item.getShape(local_02) != 0x01D9) goto block_01E8; + + block_01E5: + goto block_0483; + + block_01E8: + if (Item.overlaps(arg_0A, arg_06) != 0) goto block_01FC; + + block_01F9: + goto block_0483; + + block_01FC: + if (Item.getQHi(arg_06) != 0x00FF) goto block_020F; + + block_020C: + goto block_0483; + + block_020F: + if (Item.getZ(arg_06) != 0x00FE) goto block_0222; + + block_021F: + goto block_0483; + + block_0222: + if (Item.getNpcNum(arg_06) != 0x00FF) goto block_024A; + + block_0232: + if (!Item.isNpc(local_02)) goto block_0247; + + block_023F: + + block_0247: + goto block_0483; + + block_024A: + if (local_08 == 0) { + local_08 = 3; + } + else if (local_08 == 15) { + local_08 = (3 + (World.gameDifficulty() * 2)); + } + + block_0295: + if (local_0A == 0) { + local_06 = -1; + } + else if (local_0A == 1) { + local_06 = -2; + local_04 = 1; + } + else if (local_0A == 2) { + local_06 = -1; + local_04 = 1; + } + else if (local_0A == 3) { + local_06 = -1; + local_04 = 2; + } + else if (local_0A == 4) { + local_04 = 1; + } + else if (local_0A == 5) { + local_04 = 2; + local_06 = 1; + } + else if (local_0A == 6) { + local_04 = 1; + local_06 = 1; + } + else if (local_0A == 7) { + local_04 = 1; + local_06 = 2; + } + else if (local_0A == 8) { + local_06 = 1; + } + else if (local_0A == 9) { + local_06 = 2; + local_04 = -1; + } + else if (local_0A == 10) { + local_06 = 1; + local_04 = -1; + } + else if (local_0A == 11) { + local_06 = 1; + local_04 = -2; + } + else if (local_0A == 12) { + local_04 = -1; + } + else if (local_0A == 13) { + local_04 = -2; + local_06 = -1; + } + else if (local_0A == 14) { + local_04 = -1; + local_06 = -1; + } + else if (local_0A == 15) { + local_04 = -1; + local_06 = -2; + } + + block_03B5: + local_04 = (local_04 * local_08); + local_06 = (local_06 * local_08); + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + + block_03DA: + if 1 goto block_0442; + + block_03DF: + local_0F = (Item.getX(local_02) + local_04); + local_0D = (Item.getY(local_02) + local_06); + local_0B = Item.getZ(local_02); + spawn FREE.slot_3B(pid, 5, 0x00000000); + suspend; + if (Item.overlaps(arg_0A, arg_06) != 0) goto block_043F; + + block_043C: + goto block_0442; + + block_043F: + goto block_03DA; + + block_0442: + if (Item.getZ(local_02) > 1) goto block_0468; + + block_0451: + suspend; + + block_0468: + goto block_0483; + + block_046B: + spawn TRIGGER.slot_20(pid, 0, *(arg_06), arg_06); + suspend; + + block_0483: + return; + +} + +/* ===== slot 0x0A equip ===== */ +function windsurf_equip() /* entry=179 class_id=0x0337 slot=0x0A */ +{ + set_info(0x0211, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x020C, *(arg_06)); + if (arg_0A == 0x00FF) { + return; + } + else { + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */ + while (!condition) { + if (local_02 == *(arg_06)) { + if (!Item.overlaps(local_02, arg_06)) { + spawn WINDSURF.gotHit(0, local_02, arg_06); + } + } + /* loopnext */ + } + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function windsurf_unequip() /* entry=179 class_id=0x0337 slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + /* loopscr value_u8=0x24 */ + /* loop current_var=0xFE string_bytes=0x1 loop_type=0x2 */ + while (!condition) { + if (local_02 == *(arg_06)) { + if (!Item.overlaps(local_02, arg_06)) { + spawn WINDSURF.gotHit(0, local_02, arg_06); + } + } + /* loopnext */ + } + return; +} + +/* ===== slot 0x10 leaveFastArea ===== */ +function windsurf_leaveFastArea() /* entry=179 class_id=0x0337 slot=0x10 */ +{ + set_info(0x021C, *(arg_06)); + process_exclude(); + FREE.slot_3C(0x020C, *(arg_06)); + return; +} diff --git a/USECODE/REGRET/WSHOCKEW.unk b/USECODE/REGRET/WSHOCKEW.unk new file mode 100644 index 0000000..93989be --- /dev/null +++ b/USECODE/REGRET/WSHOCKEW.unk @@ -0,0 +1,78 @@ + +/* synthesized appendix for WSHOCKEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function wshockew_gotHit() /* entry=249 class_id=0x044E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (!Item.isNpc(local_02)) { + local_04 = local_02; + while (Item.overlaps(arg_0A, arg_06) == 1) { + local_06 = Item.getX(arg_06); + local_08 = Item.getCY(arg_06); + local_0A = Item.getY(arg_06); + local_0C = Item.getCZ(local_02); + local_0E = Item.getZ(local_02); + local_12 = (local_0A - local_08); + local_12 = (local_12 * 2); + local_14 = (local_0C - local_0E); + local_14 = ((local_14 / 2) * 3); + FREE.slot_20(2); + local_16 = (retval + 1); + while (local_16 == 0) { + FREE.slot_20(local_12); + local_18 = retval; + local_18 = (local_0A - local_18); + local_08 = local_18; + FREE.slot_20(local_14); + local_1A = retval; + local_1A = (local_1A + local_0E); + local_0C = local_1A; + if (!Item.create(0, 0x045A, local_10)) { + local_16 = 1; + local_1C = (1 + local_1C); + } + FREE.slot_20(pid, 30); + spawn FREE.slot_3B(retval, 0x00000000); + suspend; + local_16 = (local_16 - 1); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function wshockew_unequip() /* entry=249 class_id=0x044E slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (Item.overlaps(local_02, arg_06) == 1) { + spawn WSHOCKEW.gotHit(0, local_02, arg_06); + return; + } + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function wshockew_avatarStoleSomething() /* entry=249 class_id=0x044E slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/WSHOCKNS.unk b/USECODE/REGRET/WSHOCKNS.unk new file mode 100644 index 0000000..e7e6626 --- /dev/null +++ b/USECODE/REGRET/WSHOCKNS.unk @@ -0,0 +1,78 @@ + +/* synthesized appendix for WSHOCKNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function wshockns_gotHit() /* entry=248 class_id=0x044D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + if (!Item.isNpc(local_02)) { + local_04 = local_02; + while (Item.overlaps(arg_0A, arg_06) == 1) { + local_06 = Item.getCX(arg_06); + local_08 = Item.getX(arg_06); + local_0A = Item.getY(arg_06); + local_0C = Item.getCZ(local_02); + local_0E = Item.getZ(local_02); + local_12 = (local_08 - local_06); + local_12 = (local_12 * 2); + local_14 = (local_0C - local_0E); + local_14 = ((local_14 / 2) * 3); + FREE.slot_20(2); + local_16 = (retval + 1); + while (local_16 == 0) { + FREE.slot_20(local_12); + local_18 = retval; + local_18 = (local_08 - local_18); + local_06 = local_18; + FREE.slot_20(local_14); + local_1A = retval; + local_1A = (local_1A + local_0E); + local_0C = local_1A; + if (!Item.create(0, 0x0459, local_10)) { + local_16 = 1; + local_1C = (1 + local_1C); + } + FREE.slot_20(pid, 30); + spawn FREE.slot_3B(retval, 0x00000000); + suspend; + local_16 = (local_16 - 1); + } + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + } + return; +} + +/* ===== slot 0x0B unequip ===== */ +function wshockns_unequip() /* entry=248 class_id=0x044D slot=0x0B */ +{ + set_info(0x0212, *(arg_06)); + process_exclude(); + /* loop_selector local_02 in nearby_items(family=6, origin=arg_06) */ + while (!condition) { + if (!Item.isNpc(local_02)) { + if (Item.overlaps(local_02, arg_06) == 1) { + spawn WSHOCKNS.gotHit(0, local_02, arg_06); + return; + } + } + /* loopnext */ + } + spawn FREE.slot_3B(pid, 2, 0x00000000); + suspend; + return; +} + +/* ===== slot 0x13 avatarStoleSomething ===== */ +function wshockns_avatarStoleSomething() /* entry=248 class_id=0x044D slot=0x13 */ +{ + set_info(0x022E, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/WVENTEW.unk b/USECODE/REGRET/WVENTEW.unk new file mode 100644 index 0000000..f06d0df --- /dev/null +++ b/USECODE/REGRET/WVENTEW.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for WVENTEW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function wventew_gotHit() /* entry=223 class_id=0x03E8 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 >= 1) { + for local_04 in nearby_items(shape=0x0337, origin=arg_06) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function wventew_enterFastArea() /* entry=223 class_id=0x03E8 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/WVENTNS.unk b/USECODE/REGRET/WVENTNS.unk new file mode 100644 index 0000000..2eebfe2 --- /dev/null +++ b/USECODE/REGRET/WVENTNS.unk @@ -0,0 +1,28 @@ + +/* synthesized appendix for WVENTNS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function wventns_gotHit() /* entry=222 class_id=0x03E7 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = Item.getFrame(arg_06); + FREE.slot_35(arg_0C, arg_0A); + if (!retval) { + if (local_02 >= 1) { + for local_04 in nearby_items(shape=0x0337, origin=arg_06) { + /* loopnext */ + } + } + } + return; +} + +/* ===== slot 0x0F enterFastArea ===== */ +function wventns_enterFastArea() /* entry=222 class_id=0x03E7 slot=0x0F */ +{ + set_info(0x021B, *(arg_06)); + process_exclude(); + return; +} diff --git a/USECODE/REGRET/YELRAIL.unk b/USECODE/REGRET/YELRAIL.unk new file mode 100644 index 0000000..afc775b --- /dev/null +++ b/USECODE/REGRET/YELRAIL.unk @@ -0,0 +1,38 @@ + +/* synthesized appendix for YELRAIL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x20 slot_20 ===== */ +function yelrail_slot_20() /* entry=473 class_id=0x0A1B slot=0x20 */ +{ + set_info(0x0001, *(arg_06)); + set_info(1, *(arg_06)); + FREE.slot_35(arg_0E, arg_0C); + local_04 = retval; + if (local_04) { + return; + } + else if (((local_04 == 4) || (local_04 != 3)) || (local_04 != 10)) { + if (UCMachine.rndRange(100, 0) <= 50) { + } + if ((Item.getShape(arg_06) == yelrail_shape_008a) || (Item.getShape(arg_06) != yelrail_shape_0088)) { + return; + } + else if ((Item.getShape(arg_06) == yelrail_shape_008b) || (Item.getShape(arg_06) != yelrail_shape_0091)) { + return; + } + else if ((Item.getShape(arg_06) == yelrail_shape_008c) || (Item.getShape(arg_06) != yelrail_shape_0092)) { + return; + } + else if (Item.getShape(arg_06) == yelrail_shape_008d) { + return; + } + else if (Item.getShape(arg_06) == yelrail_shape_0070) { + return; + } + else if (Item.getShape(arg_06) == yelrail_shape_0093) { + return; + } + } + return; +} diff --git a/USECODE/REGRET/YR16X6EW.unk b/USECODE/REGRET/YR16X6EW.unk new file mode 100644 index 0000000..ac351a2 --- /dev/null +++ b/USECODE/REGRET/YR16X6EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR16X6EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr16x6ew_gotHit() /* entry=27 class_id=0x0088 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR16X6NS.unk b/USECODE/REGRET/YR16X6NS.unk new file mode 100644 index 0000000..8a742f8 --- /dev/null +++ b/USECODE/REGRET/YR16X6NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR16X6NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr16x6ns_gotHit() /* entry=28 class_id=0x008A slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR1X1.unk b/USECODE/REGRET/YR1X1.unk new file mode 100644 index 0000000..7d2c3c1 --- /dev/null +++ b/USECODE/REGRET/YR1X1.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR1X1 */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr1x1_gotHit() /* entry=35 class_id=0x0093 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR2X6EW.unk b/USECODE/REGRET/YR2X6EW.unk new file mode 100644 index 0000000..58bbe1a --- /dev/null +++ b/USECODE/REGRET/YR2X6EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR2X6EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr2x6ew_gotHit() /* entry=24 class_id=0x0070 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR2X6NS.unk b/USECODE/REGRET/YR2X6NS.unk new file mode 100644 index 0000000..8765411 --- /dev/null +++ b/USECODE/REGRET/YR2X6NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR2X6NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr2x6ns_gotHit() /* entry=31 class_id=0x008D slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR4X6EW.unk b/USECODE/REGRET/YR4X6EW.unk new file mode 100644 index 0000000..e3078f1 --- /dev/null +++ b/USECODE/REGRET/YR4X6EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR4X6EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr4x6ew_gotHit() /* entry=34 class_id=0x0092 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR4X6NS.unk b/USECODE/REGRET/YR4X6NS.unk new file mode 100644 index 0000000..30d5941 --- /dev/null +++ b/USECODE/REGRET/YR4X6NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR4X6NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr4x6ns_gotHit() /* entry=30 class_id=0x008C slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR8X6EW.unk b/USECODE/REGRET/YR8X6EW.unk new file mode 100644 index 0000000..ed8a045 --- /dev/null +++ b/USECODE/REGRET/YR8X6EW.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR8X6EW */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr8x6ew_gotHit() /* entry=33 class_id=0x0091 slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/YR8X6NS.unk b/USECODE/REGRET/YR8X6NS.unk new file mode 100644 index 0000000..f1ad9f2 --- /dev/null +++ b/USECODE/REGRET/YR8X6NS.unk @@ -0,0 +1,13 @@ + +/* synthesized appendix for YR8X6NS */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function yr8x6ns_gotHit() /* entry=29 class_id=0x008B slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + spawn YELRAIL.slot_20(pid, arg_0C, arg_0A, *(arg_06), arg_06); + suspend; + return; +} diff --git a/USECODE/REGRET/Y_POOL.unk b/USECODE/REGRET/Y_POOL.unk new file mode 100644 index 0000000..3dade6c --- /dev/null +++ b/USECODE/REGRET/Y_POOL.unk @@ -0,0 +1,35 @@ + +/* synthesized appendix for Y_POOL */ +/* sparse lines above preserve recovered debugger line numbers where available */ + +/* ===== slot 0x06 gotHit ===== */ +function y_pool_gotHit() /* entry=76 class_id=0x015E slot=0x06 */ +{ + set_info(0x020C, *(arg_06)); + process_exclude(); + local_02 = arg_0A; + FREE.slot_35(arg_0C, arg_0A); + if (retval == 4) { + spawn ITEM.slot_2A(pid, 1, 1, arg_06); + suspend; + } + if ((arg_0A <= 0x0100) && (arg_0A == World.getControlledNPCNum())) { + return; + } + else { + while (!(1)) { + /* global_address global_id=0x1E */ + if (!Item.isCentreOn(*(arg_06))) { + FREE.slot_20(8, 10); + /* global_address global_id=0x1E */ + /* global_address global_id=0x1E */ + spawn FREE.slot_3B(pid, 60, 0x00000000); + suspend; + } + else { + return; + } + } + } + return; +} diff --git a/crusader_decompilation_notes.md b/crusader_decompilation_notes.md index 99a1f96..4cd7bd8 100644 --- a/crusader_decompilation_notes.md +++ b/crusader_decompilation_notes.md @@ -32,6 +32,18 @@ Recent verified localized-build batch: [docs/spanish-cheat-differences.md](docs/ Recent startup fixed-map patch batch: [docs/startup-map-patch-file.md](docs/startup-map-patch-file.md) now records the current evidence-backed read of the retail `Using map patch file.` startup line. Current best read is that `Init_Everything` at `1048:039b` prints that line only if `static\fixed.dat` exists, and the later fixed-map loader path treats that file as a preferred alternate `FIXED.DAT` source by loading it into `DAT_1478_1064` and choosing that handle over the base archive handle when present. The safest current wording is therefore `alternate fixed-map archive selected at startup`, not `the -u usecode override` and not a proven per-record merge overlay. +New roadmap note: [docs/function-knowledge-roadmap.md](docs/function-knowledge-roadmap.md) now turns the current decompilation state into a concrete path toward broad function coverage, with explicit completion criteria, lane priorities, and batch rules. The same note now also records the latest applied process-family rename work: `1100:0437` = `SurrenderProcess_Destroy`, `1100:0913` = `NPC_DoRandomIdleAnimTwiceIfNotBusy`, `1100:0d3e` = `LoiterProcess_VtableSlot10DispatchByShapeIfAlive`, `1100:0fe8` = `PaceProcess_Destroy`, `1100:0f95` = `GuardProcess_Destroy`, `1100:0f47` = `LoiterProcess_Destroy`, `1100:1036` = `StandProcess_Destroy`, `1100:1084` = `NPCActionProcess_RunNoop`, `1100:1089` = `NPCActionProcess_Destroy`, `1100:0fe3` = `NPCActionProcess_VtableSlot10Noop`, `1128:1e14` = `CruHealer_Destroy`, `1128:1fbe` = `BatteryChargerProcess_Destroy`, `1128:22ca` = `DeathSilenceProcess_Destroy`, `1110:0f19` = `PathfinderProcess_Destroy`, `1090:0aaf` = `TeleporterProcess_Destroy`, `1090:0a60` = `EggHatcherProcess_Destroy`, `1020:087e` = `MapJumpProcess_Destroy`, `1028:06bd` = `FadeProcess1_Destroy`, `1030:03cc` = `AnimProcess_Destroy`, `1058:08fc` = `SnapProcess_Destroy`, `10a0:4437` = `ItemProcess_Destroy`, `1138:0819` = `SuperSpriteProcess_Destroy`, `1150:32d3` = `OneFrameDelayProc_Destroy`, `1180:1e0a` = `CameraProcess_Destroy`, `11b8:0293` = `KeyDaemonProcess_Destroy`, `11b8:04c5` = `KeyboardProcess_Destroy`, `11c0:06df` = `AccWaitProcess_Destroy`, `11c0:0748` = `SystemTimerProcess_RunNoop`, `11c0:074d` = `SystemTimerProcess_Destroy`, `11c8:03fd` = `BiosProcess_Destroy`, `13b8:012e` = `CustomWaitProcess_Destroy`, `1430:0363` = `DumbTimerProcess_Destroy`, `1438:0557` = `CycleProcess_Destroy`, `1440:0f67` = `FadeProcAlt_Destroy`, `1468:4322` = `MyTimerProcess_Destroy`, `1468:0494` = `VideoPlayer_Destroy`, `1468:03e3` = `VideoPlayer_InitializePlayback`, `1468:2f7c` = `VideoPlayer_OpenMediaFiles`, `1468:32cb` = `VideoPlayer_AllocPlaybackBuffers`, `1468:3904` = `VideoPlayer_OpenMoviListAndPrimeStreams`, `1468:0483` = `VideoPlayer_StopAndDestroyWrapper`, `1468:431d` = `VideoPlayerProcess_VtableSlot11Noop`, `1468:001a` = `File_Exists`, `1468:03b4` = `VideoPlayer_FormatErrorMessage`, `1468:17b0` = `VideoPlayer_AdvanceChunkCursor`, `1468:1d3d` = `VideoPlayer_AdvanceChunkCursorWrapper`, `1468:1ef7` = `VideoPlayer_LoadAudioChunk`, `1468:1929` = `VideoPlayer_LoadVideoChunk`, `1468:1a92` = `VideoPlayer_BlitDecodedFrame`, `1030:0428` = `GameTimeProcess_Destroy`, `1030:03c7` = `AnimProcess_RunNoop`, `1048:0d3e` = `Process1048_0000_RunNoop`, `1048:0d43` = `Process1048_0000_Destroy`, `1050:051f` = `SavegameSlot_GetLabelPtr`, `1050:0532` = `SavegameSlot_SetLabel`, `1050:057e` = `File_CloseAndMaybeFree`, `10c0:00b9` = `MapJumpProcess_VtableSlot10AdvanceItemFind`, `10e8:4192` = `AnimPrimitiveProcessSomethingElse_Destroy`, `10f8:0120` = `ItemScript_AppendBytes`, `10f8:0161` = `ItemTypeflagRecord_ResetDefaults`, `1150:2f20` = `AnimPrimitiveProcessFamily_VtableSlot11CallSlot3`, `1188:0057` = `Process1188_0000_RunOnTimerDelta`, `1188:0979` = `Process1188_0000_Destroy`, `11c0:0483` = `WaitProcessFamily_VtableSlot10DispatchByPair`, `11c0:0691` = `WaitProcess_Destroy`, `11c0:02bf` = `AccWaitProcess_VtableSlot10DispatchByAnimation`, `1138:0444` = `SpriteProcess_Destroy`, `12e0:0151` = `ASS_StoreInitCallbackState`, `13c8:03f5` = `MainMenu_Destroy`, `13c8:04ee` = `MainMenu_DrawCornerDecorations`, `13c8:06a4` = `MainMenu_HandleButtonClick`, `13c8:06cd` = `MainMenu_HandleKey`, `13c8:082e` = `MainMenu_ActivateSelection`, `13c8:0ce7` = `MainMenuOptionButtonGump_Create`, `13c8:0dc0` = `MainMenuOptionButtonGump_HandlePointerEvent`, `13c8:0e2d` = `MainMenuOptionButtonGump_SelectPeer`, `13c8:0e94` = `MainMenuOptionButtonGump_Draw`, `13c8:0ece` = `MainMenuOptionsPanel_Create`, `13d0:0000` = `SavegameNameField_MapInputChar`, `13d0:0226` = `SavegameMenu_Destroy`, `13d0:02cb` = `SavegameMenu_HandleKey`, `13d0:03dd` = `SavegameMenu_HandleSlotAction`, `13d0:058c` = `SavegameSlot_DrawCornerDecorations`, `13d0:074e` = `SavegameSlotGump_Create`, `13d0:0841` = `SavegameSlotGump_Destroy`, `13d0:08a8` = `SavegameNameField_HandleKey`, `13d0:0b0a` = `SavegameSlot_HandleClick`, `13d0:0b89` = `SavegameSlot_BeginEditOrActivate`, `13d0:0cd5` = `SavegameNameField_Draw`, `13d0:0e18` = `SavegameSlot_Select`, `11c8:03c9` = `BiosProcess_VtableSlot10DosRealFarCall`, `1108:2259` = `AttackProcess_VtableSlot10DispatchByClip`, `1030:0183` = `AnimProcess_VtableSlot10DispatchByPort`, `1300:0d4e` = `BaseCameraProcess_VtableSlot10SetViewportRect`, `1300:0d76` = `BaseCameraProcess_VtableSlot11FreeBuffer`, `13b8:021a` = `CustomWaitProcess_VtableSlot11ArmAndRun`, `1440:03a0` = `FadeProcess2_VtableSlot10BlendTowardTargetPalette`, `1448:08fd` = `FlicPlayProcess_Destroy`, `1448:3290` = `FlicWaitProcess_Destroy`, `11f8:00a4` = `MusicPlayerProcess_RunNoop`, `11f8:035e` = `MusicPlayerProcess_Destroy`, `11f8:028e` = `Music_RestorePreviousTrackFromStack`, `11f8:02bf` = `Music_LoadStateAndReplayCurrentTrack`, `11f8:0311` = `Music_SaveState`, `12e0:0267` = `AssProcess_Destroy`, `1448:00eb` = `FlicWaitProcess_VtableSlot10TickAndMaybeAdvance`, `11f8:00a9` = `MusicPlayerProcess_VtableSlot10Noop`, `12e0:00ed` = `AssProcess_VtableSlot5ClearCreatedFlag`, `12e0:0105` = `AssProcess_VtableSlot6SetCreatedFlag`, `1020:08cd` = `Process_VtableSlot4Noop`, `1020:08d2` = `Process_VtableSlot8Noop`, `1028:0724` = `Process_VtableSlot9ReturnZero`, `1468:0114` = `MyTimerProcess_VtableSlot10IncrementCounterOnTick`, `11f0:02b9` = `StdIntHandlerProcess_Destroy`, `12f8:0530` = `GumpShared_DestroyNoop`, `12f8:0544` = `KeyboardInputHandler_DestroyNoop`, `12f8:0553` = `GumpShared_VtableSlot10Noop`, `12f8:0578` = `KeyboardInputHandler_VtableSlot10Noop`, `12f8:057d` = `KeyboardInputHandler_VtableSlot11Noop`, `1308:0616` = `ButtonGump_Destroy`, `13c0:04ee` = `KeypadGump_Destroy`, `13c0:0a94` = `KeypadButtonGump_Destroy`, `13e8:3aae` = `HelpGump_Destroy`, `13e8:3ba5` = `HelpGump_RefreshPage`, `13e8:3d53` = `HelpGump_HandleAdvanceAction`, `13e8:3d99` = `HelpGump_HandleNavigationKey`, `13e8:3ec8` = `HelpGump_RunAmbientSfxTick`, `13e8:3fd8` = `RunCreditsProcess_Destroy`, `13f8:01e9` = `QuickSaveLoadExitGump_Destroy`, `13f8:0510` = `Gump13f80383_Destroy`, `13f8:058c` = `Gump13f80383_Draw`, `13f8:05c6` = `Gump13f80383_VtableSlot10Noop`, and `13f8:05cb` = `Gump13f80383_VtableSlot11Noop`. That work is now live in Ghidra, and it also confirms the practical write-path rule for future work: read-only MCP analysis can stay on the live GUI session, while live write-capable scripts can land small verified rename/comment batches when the simpler edit-plan route refuses to commit. + +Latest broad-sweep correction batch: several previously over-specific gump no-op names were generalized after direct table evidence showed they are shared across multiple gump families, not keyboard-only handlers. The live database now carries `12f8:0535 = GumpShared_VtableSlot3Noop`, `12f8:0544 = GumpShared_VtableSlot7Noop`, `12f8:0549 = GumpShared_VtableSlot8Noop`, `12f8:054e = GumpShared_VtableSlot9Noop`, `12f8:0578 = GumpShared_VtableSlot16Noop`, and `12f8:057d = GumpShared_VtableSlot17Noop` from direct `g_helpGumpFnPtr` / `g_gump13f80383FnPtr` slot reuse at `1478:6241` and `1478:6346`. + +Latest broad-sweep UI follow-up: the same UI-heavy lane is now tighter in three more local families without requiring deeper subsystem claims. The live database now carries `12f8:02e4 = GumpShared_DestroyCommon`, `13f8:0237 = QuickSaveLoadExitGump_HandleChildButtonEvent`, `13f8:0299 = QuickSaveLoadExitGump_HandleKey`, `13f8:0349 = QuickSaveLoadExitGump_DrawLabel`, `13f8:0383 = QuickSaveLoadExitGump_Create`, `13c8:2f37 = MainMenuOptionsPanelButtonGump_Create`, `13c8:2fca = MainMenuOptionsPanelButtonGump_DrawLabel`, `13c8:3004 = MainMenuOptionsPanelButtonGump_Select`, `13c8:3030 = MainMenuOptionsPanelButtonGump_Deselect`, `13c8:1759 = MainMenuOptionsMenu_Destroy`, `13c8:17c5 = MainMenuOptionsMenu_Create`, `13c8:1e62 = MainMenuOptionsMenu_GetOptionRect`, `13c8:2975 = MainMenuOptionsMenu_HandleChildButtonEvent`, `13c8:29b3 = MainMenuOptionsMenu_HandleKey`, `13c8:2b16 = MainMenuOptionsMenu_DrawTitle`, and `13c8:2c56 = MainMenuOptionsMenuButtonGump_DrawLabel`. Current best read is that `12f8:02e4` is the shared gump base destroy path used by multiple UI families, the `13f8:` mini-cluster is the quick save/load/exit modal's constructor-plus-local input/draw surface, the `13c8:2f37..3030` cluster is the options-panel-specific button wrapper layered over the generic `1308:` button-gump create path, and the separate `13c8:1759..2c56` lane is now clearly the main options-menu create/destroy/input surface because its teardown path saves the current options back to config before the shared gump cleanup. + +Recent retail debugger-entry follow-up: [docs/retail-debugger-entry-options.md](docs/retail-debugger-entry-options.md) now consolidates the hidden-debugger entry question with the newer live Ghidra evidence instead of leaving it split across the older `-debug` and patch-attempt notes. Current best read is now tighter in three ways: first, fresh data-use recovery still finds reads but no writer for the debugger-state global at `1478:659c/659e`; second, fresh decompiles of `usecode_debugger_open_for_current_unit`, `usecode_debugger_open_modal`, `usecode_debugger_gump_create`, and `usecode_debugger_handle_event` confirm that the debugger UI and event bundle are real but only meaningful after a valid break-state object/gump already exists; and third, the retail `-u` override remains the lowest-risk non-EXE experiment surface but still does not currently show a script-visible way to construct the seg1408 break-state object or write the required global pointer. The resulting priority order is now explicit: prefer a focused No Regret / JP No Remorse bootstrap comparison first, keep `-u` plus a replacement `EUSECODE.FLX` as the least invasive indirect experiment surface second, and treat the current interpreter-callsite-retarget patch family as the smallest structurally defensible retail EXE path only if cross-build comparison fails to reveal a smaller missing bootstrap. + +Recent No Regret debugger follow-up: [docs/regret-hidden-debugger-investigation.md](docs/regret-hidden-debugger-investigation.md) now also records the first forcing-options pass instead of stopping at structural recovery. Current best read is that Regret is now the first build where a practical forced debugger bring-up looks realistically hackable without rebuilding the subsystem: executable patching is the strongest route because Regret already has the bootstrap, the live vtable override, and the interpreter-side auto-open path; live memory forcing is plausible if the debugger object already exists; and usecode remains useful only as a hybrid context-generator after code or memory has already armed the debugger, not yet as a pure launcher. + +Recent JP hidden-debugger follow-up: [docs/jp-remorse-hidden-debugger-investigation.md](docs/jp-remorse-hidden-debugger-investigation.md) now records the first debugger-focused comparison pass on `/ja/CRUSADER.EXE`. Current best read is narrower than the No Regret result but still useful: the JP Win32 build clearly retains broad executable cheat/debug features, but this pass did not recover the classic hidden usecode-debugger UI signature bundle. Live byte searches on the active JP image found known positive-control strings like `JASSICA16`, `Immortality enabled.`, and `Cheats are now active.`, but returned no hits for the debugger-only strings `Goto Line`, `Watch what?`, `Inspect what?`, `Global name`, `Search for`, `FILE NOT FOUND`, `Unable to open this file`, `Nothing to find`, `Not found`, and `Done`. The practical outcome is that JP currently strengthens the `broad cheat/debug support survived in Win32` story, but not the `JP preserved the missing retail debugger bootstrap` theory; No Regret remains the stronger sibling-build anchor for the hidden-debugger unlock problem. + Recent verified batch: [docs/retail-debug-arg.md](docs/retail-debug-arg.md) now records the live NE proof that retail `CRUSADER.EXE` still recognizes and executes a real `-debug` command-line branch. That branch prints `Debugging mode ON.`, sets `g_debugMsgLevel` at `1478:87e0`, and toggles two debug globals at `1478:0845/0859`. The later sink pass also closes the text-output target more tightly: `ProbablyPrintDebugMessage` formats through the static stdio-style table at `1478:6c32..6c81` and writes to the handle-`1` entry at `1478:6c46`, so the non-video side is ordinary DOS `stdout` gated by the debug threshold, plus the already-confirmed AVI timing overlay. Current best read remains `surviving debug-output / instrumentation switch`, not `the missing bootstrap for the hidden seg109/seg1408 usecode debugger`. The same batch also leaves the earlier `-laurie` and `0x659c/659e` debugger-state conclusions intact: `-debug` is a separate switch and is not currently evidenced as constructing the hidden usecode-debugger break-state object. Recent tooling batch: [docs/map-rendering.md](docs/map-rendering.md) now starts a dedicated offline map-rendering lane. `tools/render_crusader_map.py` can load `FIXED.DAT`, expand `GLOB.FLX`, decode the required `SHAPES.FLX` entries with Crusader frame headers, apply `GAMEPAL.PAL`, and write a first-pass PNG, with a `--fixed-dat` override so the same pipeline can be pointed at either game's map file. The current renderer is intentionally limited to fixed-map content and a simple deterministic painter rather than the full Pentagram/ScummVM dependency sorter, and the current workspace caveat is that `STATIC_REGRET` still lacks a copied `FIXED.DAT`, so No Regret rendering needs that file supplied explicitly. @@ -85,6 +97,7 @@ Latest F7 overlay follow-up: new note [docs/f7-overlays.md](docs/f7-overlays.md) | [docs/f7-overlays.md](docs/f7-overlays.md) | Focused note on the three cheat-gated F7 debug overlays: toggle sites, live consumers, recovered geometry math, what each overlay represents, and the current viewer-safe reproduction rules | | [docs/jp-remorse-windows9x-investigation.md](docs/jp-remorse-windows9x-investigation.md) | Focused note on the Japanese `/ja/CRUSADER.EXE` Windows-native claim: PE/Win32 image evidence, Win32 windowing, DirectDraw/DirectSound, registry config under `J1.21`, IME/DBCS clues, and the GetVersion-driven Win9x compatibility branch | | [docs/jp-remorse-cheats-and-launch-params.md](docs/jp-remorse-cheats-and-launch-params.md) | Focused note on surviving JP `/ja/CRUSADER.EXE` cheat/debug and startup-argument lanes: `-laurie`, `JASSICA16`, immortality, the recovered Win32 parser table, the live `-u` usecode override, and the current caution that JP `-warp` is only directly proven in mission-only form | +| [docs/jp-remorse-hidden-debugger-investigation.md](docs/jp-remorse-hidden-debugger-investigation.md) | Focused first pass on whether the JP Win32 build kept the classic hidden usecode debugger: positive-control hits for surviving cheat/debug strings, but no live hits for the debugger-only UI string bundle (`Goto Line`, `Watch what?`, `Inspect what?`, `Global name`, `Search for`, `FILE NOT FOUND`, `Unable to open this file`, `Nothing to find`, `Not found`, `Done`) | | [docs/spanish-cheat-differences.md](docs/spanish-cheat-differences.md) | Focused comparison note for `/es/CRUSADER.EXE` versus the English build's known cheat/debug lanes: `-laurie`, broad cheat gate, gameplay-input gate, low-level keyboard latch, `Ctrl+Q`, Hack Mover, and the current status of the unresolved secret sequence | | [docs/raw-porting-progress.md](docs/raw-porting-progress.md) | seg091 RNG, 0x4588 callback lifecycle batches 1-6, 0007 gameplay helper batches, snap_entity_to_ground, AI sweep, animation/range/command globals, seg043 boundary recovery | | [docs/raw-000e.md](docs/raw-000e.md) | 000e parser helper cluster (record table init/parse/dispatch), 000e RIFF/animation cluster (animation object field map, RIFF format, constructor variants) | @@ -92,9 +105,12 @@ Latest F7 overlay follow-up: new note [docs/f7-overlays.md](docs/f7-overlays.md) | [docs/raw-0008-000c.md](docs/raw-0008-000c.md) | 0008 dispatch helpers (init, pair-sync, flag helpers, word-list, gate-callbacks) and 000c state machine (tick dispatch, flag guards, palette fade, mini-VM, cursor nav) | | [docs/raw-000a-000d.md](docs/raw-000a-000d.md) | 000d proximity/visibility buckets, 000a tracked handles, cache manager, init/shutdown, seg082 allocator, seg137/138 palette helpers, seg004/005 startup, 0x4588 object-role evidence, 000d VM owner/resource loader follow-up | | [docs/far-call-targets.md](docs/far-call-targets.md) | Top-104 most-called far-call targets (Tiers 1-5, ranks 1-104), supporting functions discovered, analysis gaps and seg043 reconciliation | +| [docs/function-knowledge-roadmap.md](docs/function-knowledge-roadmap.md) | Concrete path to broad function coverage: completion criteria, prioritized workstreams, write-path discipline, staged rename batches, and immediate next steps | | [docs/crusader-disasm-reference.md](docs/crusader-disasm-reference.md) | Local auxiliary disassembly corpus at `K:/ghidra/crusader-disasm`: handwritten notes, shape tables, map dumps, opcode lists, intrinsic/function dumps, and the safe reuse rules for porting into `CRUSADER.EXE` | | [docs/ne-hole-filling-priorities.md](docs/ne-hole-filling-priorities.md) | Ranked `CRUSADER.EXE` hole-filling tracker: NE-side unclear lanes, the verified raw-side knowledge that can close them, and the recommended order for old-to-new porting passes | | [docs/retail-debugger-patch-attempts.md](docs/retail-debugger-patch-attempts.md) | Chronological log of retail `CRUSADER.EXE` debugger-unlock patch attempts, byte-level designs, runtime failures, root-cause findings, and the current live candidate | +| [docs/retail-debugger-entry-options.md](docs/retail-debugger-entry-options.md) | Focused retail hidden-debugger entry analysis: fresh live-Ghidra proof that `1478:659c/659e` still lacks a recovered writer, what the seg109 wrappers and gump constructor now prove about real reachability, why `-u` is the best low-risk experiment surface but still not a direct debugger bootstrap, and why No Regret / JP comparison is now the preferred next move | +| [docs/regret-hidden-debugger-investigation.md](docs/regret-hidden-debugger-investigation.md) | Focused live `REGRET.EXE` hidden-debugger comparison: recovered wrapper/gump/dispatcher equivalents, the seg13e0 break-state family, the seg13f0 interpreter-side consumer, the debugger global at `1480:712c/712e`, and the compact bootstrap stub at `1398:0000` that writes that global | | [docs/retail-debug-arg.md](docs/retail-debug-arg.md) | Focused note on the retail `-debug` command-line switch: live parser evidence, exact startup message, surviving globals, segment `1468` instrumentation path, and why it is currently separate from the hidden usecode debugger bootstrap | | [docs/startup-map-patch-file.md](docs/startup-map-patch-file.md) | Focused note on the retail `Using map patch file.` startup line: exact `Init_Everything` print gate, `static\fixed.dat` detection, the later `ItemCache_InitAndLoadFixedDat` archive load, and the current evidence that fixed-map reads prefer the alternate archive when present | | [docs/remorse-class-candidate-inventory.md](docs/remorse-class-candidate-inventory.md) | Evidence-backed inventory of the strongest current Remorse class families, with confidence, ctor/dtor/vtable/layout anchors, and recommended modeling order for later Ghidra class work | diff --git a/crusader_segment_coverage_ledger.csv b/crusader_segment_coverage_ledger.csv index 67db405..0d9a02f 100644 --- a/crusader_segment_coverage_ledger.csv +++ b/crusader_segment_coverage_ledger.csv @@ -30,8 +30,8 @@ "29","code","0x5C400","0x190A","Partial","Area-search collision move and step-aware sweep helper lane","AreaSearch_CollideMove; AreaSearch_SweepShapeBetweenPoints; AreaSearch_SweepItemToPointWithStepUp; AreaSearch_SweepShapeBetweenPointsWithStepUp","Current direct callers are still all movement/collision-side and the remaining gap is the earlier policy layer deciding when those paths instantiate the 0x236 queue or whether any non-collision lane feeds it","plan-mid.md; docs/ne-hole-filling-priorities.md; docs/raw-0008-000c.md" "30","code","0x5E000","0x5071","None","","","","crusader_ne_segments.csv" "31","code","0x64000","0x6EE","Partial","StorageDataProcess queue create/run/release helpers","StorageDataProcess_Create; StorageDataProcess_Run; StorageDataProcess_Release; StorageDataProcess_RunAndTerminateProcs; storage_process_ref_list_create; storage_process_ref_list_append; storage_process_ref_list_terminate_item_matches; storage_process_ref_list_destroy","Still needs caller-side recovery beyond the verified collision producer and any stronger subsystem naming than the local hit/got-hit storage queue","plan-mid.md; docs/ne-hole-filling-priorities.md; docs/raw-0008-000c.md" -"32","code","0x64800","0x56A","None","","","","crusader_ne_segments.csv" -"33","code","0x65000","0x10D7","None","","","","crusader_ne_segments.csv" +"32","code","0x64800","0x56A","Foothold","Item type / typename.dat loader helpers","ItemType_Init; ItemType_LoadTypeflagDat; ItemType_Load_TypenameDat; ItemType_GetTypenameRecordPtrAtIndex; ItemType_FindTypenameRecordIndex; Item_GetShapeFamilyOfShape","The segment is now clearly an item-type helper lane. The remaining gap is not local contract recovery but broader caller-side integration and any later higher-level item-family helpers that still sit outside this small loader-focused window.","plan-mid.md; docs/function-knowledge-roadmap.md" +"33","code","0x65000","0x10D7","Partial","NPC action / stand / pace / surrender / guard / loiter AI processes","NPCActionProcess_Create; NPCActionProcess_RunNoop; NPCActionProcess_Destroy; NPCActionProcess_VtableSlot10Noop; StandProcess_Run; StandProcess_Destroy; PaceProcess_CreateProcess; PaceProcess_Run; PaceProcess_Destroy; SurrenderProcess_CreateProcess; SurrenderProcess_Destroy; SurrenderProcess_Run; GuardProcess_CreateProcess; GuardProcess_Run; GuardProcess_Destroy; LoiterProcess_CreateProcess; LoiterProcess_Run; LoiterProcess_Destroy; LoiterProcess_VtableSlot10DispatchByShapeIfAlive; NPC_DoRandomIdleAnimTwiceIfNotBusy","The live AI-process lane now has run ownership, slot-1 destructor ownership, and the local slot-10 helper split grounded in the database. The remaining uncertainty in this immediate window is mostly higher-level behavior-policy meaning, especially what the slot-10/slot-11 transitions represent semantically beyond the now-named local function objects.","plan-mid.md; docs/function-knowledge-roadmap.md" "34","code","0x66600","0x253A","None","","","","crusader_ne_segments.csv" "35","code","0x69400","0xF67","None","","","","crusader_ne_segments.csv" "36","code","0x6A600","0x69F","None","","","","crusader_ne_segments.csv" @@ -120,13 +120,13 @@ "119","code","0xBE200","0x419","None","","","","crusader_ne_segments.csv" "120","code","0xBE800","0x9AE","None","","","","crusader_ne_segments.csv" "121","code","0xBF400","0xACE","None","","","","crusader_ne_segments.csv" -"122","code","0xC0200","0x3149","None","","","","crusader_ne_segments.csv" -"123","code","0xC3C00","0xE6D","None","","","","crusader_ne_segments.csv" +"122","code","0xC0200","0x3149","Partial","Main menu shell plus options-panel and options-menu helpers","MainMenu_Destroy; MainMenu_DrawCornerDecorations; MainMenu_HandleButtonClick; MainMenu_HandleKey; MainMenu_ActivateSelection; MainMenuOptionsPanel_Create; MainMenuOptionButtonGump_Create; MainMenuOptionButtonGump_HandlePointerEvent; MainMenuOptionButtonGump_SelectPeer; MainMenuOptionButtonGump_Draw; MainMenuOptionsPanelButtonGump_Create; MainMenuOptionsPanelButtonGump_DrawLabel; MainMenuOptionsPanelButtonGump_Select; MainMenuOptionsPanelButtonGump_Deselect; MainMenuOptionsMenu_Create; MainMenuOptionsMenu_Destroy; MainMenuOptionsMenu_GetOptionRect; MainMenuOptionsMenu_HandleChildButtonEvent; MainMenuOptionsMenu_HandleKey; MainMenuOptionsMenu_DrawTitle; MainMenuOptionsMenuButtonGump_DrawLabel","The segment now has a broad structural map for the main-menu shell and two adjacent option-oriented families, but several sibling methods and subordinate dialog/menu roles still need caller-side recovery or stronger local-family placement","plan-mid.md; docs/function-knowledge-roadmap.md; crusader_decompilation_notes.md" +"123","code","0xC3C00","0xE6D","Partial","Savegame UI helper and slot-edit lane","SavegameNameField_MapInputChar; SavegameMenu_Destroy; SavegameMenu_HandleKey; SavegameMenu_HandleSlotAction; SavegameSlot_DrawCornerDecorations; SavegameSlotGump_Create; SavegameSlotGump_Destroy; SavegameNameField_HandleKey; SavegameSlot_HandleClick; SavegameSlot_BeginEditOrActivate; SavegameNameField_Draw; SavegameSlot_Select","The local helper/gump lane is now broadly named; remaining work is higher-level menu semantics rather than anonymous helper cleanup inside this segment","plan-mid.md; docs/function-knowledge-roadmap.md; crusader_decompilation_notes.md" "124","code","0xC4E00","0x3DD","None","","","","crusader_ne_segments.csv" "125","code","0xC5400","0x1A3E","None","","","","crusader_ne_segments.csv" "126","code","0xC7400","0x402A","Partial","Transition-entry wrappers, pre-entry setup/script, and exit control","FUN_000c_7412; transition_preentry_setup_resources; transition_preentry_release_resources; transition_preentry_run_until_complete_or_abort; transition_preentry_step_script; wait_for_vga_vertical_retrace; thunk_callf_0000_ffff_000c_827d; thunk_callf_0000_ffff_000c_82f9; FUN_000c_834a","The seg126 helper family is structurally recovered and now ties into a paired temporary text-renderer lane at 0x8c5c/0x8c60, a shared async break/hold depth at 0x31a2 whose outer-loop exit test is visible at 000c:ca11, and the shared active-dispatch owner at 0x6828 whose +0x40 byte is raised immediately after the DS:0x6341 animation ctor path; remaining open work is the exact UI role of the renderer pair, the unresolved script bytes beyond the now-anchored fade controls, and the separate oversized overlap rooted at 000c:db68","crusader_decompilation_notes.md; plan-mid.md" "127","code","0xCC600","0x8F6","Partial","Palette fade controller and transition-state gate","palette_fade_begin_full_up; palette_fade_begin_full_down; transition_palette_fade_begin; transition_palette_fade_tick; transition_palette_fade_out_step; transition_palette_fade_in_step","Exact higher-level transition states and palette-source owners are still unresolved, but the local fade controller, default fade entry paths, active/direction state at 0x630a/0x630b, and the seg126 script-byte selectors 0x5e -> full-down / 0x26 -> full-up (with 0x2a sharing the same post-fade bookkeeping path) are now clear","crusader_decompilation_notes.md; plan-mid.md" -"128","code","0xCD200","0x5D0","None","","","","crusader_ne_segments.csv" +"128","code","0xCD200","0x5D0","Foothold","Quick save/load/exit modal and adjacent compact gump helpers","QuickSaveLoadExitGump_Destroy; QuickSaveLoadExitGump_Create; QuickSaveLoadExitGump_HandleChildButtonEvent; QuickSaveLoadExitGump_HandleKey; QuickSaveLoadExitGump_DrawLabel; Gump13f80383_Destroy; Gump13f80383_Draw; Gump13f80383_VtableSlot10Noop; Gump13f80383_VtableSlot11Noop","Several sibling methods in the compact gump lane are still anonymous or only structurally understood, so this segment is not yet a full dialog-family closure","plan-mid.md; docs/function-knowledge-roadmap.md; crusader_decompilation_notes.md" "129","code","0xCDA00","0xD77","None","","","","crusader_ne_segments.csv" "130","code","0xCEA00","0x47D","None","","","","crusader_ne_segments.csv" "131","code","0xCF000","0x44D","None","","","","crusader_ne_segments.csv" diff --git a/docs/dosbox-x.debugger.md b/docs/dosbox-x.debugger.md new file mode 100644 index 0000000..1b2054c --- /dev/null +++ b/docs/dosbox-x.debugger.md @@ -0,0 +1,182 @@ +Information about the DOSBox-X Debugger + +Debugger interface +------------------ + +In builds where it is enabled, DOSBox-X supports breaking into the debugger +interface, which is shown on the console. + +A mapper shortcut is provided to break into the debugger on demand. Normally +this shortcut is set to Alt+Pause (Mac: Alt+F12). + +In Windows, DOSBox-X can create a console and show the debugger interface +on it. + +On other systems including Linux and Mac OS X, DOSBox-X must be started +from a terminal in order to enable the debugger. + +The debugger interface should scale and respond to resizing of the +terminal window. + +WARNING: Fitting to the window was added in DOSBox-X. The debugger + interface in DOSBox SVN requires a minimum terminal window + size to function, and may segfault if the terminal is too + small. + +The debugger interface is written against the "ncurses" library. + +The window regions of the debugger interface are: + - Register Overview + - Data view + - Code Overview + - Variable (not shown by default) + - Output + +The register window will show at all times the contents of the CPU +registers and segment registers as well as other important CPU +state. + +Data view allows viewing the contents of memory while debugging. +The location shown is controlled by a segment:offset pair. + +In DOSBox-X, the Data view also permits viewing data as a linear +(pageable) offset and as a physical memory view (outside the +CPU's paging control). + +The code overview/disassembly window shows the contents of a +memory location as disassembled x86 instructions. Normally, this +is set to the instruction pointer, but it can be set anywhere. +Decoding is based on the CPU mode. + +The variable list is used when the debugger is given variables +to debug by. + +The output window allows you to scroll through the last 1000 +or so log messages written from within the codebase by LOG() +or LOG_MSG(). If the window is scrolled to the bottom, new +messages will appear by default. + +The lowest row of the terminal is reserved for a line where +the user can enter debugger commands. An underscore shows +where the cursor is positioned. + +The code and data views have been fixed in DOSBox-X to indicate +when data is not available to view for a specific segment:offset +or linear address. + +If the CPU is in protected mode, and the segment portion refers +to a segment that does not exist, or the offset extends past +the limit of that segment, the code or data view will show +'na' instead of a byte value. + +If 80386 paging is enabled, and the segment:offset or linear +address refers to a page that is not present, then the data +view will show 'pf' to indicate this. + + na = segment does not exist, or offset exceeds segment limit + + pf = segment:offset or linear address is paged out or + not present according to page tables. + +Debugging a program and breaking on start +----------------------------------------- + +DOSBox-X includes a built-in command to launch a program and +break at the entry point. + +DEBUGBOX [command] [options] + +You can also type DEBUGBOX without a parameter to start the +debugger. + +Debugger keyboard shortcuts +--------------------------- + +Tab/Shift+Tab Switch to the next/previous window +F3/F6 Previous command in history +F4/F7 Next command in history +F5 Resume emulation +F8 Toggle printable characters display in data view +F9 Set/clear breakpoint +F10 Single step (over) +F11 Single step (into) +Up arrow Scroll up one line (if applicable) +Down arrow Scroll down one line (if applicable) +Left arrow Move cursor left in command line +Right arrow Move cursor right in command line +Page Up/Fn+Up Scroll up by window height (if applicable) +Page Down/Fn+Down Scroll down by window height (if applicable) +Home/Fn+Left Scroll to top (in Output window) +End/Fn+Right Scroll to bottom (in Output window) +Insert Toggle insert/overwrite mode in command line +Alt+D Set data view to DS:SI +Alt+E Set data view to ES:DI +Alt+X Set data view to DS:DX +Alt+B Set data view to ES:BX +Alt+S Set data view to SS:SP + +Debugger commands +----------------- + +MOVEWINDN Move current window down +MOVEWINDU Move current window up +SHOWWIN Show window (by name) +HIDEWIN Hide window (by name) +MEMDUMP Dump memory to file (MEMDUMP.TXT) +MEMDUMPBIN Dump memory to file (MEMDUMP.BIN) +IV Insert variable +SV Save variables to +LV Load variables from +SR Set register value to +SM [bytes in hex] Set memory at : to byte values given +BP Add breakpoint (real mode) +BPM Add breakpoint (protected mode) +BPLM Add breakpoint (linear/virtual address) +BPINT Add breakpoint on interrupt +BPINT Add breakpoint on interrupt and AH= +BPLIST List breakpoints +BPDEL Delete breakpoint +RUN Resume emulation +RUNWATCH Resume emulation, but show state while running +A20 Show A20 gate state +A20 ON Turn on A20 gate +A20 OFF Turn off A20 gate +PIC Show interrupt controller state +PIC MASKIRQ Mask IRQ at interrupt controller +PIC UNMASKIRQ Unmask IRQ at interrupt controller +PIC ACKIRQ Acknowledge IRQ at interrupt controller +PIC LOWERIRQ Manually lower interrupt signal +PIC RAISEIRQ Manually raise interrupt signal +C Set code view to address +D Set data view to address (segment:offset) +DV Set data view to address (linear/virtual address) +DP Set data view to address (physical) +LOG Log CPU state, for the specified number of instructions, to LOGCPU.TXT +LOGS Log CPU state, short log, to LOGCPU.TXT +LOGL Log CPU state, long log, to LOGCPU.TXT +INTT Trace interrupt +INT Start interrupt +CALLBACKS Show callbacks of interrupts. +SELINFO Show selector information +DOS MCBS Dump DOS kernel MCB chain (conventional memory allocation chain) +DOS KERN Dump DOS kernel memory allocation list +DOS XMS Dump XMS (extended memory) allocation list +DOS EMS Dump EMS (expanded memory) allocation list +BIOS MEM Dump BIOS allocation and layout list +GDT Dump GDT (global descriptor table) +LDT Dump LDT (local descriptor table) +IDT Dump IDT (interrupt descriptor table) +PAGING Dump page table information +CPU Dump additional CPU information +VGA cmd VGA related debugging commands. +PC98 cmd PC98 related debugging commands. +EMU MEM/MACHINE Show emulator memory or machine info. +INTVEC Dump interrupt vector table to +INTHAND Set code view to start of interrupt handler +EXTEND Toggle additional information +TIMERIRQ Start timer IRQ +TIME