commit x64 compilation from lulu cause the other branch dont seems to compile properly at home

This commit is contained in:
2026-07-17 16:08:20 +02:00
parent c0f3eeb00d
commit 0efa4ee6f7
625 changed files with 117283 additions and 4426 deletions

View File

@ -0,0 +1,25 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "picture/pict.h"
using namespace GS;
//------------------------------------------------------------------------------
uchar Picture::AlphaCompositeAlpha(uchar a, uchar b)
{ return (uchar)Types::Clamp <int> (a + b - ((a * b) >> 8), 0, 255); }
uchar Picture::AlphaCompositeColor(uchar u, uchar v, uchar a, uchar b, uchar k)
{ return (uchar)Types::Clamp <int> (k ? (u * a + v * b - ((u * b * a) >> 8)) / k : 0, 0, 255); }
void Picture::AlphaCompositePixel(uchar *data, uchar r, uchar g, uchar b, uchar a)
{
uchar a_blend = AlphaCompositeAlpha(data[3], a);
data[0] = AlphaCompositeColor(data[0], r, data[3], a, a_blend);
data[1] = AlphaCompositeColor(data[1], g, data[3], a, a_blend);
data[2] = AlphaCompositeColor(data[2], b, data[3], a, a_blend);
data[3] = a_blend;
}
//------------------------------------------------------------------------------