22 #include "precompiled.h"
31 namespace CAlphaMapCalculator {
152 if (shape==templateshape) {
158 templateshape.FlipU(tstShape);
159 if (shape==tstShape) {
165 templateshape.FlipV(tstShape);
166 if (shape==tstShape) {
188 templateshape.Rotate90(tstShape);
196 templateshape.Rotate180(tstShape);
202 templateshape.Rotate270(tstShape);
217 template<
class S,
class T>
218 int LookupBlend(
int tableSize,
const S* table,
const T& shape,
unsigned int& flags)
221 for (
int b=0;b<tableSize;b++) {
222 const S& blend=table[b];
224 return blend.m_AlphaMap;
245 for (
int i=0;i<8;i++) {
246 if (shape[i]) count++;
252 }
else if (count==8) {
258 if (!shape[1] && !shape[3] && !shape[5] && !shape[7]) {
#define BLENDMAP_ROTATE90
const Blend8 Blends6Neighbour8[]
const Blend8 Blends4Neighbour8[]
const Blend8 Blends2Neighbour8[]
const Blend4 Blends3Neighbour[]
int MatchBlendShape(const T &templateshape, const T &shape, unsigned int &flags)
const Blend8 Blends7Neighbour8[]
const Blend4 Blends1Neighbour[]
Blend8(BlendShape8 shape, int alphamap)
#define T(string_literal)
int Calculate(BlendShape8 shape, unsigned int &flags)
bool MatchBlendShapeFlipped(const T &templateshape, const T &shape, unsigned int &flags)
const Blend4 Blends2Neighbour[]
const Blend8 Blends5Neighbour8[]
#define BLENDMAP_ROTATE270
int LookupBlend(int tableSize, const S *table, const T &shape, unsigned int &flags)
#define BLENDMAP_ROTATE180
Blend4(BlendShape4 shape, int alphamap)
const Blend8 Blends3Neighbour8[]