migrated files to non_win32.h

This commit is contained in:
krystalgamer 2024-08-23 23:24:56 +01:00
parent f55361c597
commit e32e8bbaad
10 changed files with 38 additions and 64 deletions

View File

@ -9,13 +9,11 @@ void AUDIOGROUPS_GetGroup(char *)
printf("AUDIOGROUPS_GetGroup(char *)");
}
#ifdef _WIN32
// @SMALLTODO
void DXINIT_DirectX8(HWND ,HINSTANCE,u32)
{
printf("DXINIT_DirectX8(HWND__ *,HINSTANCE__ *,u32)");
}
#endif
// @SMALLTODO
void DXINIT_GetCurrentResolution(u32 *,u32 *)
@ -132,19 +130,19 @@ void initDirect3D7(u32)
}
// @MEDIUMTODO
void initDirectDraw7(HWND__ *)
void initDirectDraw7(HWND)
{
printf("initDirectDraw7(HWND__ *)");
}
// @SMALLTODO
void initDirectInput8(HINSTANCE__ *)
void initDirectInput8(HINSTANCE)
{
printf("initDirectInput8(HINSTANCE__ *)");
}
// @SMALLTODO
void initDirectSound8(HWND__ *)
void initDirectSound8(HWND)
{
printf("initDirectSound8(HWND__ *)");
}

View File

@ -5,16 +5,7 @@
#include "export.h"
#ifdef _WIN32
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#else
// @FIXME
#define HWND__ i32
// @FIXME
#define HINSTANCE__ i32
#endif
#include "non_win32.h"
// @FIXME
#define _D3DDeviceDesc7 i32
@ -26,10 +17,7 @@
EXPORT void DXINIT_GetCurrentResolution(int *, int *);
EXPORT void AUDIOGROUPS_GetGroup(char *);
#ifdef _WIN32
EXPORT void DXINIT_DirectX8(HWND, HINSTANCE,u32);
#endif
EXPORT void DXINIT_GetCurrentResolution(u32 *,u32 *);
EXPORT void DXINIT_GetNextColorDepth(u32);
EXPORT void DXINIT_GetNextResolution(u32 *,u32 *,u32,i32,bool);
@ -49,9 +37,9 @@ EXPORT void enumerateModesCB(_DDSURFACEDESC2 *,void *);
EXPORT void enumerateZBuffersCB(_DDPIXELFORMAT *,void *);
EXPORT void getNextNumber(char *,i32 *);
EXPORT void initDirect3D7(u32);
EXPORT void initDirectDraw7(HWND__ *);
EXPORT void initDirectInput8(HINSTANCE__ *);
EXPORT void initDirectSound8(HWND__ *);
EXPORT void initDirectDraw7(HWND);
EXPORT void initDirectInput8(HINSTANCE);
EXPORT void initDirectSound8(HWND);
EXPORT void shutdownDirect3D7(i32);
EXPORT void shutdownDirectInput8(void);
EXPORT void shutdownDirectSound8(void);

View File

@ -5,13 +5,7 @@
#include "export.h"
#ifdef _WIN32
#include <windows.h>
#else
//@FIXME
typedef i32 tWAVEFORMATEX;
#endif
#include "non_win32.h"
//@FIXME
typedef void* IDirectInputA;

View File

@ -356,11 +356,6 @@ u8 PCINPUT_UpdateMouse(void)
if ( !gMouseStatus || !DXINPUT_PollMouse(&v5, &v6) )
return 0;
/*
i32 v2 = v6 * 1.0f + gMouseY;
i32 v3 = v5 * 1.0f + gMouseX;
*/
gOldMouseX = gMouseX;
gOldMouseY = gMouseY;

View File

@ -79,14 +79,12 @@ void SPIDEYDX_Shutdown(void)
printf("SPIDEYDX_Shutdown(void)");
}
#ifdef _WIN32
// @SMALLTODO
LRESULT CALLBACK SpideyWndProc(HWND, UINT, WPARAM, LPARAM)
{
printf("SpideyWndProc(HWND__ *,u32,u32,long)");
return 0;
}
#endif
// @Ok
// @Matching

View File

@ -4,11 +4,7 @@
#define SPIDEYDX_H
#include "export.h"
#ifdef _WIN32
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "non_win32.h"
EXPORT extern i32 gRenderTest;
@ -30,18 +26,14 @@ EXPORT void SPIDEYDX_SaveSettings(void);
EXPORT void SPIDEYDX_Shutdown(void);
EXPORT void DXERR_printf(const char*, ...);
#ifdef _WIN32
EXPORT LRESULT CALLBACK SpideyWndProc(HWND, UINT, WPARAM, LPARAM);
EXPORT i32 WinYield(void);
#endif
EXPORT void debugSettings(void);
EXPORT void mipmapOffset(u32,u32,float);
EXPORT void parseCommandLine(char *);
#ifdef _WIN32
EXPORT i32 WINAPI RealWinMain(HINSTANCE, HINSTANCE, LPSTR, i32);
#endif
EXPORT extern HWND gHwnd;

View File

@ -1,13 +1,4 @@
#define WINDOWS_LEAN_AND_MEAN
#ifdef _WIN32
#include <windows.h>
#else
#define WINAPI
#define HINSTANCE int
#define PSTR char*
#endif
#include "non_win32.h"
#include "main.h"
#include "ob.h"

View File

@ -48,9 +48,5 @@ typedef int i32;
#define OVERRIDE
#endif
#ifndef _WIN32
typedef i32* HWND;
#endif
#endif

View File

@ -9,5 +9,32 @@
u32 GetTickCount();
typedef i32* HANDLE;
#define INVALID_HANDLE_VALUE ((HANDLE)(-1))
// @FIXME
typedef i32* HWND;
// @FIXME
typedef i32 HINSTANCE;
//@FIXME
typedef i32 tWAVEFORMATEX;
typedef i32 LRESULT;
typedef u32 UINT;
typedef i32 LPARAM;
typedef u32* WPARAM;
typedef char* LPSTR;
typedef char* PSTR;
#define WINAPI
#define CALLBACK
#else
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#endif
#endif

View File

@ -5,12 +5,7 @@
#include "export.h"
#ifdef _WIN32
#include <windows.h>
#else
typedef i32* HANDLE;
#define INVALID_HANDLE_VALUE ((HANDLE)(-1))
#endif
#include "non_win32.h"
struct SGDOpenFile