(fps 6)
(x-offset 0)
(y-offset 40)
- (images "creatures/nolok/walk-0.png"
- "creatures/nolok/walk-1.png"
- "creatures/nolok/walk-2.png"
- "creatures/nolok/walk-3.png"
- "creatures/nolok/walk-4.png"))
+ (images "creatures/dummyguy/walk-1.png"
+ "creatures/dummyguy/walk-2.png"))
(action
(name "right")
(name "stand")
(x-offset 0)
(y-offset 40)
- (images "creatures/nolok/walk-0.png"))
+ (images "creatures/dummyguy/stand.png"))
(action
(name "throw")
(fps 6)
(x-offset 0)
(y-offset 40)
- (images "creatures/nolok/throw-0.png"
- "creatures/nolok/throw-1.png"))
+ (images "creatures/dummyguy/throw.png"))
(action
(name "jump")
(x-offset 0)
(y-offset 40)
- (images "creatures/nolok/jump-0.png"
- "creatures/nolok/jump-1.png"
- "creatures/nolok/jump-2.png"))
+ (images "creatures/dummyguy/jump.png"))
(action
(name "dead")
--- /dev/null
+;; Generated by Flexlay Editor
+(supertux-level
+ (version 2)
+ (name (_ "SuperTux Intro"))
+ (author "SuperTux Team")
+ (sector
+ (name "main")
+ (music "theme.ogg")
+ (gravity 10.000000)
+ (tilemap
+ (layer "background")
+ (solid #f)
+ (speed 1.000000)
+ (width 25)
+ (height 20)
+ (tiles
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ ))
+ (tilemap
+ (layer "interactive")
+ (solid #t)
+ (speed 1.000000)
+ (width 25)
+ (height 20)
+ (tiles
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 122 209 209 123 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0
+ 0 0 122 123 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 1348 0 0 0
+ 0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 122 123 0 79 0 0 0
+ 0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 124 125 0 79 0 0 0
+ 0 0 1345 1344 0 0 0 0 0 0 0 0 1345 1346 1346 1344 0 0 1345 1344 0 1349 0 0 0
+ 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 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 0 1333 1334 1335 1336 0 0 0 0 0 0 0 0 0 1333 1334 1335 1336 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+ ))
+ (camera
+ (mode "normal")
+ )
+
+ (background
+ (image "semi_arctic.jpg")
+ (speed 0.500000)
+ )
+ (spawnpoint (name "main") (x 220) (y 416))
+ (particles-snow)
+
+ (scriptedobject
+ (name "PENNY")
+ (x 390)
+ (y 510)
+ (sprite "dummyguy")
+ )
+ (init-script "intro();")
+ )
+ )
+
+;; EOF ;;
: fading(0), fadetime(0), visible(false)
{
font = blue_text;
+ centered = false;
}
TextObject::~TextObject()
}
void
+TextObject::set_centered(bool centered)
+{
+ this->centered = centered;
+}
+
+void
TextObject::draw(DrawingContext& context)
{
context.push_transform();
context.draw_filled_rect(Vector(125, 50), Vector(550, 120),
Color(150, 180, 200, 125), LAYER_GUI-50);
- context.draw_text(font, text, Vector(125+35, 50+35), LEFT_ALLIGN, LAYER_GUI-40);
+ if (centered) {
+ context.draw_center_text(font, text, Vector(0, 50+35), LAYER_GUI-40);
+ }
+ else context.draw_text(font, text, Vector(125+35, 50+35), LEFT_ALLIGN, LAYER_GUI-40);
context.pop_transform();
}
return 0;
}
+static int Text_set_centered_wrapper(HSQUIRRELVM v)
+{
+ Scripting::Text* _this;
+ sq_getinstanceup(v, 1, (SQUserPointer*) &_this, 0);
+ SQBool arg0;
+ sq_getbool(v, 2, &arg0);
+
+ _this->set_centered(arg0);
+
+ return 0;
+}
+
static int Player_release_hook(SQUserPointer ptr, int )
{
Scripting::Player* _this = reinterpret_cast<Scripting::Player*> (ptr);
throw SquirrelError(v, msg.str());
}
+ sq_pushstring(v, "set_centered", -1);
+ sq_newclosure(v, &Text_set_centered_wrapper, 0);
+ if(SQ_FAILED(sq_createslot(v, -3))) {
+ std::ostringstream msg;
+ msg << "Couldn't register function'set_centered'";
+ throw SquirrelError(v, msg.str());
+ }
+
if(SQ_FAILED(sq_createslot(v, -3))) {
std::ostringstream msg;
msg << "Couldn't register class'Text'";