mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
modify original vtex and add png support for it
This commit is contained in:
46
utils/vtexconv/vtex_launcher.cpp
Normal file
46
utils/vtexconv/vtex_launcher.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include <stdio.h>
|
||||
#include "tier1/interface.h"
|
||||
#include "ilaunchabledll.h"
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
const char *pModuleName = "vtex_dll" DLL_EXT_STRING;
|
||||
|
||||
CSysModule *pModule = Sys_LoadModule( pModuleName );
|
||||
if ( !pModule )
|
||||
{
|
||||
printf( "Can't load %s.", pModuleName );
|
||||
return 1;
|
||||
}
|
||||
|
||||
CreateInterfaceFn fn = Sys_GetFactory( pModule );
|
||||
if ( !fn )
|
||||
{
|
||||
printf( "Can't get factory from %s.", pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
ILaunchableDLL *pInterface = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, NULL );
|
||||
if ( !pInterface )
|
||||
{
|
||||
printf( "Can't get '%s' interface from %s.", LAUNCHABLE_DLL_INTERFACE_VERSION, pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
int iRet = pInterface->main( argc, argv );
|
||||
Sys_UnloadModule( pModule );
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
48
utils/vtexconv/wscript
Executable file
48
utils/vtexconv/wscript
Executable file
@@ -0,0 +1,48 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
from waflib import Utils
|
||||
import os
|
||||
|
||||
top = '.'
|
||||
PROJECT_NAME = 'vtexconv'
|
||||
|
||||
def options(opt):
|
||||
# stub
|
||||
return
|
||||
|
||||
def configure(conf):
|
||||
conf.define('PROTECTED_THINGS_DISABLE', 1)
|
||||
|
||||
def build(bld):
|
||||
source = [
|
||||
'vtex_launcher.cpp'
|
||||
]
|
||||
|
||||
includes = [
|
||||
'.',
|
||||
'../../public',
|
||||
'../../public/tier0',
|
||||
'../../public/tier1',
|
||||
'../../common'
|
||||
]
|
||||
|
||||
defines = []
|
||||
|
||||
libs = ['tier0', 'appframework','tier1','tier2','tier3','vstdlib']
|
||||
|
||||
install_path = bld.env.BINDIR
|
||||
|
||||
bld(
|
||||
source = source,
|
||||
target = PROJECT_NAME,
|
||||
name = PROJECT_NAME,
|
||||
features = 'c cxx cxxprogram',
|
||||
includes = includes,
|
||||
defines = defines,
|
||||
use = libs,
|
||||
install_path = install_path,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||
idx = bld.get_taskgen_count()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user