mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-18 20:26:42 -04:00
Fix: DSurface lost (#109)
Switching screen mode (from or to full screen) with FA2 open and loaded with map, when you get back, the program haulted and killed immediately. This PR fix the device lost issue, and get the right surface .
This commit is contained in:
parent
102f919e96
commit
98e8b7c562
5 changed files with 266 additions and 226 deletions
|
@ -1635,6 +1635,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)
|
||||
{
|
||||
if (hPalette == NULL || hPalette > dwPalCount) return NULL;
|
||||
|
@ -1850,6 +1851,7 @@ namespace FSunPackLib
|
|||
//pal.close();
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOL LoadVXLImage(
|
||||
const VoxelNormalTables& normalTables,
|
||||
|
|
|
@ -228,7 +228,9 @@ 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);
|
||||
#endif
|
||||
|
||||
// modelOffset is applied before VXL/HVA translates and scales and before model-to-world rotation
|
||||
BOOL LoadVXLImage(const VoxelNormalTables& normalTables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue