2017-08-30 18:31:27 -04:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "DrawCommand.h"
|
|
|
|
|
|
|
|
class DrawPixelCommand : public DrawCommand
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
int _x, _y, _color;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void InternalDraw()
|
|
|
|
{
|
|
|
|
DrawPixel(_x, _y, _color);
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
2018-07-01 15:21:05 -04:00
|
|
|
DrawPixelCommand(int x, int y, int color, int frameCount, int startFrame) :
|
|
|
|
DrawCommand(startFrame, frameCount), _x(x), _y(y), _color(color)
|
2017-08-30 18:31:27 -04:00
|
|
|
{
|
2017-09-02 10:36:57 -04:00
|
|
|
//Invert alpha byte - 0 = opaque, 255 = transparent (this way, no need to specifiy alpha channel all the time)
|
|
|
|
_color = (~color & 0xFF000000) | (color & 0xFFFFFF);
|
2017-08-30 18:31:27 -04:00
|
|
|
}
|
|
|
|
};
|