mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
NOT IMPLEMENTED corrections (#146)
This commit is contained in:
parent
711a6a21bf
commit
046cd0c7e9
@ -199,6 +199,7 @@ add_library(minimfc STATIC EXCLUDE_FROM_ALL
|
|||||||
miniwin/minimfc/src/minimfc.cpp
|
miniwin/minimfc/src/minimfc.cpp
|
||||||
)
|
)
|
||||||
target_include_directories(minimfc PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/miniwin/minimfc/include>")
|
target_include_directories(minimfc PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/miniwin/minimfc/include>")
|
||||||
|
target_include_directories(minimfc PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/miniwin/miniwin/src/include")
|
||||||
target_compile_definitions(minimfc PUBLIC "MINIMFC")
|
target_compile_definitions(minimfc PUBLIC "MINIMFC")
|
||||||
target_link_libraries(minimfc PRIVATE SDL3::SDL3 miniwin)
|
target_link_libraries(minimfc PRIVATE SDL3::SDL3 miniwin)
|
||||||
|
|
||||||
|
|||||||
@ -81,8 +81,8 @@ typedef struct IUnknown* LPUNKNOWN;
|
|||||||
|
|
||||||
struct CWnd {
|
struct CWnd {
|
||||||
HWND m_hWnd;
|
HWND m_hWnd;
|
||||||
void EnableWindow(bool bEnable) {}
|
void EnableWindow(bool bEnable);
|
||||||
void SetWindowText(const char* text) {}
|
void SetWindowText(const char* text);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CDataExchange {
|
struct CDataExchange {
|
||||||
@ -93,22 +93,22 @@ struct CDialog {
|
|||||||
HWND m_hWnd;
|
HWND m_hWnd;
|
||||||
int m_nIDTemplate;
|
int m_nIDTemplate;
|
||||||
CWnd* m_pParentWnd;
|
CWnd* m_pParentWnd;
|
||||||
CDialog() : m_nIDTemplate(0), m_pParentWnd(nullptr) {}
|
CDialog();
|
||||||
CDialog(int nIDTemplate) : m_nIDTemplate(nIDTemplate), m_pParentWnd(nullptr) {}
|
CDialog(int nIDTemplate);
|
||||||
CDialog(int nIDTemplate, CWnd* pParent) : m_nIDTemplate(nIDTemplate), m_pParentWnd(pParent) {}
|
CDialog(int nIDTemplate, CWnd* pParent);
|
||||||
virtual BOOL OnInitDialog() { return TRUE; }
|
virtual BOOL OnInitDialog();
|
||||||
void OnCancel() {}
|
void OnCancel();
|
||||||
virtual void OnOK() {}
|
virtual void OnOK();
|
||||||
virtual void DoModal() {}
|
virtual void DoModal();
|
||||||
virtual void Default() {}
|
virtual void Default();
|
||||||
virtual void EndDialog(int nResult) {}
|
virtual void EndDialog(int nResult);
|
||||||
virtual void DoDataExchange(CDataExchange* pDX) {}
|
virtual void DoDataExchange(CDataExchange* pDX);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CPaintDC {
|
struct CPaintDC {
|
||||||
void* m_hDC;
|
void* m_hDC;
|
||||||
CPaintDC(CDialog* hWnd) {}
|
CPaintDC(CDialog* hWnd);
|
||||||
void Draw() {}
|
void Draw();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CMenu {
|
struct CMenu {
|
||||||
@ -120,10 +120,10 @@ struct CMenu {
|
|||||||
pMenu->m_hMenu = hMenu;
|
pMenu->m_hMenu = hMenu;
|
||||||
return pMenu;
|
return pMenu;
|
||||||
}
|
}
|
||||||
bool InsertMenu(UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCTSTR lpszNewItem) { return true; }
|
bool InsertMenu(UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCTSTR lpszNewItem);
|
||||||
bool RemoveMenu(UINT uPosition, UINT uFlags) { return true; }
|
bool RemoveMenu(UINT uPosition, UINT uFlags);
|
||||||
bool SetMenuItemInfo(UINT uIDItem, const void* pMenuItemInfo, bool fByPosition = false) { return true; }
|
bool SetMenuItemInfo(UINT uIDItem, const void* pMenuItemInfo, bool fByPosition = false);
|
||||||
int GetMenuItemCount() const { return 0; }
|
int GetMenuItemCount() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CWinApp {
|
struct CWinApp {
|
||||||
@ -251,92 +251,42 @@ inline LSTATUS RegCreateKeyEx(
|
|||||||
|
|
||||||
void OutputDebugString(const char* lpOutputString);
|
void OutputDebugString(const char* lpOutputString);
|
||||||
|
|
||||||
inline void* GetProcAddress(HMODULE module, const char* name)
|
void* GetProcAddress(HMODULE module, const char* name);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int miniwin_stricmp(const char* str1, const char* str2);
|
int miniwin_stricmp(const char* str1, const char* str2);
|
||||||
#define _stricmp miniwin_stricmp
|
#define _stricmp miniwin_stricmp
|
||||||
|
|
||||||
inline HICON LoadIcon(HINSTANCE hInstance, LPCSTR lpIconName)
|
HICON LoadIcon(HINSTANCE hInstance, LPCSTR lpIconName);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int lstrcmpi(LPCSTR lpString1, LPCSTR lpString2)
|
int lstrcmpi(LPCSTR lpString1, LPCSTR lpString2);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HINSTANCE AfxFindResourceHandle(LPCTSTR lpszResourceName, int lpszResourceType)
|
HINSTANCE AfxFindResourceHandle(LPCTSTR lpszResourceName, int lpszResourceType);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HMODULE LoadLibrary(const char* name)
|
HMODULE LoadLibrary(const char* name);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int FreeLibrary(void* hModule)
|
int FreeLibrary(void* hModule);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HMENU GetSystemMenu(HWND hWnd, bool bRevert)
|
HMENU GetSystemMenu(HWND hWnd, bool bRevert);
|
||||||
{
|
|
||||||
assert(false && "Needs implementation");
|
|
||||||
return reinterpret_cast<HMENU>(0x1234);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HWND WINAPI FindWindow(LPCSTR lpClassName, LPCSTR lpWindowName)
|
HWND WINAPI FindWindow(LPCSTR lpClassName, LPCSTR lpWindowName);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline LRESULT SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam)
|
LRESULT SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline LRESULT SendMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
LRESULT SendMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL IsDlgButtonChecked(int nIDButton)
|
BOOL IsDlgButtonChecked(int nIDButton);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline CWnd* GetDlgItem(int id)
|
CWnd* GetDlgItem(int id);
|
||||||
{
|
|
||||||
return new CWnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL OnInitDialog(HWND hDlg, HWND hwndFocus, LPARAM lParam)
|
BOOL OnInitDialog(HWND hDlg, HWND hwndFocus, LPARAM lParam);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL CheckRadioButton(int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
|
BOOL CheckRadioButton(int nIDFirstButton, int nIDLastButton, int nIDCheckButton);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL CheckDlgButton(int nIDButton, BOOL uCheck)
|
BOOL CheckDlgButton(int nIDButton, BOOL uCheck);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Enable3dControls()
|
void Enable3dControls();
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void ParseCommandLine(CCommandLineInfo& cmdInfo)
|
void ParseCommandLine(CCommandLineInfo& cmdInfo);
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
struct AFX_MODULE_STATE {
|
struct AFX_MODULE_STATE {
|
||||||
CWinApp* m_pCurrentWinApp;
|
CWinApp* m_pCurrentWinApp;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#include "minimfc.h"
|
#include "minimfc.h"
|
||||||
|
|
||||||
#include "miniwin.h"
|
#include "miniwin.h"
|
||||||
|
#include "miniwin_p.h"
|
||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <SDL3/SDL_main.h>
|
#include <SDL3/SDL_main.h>
|
||||||
@ -14,6 +15,100 @@ CWinApp* wndTop;
|
|||||||
SDL_Window* window;
|
SDL_Window* window;
|
||||||
const char* title = "Configure LEGO Island";
|
const char* title = "Configure LEGO Island";
|
||||||
|
|
||||||
|
void CWnd::EnableWindow(bool bEnable)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
void CWnd::SetWindowText(const char* text)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
CDialog::CDialog() : m_nIDTemplate(0), m_pParentWnd(nullptr)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
CDialog::CDialog(int nIDTemplate) : m_nIDTemplate(nIDTemplate), m_pParentWnd(nullptr)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
CDialog::CDialog(int nIDTemplate, CWnd* pParent) : m_nIDTemplate(nIDTemplate), m_pParentWnd(pParent)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CDialog::OnInitDialog()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::OnCancel()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::OnOK()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::DoModal()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::Default()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::EndDialog(int nResult)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDialog::DoDataExchange(CDataExchange* pDX)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
CPaintDC::CPaintDC(CDialog* hWnd)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CMenu::InsertMenu(UINT uPosition, UINT uFlags, UINT_PTR uIDNewItem, LPCTSTR lpszNewItem)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CMenu::RemoveMenu(UINT uPosition, UINT uFlags)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CMenu::SetMenuItemInfo(UINT uIDItem, const void* pMenuItemInfo, bool fByPosition)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMenu::GetMenuItemCount() const
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPaintDC::Draw()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
CWinApp::CWinApp()
|
CWinApp::CWinApp()
|
||||||
{
|
{
|
||||||
if (wndTop != NULL) {
|
if (wndTop != NULL) {
|
||||||
@ -97,11 +192,7 @@ BOOL GetWindowRect(HWND hWnd, RECT* Rect)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (hWnd == NULL) {
|
if (hWnd == NULL) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unregistered HWND %p", hWnd);
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
Rect->left = 0;
|
|
||||||
Rect->top = 0;
|
|
||||||
Rect->right = 640;
|
|
||||||
Rect->bottom = 480;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
SDL_GetWindowPosition(hWnd, &x, &y);
|
SDL_GetWindowPosition(hWnd, &x, &y);
|
||||||
@ -129,6 +220,12 @@ void OutputDebugString(const char* lpOutputString)
|
|||||||
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "%s", lpOutputString);
|
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "%s", lpOutputString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* GetProcAddress(HMODULE module, const char* name)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int miniwin_stricmp(const char* str1, const char* str2)
|
int miniwin_stricmp(const char* str1, const char* str2)
|
||||||
{
|
{
|
||||||
return SDL_strcasecmp(str1, str2);
|
return SDL_strcasecmp(str1, str2);
|
||||||
@ -139,3 +236,98 @@ void GlobalMemoryStatus(MEMORYSTATUS* memory_status)
|
|||||||
memory_status->dwLength = sizeof(*memory_status);
|
memory_status->dwLength = sizeof(*memory_status);
|
||||||
memory_status->dwTotalPhys = 1024 * SDL_GetSystemRAM();
|
memory_status->dwTotalPhys = 1024 * SDL_GetSystemRAM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HICON LoadIcon(HINSTANCE hInstance, LPCSTR lpIconName)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int lstrcmpi(LPCSTR lpString1, LPCSTR lpString2)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HINSTANCE AfxFindResourceHandle(LPCTSTR lpszResourceName, int lpszResourceType)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HMODULE LoadLibrary(const char* name)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int FreeLibrary(void* hModule)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HMENU GetSystemMenu(HWND hWnd, bool bRevert)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
assert(false && "Needs implementation");
|
||||||
|
return reinterpret_cast<HMENU>(0x1234);
|
||||||
|
}
|
||||||
|
|
||||||
|
HWND WINAPI FindWindow(LPCSTR lpClassName, LPCSTR lpWindowName)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LRESULT SendMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL IsDlgButtonChecked(int nIDButton)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
CWnd* GetDlgItem(int id)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return new CWnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL OnInitDialog(HWND hDlg, HWND hwndFocus, LPARAM lParam)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CheckRadioButton(int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CheckDlgButton(int nIDButton, BOOL uCheck)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Enable3dControls()
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ParseCommandLine(CCommandLineInfo& cmdInfo)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
}
|
||||||
|
|||||||
@ -156,63 +156,25 @@ struct IUnknown {
|
|||||||
|
|
||||||
BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
|
BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
|
||||||
|
|
||||||
inline HDC WINAPI GetDC(HWND hWnd)
|
HDC WINAPI GetDC(HWND hWnd);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int WINAPI ReleaseDC(HWND hWnd, HDC hDC)
|
int WINAPI ReleaseDC(HWND hWnd, HDC hDC);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int WINAPI GetDeviceCaps(HDC hdc, int index)
|
int WINAPI GetDeviceCaps(HDC hdc, int index);
|
||||||
{
|
|
||||||
|
|
||||||
if (index == RASTERCAPS) {
|
BOOL RedrawWindow(void* hWnd, const void* lprcUpdate, void* hrgnUpdate, unsigned int flags);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (index == SIZEPALETTE) {
|
|
||||||
return 256;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL RedrawWindow(void* hWnd, const void* lprcUpdate, void* hrgnUpdate, unsigned int flags)
|
int SetBkColor(void*, int);
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int SetBkColor(void*, int)
|
int SetBkMode(void*, int);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int SetBkMode(void*, int)
|
int SetTextColor(HDC hdc, int color);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int SetTextColor(HDC hdc, int color)
|
BOOL GetTextExtentPoint(HDC hdc, LPCSTR lpString, int c, SIZE* psizl);
|
||||||
{
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline static BOOL GetTextExtentPoint(HDC hdc, LPCSTR lpString, int c, SIZE* psizl)
|
int ExtTextOut(HDC, int, int, unsigned int, const RECT*, LPCSTR, unsigned int, void*);
|
||||||
{
|
|
||||||
if (psizl) {
|
|
||||||
psizl->cx = 8 * c;
|
|
||||||
psizl->cy = 16;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int ExtTextOut(HDC, int, int, unsigned int, const RECT*, LPCSTR, unsigned int, void*)
|
HFONT CreateFont(
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HFONT CreateFont(
|
|
||||||
int,
|
int,
|
||||||
int,
|
int,
|
||||||
int,
|
int,
|
||||||
@ -227,32 +189,17 @@ inline HFONT CreateFont(
|
|||||||
unsigned int,
|
unsigned int,
|
||||||
unsigned int,
|
unsigned int,
|
||||||
LPCSTR
|
LPCSTR
|
||||||
)
|
);
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void* SelectObject(HDC, HFONT)
|
void* SelectObject(HDC, HFONT);
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int GetTextExtentPoint32(HDC hdc, LPCSTR str, int len, SIZE* out)
|
int GetTextExtentPoint32(HDC hdc, LPCSTR str, int len, SIZE* out);
|
||||||
{
|
|
||||||
return GetTextExtentPoint(hdc, str, len, out);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HMENU GetMenu(HWND hWnd)
|
HMENU GetMenu(HWND hWnd);
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int DrawMenuBar(void* hWnd)
|
int DrawMenuBar(void* hWnd);
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline static int StretchDIBits(
|
int StretchDIBits(
|
||||||
void* hdc,
|
void* hdc,
|
||||||
int xDest,
|
int xDest,
|
||||||
int yDest,
|
int yDest,
|
||||||
@ -266,43 +213,18 @@ inline static int StretchDIBits(
|
|||||||
const void* lpbmi,
|
const void* lpbmi,
|
||||||
unsigned int iUsage,
|
unsigned int iUsage,
|
||||||
uint32_t rop
|
uint32_t rop
|
||||||
)
|
);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline LONG GetWindowLong(HWND hWnd, int nIndex)
|
LONG GetWindowLong(HWND hWnd, int nIndex);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong)
|
LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int DeleteObject(void*)
|
int DeleteObject(void*);
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline BOOL AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle)
|
BOOL AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int SetRect(RECT* rc, int left, int top, int right, int bottom)
|
int SetRect(RECT* rc, int left, int top, int right, int bottom);
|
||||||
{
|
|
||||||
rc->left = left;
|
|
||||||
rc->top = top;
|
|
||||||
rc->right = right;
|
|
||||||
rc->bottom = bottom;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID WINAPI Sleep(DWORD dwMilliseconds);
|
VOID WINAPI Sleep(DWORD dwMilliseconds);
|
||||||
|
|
||||||
inline BOOL ClientToScreen(HWND hWnd, LPPOINT lpPoint)
|
BOOL ClientToScreen(HWND hWnd, LPPOINT lpPoint);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -301,7 +301,7 @@ struct IDirectDrawPalette : virtual public IUnknown {
|
|||||||
typedef struct IDirectDrawPalette* LPDIRECTDRAWPALETTE;
|
typedef struct IDirectDrawPalette* LPDIRECTDRAWPALETTE;
|
||||||
|
|
||||||
struct IDirectDrawClipper : virtual public IUnknown {
|
struct IDirectDrawClipper : virtual public IUnknown {
|
||||||
virtual HRESULT SetHWnd(DWORD unnamedParam1, HWND hWnd) { return DD_OK; }
|
virtual HRESULT SetHWnd(DWORD unnamedParam1, HWND hWnd);
|
||||||
};
|
};
|
||||||
typedef IDirectDrawClipper* LPDIRECTDRAWCLIPPER;
|
typedef IDirectDrawClipper* LPDIRECTDRAWCLIPPER;
|
||||||
|
|
||||||
@ -380,29 +380,10 @@ HRESULT DirectDrawCreate(LPGUID lpGuid, LPDIRECTDRAW* lplpDD, IUnknown* pUnkOute
|
|||||||
typedef BOOL (*LPDDENUMCALLBACKA)(GUID*, LPSTR, LPSTR, LPVOID);
|
typedef BOOL (*LPDDENUMCALLBACKA)(GUID*, LPSTR, LPSTR, LPVOID);
|
||||||
HRESULT DirectDrawEnumerate(LPDDENUMCALLBACKA cb, void* context);
|
HRESULT DirectDrawEnumerate(LPDDENUMCALLBACKA cb, void* context);
|
||||||
|
|
||||||
inline UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries)
|
UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries);
|
||||||
{
|
|
||||||
for (UINT i = 0; i < cEntries; i++) {
|
|
||||||
UINT val = iStart + i;
|
|
||||||
pPalEntries[i].peRed = val;
|
|
||||||
pPalEntries[i].peGreen = val;
|
|
||||||
pPalEntries[i].peBlue = val;
|
|
||||||
pPalEntries[i].peFlags = PC_NONE;
|
|
||||||
}
|
|
||||||
return cEntries;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HPALETTE CreatePalette(LPLOGPALETTE lpLogPalette)
|
HPALETTE CreatePalette(LPLOGPALETTE lpLogPalette);
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int SelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground)
|
int SelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int RealizePalette(HDC hdc)
|
int RealizePalette(HDC hdc);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// --- Functions ---
|
// --- Functions ---
|
||||||
int _chdir(char* path)
|
int _chdir(char* path);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -12,7 +12,4 @@ intptr_t _spawnl(
|
|||||||
const char* arg2,
|
const char* arg2,
|
||||||
const char* arg3,
|
const char* arg3,
|
||||||
...
|
...
|
||||||
)
|
);
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ ULONG IUnknown::Release()
|
|||||||
|
|
||||||
HRESULT IUnknown::QueryInterface(const GUID& riid, void** ppvObject)
|
HRESULT IUnknown::QueryInterface(const GUID& riid, void** ppvObject)
|
||||||
{
|
{
|
||||||
SDL_LogError(LOG_CATEGORY_MINIWIN, "IUnknown does not implement guid");
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,194 @@ BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HDC WINAPI GetDC(HWND hWnd)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WINAPI ReleaseDC(HWND hWnd, HDC hDC)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WINAPI GetDeviceCaps(HDC hdc, int index)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (index == RASTERCAPS) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (index == SIZEPALETTE) {
|
||||||
|
return 256;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL RedrawWindow(void* hWnd, const void* lprcUpdate, void* hrgnUpdate, unsigned int flags)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SetBkColor(void*, int)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SetBkMode(void*, int)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SetTextColor(HDC hdc, int color)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL GetTextExtentPoint(HDC hdc, LPCSTR lpString, int c, SIZE* psizl)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
if (psizl) {
|
||||||
|
psizl->cx = 8 * c;
|
||||||
|
psizl->cy = 16;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ExtTextOut(HDC, int, int, unsigned int, const RECT*, LPCSTR, unsigned int, void*)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
HFONT CreateFont(
|
||||||
|
int,
|
||||||
|
int,
|
||||||
|
int,
|
||||||
|
int,
|
||||||
|
int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
unsigned int,
|
||||||
|
LPCSTR
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* SelectObject(HDC, HFONT)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetTextExtentPoint32(HDC hdc, LPCSTR str, int len, SIZE* out)
|
||||||
|
{
|
||||||
|
return GetTextExtentPoint(hdc, str, len, out);
|
||||||
|
}
|
||||||
|
|
||||||
|
HMENU GetMenu(HWND hWnd)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DrawMenuBar(void* hWnd)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int StretchDIBits(
|
||||||
|
void* hdc,
|
||||||
|
int xDest,
|
||||||
|
int yDest,
|
||||||
|
int DestWidth,
|
||||||
|
int DestHeight,
|
||||||
|
int xSrc,
|
||||||
|
int ySrc,
|
||||||
|
int SrcWidth,
|
||||||
|
int SrcHeight,
|
||||||
|
const void* lpBits,
|
||||||
|
const void* lpbmi,
|
||||||
|
unsigned int iUsage,
|
||||||
|
uint32_t rop
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LONG GetWindowLong(HWND hWnd, int nIndex)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DeleteObject(void*)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SetRect(RECT* rc, int left, int top, int right, int bottom)
|
||||||
|
{
|
||||||
|
rc->left = left;
|
||||||
|
rc->top = top;
|
||||||
|
rc->right = right;
|
||||||
|
rc->bottom = bottom;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
VOID WINAPI Sleep(DWORD dwMilliseconds)
|
VOID WINAPI Sleep(DWORD dwMilliseconds)
|
||||||
{
|
{
|
||||||
SDL_Delay(dwMilliseconds);
|
SDL_Delay(dwMilliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL ClientToScreen(HWND hWnd, LPPOINT lpPoint)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _chdir(char* path)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
intptr_t _spawnl(
|
||||||
|
int mode,
|
||||||
|
const char* cmdname,
|
||||||
|
const char* arg0,
|
||||||
|
const char* arg1,
|
||||||
|
const char* arg2,
|
||||||
|
const char* arg3,
|
||||||
|
...
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
#include "miniwin_d3drmobject_p.h"
|
#include "miniwin_d3drmobject_p.h"
|
||||||
#include "miniwin_d3drmviewport_p.h"
|
#include "miniwin_d3drmviewport_p.h"
|
||||||
#include "miniwin_ddsurface_p.h"
|
#include "miniwin_ddsurface_p.h"
|
||||||
|
#include "miniwin_p.h"
|
||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
@ -60,10 +61,18 @@ struct Direct3DRMPickedArrayImpl : public IDirect3DRMPickedArray {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Direct3DRMWinDeviceImpl : public IDirect3DRMWinDevice {
|
struct Direct3DRMWinDeviceImpl : public IDirect3DRMWinDevice {
|
||||||
HRESULT Activate() override { return DD_OK; }
|
HRESULT Activate() override
|
||||||
HRESULT Paint() override { return DD_OK; }
|
{
|
||||||
void HandleActivate(WORD wParam) override {}
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
void HandlePaint(void* p_dc) override {}
|
return DD_OK;
|
||||||
|
}
|
||||||
|
HRESULT Paint() override
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return DD_OK;
|
||||||
|
}
|
||||||
|
void HandleActivate(WORD wParam) override { MINIWIN_NOT_IMPLEMENTED(); }
|
||||||
|
void HandlePaint(void* p_dc) override { MINIWIN_NOT_IMPLEMENTED(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Direct3DRMTextureImpl : public Direct3DRMObjectBase<IDirect3DRMTexture2> {
|
struct Direct3DRMTextureImpl : public Direct3DRMObjectBase<IDirect3DRMTexture2> {
|
||||||
@ -74,11 +83,16 @@ struct Direct3DRMTextureImpl : public Direct3DRMObjectBase<IDirect3DRMTexture2>
|
|||||||
*ppvObject = static_cast<IDirect3DRMTexture2*>(this);
|
*ppvObject = static_cast<IDirect3DRMTexture2*>(this);
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Direct3DRMTextureImpl does not implement guid");
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
HRESULT Changed(BOOL pixels, BOOL palette) override { return DD_OK; }
|
HRESULT Changed(BOOL pixels, BOOL palette) override
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return DD_OK;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Direct3DRMMaterialImpl : public Direct3DRMObjectBase<IDirect3DRMMaterial> {};
|
struct Direct3DRMMaterialImpl : public Direct3DRMObjectBase<IDirect3DRMMaterial> {};
|
||||||
|
|
||||||
SDL_GPUGraphicsPipeline* InitializeGraphicsPipeline(SDL_GPUDevice* device)
|
SDL_GPUGraphicsPipeline* InitializeGraphicsPipeline(SDL_GPUDevice* device)
|
||||||
@ -181,6 +195,7 @@ struct Direct3DRMImpl : virtual public IDirect3DRM2 {
|
|||||||
HRESULT CreateDeviceFromD3D(const IDirect3D2* d3d, IDirect3DDevice2* d3dDevice, IDirect3DRMDevice2** outDevice)
|
HRESULT CreateDeviceFromD3D(const IDirect3D2* d3d, IDirect3DDevice2* d3dDevice, IDirect3DRMDevice2** outDevice)
|
||||||
override
|
override
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return CreateDevice(outDevice, 640, 480);
|
return CreateDevice(outDevice, 640, 480);
|
||||||
}
|
}
|
||||||
HRESULT CreateDeviceFromSurface(
|
HRESULT CreateDeviceFromSurface(
|
||||||
|
|||||||
@ -85,25 +85,21 @@ HRESULT Direct3DRMDevice2Impl::GetDither()
|
|||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::SetTextureQuality(D3DRMTEXTUREQUALITY quality)
|
HRESULT Direct3DRMDevice2Impl::SetTextureQuality(D3DRMTEXTUREQUALITY quality)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DRMTEXTUREQUALITY Direct3DRMDevice2Impl::GetTextureQuality()
|
D3DRMTEXTUREQUALITY Direct3DRMDevice2Impl::GetTextureQuality()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return D3DRMTEXTUREQUALITY::LINEAR;
|
return D3DRMTEXTUREQUALITY::LINEAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMDevice2Impl::SetRenderMode(D3DRMRENDERMODE mode)
|
HRESULT Direct3DRMDevice2Impl::SetRenderMode(D3DRMRENDERMODE mode)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DRMRENDERMODE Direct3DRMDevice2Impl::GetRenderMode()
|
D3DRMRENDERMODE Direct3DRMDevice2Impl::GetRenderMode()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return D3DRMRENDERMODE::BLENDEDTRANSPARENCY;
|
return D3DRMRENDERMODE::BLENDEDTRANSPARENCY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ HRESULT Direct3DRMFrameImpl::DeleteChild(IDirect3DRMFrame* child)
|
|||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::SetSceneBackgroundRGB(float r, float g, float b)
|
HRESULT Direct3DRMFrameImpl::SetSceneBackgroundRGB(float r, float g, float b)
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,37 +63,31 @@ HRESULT Direct3DRMFrameImpl::GetPosition(int index, D3DVECTOR* position)
|
|||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMVisual* visual)
|
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMVisual* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->AddElement(visual);
|
return m_visuals->AddElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMVisual* visual)
|
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMVisual* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->DeleteElement(visual);
|
return m_visuals->DeleteElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMMesh* visual)
|
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMMesh* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->AddElement(visual);
|
return m_visuals->AddElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMMesh* visual)
|
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMMesh* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->DeleteElement(visual);
|
return m_visuals->DeleteElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMFrame* visual)
|
HRESULT Direct3DRMFrameImpl::AddVisual(IDirect3DRMFrame* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->AddElement(visual);
|
return m_visuals->AddElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMFrame* visual)
|
HRESULT Direct3DRMFrameImpl::DeleteVisual(IDirect3DRMFrame* visual)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_visuals->DeleteElement(visual);
|
return m_visuals->DeleteElement(visual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ void Direct3DRMViewportImpl::Update()
|
|||||||
|
|
||||||
m_vertexBuffer = SDL_CreateGPUBuffer(m_device, &bufferCreateInfo);
|
m_vertexBuffer = SDL_CreateGPUBuffer(m_device, &bufferCreateInfo);
|
||||||
|
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
SDL_GPUTransferBufferCreateInfo transferCreateInfo = {};
|
SDL_GPUTransferBufferCreateInfo transferCreateInfo = {};
|
||||||
transferCreateInfo.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
|
transferCreateInfo.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
|
||||||
transferCreateInfo.size = static_cast<Uint32>(sizeof(PositionColorVertex) * m_vertexCount);
|
transferCreateInfo.size = static_cast<Uint32>(sizeof(PositionColorVertex) * m_vertexCount);
|
||||||
@ -208,13 +209,11 @@ HRESULT Direct3DRMViewportImpl::GetCamera(IDirect3DRMFrame** camera)
|
|||||||
|
|
||||||
HRESULT Direct3DRMViewportImpl::SetProjection(D3DRMPROJECTIONTYPE type)
|
HRESULT Direct3DRMViewportImpl::SetProjection(D3DRMPROJECTIONTYPE type)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DRMPROJECTIONTYPE Direct3DRMViewportImpl::GetProjection()
|
D3DRMPROJECTIONTYPE Direct3DRMViewportImpl::GetProjection()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return D3DRMPROJECTIONTYPE::PERSPECTIVE;
|
return D3DRMPROJECTIONTYPE::PERSPECTIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,13 +255,11 @@ D3DVALUE Direct3DRMViewportImpl::GetField()
|
|||||||
|
|
||||||
DWORD Direct3DRMViewportImpl::GetWidth()
|
DWORD Direct3DRMViewportImpl::GetWidth()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_width;
|
return m_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD Direct3DRMViewportImpl::GetHeight()
|
DWORD Direct3DRMViewportImpl::GetHeight()
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return m_height;
|
return m_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,12 @@
|
|||||||
SDL_Window* DDWindow;
|
SDL_Window* DDWindow;
|
||||||
SDL_Surface* DDBackBuffer;
|
SDL_Surface* DDBackBuffer;
|
||||||
|
|
||||||
|
HRESULT IDirectDrawClipper::SetHWnd(DWORD unnamedParam1, HWND hWnd)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return DD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT DirectDrawImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
HRESULT DirectDrawImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
||||||
{
|
{
|
||||||
if (SDL_memcmp(&riid, &IID_IDirectDraw2, sizeof(GUID)) == 0) {
|
if (SDL_memcmp(&riid, &IID_IDirectDraw2, sizeof(GUID)) == 0) {
|
||||||
@ -26,7 +32,7 @@ HRESULT DirectDrawImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
|||||||
*ppvObject = static_cast<IDirect3D2*>(this);
|
*ppvObject = static_cast<IDirect3D2*>(this);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
SDL_LogError(LOG_CATEGORY_MINIWIN, "DirectDrawImpl does not implement guid");
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,9 +93,6 @@ HRESULT DirectDrawImpl::CreateSurface(
|
|||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
if ((lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) == DDSCAPS_PRIMARYSURFACE) {
|
if ((lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) == DDSCAPS_PRIMARYSURFACE) {
|
||||||
if ((lpDDSurfaceDesc->dwFlags & DDSD_BACKBUFFERCOUNT) == DDSD_BACKBUFFERCOUNT) {
|
|
||||||
SDL_Log("Todo: Switch to %d buffering", lpDDSurfaceDesc->dwBackBufferCount);
|
|
||||||
}
|
|
||||||
SDL_Surface* windowSurface = SDL_GetWindowSurface(DDWindow);
|
SDL_Surface* windowSurface = SDL_GetWindowSurface(DDWindow);
|
||||||
if (!windowSurface) {
|
if (!windowSurface) {
|
||||||
return DDERR_GENERIC;
|
return DDERR_GENERIC;
|
||||||
@ -190,6 +193,7 @@ HRESULT DirectDrawImpl::EnumDisplayModes(
|
|||||||
|
|
||||||
HRESULT DirectDrawImpl::FlipToGDISurface()
|
HRESULT DirectDrawImpl::FlipToGDISurface()
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,6 +308,7 @@ HRESULT DirectDrawImpl::GetDisplayMode(LPDDSURFACEDESC lpDDSurfaceDesc)
|
|||||||
|
|
||||||
HRESULT DirectDrawImpl::RestoreDisplayMode()
|
HRESULT DirectDrawImpl::RestoreDisplayMode()
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,6 +336,7 @@ HRESULT DirectDrawImpl::SetCooperativeLevel(HWND hWnd, DDSCLFlags dwFlags)
|
|||||||
|
|
||||||
HRESULT DirectDrawImpl::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
|
HRESULT DirectDrawImpl::SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +350,7 @@ HRESULT DirectDrawImpl::CreateDevice(const GUID& guid, void* pBackBuffer, IDirec
|
|||||||
HRESULT DirectDrawCreate(LPGUID lpGuid, LPDIRECTDRAW* lplpDD, IUnknown* pUnkOuter)
|
HRESULT DirectDrawCreate(LPGUID lpGuid, LPDIRECTDRAW* lplpDD, IUnknown* pUnkOuter)
|
||||||
{
|
{
|
||||||
if (lpGuid) {
|
if (lpGuid) {
|
||||||
MINIWIN_ERROR("Specifying a DirectDraw driver is not implemented");
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
*lplpDD = new DirectDrawImpl;
|
*lplpDD = new DirectDrawImpl;
|
||||||
@ -368,3 +374,33 @@ HRESULT DirectDrawEnumerate(LPDDENUMCALLBACKA cb, void* context)
|
|||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALETTEENTRY pPalEntries)
|
||||||
|
{
|
||||||
|
for (UINT i = 0; i < cEntries; i++) {
|
||||||
|
UINT val = iStart + i;
|
||||||
|
pPalEntries[i].peRed = val;
|
||||||
|
pPalEntries[i].peGreen = val;
|
||||||
|
pPalEntries[i].peBlue = val;
|
||||||
|
pPalEntries[i].peFlags = PC_NONE;
|
||||||
|
}
|
||||||
|
return cEntries;
|
||||||
|
}
|
||||||
|
|
||||||
|
HPALETTE CreatePalette(LPLOGPALETTE lpLogPalette)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int RealizePalette(HDC hdc)
|
||||||
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -42,7 +42,6 @@ HRESULT DirectDrawSurfaceImpl::QueryInterface(const GUID& riid, void** ppvObject
|
|||||||
// IDirectDrawSurface interface
|
// IDirectDrawSurface interface
|
||||||
HRESULT DirectDrawSurfaceImpl::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
HRESULT DirectDrawSurfaceImpl::AddAttachedSurface(LPDIRECTDRAWSURFACE lpDDSAttachedSurface)
|
||||||
{
|
{
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,6 +151,7 @@ HRESULT DirectDrawSurfaceImpl::GetAttachedSurface(LPDDSCAPS lpDDSCaps, LPDIRECTD
|
|||||||
|
|
||||||
HRESULT DirectDrawSurfaceImpl::GetDC(HDC* lphDC)
|
HRESULT DirectDrawSurfaceImpl::GetDC(HDC* lphDC)
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,6 +227,7 @@ HRESULT DirectDrawSurfaceImpl::Lock(
|
|||||||
|
|
||||||
HRESULT DirectDrawSurfaceImpl::ReleaseDC(HDC hDC)
|
HRESULT DirectDrawSurfaceImpl::ReleaseDC(HDC hDC)
|
||||||
{
|
{
|
||||||
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +247,7 @@ HRESULT DirectDrawSurfaceImpl::SetColorKey(DDColorKeyFlags dwFlags, LPDDCOLORKEY
|
|||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
if (lpDDColorKey->dwColorSpaceLowValue != lpDDColorKey->dwColorSpaceHighValue) {
|
if (lpDDColorKey->dwColorSpaceLowValue != lpDDColorKey->dwColorSpaceHighValue) {
|
||||||
return DDERR_GENERIC; // Not supported
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_SetSurfaceColorKey(m_surface, true, lpDDColorKey->dwColorSpaceLowValue) != 0) {
|
if (SDL_SetSurfaceColorKey(m_surface, true, lpDDColorKey->dwColorSpaceLowValue) != 0) {
|
||||||
@ -259,7 +260,7 @@ HRESULT DirectDrawSurfaceImpl::SetColorKey(DDColorKeyFlags dwFlags, LPDDCOLORKEY
|
|||||||
HRESULT DirectDrawSurfaceImpl::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
HRESULT DirectDrawSurfaceImpl::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette)
|
||||||
{
|
{
|
||||||
if (m_surface->format != SDL_PIXELFORMAT_INDEX8) {
|
if (m_surface->format != SDL_PIXELFORMAT_INDEX8) {
|
||||||
return DDERR_GENERIC;
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_palette) {
|
if (m_palette) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user