mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Fixed: The SafeDivScales used a signed shift for their if test. This fails
when a == 0x80000000, because the result of abs will still be negative as long as we use signed math. - Fixed: SafeDivScale31 performed DivScale32 instead. - Fixed: R_DrawSpanP_ASM had a short jump into a different section. SVN r472 (trunk)
This commit is contained in:
parent
0b7b527ac2
commit
bac407c543
4 changed files with 18 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
February 2, 2007
|
||||||
|
- Fixed: The SafeDivScales used a signed shift for their if test. This fails
|
||||||
|
when a == 0x80000000, because the result of abs will still be negative as
|
||||||
|
long as we use signed math.
|
||||||
|
- Fixed: SafeDivScale31 performed DivScale32 instead.
|
||||||
|
- Fixed: R_DrawSpanP_ASM had a short jump into a different section.
|
||||||
|
|
||||||
January 30, 2007
|
January 30, 2007
|
||||||
- Fixed: When quiting from fullscreen mode, RestoreConView() did not ungrab
|
- Fixed: When quiting from fullscreen mode, RestoreConView() did not ungrab
|
||||||
the mouse.
|
the mouse.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define MAKESAFEDIVSCALE(x) \
|
#define MAKESAFEDIVSCALE(x) \
|
||||||
inline SDWORD SafeDivScale##x (SDWORD a, SDWORD b) \
|
inline SDWORD SafeDivScale##x (SDWORD a, SDWORD b) \
|
||||||
{ \
|
{ \
|
||||||
if (abs(a) >> (31-x) >= abs (b)) \
|
if ((DWORD)abs(a) >> (31-x) >= (DWORD)abs (b)) \
|
||||||
return (a^b)<0 ? FIXED_MIN : FIXED_MAX; \
|
return (a^b)<0 ? FIXED_MIN : FIXED_MAX; \
|
||||||
return DivScale##x (a, b); \
|
return DivScale##x (a, b); \
|
||||||
}
|
}
|
||||||
|
@ -62,14 +62,14 @@ MAKESAFEDIVSCALE(30)
|
||||||
|
|
||||||
inline SDWORD SafeDivScale31 (SDWORD a, SDWORD b)
|
inline SDWORD SafeDivScale31 (SDWORD a, SDWORD b)
|
||||||
{
|
{
|
||||||
if (abs(a) >= abs (b))
|
if ((DWORD)abs(a) >= (DWORD)abs (b))
|
||||||
return (a^b)<0 ? FIXED_MIN : FIXED_MAX;
|
return (a^b)<0 ? FIXED_MIN : FIXED_MAX;
|
||||||
return DivScale32 (a, b);
|
return DivScale31 (a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline SDWORD SafeDivScale32 (SDWORD a, SDWORD b)
|
inline SDWORD SafeDivScale32 (SDWORD a, SDWORD b)
|
||||||
{
|
{
|
||||||
if (abs(a) >= abs (b) >> 1)
|
if ((DWORD)abs(a) >= (DWORD)abs (b) >> 1)
|
||||||
return (a^b)<0 ? FIXED_MIN : FIXED_MAX;
|
return (a^b)<0 ? FIXED_MIN : FIXED_MAX;
|
||||||
return DivScale32 (a, b);
|
return DivScale32 (a, b);
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,7 +321,7 @@ R_DrawSpanP_ASM:
|
||||||
mov eax,[ds_x2]
|
mov eax,[ds_x2]
|
||||||
mov ecx,[ds_x1]
|
mov ecx,[ds_x1]
|
||||||
sub eax,ecx
|
sub eax,ecx
|
||||||
jl aret ; count < 0: nothing to do, so leave
|
jl near rdspret ; count < 0: nothing to do, so leave
|
||||||
|
|
||||||
push ebx
|
push ebx
|
||||||
push edi
|
push edi
|
||||||
|
|
12
zdoom.vcproj
12
zdoom.vcproj
|
@ -4774,7 +4774,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)/$(InputName).obj"
|
Outputs="$(IntDir)/$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -4818,7 +4818,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)/$(InputName).obj"
|
Outputs="$(IntDir)/$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -4862,7 +4862,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)\$(InputName).obj"
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -4906,7 +4906,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)\$(InputName).obj"
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -4950,7 +4950,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)\$(InputName).obj"
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -5376,7 +5376,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
Description="Assembling $(InputPath)..."
|
Description="Assembling $(InputPath)..."
|
||||||
CommandLine="nasmw -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
CommandLine="nasmw -g -o "$(IntDir)\$(InputName).obj" -d OBJ_FORMAT_win32 -f win32 "$(InputPath)"
"
|
||||||
Outputs="$(IntDir)\$(InputName).obj"
|
Outputs="$(IntDir)\$(InputName).obj"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
|
Loading…
Reference in a new issue