Browse code

ppu_blit: change type to Uint16

Sigrid Solveig Haflínudóttir authored on 25/12/2021 18:00:26
Showing 1 changed files
... ...
@@ -105,7 +105,7 @@ ppu_blit(Ppu *p, Layer *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, U
105 105
 {
106 106
 	int v, h, opaque = blending[4][color];
107 107
 	for(v = 0; v < 8; ++v) {
108
-		int c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8;
108
+		Uint16 c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8;
109 109
 		for(h = 7; h >= 0; --h, c >>= 1) {
110 110
 			Uint8 ch = (c & 1) | ((c >> 7) & 2);
111 111
 			if(opaque || ch)