[Scummvm-git-logs] scummvm master -> 26a903fd25ce0f27c54225a7fe4b91558cef4c62

mduggan mgithub at guarana.org
Thu Apr 16 07:46:18 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
26a903fd25 ULTIMA8: Remove unused pixel manips


Commit: 26a903fd25ce0f27c54225a7fe4b91558cef4c62
    https://github.com/scummvm/scummvm/commit/26a903fd25ce0f27c54225a7fe4b91558cef4c62
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-04-16T16:45:27+09:00

Commit Message:
ULTIMA8: Remove unused pixel manips

Changed paths:
    engines/ultima/ultima8/graphics/manips.h


diff --git a/engines/ultima/ultima8/graphics/manips.h b/engines/ultima/ultima8/graphics/manips.h
index aae25d0a9e..3f3e81b3f1 100644
--- a/engines/ultima/ultima8/graphics/manips.h
+++ b/engines/ultima/ultima8/graphics/manips.h
@@ -202,147 +202,6 @@ public:
 	}
 };
 
-//
-// Gamma Corrected Manips
-//
-
-
-class Manip_Nat2Nat_16_GC {
-public:
-	static bool are_same() {
-		return true;
-	}
-	static uint16 copy(uint16 src) {
-		return src;
-	}
-	static void split(uint16 src, uint8 &r, uint8 &g, uint8 &b, uint8 &a) {
-		UNPACK_RGBA8(src, r, g, b, a);
-		r = RenderSurface::_gamma22toGamma10[r];
-		g = RenderSurface::_gamma22toGamma10[g];
-		b = RenderSurface::_gamma22toGamma10[b];
-	}
-	static uint16 merge(uint8 r, uint8 g, uint8 b, uint8 a) {
-		return PACK_RGBA8(RenderSurface::_gamma10toGamma22[r], RenderSurface::_gamma10toGamma22[g], RenderSurface::_gamma10toGamma22[b], a);
-	}
-	static uint16 to16bit(uint16 src) {
-		return src;
-	}
-};
-
-class Manip_Nat2Nat_32_GC {
-public:
-	static bool are_same() {
-		return true;
-	}
-	static uint32 copy(uint32 src) {
-		return src;
-	}
-	static void split(uint32 src, uint8 &r, uint8 &g, uint8 &b, uint8 &a) {
-		UNPACK_RGBA8(src, r, g, b, a);
-		r = RenderSurface::_gamma22toGamma10[r];
-		g = RenderSurface::_gamma22toGamma10[g];
-		b = RenderSurface::_gamma22toGamma10[b];
-	}
-	static uint32 merge(uint8 r, uint8 g, uint8 b, uint8 a) {
-		return PACK_RGBA8(RenderSurface::_gamma10toGamma22[r], RenderSurface::_gamma10toGamma22[g], RenderSurface::_gamma10toGamma22[b], a);
-	}
-	static uint16 to16bit(uint32 src) {
-		uint8 r, g, b;
-		UNPACK_RGB8(src, r, g, b);
-		return (r >> 3) | ((g & 0xFC) << 3) | ((b & 0xF8) << 8);
-	}
-};
-
-class Manip_Sta2Nat_16_GC {
-public:
-	static bool are_same() {
-		return false;
-	}
-	static uint16 copy(uint32 src) {
-		return PACK_RGBA8(TEX32_R(src), TEX32_G(src), TEX32_B(src), TEX32_A(src));
-	}
-	static void split(uint32 src, uint8 &r, uint8 &g, uint8 &b, uint8 &a) {
-		r = RenderSurface::_gamma22toGamma10[TEX32_R(src)];
-		g = RenderSurface::_gamma22toGamma10[TEX32_G(src)];
-		b = RenderSurface::_gamma22toGamma10[TEX32_B(src)];
-		a = TEX32_A(src);
-	}
-	static uint16 merge(uint8 r, uint8 g, uint8 b, uint8 a) {
-		return PACK_RGBA8(RenderSurface::_gamma10toGamma22[r], RenderSurface::_gamma10toGamma22[g], RenderSurface::_gamma10toGamma22[b], a);
-	}
-	static uint16 to16bit(uint32 src) {
-		return (src >> 3) | ((src >> 5) & 0x7E0) | ((src >> 8) & 0xF800);
-	}
-};
-
-class Manip_Sta2Nat_32_GC {
-public:
-	static bool are_same() {
-		return false;
-	}
-	static uint32 copy(uint32 src) {
-		return PACK_RGBA8(TEX32_R(src), TEX32_G(src), TEX32_B(src), TEX32_A(src));
-	}
-	static void split(uint32 src, uint8 &r, uint8 &g, uint8 &b, uint8 &a) {
-		r = RenderSurface::_gamma22toGamma10[TEX32_R(src)];
-		g = RenderSurface::_gamma22toGamma10[TEX32_G(src)];
-		b = RenderSurface::_gamma22toGamma10[TEX32_B(src)];
-		a = TEX32_A(src);
-	}
-	static uint32 merge(uint8 r, uint8 g, uint8 b, uint8 a) {
-		return PACK_RGBA8(RenderSurface::_gamma10toGamma22[r], RenderSurface::_gamma10toGamma22[g], RenderSurface::_gamma10toGamma22[b], a);
-	}
-	static uint16 to16bit(uint32 src) {
-		return (src >> 3) | ((src >> 5) & 0x7E0) | ((src >> 8) & 0xF800);
-	}
-};
-
-// Assumption, ABGR (but doesn't matter)
-class Manip_32_A888_GC {
-public:
-	static bool are_same() {
-		return true;
-	}
-	static uint32 copy(uint32 src) {
-		return src;
-	}
-	static void split(uint32 src, uint8 &c0, uint8 &c1, uint8 &c2, uint8 &a) {
-		c0 = RenderSurface::_gamma22toGamma10[(src) & 0xFF];
-		c1 = RenderSurface::_gamma22toGamma10[(src >> 8) & 0xFF];
-		c2 = RenderSurface::_gamma22toGamma10[(src >> 16) & 0xFF];
-		a = src >> 24;
-	}
-	static uint32 merge(uint8 c0, uint8 c1, uint8 c2, uint8 a) {
-		return RenderSurface::_gamma10toGamma22[c0] | (RenderSurface::_gamma10toGamma22[c1] << 8) | (RenderSurface::_gamma10toGamma22[c2] << 16) | (a << 24);
-	}
-	static uint16 to16bit(uint32 src) {
-		return (src >> 3) | ((src >> 5) & 0x7E0) | ((src >> 8) & 0xF800);
-	}
-};
-
-// Assumption, RGBA (but doesn't matter)
-class Manip_32_888A_GC {
-public:
-	static bool are_same() {
-		return true;
-	}
-	static uint32 copy(uint32 src) {
-		return src;
-	}
-	static void split(uint32 src, uint8 &c0, uint8 &c1, uint8 &c2, uint8 &a) {
-		a = src;
-		c2 = RenderSurface::_gamma22toGamma10[(src >> 8) & 0xFF];
-		c1 = RenderSurface::_gamma22toGamma10[(src >> 16) & 0xFF];
-		c0 = RenderSurface::_gamma22toGamma10[(src >> 24) & 0xFF];
-	}
-	static uint32 merge(uint8 c0, uint8 c1, uint8 c2, uint8 a) {
-		return a | (RenderSurface::_gamma10toGamma22[c2] << 8) | (RenderSurface::_gamma10toGamma22[c1] << 16) | (RenderSurface::_gamma10toGamma22[c0] << 24);
-	}
-	static uint16 to16bit(uint32 src) {
-		return (src >> 27) | ((src >> 13) & 0x7E0) | ((src << 8) & 0xF800);
-	}
-};
-
 } // End of namespace Ultima8
 } // End of namespace Ultima
 




More information about the Scummvm-git-logs mailing list