-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddWindow.h
64 lines (50 loc) · 1.71 KB
/
ddWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//---------------------------------------------------------------------------
#ifndef ddWindowH
#define ddWindowH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ddraw.h>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TdirectdrawWindow : public TForm
{
__published: // IDE-managed Components
TTimer *Timer1;
void __fastcall FormDestroy(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall Timer1Timer(TObject *Sender);
private: // User declarations
int RA, GA, BA,
RF, GF, BF,
RS, GS, BS,ColorShift;
BYTE VidMem[768][1024];
LPDIRECTDRAW lpDD;
LPDIRECTDRAWSURFACE lpDDS,lpBack;
LPDIRECTDRAWCLIPPER lpDDC;
DDSURFACEDESC SD;
DDPIXELFORMAT pxFmt;
LPDIRECTDRAWPALETTE pal332;
PALETTEENTRY pe[256];
long Color;
int Xm,Ym;
char STROUT[100];
int InitDirectDraw();
void Draw(void);
void Plasma(int x,int y,int x2,int y2);
void RotatePalette(void);
int getpixel(int X,int Y);
void putpixel(int X,int Y,BYTE Color);
void Bar(int X,int Y,int X2,int Y2,int Color);
void CalcPalette();
public: // User declarations
__fastcall TdirectdrawWindow(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TdirectdrawWindow *directdrawWindow;
//---------------------------------------------------------------------------
#endif