Added new sound effects.

This commit is contained in:
Steve 2016-06-07 08:29:52 +01:00
parent 2f0e38425e
commit 5fa9ea1922
11 changed files with 23 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -54,6 +54,8 @@ void doObjectives(void)
o->status = OS_COMPLETE;
runScriptFunction("OBJECTIVES_COMPLETE %d", battle.numObjectivesComplete + 1);
playSound(SND_OBJECTIVE_COMPLETE);
}
}
else
@ -140,6 +142,8 @@ void updateObjective(char *name, int type)
o->status = OS_COMPLETE;
runScriptFunction("OBJECTIVES_COMPLETE %d", ++completed);
playSound(SND_OBJECTIVE_COMPLETE);
}
}
}
@ -173,7 +177,10 @@ void adjustObjectiveTargetValue(char *name, int type, int amount)
if (o->currentValue >= o->targetValue && o->targetValue > 0)
{
o->status = OS_COMPLETE;
addHudMessage(colors.green, _("%s - Objective Complete!"), o->description);
playSound(SND_OBJECTIVE_COMPLETE);
}
}
}
@ -195,6 +202,7 @@ void updateCondition(char *name, int type)
{
o->status = OS_FAILED;
addHudMessage(colors.red, _("%s - Objective Failed!"), o->description);
playSound(SND_OBJECTIVE_FAILED);
}
else if (!o->hideNumbers)
{

View File

@ -52,6 +52,8 @@ void attachRope(void)
battle.stats[STAT_NUM_TOWED]++;
addHudMessage(colors.white, _("Tow rope attached"));
}
playBattleSound(SND_TOW_ROPE, e->x, e->y);
}
}
}

View File

@ -28,6 +28,7 @@ extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
extern void addHudMessage(SDL_Color c, char *format, ...);
extern void runScriptFunction(char *format, ...);
extern char *getTranslatedString(char *string);
extern void playBattleSound(int id, int x, int y);
extern App app;
extern Battle battle;

View File

@ -81,6 +81,8 @@ static void think(void)
}
battle.stats[STAT_WAYPOINTS_VISITED]++;
playSound(SND_WAYPOINT);
}
}
}

View File

@ -27,6 +27,7 @@ extern Entity *spawnEntity(void);
extern void updateObjective(char *name, int type);
extern void runScriptFunction(char *format, ...);
extern char *getTranslatedString(char *string);
extern void playSound(int id);
extern Battle battle;
extern Colors colors;

View File

@ -283,6 +283,10 @@ enum
SND_NEW_OBJECTIVE,
SND_NO_MISSILES,
SND_RECHARGED,
SND_TOW_ROPE,
SND_OBJECTIVE_COMPLETE,
SND_OBJECTIVE_FAILED,
SND_WAYPOINT,
SND_MAX
};

View File

@ -124,8 +124,12 @@ static void loadSounds(void)
sounds[SND_CAP_DEATH] = loadSound("sound/000000_large_explosion.ogg");
sounds[SND_ZOOM] = loadSound("sound/62491__benboncan__dslr-click.ogg");
sounds[SND_NO_MISSILES] = loadSound("sound/154934__klawykogut__empty-gun-shot.ogg");
sounds[SND_NEW_OBJECTIVE] = loadSound("sound/107786__leviclaassen__beepbeep.ogg");
sounds[SND_RECHARGED] = loadSound("sound/33785__jobro__4-beep-b.ogg");
sounds[SND_TOW_ROPE] = loadSound("sound/000000_tow-rope-attach.ogg");
sounds[SND_NEW_OBJECTIVE] = loadSound("sound/246420__oceanictrancer__game-sound-effect-menu.ogg");
sounds[SND_OBJECTIVE_COMPLETE] = loadSound("sound/107786__leviclaassen__beepbeep.ogg");
sounds[SND_OBJECTIVE_FAILED] = loadSound("sound/255729__manholo__inception-stab-l.ogg");
sounds[SND_WAYPOINT] = loadSound("sound/146311__jgeralyn__shortailenliketone2-lower.ogg");
sounds[SND_GUI_CLICK] = loadSound("sound/257786__xtrgamr__mouse-click.ogg");
sounds[SND_GUI_SELECT] = loadSound("sound/321104__nsstudios__blip2.ogg");