Skip to content

Commit

Permalink
fix crash related to ATI3DCIF calls
Browse files Browse the repository at this point in the history
This fixes the regression from 1a93e85.
  • Loading branch information
rr- committed Oct 13, 2021
1 parent 90e1308 commit 7d8e152
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
24 changes: 12 additions & 12 deletions src/specific/ati.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,66 +207,66 @@ C3D_EC ATI3DCIF_NullSub()
return C3D_EC_GENFAIL;
}

C3D_EC ATI3DCIF_GetInfo(PC3D_3DCIFINFO info)
C3D_EC __stdcall ATI3DCIF_GetInfo(PC3D_3DCIFINFO info)
{
return (*ATI3DCIF_GetInfo_lib)(info);
}

C3D_EC ATI3DCIF_TextureReg(C3D_PTMAP ptmapToReg, C3D_PHTX phtmap)
C3D_EC __stdcall ATI3DCIF_TextureReg(C3D_PTMAP ptmapToReg, C3D_PHTX phtmap)
{
return (*ATI3DCIF_TextureReg_lib)(ptmapToReg, phtmap);
}

C3D_EC ATI3DCIF_TextureUnreg(C3D_HTX htxToUnreg)
C3D_EC __stdcall ATI3DCIF_TextureUnreg(C3D_HTX htxToUnreg)
{
return (*ATI3DCIF_TextureUnreg_lib)(htxToUnreg);
}

C3D_EC ATI3DCIF_TexturePaletteCreate(
C3D_EC __stdcall ATI3DCIF_TexturePaletteCreate(
C3D_ECI_TMAP_TYPE epalette, void *pPalette, C3D_PHTXPAL phtpalCreated)
{
return (*ATI3DCIF_TexturePaletteCreate_lib)(
epalette, pPalette, phtpalCreated);
}

C3D_EC ATI3DCIF_TexturePaletteDestroy(C3D_HTXPAL htxpalToDestroy)
C3D_EC __stdcall ATI3DCIF_TexturePaletteDestroy(C3D_HTXPAL htxpalToDestroy)
{
return (*ATI3DCIF_TexturePaletteDestroy_lib)(htxpalToDestroy);
}

C3D_HRC ATI3DCIF_ContextCreate()
C3D_HRC __stdcall ATI3DCIF_ContextCreate()
{
return (*ATI3DCIF_ContextCreate_lib)();
}

C3D_EC ATI3DCIF_ContextDestroy(C3D_HRC hRC)
C3D_EC __stdcall ATI3DCIF_ContextDestroy(C3D_HRC hRC)
{
return (*ATI3DCIF_ContextDestroy_lib)(hRC);
}

C3D_EC ATI3DCIF_ContextSetState(
C3D_EC __stdcall ATI3DCIF_ContextSetState(
C3D_HRC hRC, C3D_ERSID eRStateID, C3D_PRSDATA pRStateData)
{
return (*ATI3DCIF_ContextSetState_lib)(hRC, eRStateID, pRStateData);
}

C3D_EC ATI3DCIF_RenderBegin(C3D_HRC hRC)
C3D_EC __stdcall ATI3DCIF_RenderBegin(C3D_HRC hRC)
{
return (*ATI3DCIF_RenderBegin_lib)(hRC);
}

C3D_EC ATI3DCIF_RenderEnd()
C3D_EC __stdcall ATI3DCIF_RenderEnd()
{
return (*ATI3DCIF_RenderEnd_lib)();
}

C3D_EC ATI3DCIF_RenderPrimStrip(
C3D_EC __stdcall ATI3DCIF_RenderPrimStrip(
C3D_VSTRIP vStrip, C3D_UINT32 u32NumVert)
{
return (*ATI3DCIF_RenderPrimStrip_lib)(vStrip, u32NumVert);
}

C3D_EC ATI3DCIF_RenderPrimList(C3D_VLIST vList, C3D_UINT32 u32NumVert)
C3D_EC __stdcall ATI3DCIF_RenderPrimList(C3D_VLIST vList, C3D_UINT32 u32NumVert)
{
return (*ATI3DCIF_RenderPrimList_lib)(vList, u32NumVert);
}
Expand Down
24 changes: 12 additions & 12 deletions src/specific/ati.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,21 +446,21 @@ C3D_EC InitATI3DCIF();
C3D_EC ShutdownATI3DCIF();

C3D_EC ATI3DCIF_NullSub();
C3D_EC ATI3DCIF_GetInfo(C3D_3DCIFINFO *info);
C3D_EC ATI3DCIF_TextureReg(C3D_PTMAP ptmapToReg, C3D_PHTX phtmap);
C3D_EC ATI3DCIF_TextureUnreg(C3D_HTX htxToUnreg);
C3D_EC ATI3DCIF_TexturePaletteCreate(
C3D_EC __stdcall ATI3DCIF_GetInfo(C3D_3DCIFINFO *info);
C3D_EC __stdcall ATI3DCIF_TextureReg(C3D_PTMAP ptmapToReg, C3D_PHTX phtmap);
C3D_EC __stdcall ATI3DCIF_TextureUnreg(C3D_HTX htxToUnreg);
C3D_EC __stdcall ATI3DCIF_TexturePaletteCreate(
C3D_ECI_TMAP_TYPE epalette, void *pPalette, C3D_PHTXPAL phtpalCreated);
C3D_EC ATI3DCIF_TexturePaletteDestroy(C3D_HTXPAL htxpalToDestroy);
C3D_HRC ATI3DCIF_ContextCreate();
C3D_EC ATI3DCIF_ContextDestroy(C3D_HRC hRC);
C3D_EC ATI3DCIF_ContextSetState(
C3D_EC __stdcall ATI3DCIF_TexturePaletteDestroy(C3D_HTXPAL htxpalToDestroy);
C3D_HRC __stdcall ATI3DCIF_ContextCreate();
C3D_EC __stdcall ATI3DCIF_ContextDestroy(C3D_HRC hRC);
C3D_EC __stdcall ATI3DCIF_ContextSetState(
C3D_HRC hRC, C3D_ERSID eRStateID, C3D_PRSDATA pRStateData);
C3D_EC ATI3DCIF_RenderBegin(C3D_HRC hRC);
C3D_EC ATI3DCIF_RenderEnd();
C3D_EC ATI3DCIF_RenderPrimStrip(
C3D_EC __stdcall ATI3DCIF_RenderBegin(C3D_HRC hRC);
C3D_EC __stdcall ATI3DCIF_RenderEnd();
C3D_EC __stdcall ATI3DCIF_RenderPrimStrip(
C3D_VSTRIP vStrip, C3D_UINT32 u32NumVert);
C3D_EC ATI3DCIF_RenderPrimList(
C3D_EC __stdcall ATI3DCIF_RenderPrimList(
C3D_VLIST vList, C3D_UINT32 u32NumVert);

void T1MInjectSpecificATI();
Expand Down
4 changes: 2 additions & 2 deletions test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extern size_t fails;
#define TEST_RESULTS() \
do { \
if (fails == 0) { \
printf("ALL TESTS PASSED (%lu/%lu)\n", tests, tests); \
printf("ALL TESTS PASSED (%lu/%lu)\n", tests, tests); \
} else { \
printf("SOME TESTS FAILED (%lu/%lu)\n", tests - fails, tests); \
printf("SOME TESTS FAILED (%lu/%lu)\n", tests - fails, tests); \
} \
} while (0)

Expand Down

0 comments on commit 7d8e152

Please sign in to comment.