Added new sound effects.
This commit is contained in:
parent
2f0e38425e
commit
5fa9ea1922
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -54,6 +54,8 @@ void doObjectives(void)
|
||||||
o->status = OS_COMPLETE;
|
o->status = OS_COMPLETE;
|
||||||
|
|
||||||
runScriptFunction("OBJECTIVES_COMPLETE %d", battle.numObjectivesComplete + 1);
|
runScriptFunction("OBJECTIVES_COMPLETE %d", battle.numObjectivesComplete + 1);
|
||||||
|
|
||||||
|
playSound(SND_OBJECTIVE_COMPLETE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -140,6 +142,8 @@ void updateObjective(char *name, int type)
|
||||||
o->status = OS_COMPLETE;
|
o->status = OS_COMPLETE;
|
||||||
|
|
||||||
runScriptFunction("OBJECTIVES_COMPLETE %d", ++completed);
|
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)
|
if (o->currentValue >= o->targetValue && o->targetValue > 0)
|
||||||
{
|
{
|
||||||
o->status = OS_COMPLETE;
|
o->status = OS_COMPLETE;
|
||||||
|
|
||||||
addHudMessage(colors.green, _("%s - Objective Complete!"), o->description);
|
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;
|
o->status = OS_FAILED;
|
||||||
addHudMessage(colors.red, _("%s - Objective Failed!"), o->description);
|
addHudMessage(colors.red, _("%s - Objective Failed!"), o->description);
|
||||||
|
playSound(SND_OBJECTIVE_FAILED);
|
||||||
}
|
}
|
||||||
else if (!o->hideNumbers)
|
else if (!o->hideNumbers)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,6 +52,8 @@ void attachRope(void)
|
||||||
battle.stats[STAT_NUM_TOWED]++;
|
battle.stats[STAT_NUM_TOWED]++;
|
||||||
addHudMessage(colors.white, _("Tow rope attached"));
|
addHudMessage(colors.white, _("Tow rope attached"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playBattleSound(SND_TOW_ROPE, e->x, e->y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 addHudMessage(SDL_Color c, char *format, ...);
|
||||||
extern void runScriptFunction(char *format, ...);
|
extern void runScriptFunction(char *format, ...);
|
||||||
extern char *getTranslatedString(char *string);
|
extern char *getTranslatedString(char *string);
|
||||||
|
extern void playBattleSound(int id, int x, int y);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -81,6 +81,8 @@ static void think(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
battle.stats[STAT_WAYPOINTS_VISITED]++;
|
battle.stats[STAT_WAYPOINTS_VISITED]++;
|
||||||
|
|
||||||
|
playSound(SND_WAYPOINT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ extern Entity *spawnEntity(void);
|
||||||
extern void updateObjective(char *name, int type);
|
extern void updateObjective(char *name, int type);
|
||||||
extern void runScriptFunction(char *format, ...);
|
extern void runScriptFunction(char *format, ...);
|
||||||
extern char *getTranslatedString(char *string);
|
extern char *getTranslatedString(char *string);
|
||||||
|
extern void playSound(int id);
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -283,6 +283,10 @@ enum
|
||||||
SND_NEW_OBJECTIVE,
|
SND_NEW_OBJECTIVE,
|
||||||
SND_NO_MISSILES,
|
SND_NO_MISSILES,
|
||||||
SND_RECHARGED,
|
SND_RECHARGED,
|
||||||
|
SND_TOW_ROPE,
|
||||||
|
SND_OBJECTIVE_COMPLETE,
|
||||||
|
SND_OBJECTIVE_FAILED,
|
||||||
|
SND_WAYPOINT,
|
||||||
SND_MAX
|
SND_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,12 @@ static void loadSounds(void)
|
||||||
sounds[SND_CAP_DEATH] = loadSound("sound/000000_large_explosion.ogg");
|
sounds[SND_CAP_DEATH] = loadSound("sound/000000_large_explosion.ogg");
|
||||||
sounds[SND_ZOOM] = loadSound("sound/62491__benboncan__dslr-click.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_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_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_CLICK] = loadSound("sound/257786__xtrgamr__mouse-click.ogg");
|
||||||
sounds[SND_GUI_SELECT] = loadSound("sound/321104__nsstudios__blip2.ogg");
|
sounds[SND_GUI_SELECT] = loadSound("sound/321104__nsstudios__blip2.ogg");
|
||||||
|
|
Loading…
Reference in New Issue