// Initialize is called by Inner Space when the extension should initialize. bool ISXEQItemDisplay::Initialize(ISInterface *p_ISInterface) { pISInterface=p_ISInterface; // retrieve basic ISData types pStringType=pISInterface->FindLSType("string"); pIntType=pISInterface->FindLSType("int"); pBoolType=pISInterface->FindLSType("bool"); pFloatType=pISInterface->FindLSType("float"); pTimeType=pISInterface->FindLSType("time"); pByteType=pISInterface->FindLSType("byte"); pISInterface->OpenSettings(XMLFileName); ConnectServices(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterServices(); EzDetour(CItemDisplayWnd__SetSpell,&ItemDisplayHook::SetSpell_Detour,&ItemDisplayHook::SetSpell_Trampoline); EzDetour(CItemDisplayWnd__UpdateStrings, &ItemDisplayHook::UpdateStrings_Detour, &ItemDisplayHook::UpdateStrings_Trampoline); //EzDetour(CXWnd__DrawTooltipAtPoint,&XWndHook::DrawTooltipAtPoint_Detour,&XWndHook::DrawTooltipAtPoint_Trampoline); //EzDetour(CInvSlotWnd__DrawTooltip, &InvSlotWndHook::DrawTooltip_Detour, &InvSlotWndHook::DrawTooltip_Trampoline); WriteChatf("ISXEQItemDisplay Loaded"); return true; }
// Initialize is called by Inner Space when the extension should initialize. bool ISXEQHUDMove::Initialize(ISInterface *p_ISInterface) { pISInterface = p_ISInterface; // retrieve basic ISData types pStringType = pISInterface->FindLSType("string"); pIntType = pISInterface->FindLSType("int"); pBoolType = pISInterface->FindLSType("bool"); pFloatType = pISInterface->FindLSType("float"); pTimeType = pISInterface->FindLSType("time"); pByteType = pISInterface->FindLSType("byte"); pISInterface->OpenSettings(XMLFileName); LoadSettings(); ConnectServices(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterServices(); WriteChatf("ISXEQHUDMove Loaded"); return true; }
void Init( void ) { RegisterCommands(); RegisterCvars(); isServer = Common::com_dedicated->GetBool(); peer = RakNet::RakPeerInterface::GetInstance(); uint16_t port = static_cast<uint16_t>( net_port->GetInt32() ); RakNet::SocketDescriptor socketDescriptors[] = { RakNet::SocketDescriptor( port, nullptr ) // primary network card }; if ( isServer ) { maxConnections = Server::sv_maxConnections->GetUInt32(); } else { maxConnections = 1u; } peer->Startup( maxConnections, socketDescriptors, ARRAY_LEN( socketDescriptors ) ); peer->SetMaximumIncomingConnections( maxConnections ); // peer->SetOccasionalPing( true ); peer->SetUnreliableTimeout( 1000 ); peer->AllowConnectionResponseIPMigration( false ); myGUID = peer->GetGuidFromSystemAddress( RakNet::UNASSIGNED_SYSTEM_ADDRESS ).g; PrintStatus(); }
// Initialize is called by Inner Space when the extension should initialize. bool ISXEQLabels::Initialize(ISInterface *p_ISInterface) { pISInterface=p_ISInterface; // retrieve basic ISData types pStringType=pISInterface->FindLSType("string"); pIntType=pISInterface->FindLSType("int"); pBoolType=pISInterface->FindLSType("bool"); pFloatType=pISInterface->FindLSType("float"); pTimeType=pISInterface->FindLSType("time"); pByteType=pISInterface->FindLSType("byte"); pISInterface->OpenSettings(XMLFileName); LoadSettings(); ConnectServices(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterServices(); EzDetour(CLabel__Draw,&CLabelHook::Draw_Detour,&CLabelHook::Draw_Trampoline); EzDetour(CSidlManager__CreateLabel,&CSidlManagerHook::CreateLabel_Detour,&CSidlManagerHook::CreateLabel_Trampoline); // currently in testing: // EasyClassDetour(CGauge__Draw,CGaugeHook,Draw_Detour,VOID,(VOID),Draw_Trampoline); // EasyDetour(__GetGaugeValueFromEQ,GetGaugeValueFromEQ_Hook,int,(int,class CXStr *,bool *),GetGaugeValueFromEQ_Trampoline); WriteChatf("ISXEQLabels Loaded"); return true; }
// Initialize is called by Inner Space when the extension should initialize. bool ISXEQMap::Initialize(ISInterface *p_ISInterface) { pISInterface = p_ISInterface; // retrieve basic ISData types pStringType = pISInterface->FindLSType("string"); pIntType = pISInterface->FindLSType("int"); pBoolType = pISInterface->FindLSType("bool"); pFloatType = pISInterface->FindLSType("float"); pTimeType = pISInterface->FindLSType("time"); pByteType = pISInterface->FindLSType("byte"); pISInterface->OpenSettings("ISXEQMap.XML"); bmMapRefresh = AddMQ2Benchmark("Map Refresh"); unsigned int i; CHAR szBuffer[MAX_STRING] = { 0 }; for (i = 0; MapFilterOptions[i].szName; i++) { sprintf(szBuffer, "%s Color", MapFilterOptions[i].szName); int Temp; if (pISInterface->GetSettingi("ISXEQMap.XML", "Map Filters", MapFilterOptions[i].szName, Temp)) MapFilterOptions[i].Enabled = Temp; else MapFilterOptions[i].Enabled = MapFilterOptions[i].Default; if (pISInterface->GetSettingi("ISXEQMap.XML", "Map Filters", szBuffer, Temp)) MapFilterOptions[i].Color = Temp | 0xFF000000; else MapFilterOptions[i].Color = MapFilterOptions[i].DefaultColor | 0xFF000000; } MapInit(); pISInterface->GetSetting("ISXEQMap.XML", "Naming Schemes", "Normal", MapNameString, sizeof(MapNameString)); pISInterface->GetSetting("ISXEQMap.XML", "Naming Schemes", "Target", MapTargetNameString, sizeof(MapTargetNameString)); for (i = 1; i<16; i++) { sprintf(szBuffer, "KeyCombo%d", i); pISInterface->GetSetting("ISXEQMap.XML", "Right Click", szBuffer, MapSpecialClickString[i], sizeof(MapSpecialClickString[i])); } // Do not use Custom, since the string isn't stored MapFilterOptions[MAPFILTER_Custom].Enabled = 0; ConnectServices(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterServices(); EzDetour(CMapViewWnd__CMapViewWnd, &CMyMapViewWnd::Constructor_Detour, &CMyMapViewWnd::Constructor_Trampoline); CMyMapViewWnd::StealVFTable(); printf("ISXEQMap Loaded"); return true; }
// Initialize is called by Inner Space when the extension should initialize. bool CISXEQ::Initialize(ISInterface *p_ISInterface) { pISInterface=p_ISInterface; char CurrentModule[512]={0}; GetModuleFileName(0,CurrentModule,512); char *filename; if (filename=strrchr(CurrentModule,'\\')) filename++; else filename=CurrentModule; if (stricmp(filename,"eqgame.exe")) { printf("ISXEQ is only meant to be used in eqgame.exe"); return false; } // retrieve basic ISData types pStringType=pISInterface->FindLSType("string"); pMutableStringType = pISInterface->FindLSType("mutablestring"); pWStringType = pISInterface->FindLSType("unistring"); pUniStringType = pISInterface->FindLSType("unistring"); pIntType=pISInterface->FindLSType("int"); pUIntType = pISInterface->FindLSType("uint"); pInt64Type = pISInterface->FindLSType("int64"); pInt64PtrType = pISInterface->FindLSType("int64ptr"); pBoolType=pISInterface->FindLSType("bool"); pFloatType=pISInterface->FindLSType("float"); pTimeType=pISInterface->FindLSType("time"); pByteType=pISInterface->FindLSType("byte"); pIntPtrType=pISInterface->FindLSType("intptr"); pBoolPtrType=pISInterface->FindLSType("boolptr"); pFloatPtrType=pISInterface->FindLSType("floatptr"); pFloat64PtrType = pISInterface->FindLSType("float64ptr"); pBytePtrType=pISInterface->FindLSType("byteptr"); pPoint3fType = pISInterface->FindLSType("point3f"); pIndexType = pISInterface->FindLSType("index"); pVectorType = pISInterface->FindLSType("index"); pMapType = pISInterface->FindLSType("collection"); pSetType = pISInterface->FindLSType("set"); ConnectServices(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterServices(); HookMemChecker(TRUE); strcpy(gszINIPath,ModulePath); MQ2Initialize(); printf("ISXEQ Loaded"); return true; }
// Initialize is called by Inner Space when the extension should initialize. bool LSMIPC::Initialize(LSInterface *p_LSInterface) { pLSInterface=p_LSInterface; //RegisterModule(); // retrieve basic ISData types pStringType=pLSInterface->FindLSType("string"); pIntType=pLSInterface->FindLSType("int"); pUintType=pLSInterface->FindLSType("uint"); pBoolType=pLSInterface->FindLSType("bool"); pFloatType=pLSInterface->FindLSType("float"); pTimeType=pLSInterface->FindLSType("time"); pByteType=pLSInterface->FindLSType("byte"); pIntPtrType=pLSInterface->FindLSType("intptr"); pBoolPtrType=pLSInterface->FindLSType("boolptr"); pFloatPtrType=pLSInterface->FindLSType("floatptr"); pBytePtrType=pLSInterface->FindLSType("byteptr"); pIndexType=pLSInterface->FindLSType("index"); pQueueType=pLSInterface->FindLSType("queue"); pSetType=pLSInterface->FindLSType("set"); pCollectionType=pLSInterface->FindLSType("collection"); pStackType=pLSInterface->FindLSType("stack"); pIteratorType=pLSInterface->FindLSType("iterator"); RegisterEvents(); RegisterCommands(); RegisterAliases(); RegisterDataTypes(); RegisterTopLevelObjects(); RegisterTriggers(); pLSInterface->AttachEventTarget(pIPCIndexEvent, IPCIndexEvent); pLSInterface->AttachEventTarget(pIPCSetEvent, IPCSetEvent); pLSInterface->AttachEventTarget(pIPCCollectionEvent, IPCCollectionEvent); pLSInterface->AttachEventTarget(pIPCQueueEvent, IPCQueueEvent); pLSInterface->AttachEventTarget(pIPCStackEvent, IPCStackEvent); printf("LSMIPC version %s Loaded",IPC_Version); return true; }
Environment::Environment(IFileSystem& fileSystem, std::ostream& output, char const * directory, size_t gramSize, size_t threadCount, size_t memory) // TODO: Don't like passing *this to TaskFactory. // What if TaskFactory calls back before Environment is fully initialized? : m_fileSystem(fileSystem), m_taskFactory(new TaskFactory(*this)), // Start one extra thread for the Recycler. m_taskPool(new TaskPool(threadCount + 1)), m_index(Factories::CreateSimpleIndex(fileSystem)), m_cacheLineCountMode(false), m_compilerMode(true), m_failOnException(false), m_threadCount(threadCount), m_memory(memory), m_directory(directory), m_gramSize(gramSize), m_output(output) { RegisterCommands(); }
AfCmd::AfCmd(): recieving( false), command( NULL) { RegisterCommands(); }
// Direct3DDevice9::Reset void Direct3DReset() { // If our GUI instance does not exist create it if(!g_pGUI) { g_pGUI = new CGUI(g_pDevice); if(g_pGUI->Initialize()) { // Version identifier text g_pVersionIdentifier = g_pGUI->CreateGUIStaticText(); g_pVersionIdentifier->setText(VERSION_IDENTIFIER); CEGUI::Font * pFont = g_pGUI->GetFont("tahoma-bold"); float fTextWidth = pFont->getTextExtent(VERSION_IDENTIFIER); float fTextHeight = pFont->getFontHeight(); g_pVersionIdentifier->setSize(CEGUI::UVector2(CEGUI::UDim(0, fTextWidth), CEGUI::UDim(0, fTextHeight))); float fTextX = pFont->getTextExtent("_"); float fTextY = -(fTextX + fTextHeight); g_pVersionIdentifier->setPosition(CEGUI::UVector2(CEGUI::UDim(0, fTextX), CEGUI::UDim(1, fTextY))); g_pVersionIdentifier->setProperty("FrameEnabled", "false"); g_pVersionIdentifier->setProperty("BackgroundEnabled", "false"); g_pVersionIdentifier->setFont(pFont); g_pVersionIdentifier->setProperty("TextColours", "tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF"); g_pVersionIdentifier->setAlpha(0.6f); g_pVersionIdentifier->setVisible(true); /*#ifdef IVMP_WEBKIT g_pWebkit = new CD3D9WebKit(); #endif */ // TODO: Make the default stuff (Chat window, main menu, e.t.c) a xml layout so it // can be edited by users // TODO: Also load the font from an xml layout so it can be edited by users // TODO: Ability to output all server messages to the client console? // TODO: A script console when client side scripts are implemented CLogFile::Printf("GUI initialized"); } else CLogFile::Printf("GUI initialization failed"); } else { // If our GUI class does exist inform it of the device reset g_pGUI->OnResetDevice(); } // If our graphics instance does not exist create it if(!g_pGraphics && g_pDevice) g_pGraphics = new CGraphics(g_pDevice); else g_pGraphics->OnResetDevice(); // If our main menu class does not exist create it if(!g_pMainMenu) g_pMainMenu = new CMainMenu(); else g_pMainMenu->OnResetDevice(); //// Show loading screen //if(!CGame::IsGameLoaded() && !CGame::IsMenuActive()) // g_pMainMenu->ShowLoadingScreen(); // If our credits class does not exist create it if(!g_pCredits) g_pCredits = new CCredits(g_pGUI); // If our fps counter class does not exist create it if(!g_pFPSCounter) g_pFPSCounter = new CFPSCounter(); // If our fps counter class does not exist create it if(!g_pChatWindow) g_pChatWindow = new CChatWindow(); // If our input window class does not exist create it if(!g_pInputWindow) { g_pInputWindow = new CInputWindow(); RegisterCommands(); } // If our name tags class does not exist create it if(!g_pNameTags) g_pNameTags = new CNameTags(); }
int Initialize() { RegisterCommands(g_commandTable); return 1; }