all declarations using ddraw7 instead of ddraw4 . (#127)

This commit is contained in:
Zero Fanker 2024-12-16 21:28:01 -05:00 committed by GitHub
parent 8960096b3b
commit 70d1cd038b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 60 additions and 66 deletions

View file

@ -99,7 +99,7 @@ BOOL bDrawStats = TRUE;
class SurfaceLocker
{
public:
SurfaceLocker(IDirectDrawSurface4* pDDS, LPRECT rect = nullptr) :
SurfaceLocker(IDirectDrawSurface7* pDDS, LPRECT rect = nullptr) :
SurfaceLocker()
{
m_hasRect = rect != nullptr;
@ -149,7 +149,7 @@ private:
SurfaceLocker() = default;
private:
IDirectDrawSurface4* m_pDDS = nullptr;
IDirectDrawSurface7* m_pDDS = nullptr;
DDSURFACEDESC2 m_ddsd = { 0 };
RECT m_rect = { 0 };
bool m_hasRect = false;
@ -238,19 +238,11 @@ BOOL CIsoView::RecreateSurfaces()
releaseIfExists(isoView.dd);
if (isoView.dd_1->QueryInterface(IID_IDirectDraw7, (void**)&isoView.dd) != DD_OK) {
errstream << "QueryInterface() failed -> Using DirectX 6.0\n";
errstream << "QueryInterface() failed\n";
errstream.flush();
//ShowWindow(SW_HIDE);
//MessageBox("You don´t have DirectX 6.0 but an older version. Quitting...");
//exit(-1);
//return FALSE;
if (isoView.dd_1->QueryInterface(IID_IDirectDraw4, (void**)&isoView.dd) != DD_OK) {
MessageBox("You need at least DirectX 6.0 to run this program", "Error");
exit(-1);
return FALSE;
}
MessageBox("You need at least DirectX 7.0 to run this program", "Error");
exit(-1);
return FALSE;
}
errstream << "QueryInterface() successful\n\nNow setting cooperative level\n";
@ -3572,7 +3564,7 @@ void CIsoView::ReInitializeDDraw()
theApp.m_loading->InitPics();
theApp.m_loading->InitTMPs(&dlg.m_Progress);
memset(ovrlpics, 0, max_ovrl_img * 0xFF * sizeof(LPDIRECTDRAWSURFACE4));
memset(ovrlpics, 0, max_ovrl_img * 0xFF * sizeof(LPDIRECTDRAWSURFACE7));
//UpdateOverlayPictures(-1);
//Map->UpdateIniFile(MAPDATA_UPDATE_FROM_INI);
Map->UpdateBuildingInfo();
@ -4210,7 +4202,7 @@ void CIsoView::UpdateStatusBar(int x, int y)
void CIsoView::UpdateOverlayPictures(int id)
{
if (id < 0) {
memset(ovrlpics, 0, max_ovrl_img * 0xFF * sizeof(LPDIRECTDRAWSURFACE4));
memset(ovrlpics, 0, max_ovrl_img * 0xFF * sizeof(LPDIRECTDRAWSURFACE7));
int i, e;
for (i = 0; i < 0xFF; i++) {
@ -6188,7 +6180,7 @@ void CIsoView::DrawMap()
#ifdef NOSURFACES
lpdsBack->Unlock(NULL);
#endif
Blit((LPDIRECTDRAWSURFACE4)pics["CELLTAG"].pic, drawCoords.x - 1, drawCoords.y - 1);
Blit((LPDIRECTDRAWSURFACE7)pics["CELLTAG"].pic, drawCoords.x - 1, drawCoords.y - 1);
#ifdef NOSURFACES
auto ddsd = getDDDescBasic(false);
@ -6249,7 +6241,7 @@ void CIsoView::DrawMap()
// delayed waypoint rendering
for (const auto& wp : m_waypoints_to_render) {
Blit((LPDIRECTDRAWSURFACE4)pics["FLAG"].pic, wp.drawx, wp.drawy);
Blit((LPDIRECTDRAWSURFACE7)pics["FLAG"].pic, wp.drawx, wp.drawy);
}
// map tool rendering
@ -6281,7 +6273,7 @@ void CIsoView::DrawMap()
if (rscroll) {
const auto& sc = pics["SCROLLCURSOR"];
Blit((LPDIRECTDRAWSURFACE4)sc.pic, rclick_x * m_viewScale.x + r.left - sc.wWidth / 2, rclick_y * m_viewScale.y + r.top - sc.wHeight / 2);
Blit((LPDIRECTDRAWSURFACE7)sc.pic, rclick_x * m_viewScale.x + r.left - sc.wWidth / 2, rclick_y * m_viewScale.y + r.top - sc.wHeight / 2);
}
BlitBackbufferToHighRes(); // lpdsBackHighRes contains the same graphic, but scaled to the whole window
@ -6294,9 +6286,9 @@ void CIsoView::DrawMap()
}
std::tuple<DDSURFACEDESC2, LPDIRECTDRAWSURFACE4, bool> CIsoView::getDDDesc(bool recreated)
std::tuple<DDSURFACEDESC2, LPDIRECTDRAWSURFACE7, bool> CIsoView::getDDDesc(bool recreated)
{
LPDIRECTDRAWSURFACE4 dds = lpdsBack;
LPDIRECTDRAWSURFACE7 dds = lpdsBack;
bool useHighRes = false;
if (m_viewScale != Vec2<CSProjected, float>(1.0f, 1.0f) && lpdsBackHighRes) {
dds = lpdsBackHighRes;

View file

@ -122,7 +122,7 @@ protected:
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
std::tuple<DDSURFACEDESC2, LPDIRECTDRAWSURFACE4, bool> getDDDesc(bool recreated);
std::tuple<DDSURFACEDESC2, LPDIRECTDRAWSURFACE7, bool> getDDDesc(bool recreated);
DDSURFACEDESC2 getDDDescBasic(bool recreated);
// generated message maps
@ -270,9 +270,11 @@ public:
CWnd* owner;
void ReInitializeDDraw();
COLORREF GetColor(const char* house, const char* color = NULL);
void Blit(LPDIRECTDRAWSURFACE4 pic, int x, int y, int width = -1, int height = -1)
void Blit(LPDIRECTDRAWSURFACE7 pic, int x, int y, int width = -1, int height = -1)
{
if (pic == NULL) return;
if (pic == NULL) {
return;
}
x += 1;
y += 1;
@ -337,13 +339,13 @@ public:
void updateFontScaled();
void TextOut(int x, int y, const char* text, COLORREF col);
void TextOut(HDC hDC, int x, int y, const char* text, COLORREF col);
LPDIRECTDRAWSURFACE4 lpdsBack;
LPDIRECTDRAWSURFACE4 lpdsTemp; // used for saving the isoview when drawing current tile
LPDIRECTDRAWSURFACE4 lpdsBackHighRes; // used for rendering text and some lines in high-res
LPDIRECTDRAWSURFACE4 lpds;
LPDIRECTDRAWSURFACE7 lpdsBack;
LPDIRECTDRAWSURFACE7 lpdsTemp; // used for saving the isoview when drawing current tile
LPDIRECTDRAWSURFACE7 lpdsBackHighRes; // used for rendering text and some lines in high-res
LPDIRECTDRAWSURFACE7 lpds;
DDPIXELFORMAT pf;
std::unique_ptr<FSunPackLib::ColorConverter> m_color_converter;
LPDIRECTDRAW4 dd;
LPDIRECTDRAW7 dd;
LPDIRECTDRAW dd_1;
HGLRC m_hglrc;
void HandleProperties(int n, int type);

View file

@ -712,14 +712,14 @@ void CLoading::InitPics(CProgressCtrl* prog)
::memset(&desc, 0, sizeof(DDSURFACEDESC2));
desc.dwSize = sizeof(DDSURFACEDESC2);
desc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH;
((LPDIRECTDRAWSURFACE4)pics[(LPCTSTR)ff.GetFileName()].pic)->GetSurfaceDesc(&desc);
((LPDIRECTDRAWSURFACE7)pics[(LPCTSTR)ff.GetFileName()].pic)->GetSurfaceDesc(&desc);
pics[(LPCTSTR)ff.GetFileName()].wHeight = desc.dwHeight;
pics[(LPCTSTR)ff.GetFileName()].wWidth = desc.dwWidth;
pics[(LPCTSTR)ff.GetFileName()].wMaxWidth = desc.dwWidth;
pics[(LPCTSTR)ff.GetFileName()].wMaxHeight = desc.dwHeight;
pics[(LPCTSTR)ff.GetFileName()].bType = PICDATA_TYPE_BMP;
FSunPackLib::SetColorKey(((LPDIRECTDRAWSURFACE4)(pics[(LPCTSTR)ff.GetFileName()].pic)), -1);
FSunPackLib::SetColorKey(((LPDIRECTDRAWSURFACE7)(pics[(LPCTSTR)ff.GetFileName()].pic)), -1);
} catch (const BitmapNotFound&) {
}
}
@ -734,7 +734,7 @@ void CLoading::InitPics(CProgressCtrl* prog)
auto& scrollCursorSlot = pics["SCROLLCURSOR"];
auto pOldPic = std::exchange(scrollCursorSlot.pic, pPic);
if (pOldPic) {
reinterpret_cast<IDirectDrawSurface4*>(pOldPic)->Release();
reinterpret_cast<IDirectDrawSurface7*>(pOldPic)->Release();
}
if (!pPic) {
throw new BitmapNotFound();
@ -756,7 +756,7 @@ void CLoading::InitPics(CProgressCtrl* prog)
auto& cellTagSlot = pics["CELLTAG"];
auto pOldPic = std::exchange(cellTagSlot.pic, pPic);
if (pOldPic) {
reinterpret_cast<IDirectDrawSurface4*>(pOldPic)->Release();
reinterpret_cast<IDirectDrawSurface7*>(pOldPic)->Release();
}
FSunPackLib::SetColorKey(pPic, CLR_INVALID);
::memset(&desc, 0, sizeof(DDSURFACEDESC2));
@ -782,7 +782,7 @@ void CLoading::InitPics(CProgressCtrl* prog)
auto& flagSlot = pics["FLAG"];
auto pOldPic = std::exchange(flagSlot.pic, pPic);
if (pOldPic) {
reinterpret_cast<IDirectDrawSurface4*>(pOldPic)->Release();
reinterpret_cast<IDirectDrawSurface7*>(pOldPic)->Release();
}
FSunPackLib::SetColorKey(pPic, -1);
::memset(&desc, 0, sizeof(DDSURFACEDESC2));
@ -808,12 +808,12 @@ void CLoading::InitPics(CProgressCtrl* prog)
ddsd.dwWidth = f_x;
ddsd.dwHeight = f_y;
LPDIRECTDRAWSURFACE4 srf = NULL;
LPDIRECTDRAWSURFACE7 srf = NULL;
//auto ddptr =
((CFinalSunDlg*)theApp.m_pMainWnd)->m_view.m_isoview->dd->CreateSurface(&ddsd, &srf, 0);
auto& htileSlot = pics["HTILE"];
auto const pOldHtSurf = reinterpret_cast<LPDIRECTDRAWSURFACE4>(std::exchange(htileSlot.pic, srf));
auto const pOldHtSurf = reinterpret_cast<LPDIRECTDRAWSURFACE7>(std::exchange(htileSlot.pic, srf));
if (pOldHtSurf) {
pOldHtSurf->Release();
}
@ -2046,7 +2046,7 @@ BOOL CLoading::InitMixFiles()
MEMORYSTATUS ms;
ms.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&ms);
int cs = ms.dwAvailPhys + ms.dwAvailPageFile;
auto cs = ms.dwAvailPhys + ms.dwAvailPageFile;
errstream << "InitMixFiles() called. Available memory: " << cs << endl;
errstream.flush();
@ -3607,7 +3607,7 @@ void CLoading::FreeTileSet()
if (curSur) delete[] curSur;
if (rept.tiles[e].vborder) delete[] rept.tiles[e].vborder;
#else
LPDIRECTDRAWSURFACE4 curSur = rept.tiles[e].pic;
LPDIRECTDRAWSURFACE7 curSur = rept.tiles[e].pic;
if (curSur) curSur->Release();
#endif
}
@ -3626,7 +3626,7 @@ void CLoading::FreeTileSet()
if (curSur) delete[] curSur;
if ((*tiledata)[i].tiles[e].vborder) delete[](*tiledata)[i].tiles[e].vborder;
#else
LPDIRECTDRAWSURFACE4 curSur = (*tiledata)[i].tiles[e].pic;
LPDIRECTDRAWSURFACE7 curSur = (*tiledata)[i].tiles[e].pic;
if (curSur) curSur->Release();
#endif
}
@ -3727,7 +3727,7 @@ void CLoading::FreeAll()
#ifdef NOSURFACES_OBJECTS
if (i->second.bType == PICDATA_TYPE_BMP) {
if (i->second.pic != NULL) {
((LPDIRECTDRAWSURFACE4)i->second.pic)->Release();
((LPDIRECTDRAWSURFACE7)i->second.pic)->Release();
}
} else {
if (auto pPic = std::exchange(i->second.pic, nullptr)) {

View file

@ -25,7 +25,7 @@
#include "Vec2.h"
#include "MissionEditorPackLib.h"
TextDrawer::TextDrawer(IDirectDraw4* pDirectDraw, int fontSizeInPoints, COLORREF col, COLORREF shadowCol) : m_fontSizeInPoints(fontSizeInPoints), m_col(col), m_shadowCol(shadowCol)
TextDrawer::TextDrawer(IDirectDraw7* pDirectDraw, int fontSizeInPoints, COLORREF col, COLORREF shadowCol) : m_fontSizeInPoints(fontSizeInPoints), m_col(col), m_shadowCol(shadowCol)
{
auto dc = CDC::FromHandle(::GetDC(NULL));
auto fontSizeInPixels = -MulDiv(fontSizeInPoints, dc->GetDeviceCaps(LOGPIXELSY), 72);
@ -55,7 +55,7 @@ TextDrawer::TextDrawer(IDirectDraw4* pDirectDraw, int fontSizeInPoints, COLORREF
auto bkcol = col == RGB(10, 10, 10) ? RGB(11, 11, 11) : RGB(10, 10, 10);
auto pSurface = CComPtr<IDirectDrawSurface4>();
auto pSurface = CComPtr<IDirectDrawSurface7>();
if (pDirectDraw->CreateSurface(&desc, &pSurface, nullptr) != DD_OK)
return;
@ -108,7 +108,7 @@ bool TextDrawer::isValid() const
return m_fontSurface != nullptr;
}
void TextDrawer::RenderText(IDirectDrawSurface4* target, int x, int y, const std::string& text, bool centered) const
void TextDrawer::RenderText(IDirectDrawSurface7* target, int x, int y, const std::string& text, bool centered) const
{
if (!isValid())
return;

View file

@ -29,16 +29,16 @@
class TextDrawer
{
public:
TextDrawer(IDirectDraw4* pDirectDraw, int fontSizeInPoints, COLORREF col, COLORREF shadowCol = CLR_INVALID);
TextDrawer(IDirectDraw7* pDirectDraw, int fontSizeInPoints, COLORREF col, COLORREF shadowCol = CLR_INVALID);
bool isValid() const;
void RenderText(IDirectDrawSurface4* target, int x, int y, const std::string& text, bool centered = false) const;
void RenderText(IDirectDrawSurface7* target, int x, int y, const std::string& text, bool centered = false) const;
ProjectedVec GetExtent(const std::string& text) const;
private:
CComPtr<IDirectDrawSurface4> m_fontSurface;
CComPtr<IDirectDrawSurface7> m_fontSurface;
ProjectedVec m_charExtent;
int m_fontSizeInPoints;
int m_fontSizeInPixels;

View file

@ -466,7 +466,7 @@ void CTileSetBrowserView::SetTileSet(DWORD dwTileSet, BOOL bOnlyRedraw)
m_tilecount = max;
m_lpDDS = new(LPDIRECTDRAWSURFACE4[m_tilecount]);
m_lpDDS = new(LPDIRECTDRAWSURFACE7[m_tilecount]);
for (i = 0; i < m_tilecount; i++) {
m_lpDDS[i] = RenderTile(dwStartID + i);
}
@ -589,7 +589,7 @@ __forceinline void BlitTerrainTSB(void* dst, int x, int y, int dleft, int dtop,
#endif
LPDIRECTDRAWSURFACE4 CTileSetBrowserView::RenderTile(DWORD dwID)
LPDIRECTDRAWSURFACE7 CTileSetBrowserView::RenderTile(DWORD dwID)
{
if (theApp.m_Options.bMarbleMadness) {
if ((*tiledata)[dwID].wMarbleGround != 0xFFFF) {
@ -597,8 +597,8 @@ LPDIRECTDRAWSURFACE4 CTileSetBrowserView::RenderTile(DWORD dwID)
}
}
LPDIRECTDRAWSURFACE4 lpdds = NULL;
LPDIRECTDRAW4 lpdd = ((CFinalSunDlg*)theApp.m_pMainWnd)->m_view.m_isoview->dd;
LPDIRECTDRAWSURFACE7 lpdds = NULL;
LPDIRECTDRAW7 lpdd = ((CFinalSunDlg*)theApp.m_pMainWnd)->m_view.m_isoview->dd;
DDSURFACEDESC2 ddsd;
memset(&ddsd, 0, sizeof(DDSURFACEDESC2));
@ -923,9 +923,9 @@ void CTileSetBrowserView::SetOverlay(DWORD dwID)
}
#ifdef IGNORETHIS
LPDIRECTDRAWSURFACE4 CTileSetBrowserView::RenderOverlay(DWORD dwType, DWORD dwData)
LPDIRECTDRAWSURFACE7 CTileSetBrowserView::RenderOverlay(DWORD dwType, DWORD dwData)
{
LPDIRECTDRAWSURFACE4 lpdds = NULL;
LPDIRECTDRAWSURFACE7 lpdds = NULL;
LPDIRECTDRAW4 lpdd = ((CFinalSunDlg*)theApp.m_pMainWnd)->m_view.m_isoview->dd;
DDSURFACEDESC2 ddsd;

View file

@ -58,7 +58,7 @@ public:
int GetAddedHeight(DWORD dwID);
int m_bottom_needed;
void DrawIt();
LPDIRECTDRAWSURFACE4* m_lpDDS;
LPDIRECTDRAWSURFACE7* m_lpDDS;
void SetTileSet(DWORD dwTileSet, BOOL bOnlyRedraw = FALSE);
DWORD GetTileID(DWORD dwTileSet, DWORD dwType);
int m_currentTileSet;
@ -76,7 +76,7 @@ public:
DECLARE_MESSAGE_MAP()
protected:
int m_CurrentMode;
LPDIRECTDRAWSURFACE4 RenderTile(DWORD dwID);
LPDIRECTDRAWSURFACE7 RenderTile(DWORD dwID);
int m_tilecount;
int m_tile_height;
int m_tile_width;

View file

@ -1445,7 +1445,7 @@ void GetDrawBorder(const BYTE* data, int width, int line, int& left, int& right,
}
}
CComPtr<IDirectDrawSurface4> BitmapToSurface(IDirectDraw4* pDD, const CBitmap& bitmap)
CComPtr<IDirectDrawSurface7> BitmapToSurface(IDirectDraw7* pDD, const CBitmap& bitmap)
{
BITMAP bm;
GetObject(bitmap, sizeof(bm), &bm);
@ -1458,7 +1458,7 @@ CComPtr<IDirectDrawSurface4> BitmapToSurface(IDirectDraw4* pDD, const CBitmap& b
desc.dwWidth = bm.bmWidth;
desc.dwHeight = bm.bmHeight;
auto pSurface = CComPtr<IDirectDrawSurface4>();
auto pSurface = CComPtr<IDirectDrawSurface7>();
if (pDD->CreateSurface(&desc, &pSurface, nullptr) != DD_OK)
return nullptr;

View file

@ -172,7 +172,7 @@ public:
std::unique_ptr<CBitmap> BitmapFromResource(int resource_id);
std::unique_ptr<CBitmap> BitmapFromFile(const CString& filepath);
CComPtr<IDirectDrawSurface4> BitmapToSurface(IDirectDraw4* pDD, const CBitmap& bitmap);
CComPtr<IDirectDrawSurface7> BitmapToSurface(IDirectDraw7* pDD, const CBitmap& bitmap);
class ComboBoxHelper
{

View file

@ -315,7 +315,7 @@ namespace FSunPackLib
return DP;
}
std::int32_t GetFirstPixelColor(IDirectDrawSurface4* pDDS)
std::int32_t GetFirstPixelColor(IDirectDrawSurface7* pDDS)
{
std::int32_t color = 0;
@ -337,7 +337,7 @@ namespace FSunPackLib
}
HRESULT SetColorKey(IDirectDrawSurface4* pDDS, COLORREF rgb)
HRESULT SetColorKey(IDirectDrawSurface7* pDDS, COLORREF rgb)
{
DDPIXELFORMAT pf = { 0 };
pf.dwSize = sizeof(DDPIXELFORMAT);
@ -714,7 +714,7 @@ namespace FSunPackLib
}
BOOL LoadSHPImageInSurface(IDirectDraw4* pdd, HTSPALETTE hPalette, int iImageIndex, int iCount, LPDIRECTDRAWSURFACE4* pdds)
BOOL LoadSHPImageInSurface(IDirectDraw7* pdd, HTSPALETTE hPalette, int iImageIndex, int iCount, LPDIRECTDRAWSURFACE7* pdds)
{
RGBTRIPLE rgb_transp;
t_shp_ts_image_header imghead;
@ -1082,7 +1082,7 @@ namespace FSunPackLib
}
BOOL LoadTMPImageInSurface(IDirectDraw4* pdd, int iStart, int iCount, LPDIRECTDRAWSURFACE4* pdds, HTSPALETTE hPalette)
BOOL LoadTMPImageInSurface(IDirectDraw7* pdd, int iStart, int iCount, LPDIRECTDRAWSURFACE7* pdds, HTSPALETTE hPalette)
{
last_succeeded_operation = 2100;
@ -1636,7 +1636,7 @@ namespace FSunPackLib
VoxelNormalTable emptyNormalTable;
#if defined(XCC_VXL_DRAW)
BOOL LoadVXLImageInSurface(const VoxelNormalTables& normalTables, Vec3f lightDirection, IDirectDraw4* pdd, int iStart, int iCount, const Vec3f rotation, const Vec3f postHVAOffset, LPDIRECTDRAWSURFACE4* pdds, HTSPALETTE hPalette, int* lpXCenter, int* lpYCenter, int ZAdjust, int* lpXCenterZMax, int* lpYCenterZMax, int i3dCenterX, int i3dCenterY)
BOOL LoadVXLImageInSurface(const VoxelNormalTables& normalTables, Vec3f lightDirection, IDirectDraw4* pdd, int iStart, int iCount, const Vec3f rotation, const Vec3f postHVAOffset, LPDIRECTDRAWSURFACE7* pdds, HTSPALETTE hPalette, int* lpXCenter, int* lpYCenter, int ZAdjust, int* lpXCenterZMax, int* lpYCenterZMax, int i3dCenterX, int i3dCenterY)
{
if (hPalette == NULL || hPalette > dwPalCount) return NULL;

View file

@ -205,10 +205,10 @@ namespace FSunPackLib
BOOL LoadTMPImageInSurface(IDirectDraw4* pdd, int iStart, int iCount, LPDIRECTDRAWSURFACE4* pdds, HTSPALETTE hPalette);
BOOL LoadTMPImageInSurface(IDirectDraw7* pdd, int iStart, int iCount, LPDIRECTDRAWSURFACE7* pdds, HTSPALETTE hPalette);
BOOL LoadTMPImage(int iStart, int iCount, BYTE** lpTileArray);
BOOL LoadSHPImageInSurface(IDirectDraw4* pdd, HTSPALETTE hPalette, int iImageIndex, int iCount, LPDIRECTDRAWSURFACE4* pdds);
BOOL LoadSHPImageInSurface(IDirectDraw7* pdd, HTSPALETTE hPalette, int iImageIndex, int iCount, LPDIRECTDRAWSURFACE7* pdds);
// load 'wantedNum' frames at 'startIndex'
BOOL LoadSHPImage(int startIndex, int wantedNum, BYTE** lpPics);
BOOL LoadSHPImage(int iImageIndex, std::vector<BYTE>& pic);
@ -229,7 +229,7 @@ namespace FSunPackLib
BOOL GetVXLSectionInfo(int section, VoxelNormalClass& normalClass);
#if defined(XCC_VXL_DRAW)
BOOL LoadVXLImageInSurface(const VoxelNormalTables& normalTables, Vec3f lightDirection, IDirectDraw4* pdd, int iStart, int iCount, Vec3f rotation, Vec3f modelOffset, LPDIRECTDRAWSURFACE4* pdds, HTSPALETTE hPalette, int* lpXCenter = NULL, int* lpYCenter = NULL, int ZAdjust = 0, int* lpXCenterZMax = NULL, int* lpYCenterZMax = NULL, int i3dCenterX = -1, int i3dCenterY = -1);
BOOL LoadVXLImageInSurface(const VoxelNormalTables& normalTables, Vec3f lightDirection, IDirectDraw7* pdd, int iStart, int iCount, Vec3f rotation, Vec3f modelOffset, LPDIRECTDRAWSURFACE7* pdds, HTSPALETTE hPalette, int* lpXCenter = NULL, int* lpYCenter = NULL, int ZAdjust = 0, int* lpXCenterZMax = NULL, int* lpYCenterZMax = NULL, int i3dCenterX = -1, int i3dCenterY = -1);
#endif
// modelOffset is applied before VXL/HVA translates and scales and before model-to-world rotation
@ -251,7 +251,7 @@ namespace FSunPackLib
BOOL WriteMixFile(LPCTSTR lpMixFile, LPCSTR* lpFiles, DWORD dwFileCount, Game game);
HRESULT SetColorKey(IDirectDrawSurface4* pDDS, COLORREF rgb);
HRESULT SetColorKey(IDirectDrawSurface7* pDDS, COLORREF rgb);
std::pair<MemoryBuffer, bool> LoadCCFile(LPCTSTR name, HMIXFILE hMix);
};