2008-11-16 01:29:24 +01:00
|
|
|
#ifndef _INCLUDE_METAMOD_SOURCE_LOADER_H_
|
|
|
|
#define _INCLUDE_METAMOD_SOURCE_LOADER_H_
|
|
|
|
|
|
|
|
#define SH_COMP_GCC 1
|
|
|
|
#define SH_COMP_MSVC 2
|
|
|
|
|
|
|
|
#if defined WIN32
|
|
|
|
#define WINDOWS_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
2008-11-24 05:18:17 +01:00
|
|
|
#include <direct.h>
|
2008-11-16 01:29:24 +01:00
|
|
|
#define PLATFORM_MAX_PATH MAX_PATH
|
|
|
|
#define SH_COMP SH_COMP_MSVC
|
2008-11-24 04:21:49 +01:00
|
|
|
#define PATH_SEP_STR "\\"
|
|
|
|
#define PATH_SEP_CHAR '\\'
|
|
|
|
#define ALT_SEP_CHAR '/'
|
2008-11-16 01:29:24 +01:00
|
|
|
#elif defined __linux__
|
|
|
|
#include <dlfcn.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <stdint.h>
|
2008-11-24 04:21:49 +01:00
|
|
|
#include <unistd.h>
|
2008-11-16 01:29:24 +01:00
|
|
|
typedef void * HMODULE;
|
|
|
|
#define PLATFORM_MAX_PATH PATH_MAX
|
|
|
|
#define SH_COMP SH_COMP_GCC
|
2008-11-24 04:21:49 +01:00
|
|
|
#define PATH_SEP_STR "/"
|
|
|
|
#define PATH_SEP_CHAR '/'
|
|
|
|
#define ALT_SEP_CHAR '\\'
|
2008-11-16 01:29:24 +01:00
|
|
|
#else
|
|
|
|
#error "OS detection failed"
|
|
|
|
#endif
|
|
|
|
|
2008-11-24 04:21:49 +01:00
|
|
|
#include "loader_bridge.h"
|
|
|
|
|
2008-11-16 01:29:24 +01:00
|
|
|
#define SH_PTRSIZE sizeof(void*)
|
|
|
|
|
|
|
|
enum MetamodBackend
|
|
|
|
{
|
|
|
|
MMBackend_Episode1 = 0,
|
|
|
|
MMBackend_Episode2,
|
|
|
|
MMBackend_Left4Dead,
|
|
|
|
MMBackend_UNKNOWN
|
|
|
|
};
|
|
|
|
|
|
|
|
extern bool
|
|
|
|
mm_LoadMetamodLibrary(MetamodBackend backend, char *buffer, size_t maxlength);
|
|
|
|
|
|
|
|
extern void *
|
|
|
|
mm_GetProcAddress(const char *name);
|
|
|
|
|
|
|
|
extern void
|
|
|
|
mm_UnloadMetamodLibrary();
|
|
|
|
|
|
|
|
extern void
|
|
|
|
mm_LogFatal(const char *message, ...);
|
|
|
|
|
2008-11-24 04:21:49 +01:00
|
|
|
extern MetamodBackend
|
|
|
|
mm_DetermineBackend(QueryValveInterface qvi);
|
|
|
|
|
2008-11-16 01:29:24 +01:00
|
|
|
#endif /* _INCLUDE_METAMOD_SOURCE_LOADER_H_ */
|
|
|
|
|