mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-25 03:11:06 +01:00
avi: add DLL skeleton files
This commit is contained in:
parent
6645988e7e
commit
7573637f82
17
avi/common/common.c
Normal file
17
avi/common/common.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include <string.h>
|
||||
#include "common.h"
|
||||
|
||||
extern movie_interface_t g_api;
|
||||
movie_api_t g_engfuncs;
|
||||
|
||||
int EXPORT GetMovieAPI( int version, movie_api_t *api, movie_interface_t *interface );
|
||||
int EXPORT GetMovieAPI( int version, movie_api_t *api, movie_interface_t *interface )
|
||||
{
|
||||
if( version != MOVIE_API_VERSION )
|
||||
return 0;
|
||||
|
||||
memcpy( &g_engfuncs, api, sizeof( g_engfuncs ));
|
||||
memcpy( interface, &g_api, sizeof( *interface ));
|
||||
|
||||
return MOVIE_API_VERSION;
|
||||
}
|
20
avi/common/common.h
Normal file
20
avi/common/common.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef AVI_COMMON_H
|
||||
#define AVI_COMMON_H
|
||||
|
||||
#include "movie_api.h"
|
||||
|
||||
extern movie_api_t g_engfuncs;
|
||||
|
||||
#define Mem_Malloc( pool, size ) g_engfuncs._Mem_Alloc( pool, size, false, __FILE__, __LINE__ )
|
||||
#define Mem_Calloc( pool, size ) g_engfuncs._Mem_Alloc( pool, size, true, __FILE__, __LINE__ )
|
||||
#define Mem_Realloc( pool, ptr, size ) g_engfuncs._Mem_Realloc( pool, ptr, size, true, __FILE__, __LINE__ )
|
||||
#define Mem_Free( mem ) g_engfuncs._Mem_Free( mem, __FILE__, __LINE__ )
|
||||
#define Mem_AllocPool( name ) g_engfuncs._Mem_AllocPool( name, __FILE__, __LINE__ )
|
||||
#define Mem_FreePool( pool ) g_engfuncs._Mem_FreePool( pool, __FILE__, __LINE__ )
|
||||
|
||||
#define Con_Printf (*g_engfuncs._Con_Printf)
|
||||
#define Con_DPrintf (*g_engfuncs._Con_DPrintf)
|
||||
#define Con_Reportf (*g_engfuncs._Con_Reportf)
|
||||
#define Sys_Error (*g_engfuncs._Sys_Error)
|
||||
|
||||
#endif // AVI_COMMON_H
|
23
avi/common/wscript
Normal file
23
avi/common/wscript
Normal file
@ -0,0 +1,23 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
from waflib import Logs
|
||||
import os
|
||||
|
||||
def options(opt):
|
||||
return
|
||||
|
||||
def configure(conf):
|
||||
return
|
||||
|
||||
def build(bld):
|
||||
bld(name = 'avi_common_includes', export_includes = '.', use = 'engine_includes filesystem_includes')
|
||||
|
||||
bld.stlib(source = bld.path.ant_glob(['*.c']),
|
||||
target = 'avi_common',
|
||||
features = 'c',
|
||||
includes = '.',
|
||||
use = 'avi_common_includes public werror',
|
||||
install_path = bld.env.LIBDIR,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||
)
|
26
avi/win32/wscript
Normal file
26
avi/win32/wscript
Normal file
@ -0,0 +1,26 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
from waflib import Logs
|
||||
import os
|
||||
|
||||
def options(opt):
|
||||
return
|
||||
|
||||
def configure(conf):
|
||||
return
|
||||
|
||||
def build(bld):
|
||||
libs = [ 'engine_includes', 'werror', 'public' ]
|
||||
|
||||
if bld.env.DEDICATED:
|
||||
return
|
||||
|
||||
bld.shlib(source = bld.path.ant_glob(['*.c']),
|
||||
target = 'avi_win32',
|
||||
features = 'c',
|
||||
includes = '. ../',
|
||||
use = 'avi_common avi_common_includes public werror',
|
||||
install_path = bld.env.LIBDIR,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||
)
|
2
wscript
2
wscript
@ -69,6 +69,8 @@ SUBDIRS = [
|
||||
Subproject('dllemu'),
|
||||
|
||||
# disable only by engine feature, makes no sense to even parse subprojects in dedicated mode
|
||||
Subproject('avi/common', lambda x: not x.env.DEDICATED),
|
||||
Subproject('avi/win32', lambda x: not x.env.DEDICATED and x.env.DEST_OS == 'win32'),
|
||||
Subproject('3rdparty/extras', lambda x: not x.env.DEDICATED and x.env.DEST_OS != 'android'),
|
||||
Subproject('3rdparty/nanogl', lambda x: not x.env.DEDICATED and x.env.NANOGL),
|
||||
Subproject('3rdparty/gl-wes-v2', lambda x: not x.env.DEDICATED and x.env.GLWES),
|
||||
|
Loading…
Reference in New Issue
Block a user