summaryrefslogtreecommitdiff
path: root/plugins/peopsxgl/soft.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/peopsxgl/soft.c')
-rw-r--r--plugins/peopsxgl/soft.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/peopsxgl/soft.c b/plugins/peopsxgl/soft.c
index bae51708..9f10a2a0 100644
--- a/plugins/peopsxgl/soft.c
+++ b/plugins/peopsxgl/soft.c
@@ -1188,6 +1188,26 @@ static int left_R, delta_left_R, right_R, delta_right_R;
static int left_G, delta_left_G, right_G, delta_right_G;
static int left_B, delta_left_B, right_B, delta_right_B;
+#ifdef _MSC_VER
+
+#pragma warning (disable : 4035)
+
+__inline int shl10idiv(int x, int y)
+{
+ __asm
+ {
+ mov eax,x
+ mov ebx,y
+ mov edx, eax
+ shl eax, 10
+ sar edx, 22
+ idiv ebx
+ // return result in eax
+ }
+}
+
+#else
+
__inline int shl10idiv(int x, int y)
{
long long int bi=x;
@@ -1195,6 +1215,8 @@ __inline int shl10idiv(int x, int y)
return bi/y;
}
+#endif
+
__inline int RightSection_F(void)
{
soft_vertex * v1 = right_array[ right_section ];