summaryrefslogtreecommitdiff
path: root/src/win95
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-08-09 06:23:42 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commitea2f8c4527f401e721717177a11306213c13eac1 (patch)
treebbf2e2316b1dce71feed550b11e33e9f7885b52e /src/win95
parent45cf2eb3a194d53ccdd05a75b46e472a01359abf (diff)
Fixed FPU assembly. (fistp is 16bit, fistpl is 32bit)
Game displays now.
Diffstat (limited to 'src/win95')
-rw-r--r--src/win95/inline.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/win95/inline.h b/src/win95/inline.h
index 52ea527..3bd280d 100644
--- a/src/win95/inline.h
+++ b/src/win95/inline.h
@@ -1132,8 +1132,20 @@ int WideMulNarrowDiv(int a, int b, int c);
void RotateVector_ASM(VECTORCH *v, MATRIXCH *m);
void RotateAndCopyVector_ASM(VECTORCH *v1, VECTORCH *v2, MATRIXCH *m);
+/*
int FloatToInt(float);
#define f2i(a, b) { a = FloatToInt(b); }
+*/
+
+int SqRoot32(int A);
+void FloatToInt();
+extern float fti_fptmp;
+extern int fti_itmp;
+
+#define f2i(a, b) { \
+fti_fptmp = (b); \
+FloatToInt(); \
+a = fti_itmp;}
#else /* inline stuff */
@@ -1869,6 +1881,16 @@ __asm__("fld fti_fptmp \n\t"
a = FloatToInt(b); \
}
+
+#if 0
+int SqRoot32(int A);
+void FloatToInt();
+#define f2i(a, b) { \
+fti_fptmp = (b); \
+FloatToInt(); \
+a = fti_itmp;}
+#endif
+
#endif
#endif