#pragma once

#include <windows.h>

class TDib 
{
private:
    void __fastcall Create ();
    void __fastcall Destroy ();
    int Average (int c1, int c2, int c3, int c4);
public:
	TDib(int w, int h);
    ~TDib();
    void __fastcall ChangeResolution (int w, int h);
    void __fastcall CopyWindows (TDib *dest);
    void __fastcall CopySoftware (TDib *dest); //no scaling yet
	void __fastcall FillWindows (int value);
    void __fastcall FillSoftware (int value);
    void __fastcall Flush ();
    void __fastcall Blit (HDC dest);
    void __fastcall BlitStrech (HDC dest, int destw, int desth);
    void __fastcall ScaletoBlin (int destw, int desth);
    void __fastcall DownsampleHalf ();
    void __fastcall DownByTwo (TDib *dest);
	int xres, yres;
    HDC hdc;
    HBITMAP vscreen_r;
    int *vscreen;
};
