Files
SourMesen e391fd8f9a Code: Add auto-formatting rules for C++ (clang-format) and enforce in CI via "clang-format" and "dotnet format" (#78)
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"

* fix ui format warnings
2026-04-30 06:03:55 -07:00

23 lines
541 B
C++

#pragma once
#include "pch.h"
#include "Shared/Video/DrawCommand.h"
class DrawPixelCommand : public DrawCommand
{
private:
int _x, _y, _color;
protected:
void InternalDraw()
{
DrawPixel(_x, _y, _color);
}
public:
DrawPixelCommand(int x, int y, int color, int frameCount, int startFrame) : DrawCommand(startFrame, frameCount), _x(x), _y(y), _color(color)
{
//Invert alpha byte - 0 = opaque, 255 = transparent (this way, no need to specifiy alpha channel all the time)
_color = (~color & 0xFF000000) | (color & 0xFFFFFF);
}
};