Пример #1
0
LPGUID iKX::get_dsound_guid(int where)
{
 // GUID null_guid;
 // memset(&null_guid,0,sizeof(null_guid));
 // if(memcmp(&null_guid,&guid,sizeof(GUID))==0) // not inited
 init_directx(where);
 return &guid_;
}
Пример #2
0
//------------ Begin of function Sys::init ----------//
int Sys::init( HANDLE hInstance ) {
    err_when( init_flag );

    //------- initialize basic vars --------//
    app_hinstance = (HINSTANCE)hInstance;

#ifdef BETA
    debug_session       = m.is_file_exist("DEBUG.SYS");
    testing_session     = m.is_file_exist("TESTING.SYS");
#endif

#ifdef DEBUG
    // Ben has put debug.sys in download version, so change to use DEBUGCC.SYS
    debug_session       = m.is_file_exist("DEBUGCC.SYS");
    testing_session     = m.is_file_exist("TESTING.SYS");
#endif

    // add in (GAME_VERSION>=200)
    use_true_front      = debug_session;

    // Ben what Win2K winXP has no lock buffer problem, so force to 1 to turn on triple buffer (1 primary + 2 system memory surfaces)
    use_true_front = 1;

    if( m.is_file_exist("WINMODE.SYS") )
	use_true_front = 2;                           // window mode

    set_game_dir();                                 // set game directories names and game version

    //------- initialize more stuff ---------//
    if( !init_win() )
	return FALSE;

    if( !init_directx() )
	return FALSE;

    if( !init_objects() )                           // initialize system objects which do not change from games to games.
	return FALSE;

    init_flag = 1;

    return TRUE;
}