base.x = base.x - base.xm * frame_ratio;
}
-
/* Move vertically: */
-
base.y = base.y + base.ym * frame_ratio;
if (dying != DYING_FALLING)
}
/* Fall if we get off the ground: */
-
if (dying != DYING_FALLING)
{
if (!issolid(base.x+16, base.y + 32))
base.ym = physic_get_velocity(&physic);
}
+ // BadGuy fall below the ground
if (base.y > screen->h)
bad_guys.erase(static_cast<std::vector<BadGuy>::iterator>(this));
}
void BadGuy::action_laptop()
{
- /* --- LAPTOP MONSTER: --- */
-
/* Move left/right: */
-
if (mode == NORMAL || mode == KICK)
{
if (dying == DYING_NOT ||
/* Move vertically: */
-
if(mode != HELD)
base.y = base.y + base.ym * frame_ratio;
}
-
/* Fall if we get off the ground: */
-
if (dying != DYING_FALLING)
{
if (!issolid(base.x+16, base.y + 32))
void BadGuy::action_money()
{
- /* --- MONEY BAGS: --- */
-
-
/* Move vertically: */
-
base.y = base.y + base.ym * frame_ratio;
if (dying != DYING_FALLING)
std::vector<upgrade_type> upgrades;
std::vector<bullet_type> bullets;
Player tux;
-texture_type img_box_full, img_box_empty, img_mints, img_coffee, img_super_bkgd, img_red_glow;
+texture_type img_box_full;
+texture_type img_box_empty;
+texture_type img_mints;
+texture_type img_coffee;
+texture_type img_super_bkgd;
+texture_type img_red_glow;
timer_type time_left;
double frame_ratio;
-/* Initialize all 'dynamic' arrays */
void arrays_init(void)
{
}
-/* Free memory of 'dynamic' arrays */
void arrays_free(void)
{
bad_guys.clear();
set_current_music(LEVEL_MUSIC);
}
-/* Add score: */
-
void add_score(float x, float y, int s)
{
- /* Add the score: */
-
score += s;
floating_score_type new_floating_score;
floating_scores.push_back(new_floating_score);
}
-/* Add a bouncy distro: */
-
void add_bouncy_distro(float x, float y)
{
bouncy_distros.push_back(new_bouncy_distro);
}
-
-/* Add broken brick pieces: */
-
void add_broken_brick(float x, float y)
{
add_broken_brick_piece(x, y, -1, -4);
add_broken_brick_piece(x + 16, y + 16, 1.5, -3);
}
-
-/* Add a broken brick piece: */
-
void add_broken_brick_piece(float x, float y, float xm, float ym)
{
broken_brick_type new_broken_brick;
broken_bricks.push_back(new_broken_brick);
}
-
-/* Add a bouncy brick piece: */
-
void add_bouncy_brick(float x, float y)
{
bouncy_brick_type new_bouncy_brick;
bouncy_bricks.push_back(new_bouncy_brick);
}
-
-/* Add a bad guy: */
-
void add_bad_guy(float x, float y, BadGuyKind kind)
{
BadGuy new_bad_guy;
bad_guys.push_back(new_bad_guy);
}
-/* Add an upgrade: */
-
void add_upgrade(float x, float y, int dir, int kind)
{
upgrade_type new_upgrade;
upgrades.push_back(new_upgrade);
}
-/* Add a bullet: */
-
void add_bullet(float x, float y, float xm, int dir)
{
bullet_type new_bullet;
play_sound(sounds[SND_SHOOT], SOUND_CENTER_SPEAKER);
}
+// EOF //
+