X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=16%2Fw_modex%2FFIXED32.HPP;fp=16%2Fw_modex%2FFIXED32.HPP;h=0000000000000000000000000000000000000000;hb=d910ad2fc48491c391e1984e74616e50d28d95d7;hp=49a084fed42da5d4f0d9b3c2f405e74dd839a515;hpb=c177f098b3b96d001ce1796966af9e2ca339eb88;p=16.git diff --git a/16/w_modex/FIXED32.HPP b/16/w_modex/FIXED32.HPP deleted file mode 100644 index 49a084fe..00000000 --- a/16/w_modex/FIXED32.HPP +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef FIXEDPOINT_HPP - #define FIXEDPOINT_HPP - -typedef long Fixed32; // 16.16 FixedPoint -typedef unsigned char Iangle; // Integer angle (0..255) - -/* Macros for Type Conversion */ -#define INT_TO_FIXED(x) ((x) << 16) -#define FIXED_TO_INT(x) ((x) >> 16) -#define ROUND_FIXED_TO_INT(x) (((x) + 0x8000) >> 16) - -// Loads Fixed32 datafiles -void initFixed32(void); - -// Common math functions -Fixed32 FixedMul(Fixed32 num1, Fixed32 num2); -Fixed32 FixedDiv(Fixed32 numer, Fixed32 denom); -void CosSin(Iangle theta, Fixed32 *Cos, Fixed32 *Sin); - -Fixed32 FixedMulASM(Fixed32 num1, Fixed32 num2); -#pragma aux FixedMulASM = \ - "imul edx" \ - "add eax, 8000h" \ - "adc edx, 0" \ - "shrd eax, edx, 16" \ - parm caller [eax] [edx] \ - value [eax] \ - modify [eax edx]; - -Fixed32 FixedDivASM(Fixed32 numer, Fixed32 denom); // No rounding! -#pragma aux FixedDivASM = \ - "xor eax, eax" \ - "shrd eax, edx, 16" \ - "sar edx, 16" \ - "idiv ebx" \ - parm caller [edx] [ebx] \ - value [eax] \ - modify [eax ebx edx]; - -#endif -