mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-09 05:23:15 -04:00
Improve propsound
This commit is contained in:
+3
-3
@@ -1044,7 +1044,7 @@ void bwalk_update_vertical(void)
|
||||
if (sound != -1) {
|
||||
if (sound != -1) {
|
||||
ps_create(NULL, g_Vars.currentplayer->prop, sound,
|
||||
-1, -1, PSFLAG_0400 | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
-1, -1, PSFLAG_AMBIENT | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
chr->footstep = 2;
|
||||
@@ -1052,7 +1052,7 @@ void bwalk_update_vertical(void)
|
||||
|
||||
if (sound != -1) {
|
||||
ps_create(NULL, g_Vars.currentplayer->prop, sound,
|
||||
-1, -1, PSFLAG_0400 | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
-1, -1, PSFLAG_AMBIENT | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ void bwalk_update_vertical(void)
|
||||
};
|
||||
|
||||
ps_create(NULL, g_Vars.currentplayer->prop, sounds[random() % 3],
|
||||
-1, -1, PSFLAG_0400 | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
-1, -1, PSFLAG_AMBIENT | PSFLAG_IGNOREROOMS, 0, PSTYPE_NONE, 0, -1, NULL, -1, -1, -1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -348,7 +348,7 @@ u32 bot_pickup_prop(struct prop *prop, struct chrdata *chr)
|
||||
|
||||
// Pickup sound
|
||||
ps_create(NULL, prop, SFX_PICKUP_AMMO, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
obj_free(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
|
||||
|
||||
@@ -399,7 +399,7 @@ u32 bot_pickup_prop(struct prop *prop, struct chrdata *chr)
|
||||
|
||||
// Pickup sound
|
||||
ps_create(NULL, prop, SFX_PICKUP_AMMO, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
obj_free(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
|
||||
}
|
||||
@@ -452,7 +452,7 @@ u32 bot_pickup_prop(struct prop *prop, struct chrdata *chr)
|
||||
struct shieldobj *shield = (struct shieldobj *)prop->obj;
|
||||
|
||||
ps_create(NULL, prop, SFX_PICKUP_SHIELD, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
chr_set_shield(chr, shield->amount * 8);
|
||||
obj_free(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
|
||||
|
||||
+2
-2
@@ -65,10 +65,10 @@ void botact_reload(struct chrdata *chr, s32 handnum, bool withsound)
|
||||
if (withsound) {
|
||||
if (aibot->weaponnum == WEAPON_FARSIGHT) {
|
||||
ps_create(NULL, chr->prop, SFX_RELOAD_FARSIGHT, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
} else {
|
||||
ps_create(NULL, chr->prop, SFX_RELOAD_DEFAULT, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8432,7 +8432,7 @@ void chr_tick_die(struct chrdata *chr)
|
||||
chr->soundtimer = 0;
|
||||
var80068080 -= 5;
|
||||
ps_create(NULL, prop, SFX_SHIELD_DAMAGE, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
sparks_create(prop->rooms[0], prop, &prop->pos, NULL, 0, SPARKTYPE_ELECTRICAL);
|
||||
}
|
||||
|
||||
@@ -8849,12 +8849,12 @@ void chr_update_fireslot(struct chrdata *chr, s32 handnum, bool withsound, bool
|
||||
if (playsound) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, chr->prop, soundnum, -1, -1,
|
||||
PSFLAG_0400, PSFLAG2_PRINTABLE, PSTYPE_CHRSHOOT, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
PSFLAG_AMBIENT, PSFLAG2_PRINTABLE, PSTYPE_CHRSHOOT, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
fireslot->endlvframe = (u32)g_Vars.lvframe60 + duration;
|
||||
chr->hidden2 |= CHRH2FLAG_FIRESOUNDDONE;
|
||||
#else
|
||||
ps_create(NULL, chr->prop, soundnum, -1, -1,
|
||||
PSFLAG_0400, PSFLAG2_PRINTABLE, PSTYPE_NONE, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
PSFLAG_AMBIENT, PSFLAG2_PRINTABLE, PSTYPE_NONE, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
fireslot->endlvframe = (u32)g_Vars.lvframe60 + duration;
|
||||
chr->hidden |= CHRHFLAG_FIRESOUNDDONE;
|
||||
|
||||
|
||||
+8
-8
@@ -218,10 +218,10 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x00cc*/ ai_show_hudmsg_top_middle,
|
||||
/*0x00cd*/ ai_speak,
|
||||
/*0x00ce*/ ai_play_sound,
|
||||
/*0x00cf*/ ai_set_object_sound_playing,
|
||||
/*0x00d0*/ ai_play_repeating_sound_from_pad,
|
||||
/*0x00d1*/ ai_set_object_sound_volume,
|
||||
/*0x00d2*/ ai_set_object_sound_volume_by_distance,
|
||||
/*0x00cf*/ ai_bind_channel_to_object,
|
||||
/*0x00d0*/ ai_bind_channel_to_pad_repeating,
|
||||
/*0x00d1*/ ai_set_channel_volume,
|
||||
/*0x00d2*/ ai_set_channel_volume_by_distance,
|
||||
/*0x00d3*/ ai_audio_mute_channel,
|
||||
/*0x00d4*/ ai_if_object_sound_volume_less_than,
|
||||
/*0x00d5*/ ai_hovercar_begin_path,
|
||||
@@ -374,7 +374,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x0168*/ ai_if_shield_damaged,
|
||||
/*0x0169*/ ai_if_natural_anim,
|
||||
/*0x016a*/ ai_if_y,
|
||||
/*0x016b*/ ai_play_repeating_sound_from_object,
|
||||
/*0x016b*/ ai_bind_channel_to_object_repeating,
|
||||
/*0x016c*/ ai_noop_016c,
|
||||
/*0x016d*/ ai_chr_adjust_motion_blur,
|
||||
/*0x016e*/ ai_damage_chr_by_amount,
|
||||
@@ -388,7 +388,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x0176*/ ai_if_bot_respawning,
|
||||
/*0x0177*/ ai_player_auto_walk,
|
||||
/*0x0178*/ ai_if_player_auto_walk_finished,
|
||||
/*0x0179*/ ai_play_sound_from_entity,
|
||||
/*0x0179*/ ai_bind_channel_to_entity,
|
||||
/*0x017a*/ ai_if_los_to_attack_target,
|
||||
/*0x017b*/ ai_if_chr_knocked_out,
|
||||
/*0x017c*/ ai_assign_sound,
|
||||
@@ -429,7 +429,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x019f*/ ai_set_obj_health,
|
||||
/*0x01a0*/ ai_set_chr_special_death_animation,
|
||||
/*0x01a1*/ ai_set_room_to_search,
|
||||
/*0x01a2*/ ai_say_ci_staff_quip,
|
||||
/*0x01a2*/ ai_say_ciquip,
|
||||
/*0x01a3*/ ai_do_preset_animation,
|
||||
/*0x01a4*/ ai_show_hudmsg_middle,
|
||||
/*0x01a5*/ ai_if_using_lift,
|
||||
@@ -488,7 +488,7 @@ bool (*g_CommandPointers[])(void) = {
|
||||
/*0x01d6*/ ai_configure_environment,
|
||||
/*0x01d7*/ ai_if_distance_to_target2_less_than,
|
||||
/*0x01d8*/ ai_if_distance_to_target2_greater_than,
|
||||
/*0x01d9*/ ai_play_sound_from_prop,
|
||||
/*0x01d9*/ ai_play_sound_from_object,
|
||||
/*0x01da*/ ai_play_temporary_primary_track,
|
||||
/*0x01db*/ ai_chr_kill,
|
||||
/*0x01dc*/ ai_remove_weapon_from_inventory,
|
||||
|
||||
+20
-20
@@ -4439,9 +4439,9 @@ bool ai_speak(void)
|
||||
}
|
||||
|
||||
if (cmd[2] == CHR_P1P2) {
|
||||
channelnum = ps_play_from_prop((s8)cmd[7], audio_id, 0, g_Vars.chrdata->prop, PSTYPE_NONE, PSFLAG_FORHUDMSG);
|
||||
channelnum = ps_create_from_ai((s8)cmd[7], audio_id, 0, g_Vars.chrdata->prop, PSTYPE_NONE, PSFLAG_FORHUDMSG);
|
||||
} else {
|
||||
channelnum = ps_play_from_prop((s8)cmd[7], audio_id, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, PSFLAG_FORHUDMSG);
|
||||
channelnum = ps_create_from_ai((s8)cmd[7], audio_id, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, PSFLAG_FORHUDMSG);
|
||||
}
|
||||
|
||||
if (text && !snd_is_filtered(audio_id)) {
|
||||
@@ -4463,7 +4463,7 @@ bool ai_play_sound(void)
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 audio_id = cmd[3] | (cmd[2] << 8);
|
||||
|
||||
ps_play_from_prop((s8)cmd[4], audio_id, 0, NULL, PSTYPE_NONE, 0);
|
||||
ps_create_from_ai((s8)cmd[4], audio_id, 0, NULL, PSTYPE_NONE, 0);
|
||||
|
||||
g_Vars.aioffset += 5;
|
||||
|
||||
@@ -4478,7 +4478,7 @@ bool ai_assign_sound(void)
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 audio_id = cmd[3] | (cmd[2] << 8);
|
||||
|
||||
ps_play_from_prop((s8)cmd[4], audio_id, -1, NULL, PSTYPE_MARKER, 0);
|
||||
ps_create_from_ai((s8)cmd[4], audio_id, -1, NULL, PSTYPE_MARKER, 0);
|
||||
|
||||
g_Vars.aioffset += 5;
|
||||
|
||||
@@ -4519,7 +4519,7 @@ bool ai_if_channel_free(void)
|
||||
/**
|
||||
* @cmd 00d1
|
||||
*/
|
||||
bool ai_set_object_sound_volume(void)
|
||||
bool ai_set_channel_volume(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 volume = cmd[4] | (cmd[3] << 8);
|
||||
@@ -4535,7 +4535,7 @@ bool ai_set_object_sound_volume(void)
|
||||
/**
|
||||
* @cmd 00d2
|
||||
*/
|
||||
bool ai_set_object_sound_volume_by_distance(void)
|
||||
bool ai_set_channel_volume_by_distance(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
f32 playerdist = cmd[4] | (cmd[3] << 8);
|
||||
@@ -4552,7 +4552,7 @@ bool ai_set_object_sound_volume_by_distance(void)
|
||||
/**
|
||||
* @cmd 00cf
|
||||
*/
|
||||
bool ai_set_object_sound_playing(void)
|
||||
bool ai_bind_channel_to_object(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
struct defaultobj *obj = obj_find_by_tag_id(cmd[3]);
|
||||
@@ -4570,21 +4570,21 @@ bool ai_set_object_sound_playing(void)
|
||||
/**
|
||||
* @cmd 016b
|
||||
*/
|
||||
bool ai_play_repeating_sound_from_object(void)
|
||||
bool ai_bind_channel_to_object_repeating(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
struct defaultobj *obj = obj_find_by_tag_id(cmd[3]);
|
||||
u16 thing1 = cmd[5] | (cmd[4] << 8);
|
||||
u16 reqvolchangetimer60 = cmd[5] | (cmd[4] << 8);
|
||||
u16 dist2 = cmd[7] | (cmd[6] << 8);
|
||||
u16 dist3 = cmd[9] | (cmd[8] << 8);
|
||||
|
||||
if (obj && obj->prop) {
|
||||
s32 volchangetimer60;
|
||||
|
||||
if (thing1 == 0) {
|
||||
if (reqvolchangetimer60 == 0) {
|
||||
volchangetimer60 = -1;
|
||||
} else {
|
||||
volchangetimer60 = thing1;
|
||||
volchangetimer60 = reqvolchangetimer60;
|
||||
}
|
||||
|
||||
ps_modify((s8)cmd[2], -1, -1, obj->prop, volchangetimer60, dist2, dist3, PSFLAG_REPEATING);
|
||||
@@ -4598,7 +4598,7 @@ bool ai_play_repeating_sound_from_object(void)
|
||||
/**
|
||||
* @cmd 0179
|
||||
*/
|
||||
bool ai_play_sound_from_entity(void)
|
||||
bool ai_bind_channel_to_entity(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
u16 volchangetimer60 = cmd[5] | (cmd[4] << 8);
|
||||
@@ -4627,7 +4627,7 @@ bool ai_play_sound_from_entity(void)
|
||||
/**
|
||||
* @cmd 00d0
|
||||
*/
|
||||
bool ai_play_repeating_sound_from_pad(void)
|
||||
bool ai_bind_channel_to_pad_repeating(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 padnum = cmd[4] | (cmd[3] << 8);
|
||||
@@ -8736,29 +8736,29 @@ s16 g_CiThanksQuips[] = {
|
||||
/**
|
||||
* @cmd 01a2
|
||||
*/
|
||||
bool ai_say_ci_staff_quip(void)
|
||||
bool ai_say_ciquip(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 quip;
|
||||
|
||||
if (cmd[2] == CIQUIP_GREETING) {
|
||||
quip = g_CiGreetingQuips[g_Vars.chrdata->morale][random() % 3];
|
||||
ps_play_from_prop((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
ps_create_from_ai((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
}
|
||||
|
||||
if (cmd[2] == CIQUIP_MAIN) {
|
||||
quip = g_CiMainQuips[g_Vars.chrdata->morale][random() % 3];
|
||||
ps_play_from_prop((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
ps_create_from_ai((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
}
|
||||
|
||||
if (cmd[2] == CIQUIP_ANNOYED) {
|
||||
quip = g_CiAnnoyedQuips[g_Vars.chrdata->morale][random() % 3];
|
||||
ps_play_from_prop((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
ps_create_from_ai((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
}
|
||||
|
||||
if (cmd[2] == CIQUIP_THANKS) {
|
||||
quip = g_CiThanksQuips[g_Vars.chrdata->morale];
|
||||
ps_play_from_prop((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
ps_create_from_ai((s8)cmd[3], quip, 0, g_Vars.chrdata->prop, PSTYPE_CHRTALK, 0);
|
||||
}
|
||||
|
||||
g_Vars.aioffset += 4;
|
||||
@@ -9770,7 +9770,7 @@ bool ai_if_distance_to_target2_greater_than(void)
|
||||
/**
|
||||
* @cmd 01d9
|
||||
*/
|
||||
bool ai_play_sound_from_prop(void)
|
||||
bool ai_play_sound_from_object(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
s16 audio_id = cmd[5] | (cmd[4] << 8);
|
||||
@@ -9780,7 +9780,7 @@ bool ai_play_sound_from_prop(void)
|
||||
s16 type = cmd[8];
|
||||
struct defaultobj *obj = obj_find_by_tag_id(cmd[3]);
|
||||
|
||||
ps_play_from_prop(channel, audio_id, volume, obj->prop, type, flags);
|
||||
ps_create_from_ai(channel, audio_id, volume, obj->prop, type, flags);
|
||||
|
||||
g_Vars.aioffset += 11;
|
||||
|
||||
|
||||
+2
-2
@@ -497,7 +497,7 @@ bool lights_handle_hit(struct coord *gunpos, struct coord *hitpos, s32 roomnum)
|
||||
soundpos.z = light->bbox[0].z;
|
||||
|
||||
room_set_light_broken(roomnum, i);
|
||||
ps_create(0, 0, SFX_HIT_GLASS, -1, -1, PSFLAG_0400, 0, PSTYPE_NONE, &soundpos, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f);
|
||||
ps_create(0, 0, SFX_HIT_GLASS, -1, -1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, &soundpos, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ bool light_tick_broken(s32 roomnum, s32 lightnum)
|
||||
}
|
||||
|
||||
room_flash_lighting(roomnum, 64, 80);
|
||||
ps_create(NULL, NULL, ps_get_random_spark_sound(), -1, -1, PSFLAG_0400, 0, PSTYPE_FOOTSTEP, ¢re, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f);
|
||||
ps_create(NULL, NULL, ps_get_random_spark_sound(), -1, -1, PSFLAG_AMBIENT, 0, PSTYPE_FOOTSTEP, ¢re, -1.0f, 0, roomnum, -1.0f, -1.0f, -1.0f);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -187,7 +187,7 @@ void footstep_check_default(struct chrdata *chr)
|
||||
|
||||
if (soundnum != -1 && chr->footstep != 0) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, chr->prop, soundnum, -1, -1, PSFLAG_0400, 0, PSTYPE_FOOTSTEP, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
ps_create(NULL, chr->prop, soundnum, -1, -1, PSFLAG_AMBIENT, 0, PSTYPE_FOOTSTEP, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, chr->prop, soundnum, -1, -1, 0, 0, PSTYPE_NONE, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
#endif
|
||||
@@ -268,7 +268,7 @@ void footstep_check_magic(struct chrdata *chr)
|
||||
if (soundnum != -1 && chr->footstep != 0) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, chr->prop, soundnum, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_FOOTSTEP, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_FOOTSTEP, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, chr->prop, soundnum, -1,
|
||||
-1, 0, 0, PSTYPE_NONE, NULL, -1, NULL, -1, -1, -1, -1);
|
||||
|
||||
+3
-3
@@ -1904,7 +1904,7 @@ u8 func0007_alerted[] = {
|
||||
#else
|
||||
assign_sound(SFX_01D9, CHANNEL_7)
|
||||
#endif
|
||||
play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unset_self_flag_bankx(CHRFLAG1_CAN_RELOAD, BANK_1)
|
||||
|
||||
label(0x16)
|
||||
@@ -2325,7 +2325,7 @@ u8 func0007_alerted[] = {
|
||||
#else
|
||||
assign_sound(SFX_01D9, CHANNEL_6)
|
||||
#endif
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unset_self_flag_bankx(CHRFLAG1_CAN_RELOAD, BANK_1)
|
||||
|
||||
label(0x16)
|
||||
@@ -2712,7 +2712,7 @@ u8 func0007_alerted[] = {
|
||||
#else
|
||||
assign_sound(SFX_01D9, CHANNEL_6)
|
||||
#endif
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unset_self_flag_bankx(CHRFLAG1_CAN_RELOAD, BANK_1)
|
||||
|
||||
label(0x16)
|
||||
|
||||
+7
-7
@@ -3312,7 +3312,7 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
struct coord spa4 = {0, 0, 0};
|
||||
s0 = false;
|
||||
sparks_create(prop->rooms[0], prop, &hitthing.pos, &spa4, &hitthing.unk0c, SPARKTYPE_DEEPWATER);
|
||||
ps_create(0, prop, SFX_HIT_WATER, -1, -1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f);
|
||||
ps_create(0, prop, SFX_HIT_WATER, -1, -1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1.0f, 0, -1, -1.0f, -1.0f, -1.0f);
|
||||
obj->hidden |= OBJHFLAG_DELETING;
|
||||
}
|
||||
}
|
||||
@@ -10469,7 +10469,7 @@ void hovercar_tick(struct prop *prop)
|
||||
if (hovercar->sparkstimer60 < 0) {
|
||||
hovercar->sparkstimer60 = TICKS(50);
|
||||
|
||||
ps_create(NULL, prop, SFX_SHIELD_DAMAGE, -1, -1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
ps_create(NULL, prop, SFX_SHIELD_DAMAGE, -1, -1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
sparks_create(prop->rooms[0], prop, &prop->pos, NULL, 0, SPARKTYPE_DEFAULT);
|
||||
}
|
||||
@@ -15847,7 +15847,7 @@ s32 prop_play_pickup_sound(struct prop *prop, s32 weapon)
|
||||
}
|
||||
|
||||
return ps_create(NULL, prop, sound, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
void weapon_play_pickup_sound(s32 weaponnum)
|
||||
@@ -18475,7 +18475,7 @@ void door_play_opening_sound(s32 soundtype, struct prop *prop)
|
||||
if (sound1) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, prop, sound1, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, prop, sound1, -1,
|
||||
-1, 0, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
@@ -18539,7 +18539,7 @@ void door_play_closing_sound(s32 soundtype, struct prop *prop)
|
||||
if (sound1) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, prop, sound1, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, prop, sound1, -1,
|
||||
-1, 0, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
@@ -18602,7 +18602,7 @@ void door_play_opened_sound(s32 soundtype, struct prop *prop)
|
||||
if (sound) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, prop, sound, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, prop, sound, -1,
|
||||
-1, 0, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
@@ -18652,7 +18652,7 @@ void door_play_closed_sound(s32 soundtype, struct prop *prop)
|
||||
if (sound) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
ps_create(NULL, prop, sound, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
#else
|
||||
ps_create(NULL, prop, sound, -1,
|
||||
-1, 0, 0, PSTYPE_DOOR, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
+116
-116
@@ -38,16 +38,12 @@ u32 var8006ae40 = 0;
|
||||
bool g_PsPrintFlagged = false;
|
||||
u32 var8006ae48 = 1;
|
||||
u32 var8006ae4c = 0;
|
||||
s16 var8006ae50 = -1;
|
||||
s16 g_PsLastPositionalSoundnum = -1;
|
||||
u32 var8006ae54 = 999;
|
||||
|
||||
#define CHANNELCOUNT() (IS4MB() ? 30 : 40)
|
||||
#define CHANNEL_IS_AI(channel) (channel >= 0 && channel <= 7)
|
||||
#define CHANNEL_HEAP_FIRST CHANNEL_8
|
||||
|
||||
void ps_stop_channel(s32 channelnum);
|
||||
s32 ps_calculate_vol(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, RoomNum *rooms, s16 soundnum, s32 arg6, f32 *playerdistptr);
|
||||
s32 ps_calculate_pan(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, f32 playerdist, bool arg5, struct pschannel *channel);
|
||||
s32 ps_calculate_pan(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, f32 playerdist, bool specialpan, struct pschannel *channel);
|
||||
|
||||
bool ps_prop_has_sound_with_context(struct prop *prop, s32 type)
|
||||
{
|
||||
@@ -174,7 +170,7 @@ void ps_stop_channel(s32 channelnum)
|
||||
}
|
||||
|
||||
if (channel->flags & PSFLAG_ISMP3) {
|
||||
snd_stop_mp3(channel->soundnum26);
|
||||
snd_stop_mp3(channel->requestedsoundnum);
|
||||
} else if (channel->audiohandle && sndp_get_state(channel->audiohandle) != AL_STOPPED) {
|
||||
sndp_stop_sound(channel->audiohandle);
|
||||
}
|
||||
@@ -257,9 +253,9 @@ void ps_tick_channel(s32 channelnum)
|
||||
|
||||
if (g_Vars.langfilteron && (channel->flags2 & PSFLAG2_OFFENSIVE)) {
|
||||
channel->targetvol = 0;
|
||||
} else if (channel->flags2 & PSFLAG2_0010) {
|
||||
} else if (channel->flags2 & PSFLAG2_AMBIENT) {
|
||||
if (channel->flags & PSFLAG_FIRSTTICK) {
|
||||
channel->targetvol = channel->vol10;
|
||||
channel->targetvol = channel->maxvol;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -273,15 +269,15 @@ void ps_tick_channel(s32 channelnum)
|
||||
tmprooms = rooms;
|
||||
}
|
||||
|
||||
var8006ae50 = channel->soundnum2c;
|
||||
g_PsLastPositionalSoundnum = channel->resolvedsoundnum;
|
||||
|
||||
channel->targetvol = ps_calculate_vol(pos, channel->dist1, channel->dist2, channel->dist3,
|
||||
tmprooms, channel->soundnum26, channel->vol10, &channel->distance);
|
||||
tmprooms, channel->requestedsoundnum, channel->maxvol, &channel->distance);
|
||||
}
|
||||
|
||||
if ((channel->flags & PSFLAG_HASCONFIGPAN) == 0) {
|
||||
channel->targetpan = ps_calculate_pan(pos, channel->dist1, channel->dist2, channel->dist3,
|
||||
channel->distance, channel->flags & PSFLAG_0800, channel);
|
||||
channel->distance, channel->flags & PSFLAG_SPECIALPAN, channel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,30 +433,30 @@ void ps_tick_channel(s32 channelnum)
|
||||
|
||||
|
||||
if (channel->flags & PSFLAG_ISMP3) {
|
||||
snd_start_mp3(channel->soundnum26, newvol, newpan, (channel->flags2 & PSFLAG2_RESPONDHELLO) ? 1 : 0);
|
||||
snd_start_mp3(channel->requestedsoundnum, newvol, newpan, (channel->flags2 & PSFLAG2_RESPONDHELLO) ? 1 : 0);
|
||||
} else {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (channel->flags & PSFLAG_0400) {
|
||||
if (channel->flags & PSFLAG_AMBIENT) {
|
||||
if (newvol) {
|
||||
snd00010718(&channel->audiohandle, channel->flags & PSFLAG_ISMP3, newvol, newpan,
|
||||
channel->soundnum26, newpitch, channel->fxbus, newfx, 1);
|
||||
channel->requestedsoundnum, newpitch, channel->fxbus, newfx, 1);
|
||||
}
|
||||
} else {
|
||||
if (newvol) {
|
||||
snd00010718(&channel->audiohandle, channel->flags & PSFLAG_ISMP3, newvol, newpan,
|
||||
channel->soundnum26, newpitch, channel->fxbus, newfx, 1);
|
||||
channel->requestedsoundnum, newpitch, channel->fxbus, newfx, 1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
snd00010718(&channel->audiohandle, channel->flags & PSFLAG_ISMP3, newvol, newpan,
|
||||
channel->soundnum26, newpitch, channel->fxbus, newfx, 1);
|
||||
channel->requestedsoundnum, newpitch, channel->fxbus, newfx, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
channel->flags &= ~PSFLAG_FIRSTTICK;
|
||||
} else {
|
||||
snd_adjust(&channel->audiohandle, channel->flags & PSFLAG_ISMP3, newvol, newpan,
|
||||
channel->soundnum26, newpitch, channel->fxbus, newfx, channel->flags & PSFLAG_CHANGINGPAN);
|
||||
channel->requestedsoundnum, newpitch, channel->fxbus, newfx, channel->flags & PSFLAG_CHANGINGPAN);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -603,12 +599,12 @@ void ps_set_volume(struct prop *prop, s32 volpercentage)
|
||||
prevpri = osGetThreadPri(0);
|
||||
osSetThreadPri(0, osGetThreadPri(&g_AudioManager.thread) + 1);
|
||||
|
||||
g_PsChannels[i].vol10 = volpercentage * AL_VOL_FULL / 100;
|
||||
g_PsChannels[i].maxvol = volpercentage * AL_VOL_FULL / 100;
|
||||
ps_tick_channel(i);
|
||||
|
||||
osSetThreadPri(0, prevpri);
|
||||
#else
|
||||
g_PsChannels[i].vol10 = volpercentage * AL_VOL_FULL / 100;
|
||||
g_PsChannels[i].maxvol = volpercentage * AL_VOL_FULL / 100;
|
||||
ps_tick_channel(i);
|
||||
#endif
|
||||
}
|
||||
@@ -754,7 +750,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
channel->targetvol = (vol != -1) ? vol : -1;
|
||||
channel->targetpan = AL_PAN_CENTER;
|
||||
channel->targetfx = 0;
|
||||
channel->vol10 = AL_VOL_FULL;
|
||||
channel->maxvol = AL_VOL_FULL;
|
||||
channel->fxbus = 1;
|
||||
channel->targetpitch = (pitch > 0) ? pitch : -1;
|
||||
channel->currentpitch = channel->targetpitch;
|
||||
@@ -763,7 +759,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
channel->padnum = padnum;
|
||||
channel->prop = prop;
|
||||
channel->type = type;
|
||||
channel->vol12 = vol;
|
||||
channel->requestedvol = vol;
|
||||
channel->unk40 = -1;
|
||||
channel->dist1 = (dist1 > 0) ? dist1 : 400;
|
||||
channel->dist2 = (dist2 > 0) ? dist2 : 2500;
|
||||
@@ -784,7 +780,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
channel->volchangespeed = g_AudioConfigs[confignum].volchangespeed;
|
||||
|
||||
if (g_AudioConfigs[confignum].volpercentage != 100) {
|
||||
channel->vol10 = g_AudioConfigs[confignum].volpercentage * (AL_VOL_FULL / 100);
|
||||
channel->maxvol = g_AudioConfigs[confignum].volpercentage * (AL_VOL_FULL / 100);
|
||||
}
|
||||
|
||||
if (g_AudioConfigs[confignum].pitch > 0) {
|
||||
@@ -798,8 +794,8 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
channel->flags |= PSFLAG_HASCONFIGPAN;
|
||||
}
|
||||
|
||||
if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_01) {
|
||||
channel->flags |= PSFLAG_0800;
|
||||
if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_SPECIALPAN) {
|
||||
channel->flags |= PSFLAG_SPECIALPAN;
|
||||
}
|
||||
|
||||
if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_RESPONDHELLO) {
|
||||
@@ -808,7 +804,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
|
||||
if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_08) {
|
||||
if (channel->targetvol == -1) {
|
||||
channel->targetvol = channel->vol10;
|
||||
channel->targetvol = channel->maxvol;
|
||||
}
|
||||
|
||||
channel->flags |= PSFLAG_IGNOREROOMS;
|
||||
@@ -819,7 +815,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
}
|
||||
|
||||
if (g_AudioConfigs[confignum].flags & AUDIOCONFIGFLAG_20) {
|
||||
channel->flags2 |= PSFLAG2_0010;
|
||||
channel->flags2 |= PSFLAG2_AMBIENT;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -841,23 +837,23 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
}
|
||||
#endif
|
||||
|
||||
channel->soundnum26 = spac.packed;
|
||||
channel->soundnum2c = spac.id;
|
||||
channel->requestedsoundnum = spac.packed;
|
||||
channel->resolvedsoundnum = spac.id;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (snd_is_filtered(channel->soundnum2c)) {
|
||||
if (snd_is_filtered(channel->resolvedsoundnum)) {
|
||||
channel->flags2 |= PSFLAG2_OFFENSIVE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (spac.unk02) {
|
||||
channel->flags2 |= PSFLAG2_0010;
|
||||
channel->flags2 |= PSFLAG2_AMBIENT;
|
||||
}
|
||||
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
if (channel->flags2 & PSFLAG2_0010) {
|
||||
if (channel->flags2 & PSFLAG2_AMBIENT) {
|
||||
if (channel->targetvol == -1) {
|
||||
channel->targetvol = channel->vol10;
|
||||
channel->targetvol = channel->maxvol;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -887,11 +883,13 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (!pos && !channel->prop) {
|
||||
channel->flags2 |= PSFLAG2_0010;
|
||||
channel->flags2 |= PSFLAG2_AMBIENT;
|
||||
}
|
||||
|
||||
if ((channel->flags2 & PSFLAG2_0010) && channel->targetvol == -1) {
|
||||
channel->targetvol = channel->vol10;
|
||||
if (channel->flags2 & PSFLAG2_AMBIENT) {
|
||||
if (channel->targetvol == -1) {
|
||||
channel->targetvol = channel->maxvol;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -916,14 +914,14 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (channel->flags & PSFLAG_0400) {
|
||||
channel->flags &= ~PSFLAG_0400;
|
||||
channel->flags2 |= PSFLAG2_0010;
|
||||
if (channel->flags & PSFLAG_AMBIENT) {
|
||||
channel->flags &= ~PSFLAG_AMBIENT;
|
||||
channel->flags2 |= PSFLAG2_AMBIENT;
|
||||
}
|
||||
|
||||
channel->flags &= ~PSFLAG_FIRSTTICK;
|
||||
#else
|
||||
if (channel->flags & PSFLAG_0400) {
|
||||
if (channel->flags & PSFLAG_AMBIENT) {
|
||||
channel->flags = PSFLAG_FREE;
|
||||
} else {
|
||||
channel->flags &= ~PSFLAG_FIRSTTICK;
|
||||
@@ -933,7 +931,7 @@ s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 pa
|
||||
return channel->channelnum;
|
||||
}
|
||||
|
||||
s32 ps_play_from_prop(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop, s16 type, u16 flags)
|
||||
s32 ps_create_from_ai(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop, s16 type, u16 flags)
|
||||
{
|
||||
s32 retchannelnum = -1;
|
||||
|
||||
@@ -946,20 +944,20 @@ s32 ps_play_from_prop(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop,
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (g_PsChannels[channelnum].flags & PSFLAG_FREE) {
|
||||
osSyncPrintf("AISOUND: PSTYPE_MARKER - Channel %d -> Playing sound number id=%d(%x)\n", channelnum, soundnum, soundnum);
|
||||
g_PsChannels[channelnum].soundnum26 = soundnum;
|
||||
g_PsChannels[channelnum].requestedsoundnum = soundnum;
|
||||
g_PsChannels[channelnum].type = PSTYPE_MARKER;
|
||||
g_PsChannels[channelnum].flags &= ~PSFLAG_FREE;
|
||||
retchannelnum = channelnum;
|
||||
} else {
|
||||
osSyncPrintf("AISOUND: PSTYPE_MARKER - Channel %d -> Playing sound number id=%d(%x)\n", channelnum, soundnum, soundnum);
|
||||
g_PsChannels[channelnum].soundnum26 = soundnum;
|
||||
g_PsChannels[channelnum].requestedsoundnum = soundnum;
|
||||
g_PsChannels[channelnum].type = PSTYPE_MARKER;
|
||||
g_PsChannels[channelnum].flags &= ~PSFLAG_FREE;
|
||||
retchannelnum = channelnum;
|
||||
}
|
||||
#else
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x))\n", channelnum, soundnum, soundnum);
|
||||
g_PsChannels[channelnum].soundnum26 = soundnum;
|
||||
g_PsChannels[channelnum].requestedsoundnum = soundnum;
|
||||
g_PsChannels[channelnum].type = PSTYPE_MARKER;
|
||||
g_PsChannels[channelnum].flags &= ~PSFLAG_FREE;
|
||||
retchannelnum = channelnum;
|
||||
@@ -967,64 +965,66 @@ s32 ps_play_from_prop(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop,
|
||||
} else {
|
||||
// empty
|
||||
}
|
||||
} else if (channelnum == CHANNEL_CUTSCENE) {
|
||||
/**
|
||||
* An AI script has requested the AI multi channel.
|
||||
* The multi channel is an abstraction for more channels.
|
||||
* Let ps_create choose the real channel number from the heap area.
|
||||
* The real channel number is returned but AI will ignore it.
|
||||
*
|
||||
* Flag PSFLAG_CUTSCENE is set so propsnd knows the channel
|
||||
* was allocated as part of AIMULTI instead of via the game engine.
|
||||
*/
|
||||
osSyncPrintf("AISOUND: CUTSCENE -> Playing sound number id=%d(%x))\n", soundnum, soundnum);
|
||||
} else {
|
||||
if (channelnum == CHANNEL_CUTSCENE) {
|
||||
/**
|
||||
* The caller is indicating that this is a cutscene sound,
|
||||
* and doesn't care which channel is used.
|
||||
* Let ps_create choose the real channel number from the heap area.
|
||||
*
|
||||
* Flag PSFLAG_CUTSCENE is set so propsnd knows the channel is being
|
||||
* used by a cutscene, and can be stopped once the cutscene ends.
|
||||
*/
|
||||
osSyncPrintf("AISOUND: CUTSCENE -> Playing sound number id=%d(%x))\n", soundnum, soundnum);
|
||||
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags | PSFLAG_CUTSCENE, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
else if (channelnum < 0 || channelnum >= 8 || channelnum == 9) {
|
||||
/**
|
||||
* This is a game engine sound.
|
||||
* Allocate a channel automatically from the heap and return it.
|
||||
*/
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x, Flags=%x, Type=%d, Zero=%d\n",
|
||||
channelnum, soundnum, soundnum, prop, flags, type, 0);
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x, Flags=%x, Type=%d\n",
|
||||
channelnum, soundnum, soundnum, prop, flags, type);
|
||||
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#else
|
||||
else if (channelnum == 9) {
|
||||
osSyncPrintf("AISOUND: DONTCARE -> Playing sound number id=%d(%x))\n", soundnum, soundnum);
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1, (vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
} else if (channelnum < 0 || channelnum >= 8) {
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x\n", channelnum, soundnum, soundnum, prop);
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1, (vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
/**
|
||||
* An AI script has asked for a specific channel in range 0-9.
|
||||
* Replace the channel if necessary.
|
||||
*/
|
||||
if ((g_PsChannels[channelnum].flags & PSFLAG_FREE) == 0) {
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
osSyncPrintf("SERIOUS: Existing ai sound number %d (Sound id=%d(%x)) : KILLING\n",
|
||||
channelnum, g_PsChannels[channelnum].soundnum26, g_PsChannels[channelnum].soundnum26);
|
||||
#endif
|
||||
|
||||
ps_stop_channel(channelnum);
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags | PSFLAG_CUTSCENE, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
else if (channelnum < 0 || channelnum >= CHANNEL_HEAP_FIRST || channelnum == CHANNEL_DONTCARE) {
|
||||
/**
|
||||
* Requested channel is invalid, in the heap area, or caller doesn't
|
||||
* care what channel is used.
|
||||
* Allocate a channel automatically from the heap and return it.
|
||||
*/
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x, Flags=%x, Type=%d, Zero=%d\n",
|
||||
channelnum, soundnum, soundnum, prop, flags, type, 0);
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x, Flags=%x, Type=%d\n",
|
||||
channelnum, soundnum, soundnum, prop, flags, type);
|
||||
|
||||
g_PsChannels[channelnum].channelnum = channelnum;
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#else
|
||||
else if (channelnum == CHANNEL_DONTCARE) {
|
||||
osSyncPrintf("AISOUND: DONTCARE -> Playing sound number id=%d(%x))\n", soundnum, soundnum);
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1, (vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
} else if (channelnum < 0 || channelnum >= CHANNEL_HEAP_FIRST) {
|
||||
osSyncPrintf("AISOUND: Channel %d -> Playing sound number id=%d(%x), Prop=%x\n", channelnum, soundnum, soundnum, prop);
|
||||
retchannelnum = ps_create(NULL, prop, soundnum, -1, (vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
/**
|
||||
* An AI script has asked for a specific channel in range 0-7.
|
||||
* Replace the channel if necessary.
|
||||
*/
|
||||
if ((g_PsChannels[channelnum].flags & PSFLAG_FREE) == 0) {
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
osSyncPrintf("SERIOUS: Existing ai sound number %d (Sound id=%d(%x)) : KILLING\n",
|
||||
channelnum, g_PsChannels[channelnum].requestedsoundnum, g_PsChannels[channelnum].requestedsoundnum);
|
||||
#endif
|
||||
|
||||
ps_create(&g_PsChannels[channelnum], prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
ps_stop_channel(channelnum);
|
||||
}
|
||||
|
||||
retchannelnum = channelnum;
|
||||
g_PsChannels[channelnum].channelnum = channelnum;
|
||||
|
||||
ps_create(&g_PsChannels[channelnum], prop, soundnum, -1,
|
||||
(vol ? 0 : -1), flags, 0, type, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
retchannelnum = channelnum;
|
||||
}
|
||||
}
|
||||
|
||||
return retchannelnum;
|
||||
@@ -1083,7 +1083,7 @@ void ps_modify(s32 channelnum, s32 volume, s16 padnum, struct prop *prop, s32 vo
|
||||
|
||||
g_PsChannels[channelnum].channelnum = (u16)channelnum;
|
||||
|
||||
ps_create(&g_PsChannels[channelnum], prop, channel->soundnum26, -1,
|
||||
ps_create(&g_PsChannels[channelnum], prop, channel->requestedsoundnum, -1,
|
||||
-1, flags, 0, PSTYPE_NONE, 0, -1, 0, -1, 400, dist2, dist3);
|
||||
} else {
|
||||
if ((channel->flags & PSFLAG_OUTOFRANGE) == 0 && volume >= 0) {
|
||||
@@ -1328,7 +1328,7 @@ s32 ps_calculate_pan2(struct coord *pos, s32 arg1, f32 arg2, struct pschannel *c
|
||||
return result;
|
||||
}
|
||||
|
||||
s32 ps_calculate_pan(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, f32 playerdist, bool arg5, struct pschannel *channel)
|
||||
s32 ps_calculate_pan(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, f32 playerdist, bool specialpan, struct pschannel *channel)
|
||||
{
|
||||
s32 result = AL_PAN_CENTER;
|
||||
|
||||
@@ -1354,7 +1354,7 @@ s32 ps_calculate_pan(struct coord *pos, f32 dist1, f32 dist2, f32 dist3, f32 pla
|
||||
dist2 = 5801;
|
||||
}
|
||||
|
||||
if (arg5) {
|
||||
if (specialpan) {
|
||||
if (playerdist < dist1) {
|
||||
// empty
|
||||
} else if (playerdist < dist2) {
|
||||
@@ -1396,7 +1396,7 @@ void ps_get_theoretical_vol_pan(struct coord *pos, RoomNum *rooms, s16 soundnum,
|
||||
union soundnumhack sp48;
|
||||
union soundnumhack sp44;
|
||||
f32 distance;
|
||||
bool sp3c;
|
||||
bool specialpan;
|
||||
s32 index;
|
||||
s32 confignum;
|
||||
f32 *distanceptr = &distance;
|
||||
@@ -1407,7 +1407,7 @@ void ps_get_theoretical_vol_pan(struct coord *pos, RoomNum *rooms, s16 soundnum,
|
||||
|
||||
sp44.packed = soundnum;
|
||||
distance = 9999999;
|
||||
sp3c = false;
|
||||
specialpan = false;
|
||||
|
||||
if (sp44.hasconfig) {
|
||||
confignum = sp44.confignum;
|
||||
@@ -1421,8 +1421,8 @@ void ps_get_theoretical_vol_pan(struct coord *pos, RoomNum *rooms, s16 soundnum,
|
||||
|
||||
sp48.packed = russ->soundnum;
|
||||
|
||||
if (config->flags & AUDIOCONFIGFLAG_01) {
|
||||
sp3c = true;
|
||||
if (config->flags & AUDIOCONFIGFLAG_SPECIALPAN) {
|
||||
specialpan = true;
|
||||
}
|
||||
|
||||
if (dist3 < *distanceptr) {
|
||||
@@ -1434,7 +1434,7 @@ void ps_get_theoretical_vol_pan(struct coord *pos, RoomNum *rooms, s16 soundnum,
|
||||
}
|
||||
|
||||
*vol = ps_calculate_vol(pos, dist1, dist2, dist3, rooms, soundnum, AL_VOL_FULL, distanceptr);
|
||||
*pan = ps_calculate_pan(pos, dist1, dist2, dist3, *distanceptr, sp3c, 0);
|
||||
*pan = ps_calculate_pan(pos, dist1, dist2, dist3, *distanceptr, specialpan, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1443,11 +1443,11 @@ void ps_apply_vol_pan(struct sndstate *handle, struct coord *pos, f32 dist1, f32
|
||||
union soundnumhack sp5c;
|
||||
union soundnumhack sp58;
|
||||
f32 distance;
|
||||
bool sp50;
|
||||
bool specialpan;
|
||||
s32 vol;
|
||||
s32 pan;
|
||||
|
||||
sp50 = false;
|
||||
specialpan = false;
|
||||
distance = 9999999;
|
||||
sp58.packed = soundnum;
|
||||
|
||||
@@ -1465,8 +1465,8 @@ void ps_apply_vol_pan(struct sndstate *handle, struct coord *pos, f32 dist1, f32
|
||||
|
||||
sp5c.packed = g_AudioRussMappings[confignum].soundnum;
|
||||
|
||||
if (g_AudioConfigs[index].flags & AUDIOCONFIGFLAG_01) {
|
||||
sp50 = true;
|
||||
if (g_AudioConfigs[index].flags & AUDIOCONFIGFLAG_SPECIALPAN) {
|
||||
specialpan = true;
|
||||
}
|
||||
|
||||
if (dist3 < *distanceptr) {
|
||||
@@ -1478,7 +1478,7 @@ void ps_apply_vol_pan(struct sndstate *handle, struct coord *pos, f32 dist1, f32
|
||||
}
|
||||
|
||||
vol = ps_calculate_vol(pos, dist1, dist2, dist3, rooms, soundnum, arg7, distanceptr);
|
||||
pan = ps_calculate_pan(pos, dist1, dist2, dist3, *distanceptr, sp50, 0);
|
||||
pan = ps_calculate_pan(pos, dist1, dist2, dist3, *distanceptr, specialpan, 0);
|
||||
|
||||
snd_adjust(&handle, snd_is_mp3(soundnum), vol, pan, soundnum, 1.0f, 1, -1, 1);
|
||||
}
|
||||
@@ -1499,17 +1499,17 @@ s32 ps_get_random_spark_sound(void)
|
||||
return sounds[index];
|
||||
}
|
||||
|
||||
u32 ps0f095258(u32 arg0, u32 arg1)
|
||||
Gfx *ps_render1(Gfx *gdl, s32 arg1)
|
||||
{
|
||||
return arg0;
|
||||
return gdl;
|
||||
}
|
||||
|
||||
u32 ps0f095264(u32 arg0, u32 arg1)
|
||||
Gfx *ps_render2(Gfx *gdl, s32 arg1)
|
||||
{
|
||||
return arg0;
|
||||
return gdl;
|
||||
}
|
||||
|
||||
void ps0f095270(void)
|
||||
void ps_debug(void)
|
||||
{
|
||||
// empty
|
||||
}
|
||||
@@ -1528,7 +1528,7 @@ s32 ps_get_duration60(s32 channelnum)
|
||||
&& (channel->flags & PSFLAG_FREE) == 0
|
||||
&& (channel->flags & PSFLAG_ISMP3)) {
|
||||
union soundnumhack soundnum;
|
||||
soundnum.packed = channel->soundnum26;
|
||||
soundnum.packed = channel->requestedsoundnum;
|
||||
|
||||
return file_get_rom_size(soundnum.id) * 60 / (1024 * 24 / 8);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ void ps_stop(void)
|
||||
|
||||
for (i = 0; i < (IS4MB() ? 30 : 40); i++) {
|
||||
if (g_PsChannels[i].flags & PSFLAG_ISMP3) {
|
||||
snd_stop_mp3(g_PsChannels[i].soundnum26);
|
||||
snd_stop_mp3(g_PsChannels[i].requestedsoundnum);
|
||||
g_PsChannels[i].flags &= ~PSFLAG_ISMP3;
|
||||
g_PsChannels[i].flags &= ~PSFLAG_REPEATING;
|
||||
} else if (g_PsChannels[i].audiohandle && sndp_get_state(g_PsChannels[i].audiohandle) != AL_STOPPED) {
|
||||
|
||||
+1
-1
@@ -2096,7 +2096,7 @@ void fr_tick(void)
|
||||
|
||||
ps_stop_sound(prop, PSTYPE_GENERAL, 0xffff);
|
||||
ps_create(NULL, prop, SFX_FR_CONVEYER_STOP, -1,
|
||||
-1, PSFLAG_0400, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
-1, PSFLAG_AMBIENT, 0, PSTYPE_NONE, 0, -1, 0, -1, -1, -1, -1);
|
||||
|
||||
if (g_FrNumSounds);
|
||||
}
|
||||
|
||||
+91
-24
@@ -1979,34 +1979,57 @@
|
||||
channel,
|
||||
|
||||
/**
|
||||
* Plays or stops a sound coming from the given object.
|
||||
* This command makes the sound originate from the given object's position.
|
||||
*
|
||||
* The channel argument should be a CHANNEL constant.
|
||||
* The bool argument should be TRUE to play or FALSE to stop.
|
||||
* If the channel was marked using assign_sound, the volchangetimer60 argument
|
||||
* is ignored and the sound will be started immediately at the appropriate
|
||||
* volume based on the player's distance from the object.
|
||||
*
|
||||
* If the channel is already playing, the volchangetimer60 argument will be used
|
||||
* to determine how long the transition takes to the new object's position.
|
||||
*/
|
||||
#define set_object_sound_playing(channel, object, bool) \
|
||||
#define bind_channel_to_object(channel, object, volchangetimer60) \
|
||||
mkshort(0x00cf), \
|
||||
channel, \
|
||||
object, \
|
||||
0x00, \
|
||||
bool,
|
||||
mkshort(volchangetimer60),
|
||||
|
||||
/**
|
||||
* Plays a sound coming from the given pad.
|
||||
* This command makes the sound originate from the given pad's position,
|
||||
* and makes the sound repeat indefinitely.
|
||||
*
|
||||
* If the channel was marked using assign_sound, the sound will be started
|
||||
* immediately at the appropriate volume based on the player's distance from
|
||||
* the pad.
|
||||
*/
|
||||
#define play_repeating_sound_from_pad(pad, sound) \
|
||||
#define bind_channel_to_pad_repeating(pad, sound) \
|
||||
mkshort(0x00d0), \
|
||||
0x00, \
|
||||
0, \
|
||||
mkshort(pad), \
|
||||
mkshort(sound),
|
||||
|
||||
#define set_object_sound_volume(channel, volume, volchangetimer60) \
|
||||
/**
|
||||
* Sets the target volume of a channel which is already playing.
|
||||
*
|
||||
* The volume will be changed gradually over a period of time,
|
||||
* specified by volchangetimer60.
|
||||
*/
|
||||
#define set_channel_volume(channel, volume, volchangetimer60) \
|
||||
mkshort(0x00d1), \
|
||||
channel, \
|
||||
mkshort(volume), \
|
||||
mkshort(volchangetimer60),
|
||||
|
||||
#define set_object_sound_volume_by_distance(channel, distance, volchangetimer60) \
|
||||
/**
|
||||
* Sets the target volume of a channel which is already playing.
|
||||
*
|
||||
* The target volume is automatically calculated based on the given distance,
|
||||
* as if the player is that distance from the source.
|
||||
*
|
||||
* The volume will be changed gradually over a period of time,
|
||||
* specified by volchangetimer60.
|
||||
*/
|
||||
#define set_channel_volume_by_distance(channel, distance, volchangetimer60) \
|
||||
mkshort(0x00d2), \
|
||||
channel, \
|
||||
mkshort(distance), \
|
||||
@@ -3336,11 +3359,25 @@
|
||||
label,
|
||||
|
||||
/**
|
||||
* Play a sound from the given object repeatedly.
|
||||
* This command makes the sound originate from the given object's position,
|
||||
* and makes the sound repeat indefinitely. It's typically used to make
|
||||
* terminals hum.
|
||||
*
|
||||
* Typically used to make terminals hum.
|
||||
* The dist2 parameter determines the distance at which the curved volume scale
|
||||
* transitions to a linear scale. This is typically when you're almost out of
|
||||
* earshot.
|
||||
*
|
||||
* The dist3 parameter determines the max distance that you can hear the object.
|
||||
* This should be bigger than dist2.
|
||||
*
|
||||
* If the channel was marked using assign_sound, the volchangetimer60 argument
|
||||
* is ignored and the sound will be started immediately at the appropriate
|
||||
* volume based on the player's distance from the object.
|
||||
*
|
||||
* If the channel is already playing, the volchangetimer60 argument will be used
|
||||
* to determine how long the transition takes to the new object's position.
|
||||
*/
|
||||
#define play_repeating_sound_from_object(channel, object, volchangetimer60, dist2, dist3) \
|
||||
#define bind_channel_to_object_repeating(channel, object, volchangetimer60, dist2, dist3) \
|
||||
mkshort(0x016b), \
|
||||
channel, \
|
||||
object, \
|
||||
@@ -3477,15 +3514,35 @@
|
||||
chr, \
|
||||
label,
|
||||
|
||||
#define play_sound_from_entity(channel, entity_id, u1, u2, attackflags) \
|
||||
/**
|
||||
* This command makes the sound originate from the given entity's position,
|
||||
* where the entity can be an object or a chr.
|
||||
*
|
||||
* The dist2 parameter determines the distance at which the curved volume scale
|
||||
* transitions to a linear scale. This is typically when you're almost out of
|
||||
* earshot.
|
||||
*
|
||||
* The dist3 parameter determines the max distance that you can hear the object.
|
||||
* This should be bigger than dist2.
|
||||
*
|
||||
* The command supports a volchangetimer60 parameter, but as this command is
|
||||
* always called with value 1, we omit it as a macro parameter for brevity.
|
||||
*
|
||||
* If the channel was marked using assign_sound, the volchangetimer60 argument
|
||||
* is ignored and the sound will be started immediately at the appropriate
|
||||
* volume based on the player's distance from the entity.
|
||||
*
|
||||
* If the channel is already playing, the volchangetimer60 argument will be used
|
||||
* to determine how long the transition takes to the new object's position.
|
||||
*/
|
||||
#define bind_channel_to_entity(channel, entity_id, dist2, dist3, is_chr) \
|
||||
mkshort(0x0179), \
|
||||
channel, \
|
||||
entity_id, \
|
||||
0x00, \
|
||||
0x01, \
|
||||
mkshort(u1), \
|
||||
mkshort(u2), \
|
||||
attackflags,
|
||||
mkshort(1), \
|
||||
mkshort(dist2), \
|
||||
mkshort(dist3), \
|
||||
is_chr,
|
||||
|
||||
/**
|
||||
* Checks if the chr can see their attack target, which should have been
|
||||
@@ -3508,6 +3565,9 @@
|
||||
|
||||
/**
|
||||
* Assigns a sound to the given channel. Does not play the sound.
|
||||
*
|
||||
* Doing this sets a marker on the channel, which affects the behaviour
|
||||
* of further audio commands.
|
||||
*/
|
||||
#define assign_sound(sound, channel) \
|
||||
mkshort(0x017c), \
|
||||
@@ -3782,7 +3842,7 @@
|
||||
* Each quip type + morale combination has up to three quips that may be said.
|
||||
* The quip used is random.
|
||||
*/
|
||||
#define play_cistaff_quip(ciquip, channel) \
|
||||
#define say_ciquip(ciquip, channel) \
|
||||
mkshort(0x01a2), \
|
||||
ciquip, \
|
||||
channel,
|
||||
@@ -4335,13 +4395,20 @@
|
||||
mkshort(distance / 10), \
|
||||
label,
|
||||
|
||||
#define play_sound_from_object2(channel, object, sound, type, flags) \
|
||||
/**
|
||||
* This command assigns and plays a sound, originating from the given object's
|
||||
* position.
|
||||
*
|
||||
* The type parameter should be a PSTYPE constant.
|
||||
*
|
||||
* The flags parameter should be a PSFLAG constant.
|
||||
*/
|
||||
#define play_sound_from_object(channel, object, sound, type, flags) \
|
||||
mkshort(0x01d9), \
|
||||
channel, \
|
||||
object, \
|
||||
mkshort(sound), \
|
||||
0xff, \
|
||||
0xff, \
|
||||
mkshort(0xffff), /*volume*/ \
|
||||
type, \
|
||||
mkshort(flags),
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
#define ATTACKFLAG_NOVERTICAL 0x0100 // don't aim up/down
|
||||
#define ATTACKFLAG_AIMATTARGET 0x0200 // aim/shoot at whatever is in the chr's `target` field
|
||||
|
||||
#define AUDIOCONFIGFLAG_01 0x01
|
||||
#define AUDIOCONFIGFLAG_SPECIALPAN 0x01
|
||||
#define AUDIOCONFIGFLAG_RESPONDHELLO 0x04
|
||||
#define AUDIOCONFIGFLAG_08 0x08
|
||||
#define AUDIOCONFIGFLAG_OFFENSIVE 0x10
|
||||
@@ -408,10 +408,13 @@
|
||||
#define CHANNEL_5 5
|
||||
#define CHANNEL_6 6
|
||||
#define CHANNEL_7 7
|
||||
#define CHANNEL_8 8
|
||||
#define CHANNEL_9 9
|
||||
#define CHANNEL_DONTCARE 9
|
||||
#define CHANNEL_CUTSCENE 10
|
||||
|
||||
#define CHANNELCOUNT() (IS4MB() ? 30 : 40)
|
||||
#define CHANNEL_IS_AI(channel) (channel >= 0 && channel <= 7)
|
||||
#define CHANNEL_HEAP_FIRST 8
|
||||
|
||||
#define CHEAT_HURRICANEFISTS 0
|
||||
#define CHEAT_CLOAKINGDEVICE 1
|
||||
#define CHEAT_INVINCIBLE 2
|
||||
@@ -3506,8 +3509,8 @@
|
||||
#define PSFLAG_HASCONFIG 0x0040
|
||||
#define PSFLAG_CUTSCENE 0x0080
|
||||
#define PSFLAG_FORHUDMSG 0x0200
|
||||
#define PSFLAG_0400 0x0400
|
||||
#define PSFLAG_0800 0x0800
|
||||
#define PSFLAG_AMBIENT 0x0400
|
||||
#define PSFLAG_SPECIALPAN 0x0800
|
||||
#define PSFLAG_FIRSTTICK 0x1000
|
||||
#define PSFLAG_OUTOFRANGE 0x2000
|
||||
#define PSFLAG_CHANGINGPAN 0x4000
|
||||
@@ -3516,7 +3519,7 @@
|
||||
#define PSFLAG2_RESPONDHELLO 0x0001
|
||||
#define PSFLAG2_MPPAUSABLE 0x0002
|
||||
#define PSFLAG2_PRINTABLE 0x0004
|
||||
#define PSFLAG2_0010 0x0010
|
||||
#define PSFLAG2_AMBIENT 0x0010
|
||||
#define PSFLAG2_OFFENSIVE 0x0020
|
||||
#define PSFLAG2_0040 0x0040
|
||||
#define PSFLAG2_STOPPED 0x0080
|
||||
|
||||
@@ -210,10 +210,10 @@
|
||||
/*0x00cc*/ bool ai_show_hudmsg_top_middle(void);
|
||||
/*0x00cd*/ bool ai_speak(void);
|
||||
/*0x00ce*/ bool ai_play_sound(void);
|
||||
/*0x00cf*/ bool ai_set_object_sound_playing(void);
|
||||
/*0x00d0*/ bool ai_play_repeating_sound_from_pad(void);
|
||||
/*0x00d1*/ bool ai_set_object_sound_volume(void);
|
||||
/*0x00d2*/ bool ai_set_object_sound_volume_by_distance(void);
|
||||
/*0x00cf*/ bool ai_bind_channel_to_object(void);
|
||||
/*0x00d0*/ bool ai_bind_channel_to_pad_repeating(void);
|
||||
/*0x00d1*/ bool ai_set_channel_volume(void);
|
||||
/*0x00d2*/ bool ai_set_channel_volume_by_distance(void);
|
||||
/*0x00d3*/ bool ai_audio_mute_channel(void);
|
||||
/*0x00d4*/ bool ai_if_object_sound_volume_less_than(void);
|
||||
/*0x00d5*/ bool ai_hovercar_begin_path(void);
|
||||
@@ -341,7 +341,7 @@
|
||||
/*0x0168*/ bool ai_if_shield_damaged(void);
|
||||
/*0x0169*/ bool ai_if_natural_anim(void);
|
||||
/*0x016a*/ bool ai_if_y(void);
|
||||
/*0x016b*/ bool ai_play_repeating_sound_from_object(void);
|
||||
/*0x016b*/ bool ai_bind_channel_to_object_repeating(void);
|
||||
/*0x016c*/ bool ai_noop_016c(void);
|
||||
/*0x016d*/ bool ai_chr_adjust_motion_blur(void);
|
||||
/*0x016e*/ bool ai_damage_chr_by_amount(void);
|
||||
@@ -355,7 +355,7 @@
|
||||
/*0x0176*/ bool ai_if_bot_respawning(void);
|
||||
/*0x0177*/ bool ai_player_auto_walk(void);
|
||||
/*0x0178*/ bool ai_if_player_auto_walk_finished(void);
|
||||
/*0x0179*/ bool ai_play_sound_from_entity(void);
|
||||
/*0x0179*/ bool ai_bind_channel_to_entity(void);
|
||||
/*0x017a*/ bool ai_if_los_to_attack_target(void);
|
||||
/*0x017b*/ bool ai_if_chr_knocked_out(void);
|
||||
/*0x017c*/ bool ai_assign_sound(void);
|
||||
@@ -386,7 +386,7 @@
|
||||
/*0x019f*/ bool ai_set_obj_health(void);
|
||||
/*0x01a0*/ bool ai_set_chr_special_death_animation(void);
|
||||
/*0x01a1*/ bool ai_set_room_to_search(void);
|
||||
/*0x01a2*/ bool ai_say_ci_staff_quip(void);
|
||||
/*0x01a2*/ bool ai_say_ciquip(void);
|
||||
/*0x01a3*/ bool ai_do_preset_animation(void);
|
||||
/*0x01a4*/ bool ai_show_hudmsg_middle(void);
|
||||
/*0x01a5*/ bool ai_if_using_lift(void);
|
||||
@@ -437,7 +437,7 @@
|
||||
/*0x01d6*/ bool ai_configure_environment(void);
|
||||
/*0x01d7*/ bool ai_if_distance_to_target2_less_than(void);
|
||||
/*0x01d8*/ bool ai_if_distance_to_target2_greater_than(void);
|
||||
/*0x01d9*/ bool ai_play_sound_from_prop(void);
|
||||
/*0x01d9*/ bool ai_play_sound_from_object(void);
|
||||
/*0x01da*/ bool ai_play_temporary_primary_track(void);
|
||||
/*0x01db*/ bool ai_chr_kill(void);
|
||||
/*0x01dc*/ bool ai_remove_weapon_from_inventory(void);
|
||||
|
||||
@@ -18,7 +18,7 @@ void ps_tick(void);
|
||||
void ps_set_pitch(struct prop *prop, f32 targetpitch, s32 changespeed);
|
||||
void ps_set_volume(struct prop *prop, s32 vol);
|
||||
s16 ps_create(struct pschannel *channel, struct prop *prop, s16 soundnum, s16 padnum, s32 vol, u16 flags, u16 flags2, s32 type, struct coord *pos, f32 pitch, RoomNum *rooms, s32 room, f32 dist1, f32 dist2, f32 dist3);
|
||||
s32 ps_play_from_prop(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop, s16 type, u16 flags);
|
||||
s32 ps_create_from_ai(s32 channelnum, s16 soundnum, s32 vol, struct prop *prop, s16 type, u16 flags);
|
||||
void ps_mute_channel(s32 channelnum);
|
||||
bool ps_is_channel_free(s32 channelnum);
|
||||
void ps_modify(s32 channelnum, s32 arg1, s16 padnum, struct prop *prop, s32 volchangetimer60, s32 dist2, s32 dist3, u16 flags);
|
||||
|
||||
+4
-4
@@ -5325,8 +5325,8 @@ struct pschannel {
|
||||
/*0x0a*/ s16 targetpan;
|
||||
/*0x0c*/ s16 targetfx;
|
||||
/*0x0e*/ s16 currentfx;
|
||||
/*0x10*/ s16 vol10;
|
||||
/*0x12*/ s16 vol12;
|
||||
/*0x10*/ s16 maxvol;
|
||||
/*0x12*/ s16 requestedvol;
|
||||
/*0x14*/ s16 degrees;
|
||||
/*0x16*/ s16 unk16;
|
||||
/*0x18*/ s16 volchangespeed;
|
||||
@@ -5334,10 +5334,10 @@ struct pschannel {
|
||||
/*0x1c*/ s32 volchangetimer60;
|
||||
/*0x20*/ s32 pitchchangespeed;
|
||||
/*0x24*/ s16 padnum;
|
||||
/*0x26*/ s16 soundnum26;
|
||||
/*0x26*/ s16 requestedsoundnum;
|
||||
/*0x28*/ s16 type;
|
||||
/*0x2a*/ u16 unk2a; // unused
|
||||
/*0x2c*/ s16 soundnum2c;
|
||||
/*0x2c*/ s16 resolvedsoundnum;
|
||||
/*0x2e*/ s16 channelnum;
|
||||
/*0x30*/ u16 flags;
|
||||
/*0x32*/ u16 flags2;
|
||||
|
||||
+32
-32
@@ -652,44 +652,44 @@ struct audioconfig g_AudioConfigs[] = {
|
||||
{ /* 4*/ 200, 1000, 1200, -1, 100, -1, 0, 0 },
|
||||
{ /* 5*/ 200, 1000, 1200, -1, 100, -1, 0, 0 },
|
||||
{ /* 6*/ 200, 1000, 1200, -1, 100, -1, 0, 0 },
|
||||
{ /* 7*/ 1000, 3500, 4000, -1, 100, -1, 120, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /* 8*/ 1000, 2500, 3000, -1, 100, -1, 30, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /* 9*/ 1000, 3500, 4000, -1, 100, -1, 120, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*10*/ 1000, 2500, 3000, -1, 100, -1, 30, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*11*/ 1600, 3000, 3500, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*12*/ 400, 1100, 1400, -1, 100, -1, 140, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*13*/ 400, 1100, 1400, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*14*/ 300, 1200, 1250, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*15*/ 500, 1800, 1900, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*16*/ 1000, 2700, 2900, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*17*/ 1500, 3000, 4000, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*18*/ 2500, 4900, 5000, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*19*/ 5500, 5600, 5700, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_20 },
|
||||
{ /* 7*/ 1000, 3500, 4000, -1, 100, -1, 120, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /* 8*/ 1000, 2500, 3000, -1, 100, -1, 30, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /* 9*/ 1000, 3500, 4000, -1, 100, -1, 120, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*10*/ 1000, 2500, 3000, -1, 100, -1, 30, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*11*/ 1600, 3000, 3500, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*12*/ 400, 1100, 1400, -1, 100, -1, 140, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*13*/ 400, 1100, 1400, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*14*/ 300, 1200, 1250, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*15*/ 500, 1800, 1900, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*16*/ 1000, 2700, 2900, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*17*/ 1500, 3000, 4000, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*18*/ 2500, 4900, 5000, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*19*/ 5500, 5600, 5700, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_20 },
|
||||
{ /*20*/ 20, 400, 500, -1, 100, -1, 0, 0 },
|
||||
{ /*21*/ 300, 1700, 2000, -1, 100, -1, 0, 0 },
|
||||
{ /*22*/ 600, 3500, 5000, -1, 100, -1, 0, 0 },
|
||||
{ /*23*/ 600, 3500, 5000, -1, 100, -1, 0, 0 },
|
||||
{ /*24*/ 600, 3500, 5000, -1, 100, -1, 0, 0 },
|
||||
{ /*25*/ 600, 2500, 3000, -1, 100, -1, 0, 0 },
|
||||
{ /*26*/ 1500, 4900, 5500, -1, 100, -1, 100, AUDIOCONFIGFLAG_01 },
|
||||
{ /*27*/ 5500, 5740, 5800, -1, 100, -1, 100, AUDIOCONFIGFLAG_01 },
|
||||
{ /*28*/ 250, 1000, 1300, 2, 100, -1, 120, AUDIOCONFIGFLAG_01 },
|
||||
{ /*26*/ 1500, 4900, 5500, -1, 100, -1, 100, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*27*/ 5500, 5740, 5800, -1, 100, -1, 100, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*28*/ 250, 1000, 1300, 2, 100, -1, 120, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*29*/ 200, 2600, 3000, -1, 100, -1, 0, 0 },
|
||||
{ /*30*/ 200, 750, 850, -1, 100, -1, 0, 0 },
|
||||
{ /*31*/ 600, 2000, 3000, -1, 100, -1, 0, 0 },
|
||||
{ /*32*/ 500, 1500, 1800, -1, 100, -1, 0, 0 },
|
||||
{ /*33*/ 800, 2500, 3000, -1, 100, -1, 0, 0 },
|
||||
{ /*34*/ 400, 1500, 2000, -1, 100, -1, 0, 0 },
|
||||
{ /*35*/ 1000, 3500, 5000, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*36*/ 50, 225, 250, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*37*/ 50, 225, 250, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*38*/ 2000, 2500, 2700, -1, 50, -1, 0, AUDIOCONFIGFLAG_01 | AUDIOCONFIGFLAG_08 },
|
||||
{ /*39*/ 300, 1000, 1200, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*40*/ 300, 1000, 1200, -1, 100, -1, 100, AUDIOCONFIGFLAG_01 },
|
||||
{ /*41*/ 600, 1500, 1800, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*42*/ 600, 1500, 1800, -1, 100, -1, 100, AUDIOCONFIGFLAG_01 },
|
||||
{ /*43*/ 800, 2600, 3500, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*44*/ 800, 2600, 3500, -1, 100, -1, 100, AUDIOCONFIGFLAG_01 },
|
||||
{ /*35*/ 1000, 3500, 5000, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*36*/ 50, 225, 250, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*37*/ 50, 225, 250, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*38*/ 2000, 2500, 2700, -1, 50, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN | AUDIOCONFIGFLAG_08 },
|
||||
{ /*39*/ 300, 1000, 1200, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*40*/ 300, 1000, 1200, -1, 100, -1, 100, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*41*/ 600, 1500, 1800, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*42*/ 600, 1500, 1800, -1, 100, -1, 100, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*43*/ 800, 2600, 3500, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*44*/ 800, 2600, 3500, -1, 100, -1, 100, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*45*/ 200, 800, 1000, -1, 100, -1, 0, 0 },
|
||||
{ /*46*/ 200, 700, 1000, -1, 100, -1, 0, 0 },
|
||||
{ /*47*/ 1000, 2500, 3000, -1, 100, -1, 0, 0 },
|
||||
@@ -700,13 +700,13 @@ struct audioconfig g_AudioConfigs[] = {
|
||||
{ /*52*/ 200, 500, 800, -1, 100, -1, 100, 0 },
|
||||
{ /*53*/ 1000, 1100, 1600, -1, 100, -1, 0, 0 },
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
{ /*54*/ 300, 1300, 1500, -1, 100, -1, 0, AUDIOCONFIGFLAG_01 },
|
||||
{ /*54*/ 300, 1300, 1500, -1, 100, -1, 0, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
#endif
|
||||
{ /*55*/ 300, 1300, 1500, -1, 100, -1, 200, AUDIOCONFIGFLAG_01 },
|
||||
{ /*56*/ 250, 600, 900, -1, 100, -1, 200, AUDIOCONFIGFLAG_01 },
|
||||
{ /*57*/ 50, 180, 250, -1, 100, -1, 200, AUDIOCONFIGFLAG_01 },
|
||||
{ /*58*/ 100, 400, 600, -1, 100, -1, 200, AUDIOCONFIGFLAG_01 },
|
||||
{ /*59*/ 700, 1100, 1400, -1, 100, -1, 200, AUDIOCONFIGFLAG_01 },
|
||||
{ /*55*/ 300, 1300, 1500, -1, 100, -1, 200, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*56*/ 250, 600, 900, -1, 100, -1, 200, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*57*/ 50, 180, 250, -1, 100, -1, 200, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*58*/ 100, 400, 600, -1, 100, -1, 200, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*59*/ 700, 1100, 1400, -1, 100, -1, 200, AUDIOCONFIGFLAG_SPECIALPAN },
|
||||
{ /*60*/ 400, 2500, 3000, -1, 100, -1, 0, AUDIOCONFIGFLAG_RESPONDHELLO },
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
{ /*61*/ 300, 900, 1100, -1, 100, -1, 0, 0 },
|
||||
|
||||
+13
-13
@@ -1614,7 +1614,7 @@ u8 func0414_programmer[] = {
|
||||
// Phone ringing
|
||||
label(0x06)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_4, OBJ_PCMONITOR, SFX_8109, PSTYPE_COMMHUB, 0x02)
|
||||
play_sound_from_object(CHANNEL_4, OBJ_PCMONITOR, SFX_8109, PSTYPE_COMMHUB, PSFLAG_REPEATING)
|
||||
#else
|
||||
speak(CHR_TARGET, -1, SFX_8109, CHANNEL_4, COLOR_00_GREEN)
|
||||
#endif
|
||||
@@ -2043,7 +2043,7 @@ u8 func100e_check_ecm_mines[] = {
|
||||
yield
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_8113, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_SECURITYHUB, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_SECURITYHUB, TRUE)
|
||||
show_hudmsg(CHR_BOND, L_AME_076) // "Internal security system temporarily disabled."
|
||||
set_stage_flag(STAGEFLAG_SECURITYHUB_COMPLETE)
|
||||
reloop(0x00)
|
||||
@@ -2054,7 +2054,7 @@ u8 func100e_check_ecm_mines[] = {
|
||||
yield
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_8113, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_EXTCOMMSHUB, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_EXTCOMMSHUB, TRUE)
|
||||
show_hudmsg(CHR_BOND, L_AME_077) // "External communications hub disabled."
|
||||
set_stage_flag(STAGEFLAG_EXTCOMMSHUB_COMPLETE)
|
||||
reloop(0x00)
|
||||
@@ -2261,7 +2261,7 @@ u8 func1007_uplinking[] = {
|
||||
restart_timer
|
||||
show_hudmsg(CHR_TARGET, L_AME_046) // "ACCESS DENIED - password needed."
|
||||
assign_sound(SFX_01C0, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_PC, FALSE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_PC, FALSE)
|
||||
|
||||
beginloop(0xaf)
|
||||
if_timer_gt(120, /*goto*/ 0x06)
|
||||
@@ -2274,7 +2274,7 @@ u8 func1007_uplinking[] = {
|
||||
label(0xae)
|
||||
show_hudmsg(CHR_TARGET, L_AME_044) // "File download initiated."
|
||||
assign_sound(SFX_01BF, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_PC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_PC, TRUE)
|
||||
restart_timer
|
||||
|
||||
// @bug: Missing check for player still having uplink equipped
|
||||
@@ -2287,7 +2287,7 @@ u8 func1007_uplinking[] = {
|
||||
label(0xad)
|
||||
mute_channel(CHANNEL_7)
|
||||
assign_sound(SFX_01C1, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_PC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_PC, TRUE)
|
||||
show_hudmsg(CHR_TARGET, L_AME_045) // "File download completed."
|
||||
yield
|
||||
set_stage_flag(STAGEFLAG_DOWNLOAD_COMPLETE)
|
||||
@@ -2297,7 +2297,7 @@ u8 func1007_uplinking[] = {
|
||||
show_hudmsg(CHR_TARGET, L_AME_074) // "Datalink broken - connection terminated."
|
||||
mute_channel(CHANNEL_7)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
play_repeating_sound_from_object(CHANNEL_6, OBJ_PC, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_6, OBJ_PC, 1, 300, 400)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x11)
|
||||
@@ -2312,7 +2312,7 @@ u8 func1007_uplinking[] = {
|
||||
show_hudmsg(CHR_TARGET, L_AME_075) // "Datalink error - incomplete file download."
|
||||
mute_channel(CHANNEL_7)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
play_repeating_sound_from_object(CHANNEL_6, OBJ_PC, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_6, OBJ_PC, 1, 300, 400)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x13)
|
||||
@@ -2369,7 +2369,7 @@ u8 func1008_doorswitch[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_043B, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_OFFICEDOOR1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_OFFICEDOOR1, TRUE)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
@@ -3331,13 +3331,13 @@ u8 func1003_start_intro[] = {
|
||||
u8 func1010_start_hub_humms[] = {
|
||||
yield
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_0, OBJ_SECURITYHUB, SFX_8111, PSTYPE_COMMHUB, 0x02)
|
||||
play_sound_from_object(CHANNEL_0, OBJ_SECURITYHUB, SFX_8111, PSTYPE_COMMHUB, PSFLAG_REPEATING)
|
||||
yield
|
||||
play_sound_from_object2(CHANNEL_1, OBJ_EXTCOMMSHUB, SFX_8111, PSTYPE_COMMHUB, 0x02)
|
||||
play_sound_from_object(CHANNEL_1, OBJ_EXTCOMMSHUB, SFX_8111, PSTYPE_COMMHUB, PSFLAG_REPEATING)
|
||||
#else
|
||||
play_sound_from_object2(CHANNEL_0, OBJ_SECURITYHUB, SFX_8111, PSTYPE_COMMHUB, 0x00)
|
||||
play_sound_from_object(CHANNEL_0, OBJ_SECURITYHUB, SFX_8111, PSTYPE_COMMHUB, 0)
|
||||
yield
|
||||
play_sound_from_object2(CHANNEL_1, OBJ_SECURITYHUB, SFX_0004, PSTYPE_COMMHUB, 0x00)
|
||||
play_sound_from_object(CHANNEL_1, OBJ_SECURITYHUB, SFX_0004, PSTYPE_COMMHUB, 0)
|
||||
#endif
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
|
||||
@@ -1443,7 +1443,7 @@ u8 func1004_elevator_unlocking[] = {
|
||||
label(0x20)
|
||||
show_hudmsg(CHR_TARGET, L_ARK_014) // "Accessing elevator controls..."
|
||||
assign_sound(SFX_8116, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x01, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x01, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x22)
|
||||
|
||||
@@ -1150,7 +1150,7 @@ u8 func1008_escapepod[] = {
|
||||
|
||||
label(0x31)
|
||||
assign_sound(SFX_8115, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_ESCAPEPOD, 1, 800, 1600)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_ESCAPEPOD, 1, 800, 1600)
|
||||
show_hudmsg(CHR_P1P2, L_AZT_014) // "Distress beacon has been activated."
|
||||
set_stage_flag(STAGEFLAG_BEACON_ACTIVATED)
|
||||
endloop(0x06)
|
||||
@@ -1368,15 +1368,15 @@ u8 func0418_robot[] = {
|
||||
if_rand_lt(86, /*goto*/ 0x0b)
|
||||
if_rand_lt(172, /*goto*/ 0x0c)
|
||||
assign_sound(SFX_046A, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
goto_next(0x31)
|
||||
label(0x0b)
|
||||
assign_sound(SFX_046B, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
goto_next(0x31)
|
||||
label(0x0c)
|
||||
assign_sound(SFX_046C, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
label(0x31)
|
||||
endloop(0x04)
|
||||
|
||||
@@ -1432,7 +1432,7 @@ u8 func0418_robot[] = {
|
||||
|
||||
label(0x11)
|
||||
assign_sound(MP3_ROBOT_ALERT_UNDER_ATTACK, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
@@ -1596,7 +1596,7 @@ u8 func041d_president_running[] = {
|
||||
|
||||
label(0x08)
|
||||
assign_sound(MP3_02BF, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
set_shotlist(GAILIST_IDLE)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
@@ -1610,7 +1610,7 @@ u8 func041d_president_running[] = {
|
||||
label(0x08)
|
||||
restart_timer
|
||||
assign_sound(MP3_02C2, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
|
||||
beginloop(0x9e)
|
||||
dprint 'I','N','J','U','R','E','D','\n',0,
|
||||
|
||||
+11
-11
@@ -1741,7 +1741,7 @@ u8 func1007_console_activation[] = {
|
||||
show_hudmsg(CHR_P1P2, L_CAVE_035) // "System shutdown initiated..."
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_01B9, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_CONSOLE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_CONSOLE, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x04)
|
||||
@@ -1756,7 +1756,7 @@ u8 func1007_console_activation[] = {
|
||||
set_object_image(OBJ_CONSOLE, 0, TVPROGRAM_SOLID_BLACK)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_0479, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_CONSOLE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_CONSOLE, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_CAVE_036) // "Security systems have been shut down."
|
||||
set_stage_flag(STAGEFLAG_SECURITY_SHUT_DOWN)
|
||||
unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_DISGUISED)
|
||||
@@ -2358,7 +2358,7 @@ u8 func100d_laser_panel[] = {
|
||||
|
||||
label(0x04)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_LASER_PANEL, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_LASER_PANEL, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_CAVE_045) // "Laser grid access denied."
|
||||
endloop(0x00)
|
||||
|
||||
@@ -2956,16 +2956,16 @@ u8 func0404_laser_guard[] = {
|
||||
u8 func1016_console_noises[] = {
|
||||
yield
|
||||
assign_sound(SFX_8141, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, 0x04, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, 0x04, 1, 600, 800)
|
||||
yield
|
||||
assign_sound(SFX_8143, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, 0x05, 1, 500, 1000)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, 0x05, 1, 500, 1000)
|
||||
yield
|
||||
play_repeating_sound_from_pad(PAD_CAVE_0114, SFX_81A7)
|
||||
bind_channel_to_pad_repeating(PAD_CAVE_0114, SFX_81A7)
|
||||
yield
|
||||
play_repeating_sound_from_pad(PAD_CAVE_0115, SFX_81A7)
|
||||
bind_channel_to_pad_repeating(PAD_CAVE_0115, SFX_81A7)
|
||||
yield
|
||||
play_repeating_sound_from_pad(PAD_CAVE_01AC, SFX_811B)
|
||||
bind_channel_to_pad_repeating(PAD_CAVE_01AC, SFX_811B)
|
||||
|
||||
label(0x42)
|
||||
restart_timer
|
||||
@@ -3004,7 +3004,7 @@ u8 func1016_console_noises[] = {
|
||||
yield
|
||||
yield
|
||||
assign_sound(SFX_8112, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
goto_first(0x42)
|
||||
|
||||
// Rand 2
|
||||
@@ -3020,7 +3020,7 @@ u8 func1016_console_noises[] = {
|
||||
yield
|
||||
yield
|
||||
assign_sound(SFX_813F, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
goto_first(0x42)
|
||||
|
||||
// Rand 3
|
||||
@@ -3036,7 +3036,7 @@ u8 func1016_console_noises[] = {
|
||||
yield
|
||||
yield
|
||||
assign_sound(SFX_8140, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_CONSOLE, 1, 600, 800)
|
||||
goto_first(0x42)
|
||||
|
||||
label(0x09)
|
||||
|
||||
+16
-16
@@ -888,7 +888,7 @@ u8 func0c01_outro[] = {
|
||||
|
||||
wait_until(160, 0x3d)
|
||||
play_sound(SFX_0172, CHANNEL_CUTSCENE)
|
||||
play_sound_from_object2(0x0a, OBJ_OUTRO_SUBMARINE, SFX_042D, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_CUTSCENE, OBJ_OUTRO_SUBMARINE, SFX_042D, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(180, 0x3b)
|
||||
speak(CHR_BOND, L_DAM_039, MP3_0465, CHANNEL_CUTSCENE, COLOR_06_WHITE) // "Right. The diving operation has been disrupted on ..."
|
||||
@@ -984,13 +984,13 @@ u8 func0c01_outro[] = {
|
||||
play_sound(SFX_80A3, CHANNEL_CUTSCENE)
|
||||
|
||||
wait_until(1480, 0x63)
|
||||
play_sound_from_object2(0x0a, OBJ_OUTRO_GRATE, SFX_00C1, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_CUTSCENE, OBJ_OUTRO_GRATE, SFX_00C1, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(1500, 0x67)
|
||||
play_sound_from_object2(0x0a, OBJ_OUTRO_SUBMARINE, SFX_042D, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_CUTSCENE, OBJ_OUTRO_SUBMARINE, SFX_042D, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(1590, 0x68)
|
||||
play_sound_from_object2(0x0a, OBJ_OUTRO_SUBMARINE, SFX_0434, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_CUTSCENE, OBJ_OUTRO_SUBMARINE, SFX_0434, PSTYPE_NONE, 0)
|
||||
|
||||
beginloop(0x0b)
|
||||
if_camera_animating(/*goto*/ 0x07)
|
||||
@@ -1125,7 +1125,7 @@ u8 func100a_reactor_switch[] = {
|
||||
mute_channel(CHANNEL_0)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_8147, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_REACTOR_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_REACTOR_SWITCH, TRUE)
|
||||
set_lights_state(0x007f, LIGHTOP_TRANSITION, 255, 6, 120)
|
||||
set_object_image(OBJ_REACTOR_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
set_object_image(OBJ_REACTOR_SWITCH, 1, TVPROGRAM_SOLID_RED)
|
||||
@@ -1997,7 +1997,7 @@ u8 func0401_pilot[] = {
|
||||
endloop(0x0e)
|
||||
|
||||
label(0x08)
|
||||
speak(CHR_SELF, -1, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN)
|
||||
speak(CHR_SELF, -1, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN)
|
||||
|
||||
beginloop(0x10)
|
||||
if_chr_stopped(/*goto*/ 0x07)
|
||||
@@ -2326,7 +2326,7 @@ u8 func1015_shuffle_hatchswitches[] = {
|
||||
\
|
||||
label(0x07) \
|
||||
assign_sound(SFX_043A, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, switch, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, switch, TRUE) \
|
||||
set_object_image(switch, 0, TVPROGRAM_SOLID_BLACK) \
|
||||
set_stage_flag(flag) \
|
||||
\
|
||||
@@ -2381,40 +2381,40 @@ u8 func101a_badhatchswitches[] = {
|
||||
// 1
|
||||
label(0x0b)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_BADHATCHSWITCH1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_BADHATCHSWITCH1, TRUE)
|
||||
yield
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_BADHATCHSWITCH1, FALSE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_BADHATCHSWITCH1, FALSE)
|
||||
set_object_image(OBJ_BADHATCHSWITCH1, 0, TVPROGRAM_PULSE_RED)
|
||||
goto_next(0x04)
|
||||
|
||||
// 2
|
||||
label(0x0c)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_BADHATCHSWITCH2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_BADHATCHSWITCH2, TRUE)
|
||||
yield
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_BADHATCHSWITCH2, FALSE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_BADHATCHSWITCH2, FALSE)
|
||||
set_object_image(OBJ_BADHATCHSWITCH2, 0, TVPROGRAM_PULSE_RED)
|
||||
goto_next(0x04)
|
||||
|
||||
// 3
|
||||
label(0x0d)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_BADHATCHSWITCH3, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_BADHATCHSWITCH3, TRUE)
|
||||
yield
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_BADHATCHSWITCH3, FALSE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_BADHATCHSWITCH3, FALSE)
|
||||
set_object_image(OBJ_BADHATCHSWITCH3, 0, TVPROGRAM_PULSE_RED)
|
||||
goto_next(0x04)
|
||||
|
||||
// 4
|
||||
label(0x0e)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_BADHATCHSWITCH4, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_BADHATCHSWITCH4, TRUE)
|
||||
yield
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_BADHATCHSWITCH4, FALSE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_BADHATCHSWITCH4, FALSE)
|
||||
set_object_image(OBJ_BADHATCHSWITCH4, 0, TVPROGRAM_PULSE_RED)
|
||||
goto_next(0x04)
|
||||
|
||||
@@ -2442,7 +2442,7 @@ u8 func101a_badhatchswitches[] = {
|
||||
u8 func101b_reactor_hum[] = {
|
||||
yield
|
||||
assign_sound(SFX_8146, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_REACTOR_SWITCH, 1, 2000, 3000)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_REACTOR_SWITCH, 1, 2000, 3000)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
|
||||
+29
-29
@@ -592,7 +592,7 @@ u8 func1008_check_generator[] = {
|
||||
mute_channel(CHANNEL_4)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_8147, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_GENERATOR, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_GENERATOR, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_DEPO_025) // "Damping field generator shut down."
|
||||
set_stage_flag(STAGEFLAG_GENERATOR_SHUT_DOWN2)
|
||||
set_stage_flag(STAGEFLAG_GENERATOR_SHUT_DOWN)
|
||||
@@ -607,7 +607,7 @@ u8 func1008_check_generator[] = {
|
||||
|
||||
u8 func1003_laser_switch_1[] = {
|
||||
assign_sound(SFX_8119, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_LASER_1A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_LASER_1A, 1, 300, 400)
|
||||
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
@@ -638,10 +638,10 @@ u8 func1003_laser_switch_1[] = {
|
||||
set_object_flag(OBJ_LASER_1C, OBJFLAG_DOOR_KEEPOPEN)
|
||||
set_object_flag(OBJ_LASER_1D, OBJFLAG_DOOR_KEEPOPEN)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH1, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH1, 0x012c, 0x0190, 0x00)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_PICKUP_SHIELD, CHANNEL_0)
|
||||
play_sound_from_entity(CHANNEL_0, OBJ_LASER_1A, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_0, OBJ_LASER_1A, 0x012c, 0x0190, 0x00)
|
||||
goto_next(0x0a)
|
||||
|
||||
// Activated
|
||||
@@ -654,9 +654,9 @@ u8 func1003_laser_switch_1[] = {
|
||||
close_door(OBJ_LASER_1C)
|
||||
close_door(OBJ_LASER_1D)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH1, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH1, 0x012c, 0x0190, 0x00)
|
||||
assign_sound(SFX_8119, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_LASER_1A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_LASER_1A, 1, 300, 400)
|
||||
goto_next(0x0a)
|
||||
label(0x0a)
|
||||
restart_timer
|
||||
@@ -673,7 +673,7 @@ u8 func1003_laser_switch_1[] = {
|
||||
|
||||
u8 func1004_laser_switch_2[] = {
|
||||
assign_sound(SFX_8119, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_LASER_2A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_LASER_2A, 1, 300, 400)
|
||||
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
@@ -705,10 +705,10 @@ u8 func1004_laser_switch_2[] = {
|
||||
set_object_flag(OBJ_LASER_2C, OBJFLAG_DOOR_KEEPOPEN)
|
||||
set_object_flag(OBJ_LASER_2D, OBJFLAG_DOOR_KEEPOPEN)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH2, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH2, 0x012c, 0x0190, 0x00)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_PICKUP_SHIELD, CHANNEL_1)
|
||||
play_sound_from_entity(CHANNEL_1, OBJ_LASER_2A, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_1, OBJ_LASER_2A, 0x012c, 0x0190, 0x00)
|
||||
goto_next(0x0a)
|
||||
|
||||
// Activated
|
||||
@@ -721,9 +721,9 @@ u8 func1004_laser_switch_2[] = {
|
||||
close_door(OBJ_LASER_2C)
|
||||
close_door(OBJ_LASER_2D)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH2, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH2, 0x012c, 0x0190, 0x00)
|
||||
assign_sound(SFX_8119, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_LASER_2A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_LASER_2A, 1, 300, 400)
|
||||
goto_next(0x0a)
|
||||
label(0x0a)
|
||||
restart_timer
|
||||
@@ -740,7 +740,7 @@ u8 func1004_laser_switch_2[] = {
|
||||
|
||||
u8 func1005_laser_switch_3[] = {
|
||||
assign_sound(SFX_8119, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, OBJ_LASER_3A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, OBJ_LASER_3A, 1, 300, 400)
|
||||
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
@@ -771,10 +771,10 @@ u8 func1005_laser_switch_3[] = {
|
||||
set_object_flag(OBJ_LASER_3C, OBJFLAG_DOOR_KEEPOPEN)
|
||||
set_object_flag(OBJ_LASER_3D, OBJFLAG_DOOR_KEEPOPEN)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH3, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH3, 0x012c, 0x0190, 0x00)
|
||||
mute_channel(CHANNEL_2)
|
||||
assign_sound(SFX_PICKUP_SHIELD, CHANNEL_2)
|
||||
play_sound_from_entity(CHANNEL_2, OBJ_LASER_3A, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_2, OBJ_LASER_3A, 0x012c, 0x0190, 0x00)
|
||||
goto_next(0x0a)
|
||||
|
||||
// Activated
|
||||
@@ -787,9 +787,9 @@ u8 func1005_laser_switch_3[] = {
|
||||
close_door(OBJ_LASER_3C)
|
||||
close_door(OBJ_LASER_3D)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH3, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH3, 0x012c, 0x0190, 0x00)
|
||||
assign_sound(SFX_8119, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, OBJ_LASER_3A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, OBJ_LASER_3A, 1, 300, 400)
|
||||
goto_next(0x0a)
|
||||
label(0x0a)
|
||||
restart_timer
|
||||
@@ -806,7 +806,7 @@ u8 func1005_laser_switch_3[] = {
|
||||
|
||||
u8 func1006_laser_switch_4[] = {
|
||||
assign_sound(SFX_811A, CHANNEL_3)
|
||||
play_repeating_sound_from_object(CHANNEL_3, OBJ_LASER_4A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_3, OBJ_LASER_4A, 1, 300, 400)
|
||||
|
||||
beginloop(0x04)
|
||||
chr_toggle_p1p2(CHR_SELF)
|
||||
@@ -837,10 +837,10 @@ u8 func1006_laser_switch_4[] = {
|
||||
set_object_flag(OBJ_LASER_4C, OBJFLAG_DOOR_KEEPOPEN)
|
||||
set_object_flag(OBJ_LASER_4D, OBJFLAG_DOOR_KEEPOPEN)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH4, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH4, 0x012c, 0x0190, 0x00)
|
||||
mute_channel(CHANNEL_3)
|
||||
assign_sound(SFX_PICKUP_SHIELD, CHANNEL_3)
|
||||
play_sound_from_entity(CHANNEL_3, OBJ_LASER_4A, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_3, OBJ_LASER_4A, 0x012c, 0x0190, 0x00)
|
||||
goto_next(0x0a)
|
||||
|
||||
// Activated
|
||||
@@ -853,9 +853,9 @@ u8 func1006_laser_switch_4[] = {
|
||||
close_door(OBJ_LASER_4C)
|
||||
close_door(OBJ_LASER_4D)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LASERSWITCH4, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LASERSWITCH4, 0x012c, 0x0190, 0x00)
|
||||
assign_sound(SFX_811A, CHANNEL_3)
|
||||
play_repeating_sound_from_object(CHANNEL_3, OBJ_LASER_4A, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_3, OBJ_LASER_4A, 1, 300, 400)
|
||||
goto_next(0x0a)
|
||||
label(0x0a)
|
||||
restart_timer
|
||||
@@ -1367,7 +1367,7 @@ u8 func1010_safe_cracking[] = {
|
||||
move_object_to_pad(OBJ_DECODER, PAD_DEPO_0075)
|
||||
set_stage_flag(STAGEFLAG_DECODER_ATTACHED)
|
||||
assign_sound(SFX_8144, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_SAFEKEYPAD, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_SAFEKEYPAD, 1, 300, 400)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x09)
|
||||
@@ -1406,7 +1406,7 @@ u8 func1010_safe_cracking[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_8145, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_SAFEKEYPAD, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_SAFEKEYPAD, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_DEPO_037) // "Door Decoder finished - door unlocked."
|
||||
unlock_door(OBJ_SAFEDOOR, 0x40)
|
||||
unset_object_flag2(OBJ_SAFEDOOR, OBJFLAG2_AICANNOTUSE)
|
||||
@@ -1906,14 +1906,14 @@ u8 func040e_meeting_cutscene[] = {
|
||||
speak(CHR_BOND, L_DEPO_074, MP3_040E, CHANNEL_5, COLOR_04_ORANGE) // "No one could have predicted that! And I resent bei..."
|
||||
|
||||
wait_until(1780, 0x5e)
|
||||
play_sound_from_object2(CHANNEL_6, 0x3a, SFX_01D5, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_6, 0x3a, SFX_01D5, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(2050, 0x60)
|
||||
play_sound_from_object2(CHANNEL_7, 0x3a, SFX_00EC, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_7, 0x3a, SFX_00EC, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(2070, 0x5f)
|
||||
open_door(0x3a)
|
||||
play_sound_from_object2(0x0a, 0x3a, SFX_DOOR_81B0, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_CUTSCENE, 0x3a, SFX_DOOR_81B0, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(2195, 0x61)
|
||||
play_sound(SFX_0171, CHANNEL_6)
|
||||
@@ -2239,7 +2239,7 @@ u8 func1018_intro_from_menu[] = {
|
||||
u8 func1019_generator_hum[] = {
|
||||
yield
|
||||
assign_sound(SFX_8146, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, OBJ_GENERATOR, 1, 1600, 2200)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, OBJ_GENERATOR, 1, 1600, 2200)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
@@ -2740,7 +2740,7 @@ u8 func1022_light_switch[] = {
|
||||
// Turning lights off
|
||||
set_stage_flag(STAGEFLAG_LIGHTS_OFF)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LIGHTSWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LIGHTSWITCH, 0x012c, 0x0190, 0x00)
|
||||
yield
|
||||
set_object_image(OBJ_LIGHTSWITCH, 0, TVPROGRAM_SOLID_BLACK)
|
||||
play_sound(SFX_8147, -1)
|
||||
@@ -2802,7 +2802,7 @@ u8 func1022_light_switch[] = {
|
||||
label(0x2c)
|
||||
unset_stage_flag(STAGEFLAG_LIGHTS_OFF)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LIGHTSWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LIGHTSWITCH, 0x012c, 0x0190, 0x00)
|
||||
yield
|
||||
play_sound(SFX_8148, -1)
|
||||
set_object_image(0x3d, 0, TVPROGRAM_BARS_YELLOW)
|
||||
|
||||
+17
-17
@@ -637,7 +637,7 @@ u8 func041e_colleague[] = {
|
||||
label(0x7f)
|
||||
chr_do_animation(ANIM_SITTING_0265, 0, -1, CHRANIMFLAG_PAUSEATEND | CHRANIMFLAG_SLOWUPDATE, 0, CHR_SELF, 2)
|
||||
label(0x2f)
|
||||
play_cistaff_quip(CIQUIP_GREETING, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_GREETING, CHANNEL_6)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x57)
|
||||
@@ -668,7 +668,7 @@ u8 func041e_colleague[] = {
|
||||
label(0x06)
|
||||
do_preset_animation(PRESETANIM_TALKRANDOM)
|
||||
label(0x06)
|
||||
play_cistaff_quip(CIQUIP_MAIN, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_MAIN, CHANNEL_6)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x5b)
|
||||
@@ -711,7 +711,7 @@ u8 func041e_colleague[] = {
|
||||
label(0x7f)
|
||||
chr_do_animation(ANIM_SITTING_0265, 0, -1, CHRANIMFLAG_PAUSEATEND | CHRANIMFLAG_SLOWUPDATE, 0, CHR_SELF, 2)
|
||||
label(0x06)
|
||||
play_cistaff_quip(CIQUIP_ANNOYED, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_ANNOYED, CHANNEL_6)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x5c)
|
||||
@@ -1180,7 +1180,7 @@ u8 func1004_devicetraining_doordecoder[] = {
|
||||
show_hudmsg(CHR_BOND, L_DISH_027) // "Decoder attached. Initiating cracking routines..."
|
||||
unset_object_flag2(0x88, OBJFLAG2_INVISIBLE)
|
||||
assign_sound(SFX_8144, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, 0x35, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, 0x35, 1, 300, 400)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0c)
|
||||
@@ -1199,7 +1199,7 @@ u8 func1004_devicetraining_doordecoder[] = {
|
||||
label(0x2f)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_8145, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, 0x35, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, 0x35, TRUE)
|
||||
remove_hudmsgs
|
||||
show_hudmsg(CHR_BOND, L_DISH_028) // "Decoding complete. Door has been unlocked."
|
||||
unlock_door(0x41, 0x40)
|
||||
@@ -2289,7 +2289,7 @@ u8 func100b_devicetraining_uplink[] = {
|
||||
set_stage_flag(STAGEFLAG_TRIGGER_CANNOTEXIT_MSG)
|
||||
label(0x59)
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x30, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x30, TRUE)
|
||||
label(0x14)
|
||||
yield
|
||||
if_stage_flag_eq(STAGEFLAG_DEVICE_ABORTING, TRUE, /*goto*/ 0x90)
|
||||
@@ -2313,7 +2313,7 @@ u8 func100b_devicetraining_uplink[] = {
|
||||
restart_timer
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C1, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x30, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x30, TRUE)
|
||||
remove_hudmsgs
|
||||
show_hudmsg(CHR_TARGET, L_DISH_014) // "Terminal has been successfully hacked."
|
||||
|
||||
@@ -2338,7 +2338,7 @@ u8 func100b_devicetraining_uplink[] = {
|
||||
show_hudmsg(CHR_BOND, L_DISH_015) // "Connection broken - too far from PC."
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x30, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x30, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x16)
|
||||
@@ -2531,7 +2531,7 @@ u8 func0429_grimshaw_disguise[] = {
|
||||
label(0x06)
|
||||
dprint 'I','n','i','t','i','a','l','i','s','e','c',0,
|
||||
do_preset_animation(PRESETANIM_TALK3)
|
||||
play_cistaff_quip(CIQUIP_GREETING, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_GREETING, CHANNEL_6)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x57)
|
||||
@@ -3320,7 +3320,7 @@ u8 func042d_unused[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_GRIMSHAW_HI_THERE, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
|
||||
beginloop(0x61)
|
||||
if_sound_finished(CHANNEL_6, /*goto*/ 0x06)
|
||||
@@ -3352,7 +3352,7 @@ u8 func042e_devicegirl_reply_to_carrington[] = {
|
||||
yield
|
||||
yield
|
||||
assign_sound(MP3_CIFEM_PATIENCE, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
|
||||
beginloop(0x61)
|
||||
if_sound_finished(CHANNEL_6, /*goto*/ 0x06)
|
||||
@@ -3737,7 +3737,7 @@ u8 func101c_holo1_main[] = {
|
||||
set_object_image(object, 0, TVPROGRAM_SOLID_GREEN) \
|
||||
set_object_flag2(object, OBJFLAG2_INVHIDDEN) \
|
||||
assign_sound(SFX_043A, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, object, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, object, TRUE) \
|
||||
set_returnlist(CHR_SELF, function) \
|
||||
set_ailist(CHR_SELF, AILIST_HOLO1_CHECK_DONE)
|
||||
|
||||
@@ -3777,7 +3777,7 @@ u8 func1020_holo1_monitor_switches[] = {
|
||||
set_object_image(0x4f, 0, TVPROGRAM_SOLID_GREEN)
|
||||
set_object_flag2(0x4f, OBJFLAG2_INVHIDDEN)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x4f, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x4f, TRUE)
|
||||
set_returnlist(CHR_SELF, AILIST_HOLO1_MONITOR_SWITCHES)
|
||||
set_ailist(CHR_SELF, AILIST_HOLO1_CHECK_DONE)
|
||||
endlist
|
||||
@@ -3816,7 +3816,7 @@ u8 func1020_holo1_monitor_switches[] = {
|
||||
remove_hudmsgs \
|
||||
show_hudmsg(CHR_BOND, msg) \
|
||||
assign_sound(SFX_DOOR_81B0, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, object1, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, object1, TRUE) \
|
||||
restart_timer \
|
||||
\
|
||||
beginloop(0x57) \
|
||||
@@ -4078,7 +4078,7 @@ u8 func1022_holo2_main[] = {
|
||||
\
|
||||
label(0x2f) \
|
||||
assign_sound(SFX_043A, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, object, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, object, TRUE) \
|
||||
set_object_image(object, 0, TVPROGRAM_SOLID_GREEN) \
|
||||
set_object_flag2(object, OBJFLAG2_IMMUNETOANTI) \
|
||||
set_returnlist(CHR_SELF, function) \
|
||||
@@ -4452,7 +4452,7 @@ u8 func102c_holo3_object1[] = {
|
||||
|
||||
label(0x2f)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x65, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x65, TRUE)
|
||||
set_object_image(0x65, 0, TVPROGRAM_SOLID_GREEN)
|
||||
set_object_flag2(0x65, OBJFLAG2_IMMUNETOANTI)
|
||||
set_returnlist(CHR_SELF, AILIST_HOLO3_OBJECT1)
|
||||
@@ -4467,7 +4467,7 @@ u8 func102d_holo3_object2[] = {
|
||||
|
||||
label(0x2f)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x65, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x65, TRUE)
|
||||
set_object_image(0x66, 0, TVPROGRAM_SOLID_GREEN)
|
||||
set_object_flag2(0x66, OBJFLAG2_IMMUNETOANTI)
|
||||
set_returnlist(CHR_SELF, AILIST_HOLO3_OBJECT2)
|
||||
|
||||
+34
-34
@@ -1110,7 +1110,7 @@ u8 func0404_scientist[] = {
|
||||
set_stage_flag(STAGEFLAG_SHUT_DOWN_EXPERIMENT3)
|
||||
say_quip(CHR_TARGET, 0x0d, 0xff, 0x00, 0xff, 0x81, 0x06, 0x08)
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM3, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM3, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x06)
|
||||
@@ -1127,7 +1127,7 @@ u8 func0404_scientist[] = {
|
||||
set_stage_flag(STAGEFLAG_SHUT_DOWN_EXPERIMENT1)
|
||||
say_quip(CHR_TARGET, 0x0d, 0xff, 0x00, 0xff, 0x81, 0x06, 0x08)
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM1, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x2f)
|
||||
@@ -1144,12 +1144,12 @@ u8 func0404_scientist[] = {
|
||||
set_stage_flag(STAGEFLAG_SHUT_DOWN_EXPERIMENT2)
|
||||
say_quip(CHR_TARGET, 0x0d, 0xff, 0x00, 0xff, 0x81, 0x06, 0x08)
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM2, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x0f)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_028) // "Powering down active systems."
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
|
||||
|
||||
beginloop(0x0d)
|
||||
@@ -1268,7 +1268,7 @@ u8 func0406_nasty_scientist[] = {
|
||||
label(0x30)
|
||||
set_stage_flag(STAGEFLAG_ALARM3_ACTIVE)
|
||||
assign_sound(SFX_TYPING_8118, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_GOODTERM3, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_GOODTERM3, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x06)
|
||||
@@ -1278,7 +1278,7 @@ u8 func0406_nasty_scientist[] = {
|
||||
label(0x30)
|
||||
set_stage_flag(STAGEFLAG_ALARM1_ACTIVE)
|
||||
assign_sound(SFX_TYPING_8118, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_GOODTERM1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_GOODTERM1, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x2f)
|
||||
@@ -1288,7 +1288,7 @@ u8 func0406_nasty_scientist[] = {
|
||||
label(0x30)
|
||||
set_stage_flag(STAGEFLAG_ALARM2_ACTIVE)
|
||||
assign_sound(SFX_TYPING_8118, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_GOODTERM2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_GOODTERM2, TRUE)
|
||||
goto_next(0x0f)
|
||||
|
||||
label(0x11)
|
||||
@@ -1296,7 +1296,7 @@ u8 func0406_nasty_scientist[] = {
|
||||
goto_next(0x78)
|
||||
|
||||
label(0x0f)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
say_quip(CHR_TARGET, 0x0e, 0xff, 0x00, 0xff, 0x81, 0x07, 0x08)
|
||||
chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
|
||||
|
||||
@@ -1328,7 +1328,7 @@ u8 func1009_weaponscache[] = {
|
||||
show_hudmsg(CHR_TARGET, L_EAR_098) // "Secret weapons compartment opened."
|
||||
play_sound(SFX_00F7, -1)
|
||||
assign_sound(SFX_043B, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_CMP150_1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_CMP150_1, TRUE)
|
||||
disable_object(OBJ_CACHEDOOR1)
|
||||
disable_object(OBJ_CACHEDOOR2)
|
||||
unset_object_flag(OBJ_CMP150_1, OBJFLAG_UNCOLLECTABLE)
|
||||
@@ -1379,7 +1379,7 @@ u8 func1002_bot_activation_terminal[] = {
|
||||
// Activating prior to reprogramming
|
||||
play_sound(SFX_01CA, -1)
|
||||
assign_sound(SFX_01C5, CHANNEL_3)
|
||||
play_repeating_sound_from_object(CHANNEL_3, OBJ_PURPLEBOT, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_3, OBJ_PURPLEBOT, 1, 600, 800)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_015) // "Maintenance robots activated."
|
||||
set_stage_flag(STAGEFLAG_BOT_ACTIVE)
|
||||
set_stage_flag(STAGEFLAG_BOT_ACTIVE_NOPROGRAM)
|
||||
@@ -1650,7 +1650,7 @@ u8 func1006_terminal_activation[] = {
|
||||
|
||||
// Inactive terminal
|
||||
label(0x2f)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_027) // "Terminal is not active."
|
||||
restart_timer
|
||||
|
||||
@@ -1663,7 +1663,7 @@ u8 func1006_terminal_activation[] = {
|
||||
|
||||
// Good terminal 0x07
|
||||
label(0x08)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
if_stage_flag_eq(STAGEFLAG_SHUT_DOWN_EXPERIMENT1, FALSE, /*goto*/ 0x2f)
|
||||
restart_timer
|
||||
|
||||
@@ -1678,7 +1678,7 @@ u8 func1006_terminal_activation[] = {
|
||||
label(0x2f)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_028) // "Powering down active systems."
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM1, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0a)
|
||||
@@ -1692,7 +1692,7 @@ u8 func1006_terminal_activation[] = {
|
||||
|
||||
// Good terminal 0x08
|
||||
label(0x0d)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
if_stage_flag_eq(STAGEFLAG_SHUT_DOWN_EXPERIMENT2, FALSE, /*goto*/ 0x2f)
|
||||
restart_timer
|
||||
|
||||
@@ -1707,7 +1707,7 @@ u8 func1006_terminal_activation[] = {
|
||||
label(0x2f)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_028) // "Powering down active systems."
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM2, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0e)
|
||||
@@ -1721,7 +1721,7 @@ u8 func1006_terminal_activation[] = {
|
||||
|
||||
// Good terminal 0x09
|
||||
label(0x0f)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
if_stage_flag_eq(STAGEFLAG_SHUT_DOWN_EXPERIMENT3, FALSE, /*goto*/ 0x2f)
|
||||
restart_timer
|
||||
|
||||
@@ -1736,7 +1736,7 @@ u8 func1006_terminal_activation[] = {
|
||||
label(0x2f)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_028) // "Powering down active systems."
|
||||
assign_sound(SFX_01C3, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_GOODTERM3, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_GOODTERM3, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x10)
|
||||
@@ -1751,7 +1751,7 @@ u8 func1006_terminal_activation[] = {
|
||||
// Alarm terminal 0x0f
|
||||
label(0x09)
|
||||
if_alarm_active(/*goto*/ 0x06)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_030) // "Alarm activated."
|
||||
set_stage_flag(STAGEFLAG_ALARM1_ACTIVE)
|
||||
activate_alarm
|
||||
@@ -1766,7 +1766,7 @@ u8 func1006_terminal_activation[] = {
|
||||
// Alarm terminal 0x14
|
||||
label(0x0b)
|
||||
if_alarm_active(/*goto*/ 0x06)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_030) // "Alarm activated."
|
||||
set_stage_flag(STAGEFLAG_ALARM2_ACTIVE)
|
||||
activate_alarm
|
||||
@@ -1781,7 +1781,7 @@ u8 func1006_terminal_activation[] = {
|
||||
// Alarm terminal 0x19
|
||||
label(0x0c)
|
||||
if_alarm_active(/*goto*/ 0x06)
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_TYPING_8118, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_030) // "Alarm activated."
|
||||
set_stage_flag(STAGEFLAG_ALARM3_ACTIVE)
|
||||
activate_alarm
|
||||
@@ -1814,7 +1814,7 @@ u8 func1007_uplink[] = {
|
||||
if_stage_flag_eq(STAGEFLAG_UPLINK_FINISHED, FALSE, /*goto*/ 0x06)
|
||||
|
||||
// Activating a second time
|
||||
speak(CHR_TARGET, 0xffff, SFX_8116, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_8116, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_041) // "Security door already unlocked."
|
||||
reloop(0x04)
|
||||
|
||||
@@ -1822,7 +1822,7 @@ u8 func1007_uplink[] = {
|
||||
if_chr_weapon_equipped(CHR_TARGET, WEAPON_DATAUPLINK, /*goto*/ 0x2f)
|
||||
|
||||
// Activated computer without uplink
|
||||
speak(CHR_TARGET, 0xffff, SFX_8116, CHANNEL_9, COLOR_00_GREEN) // unknown text
|
||||
speak(CHR_TARGET, 0xffff, SFX_8116, CHANNEL_DONTCARE, COLOR_00_GREEN) // unknown text
|
||||
show_hudmsg(CHR_TARGET, L_EAR_036) // "ACCESS DENIED - security code required."
|
||||
reloop(0x04)
|
||||
|
||||
@@ -1854,7 +1854,7 @@ u8 func1007_uplink[] = {
|
||||
restart_timer
|
||||
set_stage_flag(STAGEFLAG_UPLINK_SEARCHING)
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_UPLINKPC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_UPLINKPC, TRUE)
|
||||
|
||||
beginloop(0x14)
|
||||
if_object_in_good_condition(OBJ_UPLINKPC, /*goto*/ 0x30)
|
||||
@@ -1871,7 +1871,7 @@ u8 func1007_uplink[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C1, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
show_hudmsg(CHR_TARGET, L_EAR_039) // "Password located - bypassing lock."
|
||||
yield
|
||||
show_hudmsg(CHR_TARGET, L_EAR_017) // "Security doors unlocked."
|
||||
@@ -1884,7 +1884,7 @@ u8 func1007_uplink[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_043B, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x22, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x22, TRUE)
|
||||
reloop(0x04)
|
||||
|
||||
// Moved away from PC or switched weapon
|
||||
@@ -1893,7 +1893,7 @@ u8 func1007_uplink[] = {
|
||||
mute_channel(CHANNEL_5)
|
||||
mute_channel(CHANNEL_6)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x16)
|
||||
@@ -1916,7 +1916,7 @@ u8 func1007_uplink[] = {
|
||||
mute_channel(CHANNEL_5)
|
||||
mute_channel(CHANNEL_6)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_UPLINKPC, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x17)
|
||||
@@ -2727,17 +2727,17 @@ u8 func1012_start_laser_sound[] = {
|
||||
label(0x04)
|
||||
yield
|
||||
assign_sound(SFX_8119, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, 0x28, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, 0x28, 1, 300, 400)
|
||||
label(0x2f)
|
||||
assign_sound(SFX_811A, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, 0x2d, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, 0x2d, 1, 300, 400)
|
||||
label(0x2f)
|
||||
assign_sound(SFX_8119, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, 0x32, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, 0x32, 1, 300, 400)
|
||||
assign_sound(SFX_01C5, CHANNEL_3)
|
||||
play_repeating_sound_from_object(CHANNEL_3, 0x38, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_3, 0x38, 1, 600, 800)
|
||||
assign_sound(SFX_01C5, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, 0x37, 1, 600, 800)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, 0x37, 1, 600, 800)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
@@ -2901,7 +2901,7 @@ u8 func0402_k7_guard[] = {
|
||||
call_rng
|
||||
if_rand_gt(128, /*goto*/ 0x06)
|
||||
assign_sound(MP3_0299, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
|
||||
beginloop(0x0c)
|
||||
if_timer_gt(120, /*goto*/ 0x2f)
|
||||
@@ -3009,7 +3009,7 @@ u8 func0403_k7_scientist[] = {
|
||||
label(0x0c)
|
||||
assign_sound(MP3_028F, CHANNEL_6)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
#endif
|
||||
increase_squadron_alertness(100)
|
||||
jog_to_pad(PAD_EAR_0133)
|
||||
|
||||
+14
-14
@@ -1970,12 +1970,12 @@ u8 func1007_cooling_switch[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_COOLING_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_COOLING_SWITCH, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_COOLING_ACTIVE, TRUE, /*goto*/ 0x06)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_014) // "Cooling systems have been activated."
|
||||
set_stage_flag(STAGEFLAG_COOLING_ACTIVE)
|
||||
assign_sound(SFX_8148, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_COOLING_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_COOLING_SWITCH, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x08)
|
||||
@@ -1984,19 +1984,19 @@ u8 func1007_cooling_switch[] = {
|
||||
|
||||
label(0x2d)
|
||||
assign_sound(SFX_811C, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_COOLING_SWITCH, 1, 1200, 1600)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_COOLING_SWITCH, 1, 1200, 1600)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_COOLING_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_COOLING_SWITCH, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_WINDMILL_ACTIVATED, FALSE, /*goto*/ 0x2d)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_048) // "Operation denied - windmill is active."
|
||||
goto_next(0x67)
|
||||
label(0x2d)
|
||||
assign_sound(SFX_8149, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_COOLING_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_COOLING_SWITCH, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_015) // "Cooling systems have been deactivated."
|
||||
unset_stage_flag(STAGEFLAG_COOLING_ACTIVE)
|
||||
label(0x67)
|
||||
@@ -2020,12 +2020,12 @@ u8 func1008_power_switch[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_POWER_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_POWER_SWITCH, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_POWER_ACTIVE, TRUE, /*goto*/ 0x06)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_016) // "Power systems have been activated."
|
||||
set_stage_flag(STAGEFLAG_POWER_ACTIVE)
|
||||
assign_sound(SFX_8148, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_POWER_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_POWER_SWITCH, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x08)
|
||||
@@ -2034,19 +2034,19 @@ u8 func1008_power_switch[] = {
|
||||
|
||||
label(0x2d)
|
||||
assign_sound(SFX_8146, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_POWER_SWITCH, 1, 1200, 1600)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_POWER_SWITCH, 1, 1200, 1600)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_POWER_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_POWER_SWITCH, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_WINDMILL_ACTIVATED, FALSE, /*goto*/ 0x2d)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_048) // "Operation denied - windmill is active."
|
||||
goto_next(0x67)
|
||||
label(0x2d)
|
||||
assign_sound(SFX_8149, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_POWER_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_POWER_SWITCH, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_017) // "Power systems have been deactivated."
|
||||
unset_stage_flag(STAGEFLAG_POWER_ACTIVE)
|
||||
label(0x67)
|
||||
@@ -2074,9 +2074,9 @@ u8 func1009_windmill_switch[] = {
|
||||
|
||||
// Activating
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
assign_sound(SFX_8148, CHANNEL_2)
|
||||
set_object_sound_playing(CHANNEL_2, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_2, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x08)
|
||||
@@ -2085,7 +2085,7 @@ u8 func1009_windmill_switch[] = {
|
||||
|
||||
label(0x2d)
|
||||
assign_sound(SFX_0438, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, OBJ_WINDMILL_SWITCH, 1, 1800, 2400)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, OBJ_WINDMILL_SWITCH, 1, 1800, 2400)
|
||||
show_hudmsg(CHR_P1P2, L_ELD_018) // "Windmill has been reactivated."
|
||||
yield
|
||||
set_stage_flag(STAGEFLAG_WINDMILL_ACTIVATED)
|
||||
@@ -2097,7 +2097,7 @@ u8 func1009_windmill_switch[] = {
|
||||
// Cooling and power not active
|
||||
label(0x06)
|
||||
assign_sound(SFX_MENU_SUBFOCUS, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_WINDMILL_SWITCH, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x09)
|
||||
|
||||
+15
-15
@@ -1749,7 +1749,7 @@ u8 func041a_hostage_holo[] = {
|
||||
|
||||
label(0x2e)
|
||||
assign_sound(MP3_030E, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
restart_timer
|
||||
|
||||
// Wait until player in sight, or 2 seconds
|
||||
@@ -1763,7 +1763,7 @@ u8 func041a_hostage_holo[] = {
|
||||
|
||||
label(0x08)
|
||||
assign_sound(MP3_030F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
label(0x08)
|
||||
label(0x08)
|
||||
try_spawn_chr_at_pad(BODY_CIFEMTECH, HEAD_SECRETARY, PAD_IMP_0104, AILIST_INIT_HOLOCLONE1, SPAWNFLAG_ALLOWONSCREEN | SPAWNFLAG_NOBLOOD, /*goto*/ 0x2e)
|
||||
@@ -1824,7 +1824,7 @@ u8 func041c_init_holoclone1[] = {
|
||||
set_chr_team(CHR_SELF, TEAM_ALLY)
|
||||
rebuild_teams
|
||||
rebuild_squadrons
|
||||
play_sound(SFX_MENU_OPENDIALOG, CHANNEL_9)
|
||||
play_sound(SFX_MENU_OPENDIALOG, CHANNEL_DONTCARE)
|
||||
set_shotlist(AILIST_HOLOCLONE_ONSHOT)
|
||||
set_chr_maxdamage(CHR_SELF, 1)
|
||||
set_chr_id(CHR_HOLOCLONE1)
|
||||
@@ -1928,9 +1928,9 @@ u8 func0421_taker_holo2[] = {
|
||||
set_self_chrflag(CHRCFLAG_NEVERSLEEP)
|
||||
assign_sound(SFX_M0_WHAT_THE, CHANNEL_6)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
#else
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
#endif
|
||||
holo_taker_logic(CHR_HOLOCLONE2)
|
||||
endlist
|
||||
@@ -2007,7 +2007,7 @@ u8 func0425_hostage_thank_and_run[] = {
|
||||
goto_first(0x0b)
|
||||
|
||||
label(0x08)
|
||||
play_cistaff_quip(CIQUIP_THANKS, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_THANKS, CHANNEL_6)
|
||||
chr_do_animation(ANIM_TALKING_0231, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
|
||||
label(0x2f)
|
||||
restart_timer
|
||||
@@ -2097,7 +2097,7 @@ u8 func0427_drop_devastator[] = {
|
||||
give_object_to_chr(OBJ_DEVASTATOR, CHR_SELF)
|
||||
yield
|
||||
drop_concealed_items(CHR_SELF)
|
||||
play_cistaff_quip(CIQUIP_THANKS, CHANNEL_6)
|
||||
say_ciquip(CIQUIP_THANKS, CHANNEL_6)
|
||||
chr_do_animation(ANIM_TALKING_0231, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
|
||||
restart_timer
|
||||
|
||||
@@ -2276,9 +2276,9 @@ u8 func042e_taker_device_m[] = {
|
||||
increase_squadron_alertness(100)
|
||||
assign_sound(SFX_M0_WHAT_THE, CHANNEL_6)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
#else
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
#endif
|
||||
restart_timer
|
||||
chr_do_animation(ANIM_SURPRISED_0202, 0, -1, 0, 16, CHR_SELF, 2)
|
||||
@@ -2334,7 +2334,7 @@ u8 func0430_taker_device_f[] = {
|
||||
if_self_flag_bankx_eq(CHRFLAG1_CAN_RELOAD, FALSE, BANK_1, /*goto*/ 0x08)
|
||||
if_timer_lt(120, /*goto*/ 0x08)
|
||||
assign_sound(VERSION >= VERSION_NTSC_1_0 ? SFX_80F6 : SFX_01D9, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unset_self_flag_bankx(CHRFLAG1_CAN_RELOAD, BANK_1)
|
||||
label(0x08)
|
||||
if_chr_stopped(/*goto*/ 0x2e)
|
||||
@@ -3301,7 +3301,7 @@ u8 func1022_skedar_shuttle[] = {
|
||||
stop_countdown_timer
|
||||
object_do_animation(ANIM_045B, OBJ_SKEDAR_SHUTTLE, 0x08, 0xffff)
|
||||
assign_sound(SFX_810A, CHANNEL_3)
|
||||
play_repeating_sound_from_object(CHANNEL_3, OBJ_SKEDAR_SHUTTLE, 1, 1800, 3000)
|
||||
bind_channel_to_object_repeating(CHANNEL_3, OBJ_SKEDAR_SHUTTLE, 1, 1800, 3000)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0b)
|
||||
@@ -3311,7 +3311,7 @@ u8 func1022_skedar_shuttle[] = {
|
||||
|
||||
label(0x2e)
|
||||
assign_sound(SFX_810B, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, OBJ_SKEDAR_SHUTTLE, 1, 1800, 3000)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, OBJ_SKEDAR_SHUTTLE, 1, 1800, 3000)
|
||||
|
||||
beginloop(0x0d)
|
||||
dprint 'O','B','J','\n',0,
|
||||
@@ -3784,7 +3784,7 @@ u8 func1027_uplink[] = {
|
||||
show_hudmsg(CHR_TARGET, L_IMP_053) // "Bypassing security systems."
|
||||
restart_timer
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
|
||||
beginloop(0x13)
|
||||
if_object_in_good_condition(OBJ_SKEDAR_SHUTTLE, /*goto*/ 0x2f)
|
||||
@@ -3806,7 +3806,7 @@ u8 func1027_uplink[] = {
|
||||
label(0x08)
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C1, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
show_hudmsg(CHR_TARGET, L_IMP_054) // "Virus has been downloaded successfully."
|
||||
yield
|
||||
show_hudmsg(CHR_TARGET, L_IMP_055) // "Ship's engines have been activated."
|
||||
@@ -3825,7 +3825,7 @@ u8 func1027_uplink[] = {
|
||||
show_hudmsg(CHR_TARGET, L_IMP_056) // "Connection to ship has been broken."
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, OBJ_SKEDAR_SHUTTLE, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x15)
|
||||
|
||||
@@ -3686,7 +3686,7 @@ u8 func101f_enable_bridge_skedar[] = {
|
||||
u8 func1020_engine_hum_noise[] = {
|
||||
yield
|
||||
assign_sound(SFX_81A5, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, 0x1b, 1, 2000, 4000)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, 0x1b, 1, 2000, 4000)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
|
||||
+37
-37
@@ -1156,7 +1156,7 @@ u8 func1003_uplink_doors[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_049) // "Initiating virus download."
|
||||
restart_timer
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x02, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x02, TRUE)
|
||||
|
||||
beginloop(0x11)
|
||||
if_timer_gt(400, /*goto*/ 0x06)
|
||||
@@ -1174,7 +1174,7 @@ u8 func1003_uplink_doors[] = {
|
||||
|
||||
label(LABEL_2D)
|
||||
assign_sound(SFX_01C1, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x02, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x02, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_023) // "Virus downloaded to console."
|
||||
yield
|
||||
set_stage_flag(STAGEFLAG_DOOR_VIRUS_DOWNLOADED)
|
||||
@@ -1184,7 +1184,7 @@ u8 func1003_uplink_doors[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_031) // "Data Uplink connection broken."
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x02, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x02, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x13)
|
||||
@@ -1233,7 +1233,7 @@ u8 func1004_uplink_lights[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_049) // "Initiating virus download."
|
||||
restart_timer
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x01, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x01, TRUE)
|
||||
|
||||
beginloop(0x11)
|
||||
if_timer_gt(400, /*goto*/ 0x06)
|
||||
@@ -1251,7 +1251,7 @@ u8 func1004_uplink_lights[] = {
|
||||
|
||||
label(LABEL_2D)
|
||||
assign_sound(SFX_01C1, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x01, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x01, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_023) // "Virus downloaded to console."
|
||||
yield
|
||||
show_hudmsg(CHR_P1P2, L_LIP_088) // "Lighting systems overloaded."
|
||||
@@ -1275,7 +1275,7 @@ u8 func1004_uplink_lights[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_031) // "Data Uplink connection broken."
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x01, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x01, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x13)
|
||||
@@ -1324,7 +1324,7 @@ u8 func1005_uplink_autoguns[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_049) // "Initiating virus download."
|
||||
restart_timer
|
||||
assign_sound(SFX_01BF, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x03, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x03, TRUE)
|
||||
|
||||
beginloop(0x11)
|
||||
if_timer_gt(400, /*goto*/ 0x06)
|
||||
@@ -1341,7 +1341,7 @@ u8 func1005_uplink_autoguns[] = {
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
label(LABEL_2D)
|
||||
assign_sound(SFX_01C1, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, 0x00, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, 0x00, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_023) // "Virus downloaded to console."
|
||||
yield
|
||||
show_hudmsg(CHR_P1P2, L_LIP_105) // "Automatic Defenses Disabled."
|
||||
@@ -1352,7 +1352,7 @@ u8 func1005_uplink_autoguns[] = {
|
||||
show_hudmsg(CHR_P1P2, L_LIP_031) // "Data Uplink connection broken."
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_01C0, CHANNEL_6)
|
||||
set_object_sound_playing(CHANNEL_6, 0x03, TRUE)
|
||||
bind_channel_to_object(CHANNEL_6, 0x03, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x13)
|
||||
@@ -3196,12 +3196,12 @@ u8 func0420_labtech_doors[] = {
|
||||
set_stage_flag(STAGEFLAG_AUTOGUN_ACTIVATED)
|
||||
if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ LABEL_75)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x3c, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x3c, TRUE)
|
||||
goto_next(LABEL_2D)
|
||||
|
||||
label(LABEL_75)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, 0x3d, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x3d, TRUE)
|
||||
label(LABEL_2D)
|
||||
endloop(LABEL_71)
|
||||
|
||||
@@ -3425,9 +3425,9 @@ u8 func1018_disable_chambers[] = {
|
||||
\
|
||||
/* Raising chamber */ \
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0) \
|
||||
set_object_sound_playing(CHANNEL_0, chamber, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_0, chamber, TRUE) \
|
||||
assign_sound(SFX_043A, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, switch, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, switch, TRUE) \
|
||||
show_hudmsg(CHR_P1P2, 0x2a42) /* "Containment unit raised up." */ \
|
||||
set_object_image(switch, 0, TVPROGRAM_SOLID_GREEN) \
|
||||
unset_object_flag(chamber, OBJFLAG_DEACTIVATED) \
|
||||
@@ -3441,7 +3441,7 @@ u8 func1018_disable_chambers[] = {
|
||||
label(0x06) \
|
||||
mute_channel(CHANNEL_0) \
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0) \
|
||||
set_object_sound_playing(CHANNEL_0, chamber, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_0, chamber, TRUE) \
|
||||
set_object_flag(chamber, OBJFLAG_DEACTIVATED) \
|
||||
reloop(0x04) \
|
||||
\
|
||||
@@ -3449,9 +3449,9 @@ u8 func1018_disable_chambers[] = {
|
||||
label(LABEL_2D) \
|
||||
mute_channel(CHANNEL_0) \
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0) \
|
||||
set_object_sound_playing(CHANNEL_0, chamber, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_0, chamber, TRUE) \
|
||||
assign_sound(SFX_043A, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, switch, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, switch, TRUE) \
|
||||
show_hudmsg(CHR_P1P2, 0x2a43) /* "Containment unit lowered down." */ \
|
||||
set_object_image(switch, 0, TVPROGRAM_SOLID_RED) \
|
||||
unset_object_flag(chamber, OBJFLAG_DEACTIVATED) \
|
||||
@@ -3465,7 +3465,7 @@ u8 func1018_disable_chambers[] = {
|
||||
label(0x06) \
|
||||
mute_channel(CHANNEL_0) \
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0) \
|
||||
set_object_sound_playing(CHANNEL_0, chamber, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_0, chamber, TRUE) \
|
||||
set_object_flag(chamber, OBJFLAG_DEACTIVATED) \
|
||||
endloop(0x04)
|
||||
|
||||
@@ -3485,9 +3485,9 @@ u8 func1019_chamber1[] = {
|
||||
|
||||
// Raising chamber
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER1_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER1_SWITCH, TRUE)
|
||||
set_object_image(OBJ_CHAMBER1_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_066) // "Containment unit raised up."
|
||||
unset_object_flag(OBJ_CHAMBER1, OBJFLAG_DEACTIVATED)
|
||||
@@ -3501,7 +3501,7 @@ u8 func1019_chamber1[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
set_chr_hiddenflag(CHR_ALIEN, CHRHFLAG_WARPONSCREEN)
|
||||
|
||||
beginloop(LABEL_64)
|
||||
@@ -3520,10 +3520,10 @@ u8 func1019_chamber1[] = {
|
||||
label(LABEL_2D)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
set_chr_chrflag(CHR_ALIEN, CHRCFLAG_HIDDEN)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER1_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER1_SWITCH, TRUE)
|
||||
set_object_image(OBJ_CHAMBER1_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_067) // "Containment unit lowered down."
|
||||
unset_object_flag(OBJ_CHAMBER1, OBJFLAG_DEACTIVATED)
|
||||
@@ -3537,7 +3537,7 @@ u8 func1019_chamber1[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER1, TRUE)
|
||||
set_object_flag(OBJ_CHAMBER1, OBJFLAG_DEACTIVATED)
|
||||
endloop(0x04)
|
||||
endlist
|
||||
@@ -3556,9 +3556,9 @@ u8 func101a_chamber2[] = {
|
||||
|
||||
// Raising chamber
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER2_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER2_SWITCH, TRUE)
|
||||
set_object_image(OBJ_CHAMBER2_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_066) // "Containment unit raised up."
|
||||
unset_object_flag(OBJ_CHAMBER2, OBJFLAG_DEACTIVATED)
|
||||
@@ -3572,7 +3572,7 @@ u8 func101a_chamber2[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
|
||||
set_object_flag(OBJ_CHAMBER2, OBJFLAG_DEACTIVATED)
|
||||
reloop(0x04)
|
||||
@@ -3581,9 +3581,9 @@ u8 func101a_chamber2[] = {
|
||||
label(LABEL_2D)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER2_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER2_SWITCH, TRUE)
|
||||
set_object_image(OBJ_CHAMBER2_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_067) // "Containment unit lowered down."
|
||||
unset_object_flag(OBJ_CHAMBER2, OBJFLAG_DEACTIVATED)
|
||||
@@ -3597,7 +3597,7 @@ u8 func101a_chamber2[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER2, TRUE)
|
||||
set_object_flag(OBJ_CHAMBER2, OBJFLAG_DEACTIVATED)
|
||||
endloop(0x04)
|
||||
endlist
|
||||
@@ -3643,9 +3643,9 @@ u8 func1020_chamber8[] = {
|
||||
|
||||
// Raising chamber
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER8_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER8_SWITCH, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_066) // "Containment unit raised up."
|
||||
set_object_image(OBJ_CHAMBER8_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
unset_object_flag(OBJ_CHAMBER8, OBJFLAG_DEACTIVATED)
|
||||
@@ -3659,7 +3659,7 @@ u8 func1020_chamber8[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
|
||||
set_object_flag(OBJ_CHAMBER8, OBJFLAG_DEACTIVATED)
|
||||
reloop(0x04)
|
||||
@@ -3668,10 +3668,10 @@ u8 func1020_chamber8[] = {
|
||||
label(LABEL_2D)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042B, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_CHAMBER8_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_CHAMBER8_SWITCH, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_LIP_067) // "Containment unit lowered down."
|
||||
set_object_image(OBJ_CHAMBER8_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
unset_object_flag(OBJ_CHAMBER8, OBJFLAG_DEACTIVATED)
|
||||
@@ -3685,7 +3685,7 @@ u8 func1020_chamber8[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_DOOR_042C, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_CHAMBER8, TRUE)
|
||||
set_object_flag(OBJ_CHAMBER8, OBJFLAG_DEACTIVATED)
|
||||
endloop(0x04)
|
||||
endlist
|
||||
@@ -4071,7 +4071,7 @@ u8 func1002_intro[] = {
|
||||
|
||||
wait_until(1346, LABEL_71)
|
||||
assign_sound(SFX_8169, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_CRATE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_CRATE, TRUE)
|
||||
|
||||
wait_until(1390, LABEL_72)
|
||||
speak(CHR_BOND, L_LIP_093, MP3_042C, CHANNEL_5, COLOR_09_BLUE) // "Cute. Very cute."
|
||||
@@ -4160,7 +4160,7 @@ u8 func1002_intro[] = {
|
||||
mute_channel(CHANNEL_5)
|
||||
mute_channel(CHANNEL_1)
|
||||
assign_sound(SFX_8169, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_CRATE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_CRATE, TRUE)
|
||||
unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
|
||||
set_chr_hiddenflag(CHR_BOND, CHRHFLAG_FINDROOMSFAST)
|
||||
chr_do_animation(ANIM_CUT_LIP_INTRO_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)
|
||||
|
||||
+15
-15
@@ -1006,7 +1006,7 @@ u8 func100c_maingate_switch[] = {
|
||||
|
||||
label(0x2e)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
set_object_image(OBJ_MAINGATE_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
if_door_state(OBJ_MAINGATE1, (DOORSTATE_OPEN | DOORSTATE_OPENING), /*goto*/ 0x2e)
|
||||
show_hudmsg(CHR_P1P2, L_LUE_043) // "Main gate has been opened."
|
||||
@@ -1023,7 +1023,7 @@ u8 func100c_maingate_switch[] = {
|
||||
|
||||
label(0x2e)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_MAINGATE_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
set_object_image(OBJ_MAINGATE_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
show_hudmsg(CHR_P1P2, L_LUE_044) // "Main gate has been closed."
|
||||
close_door(OBJ_MAINGATE1)
|
||||
@@ -1142,11 +1142,11 @@ u8 func1405_antenna_switch[] = {
|
||||
label(0x2e)
|
||||
if_stage_flag_eq(STAGEFLAG_ANTENNA_LOWERED, TRUE, /*goto*/ 0x06)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
|
||||
play_sound_from_object2(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
play_sound_from_object(CHANNEL_DONTCARE, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
#else
|
||||
assign_sound(SFX_00CD, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
|
||||
#endif
|
||||
set_object_image(OBJ_ANTENNA_SWITCH, 0, TVPROGRAM_SOLID_RED)
|
||||
unset_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
|
||||
@@ -1171,18 +1171,18 @@ u8 func1405_antenna_switch[] = {
|
||||
label(0x2e)
|
||||
mute_channel(CHANNEL_1)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_DONTCARE, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
|
||||
#endif
|
||||
set_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
|
||||
reloop(0x04)
|
||||
|
||||
label(0x06)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
|
||||
play_sound_from_object2(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
play_sound_from_object(CHANNEL_DONTCARE, OBJ_ANTENNA_SWITCH, SFX_DOOR_801E, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_1, OBJ_ANTENNA, SFX_00CD, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
#else
|
||||
assign_sound(SFX_00CD, CHANNEL_1)
|
||||
set_object_sound_playing(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_1, OBJ_ANTENNA_SWITCH, TRUE)
|
||||
#endif
|
||||
set_object_image(OBJ_ANTENNA_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
unset_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
|
||||
@@ -1207,7 +1207,7 @@ u8 func1405_antenna_switch[] = {
|
||||
label(0x2e)
|
||||
mute_channel(CHANNEL_1)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_9, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_DONTCARE, OBJ_ANTENNA_SWITCH, SFX_DOOR_801F, PSTYPE_NONE, 0)
|
||||
#endif
|
||||
set_object_flag(OBJ_ANTENNA, OBJFLAG_DEACTIVATED)
|
||||
endloop(0x04)
|
||||
@@ -1224,7 +1224,7 @@ u8 func1006_lift_switches[] = {
|
||||
|
||||
label(0x09)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LIFT1_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LIFT1_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
if_chr_has_object(CHR_P1P2, OBJ_KEYCARD, /*goto*/ 0x2e)
|
||||
show_hudmsg(CHR_P1P2, L_LUE_036) // "Lift access denied - key card needed."
|
||||
goto_next(0x0b)
|
||||
@@ -1246,7 +1246,7 @@ u8 func1006_lift_switches[] = {
|
||||
|
||||
label(0x0a)
|
||||
assign_sound(SFX_043F, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, OBJ_LIFT2_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
bind_channel_to_entity(CHANNEL_7, OBJ_LIFT2_SWITCH, 0x012c, 0x0190, 0x00)
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
if_chr_has_object(CHR_P1P2, OBJ_KEYCARD, /*goto*/ 0x2e)
|
||||
#else
|
||||
@@ -2200,7 +2200,7 @@ u8 func1010_bunker_lighting[] = {
|
||||
mute_channel(CHANNEL_0)
|
||||
yield
|
||||
assign_sound(SFX_ALARM_INFILTRATION, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, 0x10, 1, 800, 1100)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, 0x10, 1, 800, 1100)
|
||||
set_lights_state(0x0009, LIGHTOP_TRANSITION, 255, 50, 120)
|
||||
if_difficulty_lt(DIFF_SA, /*goto*/ 0x0e)
|
||||
restart_timer
|
||||
@@ -2478,7 +2478,7 @@ u8 func1011_bunker_explosives[] = {
|
||||
destroy_object(OBJ_RADAR_TERMINAL)
|
||||
mute_channel(CHANNEL_0)
|
||||
assign_sound(SFX_0479, CHANNEL_0)
|
||||
set_object_sound_playing(CHANNEL_0, OBJ_RADAR_TERMINAL, TRUE)
|
||||
bind_channel_to_object(CHANNEL_0, OBJ_RADAR_TERMINAL, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x0b)
|
||||
@@ -2601,7 +2601,7 @@ u8 func1016_trigger_interceptor[] = {
|
||||
u8 func1017_radar_terminal_noise[] = {
|
||||
yield
|
||||
assign_sound(SFX_8146, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_RADAR_TERMINAL, 1, 800, 1100)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_RADAR_TERMINAL, 1, 800, 1100)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
|
||||
@@ -1066,7 +1066,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = {
|
||||
set_stage_flag(STAGEFLAG_MEGAWEAPON_DISABLED)
|
||||
set_lights_state(0x006c, LIGHTOP_TRANSITION, 100, 255, 120)
|
||||
assign_sound(SFX_8148, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unlock_door(0xb7, 0x02)
|
||||
unlock_door(0xb8, 0x02)
|
||||
goto_first(0x03)
|
||||
@@ -2050,7 +2050,7 @@ u8 func1002_intro[] = {
|
||||
set_cutscene_weapon(CHR_BOND, WEAPON_FALCON2_SCOPE, WEAPON_NONE)
|
||||
|
||||
wait_until(0, 0x63)
|
||||
play_sound_from_object2(CHANNEL_5, 0x07, SFX_DOOR_81AA, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_5, 0x07, SFX_DOOR_81AA, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(260, 0x8a)
|
||||
play_sound(SFX_FOOTSTEP_80D5, CHANNEL_CUTSCENE)
|
||||
@@ -2080,7 +2080,7 @@ u8 func1002_intro[] = {
|
||||
|
||||
wait_until(1430, 0x6b)
|
||||
mute_channel(CHANNEL_5)
|
||||
play_sound_from_object2(CHANNEL_5, 0x07, SFX_81A9, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_5, 0x07, SFX_81A9, PSTYPE_NONE, 0)
|
||||
|
||||
wait_until(1522, 0x6c)
|
||||
speak(CHR_BOND, L_PAM_032, MP3_046A, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "No signs of conflict. No spent ammo cases or bulle..."
|
||||
@@ -3662,7 +3662,7 @@ u8 func041e_init_sa_megaweapon_miniskedar[] = {
|
||||
\
|
||||
label(0x06) \
|
||||
assign_sound(SFX_8147, CHANNEL_7) \
|
||||
set_object_sound_playing(CHANNEL_7, mine, TRUE) \
|
||||
bind_channel_to_object(CHANNEL_7, mine, TRUE) \
|
||||
yield \
|
||||
destroy_object(mine) \
|
||||
destroy_object(glass1) \
|
||||
|
||||
+19
-19
@@ -818,7 +818,7 @@ u8 func1026_uplink[] = {
|
||||
label(0x03)
|
||||
show_hudmsg(CHR_P1P2, L_PETE_019) // "Accessing hovercab navigation systems."
|
||||
assign_sound(SFX_0456, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_TAXI, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_TAXI, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x05)
|
||||
@@ -832,7 +832,7 @@ u8 func1026_uplink[] = {
|
||||
show_hudmsg(CHR_P1P2, L_PETE_021) // "Hovercab navigation systems reprogrammed."
|
||||
mute_channel(CHANNEL_7)
|
||||
assign_sound(SFX_01C1, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_TAXI, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_TAXI, TRUE)
|
||||
yield
|
||||
set_stage_flag(STAGEFLAG_TAXI_REPROGRAMMED)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
@@ -845,7 +845,7 @@ u8 func1026_uplink[] = {
|
||||
yield
|
||||
yield
|
||||
assign_sound(SFX_0457, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, OBJ_TAXI, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, OBJ_TAXI, 1, 300, 400)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x1d)
|
||||
@@ -902,7 +902,7 @@ u8 func040d_limo[] = {
|
||||
object_do_animation(ANIM_02D6, OBJ_LIMO, 0x04, 0xffff)
|
||||
|
||||
assign_sound(SFX_BIKE_ENGINE, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_LIMO, 1, 2400, 3200)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_LIMO, 1, 2400, 3200)
|
||||
if_stage_flag_eq(STAGEFLAG_TRACERBUG_PLACED, TRUE, /*goto*/ 0x03)
|
||||
if_difficulty_lt(DIFF_PA, /*goto*/ 0x03)
|
||||
set_stage_flag(STAGEFLAG_LIMO_ESCAPED)
|
||||
@@ -941,7 +941,7 @@ u8 func040c_taxi[] = {
|
||||
// Take off
|
||||
label(0x03)
|
||||
assign_sound(SFX_8000, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_TAXI, 1, 2400, 3200)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_TAXI, 1, 2400, 3200)
|
||||
object_do_animation(ANIM_0168, OBJ_TAXI, 0x04, 0xffff)
|
||||
set_object_flag2(OBJ_TAXI, OBJFLAG2_CANFILLVIEWPORT)
|
||||
|
||||
@@ -1633,7 +1633,7 @@ u8 func0413_bugspotter[] = {
|
||||
label(0x04)
|
||||
chr_do_animation(ANIM_TALKING_00A3, 0, -1, 0, 16, CHR_SELF, 2)
|
||||
assign_sound(SFX_044A, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
set_stage_flag(STAGEFLAG_TRACERBUG_SPOTTED)
|
||||
show_hudmsg(CHR_BOND, L_PETE_067) // "Tracer Bug has been spotted."
|
||||
|
||||
@@ -1669,7 +1669,7 @@ u8 func0413_bugspotter[] = {
|
||||
label(0x04)
|
||||
increase_squadron_alertness(100)
|
||||
assign_sound(SFX_0467, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
|
||||
// No other guard to run to
|
||||
label(0x0b)
|
||||
@@ -1982,17 +1982,17 @@ u8 func041a_robot[] = {
|
||||
if_rand_lt(86, /*goto*/ 0x06)
|
||||
if_rand_lt(172, /*goto*/ 0x07)
|
||||
assign_sound(SFX_046A, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
goto_next(0x03)
|
||||
|
||||
label(0x06)
|
||||
assign_sound(SFX_046B, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
goto_next(0x03)
|
||||
|
||||
label(0x07)
|
||||
assign_sound(SFX_046C, CHANNEL_5)
|
||||
play_sound_from_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_5, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
label(0x03)
|
||||
|
||||
if_patrolling(/*goto*/ 0x03)
|
||||
@@ -2052,7 +2052,7 @@ u8 func041a_robot[] = {
|
||||
|
||||
label(0x0c)
|
||||
assign_sound(MP3_ROBOT_ALERT_UNDER_ATTACK, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
label(0x01)
|
||||
@@ -2136,7 +2136,7 @@ u8 func041e_sealer1[] = {
|
||||
// Conversation
|
||||
label(0x04)
|
||||
assign_sound(SFX_814B, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
chr_do_animation(ANIM_TALKING_0098, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SELF, 2)
|
||||
restart_timer
|
||||
|
||||
@@ -2147,7 +2147,7 @@ u8 func041e_sealer1[] = {
|
||||
|
||||
label(0x03)
|
||||
assign_sound(SFX_044F, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
chr_do_animation(ANIM_TALKING_0231, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER1, 2)
|
||||
chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SELF, 2)
|
||||
|
||||
@@ -2158,7 +2158,7 @@ u8 func041e_sealer1[] = {
|
||||
|
||||
label(0x03)
|
||||
assign_sound(SFX_0450, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
chr_do_animation(ANIM_TALKING_0233, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER3, 2)
|
||||
chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER1, 2)
|
||||
restart_timer
|
||||
@@ -2170,7 +2170,7 @@ u8 func041e_sealer1[] = {
|
||||
|
||||
label(0x03)
|
||||
assign_sound(SFX_0451, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
chr_do_animation(ANIM_TALKING_0232, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER1, 2)
|
||||
chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER3, 2)
|
||||
restart_timer
|
||||
@@ -2182,7 +2182,7 @@ u8 func041e_sealer1[] = {
|
||||
|
||||
label(0x03)
|
||||
assign_sound(SFX_0452, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
chr_do_animation(ANIM_TALKING_0234, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER3, 2)
|
||||
chr_do_animation(ANIM_TWO_GUN_HOLD, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_SEALER1, 2)
|
||||
|
||||
@@ -2204,7 +2204,7 @@ u8 func041e_sealer1[] = {
|
||||
lock_door(0x11, 0x02)
|
||||
set_stage_flag(STAGEFLAG_ELEVATOR_SEALED)
|
||||
assign_sound(SFX_0469, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
show_hudmsg(CHR_BOND, L_PETE_033) // "Elevator access sealed."
|
||||
chr_do_animation(ANIM_STANDING_TYPE_ONE_HAND, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
|
||||
|
||||
@@ -2399,10 +2399,10 @@ u8 func040a_intro_from_gameplay[] = {
|
||||
|
||||
u8 func101f_setup_robot_noise[] = {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
play_sound_from_object2(CHANNEL_2, CHR_ROBOT, SFX_80B9_THUNDER, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
play_sound_from_object(CHANNEL_2, CHR_ROBOT, SFX_80B9_THUNDER, PSTYPE_NONE, PSFLAG_REPEATING)
|
||||
#else
|
||||
play_sound(SFX_80B9_THUNDER, CHANNEL_2)
|
||||
play_repeating_sound_from_object(CHANNEL_2, CHR_ROBOT, 0, 900, 1500)
|
||||
bind_channel_to_object_repeating(CHANNEL_2, CHR_ROBOT, 0, 900, 1500)
|
||||
#endif
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
|
||||
@@ -1161,7 +1161,7 @@ u8 func100a_autopilot_switch[] = {
|
||||
// Switch pressed
|
||||
label(0x06)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_AUTOPILOT_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_AUTOPILOT_SWITCH, TRUE)
|
||||
set_object_image(OBJ_AUTOPILOT_SWITCH, 0, TVPROGRAM_SOLID_GREEN)
|
||||
set_stage_flag(STAGEFLAG_PLANE_STABILIZED)
|
||||
yield
|
||||
@@ -1468,7 +1468,7 @@ u8 func0404_president_running[] = {
|
||||
|
||||
label(0x06)
|
||||
assign_sound(MP3_02BF, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
set_shotlist(GAILIST_IDLE)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
@@ -1482,7 +1482,7 @@ u8 func0404_president_running[] = {
|
||||
label(0x06)
|
||||
restart_timer
|
||||
assign_sound(MP3_02C2, CHANNEL_6)
|
||||
play_sound_from_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_6, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
if_stage_flag_eq(STAGEFLAG_PRESIDENT_INJURED, TRUE, /*goto*/ 0x56)
|
||||
set_stage_flag(STAGEFLAG_PRESIDENT_INJURED)
|
||||
show_hudmsg(CHR_BOND, L_RIT_072) // "The President is under attack."
|
||||
@@ -2815,7 +2815,7 @@ u8 func041e_blonde[] = {
|
||||
if_self_flag_bankx_eq(CHRFLAG1_CAN_RELOAD, FALSE, BANK_1, /*goto*/ 0x06)
|
||||
if_timer_lt(120, /*goto*/ 0x06)
|
||||
assign_sound(VERSION >= VERSION_NTSC_1_0 ? SFX_80F6 : SFX_01D9, CHANNEL_7)
|
||||
play_sound_from_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
bind_channel_to_entity(CHANNEL_7, CHR_SELF, 0x0bb8, 0x1770, 0x01)
|
||||
unset_self_flag_bankx(CHRFLAG1_CAN_RELOAD, BANK_1)
|
||||
label(0x06)
|
||||
if_chr_stopped(/*goto*/ 0x2d)
|
||||
@@ -3665,7 +3665,7 @@ u8 func101a_equipment_switch[] = {
|
||||
open_door(0x1c)
|
||||
show_hudmsg(CHR_P1P2, L_RIT_061) // "Cargo bay has been raised."
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_EQUIPMENT_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_EQUIPMENT_SWITCH, TRUE)
|
||||
unset_object_flag(0x1b, OBJFLAG_DEACTIVATED)
|
||||
yield
|
||||
yield
|
||||
@@ -3729,7 +3729,7 @@ u8 func101b_hoverbike_switch[] = {
|
||||
show_hudmsg(CHR_P1P2, L_RIT_060) // "Cargo bay has been lowered."
|
||||
set_savefile_flag(GAMEFILEFLAG_CRASHSITE_BIKE)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_HOVERBIKE_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_HOVERBIKE_SWITCH, TRUE)
|
||||
unset_object_flag(0x1f, OBJFLAG_DEACTIVATED)
|
||||
restart_timer
|
||||
|
||||
|
||||
@@ -1350,7 +1350,7 @@ u8 func1008_check_console[] = {
|
||||
|
||||
label(0x2c)
|
||||
assign_sound(SFX_8111, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, OBJ_CONSOLE, 1, 300, 400)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, OBJ_CONSOLE, 1, 300, 400)
|
||||
show_hudmsg(CHR_BOND, L_SEV_009) // "Distress signal has been sent."
|
||||
set_stage_flag(STAGEFLAG_CONSOLE_ACTIVATED)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
|
||||
@@ -1101,7 +1101,7 @@ u8 func1005_5e0c[] = {
|
||||
if_stage_flag_eq(STAGEFLAG_TRIGGER_BRIDGE, TRUE, /*goto*/ 0x2d)
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_0436, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_PUZZLEROCK, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_PUZZLEROCK, TRUE)
|
||||
|
||||
// Wait for a condition that would cause the bridge to retract
|
||||
label(0x2d)
|
||||
@@ -1138,7 +1138,7 @@ u8 func1005_5e0c[] = {
|
||||
// Switch no longer pressed
|
||||
mute_channel(CHANNEL_5)
|
||||
assign_sound(SFX_0437, CHANNEL_5)
|
||||
set_object_sound_playing(CHANNEL_5, OBJ_PUZZLEROCK, TRUE)
|
||||
bind_channel_to_object(CHANNEL_5, OBJ_PUZZLEROCK, TRUE)
|
||||
goto_first(0x04)
|
||||
|
||||
// Switch still pressed
|
||||
@@ -1159,7 +1159,7 @@ u8 func1006_bridge[] = {
|
||||
unset_object_flag(OBJ_BRIDGE, OBJFLAG_DEACTIVATED)
|
||||
mute_channel(CHANNEL_4)
|
||||
assign_sound(SFX_DOOR_8020, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, OBJ_BRIDGE, 1, 1200, 1600)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, OBJ_BRIDGE, 1, 1200, 1600)
|
||||
yield
|
||||
|
||||
beginloop(0x08)
|
||||
@@ -1169,7 +1169,7 @@ u8 func1006_bridge[] = {
|
||||
label(0x06)
|
||||
mute_channel(CHANNEL_4)
|
||||
assign_sound(SFX_DOOR_8027, CHANNEL_4)
|
||||
set_object_sound_playing(CHANNEL_4, OBJ_BRIDGE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_4, OBJ_BRIDGE, TRUE)
|
||||
set_object_flag(OBJ_BRIDGE, OBJFLAG_DEACTIVATED)
|
||||
set_stage_flag(STAGEFLAG_BRIDGE_EXTENDED)
|
||||
|
||||
@@ -1187,7 +1187,7 @@ u8 func1006_bridge[] = {
|
||||
unset_object_flag(OBJ_BRIDGE, OBJFLAG_DEACTIVATED)
|
||||
mute_channel(CHANNEL_4)
|
||||
assign_sound(SFX_DOOR_8020, CHANNEL_4)
|
||||
play_repeating_sound_from_object(CHANNEL_4, OBJ_BRIDGE, 1, 1200, 1600)
|
||||
bind_channel_to_object_repeating(CHANNEL_4, OBJ_BRIDGE, 1, 1200, 1600)
|
||||
yield
|
||||
|
||||
beginloop(0x0b)
|
||||
@@ -1199,7 +1199,7 @@ u8 func1006_bridge[] = {
|
||||
set_object_flag(OBJ_BRIDGE, OBJFLAG_DEACTIVATED)
|
||||
mute_channel(CHANNEL_4)
|
||||
assign_sound(SFX_DOOR_8027, CHANNEL_4)
|
||||
set_object_sound_playing(CHANNEL_4, OBJ_BRIDGE, TRUE)
|
||||
bind_channel_to_object(CHANNEL_4, OBJ_BRIDGE, TRUE)
|
||||
goto_first(0x04)
|
||||
|
||||
endlist
|
||||
@@ -3566,7 +3566,7 @@ u8 func0414_outro_sounds[] = {
|
||||
yield
|
||||
yield
|
||||
set_chr_shooting_in_cutscene(CHR_TARGET, FALSE)
|
||||
play_sound_from_object2(CHANNEL_6, 0x25, SFX_SKEDAR_ROAR_052D, PSTYPE_NONE, 0)
|
||||
play_sound_from_object(CHANNEL_6, 0x25, SFX_SKEDAR_ROAR_052D, PSTYPE_NONE, 0)
|
||||
|
||||
outro_wait_until_with_stageflag(3600, 0xd7)
|
||||
play_sound(MP3_07C9, CHANNEL_CUTSCENE)
|
||||
|
||||
@@ -1971,7 +1971,7 @@ u8 func100c_medpack_activation[] = {
|
||||
#else
|
||||
assign_sound(SFX_043C, CHANNEL_7)
|
||||
#endif
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_HOVERBED, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_HOVERBED, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x12)
|
||||
@@ -1984,7 +1984,7 @@ u8 func100c_medpack_activation[] = {
|
||||
#else
|
||||
assign_sound(SFX_047C, CHANNEL_7)
|
||||
#endif
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_HOVERBED, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_HOVERBED, TRUE)
|
||||
restart_timer
|
||||
|
||||
beginloop(0x08)
|
||||
@@ -1999,7 +1999,7 @@ u8 func100c_medpack_activation[] = {
|
||||
#else
|
||||
assign_sound(SFX_043D, CHANNEL_7)
|
||||
#endif
|
||||
set_object_sound_playing(CHANNEL_7, 0x00, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, 0x00, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_TRA_035) // "Alien medpack has been administered."
|
||||
yield
|
||||
|
||||
@@ -2118,7 +2118,7 @@ u8 func100f_terminals[] = {
|
||||
// Terminal 1
|
||||
label(0x08)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_TERMINAL1, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_TERMINAL1, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x32)
|
||||
show_hudmsg(CHR_P1P2, L_TRA_080) // "Console is not active."
|
||||
goto_next(0x0f)
|
||||
@@ -2139,7 +2139,7 @@ u8 func100f_terminals[] = {
|
||||
// Terminal 2
|
||||
label(0x0a)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_TERMINAL2, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_TERMINAL2, TRUE)
|
||||
if_stage_flag_eq(STAGEFLAG_HANGAR_X_MUSIC_STARTED, TRUE, /*goto*/ 0x32)
|
||||
show_hudmsg(CHR_P1P2, L_TRA_080) // "Console is not active."
|
||||
goto_next(0x0f)
|
||||
@@ -3085,7 +3085,7 @@ u8 func101b_gas_sound[] = {
|
||||
label(0x04)
|
||||
yield
|
||||
assign_sound(SFX_816A, CHANNEL_0)
|
||||
play_repeating_sound_from_object(CHANNEL_0, 0x2b, 1, 8000, 3000)
|
||||
bind_channel_to_object_repeating(CHANNEL_0, 0x2b, 1, 8000, 3000)
|
||||
set_ailist(CHR_SELF, GAILIST_IDLE)
|
||||
endlist
|
||||
};
|
||||
@@ -3399,7 +3399,7 @@ u8 func101a_medpack_switch[] = {
|
||||
|
||||
label(0x32)
|
||||
assign_sound(SFX_043A, CHANNEL_7)
|
||||
set_object_sound_playing(CHANNEL_7, OBJ_MEDPACK_SWITCH, TRUE)
|
||||
bind_channel_to_object(CHANNEL_7, OBJ_MEDPACK_SWITCH, TRUE)
|
||||
show_hudmsg(CHR_P1P2, L_TRA_054) // "Medical containment doors unlocked."
|
||||
unlock_door(0x12, 0x40)
|
||||
unlock_door(0x13, 0x40)
|
||||
|
||||
@@ -1696,7 +1696,7 @@ u8 func1007_bomb_logic[] = {
|
||||
disable_object(OBJ_BOND_BOMB)
|
||||
disable_object(OBJ_COOP_BOMB)
|
||||
assign_sound(SFX_8144, CHANNEL_1)
|
||||
play_repeating_sound_from_object(CHANNEL_1, OBJ_PLANTED_BOMB, 1, 600, 1200)
|
||||
bind_channel_to_object_repeating(CHANNEL_1, OBJ_PLANTED_BOMB, 1, 600, 1200)
|
||||
unset_object_flag2(OBJ_PLANTED_BOMB, OBJFLAG2_INVISIBLE)
|
||||
set_object_image(OBJ_PLANTED_BOMB, 0, TVPROGRAM_PULSE_RED)
|
||||
unset_object_flag(OBJ_PLANTED_BOMB, OBJFLAG_INVINCIBLE)
|
||||
|
||||
Reference in New Issue
Block a user