activate(LEFT);
}
} } else {
- if(start_position.x > 0 && start_position.x <= screen->w
- && start_position.y > 0 && start_position.y <= screen->h)
+ if(start_position.x >= 0 && start_position.x < screen->w
+ && start_position.y >= 0 && start_position.y < screen->h)
activate(LEFT);
}
}
Surface*
BadGuy::get_image()
{
+// Set action as the "default" one.
+specs->sprite->set_action("left");
+if(BAD_JUMPY)
+ specs->sprite->set_action("left-up");
+else if(kind == BAD_BOMB)
+ specs->sprite->set_action("ticking-left");
+else if(kind == BAD_FLAME)
+ specs->sprite->set_action("normal");
+else if(kind == BAD_STALACTITE)
+ specs->sprite->set_action("normal");
+else if(kind == BAD_FISH)
+ specs->sprite->set_action("normal");
+else if(kind == BAD_FLAMEFISH)
+ specs->sprite->set_action("normal");
+
return specs->sprite->get_frame(0);
}
}
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);
+// badguy.activate(LEFT);
Surface *img = badguy.get_image();
tiles_board->add_button(Button(img, "", SDLKey(SDLK_1+i)), -(i+1));
{
BadGuyKind kind = BadGuyKind((-id)-1);
BadGuy badguy(kind, 0,0);
- badguy.activate(LEFT);
+// badguy.activate(LEFT);
Surface *img = badguy.get_image();
context.draw_surface(img, Vector(event.button.x - 8,
for(Sector::GameObjects::iterator i = sector->gameobjects.begin(); i != sector->gameobjects.end(); i++)
{
BadGuy* badguy = dynamic_cast<BadGuy*> (*i);
- if(badguy)
- badguy->activate(LEFT);
+// if(badguy)
+// badguy->activate(LEFT);
TileMap* tilemap = dynamic_cast<TileMap*> (*i);
if(tilemap)