src/scripting/functions.hpp

Go to the documentation of this file.
00001 //  SuperTux
00002 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
00003 //
00004 //  This program is free software: you can redistribute it and/or modify
00005 //  it under the terms of the GNU General Public License as published by
00006 //  the Free Software Foundation, either version 3 of the License, or
00007 //  (at your option) any later version.
00008 //
00009 //  This program is distributed in the hope that it will be useful,
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 //  GNU General Public License for more details.
00013 //
00014 //  You should have received a copy of the GNU General Public License
00015 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 #ifndef HEADER_SUPERTUX_SCRIPTING_FUNCTIONS_HPP
00018 #define HEADER_SUPERTUX_SCRIPTING_FUNCTIONS_HPP
00019 
00020 #ifndef SCRIPTING_API
00021 #include <squirrel.h>
00022 #include <string>
00023 
00024 #define __suspend
00025 #define __custom(x)
00026 #endif
00027 
00028 namespace scripting {
00029 
00033 SQInteger display(HSQUIRRELVM vm) __custom("t.");
00034 
00038 void print_stacktrace(HSQUIRRELVM vm);
00039 
00043 SQInteger get_current_thread(HSQUIRRELVM vm) __custom("t");
00044 
00048 void display_text_file(const std::string& filename);
00049 
00053 void load_worldmap(const std::string& filename);
00054 
00058 void load_level(const std::string& filename);
00059 
00063 void wait(HSQUIRRELVM vm, float seconds) __suspend;
00064 
00068 void wait_for_screenswitch(HSQUIRRELVM vm) __suspend;
00069 
00074 void exit_screen();
00075 
00079 void fadeout_screen(float seconds);
00080 
00085 void shrink_screen(float dest_x, float dest_y, float seconds);
00086 
00091 void abort_screenfade();
00092 
00097 std::string translate(const std::string& text);
00098 
00103 void import(HSQUIRRELVM v, const std::string& filename);
00104 
00108 void save_state();
00109 
00113 void update_worldmap();
00114 
00118 void debug_collrects(bool enable);
00119 
00123 void debug_show_fps(bool enable);
00124 
00128 void debug_draw_solids_only(bool enable);
00129 
00133 void debug_draw_editor_images(bool enable);
00134 
00138 void debug_worldmap_ghost(bool enable);
00139 
00143 void play_music(const std::string& musicfile);
00144 
00148 void play_sound(const std::string& soundfile);
00149 
00153 void set_game_speed(float speed);
00154 
00158 void grease();
00159 
00163 void invincible();
00164 
00168 void ghost();
00169 
00173 void mortal();
00174 
00178 void restart();
00179 
00183 void whereami();
00184 
00188 void gotoend();
00189 
00193 void camera();
00194 
00198 void set_gamma(float gamma);
00199 
00203 void quit();
00204 
00208 int rand();
00209 
00213 void record_demo(const std::string& filename);
00214 
00218 void play_demo(const std::string& filename);
00219 
00220 } // namespace scripting
00221 
00222 #endif
00223 
00224 /* EOF */

Generated on Mon Jun 9 03:38:20 2014 for SuperTux by  doxygen 1.5.1