|
2 | 2 |
|
3 | 3 | #include <Marathon.inl> |
4 | 4 | #include <Sonicteam/SoX/Engine/Application.h> |
5 | | -#include <gpu/video.h> |
6 | | - |
| 5 | +#include <d3dxb.h> |
7 | 6 |
|
8 | 7 | namespace Sonicteam::SoX |
9 | 8 | { |
10 | 9 | class ApplicationXenon : public Engine::Application |
11 | 10 | { |
12 | 11 | public: |
13 | | - MARATHON_INSERT_PADDING(0x4); |
14 | | - uint64_t m_FirstTimeBase; |
15 | | - uint64_t m_FirstPerfomanceFraquency; |
16 | | - uint32_t m_GuestDeviceState; |
17 | | - xpointer<GuestDevice> m_GuestDevice; |
18 | | - |
19 | | - //set only if device is created |
20 | | - enum _GUESTMULTISAMPLE_TYPE : int32_t |
21 | | - { |
22 | | - GUESTMULTISAMPLE_NONE = 0x0, |
23 | | - GUESTMULTISAMPLE_2_SAMPLES = 0x1, |
24 | | - GUESTMULTISAMPLE_4_SAMPLES = 0x2, |
25 | | - GUESTMULTISAMPLE_FORCE_DWORD = 0x7FFFFFFF, |
26 | | - }; |
27 | | - |
28 | | - enum _GUESTSWAPEFFECT : int32_t |
29 | | - { |
30 | | - GUESTSWAPEFFECT_DISCARD = 0x1, |
31 | | - GUESTSWAPEFFECT_FLIP = 0x2, |
32 | | - GUESTSWAPEFFECT_COPY = 0x3, |
33 | | - GUESTSWAPEFFECT_FORCE_DWORD = 0x7FFFFFFF, |
34 | | - }; |
35 | | - |
36 | | - enum _GUESTCOLORSPACE : int32_t |
37 | | - { |
38 | | - GUESTCOLORSPACE_RGB = 0x0, |
39 | | - GUESTCOLORSPACE_YCbCr601 = 0x1, |
40 | | - GUESTCOLORSPACE_YCbCr709 = 0x2, |
41 | | - GUESTCOLORSPACE_FORCE_DWORD = 0x7FFFFFFF, |
42 | | - }; |
43 | | - |
44 | | - struct _GUESTRING_BUFFER_PARAMETERS |
45 | | - { |
46 | | - be<uint32_t> Flags; |
47 | | - be<uint32_t> PrimarySize; |
48 | | - xpointer<void> pPrimary; |
49 | | - be<uint32_t> SecondarySize; |
50 | | - xpointer<void> pSecondary; |
51 | | - be<uint32_t> SegmentCount; |
52 | | - }; |
53 | | - |
54 | | - struct _GUESTVIDEO_SCALER_PARAMETERS |
55 | | - { |
56 | | - GuestRect ScalerSourceRect; |
57 | | - be<uint32_t> ScaledOutputWidth; |
58 | | - be<uint32_t> ScaledOutputHeight; |
59 | | - be<uint32_t> FilterProfile; |
60 | | - }; |
61 | | - |
62 | | - struct _GUESTPRESENT_PARAMETERS_ |
63 | | - { |
64 | | - be<uint32_t> BackBufferWidth; |
65 | | - be<uint32_t> BackBufferHeight; |
66 | | - be<GuestFormat> BackBufferFormat; |
67 | | - be<uint32_t> BackBufferCount; |
68 | | - be<_GUESTMULTISAMPLE_TYPE> MultiSampleType; |
69 | | - be<uint32_t> MultiSampleQuality; |
70 | | - be<_GUESTSWAPEFFECT> SwapEffect; |
71 | | - xpointer<void> hDeviceWindow; //HWND?? |
72 | | - be<int32_t> Windowed; |
73 | | - be<int32_t> EnableAutoDepthStencil; |
74 | | - be<GuestFormat> AutoDepthStencilFormat; |
75 | | - be<uint32_t> Flags; |
76 | | - be<uint32_t> FullScreen_RefreshRateInHz; |
77 | | - be<uint32_t> PresentationInterval; |
78 | | - be<int32_t> DisableAutoBackBuffer; |
79 | | - be<int32_t> DisableAutoFrontBuffer; |
80 | | - be<GuestFormat> FrontBufferFormat; |
81 | | - be < _GUESTCOLORSPACE> FrontBufferColorSpace; |
82 | | - _GUESTRING_BUFFER_PARAMETERS RingBufferParameters; |
83 | | - _GUESTVIDEO_SCALER_PARAMETERS VideoScalerParameters; |
84 | | - }; |
85 | | - |
86 | | - struct GuestDeviceInfo |
| 12 | + struct DeviceInfo |
87 | 13 | { |
88 | | - be<uint32_t> GuestDeviceState; |
89 | | - xpointer<::GuestDevice> pGuestDevice; |
90 | | - GuestSurfaceCreateParams SurfaceParamA; |
91 | | - GuestSurfaceCreateParams SurfaceParamB; |
92 | | - GuestSurfaceCreateParams SurfaceParamC; |
93 | | - xpointer<GuestSurface> pColorTile2X; |
94 | | - xpointer<GuestSurface> pDepthTile2X; |
95 | | - xpointer<GuestSurface> pColorTile4X; |
96 | | - xpointer<GuestSurface> pDepthTile4X; |
97 | | - _GUESTPRESENT_PARAMETERS_ GuestPresentParameters; |
| 14 | + be<uint32_t> DeviceState; |
| 15 | + xpointer<void> pDevice; |
| 16 | + D3DXBSURFACE_PARAMETERS SurfaceParamsA; |
| 17 | + D3DXBSURFACE_PARAMETERS SurfaceParamsB; |
| 18 | + D3DXBSURFACE_PARAMETERS SurfaceParamsC; |
| 19 | + xpointer<void> pColorTile2x; |
| 20 | + xpointer<void> pDepthTile2x; |
| 21 | + xpointer<void> pColorTile4x; |
| 22 | + xpointer<void> pDepthTile4x; |
| 23 | + D3DXBPRESENT_PARAMETERS PresentParameters; |
98 | 24 | }; |
99 | 25 |
|
100 | | - GuestDeviceInfo m_GuestDeviceInfo; |
101 | | - |
102 | | - //TODO: check once more these (for order) |
103 | | - be<uint64_t> m_DeltaTimePost; |
104 | | - be<uint64_t> m_DeltaTimePre; |
105 | | - |
106 | | - bool m_IsBufferInitialized; //buffers? all initialized, created, better name pls |
| 26 | + MARATHON_INSERT_PADDING(4); |
| 27 | + be<uint64_t> m_FirstTimeBase; |
| 28 | + be<uint64_t> m_FirstPerformanceFrequency; |
| 29 | + be<uint32_t> m_DeviceState; |
| 30 | + xpointer<void> m_pDevice; |
| 31 | + DeviceInfo m_DeviceInfo; |
| 32 | + be<uint64_t> m_DeltaTimePost; // TODO: check if these are in the correct order. |
| 33 | + be<uint64_t> m_DeltaTimePre; // TODO: check if these are in the correct order. |
| 34 | + bool m_IsInitBuffers; |
107 | 35 | MARATHON_INSERT_PADDING(7); |
108 | | - xpointer<GuestTexture> m_pFrontBufferTexture; |
109 | | - xpointer<GuestSurface> m_pBackBufferSurface; |
110 | | - xpointer<GuestSurface> m_pDepthStencilSurface; |
111 | | - xpointer<GuestSurface> m_pColorTile2X; |
112 | | - xpointer<GuestSurface> m_pDepthTile2X; |
113 | | - xpointer<GuestSurface> m_pColorTile4X; |
114 | | - xpointer<GuestSurface> m_pDepthTile4X; |
115 | | - |
| 36 | + xpointer<void> m_pFrontBufferTexture; |
| 37 | + xpointer<void> m_pBackBufferSurface; |
| 38 | + xpointer<void> m_pDepthStencilSurface; |
| 39 | + xpointer<void> m_pColorTile2x; |
| 40 | + xpointer<void> m_pDepthTile2x; |
| 41 | + xpointer<void> m_pColorTile4x; |
| 42 | + xpointer<void> m_pDepthTile4x; |
116 | 43 | be<uint32_t> m_ShaderVertexCount; |
117 | 44 | be<uint32_t> m_PixelShaderVertexCount; |
118 | | - be<uint32_t> m_hNotification; //handle |
119 | | - |
| 45 | + be<uint32_t> m_hNotification; |
120 | 46 | MARATHON_INSERT_PADDING(0x60); |
121 | | - |
122 | | - //static ApplicationXenon* GetInstance(); |
123 | 47 | }; |
124 | | - //0x384 |
125 | 48 | } |
126 | | - |
127 | | -//#include <Sonicteam/SoX/ApplicationXenon.inl> |
0 commit comments