mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 05:19:43 +00:00
PCGfx_RenderModelPreview
This commit is contained in:
parent
7c9bb9577a
commit
c9e599050d
49
PCGfx.cpp
49
PCGfx.cpp
@ -3,6 +3,10 @@
|
||||
#include "DXsound.h"
|
||||
#include "SpideyDX.h"
|
||||
#include "DXinit.h"
|
||||
#include "camera.h"
|
||||
#include "mess.h"
|
||||
#include "ps2m3d.h"
|
||||
#include "pshell.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@ -108,7 +112,7 @@ void PCGfx_DrawTexture2D(i32,i32,i32,float,u32,u32,float)
|
||||
// @Ok
|
||||
// @Matching
|
||||
// @Note powerpc has fps counter here and fog level
|
||||
void PCGfx_EndScene(i32 a1)
|
||||
INLINE void PCGfx_EndScene(i32 a1)
|
||||
{
|
||||
if (gSceneRelated)
|
||||
{
|
||||
@ -253,10 +257,47 @@ void PCGfx_RenderInit(float a1, float a2, float a3)
|
||||
gRenderInitTwo[1] = gRenderInitTwo[0] / 4096.0f;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
void PCGfx_RenderModelPreview(void *,char const *,i32)
|
||||
// @NotOk
|
||||
// third parameter of rendesetup seems to be useless but also DB related
|
||||
void PCGfx_RenderModelPreview(
|
||||
void* a1,
|
||||
char const* a2,
|
||||
i32 a3)
|
||||
{
|
||||
printf("PCGfx_RenderModelPreview(void *,char const *,i32)");
|
||||
char v3[128];
|
||||
|
||||
M3dMaths_RotMatrixYXZ(&gMikeCamera[0].Angles, &gMikeCamera[0].Transform);
|
||||
TransMatrix(&gMikeCamera[0].Transform, &gMikeCamera[0].Position);
|
||||
PCGfx_BeginScene(1u, -1);
|
||||
|
||||
// @FIXME: third param seems to be ignored
|
||||
M3d_RenderSetup(&gMikeCamera[0], &gViewport, 0);
|
||||
M3d_Render(a1);
|
||||
M3d_RenderCleanup();
|
||||
Mess_SetSort(4095);
|
||||
PShell_SmallFont();
|
||||
Mess_SetRGB(0xFFu, 0xFFu, 0xFFu, 0);
|
||||
Mess_SetRGBBottom(0xFFu, 255, 255);
|
||||
Mess_SetShadowRGB(0xFFu);
|
||||
Mess_SetTextJustify(1);
|
||||
|
||||
sprintf(v3, "PSX: %s", a2);
|
||||
Mess_DrawText(20, 20, v3, 0, 0x1000u);
|
||||
sprintf(v3, "IDX: %i", a3);
|
||||
Mess_DrawText(220, 20, v3, 0, 0x1000u);
|
||||
sprintf(v3, "CAM: %i %i %i", gMikeCamera[0].Position.vx, gMikeCamera[0].Position.vy, gMikeCamera[0].Position.vz);
|
||||
Mess_DrawText(20, 45, v3, 0, 0x1000u);
|
||||
|
||||
CItem* pItem = static_cast<CItem*>(a1);
|
||||
sprintf(
|
||||
v3,
|
||||
"ITM: %i %i %i",
|
||||
pItem->mPos.vx >> 12,
|
||||
pItem->mPos.vy >> 12,
|
||||
pItem->mPos.vz >> 12);
|
||||
Mess_DrawText(220, 45, v3, 0, 0x1000u);
|
||||
|
||||
PCGfx_EndScene(1);
|
||||
}
|
||||
|
||||
EXPORT i8 gPcGfxBrightnessValues[256];
|
||||
|
@ -7,7 +7,7 @@ SViewport gViewport;
|
||||
CCamera *CameraList;
|
||||
EXPORT i32 NumCameras;
|
||||
|
||||
EXPORT SCamera gMikeCamera[2];
|
||||
SCamera gMikeCamera[2];
|
||||
|
||||
// @Ok
|
||||
// @Test
|
||||
|
1
camera.h
1
camera.h
@ -208,6 +208,7 @@ public:
|
||||
EXPORT __int16 CalcTheta(__int16, __int16);
|
||||
EXPORT extern CCamera *CameraList;
|
||||
EXPORT extern SViewport gViewport;
|
||||
EXPORT extern SCamera gMikeCamera[2];
|
||||
|
||||
void validate_CCamera(void);
|
||||
void validate_SCamera(void);
|
||||
|
52
ps2m3d.cpp
52
ps2m3d.cpp
@ -8,4 +8,54 @@ void M3d_BuildTransform(CSuper* a){
|
||||
|
||||
// @BIGTODO
|
||||
void M3d_Render(void*)
|
||||
{}
|
||||
{
|
||||
printf("void M3d_Render(void*)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void DCModel_RenderModel(SModel const *,DCModelData *,matrix4x4 const *,void const *)
|
||||
{
|
||||
printf("DCModel_RenderModel(SModel const *,DCModelData *,matrix4x4 const *,void const *)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void DC_PSXModel_RenderModel(SModel const *,matrix4x4 const *,void const *,DCModelData *)
|
||||
{
|
||||
printf("DC_PSXModel_RenderModel(SModel const *,matrix4x4 const *,void const *,DCModelData *)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void M3d_PreprocessPulsingColours(i32)
|
||||
{
|
||||
printf("M3d_PreprocessPulsingColours(i32)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void M3d_PreprocessWibblyTextures(i32)
|
||||
{
|
||||
printf("M3d_PreprocessWibblyTextures(i32)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void M3d_RenderBackground(void *)
|
||||
{
|
||||
printf("M3d_RenderBackground(void *)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void M3d_RenderCleanup(void)
|
||||
{
|
||||
printf("M3d_RenderCleanup(void)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void M3d_RenderSetup(SCamera *,SViewport *,u32 *)
|
||||
{
|
||||
printf("M3d_RenderSetup(SCamera *,SViewport *,u32 *)");
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
void RenderSuperItem(CItem *,bool)
|
||||
{
|
||||
printf("RenderSuperItem(CItem *,bool)");
|
||||
}
|
||||
|
12
ps2m3d.h
12
ps2m3d.h
@ -5,8 +5,20 @@
|
||||
|
||||
#include "export.h"
|
||||
#include "ob.h"
|
||||
#include "camera.h"
|
||||
#include "dcmodel.h"
|
||||
|
||||
struct matrix4x4;
|
||||
|
||||
EXPORT void M3d_BuildTransform(CSuper*);
|
||||
EXPORT void M3d_Render(void*);
|
||||
EXPORT void DCModel_RenderModel(SModel const *,DCModelData *,matrix4x4 const *,void const *);
|
||||
EXPORT void DC_PSXModel_RenderModel(SModel const *,matrix4x4 const *,void const *,DCModelData *);
|
||||
EXPORT void M3d_PreprocessPulsingColours(i32);
|
||||
EXPORT void M3d_PreprocessWibblyTextures(i32);
|
||||
EXPORT void M3d_RenderBackground(void *);
|
||||
EXPORT void M3d_RenderCleanup(void);
|
||||
EXPORT void M3d_RenderSetup(SCamera *,SViewport *,u32 *);
|
||||
EXPORT void RenderSuperItem(CItem *,bool);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user