2019-02-13 23:02:43 -05:00
|
|
|
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "DrawCommand.h"
|
|
|
|
|
|
|
|
class DrawScreenBufferCommand : public DrawCommand
|
|
|
|
{
|
|
|
|
private:
|
2021-03-10 11:13:28 -05:00
|
|
|
uint32_t _screenBuffer[256*240];
|
2019-02-13 23:02:43 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void InternalDraw()
|
|
|
|
{
|
2021-03-10 11:13:28 -05:00
|
|
|
for(int y = 0; y < 240; y++) {
|
|
|
|
for(int x = 0; x < 256; x++) {
|
2019-02-13 23:02:43 -05:00
|
|
|
DrawPixel(x, y, _screenBuffer[(y << 8) + x]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
DrawScreenBufferCommand(uint32_t* screenBuffer, int startFrame) : DrawCommand(startFrame, 1)
|
|
|
|
{
|
|
|
|
memcpy(_screenBuffer, screenBuffer, 256 * 240 * sizeof(uint32_t));
|
|
|
|
}
|
|
|
|
};
|