X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fconsole.hpp;h=1194a7fe43a8317aa82a38700eec653cca064873;hb=2bfc38ef3208dee885452cfa59a7c7df671eb24d;hp=fd728dfbdfb9e4f6cd4e14b552222266322ac2db;hpb=0b60c77a1a01e753919be95aafc22ee38a0fcb62;p=supertux.git diff --git a/src/console.hpp b/src/console.hpp index fd728dfbd..1194a7fe4 100644 --- a/src/console.hpp +++ b/src/console.hpp @@ -1,5 +1,5 @@ -// $Id: worldmap.hpp 3209 2006-04-02 22:19:22Z sommer $ -// +// $Id$ +// // SuperTux - Console // Copyright (C) 2006 Christoph Sommer // @@ -12,7 +12,7 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -26,12 +26,14 @@ #include #include #include +#include class Console; class ConsoleStreamBuffer; class ConsoleCommandReceiver; class DrawingContext; class Surface; +class Font; class Console { @@ -44,6 +46,8 @@ public: static std::ostream input; /**< stream of keyboard input to send to the console. Do not forget to send std::endl or to flush the stream. */ static std::ostream output; /**< stream of characters to output to the console. Do not forget to send std::endl or to flush the stream. */ + void init_graphics(); + void backspace(); /**< delete last character sent to the input stream */ void scroll(int offset); /**< scroll console text up or down by @c offset lines */ void autocomplete(); /**< autocomplete current command */ @@ -86,11 +90,17 @@ private: std::auto_ptr background; /**< console background image */ std::auto_ptr background2; /**< second, moving console background image */ + + HSQUIRRELVM vm; /**< squirrel thread for the console (with custom roottable */ + HSQOBJECT vm_object; int backgroundOffset; /**< current offset of scrolling background image */ float height; /**< height of the console in px */ + float alpha; int offset; /**< decrease to scroll text up */ bool focused; /**< true if console has input focus */ + std::auto_ptr font; + float fontheight; /**< height of the font (this is a separate var, because the font could not be initialized yet but is needed in the addLine message */ float stayOpen;