Document known door flags, door modes and door types
This commit is contained in:
parent
b852ba5cb8
commit
89795acd69
|
|
@ -1633,7 +1633,7 @@ u8 func0409_tech_conversation[] = {
|
|||
chr_toggle_p1p2(CHR_SELF)
|
||||
set_target_chr(CHR_P1P2)
|
||||
if_chr_activated_object(CHR_TARGET, 0x11, /*goto*/ 0x00)
|
||||
if_door_state(0x11, DOORSTATEBIT_OPEN, /*goto*/ 0x00)
|
||||
if_door_state(0x11, DOORSTATE_OPEN, /*goto*/ 0x00)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
|
||||
dprint 'T','E','C','H',' ','1',' ','L','O','O','P','\n',0,
|
||||
set_chr_chrflag(CHR_TECH1, CHRCFLAG_INVINCIBLE_TO_GUNFIRE)
|
||||
|
|
|
|||
|
|
@ -2879,7 +2879,7 @@ u8 func1017_laser5[] = {
|
|||
open_door(0x13)
|
||||
|
||||
beginloop(0x05)
|
||||
if_door_state(0x13, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x31)
|
||||
if_door_state(0x13, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x31)
|
||||
endloop(0x05)
|
||||
|
||||
label(0x31)
|
||||
|
|
@ -3540,7 +3540,7 @@ u8 func1018_safe_switch[] = {
|
|||
label(0x31)
|
||||
|
||||
beginloop(0x08)
|
||||
if_door_state(OBJ_SAFEDOOR, DOORSTATEBIT_CLOSING, /*goto*/ 0x31)
|
||||
if_door_state(OBJ_SAFEDOOR, DOORSTATE_CLOSING, /*goto*/ 0x31)
|
||||
reloop(0x08)
|
||||
|
||||
label(0x31)
|
||||
|
|
|
|||
|
|
@ -1529,16 +1529,16 @@ u8 func1017_check_lasers_closed[] = {
|
|||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_ALL_LASERS_DISABLED, TRUE, /*goto*/ 0x08)
|
||||
if_stage_flag_eq(STAGEFLAG_MEETING_HOLOGRAPHED, TRUE, /*goto*/ 0x08)
|
||||
if_door_state(OBJ_LASER_1A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_1A, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
unset_stage_flag(STAGEFLAG_LASERSET1_DISABLED)
|
||||
label(0x2c)
|
||||
if_door_state(OBJ_LASER_2A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_2A, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
unset_stage_flag(STAGEFLAG_LASERSET2_DISABLED)
|
||||
label(0x2c)
|
||||
if_door_state(OBJ_LASER_3A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_3A, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
unset_stage_flag(STAGEFLAG_LASERSET3_DISABLED)
|
||||
label(0x2c)
|
||||
if_door_state(OBJ_LASER_4A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_4A, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
unset_stage_flag(STAGEFLAG_LASERSET4_DISABLED)
|
||||
label(0x2c)
|
||||
endloop(0x04)
|
||||
|
|
@ -2844,28 +2844,28 @@ u8 func1023_hide_nbomb_crate[] = {
|
|||
u8 unregistered_function[] = {
|
||||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_LASERSET1_DISABLED, FALSE, /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_1A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_1A, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
open_door(OBJ_LASER_1A)
|
||||
open_door(OBJ_LASER_1B)
|
||||
open_door(OBJ_LASER_1C)
|
||||
open_door(OBJ_LASER_1D)
|
||||
label(0x2c)
|
||||
if_stage_flag_eq(STAGEFLAG_LASERSET2_DISABLED, FALSE, /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_2A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_2A, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
open_door(OBJ_LASER_2A)
|
||||
open_door(OBJ_LASER_2B)
|
||||
open_door(OBJ_LASER_2C)
|
||||
open_door(OBJ_LASER_2D)
|
||||
label(0x2c)
|
||||
if_stage_flag_eq(STAGEFLAG_LASERSET3_DISABLED, FALSE, /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_3A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_3A, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
open_door(OBJ_LASER_3A)
|
||||
open_door(OBJ_LASER_3B)
|
||||
open_door(OBJ_LASER_3C)
|
||||
open_door(OBJ_LASER_3D)
|
||||
label(0x2c)
|
||||
if_stage_flag_eq(STAGEFLAG_LASERSET4_DISABLED, FALSE, /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_4A, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(OBJ_LASER_4A, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
open_door(OBJ_LASER_4A)
|
||||
open_door(OBJ_LASER_4B)
|
||||
open_door(OBJ_LASER_4C)
|
||||
|
|
@ -2891,10 +2891,10 @@ u8 func1026_unlock_doors[] = {
|
|||
|
||||
// Wait until some door is not closed (so... opening, I guess?)
|
||||
beginloop(0x04)
|
||||
if_door_state(0x43, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x44, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x45, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x46, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x43, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x44, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x45, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x46, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
endloop(0x04)
|
||||
|
||||
// Unlock those doors
|
||||
|
|
@ -2906,10 +2906,10 @@ u8 func1026_unlock_doors[] = {
|
|||
|
||||
// New set of doors - wait until not closed
|
||||
beginloop(0x08)
|
||||
if_door_state(0x34, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x35, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x36, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x37, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x34, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x35, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x36, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x37, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
endloop(0x08)
|
||||
|
||||
// Unlock them
|
||||
|
|
@ -2921,8 +2921,8 @@ u8 func1026_unlock_doors[] = {
|
|||
|
||||
// Third set of doors
|
||||
beginloop(0x09)
|
||||
if_door_state(0x3f, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x40, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x3f, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x40, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
endloop(0x09)
|
||||
|
||||
label(0x2c)
|
||||
|
|
@ -3026,7 +3026,7 @@ u8 func1029_set_secret_weapon_props[] = {
|
|||
u8 func102a_8174[] = {
|
||||
// Wait until some door opening
|
||||
beginloop(0x08)
|
||||
if_door_state(0x3f, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x3f, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x2c)
|
||||
|
|
@ -3044,7 +3044,7 @@ u8 func102a_8174[] = {
|
|||
u8 func102b_81bc[] = {
|
||||
// Wait until some door opening
|
||||
beginloop(0x08)
|
||||
if_door_state(0x3f, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2c)
|
||||
if_door_state(0x3f, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2c)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x2c)
|
||||
|
|
|
|||
|
|
@ -862,9 +862,9 @@ u8 func1002_devicetraining_camspy[] = {
|
|||
|
||||
beginloop(0x82)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_training_pc_holographed(/*goto*/ 0x09)
|
||||
endloop(0x82)
|
||||
|
||||
|
|
@ -1110,9 +1110,9 @@ u8 func1004_devicetraining_doordecoder[] = {
|
|||
|
||||
beginloop(0x82)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_chr_activated_object(CHR_BOND, 0x35, /*goto*/ 0x09)
|
||||
endloop(0x82)
|
||||
|
||||
|
|
@ -1493,9 +1493,9 @@ u8 func1006_devicetraining_disguise[] = {
|
|||
|
||||
beginloop(0x82)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_stage_flag_eq(STAGEFLAG_DISGUISE_COMPLETE, TRUE, /*goto*/ 0x09)
|
||||
if_stage_flag_eq(STAGEFLAG_DISGUISE_FAILED, TRUE, /*goto*/ 0x0a)
|
||||
endloop(0x82)
|
||||
|
|
@ -1652,9 +1652,9 @@ u8 func1007_devicetrainign_ir[] = {
|
|||
unset_object_flag_bank0(0x37, OBJECTFLAG0_02000000)
|
||||
label(0x30)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_chr_activated_object(CHR_BOND, 0x37, /*goto*/ 0x09)
|
||||
endloop(0x82)
|
||||
|
||||
|
|
@ -1777,9 +1777,9 @@ u8 func1008_devicetraining_rtracker[] = {
|
|||
|
||||
beginloop(0x82)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_chr_has_object(CHR_BOND, 0x36, /*goto*/ 0x09)
|
||||
endloop(0x82)
|
||||
|
||||
|
|
@ -1908,9 +1908,9 @@ u8 func1009_devicetraining_cloak[] = {
|
|||
|
||||
beginloop(0x82)
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
if_door_state(0x31, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x31, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x8a, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_door_state(0x89, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x85)
|
||||
if_stage_flag_eq(STAGEFLAG_CLOAK_COMPLETE, TRUE, /*goto*/ 0x09)
|
||||
if_stage_flag_eq(STAGEFLAG_CLOAK_FAILED, TRUE, /*goto*/ 0x0a)
|
||||
endloop(0x82)
|
||||
|
|
@ -2778,7 +2778,7 @@ u8 func100e_training_unlockables[] = {
|
|||
reloop(0x04) \
|
||||
\
|
||||
label(0x06) \
|
||||
if_door_state(door, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2f) \
|
||||
if_door_state(door, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2f) \
|
||||
open_door(door) \
|
||||
set_object_flag_bank0(door, OBJECTFLAG0_40000000) \
|
||||
restart_timer \
|
||||
|
|
@ -2830,7 +2830,7 @@ u8 func1012_cloak_doorproxy[] = {
|
|||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
if_door_state(0x40, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2f)
|
||||
if_door_state(0x40, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2f)
|
||||
open_door(0x40)
|
||||
set_object_flag_bank0(0x40, OBJECTFLAG0_40000000)
|
||||
restart_timer
|
||||
|
|
@ -2858,7 +2858,7 @@ u8 func101b_ir_door[] = {
|
|||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
if_door_state(0x37, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2f)
|
||||
if_door_state(0x37, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2f)
|
||||
open_door(0x37)
|
||||
set_object_flag_bank0(0x37, OBJECTFLAG0_40000000)
|
||||
restart_timer
|
||||
|
|
|
|||
|
|
@ -2608,7 +2608,7 @@ u8 func100f_check_for_end_level[] = {
|
|||
reloop(0x04)
|
||||
|
||||
label(0x2f)
|
||||
if_door_state(0x26, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x06)
|
||||
if_door_state(0x26, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3128,7 +3128,7 @@ u8 func101f_check_bot_destroyed[] = {
|
|||
|
||||
// 0x32 is a laser
|
||||
beginloop(0x08)
|
||||
if_door_state(0x32, DOORSTATEBIT_CLOSED, /*goto*/ 0x2f)
|
||||
if_door_state(0x32, DOORSTATE_CLOSED, /*goto*/ 0x2f)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x2f)
|
||||
|
|
|
|||
|
|
@ -2291,8 +2291,8 @@ u8 func100e_check_objectives_complete[] = {
|
|||
// mess with Carrington.
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_door_state(0x09, DOORSTATEBIT_OPEN, /*goto*/ 0x2d)
|
||||
if_door_state(0x08, DOORSTATEBIT_OPEN, /*goto*/ 0x2d)
|
||||
if_door_state(0x09, DOORSTATE_OPEN, /*goto*/ 0x2d)
|
||||
if_door_state(0x08, DOORSTATE_OPEN, /*goto*/ 0x2d)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x2d)
|
||||
|
|
|
|||
|
|
@ -1675,7 +1675,7 @@ u8 func100e_setup_firingrange[] = {
|
|||
beginloop(0x0a)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_chr_in_room(CHR_P1P2, 0x00, 0x0007, /*goto*/ 0x08)
|
||||
if_door_state(0x23, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2f)
|
||||
if_door_state(0x23, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2f)
|
||||
endloop(0x0a)
|
||||
|
||||
// Wait for player to enter room, or 10 seconds
|
||||
|
|
@ -1729,8 +1729,8 @@ u8 func041a_hostage_holo[] = {
|
|||
// Alive - wait until holo room door opened
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_door_state(0x43, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x44, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x43, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x44, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x2e)
|
||||
|
|
@ -2458,7 +2458,7 @@ u8 func0433_inforoom_hostage[] = {
|
|||
|
||||
u8 func1012_info_room[] = {
|
||||
beginloop(0x04)
|
||||
if_door_state(0x19, DOORSTATEBIT_OPEN, /*goto*/ 0x2e)
|
||||
if_door_state(0x19, DOORSTATE_OPEN, /*goto*/ 0x2e)
|
||||
endloop(0x04)
|
||||
|
||||
// One hostage is randomly given chrflag0_00000004, which allows that
|
||||
|
|
@ -3680,8 +3680,8 @@ u8 func1025_lift_door_sounds[] = {
|
|||
u8 func100e_setup_firingrange_doors[] = {
|
||||
// Wait until firing range doors opened
|
||||
beginloop(0xe4)
|
||||
if_door_state(0x23, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x23, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x23, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x23, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
endloop(0xe4)
|
||||
|
||||
// Unset some flags on them
|
||||
|
|
|
|||
|
|
@ -1300,8 +1300,8 @@ u8 func1008_hangar_lifts[] = {
|
|||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c)
|
||||
if_chr_in_room(CHR_BOND, 0x00, 0x0018, /*goto*/ 0x2c)
|
||||
if_door_state(0x39, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x2d)
|
||||
if_door_state(0x3a, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x2d)
|
||||
if_door_state(0x39, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2d)
|
||||
if_door_state(0x3a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2d)
|
||||
endloop(0x67)
|
||||
|
||||
// Door closing automatically - reopen it
|
||||
|
|
@ -1579,7 +1579,7 @@ u8 func0408_knifeable_skedar[] = {
|
|||
u8 func1009_keep_door_open_in_intro[] = {
|
||||
beginloop(0xc2)
|
||||
if_stage_flag_eq(STAGEFLAG_INTRO_FINISHED, TRUE, /*goto*/ 0x06)
|
||||
if_door_state(0x17, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x2c)
|
||||
if_door_state(0x17, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2c)
|
||||
reloop(0xc2)
|
||||
|
||||
// Door closed
|
||||
|
|
@ -1593,7 +1593,7 @@ u8 func1009_keep_door_open_in_intro[] = {
|
|||
yield
|
||||
|
||||
beginloop(0x04)
|
||||
if_door_state(0x17, DOORSTATEBIT_CLOSING, /*goto*/ 0x06)
|
||||
if_door_state(0x17, DOORSTATE_CLOSING, /*goto*/ 0x06)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
|
|||
|
|
@ -1620,7 +1620,7 @@ u8 func100a_random_doors[] = {
|
|||
|
||||
// 25% chance //1
|
||||
label(0x08)
|
||||
if_door_state(0x07, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x09)
|
||||
if_door_state(0x07, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x09)
|
||||
open_door(0x07)
|
||||
open_door(0x08)
|
||||
reloop(0x03)
|
||||
|
|
@ -1632,7 +1632,7 @@ u8 func100a_random_doors[] = {
|
|||
|
||||
// 25% chance //2
|
||||
label(0x0a)
|
||||
if_door_state(0x09, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x0b)
|
||||
if_door_state(0x09, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x0b)
|
||||
open_door(0x09)
|
||||
open_door(0x0a)
|
||||
reloop(0x03)
|
||||
|
|
@ -1644,7 +1644,7 @@ u8 func100a_random_doors[] = {
|
|||
|
||||
// 25% chance //3
|
||||
label(0x0c)
|
||||
if_door_state(0x0b, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x0d)
|
||||
if_door_state(0x0b, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x0d)
|
||||
open_door(0x0b)
|
||||
open_door(0x0c)
|
||||
reloop(0x03)
|
||||
|
|
@ -1656,7 +1656,7 @@ u8 func100a_random_doors[] = {
|
|||
|
||||
// 25% chance //4
|
||||
label(0x0e)
|
||||
if_door_state(0x0d, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x0f)
|
||||
if_door_state(0x0d, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x0f)
|
||||
open_door(0x0d)
|
||||
open_door(0x0e)
|
||||
reloop(0x03)
|
||||
|
|
@ -1827,7 +1827,7 @@ u8 func0418_doorman[] = {
|
|||
goto_next(0x06)
|
||||
|
||||
label(0x2d)
|
||||
if_door_state(0x4a, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x2d)
|
||||
if_door_state(0x4a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2d)
|
||||
reloop(0x0f)
|
||||
|
||||
label(0x2d)
|
||||
|
|
@ -2122,7 +2122,7 @@ u8 func100d_check_entered_lab[] = {
|
|||
|
||||
u8 func100e_elvis_timer[] = {
|
||||
beginloop(0x04)
|
||||
if_door_state(0x13, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x06)
|
||||
if_door_state(0x13, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x06)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
|
|||
|
|
@ -965,7 +965,7 @@ u8 func140e_check_interceptors_destroyed[] = {
|
|||
u8 func100c_maingate_switch[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_door_state(OBJ_MAINGATE1, DOORSTATEBIT_CLOSING, /*goto*/ 0x2e)
|
||||
if_door_state(OBJ_MAINGATE1, DOORSTATE_CLOSING, /*goto*/ 0x2e)
|
||||
goto_next(0x06)
|
||||
|
||||
label(0x2e)
|
||||
|
|
@ -978,7 +978,7 @@ u8 func100c_maingate_switch[] = {
|
|||
assign_sound(0x043f, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
set_object_image(OBJ_MAINGATE_SWITCH, 0x00, 0x13)
|
||||
if_door_state(OBJ_MAINGATE1, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(OBJ_MAINGATE1, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
message(CHR_P1P2, 0x2c2b) // "Main gate has been opened."
|
||||
open_door(OBJ_MAINGATE1)
|
||||
open_door(OBJ_MAINGATE2)
|
||||
|
|
@ -1243,8 +1243,8 @@ u8 func1007_check_hangar_accessed[] = {
|
|||
|
||||
u8 func1008_check_end_level[] = {
|
||||
beginloop(0x04)
|
||||
if_door_state(0x11, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x09)
|
||||
if_door_state(0x12, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x09)
|
||||
if_door_state(0x11, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x09)
|
||||
if_door_state(0x12, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x09)
|
||||
endloop(0x04)
|
||||
|
||||
beginloop(0x09)
|
||||
|
|
@ -2340,7 +2340,7 @@ u8 func1013_bunker_lasers[] = {
|
|||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_EXPLOSIVES_PLACED, TRUE, /*goto*/ 0x09)
|
||||
if_stage_flag_eq(STAGEFLAG_ANY_LASER_DESTROYED, TRUE, /*goto*/ 0x09)
|
||||
if_door_state(0x1e, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x1e, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ u8 func0403_elvis_give_farsight[] = {
|
|||
u8 func1003_powernode1[] = {
|
||||
beginloop(0x04)
|
||||
if_object_in_good_condition(OBJ_POWERNODE1, /*goto*/ 0x2e)
|
||||
if_door_state(0x03, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x03, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
open_door(0x03)
|
||||
endloop(0x04)
|
||||
|
||||
|
|
@ -1441,7 +1441,7 @@ u8 func1003_powernode1[] = {
|
|||
u8 func1004_powernode2[] = {
|
||||
beginloop(0x04)
|
||||
if_object_in_good_condition(OBJ_POWERNODE2, /*goto*/ 0x2e)
|
||||
if_door_state(0x04, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x04, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
open_door(0x04)
|
||||
endloop(0x04)
|
||||
|
||||
|
|
@ -1461,7 +1461,7 @@ u8 func1004_powernode2[] = {
|
|||
u8 func1005_powernode3[] = {
|
||||
beginloop(0x04)
|
||||
if_object_in_good_condition(OBJ_POWERNODE3, /*goto*/ 0x2e)
|
||||
if_door_state(0x05, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x05, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
open_door(0x05)
|
||||
endloop(0x04)
|
||||
|
||||
|
|
@ -2285,7 +2285,7 @@ u8 func1008_msg_theresdrcaroll[] = {
|
|||
if_chr_dying(CHR_DRCAROLL, /*goto*/ 0x0d)
|
||||
if_chr_unloaded(CHR_DRCAROLL, /*goto*/ 0x0d)
|
||||
|
||||
if_door_state(0xae, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0xae, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x2e)
|
||||
|
|
@ -3723,7 +3723,7 @@ u8 func0408_check_pa_earlydoorcylinders_destroyed[] = {
|
|||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
beginloop(0x08)
|
||||
if_door_state(0x09, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x09, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3804,7 +3804,7 @@ u8 func1018_pa_door1[] = {
|
|||
set_lights_state(0x00a1, 0x03, 0xff, 0x0a, 0x78)
|
||||
|
||||
beginloop(0x08)
|
||||
if_door_state(0x0b, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0b, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x08)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3835,7 +3835,7 @@ u8 func0409_check_pa_latedoorcylinders_destroyed[] = {
|
|||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
beginloop(0x08)
|
||||
if_door_state(0x0d, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0d, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3970,7 +3970,7 @@ u8 func040a_check_pa_canisters_destroyed[] = {
|
|||
set_lights_state(0x00bc, 0x03, 0xff, 0x0a, 0x78)
|
||||
|
||||
beginloop(0x08)
|
||||
if_door_state(0x0f, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0f, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
endloop(0x08)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3991,7 +3991,7 @@ u8 func040a_check_pa_canisters_destroyed[] = {
|
|||
u8 func101f_pa_circleroom_spawner[] = {
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_door_state(0x09, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x09, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
if_chr_in_room(CHR_P1P2, 0x00, 0x008b, /*goto*/ 0x2e)
|
||||
endloop(0x04)
|
||||
|
||||
|
|
@ -3999,7 +3999,7 @@ u8 func101f_pa_circleroom_spawner[] = {
|
|||
restart_timer
|
||||
|
||||
beginloop(0x0d)
|
||||
if_door_state(0x09, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x1f)
|
||||
if_door_state(0x09, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x1f)
|
||||
if_timer_gt(300, /*goto*/ 0x1f)
|
||||
endloop(0x0d)
|
||||
|
||||
|
|
@ -4379,21 +4379,21 @@ u8 func042e_elvis_run_to_exit[] = {
|
|||
|
||||
u8 func1027_powernode_illumination[] = {
|
||||
beginloop(0x04)
|
||||
if_door_state(0x03, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x03, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
unset_object_flag_bank0(OBJ_POWERNODE1, OBJECTFLAG0_ILLUMINATED)
|
||||
goto_next(0x06)
|
||||
label(0x2e)
|
||||
set_object_flag_bank0(OBJ_POWERNODE1, OBJECTFLAG0_ILLUMINATED)
|
||||
|
||||
label(0x06)
|
||||
if_door_state(0x04, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x04, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
unset_object_flag_bank0(OBJ_POWERNODE2, OBJECTFLAG0_ILLUMINATED)
|
||||
goto_next(0x06)
|
||||
label(0x2e)
|
||||
set_object_flag_bank0(OBJ_POWERNODE2, OBJECTFLAG0_ILLUMINATED)
|
||||
|
||||
label(0x06)
|
||||
if_door_state(0x05, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0x05, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
unset_object_flag_bank0(OBJ_POWERNODE3, OBJECTFLAG0_ILLUMINATED)
|
||||
goto_next(0x06)
|
||||
label(0x2e)
|
||||
|
|
@ -4414,7 +4414,7 @@ u8 func1028_enable_last_3_guards[] = {
|
|||
reloop(0x04)
|
||||
|
||||
label(0x2e)
|
||||
if_door_state(0xab, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x2e)
|
||||
if_door_state(0xab, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
endloop(0x04)
|
||||
|
||||
label(0x2e)
|
||||
|
|
|
|||
|
|
@ -2872,7 +2872,7 @@ u8 func1017_drain_guards[] = {
|
|||
|
||||
u8 func1018_keep_door_open[] = {
|
||||
beginloop(0x10)
|
||||
if_door_state(0x1a, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x03)
|
||||
if_door_state(0x1a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x03)
|
||||
reloop(0x10)
|
||||
|
||||
label(0x03)
|
||||
|
|
@ -3053,7 +3053,7 @@ u8 func101e_check_sealer_guards_dead[] = {
|
|||
u8 func1020_elevator_doors[] = {
|
||||
beginloop(0x10)
|
||||
if_stage_flag_eq(STAGEFLAG_ELEVATOR_SEALED, TRUE, /*goto*/ 0x03)
|
||||
if_door_state(0x10, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x04)
|
||||
if_door_state(0x10, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x04)
|
||||
reloop(0x10)
|
||||
|
||||
label(0x04)
|
||||
|
|
|
|||
|
|
@ -1746,7 +1746,7 @@ u8 func0413_taker[] = {
|
|||
|
||||
// Wait for condition
|
||||
beginloop(0x04)
|
||||
if_door_state(0x0c, (DOORSTATEBIT_OPEN | DOORSTATEBIT_CLOSING | DOORSTATEBIT_OPENING), /*goto*/ 0x0a)
|
||||
if_door_state(0x0c, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x0a)
|
||||
if_stage_flag_eq(STAGEFLAG_PRESIDENT_STARTED_RUNNING, FALSE, /*goto*/ 0x2d)
|
||||
if_timer_gt(7200, /*goto*/ 0x0a)
|
||||
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x0a)
|
||||
|
|
@ -3660,7 +3660,7 @@ u8 func101a_equipment_switch[] = {
|
|||
set_object_image(OBJ_EQUIPMENT_SWITCH, 0x00, 0x12)
|
||||
|
||||
beginloop(0x09)
|
||||
if_door_state(0x1c, DOORSTATEBIT_CLOSING, /*goto*/ 0x2d)
|
||||
if_door_state(0x1c, DOORSTATE_CLOSING, /*goto*/ 0x2d)
|
||||
reloop(0x09)
|
||||
|
||||
label(0x2d)
|
||||
|
|
@ -3679,7 +3679,7 @@ u8 func101b_hoverbike_switch[] = {
|
|||
|
||||
beginloop(0x09)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
if_door_state(0x20, DOORSTATEBIT_CLOSING, /*goto*/ 0x2d)
|
||||
if_door_state(0x20, DOORSTATE_CLOSING, /*goto*/ 0x2d)
|
||||
if_chr_activated_object(CHR_P1P2, OBJ_HOVERBIKE_SWITCH, /*goto*/ 0x0a)
|
||||
reloop(0x09)
|
||||
|
||||
|
|
|
|||
|
|
@ -2095,13 +2095,13 @@ u8 func100d_check_terminals_destroyed[] = {
|
|||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x06)
|
||||
if_object_in_good_condition(OBJ_TERMINAL1, /*goto*/ 0x06)
|
||||
if_door_state(0x2c, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x06)
|
||||
if_door_state(0x2c, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x06)
|
||||
goto_next(0x08)
|
||||
|
||||
label(0x06)
|
||||
if_stage_flag_eq(STAGEFLAG_OUTER_DOOR_OPENING, TRUE, /*goto*/ 0x06)
|
||||
if_object_in_good_condition(OBJ_TERMINAL2, /*goto*/ 0x06)
|
||||
if_door_state(0x2e, (DOORSTATEBIT_OPEN | DOORSTATEBIT_OPENING), /*goto*/ 0x06)
|
||||
if_door_state(0x2e, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x06)
|
||||
goto_first(0x08)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -2236,7 +2236,7 @@ u8 func1012_hoverbike_auto_doors[] = {
|
|||
|
||||
// Pad/door 1
|
||||
label(0x08)
|
||||
if_door_state(0x0a, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -2246,7 +2246,7 @@ u8 func1012_hoverbike_auto_doors[] = {
|
|||
|
||||
// Pad/door 2
|
||||
label(0x09)
|
||||
if_door_state(0x0b, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0b, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -2256,7 +2256,7 @@ u8 func1012_hoverbike_auto_doors[] = {
|
|||
|
||||
// Pad/door 3
|
||||
label(0x0a)
|
||||
if_door_state(0x08, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x08, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -2268,7 +2268,7 @@ u8 func1012_hoverbike_auto_doors[] = {
|
|||
|
||||
// Pad/door 4
|
||||
label(0x0c)
|
||||
if_door_state(0x0c, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x0c, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -2278,7 +2278,7 @@ u8 func1012_hoverbike_auto_doors[] = {
|
|||
|
||||
// Pad/door 5
|
||||
label(0x0d)
|
||||
if_door_state(0x05, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x06)
|
||||
if_door_state(0x05, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x06)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
|
|
@ -3535,14 +3535,14 @@ u8 func102e_keep_hangar_doors_open[] = {
|
|||
|
||||
beginloop(0x04)
|
||||
if_stage_flag_eq(STAGEFLAG_HANGAR_TERMINAL_DESTROYED, TRUE, /*goto*/ 0x0f)
|
||||
if_door_state(0x2c, DOORSTATEBIT_CLOSING, /*goto*/ 0x08)
|
||||
if_door_state(0x2e, DOORSTATEBIT_CLOSING, /*goto*/ 0x09)
|
||||
if_door_state(0x2c, DOORSTATE_CLOSING, /*goto*/ 0x08)
|
||||
if_door_state(0x2e, DOORSTATE_CLOSING, /*goto*/ 0x09)
|
||||
reloop(0x04)
|
||||
|
||||
// Door 1 closing
|
||||
label(0x08)
|
||||
if_stage_flag_eq(STAGEFLAG_INNER_DOOR_OPENING, TRUE, /*goto*/ 0x32)
|
||||
if_door_state(0x2c, (DOORSTATEBIT_CLOSED | DOORSTATEBIT_CLOSING), /*goto*/ 0x09)
|
||||
if_door_state(0x2c, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x09)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x32)
|
||||
|
|
|
|||
|
|
@ -1725,7 +1725,7 @@ u8 func1008_check_bomb_unplantable[] = {
|
|||
|
||||
beginloop(0xb1)
|
||||
if_stage_flag_eq(STAGEFLAG_BOMB_PLANTED, TRUE, /*goto*/ 0x0d)
|
||||
if_door_state(0x2e, DOORSTATEBIT_CLOSED, /*goto*/ 0xb2)
|
||||
if_door_state(0x2e, DOORSTATE_CLOSED, /*goto*/ 0xb2)
|
||||
reloop(0xb1)
|
||||
|
||||
// Door is closed
|
||||
|
|
|
|||
|
|
@ -3413,7 +3413,7 @@ bool aiOpenDoor(void)
|
|||
if (obj && obj->prop && obj->prop->type == PROPTYPE_DOOR) {
|
||||
if (!func0f066310(obj->prop, 0)) {
|
||||
struct doorobj *door = (struct doorobj *) obj;
|
||||
doorActivate(door, DOORSTATE_OPEN);
|
||||
doorActivate(door, DOORMODE_OPENING);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3432,7 +3432,7 @@ bool aiCloseDoor(void)
|
|||
|
||||
if (obj && obj->prop && obj->prop->type == PROPTYPE_DOOR) {
|
||||
struct doorobj *door = (struct doorobj *) obj;
|
||||
doorActivate(door, DOORSTATE_CLOSED);
|
||||
doorActivate(door, DOORMODE_CLOSING);
|
||||
}
|
||||
|
||||
g_Vars.aioffset += 3;
|
||||
|
|
@ -3452,16 +3452,16 @@ bool aiIfDoorState(void)
|
|||
if (obj && obj->prop && obj->type == OBJTYPE_DOOR) {
|
||||
struct doorobj *door = (struct doorobj *) obj;
|
||||
|
||||
if (door->mode == 0) {
|
||||
if (door->mode == DOORMODE_IDLE) {
|
||||
if (door->frac <= 0) {
|
||||
pass = (cmd[3] & DOORSTATEBIT_CLOSED) != 0;
|
||||
pass = (cmd[3] & DOORSTATE_CLOSED) != 0;
|
||||
} else {
|
||||
pass = (cmd[3] & DOORSTATEBIT_OPEN) != 0;
|
||||
pass = (cmd[3] & DOORSTATE_OPEN) != 0;
|
||||
}
|
||||
} else if (door->mode == 1 || door->mode == 3) {
|
||||
pass = (cmd[3] & DOORSTATEBIT_OPENING) != 0;
|
||||
} else if (door->mode == 2) {
|
||||
pass = (cmd[3] & DOORSTATEBIT_CLOSING) != 0;
|
||||
} else if (door->mode == DOORMODE_OPENING || door->mode == DOORMODE_3) {
|
||||
pass = (cmd[3] & DOORSTATE_OPENING) != 0;
|
||||
} else if (door->mode == DOORMODE_CLOSING) {
|
||||
pass = (cmd[3] & DOORSTATE_CLOSING) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46285,21 +46285,21 @@ void func0f08e2ac(struct doorobj *door)
|
|||
|
||||
void doorSetMode(struct doorobj *door, s32 newmode)
|
||||
{
|
||||
if (newmode == 1) {
|
||||
if (door->mode == 0 || door->mode == 3) {
|
||||
if (newmode == DOORMODE_OPENING) {
|
||||
if (door->mode == DOORMODE_IDLE || door->mode == DOORMODE_3) {
|
||||
func0f08e0c4(door);
|
||||
}
|
||||
|
||||
door->mode = newmode;
|
||||
} else if (newmode == 2) {
|
||||
if (door->mode == 0 && door->frac > 0) {
|
||||
} else if (newmode == DOORMODE_CLOSING) {
|
||||
if (door->mode == DOORMODE_IDLE && door->frac > 0) {
|
||||
func0f08e1a0(door);
|
||||
}
|
||||
|
||||
if ((door->mode != 0 && door->mode != 3) || door->frac > 0) {
|
||||
if ((door->mode != DOORMODE_IDLE && door->mode != DOORMODE_3) || door->frac > 0) {
|
||||
door->mode = newmode;
|
||||
} else if (door->mode == 3) {
|
||||
door->mode = 0;
|
||||
} else if (door->mode == DOORMODE_3) {
|
||||
door->mode = DOORMODE_IDLE;
|
||||
}
|
||||
} else {
|
||||
door->mode = newmode;
|
||||
|
|
@ -46312,11 +46312,11 @@ void doorActivate(struct doorobj *door, s32 newmode)
|
|||
|
||||
s32 siblingmode = newmode;
|
||||
|
||||
if ((door->base.flags2 & OBJECTFLAG1_40000000) && newmode == 1) {
|
||||
siblingmode = 2;
|
||||
if ((door->base.flags2 & OBJECTFLAG1_40000000) && newmode == DOORMODE_OPENING) {
|
||||
siblingmode = DOORMODE_CLOSING;
|
||||
|
||||
if (door->mode == 0) {
|
||||
newmode = 3;
|
||||
if (door->mode == DOORMODE_IDLE) {
|
||||
newmode = DOORMODE_3;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -46332,12 +46332,12 @@ void doorActivate(struct doorobj *door, s32 newmode)
|
|||
|
||||
s32 doorIsClosed(struct doorobj *door)
|
||||
{
|
||||
return (door->mode == 0 || door->mode == 3) && door->frac <= 0;
|
||||
return (door->mode == DOORMODE_IDLE || door->mode == DOORMODE_3) && door->frac <= 0;
|
||||
}
|
||||
|
||||
s32 doorIsOpen(struct doorobj *door)
|
||||
{
|
||||
return (door->mode == 0 || door->mode == 3) && door->frac >= door->maxfrac;
|
||||
return (door->mode == DOORMODE_IDLE || door->mode == DOORMODE_3) && door->frac >= door->maxfrac;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
|
|
@ -47160,7 +47160,7 @@ glabel func0f08ed74
|
|||
// door->fadetime60 = 0;
|
||||
// }
|
||||
//
|
||||
// if (door->mode == 1) {
|
||||
// if (door->mode == DOORMODE_OPENING) {
|
||||
// u32 laserfade = (door->fadetime60 * 255.0f) / 60.0f;
|
||||
// door->laserfade = laserfade;
|
||||
//
|
||||
|
|
@ -47171,9 +47171,10 @@ glabel func0f08ed74
|
|||
// }
|
||||
// }
|
||||
//
|
||||
// if (door->mode == 1 || door->mode == 2) {
|
||||
// f32 maxfrac = door->mode == 1 ? door->maxfrac : 0;
|
||||
// if (door->mode == DOORMODE_OPENING || door->mode == DOORMODE_CLOSING) {
|
||||
// f32 maxfrac = door->mode == DOORMODE_OPENING ? door->maxfrac : 0;
|
||||
//
|
||||
// // Skedar Ruins random door stuckage
|
||||
// if (door->base.flags3 & OBJECTFLAG2_00000004) {
|
||||
// s32 value = (random() % 64) + 30;
|
||||
//
|
||||
|
|
@ -47187,20 +47188,20 @@ glabel func0f08ed74
|
|||
// if (random() % 2) {
|
||||
// dothething = true;
|
||||
// func0f0926bc(door->base.prop, 12, 0xffff);
|
||||
// door->mode = 0;
|
||||
// door->mode = DOORMODE_IDLE;
|
||||
// door->lastopen60 = g_Vars.lvframe60;
|
||||
// }
|
||||
//
|
||||
// loopdoor = door;
|
||||
//
|
||||
// while (loopdoor) {
|
||||
// if (random() % 2 && loopdoor->mode != 0) {
|
||||
// if (random() % 2 && loopdoor->mode != DOORMODE_IDLE) {
|
||||
// loopdoor->fracspeed = 0;
|
||||
// func0f08ea50(loopdoor);
|
||||
//
|
||||
// if (dothething) {
|
||||
// func0f0926bc(loopdoor->base.prop, 12, 0xffff);
|
||||
// loopdoor->mode = 0;
|
||||
// loopdoor->mode = DOORMODE_IDLE;
|
||||
// loopdoor->lastopen60 = g_Vars.lvframe60;
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -926,8 +926,8 @@
|
|||
/**
|
||||
* Checks the state of the current door.
|
||||
*
|
||||
* Doorstate is expected to be one of DOORSTATEBIT_OPEN, DOORSTATEBIT_CLOSED,
|
||||
* DOORSTATEBIT_OPENING or DOORSTATEBIT_CLOSING. You can bitwise or them
|
||||
* Doorstate is expected to be one of DOORSTATE_OPEN, DOORSTATE_CLOSED,
|
||||
* DOORSTATE_OPENING or DOORSTATE_CLOSING. You can bitwise or them
|
||||
* together to check multiple states at the same time.
|
||||
*/
|
||||
#define if_door_state(door, doorstate, label) \
|
||||
|
|
|
|||
|
|
@ -343,16 +343,32 @@
|
|||
#define DIFFBIT_PA 0x04
|
||||
#define DIFFBIT_PD 0x08
|
||||
|
||||
#define DOORSTATE_OPEN 1
|
||||
#define DOORSTATE_CLOSED 2
|
||||
#define DOORFLAG_WINDOWED 0x0002
|
||||
#define DOORFLAG_0004 0x0004
|
||||
#define DOORFLAG_0008 0x0008 // Changes the angle at which one-way doors can be opened
|
||||
#define DOORFLAG_0010 0x0010 // Rescue door bottoms, training doors in Defense
|
||||
#define DOORFLAG_0200 0x0200 // dataDyne secret door near lobby elevator
|
||||
#define DOORFLAG_DAMAGEONCONTACT 0x0400 // Lasers
|
||||
#define DOORFLAG_0800 0x0800 // Non-CI lasers, and floor grates
|
||||
#define DOORFLAG_4000 0x4000 // Two Investigation vertical doors after lasers
|
||||
|
||||
#define DOORSTATEBIT_CLOSED 1
|
||||
#define DOORSTATEBIT_OPEN 2
|
||||
#define DOORSTATEBIT_CLOSING 4
|
||||
#define DOORSTATEBIT_OPENING 8
|
||||
#define DOORMODE_IDLE 0
|
||||
#define DOORMODE_OPENING 1
|
||||
#define DOORMODE_CLOSING 2
|
||||
#define DOORMODE_3 3
|
||||
|
||||
#define DOORTYPE_8 8
|
||||
#define DOORTYPE_LASER 11
|
||||
// For AI commands - bitwise ORable
|
||||
#define DOORSTATE_CLOSED 1
|
||||
#define DOORSTATE_OPEN 2
|
||||
#define DOORSTATE_CLOSING 4
|
||||
#define DOORSTATE_OPENING 8
|
||||
|
||||
#define DOORTYPE_SLIDING 0
|
||||
#define DOORTYPE_VERTICAL 4
|
||||
#define DOORTYPE_SWINGING 5
|
||||
#define DOORTYPE_8 8
|
||||
#define DOORTYPE_HULL 10
|
||||
#define DOORTYPE_LASER 11
|
||||
|
||||
#define DRCAROLLIMAGE_DEAD 4
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue