summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-09-01 10:40:29 (GMT)
committer Simon <simon@hardwired.org.uk>2010-09-01 10:40:29 (GMT)
commitcf85eabee95be1e4947935183d1366cba6f42245 (patch)
tree74169763bd8a27fad15d601110a9579e7f96bbd8 /misc.h
parent75d3e18fbfb3dfb8f757cbe3d36d5953c2621956 (diff)
downloadpowder-cf85eabee95be1e4947935183d1366cba6f42245.zip
powder-cf85eabee95be1e4947935183d1366cba6f42245.tar.gz
Fixed zoom, removed plastic, fixed oil, more moving around. Experimental Neutron behaviour
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/misc.h b/misc.h
index dbc2b84..106d216 100644
--- a/misc.h
+++ b/misc.h
@@ -3,6 +3,23 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#define x86_cpuid(func,af,bf,cf,df) \
+ do {\
+ __asm mov eax, func\
+ __asm cpuid\
+ __asm mov af, eax\
+ __asm mov bf, ebx\
+ __asm mov cf, ecx\
+ __asm mov df, edx\
+ } while(0)
+#else
+#define x86_cpuid(func,af,bf,cf,df) \
+__asm__ __volatile ("cpuid":\
+ "=a" (af), "=b" (bf), "=c" (cf), "=d" (df) : "a" (func));
+#endif
+
+static char hex[] = "0123456789ABCDEF";
//Signum function
#ifdef WIN32
extern _inline int isign(float i);
@@ -44,4 +61,10 @@ void save_string(FILE *f, char *str);
int load_string(FILE *f, char *str, int max);
+void strcaturl(char *dst, char *src);
+
+void *file_load(char *fn, int *size);
+
+int cpu_check(void);
+
#endif \ No newline at end of file