Update to v1200.
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
@@ -106,6 +107,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
@@ -103,6 +104,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
@@ -136,6 +137,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
@@ -104,6 +105,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -95,6 +96,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -90,8 +90,8 @@ void Runtime::execute( void (*pc)(),const char *args,Debugger *dbg ){
|
||||
|
||||
trackmem( true );
|
||||
|
||||
_se_translator_function old_trans=_set_se_translator( seTranslator );
|
||||
_control87( _RC_NEAR|_PC_24|_EM_INVALID|_EM_ZERODIVIDE|_EM_OVERFLOW|_EM_UNDERFLOW|_EM_INEXACT|_EM_DENORMAL,0xfffff );
|
||||
_se_translator_function old_trans = _set_se_translator(seTranslator);
|
||||
_control87(_RC_NEAR | _PC_24 | _EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW | _EM_INEXACT | _EM_DENORMAL, 0xfffff);
|
||||
|
||||
//strip spaces from ends of args...
|
||||
string params=args;
|
||||
@@ -106,8 +106,8 @@ void Runtime::execute( void (*pc)(),const char *args,Debugger *dbg ){
|
||||
gxRuntime::closeRuntime( t );
|
||||
}
|
||||
|
||||
_control87( _CW_DEFAULT,0xfffff );
|
||||
_set_se_translator( old_trans );
|
||||
_control87(_CW_DEFAULT, 0xfffff);
|
||||
_set_se_translator(old_trans);
|
||||
}
|
||||
|
||||
void Runtime::asyncStop(){
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
@@ -106,6 +107,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
||||
@@ -1361,3 +1361,8 @@ void graphics_link(void(*rtSym)(const char *sym, void *pc)) {
|
||||
rtSym("ShowPointer", bbShowPointer);
|
||||
rtSym("HidePointer", bbHidePointer);
|
||||
}
|
||||
|
||||
// NVidia Optimus
|
||||
extern "C" {
|
||||
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
}
|
||||
@@ -70,6 +70,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -97,6 +98,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release\asm_makeinsts.tlb</TypeLibraryName>
|
||||
@@ -96,6 +97,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug\asm_makeinsts.tlb</TypeLibraryName>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Debug\blitz.tlb</TypeLibraryName>
|
||||
@@ -100,6 +101,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<TypeLibraryName>.\Release\blitz.tlb</TypeLibraryName>
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -96,6 +97,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -94,6 +95,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -95,6 +96,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
@@ -102,6 +103,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<Midl>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
||||
+14
-11
@@ -58,24 +58,27 @@ void PixelFormat::setFormat(const DDPIXELFORMAT &pf) {
|
||||
asm_coder.CodePoint(point_code, depth, amask, rmask, gmask, bmask);
|
||||
}
|
||||
|
||||
static void adjustTexSize(int *width, int *height, IDirect3DDevice7 *dir3dDev) {
|
||||
static void adjustTexSize(int *width, int *height, IDirect3DDevice7 *dir3dDev, bool forcePOT = true) {
|
||||
D3DDEVICEDESC7 ddDesc = { 0 };
|
||||
if (dir3dDev->GetCaps(&ddDesc) < 0) {
|
||||
*width = *height = 256;
|
||||
return;
|
||||
}
|
||||
|
||||
int w = *width, h = *height, min, max;
|
||||
//make power of 2
|
||||
//Try *always* making POW2 size to fix GF6800 non-pow2 tex issue
|
||||
// if( ddDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_POW2 ){
|
||||
for (w = 1; w < *width; w <<= 1) {}
|
||||
for (h = 1; h < *height; h <<= 1) {}
|
||||
// }
|
||||
//make square
|
||||
if (ddDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) {
|
||||
|
||||
if( ddDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_POW2 || ddDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL || forcePOT){
|
||||
// DirectX Device doesn't support Non Power-Of-Two Textures.
|
||||
|
||||
for (w = 1; w < *width; w <<= 1) {}
|
||||
for (h = 1; h < *height; h <<= 1) {}
|
||||
} else if (ddDesc.dpcTriCaps.dwTextureCaps & D3DPTEXTURECAPS_SQUAREONLY) {
|
||||
// DirectX Device only supports Square Textures;
|
||||
|
||||
if (w > h) h = w;
|
||||
else w = h;
|
||||
}
|
||||
|
||||
//check aspect ratio
|
||||
if (max = ddDesc.dwMaxTextureAspectRatio) {
|
||||
int asp = w > h ? w / h : h / w;
|
||||
@@ -300,7 +303,7 @@ ddSurf *ddUtil::createSurface(int w, int h, int flags, gxGraphics *gfx) {
|
||||
desc.ddsCaps.dwCaps |= DDSCAPS_COMPLEX;
|
||||
desc.ddsCaps.dwCaps2 |= DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_ALLFACES;
|
||||
}
|
||||
adjustTexSize((int*)&desc.dwWidth, (int*)&desc.dwHeight, gfx->dir3dDev);
|
||||
adjustTexSize((int*)&desc.dwWidth, (int*)&desc.dwHeight, gfx->dir3dDev, !(flags & (gxCanvas::CANVAS_TEX_NPOT)));
|
||||
} else {
|
||||
desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
||||
if (flags & gxCanvas::CANVAS_HIGHCOLOR) {
|
||||
@@ -514,7 +517,7 @@ ddSurf *ddUtil::loadSurface(const std::string &f, int flags, gxGraphics *gfx) {
|
||||
}
|
||||
|
||||
int t_w = width, t_h = height;
|
||||
if (flags & gxCanvas::CANVAS_TEXTURE) adjustTexSize(&t_w, &t_h, gfx->dir3dDev);
|
||||
if (flags & gxCanvas::CANVAS_TEXTURE) adjustTexSize(&t_w, &t_h, gfx->dir3dDev, !(flags & (gxCanvas::CANVAS_TEX_NPOT)));
|
||||
copy(dest, 0, 0, t_w, t_h, src, 0, height - 1, width, -height);
|
||||
|
||||
src->Release();
|
||||
|
||||
+455
-454
File diff suppressed because it is too large
Load Diff
@@ -67,13 +67,14 @@ public:
|
||||
CANVAS_TEX_CUBE = 0x0080,
|
||||
CANVAS_TEX_VIDMEM = 0x0100,
|
||||
CANVAS_TEX_HICOLOR = 0x0200,
|
||||
CANVAS_TEX_NPOT = 0x0400, // 1024
|
||||
|
||||
CANVAS_TEXTURE = 0x10000,
|
||||
CANVAS_NONDISPLAY = 0x20000,
|
||||
CANVAS_HIGHCOLOR = 0x40000,
|
||||
|
||||
CANVAS_3DRENDER = 0x1000,
|
||||
CANVAS_3DZRENDER = 0x2000,
|
||||
CANVAS_3DRENDER = 0x1000, // 4096
|
||||
CANVAS_3DZRENDER = 0x2000, // 8192
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -96,6 +97,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
@@ -94,6 +95,7 @@
|
||||
<ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<ExceptionHandling>Async</ExceptionHandling>
|
||||
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
|
||||
Reference in New Issue
Block a user