Changeset 3429


Ignore:
Timestamp:
Apr 29, 2009, 3:37:29 PM (8 years ago)
Author:
Sam Hocevar
Message:

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).

Location:
ttyvaders/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/src/aliens.c

    r3423 r3429  
    5252            case ALIEN_FOO:
    5353                caca_set_frame(foo_sprite, al->img[i] % 5);
    54                 caca_blit(g->cv, al->x[i], al->y[i], foo_sprite, NULL);
     54                caca_blit(g->cv, al->x[i] - 4, al->y[i] - 1, foo_sprite, NULL);
    5555                break;
    5656            case ALIEN_BAR:
    5757                caca_set_frame(bar_sprite, al->img[i] % 2);
    58                 caca_blit(g->cv, al->x[i], al->y[i], bar_sprite, NULL);
     58                caca_blit(g->cv, al->x[i] - 2, al->y[i] - 1, bar_sprite, NULL);
    5959                break;
    6060            case ALIEN_BAZ:
    6161                caca_set_frame(baz_sprite, al->img[i] % 4);
    62                 caca_blit(g->cv, al->x[i], al->y[i], baz_sprite, NULL);
     62                caca_blit(g->cv, al->x[i] - 2, al->y[i] - 1, baz_sprite, NULL);
    6363                break;
    6464            case ALIEN_NONE:
     
    7979            add_explosion(g, g->ex, al->x[i], al->y[i], 0, 0, EXPLOSION_MEDIUM);
    8080            al->type[i] = ALIEN_NONE;
    81             add_bonus(g, g->bo, al->x[i], al->y[i], caca_rand(0,4) ? BONUS_GREEN : BONUS_LIFE);
     81            if(caca_rand(0, 10) == 0)
     82                add_bonus(g, g->bo, al->x[i], al->y[i], caca_rand(0, 4) ? BONUS_GREEN : BONUS_LIFE);
    8283        }
    8384
  • ttyvaders/trunk/src/main.c

    r3424 r3429  
    169169                        add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 0, -32, WEAPON_LASER);
    170170                        /* Extra schtuph */
    171                         add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -24, -16, WEAPON_SEEKER);
    172                         add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 24, -16, WEAPON_SEEKER);
     171                        //add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -24, -16, WEAPON_SEEKER);
     172                        //add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 24, -16, WEAPON_SEEKER);
    173173                        /* More schtuph */
    174174                        add_weapon(g, g->wp, (g->p->x - 1) << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
     
    178178                        add_weapon(g, g->wp, (g->p->x + 1) << 4, (g->p->y - 1) << 4, 0, -32, WEAPON_LASER);
    179179                        /* Extra schtuph */
    180                         add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -32, 0, WEAPON_SEEKER);
    181                         add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 32, 0, WEAPON_SEEKER);
     180                        //add_weapon(g, g->wp, (g->p->x - 2) << 4, g->p->y << 4, -32, -32, WEAPON_SEEKER);
     181                        //add_weapon(g, g->wp, (g->p->x + 3) << 4, g->p->y << 4, 32, -32, WEAPON_SEEKER);
    182182                        /* MORE SCHTUPH! */
    183                         add_weapon(g, g->wp, g->p->x << 4, g->p->y << 4, 0, -16, WEAPON_BOMB);
     183                        //add_weapon(g, g->wp, g->p->x << 4, g->p->y << 4, 0, -16, WEAPON_BOMB);
    184184                    }
    185185                    break;
  • ttyvaders/trunk/src/player.c

    r3423 r3429  
    5454
    5555    caca_set_frame(ship_sprite, 0);
    56     caca_blit(g->cv, p->x, p->y, ship_sprite, NULL);
     56    caca_blit(g->cv, p->x - 2, p->y - 1, ship_sprite, NULL);
    5757}
    5858
Note: See TracChangeset for help on using the changeset viewer.