mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
feat(app): add windows app
This commit is contained in:
parent
6bebfe5e2f
commit
655d795a9d
20 changed files with 176 additions and 66 deletions
|
|
@ -70,18 +70,28 @@ uint32_t CGxDevice::s_texFormatBytesPerBlock[] = {
|
|||
4 // GxTex_D24X8
|
||||
};
|
||||
|
||||
CGxDevice* CGxDevice::NewGLL() {
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
void* m = SMemAlloc(sizeof(CGxDeviceGLL), __FILE__, __LINE__, 0);
|
||||
|
||||
if (m) {
|
||||
return new (m) CGxDeviceGLL();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
CGxDevice* CGxDevice::NewD3d() {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CGxDevice* CGxDevice::NewD3d9Ex() {
|
||||
// TODO
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
CGxDevice* CGxDevice::NewGLL() {
|
||||
void* m = SMemAlloc(sizeof(CGxDeviceGLL), __FILE__, __LINE__, 0);
|
||||
|
||||
if (m) {
|
||||
return new (m) CGxDeviceGLL();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CGxDevice* CGxDevice::NewOpenGl() {
|
||||
// TODO
|
||||
// void* m = SMemAlloc(sizeof(CGxDeviceOpenGl), __FILE__, __LINE__, 0);
|
||||
|
|
|
|||
|
|
@ -46,8 +46,12 @@ class CGxDevice {
|
|||
static uint32_t s_texFormatBytesPerBlock[];
|
||||
|
||||
// Static functions
|
||||
static CGxDevice* NewGLL(void);
|
||||
static CGxDevice* NewOpenGl(void);
|
||||
static CGxDevice* NewD3d();
|
||||
static CGxDevice* NewD3d9Ex();
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
static CGxDevice* NewGLL();
|
||||
#endif
|
||||
static CGxDevice* NewOpenGl();
|
||||
|
||||
// Member variables
|
||||
TSGrowableArray<CGxPushedRenderState> m_pushedStates;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ bool s_forceOnscreen;
|
|||
Rect s_savedWindowRect;
|
||||
Rect s_savedWindowZoomedRect;
|
||||
|
||||
int32_t OsGetDefaultWindowRect(tagRECT* rect) {
|
||||
int32_t OsGetDefaultWindowRect(RECT* rect) {
|
||||
auto window = g_theGxDevicePtr->DeviceDefWindow();
|
||||
|
||||
rect->left = window.minX;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(WHOA_SYSTEM_WIN)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(WHOA_SYSTEM_MAC)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
|
|
@ -16,14 +20,16 @@ struct Rect {
|
|||
};
|
||||
#endif
|
||||
|
||||
struct tagRECT {
|
||||
#if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX)
|
||||
typedef struct tagRECT {
|
||||
int32_t left;
|
||||
int32_t top;
|
||||
int32_t right;
|
||||
int32_t bottom;
|
||||
};
|
||||
} RECT;
|
||||
#endif
|
||||
|
||||
int32_t OsGetDefaultWindowRect(tagRECT* rect);
|
||||
int32_t OsGetDefaultWindowRect(RECT* rect);
|
||||
|
||||
Rect* GetSavedWindowBounds();
|
||||
|
||||
|
|
|
|||
|
|
@ -602,6 +602,7 @@ void CGxString::SetColor(const CImVector& color) {
|
|||
|
||||
int32_t CGxString::SetGradient(int32_t startCharacter, int32_t length) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CGxString::SetStringPosition(const C3Vector& position) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue