forked from VCCE/VCC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectX.cpp
More file actions
81 lines (65 loc) · 1.25 KB
/
DirectX.cpp
File metadata and controls
81 lines (65 loc) · 1.25 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "DirectX.h"
#if USE_DIRECTX
#include "DirectDrawInterface.h"
using namespace VCC;
DirectX::DirectX(SystemState* state) : state(state)
{
}
int DirectX::Setup(void* hwnd, int width, int height, int statusHeight)
{
return OK;
}
int DirectX::Render()
{
return OK;
}
int DirectX::Present()
{
return OK;
}
int DirectX::Cleanup()
{
return OK;
}
int DirectX::SetOption(int flagOption, bool enabled)
{
return ERR_UNSUPPORTED;
}
int DirectX::GetSurface(Pixel** pixels)
{
if (state->BitDepth == 3)
{
*pixels = (Pixel*)(state->PTRsurface32);
return OK;
}
return ERR_UNSUPPORTED;
}
int DirectX::GetRect(int rectOption, Rect* rect)
{
switch (rectOption)
{
//case OPT_RECT_DISPLAY: GetDisplayArea(rect); break;
//case OPT_RECT_RENDER: GetRenderArea(rect); break;
case OPT_RECT_SURFACE: GetSurfaceArea(rect); break;
default: return ERR_BADOPTION;
}
return OK;
}
int DirectX::LockSurface()
{
if (LockScreen(state) == 0) return OK;
return ERR_UNSUPPORTED;
}
int DirectX::UnlockSurface()
{
UnlockScreen(state);
return OK;
}
void DirectX::GetSurfaceArea(Rect* rect)
{
rect->x = 0;
rect->y = 0;
rect->w = 640;
rect->h = 480;
}
#endif // USE_DIRECTX