}
for(int i = 0; i < NUM_BadGuyKinds; i++)
{
+ // filter bomb, since it is only for internal use, not for levels
+ if(i == BAD_BOMB)
+ continue;
+
BadGuyKind kind = BadGuyKind(i);
BadGuy badguy(kind, 0,0);
badguy.activate(LEFT);
(*i)->draw(context);
context.pop_transform();
+ continue;
}
Background* background = dynamic_cast<Background*> (*i);
if(background)
{ // don't resize background
context.push_transform();
- context.set_translation(scroll);
context.set_zooming(1.0);
(*i)->draw(context);
context.pop_transform();
GameSession session(level_filename, ST_GL_TEST);
session.run();
// player_status.reset();
-sound_manager->halt_music();
+if(sound_manager)
+ sound_manager->halt_music();
}
void LevelEditor::change(int x, int y, int newtile, int layer)
else if(newtile == OBJ_DOOR)
sector->add_object(new Door(x, y));
else
- sector->add_object(new BadGuy(BadGuyKind((-newtile)-1), x, y));
+ sector->add_bad_guy(x, y, BadGuyKind((-newtile)-1), true);
sector->update_game_objects();
}
context.draw_text(blue_text, _("- Level Editor's Help -"), Vector(screen->w/2, 60), CENTER_ALLIGN, LAYER_GUI);
- context.draw_text(white_small_text, *text[i], Vector(/*20*/screen->w/2, 120), CENTER_ALLIGN, LAYER_GUI);
+ context.draw_text(white_small_text, *text[i], Vector(20, 120), LEFT_ALLIGN, LAYER_GUI);
sprintf(str,_("Press any key to continue - Page %d/%d"), i+1, sizeof(text) / sizeof(text[0]));
context.draw_text(gold_text, str, Vector(screen->w/2, screen->h-60), CENTER_ALLIGN, LAYER_GUI);