From 5f0e5b0c3c8e55ce0fe38533486bea04b2eadaf2 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 20 May 2016 03:56:09 +0400 Subject: [PATCH] (MMX.PAddB): uint overload. --- ArcFormats/ArcCommon.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArcFormats/ArcCommon.cs b/ArcFormats/ArcCommon.cs index 8e349be1..31c614c3 100644 --- a/ArcFormats/ArcCommon.cs +++ b/ArcFormats/ArcCommon.cs @@ -227,6 +227,13 @@ namespace GameRes.Formats return r; } + public static uint PAddB (uint x, uint y) + { + uint r13 = (x & 0xFF00FF00u) + (y & 0xFF00FF00u); + uint r02 = (x & 0x00FF00FFu) + (y & 0x00FF00FFu); + return (r13 & 0xFF00FF00u) | (r02 & 0x00FF00FFu); + } + public static ulong PAddW (ulong x, ulong y) { ulong mask = 0xffff;