1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-27 13:48:15 +00:00

ads-game:: sounds

This commit is contained in:
Zeno Rogue 2022-09-29 01:12:08 +02:00
parent a84a9c94dd
commit a401a7ed67
5 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@ vector<string> move_names = { "acc down", "acc left", "acc up", "acc right", "fi
void fire() {
if(!pdata.ammo) return;
playSound(nullptr, "fire");
pdata.ammo--;
auto c = vctr;

View File

@ -286,6 +286,7 @@ void ds_handle_crashes() {
ds_gen_particles(rpoisson(crash_particle_qty), m->at.T * lorentz(2, 3, m->life_end), m->at.shift, missile_color, crash_particle_rapidity, crash_particle_life);
if(r->type != oMainRock)
ds_gen_particles(rpoisson(crash_particle_qty), r->at.T * lorentz(2, 3, r->life_end), r->at.shift, r->col, crash_particle_rapidity, crash_particle_life);
playSound(nullptr, "hit-crush3");
break;
}
}
@ -308,6 +309,7 @@ void ds_handle_crashes() {
void ds_fire() {
if(!pdata.ammo) return;
pdata.ammo--;
playSound(nullptr, "fire");
dynamicval<eGeometry> g(geometry, gSpace435);
transmatrix S0 = inverse(current.T) * spin(ang*degree);

View File

@ -233,6 +233,7 @@ void common_crash_ship() {
invincibility_pt = ship_pt + DS_(how_much_invincibility);
pdata.hitpoints--;
if(pdata.hitpoints <= 0) game_over = true;
playSound(nullptr, "explosion");
}
void ads_crash_ship() {
@ -266,6 +267,7 @@ void handle_crashes() {
gen_particles(rpoisson(crash_particle_qty), m->owner, m->at * ads_matrix(Id, m->life_end), missile_color, crash_particle_rapidity, crash_particle_life);
gen_particles(rpoisson(crash_particle_qty), r->owner, r->at * ads_matrix(Id, r->life_end), r->col, crash_particle_rapidity, crash_particle_life);
gen_resource(r->owner, r->at * ads_matrix(Id, r->life_end), r->resource, r->expire);
playSound(nullptr, "hit-crush3");
});
}
}

View File

@ -105,7 +105,7 @@ void game_menu() {
#if CAP_AUDIO
add_edit(effvolume);
add_edit(musicvolume);
if(music_available) add_edit(musicvolume);
#endif
dialog::addItem("RogueViz settings", 'v');

View File

@ -8,6 +8,7 @@ color_t rock_color[6] = { 0x703800FF, 0xC0A080FF, 0xC08010FF, 0xC04000FF, 0x4080
color_t rsrc_color[6] = { 0x404040FF, 0x40C0C0FF, 0xFFD500FF, 0xFF0000FF, 0x00FF00FF, 0x0000FFFF };
vector<ld>* rsrc_shape[6] = { &shape_particle, &shape_heart, &shape_gold, &shape_weapon, &shape_fuel, &shape_airtank };
string rsrc_sound[6] = {"", "pickup-potion", "pickup-gold", "pickup-scroll", "pickup-speed", "seen-air" };
void rsrc_config() {
ads_max_pdata.hitpoints = 3;
@ -163,6 +164,7 @@ void gain_resource(eResourceType rsrc) {
D(3, ammo)
D(4, fuel)
D(5, oxygen)
playSound(nullptr, rsrc_sound[rsrc]);
}
}}