2016-09-29 03:21:43 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "drawercodegen.h"
|
|
|
|
|
|
|
|
enum class DrawColumnVariant
|
|
|
|
{
|
2016-10-07 01:38:43 +00:00
|
|
|
Fill,
|
|
|
|
FillAdd,
|
|
|
|
FillAddClamp,
|
|
|
|
FillSubClamp,
|
|
|
|
FillRevSubClamp,
|
|
|
|
Draw,
|
|
|
|
DrawAdd,
|
|
|
|
DrawTranslated,
|
|
|
|
DrawTlatedAdd,
|
|
|
|
DrawShaded,
|
|
|
|
DrawAddClamp,
|
|
|
|
DrawAddClampTranslated,
|
|
|
|
DrawSubClamp,
|
|
|
|
DrawSubClampTranslated,
|
|
|
|
DrawRevSubClamp,
|
|
|
|
DrawRevSubClampTranslated
|
2016-09-29 03:21:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DrawColumnCodegen : public DrawerCodegen
|
|
|
|
{
|
|
|
|
public:
|
2016-10-07 01:38:43 +00:00
|
|
|
void Generate(DrawColumnVariant variant, SSAValue args, SSAValue thread_data);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void Loop(DrawColumnVariant variant, bool isSimpleShade);
|
|
|
|
SSAInt ColormapSample(SSAInt frac);
|
|
|
|
SSAInt TranslateSample(SSAInt frac);
|
|
|
|
SSAVec4i Shade(SSAInt palIndex, bool isSimpleShade);
|
|
|
|
|
|
|
|
SSAStack<SSAInt> stack_index, stack_frac;
|
|
|
|
|
|
|
|
SSAUBytePtr dest;
|
|
|
|
SSAUBytePtr source;
|
|
|
|
SSAUBytePtr colormap;
|
|
|
|
SSAUBytePtr translation;
|
|
|
|
SSAUBytePtr basecolors;
|
|
|
|
SSAInt pitch;
|
|
|
|
SSAInt count;
|
|
|
|
SSAInt dest_y;
|
|
|
|
SSAInt iscale;
|
|
|
|
SSAInt texturefrac;
|
|
|
|
SSAInt light;
|
|
|
|
SSAVec4i color;
|
|
|
|
SSAVec4i srccolor;
|
|
|
|
SSAInt srcalpha;
|
|
|
|
SSAInt destalpha;
|
|
|
|
SSABool is_simple_shade;
|
|
|
|
SSAShadeConstants shade_constants;
|
|
|
|
SSAWorkerThread thread;
|
2016-09-29 03:21:43 +00:00
|
|
|
};
|