|
2 | 2 |
|
3 | 3 | #include <Marathon.inl> |
4 | 4 | #include <Sonicteam/SoX/Engine/Application.h> |
| 5 | +#include <gpu/video.h> |
| 6 | + |
5 | 7 |
|
6 | 8 | namespace Sonicteam::SoX |
7 | 9 | { |
8 | 10 | class ApplicationXenon : public Engine::Application |
9 | 11 | { |
10 | 12 | public: |
11 | | - MARATHON_INSERT_PADDING(0x174); |
| 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 |
| 87 | + { |
| 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; |
| 98 | + }; |
| 99 | + |
| 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 |
| 107 | + 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 | + |
| 116 | + be<uint32_t> m_ShaderVertexCount; |
| 117 | + be<uint32_t> m_PixelShaderVertexCount; |
| 118 | + be<uint32_t> m_hNotification; //handle |
| 119 | + |
| 120 | + MARATHON_INSERT_PADDING(0x60); |
12 | 121 |
|
13 | 122 | static ApplicationXenon* GetInstance(); |
14 | 123 | }; |
| 124 | + //0x384 |
15 | 125 | } |
16 | 126 |
|
17 | 127 | #include <Sonicteam/SoX/ApplicationXenon.inl> |
0 commit comments