2006-09-20 02:41:24 +02:00
|
|
|
#include <sp_vm_api.h>
|
2006-10-10 03:55:08 +02:00
|
|
|
#include "jit_x86.h"
|
|
|
|
#include "dll_exports.h"
|
|
|
|
|
|
|
|
SourcePawn::ISourcePawnEngine *engine = NULL;
|
|
|
|
JITX86 jit;
|
|
|
|
|
2006-11-08 08:35:16 +01:00
|
|
|
EXPORTFUNC int GiveEnginePointer(SourcePawn::ISourcePawnEngine *engine_p)
|
2006-10-10 03:55:08 +02:00
|
|
|
{
|
|
|
|
engine = engine_p;
|
2006-11-08 08:35:16 +01:00
|
|
|
|
|
|
|
return 0;
|
2006-10-10 03:55:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
EXPORTFUNC unsigned int GetExportCount()
|
|
|
|
{
|
2006-10-10 18:39:55 +02:00
|
|
|
return 1;
|
2006-10-10 03:55:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
EXPORTFUNC SourcePawn::IVirtualMachine *GetExport(unsigned int exportnum)
|
|
|
|
{
|
|
|
|
/* Don't return anything if we're not initialized yet */
|
|
|
|
if (!engine)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We only have one export - 0 */
|
|
|
|
if (exportnum)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return &jit;
|
|
|
|
}
|