X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Ffunctions.cpp;h=95d860761bce1f5793aa17834f49ee170d56f9a5;hb=7a0031e8f250c852743709ab06ecafe1896eefbe;hp=36e47050953bf6cea85bc28c6c37d892ebef2822;hpb=cb45fd02e9f064a2368b6ebb393e91ad0e254f52;p=supertux.git diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index 36e470509..95d860761 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -51,6 +51,8 @@ #include "squirrel_util.hpp" #include "time_scheduler.hpp" +extern float game_speed; + namespace Scripting { @@ -192,13 +194,13 @@ bool validate_sector_player() 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; - return false; + return false; } 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; } +void set_gamma(float gamma) { + SDL_SetGamma(gamma, gamma, gamma); +} + void quit() { main_loop->quit(); @@ -285,4 +291,9 @@ int rand() return systemRandom.rand(); } +void set_game_speed(float speed) +{ + ::game_speed = speed; +} + }