/*! initialise the various google::dense_hash_map "lists" that are used throughout QTils */ void init_QTMWlists() { if( !q2nw_initialised ){ // these two keys (variable names) should never occur: qtwmh2hwnd.set_empty_key( (QTMovieWindowH) 0 ); qtwmh2hwnd.set_deleted_key( (QTMovieWindowH) -1 ); q2nw_initialised = 1; } if( !nw2q_initialised ){ // these two keys (variable names) should never occur: hwnd2qtwmh.set_empty_key( (NativeWindow) 0 ); hwnd2qtwmh.set_deleted_key( (NativeWindow) -1 ); nw2q_initialised = 1; } if( !m2qtmwh_initialised ){ // these two keys (variable names) should never occur: m2qtmwh.set_empty_key( (Movie) 0 ); m2qtmwh.set_deleted_key( (Movie) -1 ); m2qtmwh_initialised = 1; } #if defined(WIN32) || defined(_WINDOWS) || defined(_MSC_VER) if( !met_initialised ){ int i; // these two keys (variable names) should never occur: metMap.set_empty_key( (ErrCode) 65535 ); metMap.set_deleted_key( (ErrCode) -65535 ); for( i = 0 ; i < sizeof(macErrorTable) / sizeof(MacErrorTables) ; i++ ){ metMap[macErrorTable[i].errCode] = &macErrorTable[i]; } met_initialised = 1; } #endif lastQTWMH = NULL; }
void PatchMW2_StringList() { slHashMap.set_empty_key("*DUMMYDUMMY*"); slHashMap.set_deleted_key("*DUMMYDUMM*"); call(0x4D2280, SL_Init, PATCH_JUMP); call(0x436B40, SL_GetStringOfSize, PATCH_JUMP); call(0x4EC1D0, SL_ConvertToString_, PATCH_JUMP); call(0x61BCB0, FindStringOfSize, PATCH_JUMP); call(0x469D80, SL_ConvertFromString, PATCH_JUMP); call(0x4D9B00, SL_AddRefToString, PATCH_JUMP); call(0x4F1500, SL_RemoveRefToStringOfSize, PATCH_JUMP); call(0x47CD70, SL_RemoveRefToString, PATCH_JUMP); call(0x417730, Scr_SetString, PATCH_JUMP); call(0x4401E0, SL_GetStringLen, PATCH_JUMP); call(0x40C050, SL_TransferRefToUser, PATCH_JUMP); call(0x4B4310, SL_AddUser, PATCH_JUMP); call(0x430510, SL_ConvertToLowercase, PATCH_JUMP); call(0x4F46D0, SL_ShutdownSystem, PATCH_JUMP); call(0x4A44A0, SL_TransferSystem, PATCH_JUMP); stringHeap = HeapCreate(0, 1024 * 1024, 0); // path_node_constant_t marking function; has some terrible string references *(BYTE*)0x4F74B0 = 0xC3; }