Okay i could totally be wrong on this, but isn't the color globally used? So once you change it to purple for the bullet it changes it when you draw the ship? It is totally possible that i am wrong on this.
That is correct, within the context.
adding a glColor3f(1.0f,1.0f,1.0f); to the top of the render ship function would solve this.
Also for the op,
don't pass dx,dy to the bullets update method(this will require you to track the direction of the bullets separatly which isn't a good idea), pass it to the constructor and add dx,dy as private member variables. (This way your bullet can keep track of its own direction)
to add a constructor that sets the direction of the bullet you add (in the Bullet class):
private float dx,dy;
public Bullet(float dx, float dy, etc) {
this.dx = dx;
this.dy = dy;
}
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!