X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fcamera.cpp;h=93b910437daa1d29bd302e3be2be17157a25b128;hb=f27ec33980c31a595f497d85b8ddee17c451975f;hp=d96b5a46849b4feb4a85eb699c9426744e43674f;hpb=ca12c25190d1349c69fe26093bd7f85186399b4f;p=supertux.git diff --git a/src/scripting/camera.cpp b/src/scripting/camera.cpp index d96b5a468..93b910437 100644 --- a/src/scripting/camera.cpp +++ b/src/scripting/camera.cpp @@ -6,7 +6,7 @@ #include "scripting/camera.hpp" #include "math/vector.hpp" -#define NOIMPL printf("%s not implemented.\n", __PRETTY_FUNCTION__); +#define NOIMPL msg_fatal << __PRETTY_FUNCTION__ << " not implemented." namespace Scripting { @@ -30,9 +30,15 @@ namespace Scripting } void - Camera::set_mode(const std::string& ) + Camera::set_mode(const std::string& mode) { - NOIMPL; + if(mode == "normal") { + camera->mode = ::Camera::NORMAL; + } else if(mode == "manual") { + camera->mode = ::Camera::MANUAL; + } else { + msg_fatal << "Camera mode '" << mode << "' unknown."; + } } void