projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update INSTALL to tell users to do CMAKE_BUILD_TYPE=DEBUG rather that DEBUG=ON
[supertux.git]
/
src
/
scripting
/
functions.cpp
diff --git
a/src/scripting/functions.cpp
b/src/scripting/functions.cpp
index
36e4705
..
95d8607
100644
(file)
--- a/
src/scripting/functions.cpp
+++ b/
src/scripting/functions.cpp
@@
-51,6
+51,8
@@
#include "squirrel_util.hpp"
#include "time_scheduler.hpp"
#include "squirrel_util.hpp"
#include "time_scheduler.hpp"
+extern float game_speed;
+
namespace Scripting
{
namespace Scripting
{
@@
-192,13
+194,13
@@
bool validate_sector_player()
if (Sector::current() == 0)
{
log_info << "No current sector." << std::endl;
if (Sector::current() == 0)
{
log_info << "No current sector." << std::endl;
-
return false;
+ return false;
}
if (Sector::current()->player == 0)
{
log_info << "No player." << std::endl;
}
if (Sector::current()->player == 0)
{
log_info << "No player." << std::endl;
-
return false;
+ return false;
}
return true;
}
}
return true;
}
@@
-275,6
+277,10
@@
void camera()
log_info << "Camera is at " << Sector::current()->camera->get_translation().x << "," << Sector::current()->camera->get_translation().y << std::endl;
}
log_info << "Camera is at " << Sector::current()->camera->get_translation().x << "," << Sector::current()->camera->get_translation().y << std::endl;
}
+void set_gamma(float gamma) {
+ SDL_SetGamma(gamma, gamma, gamma);
+}
+
void quit()
{
main_loop->quit();
void quit()
{
main_loop->quit();
@@
-285,4
+291,9
@@
int rand()
return systemRandom.rand();
}
return systemRandom.rand();
}
+void set_game_speed(float speed)
+{
+ ::game_speed = speed;
+}
+
}
}