kouky
Member
I've written some code to mix 2 16bits colors together.
Imagine 2 photoshop layers, the top one is 50% alpha, my code is doing that.
So here's the code to calculate the merged color between couleur16A and couleur16B.
I believe it can be improved to run faster, but how? :unsure:
Imagine 2 photoshop layers, the top one is 50% alpha, my code is doing that.
So here's the code to calculate the merged color between couleur16A and couleur16B.
Code:
couleur16A=koukyTiles16[iii];
couleurRA=couleur16A>>11;
couleurVA=(couleur16A&(0x7E0))>>5;
couleurBA=couleur16A&0x1F;
couleur16B=koukyTiles16[iii+screenWH];
couleurRB=couleur16B>>11;
couleurVB=(couleur16B&(0x7E0))>>5;
couleurBB=couleur16B&0x1F;
finalTiles16[iii]=((couleurRA+couleurRB)>>1<<11)+((couleurVA+couleurVB)>>1<<5)+((couleurBA+couleurBB)>>1);