mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +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
|
||||
- Fixed: When quiting from fullscreen mode, RestoreConView() did not ungrab
|
||||
the mouse.
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define MAKESAFEDIVSCALE(x) \
|
||||
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 DivScale##x (a, b); \
|
||||
}
|
||||
|
@ -62,14 +62,14 @@ MAKESAFEDIVSCALE(30)
|
|||
|
||||
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 DivScale32 (a, b);
|
||||
return DivScale31 (a, 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 DivScale32 (a, b);
|
||||
}
|
||||
|
|
|
@ -321,7 +321,7 @@ R_DrawSpanP_ASM:
|
|||
mov eax,[ds_x2]
|
||||
mov ecx,[ds_x1]
|
||||
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 edi
|
||||
|
|
12
zdoom.vcproj
12
zdoom.vcproj
|
@ -4774,7 +4774,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -4818,7 +4818,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -4862,7 +4862,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -4906,7 +4906,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -4950,7 +4950,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@ -5376,7 +5376,7 @@
|
|||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
|
Loading…
Reference in a new issue