#include "object/player.hpp"
#include "scripting/level_time.hpp"
#include "scripting/squirrel_util.hpp"
-#include "supertux/main.hpp"
+#include "supertux/globals.hpp"
#include "supertux/object_factory.hpp"
#include "supertux/resources.hpp"
#include "supertux/sector.hpp"
static const float TIME_WARNING = 20;
LevelTime::LevelTime(const Reader& reader) :
+ time_surface(),
running(true),
time_left(0)
{
LevelTime::expose(HSQUIRRELVM vm, SQInteger table_idx)
{
if (name.empty()) return;
- Scripting::LevelTime* interface = new Scripting::LevelTime(this);
+ scripting::LevelTime* interface = new scripting::LevelTime(this);
expose_object(vm, table_idx, interface, name, true);
}
LevelTime::unexpose(HSQUIRRELVM vm, SQInteger table_idx)
{
if (name.empty()) return;
- Scripting::unexpose_object(vm, table_idx, name);
+ scripting::unexpose_object(vm, table_idx, name);
}
void
Surface* time_surf = time_surface.get();
if (time_surf) {
- float all_width = time_surf->get_width() + normal_font->get_text_width(time_text);
+ float all_width = time_surf->get_width() + Resources::normal_font->get_text_width(time_text);
context.draw_surface(time_surf, Vector((SCREEN_WIDTH - all_width)/2, BORDER_Y + 1), LAYER_FOREGROUND1);
- context.draw_text(normal_font, time_text, Vector((SCREEN_WIDTH - all_width)/2 + time_surf->get_width(), BORDER_Y), ALIGN_LEFT, LAYER_FOREGROUND1, LevelTime::text_color);
+ context.draw_text(Resources::normal_font, time_text, Vector((SCREEN_WIDTH - all_width)/2 + time_surf->get_width(), BORDER_Y), ALIGN_LEFT, LAYER_FOREGROUND1, LevelTime::text_color);
}
}