BWAPI
|
00001 #pragma once 00002 00003 #include <Util/Types.h> 00004 #include <BW/Position.h> 00005 #include <BW/Sprite.h> 00006 00007 #include <BW/Offsets.h> 00008 00009 namespace BW 00010 { 00011 #pragma pack(1) 00012 // See Unit.h and compare this entire structure with the first part of the unit structure 00013 // I'm not sure how much of it is the same so I didn't bother updating this. 00014 struct Bullet 00015 { 00016 // v-- POSSIBLE SHARED BULLET/UNIT STRUCTURE BEGIN 00017 /*0x00*/ BW::Bullet* prev; 00018 /*0x04*/ BW::Bullet* next; 00019 /*0x08*/ u32 unknown_0x08; //usually holds 1 (exists?) 00020 /*0x0C*/ BW::Sprite *sprite; // sprite pointer 00021 /*0x10*/ BW::Position unknown_0x10; //address? animation related? changes a during the same bullet 00022 /*0x14*/ BW::Unit *unknown_0x14; //usually holds 0 00023 /*0x18*/ BW::Position targetPosition; 00024 /*0x1C*/ BW::Position targetPosition2; //usually same as targetPosition 00025 /*0x20*/ u8 movementFlags; //usually holds 0x09 for probes, 0x0b for dragoons, 0x11 for mutas 00026 /*0x21*/ u8 direction1; //not sure how this and direction2 differ from currentDirection and velocityDirection 00027 /*0x22*/ u8 flingyTurnRadius; 00028 /*0x23*/ u8 direction2; 00029 /*0x24*/ u16 type; 00030 /*0x26*/ u8 unknown_0x26; 00031 /*0x27*/ u8 flingyMoveControl; 00032 /*0x28*/ BW::Position position; 00033 /*0x2C*/ POINT halt; // (xHalt >> 4) == xHalt 00034 /*0x34*/ s32 flingyTopSpeed; 00035 /*0x38*/ s32 unknown_0x38; //increasing counter or timer 00036 /*0x3C*/ s32 unknown_0x3C; //increasing counter or timer, often the same value as unknown_0x38 00037 /*0x40*/ POINT current_speed; 00038 /*0x48*/ u16 flingyAcceleration; 00039 /*0x4A*/ u8 currentDirection; 00040 /*0x4B*/ u8 velocityDirection; //seems to always be the same as currentDirection 00041 /*0x4C*/ u8 unknown_0x4C; 00042 /*0x4D*/ u8 behaviourTypeInternal; // 0 = none 00043 // 1 = fly 00044 // 2 = fly & follow target 00045 // 3 = bounce 00046 // 4 = persist on site 00047 // 5 = appear on target/instant 00048 // 6 = attack target area 00049 /*0x4E*/ u16 unknown_0x4E; 00050 /*0x50*/ u16 someUnitType; //usually holds UnitTypes::None (Unknown unit type stuff?) 00051 /*0x52*/ u16 unknown_0x52; // possibly padding 00052 /*0x54*/ s32 unknown_0x54; //usually holds 0 00053 /*0x58*/ BW::Position flyToPosition; 00054 /*0x5C*/ BW::Unit* targetUnit; 00055 // ^-- POSSIBLE SHARED BULLET/UNIT STRUCTURE END 00056 00057 /*0x60*/ u8 weaponType; 00058 /*0x61*/ u8 time_remaining; 00059 /*0x62*/ u8 hitFlags; // 0x01 = miss target; 0x02 = no damage (hallucination) 00060 /*0x63*/ u8 remainingBounces; // Bounce count for mutalisk weapon (official name: ubChain) 00061 /*0x64*/ BW::Unit* sourceUnit; 00062 /*0x68*/ BW::Unit* nextBounceUnit; // Next unit for bounce, temporary 00063 /*0x6C*/ u32 unknown_0x6C; // some sort of cyclic burst counter (used by valkyries, goliath air attack) 00064 }; 00065 00066 CTASSERT( sizeof(Bullet) == 112 ); 00067 #pragma pack() 00068 };