BWAPI
Skynet/Skynet/DLL.cpp
Go to the documentation of this file.
00001 #define WIN32_LEAN_AND_MEAN
00002 
00003 #include <windows.h>
00004 
00005 #include "Interface.h"
00006 
00007 #include "Skynet.h"
00008 
00009 namespace BWAPI { Game* Broodwar; }
00010 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
00011 {
00012         switch (ul_reason_for_call)
00013         {
00014         case DLL_PROCESS_ATTACH:
00015                 BWAPI::BWAPI_init();
00016                 break;
00017         case DLL_PROCESS_DETACH:
00018                 break;
00019         }
00020 
00021         return TRUE;
00022 }
00023 
00024 extern "C" __declspec(dllexport) BWAPI::AIModule* newAIModule(BWAPI::Game* game)
00025 {
00026         BWAPI::Broodwar = game;
00027 
00028         return new Skynet;
00029 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines