int AstromorphBasilisk::activate_weapon() { STACKTRACE; if (aimline == NULL) { add(aimline = new BasiliskAimline(this, angle, tw_color(0, 96, 0), tw_color(0, 240, 0), aimlineRange, this, Vector2(0, (get_size().y / 2.07)), aimlineAngleRange)); play_sound2(data->sampleWeapon[0]); } return(FALSE); }
void RainbowRift::animate( Frame *frame ) { STACKTRACE; if (spawn_counter > 0) return; Vector2 s; s = corner(pos, Vector2(300,300)); if ((s.x < -500) || (s.x > space_view_size.x + 500) || (s.y < -500) || (s.y > space_view_size.y + 500)) return; int b[n*6+2]; int i; for (i = 0; i < n*6+2; i += 2) { b[i] = iround(s.x + p[i] * space_zoom); b[i+1] = iround(s.y + p[i+1] * space_zoom); } for (i = 0; i < n; i += 1) { RGB tc = c[n-i-1]; int a = tw_color(tc.r, tc.g, tc.b); spline ( frame->surface, &b[i*6], a ); } frame->add_box ( iround(s.x - 2), iround(s.y -2), iround(300 * space_zoom+5), iround(300 * space_zoom+5) ); return; }