BWAPI
|
00001 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 00002 00003 #include <windows.h> 00004 #include <stdio.h> 00005 #include <tchar.h> 00006 00007 #include <BWAPI.h> 00008 00009 #include "BasicAIModule.h" 00010 namespace BWAPI { Game* Broodwar; } 00011 BOOL APIENTRY DllMain( HANDLE hModule, 00012 DWORD ul_reason_for_call, 00013 LPVOID lpReserved 00014 ) 00015 { 00016 00017 switch (ul_reason_for_call) 00018 { 00019 case DLL_PROCESS_ATTACH: 00020 BWAPI::BWAPI_init(); 00021 break; 00022 case DLL_PROCESS_DETACH: 00023 break; 00024 } 00025 00026 00027 return TRUE; 00028 } 00029 00030 extern "C" __declspec(dllexport) BWAPI::AIModule* newAIModule(BWAPI::Game* game) 00031 { 00032 BWAPI::Broodwar=game; 00033 return new BasicAIModule(); 00034 } 00035