#pragma once #include "../process64.h" class CS2 : public PROCESS64 { public: CS2() : PROCESS64( "cs2.exe" ) {}; bool open() { if( !PROCESS64::open() ) return false; mod.client = get_module64( "client.dll"fnv ); mod.engine = get_module64( "engine.dll"fnv ); mod.schema = get_module64( "schemasystem.dll"fnv ); // todo: handle this using loader iface.client = get_iface( "Source2Client0" ); iface.engine = get_iface( "Source2EngineToClient0" ); return true; } IFACE_ENTRY get_iface( const char* name ) { VECTOR entries = iface_get_all( this ); for( auto it : entries ) { if( strncmp( it.name, name, strlen( name ) ) == 0 ) { clog( "iface %s: [%llx]\n", it.name.data, it.ptr ); return it; } } return {}; } struct { MODULE_ENTRY client; MODULE_ENTRY engine; MODULE_ENTRY schema; } mod; struct { IFACE_ENTRY client; IFACE_ENTRY engine; } iface; };