mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Add FreeType, progress to title screen
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "EGpAudioDriverType.h"
|
||||
|
||||
class IGpAudioDriver;
|
||||
|
||||
struct GpAudioDriverProperties
|
||||
{
|
||||
#pragma once
|
||||
|
||||
#include "EGpAudioDriverType.h"
|
||||
|
||||
struct IGpAudioDriver;
|
||||
|
||||
struct GpAudioDriverProperties
|
||||
{
|
||||
EGpAudioDriverType m_type;
|
||||
|
||||
unsigned int m_sampleRate;
|
||||
bool m_debug;
|
||||
};
|
||||
bool m_debug;
|
||||
};
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include "EGpDisplayDriverType.h"
|
||||
|
||||
class IGpDisplayDriver;
|
||||
class GpFiber;
|
||||
|
||||
struct GpDisplayDriverProperties
|
||||
{
|
||||
typedef void(*TickFunc_t)(void *context, GpFiber *vosFiber);
|
||||
|
||||
EGpDisplayDriverType m_type;
|
||||
|
||||
unsigned int m_frameTimeLockNumerator;
|
||||
unsigned int m_frameTimeLockDenominator;
|
||||
|
||||
unsigned int m_frameTimeLockMinNumerator;
|
||||
unsigned int m_frameTimeLockMinDenominator;
|
||||
|
||||
unsigned int m_frameTimeLockMaxNumerator;
|
||||
unsigned int m_frameTimeLockMaxDenominator;
|
||||
|
||||
// Tick function and context to call when a frame needs to be served.
|
||||
TickFunc_t m_tickFunc;
|
||||
void *m_tickFuncContext;
|
||||
};
|
||||
#pragma once
|
||||
|
||||
#include "EGpDisplayDriverType.h"
|
||||
|
||||
struct IGpDisplayDriver;
|
||||
class GpFiber;
|
||||
|
||||
struct GpDisplayDriverProperties
|
||||
{
|
||||
typedef void(*TickFunc_t)(void *context, GpFiber *vosFiber);
|
||||
typedef void(*RenderFunc_t)(void *context);
|
||||
|
||||
EGpDisplayDriverType m_type;
|
||||
|
||||
unsigned int m_frameTimeLockNumerator;
|
||||
unsigned int m_frameTimeLockDenominator;
|
||||
|
||||
unsigned int m_frameTimeLockMinNumerator;
|
||||
unsigned int m_frameTimeLockMinDenominator;
|
||||
|
||||
unsigned int m_frameTimeLockMaxNumerator;
|
||||
unsigned int m_frameTimeLockMaxDenominator;
|
||||
|
||||
// Tick function and context to call when a frame needs to be served.
|
||||
TickFunc_t m_tickFunc;
|
||||
void *m_tickFuncContext;
|
||||
|
||||
RenderFunc_t m_renderFunc;
|
||||
void *m_renderFuncContext;
|
||||
};
|
||||
|
||||
89
GpCommon/GpVOSEvent.h
Normal file
89
GpCommon/GpVOSEvent.h
Normal file
@@ -0,0 +1,89 @@
|
||||
#pragma once
|
||||
|
||||
namespace GpKeyIDSubsets
|
||||
{
|
||||
enum GpKeyIDSubset
|
||||
{
|
||||
kASCII,
|
||||
kSpecial,
|
||||
kNumPadASCII,
|
||||
kNumPadSpecial,
|
||||
kFKey, // Key value is a raw F number
|
||||
};
|
||||
}
|
||||
|
||||
typedef GpKeyIDSubsets::GpKeyIDSubset GpKeyIDSubset_t;
|
||||
|
||||
namespace GpKeySpecials
|
||||
{
|
||||
enum GpKeySpecial
|
||||
{
|
||||
kEscape,
|
||||
kPrintScreen,
|
||||
kScrollLock,
|
||||
kPause,
|
||||
kInsert,
|
||||
kHome,
|
||||
kPageUp,
|
||||
kPageDown,
|
||||
kDelete,
|
||||
kEnd,
|
||||
kBackspace,
|
||||
kCapsLock,
|
||||
kEnter,
|
||||
kLeftShift,
|
||||
kRightShift,
|
||||
kLeftCtrl,
|
||||
kRightCtrl,
|
||||
kLeftAlt,
|
||||
kRightAlt,
|
||||
kNumLock,
|
||||
};
|
||||
}
|
||||
|
||||
typedef GpKeySpecials::GpKeySpecial GpKeySpecial_t;
|
||||
|
||||
namespace GpInputEventTypes
|
||||
{
|
||||
enum GpInputEventType
|
||||
{
|
||||
kDown,
|
||||
kUp,
|
||||
kAuto,
|
||||
};
|
||||
}
|
||||
|
||||
typedef GpInputEventTypes::GpInputEventType GpInputEventType_t;
|
||||
|
||||
namespace GpVOSEventTypes
|
||||
{
|
||||
enum GpVOSEventType
|
||||
{
|
||||
kInput,
|
||||
};
|
||||
}
|
||||
|
||||
typedef GpVOSEventTypes::GpVOSEventType GpVOSEventType_t;
|
||||
|
||||
struct GpInputEvent
|
||||
{
|
||||
union KeyUnion
|
||||
{
|
||||
GpKeySpecials::GpKeySpecial m_specialKey;
|
||||
char m_asciiChar;
|
||||
};
|
||||
|
||||
GpInputEventType_t m_eventType;
|
||||
GpKeyIDSubset_t m_keyIDSubset;
|
||||
KeyUnion m_key;
|
||||
};
|
||||
|
||||
struct GpVOSEvent
|
||||
{
|
||||
union EventUnion
|
||||
{
|
||||
GpInputEvent m_inputEvent;
|
||||
};
|
||||
|
||||
GpVOSEventType_t m_eventType;
|
||||
};
|
||||
@@ -14,3 +14,5 @@ struct GPWindowsGlobals
|
||||
};
|
||||
|
||||
extern GPWindowsGlobals g_gpWindowsGlobals;
|
||||
|
||||
#undef CreateMutex
|
||||
|
||||
0
GpCommon/HostVOSEventQueue.h
Normal file
0
GpCommon/HostVOSEventQueue.h
Normal file
@@ -2,12 +2,10 @@
|
||||
|
||||
struct IGpAudioChannel;
|
||||
|
||||
class IGpAudioDriver
|
||||
{
|
||||
public:
|
||||
virtual ~IGpAudioDriver() {}
|
||||
struct IGpAudioDriver
|
||||
{
|
||||
public:
|
||||
virtual IGpAudioChannel *CreateChannel() = 0;
|
||||
|
||||
virtual IGpAudioChannel *CreateChannel() = 0;
|
||||
|
||||
virtual void Shutdown() = 0;
|
||||
};
|
||||
virtual void Shutdown() = 0;
|
||||
};
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "PixelFormat.h"
|
||||
|
||||
// Display drivers are responsible for timing and calling the game tick function.
|
||||
class IGpDisplayDriver
|
||||
{
|
||||
public:
|
||||
virtual ~IGpDisplayDriver() {}
|
||||
|
||||
virtual void Run() = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual void GetDisplayResolution(unsigned int *width, unsigned int *height, PortabilityLayer::PixelFormat *bpp) = 0;
|
||||
};
|
||||
#include "PixelFormat.h"
|
||||
|
||||
struct IGpDisplayDriverSurface;
|
||||
|
||||
// Display drivers are responsible for timing and calling the game tick function.
|
||||
struct IGpDisplayDriver
|
||||
{
|
||||
public:
|
||||
virtual void Run() = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual void GetDisplayResolution(unsigned int *width, unsigned int *height, PortabilityLayer::PixelFormat *bpp) = 0;
|
||||
|
||||
virtual IGpDisplayDriverSurface *CreateSurface(size_t width, size_t height, PortabilityLayer::PixelFormat pixelFormat) = 0;
|
||||
virtual void DrawSurface(IGpDisplayDriverSurface *surface, size_t x, size_t y, size_t width, size_t height) = 0;
|
||||
|
||||
virtual void UpdatePalette(const void *paletteData) = 0;
|
||||
};
|
||||
|
||||
8
GpCommon/IGpDisplayDriverSurface.h
Normal file
8
GpCommon/IGpDisplayDriverSurface.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
struct IGpDisplayDriverSurface
|
||||
{
|
||||
virtual void Upload(const void *data, size_t x, size_t y, size_t width, size_t height, size_t pitch) = 0;
|
||||
virtual void UploadEntire(const void *data, size_t pitch) = 0;
|
||||
virtual void Destroy() = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user