diff --git a/dlls/src/edivstd/build.sh b/dlls/src/edivstd/build.sh new file mode 100755 index 0000000..d3c72a9 --- /dev/null +++ b/dlls/src/edivstd/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +NAME="edivstd" +CCOPTS="-I. -I/usr/local/include -I../include" + +FILES="edivstd" + +OBJECTS="" + +for FILE in $FILES; do + gcc -c $FILE.c $CCOPTS -o $FILE.o + OBJECTS+="$FILE.o " +done + +gcc $OBJECTS -shared -o ../../bin/${NAME}.so -L/usr/local/lib -lSDL + +rm $OBJECTS diff --git a/dlls/src/edivstd/edivstd.c b/dlls/src/edivstd/edivstd.c index 8c37dbc..01e188a 100644 --- a/dlls/src/edivstd/edivstd.c +++ b/dlls/src/edivstd/edivstd.c @@ -24,14 +24,10 @@ * DIV, tal como las opciones de compilación, estructura reserved, etc. */ -#ifdef _WIN32 #include #include unsigned int tiempo; unsigned int ultimo_tiempo; -#else - #error ¡adapta las rutinas de timer a Linux! (edivstd no debe usar SDL) -#endif #include #include @@ -303,26 +299,22 @@ int eDIV_Let_Me_Alone(FUNCTION_PARAMS) */ void first_load(FUNCTION_PARAMS) { - #ifdef _WIN32 - struct timeb tiempob; - ftime(&tiempob); - ultimo_tiempo=tiempob.time*100+tiempob.millitm/10; - #endif + struct timeb tiempob; + ftime(&tiempob); + ultimo_tiempo=tiempob.time*100+tiempob.millitm/10; } void frame(FUNCTION_PARAMS) { int i; int timer; - #ifdef _WIN32 - struct timeb tiempob; - ftime(&tiempob); - tiempo=tiempob.time*100+tiempob.millitm/10; - timer=globalptr("timer"); - for(i=0;i<10;i++) - fp->mem[timer+i]+=tiempo-ultimo_tiempo; - ultimo_tiempo=tiempo; - #endif + struct timeb tiempob; + ftime(&tiempob); + tiempo=tiempob.time*100+tiempob.millitm/10; + timer=globalptr("timer"); + for(i=0;i<10;i++) + fp->mem[timer+i]+=tiempo-ultimo_tiempo; + ultimo_tiempo=tiempo; }