Procházet zdrojové kódy

Spawn fewer bonus items, try to center sprites despite no longer

having handle information in frames, and disable non-working
weapons (the homing missile and the bomb).

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/ttyvaders/trunk@3429 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam před 15 roky
rodič
revize
8fdb9773b5
4 změnil soubory, kde provedl 13 přidání a 12 odebrání
  1. +5
    -4
      src/aliens.c
  2. +2
    -2
      src/intro.c
  3. +5
    -5
      src/main.c
  4. +1
    -1
      src/player.c

+ 5
- 4
src/aliens.c Zobrazit soubor

@@ -51,15 +51,15 @@ void draw_aliens(game *g, aliens *al)
{
case ALIEN_FOO:
caca_set_frame(foo_sprite, al->img[i] % 5);
caca_blit(g->cv, al->x[i], al->y[i], foo_sprite, NULL);
caca_blit(g->cv, al->x[i] - 4, al->y[i] - 1, foo_sprite, NULL);
break;
case ALIEN_BAR:
caca_set_frame(bar_sprite, al->img[i] % 2);
caca_blit(g->cv, al->x[i], al->y[i], bar_sprite, NULL);
caca_blit(g->cv, al->x[i] - 2, al->y[i] - 1, bar_sprite, NULL);
break;
case ALIEN_BAZ:
caca_set_frame(baz_sprite, al->img[i] % 4);
caca_blit(g->cv, al->x[i], al->y[i], baz_sprite, NULL);
caca_blit(g->cv, al->x[i] - 2, al->y[i] - 1, baz_sprite, NULL);
break;
case ALIEN_NONE:
break;
@@ -78,7 +78,8 @@ void update_aliens(game *g, aliens *al)
{
add_explosion(g, g->ex, al->x[i], al->y[i], 0, 0, EXPLOSION_MEDIUM);
al->type[i] = ALIEN_NONE;
add_bonus(g, g->bo, al->x[i], al->y[i], caca_rand(0,4) ? BONUS_GREEN : BONUS_LIFE);
if(caca_rand(0, 10) == 0)
add_bonus(g, g->bo, al->x[i], al->y[i], caca_rand(0, 4) ? BONUS_GREEN : BONUS_LIFE);
}

/* Update coordinates */


+ 2
- 2
src/intro.c Zobrazit soubor

@@ -16,8 +16,8 @@

#include <stdlib.h>
#include <math.h>
#ifndef M_PI
# define M_PI 3.14159265358979323846
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
//#include <unistd.h>



+ 5
- 5
src/main.c Zobrazit soubor

@@ -168,8 +168,8 @@ static void start_game (game *g)
add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, 0, -32, WEAPON_LASER);
add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 0, -32, WEAPON_LASER);
/* Extra schtuph */
add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -24, -16, WEAPON_SEEKER);
add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 24, -16, WEAPON_SEEKER);
//add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -24, -16, WEAPON_SEEKER);
//add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 24, -16, WEAPON_SEEKER);
/* More schtuph */
add_weapon(g, g->wp, (g->p->x - 1) << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
add_weapon(g, g->wp, (g->p->x + 2) << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
@@ -177,10 +177,10 @@ static void start_game (game *g)
add_weapon(g, g->wp, g->p->x << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
add_weapon(g, g->wp, (g->p->x + 1) << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
/* Extra schtuph */
add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -32, 0, WEAPON_SEEKER);
add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 32, 0, WEAPON_SEEKER);
//add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -32, -32, WEAPON_SEEKER);
//add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 32, -32, WEAPON_SEEKER);
/* MORE SCHTUPH! */
add_weapon(g, g->wp, g->p->x << 4, g->p->y << 4, 0, -16, WEAPON_BOMB);
//add_weapon(g, g->wp, g->p->x << 4, g->p->y << 4, 0, -16, WEAPON_BOMB);
}
break;
}


+ 1
- 1
src/player.c Zobrazit soubor

@@ -53,7 +53,7 @@ void draw_player(game *g, player *p)
return;

caca_set_frame(ship_sprite, 0);
caca_blit(g->cv, p->x, p->y, ship_sprite, NULL);
caca_blit(g->cv, p->x - 2, p->y - 1, ship_sprite, NULL);
}

void update_player(game *g, player *p)


Načítá se…
Zrušit
Uložit