void BChain::animate(Frame *space) { STACKTRACE; if ( hurty_time == 0 ) { int _old_trans = aa_get_trans(); aa_set_trans ( iround(255 * ((max_health-health) / (max_health + 1)) )); sprite->animate(pos, sprite_index, space); aa_set_trans(_old_trans); } else { int col = makecol(150,40,0); sprite->animate_character(pos, sprite_index, col, space); int _old_trans = aa_get_trans(); aa_set_trans ( iround(255 * (hurty_time / max_hurt_flash_time))); sprite->animate(pos,sprite_index, space); aa_set_trans(_old_trans); } }
void TauDaggerBeam::animate(Frame *space) { STACKTRACE; int aa = get_tw_aa_mode(); SpaceLine::animate(space); if ((aa & AA_BLEND) && (aa & AA_ALPHA) && !(aa & AA_NO_AA) && (length < base_length*0.9999) && (target)) { int _old_trans = aa_get_trans(); // changed tw_random into rand - GEO - so that physics are not affected by the animation aa_set_trans(rand()%136);//graphics data->spriteWeaponExplosion->animate(pos+edge(), 0, space); aa_set_trans(_old_trans); } }
void EarthlingCruiserMk3Beam::animate(Frame *space) { STACKTRACE; int aa = get_tw_aa_mode(); SpaceLine::animate(space); if ((aa & AA_BLEND) && (aa & AA_ALPHA) && !(aa & AA_NO_AA) && (length < base_length*0.9999) && (target)) { int _old_trans = aa_get_trans(); aa_set_trans(rand()%156); data->spriteSpecial->animate(pos, 0, space); aa_set_trans(rand()%156); data->spriteSpecialExplosion->animate(pos+edge(), 0, space); aa_set_trans(_old_trans); } }
void AstromorphBasilisk::animate(Frame *space) { STACKTRACE; if ( hurty_time == 0 ) sprite->animate(pos, sprite_index, space); else { //sprite->animate_character(pos, sprite_index, pallete_color[hot_color[((int)((hurty_time / max_hurt_flash_time) * 10)) % HOT_COLORS]], space); sprite->animate(pos, sprite_index, space); int col = makecol(150,40,0); sprite->animate_character(pos, sprite_index, col, space); int _old_trans = aa_get_trans(); aa_set_trans ( iround(255 * (hurty_time / max_hurt_flash_time) )); sprite->animate(pos,sprite_index, space); aa_set_trans(_old_trans); } };