reader.get("x", start_position.x);
reader.get("y", start_position.y);
//This is for a hidden badguy :)
- bool fluffy = false;
+ fluffy = false;
reader.get("fluffy",fluffy);
bbox.set_size(31.8, 31.8);
if (fluffy) sprite = sprite_manager->create("fluffy");
writer.write_float("y", start_position.y);
if (fluffy) { // don't give us away at every snowball
- writer.write_bool("fluffy", true)
+ writer.write_bool("fluffy", true);
}
writer.end_list("snowball");
bool collision_squished(Player& player);
bool set_direction;
Direction initial_direction;
+ bool fluffy;
};
#endif
}
void
-Yeti::write(lisp::Writer& )
+Yeti::write(lisp::Writer& writer)
{
writer.start_list("yeti");
end_y = int(bbox.p2.y / grid.cell_height) + 2;
if(end_y > (int) grid.cells_y)
end_y = grid.cells_y;
+
+ timestamp = grid.iterator_timestamp++;
+ entry = 0;
if(start_x >= end_x) {
printf("bad region.\n");
end_y = 0;
return;
}
-
- timestamp = grid.iterator_timestamp++;
- entry = 0;
}
MovingObject* next()
Path::Path(const lisp::Lisp& reader)
{
forward = true;
- float x,y;
+ float x = 0, y = 0;
lisp::ListIterator iter(&reader);
bonus = NO_BONUS;
}
}
- bool val;
+ bool val = false;
if(lisp.get("key-brass", val) && val == true)
set_keys(KEY_BRASS);
if(lisp.get("key-iron", val) && val == true)
song_title = "chipdisko.ogg";
reader.get("music", song_title);
- int width, height = 15;
+ int width = 30, height = 15;
reader.get("width", width);
reader.get("height", height);
throw std::runtime_error("Missing tile-id.");
}
- bool value;
+ bool value = false;
if(reader.get("solid", value) && value)
attributes |= SOLID;
if(reader.get("unisolid", value) && value)
const lisp::Lisp* ptr = cur->get_cdr();
std::string file;
- float x, y, w, h;
+ float x = 0, y = 0, w = 0, h = 0;
ptr->get_car()->get(file); ptr = ptr->get_cdr();
ptr->get_car()->get(x); ptr = ptr->get_cdr();
ptr->get_car()->get(y); ptr = ptr->get_cdr();
\r
ScriptTrigger::ScriptTrigger(const lisp::Lisp& reader)\r
{\r
- bool must_activate;\r
+ bool must_activate = false;\r
\r
reader.get("x", bbox.p1.x);\r
reader.get("y", bbox.p1.y);\r
- float w, h;\r
+ float w = 0, h = 0;\r
reader.get("width", w);\r
reader.get("height", h);\r
bbox.set_size(w, h);\r
{
reader.get("x", bbox.p1.x);
reader.get("y", bbox.p1.y);
- float w, h;
+ float w = 0, h = 0;
reader.get("width", w);
reader.get("height", h);
bbox.set_size(w, h);