BWAPI
trunk/bwapi/BWAPI/Source/BW/TriggerEngine.h
Go to the documentation of this file.
00001 #pragma once
00002 #include <windows.h>
00003 
00004 #include "Triggers.h"
00005 
00006 namespace BW
00007 {
00008   namespace Triggers
00009   {
00010     class Condition
00011     {
00012     public:
00013       DWORD dwLocation;
00014       DWORD dwGroup;
00015       DWORD dwCount;
00016       WORD  wUnitType;
00017       BYTE  bComparisonType;
00018       BYTE  bConditionType;
00019       BYTE  bExtraType;
00020       BYTE  bFlags;
00021       BYTE  __bAlign[2];
00022 
00023       bool canBeTrue();
00024     };
00025 
00026     class Action
00027     {
00028     public:
00029       DWORD dwSourceLocation;
00030       DWORD dwTextString;
00031       DWORD dwWavString;
00032       DWORD dwTime;
00033       DWORD dwSourceGroup;
00034       DWORD dwExtra;
00035       WORD  wType;
00036       BYTE  bActionType;
00037       BYTE  bModifier;
00038       BYTE  bFlags;
00039       BYTE  __bAlign[3];
00040 
00041       bool affectsGameplay(DWORD dwExecutionPlayer, DWORD dwCheckingPlayer);
00042     };
00043 
00044     class Trigger
00045     {
00046     public:
00047       Condition conditions[16];
00048       Action    actions[64];
00049       DWORD     dwExecutionFlags;
00050       BYTE      bExecuteFor[PlayerGroups::Max];
00051       BYTE      bCurrentActionIndex;
00052 
00053       bool conditionsCanBeMet();
00054       bool actionsAllowGameplay(DWORD dwExecutionPlayer, DWORD dwCheckingPlayer);
00055     };
00056 
00057   };
00058 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines