mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-17 15:39:05 +01:00
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
/*
|
|
vid_sdl.c - SDL vid component
|
|
Copyright (C) 2018 a1batross
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
*/
|
|
|
|
#include "common.h"
|
|
#include "gl_local.h"
|
|
#include "gl_export.h"
|
|
|
|
ref_api_t gEngfuncs;
|
|
ref_globals_t *gpGlobals;
|
|
|
|
/*
|
|
============
|
|
Con_Printf
|
|
|
|
engine callback wrapper
|
|
============
|
|
*/
|
|
void Con_Printf( const char *fmt, ... )
|
|
{
|
|
va_list args;
|
|
va_start( args, fmt );
|
|
gEngfuncs.Con_VPrintf( fmt, args );
|
|
va_end( args );
|
|
}
|
|
|
|
ref_interface_t gReffuncs =
|
|
{
|
|
|
|
};
|
|
|
|
int GAME_EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t *engfuncs, ref_globals_t *globals )
|
|
{
|
|
if( version != REF_API_VERSION )
|
|
return 0;
|
|
|
|
// fill in our callbacks
|
|
memcpy( funcs, &gReffuncs, sizeof( ref_interface_t ));
|
|
memcpy( &gEngfuncs, engfuncs, sizeof( ref_api_t ));
|
|
gpGlobals = globals;
|
|
|
|
return REF_API_VERSION;
|
|
}
|