DXINIT_DirectX8

This commit is contained in:
krystalgamer 2024-09-07 19:01:31 +02:00
parent 9c1387cddd
commit 9ae7dec757
5 changed files with 158 additions and 8 deletions

View File

@ -1,4 +1,8 @@
#include "DXinit.h"
#include "SpideyDX.h"
#include "dcmodel.h"
#include "PCGfx.h"
#include "DXsound.h"
#include <cstdlib>
@ -8,6 +12,13 @@ EXPORT int gResolutionY;
EXPORT i32 gLowGraphics;
EXPORT void* gLowGraphicsRelated;
i32 gColorCount;
EXPORT HWND gDxHwnd;
EXPORT i32 gDxOptionRelated;
EXPORT LPDIRECTDRAWSURFACE7 pDDS;
// @Ok
void gsub_5027A0(void)
{
@ -27,10 +38,40 @@ void AUDIOGROUPS_GetGroup(char *)
printf("AUDIOGROUPS_GetGroup(char *)");
}
// @SMALLTODO
void DXINIT_DirectX8(HWND ,HINSTANCE,u32)
// @Ok
void DXINIT_DirectX8(
HWND hwnd,
HINSTANCE hInstance,
u32 a3)
{
printf("DXINIT_DirectX8(HWND__ *,HINSTANCE__ *,u32)");
i32 v3 = a3;
gDxOptionRelated = a3 & 1;
gDxHwnd = hwnd;
PreComputeConvertedColors(1.0);
PCGfx_SetBrightness(gBrightnessRelated);
if (gLowGraphics)
v3 &= 0xFFFFFFFD;
initDirectDraw7(hwnd);
if (!initDirect3D7(v3))
{
i32 v4 = gColorCount;
shutdownDirect3D7(1);
gColorCount = 16;
initDirectDraw7(hwnd);
initDirect3D7(v3);
gColorCount = v4;
}
if (gLowGraphics || !pDDS)
v3 &= ~2;
initDirectSound8(hwnd);
initDirectInput8(hInstance);
DXPOLY_Init(v3);
}
// @SMALLTODO
@ -145,9 +186,10 @@ void getNextNumber(char *,i32 *)
}
// @MEDIUMTODO
void initDirect3D7(u32)
u8 initDirect3D7(u32)
{
printf("initDirect3D7(u32)");
return (u8)0x07092024;
}
// @MEDIUMTODO

View File

@ -33,7 +33,7 @@ EXPORT void enumDisplayModes(void);
EXPORT void enumerateModesCB(DDSURFACEDESC2 *,void *);
EXPORT void enumerateZBuffersCB(DDPIXELFORMAT *,void *);
EXPORT void getNextNumber(char *,i32 *);
EXPORT void initDirect3D7(u32);
EXPORT u8 initDirect3D7(u32);
EXPORT void initDirectDraw7(HWND);
EXPORT void initDirectInput8(HINSTANCE);
EXPORT void initDirectSound8(HWND);
@ -42,6 +42,8 @@ EXPORT void shutdownDirectInput8(void);
EXPORT void shutdownDirectSound8(void);
EXPORT void gsub_5027A0(void);
EXPORT extern i32 gColorCount;
#define DISPLAY_DI_ERROR(x) displayDIError(x, __FILE__, __LINE__)
#endif

View File

@ -1 +1,61 @@
#include "dcmodel.h"
// @SMALLTODO
void DCClearSkater(void)
{
printf("DCClearSkater(void)");
}
// @SMALLTODO
DCKeyFrame::~DCKeyFrame(void)
{
printf("DCKeyFrame::~DCKeyFrame(void)");
}
// @SMALLTODO
DCMaterial::~DCMaterial(void)
{
printf("DCMaterial::~DCMaterial(void)");
}
// @MEDIUMTODO
void DCModel_CreateFromSModel(DCModelData *,SModel *,i32,i32 *,bool,i32)
{
printf("DCModel_CreateFromSModel(DCModelData *,SModel *,i32,i32 *,bool,i32)");
}
// @SMALLTODO
DCObject::~DCObject(void)
{
printf("DCObject::~DCObject(void)");
}
// @SMALLTODO
DCObjectList::~DCObjectList(void)
{
printf("DCObjectList::~DCObjectList(void)");
}
// @SMALLTODO
void DCSkaterModel::ClearSkaterModel(void)
{
printf("DCSkaterModel::ClearSkaterModel(void)");
}
// @SMALLTODO
DCSkaterModel::~DCSkaterModel(void)
{
printf("DCSkaterModel::~DCSkaterModel(void)");
}
// @SMALLTODO
DCStrip::~DCStrip(void)
{
printf("DCStrip::~DCStrip(void)");
}
// @SMALLTODO
void PreComputeConvertedColors(float)
{
printf("PreComputeConvertedColors(float)");
}

View File

@ -3,4 +3,50 @@
#ifndef DCMODEL_H
#define DCMODEL_H
#include "export.h"
EXPORT void DCClearSkater(void);
class DCKeyFrame
{
public:
EXPORT ~DCKeyFrame(void);
};
class DCMaterial
{
public:
EXPORT DCMaterial::~DCMaterial(void);
};
class DCObject
{
EXPORT ~DCObject(void);
};
class DCObjectList
{
public:
EXPORT ~DCObjectList(void);
};
class DCSkaterModel
{
public:
EXPORT void ClearSkaterModel(void);
EXPORT ~DCSkaterModel(void);
};
class DCStrip
{
EXPORT ~DCStrip(void);
};
struct DCModelData;
struct SModel;
EXPORT void DCModel_CreateFromSModel(DCModelData *,SModel *,i32,i32 *,bool,i32);
EXPORT void PreComputeConvertedColors(float);
#endif

View File

@ -1,6 +1,6 @@
#include "non_win32.h"
// #define BOOT_GAME
#define BOOT_GAME
#include "main.h"
#include "ob.h"