sound volumes are now read from and saved to config.rc + bugfix

- fixed calling of IMGUIClear() when the view state changed (was previously
	called only when the game state changed)
This commit is contained in:
2010-11-28 01:13:45 +01:00
parent 33683e817d
commit b8f0ed31e3
9 changed files with 48 additions and 22 deletions
+14
View File
@@ -1,4 +1,5 @@
#include "Variables.h"
#include "SoundBaseGlobal.h"
namespace Engine {
@@ -8,6 +9,19 @@ bool Cmd_Set (const std::vector<std::string> args) {
return false;
}
// special variable sound_volume
if (args[0] == "effects_volume") {
SetEffectsVolume(atof(args[1].c_str()));
return true;
}
// special variable music_volume
if (args[0] == "music_volume") {
SetMusicVolume(atof(args[1].c_str()));
return true;
}
Variable *test = GetVariable (args[0]);
if (test) {
test->SetStringValue (args[1]);
+3 -3
View File
@@ -72,7 +72,6 @@
* todos within the code have a look at the \ref todo.
*
* \todo [high] Create a simple racing or asteroids game
* \todo [high] Enable saving of music and effects volume
* \todo [med] Use shared_ptr instead of raw pointers for the Entities
* \todo [med] Clear all references of EntityVisualState and EntityGameState
* \todo [med] Clarify functionalities of CreateEntity, KillEntity, RegisterEntity, UnregisterEntity (which frees memory, which does only change the state of the Model?)
@@ -88,9 +87,10 @@
* Engine::Module::Init()
*
* Done:
* \todo [high] (28-11-2010) Enable saving of music and effects volume
* \todo [high] (28-11-2010) Allow transitions when player dies
* \todo [high] (11-09-2010) Since introduction of the IMGUI pressing 'space' in the menu crashes the game
* - [high] In Physics remove dependancy on the Model to pass on collision
* \todo [high] (11-09-2010) Since introduction of the IMGUI pressing 'space' in the menu crashes the game
* - [high] In Physics remove dependancy on the Model to pass on collision
* events
* - [high] Fix Physics bug when two actors collide actively (i.e. velocity
* towards each other)