BWAPI
|
00001 #pragma once 00002 #pragma pack(1) 00003 #include "Position.h" 00004 00005 /* Defines are official */ 00006 00007 #define UM_Init 0x00 00008 #define UM_InitSeq 0x01 00009 #define UM_Lump 0x02 00010 #define UM_Turret 0x03 00011 #define UM_Bunker 0x04 00012 #define UM_BldgTurret 0x05 00013 #define UM_Hidden 0x06 00014 #define UM_Flyer 0x07 00015 #define UM_FakeFlyer 0x08 00016 #define UM_AtRest 0x09 00017 #define UM_Dormant 0x0A 00018 #define UM_AtMoveTarget 0x0B 00019 #define UM_CheckIllegal 0x0C 00020 #define UM_MoveToLegal 0x0D 00021 #define UM_LumpWannabe 0x0E 00022 #define UM_FailedPath 0x0F 00023 #define UM_RetryPath 0x10 00024 #define UM_StartPath 0x11 00025 #define UM_UIOrderDelay 0x12 00026 #define UM_TurnAndStart 0x13 00027 #define UM_FaceTarget 0x14 00028 #define UM_NewMoveTarget 0x15 00029 #define UM_AnotherPath 0x16 00030 #define UM_Repath 0x17 00031 #define UM_RepathMovers 0x18 00032 #define UM_FollowPath 0x19 00033 #define UM_ScoutPath 0x1A 00034 #define UM_ScoutFree 0x1B 00035 #define UM_FixCollision 0x1C 00036 #define UM_WaitFree 0x1D 00037 #define UM_GetFree 0x1E 00038 #define UM_SlidePrep 0x1F 00039 #define UM_SlideFree 0x20 00040 #define UM_ForceMoveFree 0x21 00041 #define UM_FixTerrain 0x22 00042 #define UM_TerrainSlide 0x23 00043 00044 namespace BW 00045 { 00046 struct Path 00047 { 00048 /* 0x00 */Position start; // 0 00049 /* 0x04 */Position next; // 4 00050 /* 0x08 */Position finish; // 8 00051 /* 0x0C */u32 timeStarted; // 12 00052 /* 0x10 */u32 unitID; // 16 00053 /* 0x14 */u32 unitUnknown_0x38_0x3C_copy; /* Starcraft copies field 0x38 of the unit // 20 00054 if the unit's flingy movement type is 0, 00055 otherwise it will copy field 0x3C 00056 */ 00057 /* 0x18 */u8 isCalculating; // 24 1 if the path is being calculated and not yet ready 00058 /* 0x19 */u8 pathDelay; // 25 Delay before a new path is created 00059 /* 0x1A */u8 unk_1A; // 26 unknown flag? 00060 /* 0x1B */u8 pathCount; // 27 dup of num_areas? 00061 /* 0x1C */u8 num_areas; // 28 Official name, number of regions following the segments 00062 /* 0x1D */u8 cur_area; // 29 The current region index 00063 /* 0x1E */u8 num_segments; // 30 Official name, number of Position segments 00064 /* 0x1F */u8 cur_segment; // 31 The current position segment 00065 /* 0x20 */Position steps[1]; // 32 00066 }; 00067 00068 // note: u16 areas[num_areas] follow after steps[num_segments] 00069 // The last entry of the above struct can be viewed as follows: 00070 // Position steps[num_segments]; 00071 // u16 regions[num_areas]; // region ID for SAI_Paths->regions; typically fills the rest of the struct with region IDs to the destination, and cut off if there isn't enough room 00072 00073 class Unit; 00074 struct pathCreate 00075 { 00076 /* 0x000 */BW::Unit *pUnit; 00077 /* 0x004 */Position src; 00078 /* 0x008 */Position dst; 00079 /* 0x00C */DWORD dw__0C; 00080 /* 0x010 */DWORD dw__10; 00081 /* 0x014 */DWORD dw__14; 00082 /* 0x018 */DWORD dw__18; 00083 /* 0x01C */BYTE b__1C; 00084 /* 0x01D */BYTE b__1D; 00085 /* 0x01E */BYTE b__1E; 00086 /* 0x01F */BYTE b__1F; 00087 /* 0x020 */WORD wAreas[50]; 00088 /* 0x084 */WORD cur_area; 00089 /* 0x086 */WORD num_areas; 00090 /* 0x088 */Position segments[50]; 00091 /* 0x150 */WORD cur_segment; 00092 /* 0x152 */WORD num_segments; 00093 /* 0x154 */BYTE b__154; 00094 /* 0x155 */BYTE b__155; 00095 /* 0x156 */BYTE b__156; 00096 /* 0x157 */BYTE b__157; 00097 /* 0x158 */Position boundsTopLeft; 00098 /* 0x15C */Position boundsBotRight; 00099 /* 0x160 */WORD w__160; 00100 /* 0x162 */WORD w__162; 00101 /* 0x164 */WORD w__164; 00102 /* 0x166 */WORD w__166; 00103 /* 0x168 */WORD w__168; 00104 /* 0x16A */WORD w__16A; 00105 }; 00106 00107 char *getMoveStateName(u8 bMoveState); 00108 }; 00109 #pragma pack()