if (draw_dead_script_hint) {
Vector ppos = Vector(systemRandom.randf(bbox.p1.x+8, bbox.p2.x-8), bbox.p2.y);
Vector pspeed = Vector(0, -100);
- Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.6, .2, .2), 3, .1, LAYER_OBJECTS+1));
+ Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.6f, .2f, .2f), 3, .1f, LAYER_OBJECTS+1));
}
}
}
sprite->set_action(dir == LEFT ? "idle-left" : "idle-right");
set_group(COLGROUP_DISABLED);
- if (initial_delay == 0) initial_delay = 0.1;
+ if (initial_delay == 0) initial_delay = 0.1f;
fire_timer.start(initial_delay);
}
void
Flame::active_update(float elapsed_time)
{
- angle = fmodf(angle + elapsed_time * speed, 2*M_PI);
+ angle = fmodf(angle + elapsed_time * speed, (float) (2*M_PI));
Vector newpos(start_position.x + cos(angle) * radius,
start_position.y + sin(angle) * radius);
movement = newpos - get_pos();
#include "random_generator.hpp"
#include "object/sprite_particle.hpp"
-static const float FLYTIME = 1.0;
-static const float FLYSPEED = -100.0;
+static const float FLYTIME = 1.0f;
+static const float FLYSPEED = -100.0f;
namespace {
- const float PUFF_PROBABILITY = 0.1; /**< chanche of puffs being spawned in the current cycle */
- const float PUFF_INTERVAL_MIN = 0.1; /**< spawn new puff of smoke at most that often */
- const float PUFF_INTERVAL_MAX = 1.1; /**< spawn new puff of smoke at least that often */
+ const float PUFF_PROBABILITY = 0.1f; /**< chanche of puffs being spawned in the current cycle */
+ const float PUFF_INTERVAL_MIN = 0.1f; /**< spawn new puff of smoke at most that often */
+ const float PUFF_INTERVAL_MAX = 1.1f; /**< spawn new puff of smoke at least that often */
}
FlyingSnowBall::FlyingSnowBall(const lisp::Lisp& reader)
{
if (!dying) {
sprite->set_action("pop");
- lifetime.start(0.2);
+ lifetime.start(0.2f);
dying = true;
}
else remove_me();
#include "log.hpp"
#include "level.hpp"
-static const float IDLE_TIME = 0.2; /**< time to wait before and after throwing */
-static const float THROW_TIME = 4.6; /**< time to spend throwing */
+static const float IDLE_TIME = 0.2f; /**< time to wait before and after throwing */
+static const float THROW_TIME = 4.6f; /**< time to spend throwing */
static const float THROW_INTERVAL = 1; /**< time between two thrown rocks */
static const float THROW_VELOCITY = 400; /**< initial velocity of thrown rocks */
physic.set_velocity_x(dir == LEFT ? -KICKSPEED : KICKSPEED);
sprite->set_action(dir == LEFT ? "flat-left" : "flat-right");
// we should slide above 1 block holes now...
- bbox.set_size(34, 31.8);
+ bbox.set_size(34, 31.8f);
break;
case ICESTATE_GRABBED:
flat_timer.stop();
} else if(hit.left || hit.right) {
sprite->set_action(dir == LEFT ? "collision-left" : "collision-right");
physic.set_velocity_x(0);
- collision_timer.start(0.2, true);
+ collision_timer.start(0.2f, true);
}
}
namespace {
const float VERTICAL_SPEED = -450; /**< y-speed when jumping */
const float HORIZONTAL_SPEED = 220; /**< x-speed when jumping */
- const float MIN_RECOVER_TIME = 0.1; /**< minimum time to stand still before starting a (new) jump */
- const float MAX_RECOVER_TIME = 1.0; /**< maximum time to stand still before starting a (new) jump */
+ const float MIN_RECOVER_TIME = 0.1f; /**< minimum time to stand still before starting a (new) jump */
+ const float MAX_RECOVER_TIME = 1.0f; /**< maximum time to stand still before starting a (new) jump */
static const std::string HOP_SOUND = "sounds/hop.ogg";
}
physic.set_velocity_y(0);
// start a timer to delay addition of upward movement until we are (hopefully) out from under the player
- kicked_delay_timer.start(0.05);
+ kicked_delay_timer.start(0.05f);
}
bool
#include "spidermite.hpp"
-static const float FLYTIME = 1.2;
-static const float FLYSPEED = -100.0;
+static const float FLYTIME = 1.2f;
+static const float FLYSPEED = -100.0f;
SpiderMite::SpiderMite(const lisp::Lisp& reader)
: BadGuy(reader, "images/creatures/spidermite/spidermite.sprite")
#include "random_generator.hpp"
static const int SHAKE_RANGE_X = 40;
-static const float SHAKE_TIME = .8;
+static const float SHAKE_TIME = .8f;
static const float SQUISH_TIME = 2;
static const float SHAKE_RANGE_Y = 400;
Yeti::drop_stalactite()
{
// make a stalactite falling down and shake camera a bit
- Sector::current()->camera->shake(.1, 0, 10);
+ Sector::current()->camera->shake(.1f, 0, 10);
YetiStalactite* nearest = 0;
float dist = FLT_MAX;
#include "yeti_stalactite.hpp"
-static const float SHAKE_TIME = .8;
+static const float SHAKE_TIME = .8f;
YetiStalactite::YetiStalactite(const lisp::Lisp& lisp)
: Stalactite(lisp)
#define __BINRELOC_C__
// [Christoph] use config.h, which defines ENABLE_BINRELOC
-#include "config.h"
+#include <config.h>
#ifdef ENABLE_BINRELOC
#include <sys/types.h>
#ifndef __BINRELOC_H__
#define __BINRELOC_H__
-// [Christoph] use config.h, which defines ENABLE_BINRELOC
-#include "config.h"
-
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
c /= nval;
}
- static const float DELTA = .0001;
+ static const float DELTA = .0001f;
}
bool rectangle_aatriangle(Constraints* constraints, const Rect& rect,
std::cout << "Norm: " << normal << " Depth: " << depth << "\n";
#endif
- Vector outvec = normal * (depth + 0.2);
+ Vector outvec = normal * (depth + 0.2f);
const float RDELTA = 3;
if(p1.x < area.p1.x - RDELTA || p1.x > area.p2.x + RDELTA
{
context.draw_filled_rect(
Vector(0,0), Vector(SCREEN_WIDTH, SCREEN_HEIGHT),
- Color(.2, .2, .2, .5), LAYER_FOREGROUND1);
+ Color(.2f, .2f, .2f, .5f), LAYER_FOREGROUND1);
}
void
end_sequence->start();
sound_manager->play_music("music/leveldone.ogg", false);
- currentsector->player->invincible_timer.start(7.3);
+ currentsector->player->invincible_timer.start(7.3f);
// Stop all clocks.
for(std::vector<GameObject*>::iterator i = currentsector->gameobjects.begin();
#include "timer.hpp"
#include "control/joystickkeyboardcontroller.hpp"
-static const float MENU_REPEAT_INITIAL = 0.4;
-static const float MENU_REPEAT_RATE = 0.2;
-static const float FLICK_CURSOR_TIME = 0.5;
+static const float MENU_REPEAT_INITIAL = 0.4f;
+static const float MENU_REPEAT_RATE = 0.2f;
+static const float FLICK_CURSOR_TIME = 0.5f;
extern SDL_Surface* screen;
}
if(background == NULL)
- context.draw_gradient(Color(0.8, 0.95, 0.85), Color(0.8, 0.8, 0.8),
+ context.draw_gradient(Color(0.8f, 0.95f, 0.85f), Color(0.8f, 0.8f, 0.8f),
LAYER_BACKGROUND0);
else
context.draw_surface(background, Vector(0,0), LAYER_BACKGROUND0);
c = 0;
bufend = 0;
nextChar();
- } catch(EOFException& e) {
+ } catch(EOFException& ) {
}
}
{
if(type != TYPE_REAL) {
if(type == TYPE_INTEGER) {
- val = v.integer;
+ val = (float) v.integer;
return true;
}
return false;
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <dirent.h>
#include <unistd.h>
#include <assert.h>
#include <physfs.h>
}
#endif
+#ifdef _WIN32
+ PHYSFS_addToSearchPath(".\\data", 1);
+#endif
+
if(!sourcedir) {
#if defined(APPDATADIR) || defined(ENABLE_BINRELOC)
std::string datadir;
#include <math.h>
#include <stdexcept>
#include <iostream>
+#include <limits>
#include "ambient_sound.hpp"
#include "object_factory.hpp"
// set default silence_distance
if (distance_factor == 0)
- silence_distance = 10e99;
+ silence_distance = std::numeric_limits<float>::max();
else
silence_distance = 1/distance_factor;
// set default silence_distance
if (distance_factor == 0)
- silence_distance = 10e99;
+ silence_distance = std::numeric_limits<float>::max();
else
silence_distance = 1/distance_factor;
sound_source->set_gain(0);
sound_source->set_looping(true);
- currentvolume=targetvolume=1e-20;
+ currentvolume=targetvolume=1e-20f;
sound_source->play();
} catch(std::exception& e) {
log_warning << "Couldn't play '" << sample << "': " << e.what() << "" << std::endl;
// rise/fall half life?
currentvolume*=pow(rise,deltat*10);
- currentvolume += 1e-6; // volume is at least 1e-6 (0 would never rise)
+ currentvolume += 1e-6f; // volume is at least 1e-6 (0 would never rise)
if (sound_source != 0) {
#include "lisp/list_iterator.hpp"
#include "object_factory.hpp"
-static const float BOUNCY_BRICK_MAX_OFFSET=8;
-static const float BOUNCY_BRICK_SPEED=90;
-static const float EPSILON = .0001;
+static const float BOUNCY_BRICK_MAX_OFFSET = 8;
+static const float BOUNCY_BRICK_SPEED = 90;
+static const float EPSILON = .0001f;
Block::Block(Sprite* newsprite)
: sprite(newsprite), bouncing(false), breaking(false), bounce_dir(0), bounce_offset(0)
{
- bbox.set_size(32, 32.1);
+ bbox.set_size(32, 32.1f);
set_group(COLGROUP_STATIC);
sound_manager->preload("sounds/upgrade.wav");
sound_manager->preload("sounds/brick.wav");
mode = SCROLLTO;
}
-static const float EPSILON = .00001;
+static const float EPSILON = .00001f;
static const float max_speed_y = 140;
void
EndSequence::starting()
{
last_x_pos = -1;
- endsequence_timer.start(7.3);
+ endsequence_timer.start(7.3f);
}
void
Fireworks::Fireworks()
{
- timer.start(.2);
+ timer.start(.2f);
sound_manager->preload("sounds/fireworks.wav");
}
(void) red;
(void) green;
sector->add_object(new Particles(pos, 0, 360, Vector(140, 140),
- Vector(0, 0), 45, Color(red, green, 0), 3, 1.3,
+ Vector(0, 0), 45, Color(red, green, 0), 3, 1.3f,
LAYER_FOREGROUND1+1));
sound_manager->play("sounds/fireworks.wav");
timer.start(systemRandom.randf(1.0, 1.5));
BouncyCoin::BouncyCoin(const Vector& pos)
: position(pos)
{
- timer.start(.3);
+ timer.start(.3f);
sprite = sprite_manager->create("images/objects/coin/coin.sprite");
sprite->set_action("still");
}
const Vector& pos, const Vector& nmovement)
: sprite(new Sprite(*nsprite)), position(pos), movement(nmovement)
{
- timer.start(.2);
+ timer.start(.2f);
}
BrokenBrick::~BrokenBrick()
FloatingText::FloatingText(const Vector& pos, const std::string& text_)
: position(pos), text(text_)
{
- timer.start(.1);
+ timer.start(.1f);
position.x -= text.size() * 8;
}
FloatingText::FloatingText(const Vector& pos, int score)
: position(pos)
{
- timer.start(.1);
+ timer.start(.1f);
// turn int into a string
char str[10];
SmokeCloud::SmokeCloud(const Vector& pos)
: position(pos)
{
- timer.start(.3);
+ timer.start(.3f);
sprite = sprite_manager->create("images/objects/particles/stomp.sprite");
}
#include "main.hpp"
namespace {
- const float MIN_INTENSITY = 0.8;
- const float ALPHA_SOLID = 0.7;
- const float ALPHA_NONSOLID = 0.3;
- const float MIN_SOLIDTIME = 1.0;
- const float SWITCH_DELAY = 0.1; /**< seconds to wait for stable conditions until switching solidity */
+ const float MIN_INTENSITY = 0.8f;
+ const float ALPHA_SOLID = 0.7f;
+ const float ALPHA_NONSOLID = 0.3f;
+ const float MIN_SOLIDTIME = 1.0f;
+ const float SWITCH_DELAY = 0.1f; /**< seconds to wait for stable conditions until switching solidity */
}
MagicBlock::MagicBlock(const lisp::Lisp& lisp)
anchor_delta = (particle->anchorx - particle->pos.x);
particle->wobble += (4 * anchor_delta * 0.05) + systemRandom.randf(-0.5, 0.5);
- particle->wobble *= 0.99;
+ particle->wobble *= 0.99f;
particle->anchorx += particle->drift_speed * elapsed_time;
}
}
#include "object/sprite_particle.hpp"
static const int TILES_FOR_BUTTJUMP = 3;
-static const float SHOOTING_TIME = .150;
+static const float SHOOTING_TIME = .150f;
/// time before idle animation starts
-static const float IDLE_TIME = 2.5;
+static const float IDLE_TIME = 2.5f;
static const float WALK_ACCELERATION_X = 300;
static const float RUN_ACCELERATION_X = 400;
static const float SKID_XM = 200;
-static const float SKID_TIME = .3;
+static const float SKID_TIME = .3f;
static const float MAX_WALK_XM = 230;
static const float MAX_RUN_XM = 320;
static const float WALK_SPEED = 100;
-static const float KICK_TIME = .3;
-static const float CHEER_TIME = 1;
+static const float KICK_TIME = .3f;
+static const float CHEER_TIME = 1.0f;
-static const float UNDUCK_HURT_TIME = 0.25; /**< if Tux cannot unduck for this long, he will get hurt */
+static const float UNDUCK_HURT_TIME = 0.25f; /**< if Tux cannot unduck for this long, he will get hurt */
// growing animation
Surface* growingtux_left[GROWING_FRAMES];
Player::init()
{
if(is_big())
- set_size(31.8, 62.8);
+ set_size(31.8f, 62.8f);
else
- set_size(31.8, 30.8);
+ set_size(31.8f, 30.8f);
dir = RIGHT;
old_dir = dir;
if(fabsf(physic.get_velocity_x()) > MAX_WALK_XM) {
set_width(34);
} else {
- set_width(31.8);
+ set_width(31.8f);
}
// on downward slopes, adjust vertical velocity so tux walks smoothly down
new Particles(
Vector(dir == RIGHT ? get_bbox().p2.x : get_bbox().p1.x, get_bbox().p2.y),
dir == RIGHT ? 270+20 : 90-40, dir == RIGHT ? 270+40 : 90-20,
- Vector(280, -260), Vector(0, 300), 3, Color(.4, .4, .4), 3, .8,
+ Vector(280, -260), Vector(0, 300), 3, Color(.4f, .4f, .4f), 3, .8f,
LAYER_OBJECTS+1));
ax *= 2.5;
if (!on_ground())
return;
- if (adjust_height(31.8)) {
+ if (adjust_height(31.8f)) {
duck = true;
unduck_hurt_timer.stop();
} else {
if (backflipping)
return;
- if (adjust_height(63.8)) {
+ if (adjust_height(63.8f)) {
duck = false;
unduck_hurt_timer.stop();
} else {
backflipping = true;
do_jump(-580);
sound_manager->play("sounds/flip.wav");
- backflip_timer.start(0.15);
+ backflip_timer.start(0.15f);
}
void
Player::set_bonus(BonusType type, bool animate)
{
if(player_status->bonus == NO_BONUS) {
- if (!adjust_height(62.8)) {
+ if (!adjust_height(62.8f)) {
printf("can't adjust\n");
return false;
}
floor_normal = hit.slope_normal;
} else if(hit.top) {
if(physic.get_velocity_y() < 0)
- physic.set_velocity_y(.2);
+ physic.set_velocity_y(.2f);
}
if(hit.left || hit.right) {
} else if(player_status->bonus == GROWUP_BONUS) {
//growing_timer.start(GROWING_TIME);
safe_timer.start(TUX_SAFE_TIME /* + GROWING_TIME */);
- adjust_height(30.8);
+ adjust_height(30.8f);
duck = false;
set_bonus(NO_BONUS, true);
} else if(player_status->bonus == NO_BONUS) {
growing_timer.stop();
safe_timer.start(TUX_SAFE_TIME);
- adjust_height(30.8);
+ adjust_height(30.8f);
duck = false;
}
} else {
// TODO: do we need the following? Seems irrelevant to moving the player
if(is_big())
- set_size(31.8, 63.8);
+ set_size(31.8f, 63.8f);
else
- set_size(31.8, 31.8);
+ set_size(31.8f, 31.8f);
duck = false;
last_ground_y = vector.y;
class Portable;
/* Times: */
-static const float TUX_SAFE_TIME = 1.8;
-static const float TUX_INVINCIBLE_TIME = 10.0;
-static const float TUX_INVINCIBLE_TIME_WARNING = 2.0;
-static const float GROWING_TIME = 0.35;
+static const float TUX_SAFE_TIME = 1.8f;
+static const float TUX_INVINCIBLE_TIME = 10.0f;
+static const float TUX_INVINCIBLE_TIME_WARNING = 2.0f;
+static const float GROWING_TIME = 0.35f;
static const int GROWING_FRAMES = 7;
class Camera;
// 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.
+#include <config.h>
#include "rainsplash.hpp"
#include "sector.hpp"
if(physic.get_velocity_y() > 0)
physic.set_velocity_y(0);
} else if(hit.top) {
- physic.set_velocity_y(.1);
+ physic.set_velocity_y(.1f);
}
if(hit.left || hit.right) {
#include "sprite/sprite.hpp"
#include "random_generator.hpp"
-static const float CRACKTIME = 0.3;
-static const float FALLTIME = 0.8;
+static const float CRACKTIME = 0.3f;
+static const float FALLTIME = 0.8f;
SkullTile::SkullTile(const lisp::Lisp& lisp)
: MovingSprite(lisp, "images/objects/skull_tile/skull_tile.sprite", LAYER_TILES, COLGROUP_STATIC), hit(false), falling(false)
// 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.
+#include <config.h>
#include <stdexcept>
#include "sprite_particle.hpp"
}
context.draw_filled_rect(Vector(125, 50), Vector(550, 120),
- Color(0.6, 0.7, 0.8, 0.5), LAYER_GUI-50);
+ Color(0.6f, 0.7f, 0.8f, 0.5f), LAYER_GUI-50);
if (centered) {
context.draw_center_text(font, text, Vector(0, 50+35), LAYER_GUI-40);
}
#include "log.hpp"
namespace {
- const float LIGHTNING_DELAY = 2.0;
- const float FLASH_DISPLAY_TIME = 0.1;
+ const float LIGHTNING_DELAY = 2.0f;
+ const float FLASH_DISPLAY_TIME = 0.1f;
}
Thunderstorm::Thunderstorm(const lisp::Lisp& reader)
#include <algorithm>
#include <iostream>
#include <stdexcept>
-#include <cmath>
+#include <math.h>
#include "tilemap.hpp"
#include "video/drawing_context.hpp"
// emit a particle
Vector ppos = Vector(systemRandom.randf(bbox.p1.x+8, bbox.p2.x-8), systemRandom.randf(bbox.p1.y+8, bbox.p2.y-8));
Vector pspeed = Vector(speed.x, speed.y);
- Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4, .4, .4), 3, .1, LAYER_BACKGROUNDTILES+1));
+ Sector::current()->add_object(new Particles(ppos, 44, 46, pspeed, Vector(0,0), 1, Color(.4f, .4f, .4f), 3, .1f, LAYER_BACKGROUNDTILES+1));
}
}
// Transliterated into C++ Allen King 060417, from sources on
// http://www.jbox.dk/sanos/source/lib/random.c.html
-
+#include <config.h>
#include <stdexcept>
+#include <time.h>
#include "random_generator.hpp"
#include "scripting/squirrel_util.hpp"
#include "scripting/camera.hpp"
#include "math/vector.hpp"
-#define NOIMPL log_fatal << __PRETTY_FUNCTION__ << " not implemented."
+#define NOIMPL log_fatal << __FUNCTION__ << " not implemented."
namespace Scripting
{
{ }
void
- Camera::shake(float , float , float )
+ Camera::shake(float speed, float x, float y)
{
- NOIMPL;
+ camera->shake(speed, x, y);
}
void
Camera::set_pos(float , float )
{
- NOIMPL;
}
void
// torch
if (tile->getID() == 1517) {
float pseudo_rnd = (float)((int)pos.x % 10) / 10;
- add_object(new PulsingLight(center, 1.0 + pseudo_rnd, 0.9, 1.0, Color(1.0, 1.0, 0.6, 1.0)));
+ add_object(new PulsingLight(center, 1.0f + pseudo_rnd, 0.9f, 1.0f, Color(1.0f, 1.0f, 0.6f, 1.0f)));
}
// lava or lavaflow
if ((tile->getID() == 173) || (tile->getID() == 1700) || (tile->getID() == 1705) || (tile->getID() == 1706)) {
&& (tm->get_tile(x, y-1)->getID() != tm->get_tile(x,y)->getID()))
|| ((x % 3 == 0) && (y % 3 == 0))) {
float pseudo_rnd = (float)((int)pos.x % 10) / 10;
- add_object(new PulsingLight(center, 1.0 + pseudo_rnd, 0.8, 1.0, Color(1.0, 0.3, 0.0, 1.0)));
+ add_object(new PulsingLight(center, 1.0f + pseudo_rnd, 0.8f, 1.0f, Color(1.0f, 0.3f, 0.0f, 1.0f)));
}
}
}
if(show_collrects) {
- Color col(0.2, 0.2, 0.2, 0.7);
+ Color col(0.2f, 0.2f, 0.2f, 0.7f);
for(MovingObjects::iterator i = moving_objects.begin();
i != moving_objects.end(); ++i) {
MovingObject* object = *i;
}
}
-static const float DELTA = .001;
+static const float DELTA = .001f;
void
Sector::collision_tilemap(collision::Constraints* constraints,
/** Set current frame */
void set_frame(int frame)
{
- this->frame = (frame % get_frames());
+ this->frame = (float) (frame % get_frames());
}
Surface* get_frame(unsigned int frame)
{
#include <assert.h>
#include <math.h>
#include <sstream>
+#include <limits>
#include "video/drawing_context.hpp"
#include "gettext.hpp"
#include "lisp/lisp.hpp"
from the Author.
*/
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <iconv.h>
#include <fstream>
#include <iostream>
+#include <algorithm>
#include <ctype.h>
#include <errno.h>
level->get("name", name);
return name;
} catch(std::exception& e) {
- log_warning << "Problem getting name of '" << filename << "'." << std::endl;
+ log_warning << "Problem getting name of '" << filename << "': "
+ << e.what() << std::endl;
return "";
}
}
void
TitleScreen::update(float elapsed_time)
{
- main_loop->set_speed(0.6);
+ main_loop->set_speed(0.6f);
Sector* sector = titlesession->get_current_sector();
sector->update(elapsed_time);
throw std::runtime_error("file is not a supertux-savegame.");
savegame->get("title", title);
- } catch(std::exception& e) {
+ } catch(std::exception& ) {
std::ostringstream slottitle;
slottitle << _("Slot") << " " << slot << " - " << _("Free");
return slottitle.str();
c = 0;
i++;
}
- ssize_t font_index;
+ int font_index;
// a non-printable character?
if(c == '\n') {
}
}
- if(font_index < 0 || font_index >= (ssize_t) char_count) {
+ if(font_index < 0 || font_index >= (int) char_count) {
log_debug << "Unsupported utf-8 character found" << std::endl;
font_index = 0;
}
sq_release(global_vm, &world_thread);
world_thread = create_thread(global_vm);
compile_and_run(object_to_vm(world_thread), in, filename);
- } catch(std::exception& e) {
+ } catch(std::exception& ) {
// fallback: try to load worldmap worldmap.stwm
using namespace WorldMapNS;
main_loop->push_screen(new WorldMap(basedir + "worldmap.stwm"));
{
static const float TUXSPEED = 200;
-static const float map_message_TIME = 2.8;
+static const float map_message_TIME = 2.8f;
Tux::Tux(WorldMap* worldmap_)
: worldmap(worldmap_)
// push world into worlds table
sq_createslot(vm, -3);
- } catch(std::exception& e) {
+ } catch(std::exception& ) {
sq_settop(vm, oldtop);
}