Allows edivstd.so te built on non-windows systems
This commit is contained in:
parent
4af999b286
commit
59a8f5c6b9
16
dlls/src/edivstd/build.sh
Executable file
16
dlls/src/edivstd/build.sh
Executable file
|
@ -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
|
|
@ -24,14 +24,10 @@
|
||||||
* DIV, tal como las opciones de compilación, estructura reserved, etc.
|
* DIV, tal como las opciones de compilación, estructura reserved, etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
unsigned int tiempo;
|
unsigned int tiempo;
|
||||||
unsigned int ultimo_tiempo;
|
unsigned int ultimo_tiempo;
|
||||||
#else
|
|
||||||
#error ¡adapta las rutinas de timer a Linux! (edivstd no debe usar SDL)
|
|
||||||
#endif
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -303,18 +299,15 @@ int eDIV_Let_Me_Alone(FUNCTION_PARAMS)
|
||||||
*/
|
*/
|
||||||
void first_load(FUNCTION_PARAMS)
|
void first_load(FUNCTION_PARAMS)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
struct timeb tiempob;
|
struct timeb tiempob;
|
||||||
ftime(&tiempob);
|
ftime(&tiempob);
|
||||||
ultimo_tiempo=tiempob.time*100+tiempob.millitm/10;
|
ultimo_tiempo=tiempob.time*100+tiempob.millitm/10;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void frame(FUNCTION_PARAMS)
|
void frame(FUNCTION_PARAMS)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int timer;
|
int timer;
|
||||||
#ifdef _WIN32
|
|
||||||
struct timeb tiempob;
|
struct timeb tiempob;
|
||||||
ftime(&tiempob);
|
ftime(&tiempob);
|
||||||
tiempo=tiempob.time*100+tiempob.millitm/10;
|
tiempo=tiempob.time*100+tiempob.millitm/10;
|
||||||
|
@ -322,7 +315,6 @@ void frame(FUNCTION_PARAMS)
|
||||||
for(i=0;i<10;i++)
|
for(i=0;i<10;i++)
|
||||||
fp->mem[timer+i]+=tiempo-ultimo_tiempo;
|
fp->mem[timer+i]+=tiempo-ultimo_tiempo;
|
||||||
ultimo_tiempo=tiempo;
|
ultimo_tiempo=tiempo;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue