OpenSWE1R / openswe1r

An Open-Source port of the 1999 Game "Star Wars Episode 1: Racer"
https://openswe1r.github.io/
GNU General Public License v2.0
313 stars 26 forks source link

Implement colorfill support #113

Closed JayFoxRox closed 6 years ago

JayFoxRox commented 6 years ago

This implements colorfill (color buffer clearing). It can be seen on Ando Prime shortly after the start. As there is no skybox, everything that is not covered by an object will have remains of the previous frame. This PR addresses that issue.

The surface returned from GetAttachedSurface has been change to also claim to be 16 bits. I've also tried 32 bit, but the color fills were still 16 bit. This should be investigated further too, so we can possibly have 32 bit colors later.

At startup, there'll be a color clear on a surface which has desc.ddpfPixelFormat.dwRGBBitCount == 0. I did not look into why this happens yet. An issue should be created about this.