本文整理汇总了C++中lisp::Writer::write方法的典型用法代码示例。如果您正苦于以下问题:C++ Writer::write方法的具体用法?C++ Writer::write怎么用?C++ Writer::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lisp::Writer
的用法示例。
在下文中一共展示了Writer::write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
Candle::save(lisp::Writer& writer) {
MovingSprite::save(writer);
writer.write("burning", burning);
writer.write("flicker", flicker);
writer.write("color", lightcolor.toVector(false));
}
示例2:
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));
}
示例3:
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");
}
示例4: switch
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);
}
}
示例5:
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);
}
}
示例6:
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);
}
}
示例7: switch
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);
}
示例8:
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);
}
示例9: switch
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));
}
}
示例10:
void
Door::save(lisp::Writer& writer) {
MovingObject::save(writer);
writer.write("sector", target_sector, false);
writer.write("spawnpoint", target_spawnpoint, false);
}
示例11:
void
GameObject::save(lisp::Writer& writer) {
if(name != "") {
writer.write("name", name, false);
}
}
示例12:
void
MagicBlock::save(lisp::Writer& writer) {
MovingSprite::save(writer);
writer.write("color", color.toVector(false));
}
示例13:
void
Owl::save(lisp::Writer& writer) {
BadGuy::save(writer);
writer.write("carry", carried_obj_name);
}
示例14:
void
PushButton::save(lisp::Writer& writer) {
MovingSprite::save(writer);
writer.write("script", script, false);
}
示例15:
void
MovingObject::save(lisp::Writer& writer) {
GameObject::save(writer);
writer.write("x", bbox.p1.x);
writer.write("y", bbox.p1.y);
}