2019-12-11 00:51:42 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-12-23 17:43:10 -05:00
|
|
|
#include "GpPixelFormat.h"
|
2019-12-22 00:35:30 -05:00
|
|
|
#include "EGpStandardCursor.h"
|
2019-12-21 18:40:17 -05:00
|
|
|
|
|
|
|
|
struct IGpDisplayDriverSurface;
|
2020-02-23 20:21:04 -05:00
|
|
|
struct IGpCursor;
|
2019-12-21 18:40:17 -05:00
|
|
|
|
2020-05-18 02:03:17 -04:00
|
|
|
struct GpDisplayDriverSurfaceEffects
|
|
|
|
|
{
|
|
|
|
|
GpDisplayDriverSurfaceEffects();
|
|
|
|
|
|
|
|
|
|
bool m_darken;
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-21 18:40:17 -05:00
|
|
|
// Display drivers are responsible for timing and calling the game tick function.
|
|
|
|
|
struct IGpDisplayDriver
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual void Run() = 0;
|
|
|
|
|
virtual void Shutdown() = 0;
|
|
|
|
|
|
2019-12-23 17:43:10 -05:00
|
|
|
virtual void GetDisplayResolution(unsigned int *width, unsigned int *height, GpPixelFormat_t *bpp) = 0;
|
2019-12-21 18:40:17 -05:00
|
|
|
|
2019-12-23 17:43:10 -05:00
|
|
|
virtual IGpDisplayDriverSurface *CreateSurface(size_t width, size_t height, GpPixelFormat_t pixelFormat) = 0;
|
2020-05-18 02:03:17 -04:00
|
|
|
virtual void DrawSurface(IGpDisplayDriverSurface *surface, int32_t x, int32_t y, size_t width, size_t height, const GpDisplayDriverSurfaceEffects *effects) = 0;
|
2019-12-21 18:40:17 -05:00
|
|
|
|
2020-02-23 20:21:04 -05:00
|
|
|
virtual IGpCursor *LoadCursor(bool isColor, int cursorID) = 0;
|
|
|
|
|
virtual void SetCursor(IGpCursor *cursor) = 0;
|
2019-12-22 00:35:30 -05:00
|
|
|
virtual void SetStandardCursor(EGpStandardCursor_t standardCursor) = 0;
|
|
|
|
|
|
2019-12-21 18:40:17 -05:00
|
|
|
virtual void UpdatePalette(const void *paletteData) = 0;
|
2020-04-05 02:15:49 -04:00
|
|
|
|
|
|
|
|
virtual void SetBackgroundColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a) = 0;
|
2020-04-18 00:18:20 -04:00
|
|
|
|
|
|
|
|
virtual void RequestToggleFullScreen(uint32_t timestamp) = 0;
|
2019-12-21 18:40:17 -05:00
|
|
|
};
|
2020-05-18 02:03:17 -04:00
|
|
|
|
|
|
|
|
inline GpDisplayDriverSurfaceEffects::GpDisplayDriverSurfaceEffects()
|
|
|
|
|
: m_darken(false)
|
|
|
|
|
{
|
|
|
|
|
}
|