void Candle::save(lisp::Writer& writer) { MovingSprite::save(writer); writer.write("burning", burning); writer.write("flicker", flicker); writer.write("color", lightcolor.toVector(false)); }
void Spotlight::save(lisp::Writer& writer) { GameObject::save(writer); writer.write("x", position.x); writer.write("y", position.y); writer.write("color", color.toVector(false)); }
void SpawnPoint::save(lisp::Writer& writer){ writer.start_list("spawnpoint"); writer.write("x",pos.x); writer.write("y",pos.y); writer.write("name",name,false); writer.end_list("spawnpoint"); }
void Background::save(lisp::Writer& writer) { GameObject::save(writer); switch (alignment) { case LEFT_ALIGNMENT: writer.write("alignment", "left", false); break; case RIGHT_ALIGNMENT: writer.write("alignment", "right", false); break; case TOP_ALIGNMENT: writer.write("alignment", "top", false); break; case BOTTOM_ALIGNMENT: writer.write("alignment", "bottom", false); break; case NO_ALIGNMENT: break; } writer.write("scroll-offset-x", scroll_offset.x); writer.write("scroll-offset-y", scroll_offset.y); writer.write("scroll-speed-x", scroll_speed.x); writer.write("scroll-speed-y", scroll_speed.y); writer.write("speed", speed); if (speed_y != speed){ writer.write("speed_y", speed_y); } writer.write("image", imagefile, false); if (imagefile_top != "") { writer.write("image-top", imagefile_top); } if (imagefile_bottom != "") { writer.write("image-bottom", imagefile_bottom); } }
void BadGuy::save(lisp::Writer& writer) { MovingSprite::save(writer); if(dir == LEFT){ writer.write("direction", "left", false); } else { writer.write("direction", "right", false); } if(dead_script != ""){ writer.write("dead-script", dead_script, false); } }
void SecretAreaTrigger::save(lisp::Writer& writer) { MovingObject::save(writer); writer.write("width", bbox.get_width()); writer.write("height", bbox.get_height()); if (fade_tilemap != "") { writer.write("fade-tilemap", fade_tilemap, false); } writer.write("message", message, false); if (script != "") { writer.write("script", script, false); } }
void PlayerStatus::write(lisp::Writer& writer) { switch(bonus) { case NO_BONUS: writer.write("bonus", "none"); break; case GROWUP_BONUS: writer.write("bonus", "growup"); break; case FIRE_BONUS: writer.write("bonus", "fireflower"); break; case ICE_BONUS: writer.write("bonus", "iceflower"); break; default: log_warning << "Unknown bonus type." << std::endl; writer.write("bonus", "none"); } writer.write("fireflowers", max_fire_bullets); writer.write("iceflowers", max_ice_bullets); writer.write("coins", coins); }
void TileMap::save(lisp::Writer& writer) { GameObject::save(writer); if (draw_target == LIGHTMAP) { writer.write("draw-target", "lightmap", false); } else { writer.write("draw-target", "normal", false); } writer.write("width", width); writer.write("height", height); writer.write("speed", speed_x); if(speed_y != speed_x) { writer.write("speed", speed_y); } writer.write("solid", real_solid); writer.write("z-pos", z_pos); if(alpha != 1) { writer.write("alpha", alpha); } if(path) { path->save(writer); } writer.write("tiles", tiles); }
void Gradient::save(lisp::Writer& writer) { GameObject::save(writer); writer.write("z-pos",layer); switch (gradient_direction) { case HORIZONTAL: writer.write("direction", "horizontal" , false); break; case VERTICAL_SECTOR: writer.write("direction", "vertical_sector" , false); break; case HORIZONTAL_SECTOR: writer.write("direction", "horizontal_sector", false); break; case VERTICAL: break; } if(gradient_direction == HORIZONTAL || gradient_direction == HORIZONTAL_SECTOR) { writer.write("left_color" , gradient_top.toVector(false)); writer.write("right_color", gradient_bottom.toVector(false)); } else { writer.write("top_color" , gradient_top.toVector(false)); writer.write("bottom_color", gradient_bottom.toVector(false)); } }
void Door::save(lisp::Writer& writer) { MovingObject::save(writer); writer.write("sector", target_sector, false); writer.write("spawnpoint", target_spawnpoint, false); }
void GameObject::save(lisp::Writer& writer) { if(name != "") { writer.write("name", name, false); } }
void MagicBlock::save(lisp::Writer& writer) { MovingSprite::save(writer); writer.write("color", color.toVector(false)); }
void Owl::save(lisp::Writer& writer) { BadGuy::save(writer); writer.write("carry", carried_obj_name); }
void PushButton::save(lisp::Writer& writer) { MovingSprite::save(writer); writer.write("script", script, false); }
void MovingObject::save(lisp::Writer& writer) { GameObject::save(writer); writer.write("x", bbox.p1.x); writer.write("y", bbox.p1.y); }
void Thunderstorm::save(lisp::Writer& writer) { GameObject::save(writer); writer.write("running", running); writer.write("interval", interval); }
void LevelTime::save(lisp::Writer& writer) { GameObject::save(writer); writer.write("time", time_left); }