Downloads containing LowRes.mut

Downloads
Name Author Game Mode Rating
JJ2 1.23 vanilla: Miscellaneous stuff Violet CLM Multiple N/A Download file

File preview

void onLevelLoad() {
	for (uint i = jjTileCount - 1; i > 0; --i) {
		jjPIXELMAP tile(i);
		for (uint x = 0; x < 32; x += 2)
			for (uint y = 0; y < 32; y += 2) {
				const jjPALCOLOR color0 = jjPalette.color[tile[x,y]];
				const jjPALCOLOR color1 = jjPalette.color[tile[x+1, y]];
				const jjPALCOLOR color2 = jjPalette.color[tile[x, y+1]];
				const jjPALCOLOR color3 = jjPalette.color[tile[x+1, y+1]];
				uint8 newColor = jjPalette.findNearestColor(jjPALCOLOR(
					(uint(color0.red) + color1.red + color2.red + color3.red) / 4,
					(uint(color0.green) + color1.green + color2.green + color3.green) / 4,
					(uint(color0.blue) + color1.blue + color2.blue + color3.blue) / 4
				));
				if (jjPalette.color[newColor] == jjPALCOLOR()) newColor = 0;
				tile[x+1,y] = tile[x,y+1] = tile[x+1,y+1] = tile[x,y] = newColor;
			}
		tile.save(i, true);
	}
}

/*void onPlayer(jjPLAYER@ play) {
	play.cameraFreeze(int(play.xPos) & ~15, (int(play.yPos) & ~15), true,true);
}*/