Represents map. More...
Represents map.
Public Member Functions | |
Scripts and events | |
| bool | SetScript (string@+ script) |
| uint | GetScriptId () |
| void | SetEvent (int eventType, string& funcName) |
Invoking events | |
| void | EventFinish (bool deleted) |
| Invokes MAP_EVENT_FINISH event. | |
| void | EventLoop0 () |
| Invokes MAP_EVENT_LOOP_0 event. | |
| void | EventLoop1 () |
| Invokes MAP_EVENT_LOOP_1 event. | |
| void | EventLoop2 () |
| Invokes MAP_EVENT_LOOP_2 event. | |
| void | EventLoop3 () |
| Invokes MAP_EVENT_LOOP_3 event. | |
| void | EventLoop4 () |
| Invokes MAP_EVENT_LOOP_4 event. | |
| void | EventInCritter (Critter& cr) |
| Invokes MAP_EVENT_IN_CRITTER event. | |
| void | EventOutCritter (Critter& cr) |
| Invokes MAP_EVENT_OUT_CRITTER event. | |
| void | EventCritterDead (Critter& cr, Critter@ killer) |
| Invokes MAP_EVENT_CRITTER_DEAD event. | |
| void | EventTurnBasedBegin () |
| Invokes MAP_EVENT_TURN_BASED_BEGIN event. | |
| void | EventTurnBasedEnd () |
| Invokes MAP_EVENT_TURN_BASED_END event. | |
| void | EventTurnBasedProcess (Critter& cr, bool beginTurn) |
| Invokes MAP_EVENT_TURN_BASED_PROCESS event. | |
General | |
| uint16 | GetProtoId () |
| Location | GetLocation () |
| int | GetTime () |
| void | SetTime (int time) |
| int | GetData (uint index) |
| void | SetData (uint index, int value) |
| bool | IsTurnBasedAvailability () |
| void | SetTurnBasedAvailability (bool value) |
| void | BeginTurnBased (Critter@+ firstTurnCrit) |
| bool | IsTurnBased () |
| bool | Reload () |
| void | SetLoopTime (uint8 loop, uint16 ms) |
| uint16 | GetWidth () |
| Returns map width. | |
| uint16 | GetHeight () |
| Returns map height. | |
Visual and audio effects | |
| void | RunEffect (uint16 protoId, uint16 hexX, uint16 hexY, uint effectRadius) |
| void | RunFlyEffect (uint16 protoId, Critter@+ fromCr, Critter@+ toCr, uint16 fromX, uint16 fromY, uint16 toX, uint16 toY) |
| uint8 | GetRain () |
| void | SetRain (uint8 capacity) |
| void | SetText (uint16 hexX, uint16 hexY, uint color, string text) |
| void | SetTextMsg (uint16 hexX, uint16 hexY, uint color, uint16 textMsg, uint strNum) |
| void | SetTextMsg (uint16 hexX, uint16 hexY, uint color, uint16 textMsg, uint strNum, string& lexems) |
| void | PlaySound (string& soundName) |
| void | PlaySound (string& soundName, uint16 hexX, uint16 hexY, uint radius) |
For critters | |
| Critter | GetCritter (uint16 hexX, uint16 hexY) |
| Critter | GetCritter (uint critterId) |
| uint | GetCrittersHex (uint16 hexX, uint16 hexY, uint radius, int findType, Critter@[]@+ critters) |
| uint | GetCrittersPath (uint16 fromHx, uint16 fromHy, uint16 toHx, uint16 toHy, float angle, uint dist, int findType, Critter@[]@+ critters) |
| uint | GetCrittersPath (uint16 fromHx, uint16 fromHy, uint16 toHx, uint16 toHy, float angle, uint dist, int findType, Critter@[]@+ critters, uint16& preBlockHx, uint16& preBlockHy, uint16& blockHx, uint16& blockHy) |
| uint | GetCritters (uint16 pid, int findType, Critter@[]@+ critters) |
| uint | GetCrittersWhoViewPath (uint16 fromHx, uint16 fromHy, uint16 toHx, uint16 toHy, int findType, Critter@[]@+ critters) |
| uint | GetCrittersSeeing (Critter@[]& critters, bool lookOnThem, int findType, Critter@[]@+ crittersResult) |
| Critter | AddNpc (uint16 protoId, uint16 hexX, uint16 hexY, uint8 dir) |
| uint | GetNpcCount (int npcRole, int findType) |
| Critter | GetNpc (int npcRole, int findType, uint skipCount) |
For items | |
| Item | AddItem (uint16 hexX, uint16 hexY, uint16 protoId, uint count) |
| Item | GetItem (uint itemId) |
| Item | GetItem (uint16 hexX, uint16 hexY, uint16 protoId) |
| uint | GetItems (uint16 hexX, uint16 hexY, Item@[]@+ items) |
| uint | GetItems (uint16 protoId, Item@[]@+ items) |
| uint | GetItemsByType (int type, Item@[]@+ items) |
| Item | GetDoor (uint16 hexX, uint16 hexY) |
| bool | OpenDoor (Item& door) |
| bool | CloseDoor (Item& door) |
| Item | GetCar (uint16 hexX, uint16 hexY) |
For hexagons | |
| bool | CheckPlaceForCar (uint16 hexX, uint16 hexY, uint16 protoCar) |
| uint | CountEntire (uint8 entire) |
| bool | GetEntireCoords (uint8 entire, uint8 num, uint16& hexX, uint16& hexY) |
| bool | GetEntireCoords (int entire, uint skip, uint16& hexX, uint16& hexY, uint8& dir) |
| bool | GetNearEntireCoords (int& entire, uint16& hexX, uint16& hexY) |
| bool | GetNearEntireCoords (int& entire, uint16& hexX, uint16& hexY, uint8& dir) |
| void | GetHexCoord (uint16 fromHx, uint16 fromHy, uint16& toHx, uint16& toHy, float angle, uint dist) |
| void | GetHexCoordWall (uint16 fromHx, uint16 fromHy, uint16& toHx, uint16& toHy, float angle, uint dist) |
| bool | IsHexPassed (uint16 hexX, uint16 hexY) |
| bool | IsHexRaked (uint16 hexX, uint16 hexY) |
| uint | GetPathLength (uint16 fromHx, uint16 fromHy, uint16 toHx, uint16 toHy, uint cut) |
| uint | GetPathLength (Critter& cr, uint16 toHx, uint16 toHy, uint cut) |
| void | MoveHexByDir (uint16& hexX, uint16& hexY, uint8 dir, uint steps) |
For scenery | |
| Scenery | GetScenery (uint16 hexX, uint16 hexY, uint16 protoId) |
| uint | GetSceneries (uint16 hexX, uint16 hexY, Scenery@[]@+ sceneries) |
| uint | GetSceneries (uint16 protoId, Scenery@[]@+ sceneries) |
Public Attributes | |
| const uint | Id |
| const bool | IsNotValid |
| Allows to check whether underlying object is valid. | |
| bool SetScript | ( | string@+ | script | ) |
| uint GetScriptId | ( | ) |
| void SetEvent | ( | int | eventType, | |
| string& | funcName | |||
| ) |
| void EventFinish | ( | bool | deleted | ) |
Invokes MAP_EVENT_FINISH event.
| void EventLoop0 | ( | ) |
Invokes MAP_EVENT_LOOP_0 event.
| void EventLoop1 | ( | ) |
Invokes MAP_EVENT_LOOP_1 event.
| void EventLoop2 | ( | ) |
Invokes MAP_EVENT_LOOP_2 event.
| void EventLoop3 | ( | ) |
Invokes MAP_EVENT_LOOP_3 event.
| void EventLoop4 | ( | ) |
Invokes MAP_EVENT_LOOP_4 event.
| void EventInCritter | ( | Critter& | cr | ) |
Invokes MAP_EVENT_IN_CRITTER event.
| void EventOutCritter | ( | Critter& | cr | ) |
Invokes MAP_EVENT_OUT_CRITTER event.
Invokes MAP_EVENT_CRITTER_DEAD event.
| void EventTurnBasedBegin | ( | ) |
Invokes MAP_EVENT_TURN_BASED_BEGIN event.
| void EventTurnBasedEnd | ( | ) |
Invokes MAP_EVENT_TURN_BASED_END event.
| void EventTurnBasedProcess | ( | Critter& | cr, | |
| bool | beginTurn | |||
| ) |
Invokes MAP_EVENT_TURN_BASED_PROCESS event.
| uint16 GetProtoId | ( | ) |
| Location GetLocation | ( | ) |
| int GetTime | ( | ) |
| void SetTime | ( | int | time | ) |
| int GetData | ( | uint | index | ) |
| void SetData | ( | uint | index, | |
| int | value | |||
| ) |
| bool IsTurnBasedAvailability | ( | ) |
| void SetTurnBasedAvailability | ( | bool | value | ) |
| void BeginTurnBased | ( | Critter@+ | firstTurnCrit | ) |
| bool IsTurnBased | ( | ) |
| bool Reload | ( | ) |
| void SetLoopTime | ( | uint8 | loop, | |
| uint16 | ms | |||
| ) |
| uint16 GetWidth | ( | ) |
Returns map width.
| uint16 GetHeight | ( | ) |
Returns map height.
| void RunEffect | ( | uint16 | protoId, | |
| uint16 | hexX, | |||
| uint16 | hexY, | |||
| uint | effectRadius | |||
| ) |
| void RunFlyEffect | ( | uint16 | protoId, | |
| Critter@+ | fromCr, | |||
| Critter@+ | toCr, | |||
| uint16 | fromX, | |||
| uint16 | fromY, | |||
| uint16 | toX, | |||
| uint16 | toY | |||
| ) |
| uint8 GetRain | ( | ) |
| void SetRain | ( | uint8 | capacity | ) |
| void SetText | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint | color, | |||
| string | text | |||
| ) |
| void SetTextMsg | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint | color, | |||
| uint16 | textMsg, | |||
| uint | strNum | |||
| ) |
| void SetTextMsg | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint | color, | |||
| uint16 | textMsg, | |||
| uint | strNum, | |||
| string& | lexems | |||
| ) |
| void PlaySound | ( | string& | soundName | ) |
| void PlaySound | ( | string& | soundName, | |
| uint16 | hexX, | |||
| uint16 | hexY, | |||
| uint | radius | |||
| ) |
| Critter GetCritter | ( | uint16 | hexX, | |
| uint16 | hexY | |||
| ) |
| Critter GetCritter | ( | uint | critterId | ) |
| uint GetCrittersHex | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint | radius, | |||
| int | findType, | |||
| Critter@[]@+ | critters | |||
| ) |
| uint GetCrittersPath | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16 | toHx, | |||
| uint16 | toHy, | |||
| float | angle, | |||
| uint | dist, | |||
| int | findType, | |||
| Critter@[]@+ | critters | |||
| ) |
| uint GetCrittersPath | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16 | toHx, | |||
| uint16 | toHy, | |||
| float | angle, | |||
| uint | dist, | |||
| int | findType, | |||
| Critter@[]@+ | critters, | |||
| uint16& | preBlockHx, | |||
| uint16& | preBlockHy, | |||
| uint16& | blockHx, | |||
| uint16& | blockHy | |||
| ) |
| uint GetCritters | ( | uint16 | pid, | |
| int | findType, | |||
| Critter@[]@+ | critters | |||
| ) |
| uint GetCrittersWhoViewPath | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16 | toHx, | |||
| uint16 | toHy, | |||
| int | findType, | |||
| Critter@[]@+ | critters | |||
| ) |
| uint GetCrittersSeeing | ( | Critter@[]& | critters, | |
| bool | lookOnThem, | |||
| int | findType, | |||
| Critter@[]@+ | crittersResult | |||
| ) |
| Critter AddNpc | ( | uint16 | protoId, | |
| uint16 | hexX, | |||
| uint16 | hexY, | |||
| uint8 | dir | |||
| ) |
| uint GetNpcCount | ( | int | npcRole, | |
| int | findType | |||
| ) |
| Critter GetNpc | ( | int | npcRole, | |
| int | findType, | |||
| uint | skipCount | |||
| ) |
| Item AddItem | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint16 | protoId, | |||
| uint | count | |||
| ) |
| Item GetItem | ( | uint | itemId | ) |
| Item GetItem | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint16 | protoId | |||
| ) |
| uint GetItems | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| Item@[]@+ | items | |||
| ) |
| uint GetItems | ( | uint16 | protoId, | |
| Item@[]@+ | items | |||
| ) |
| uint GetItemsByType | ( | int | type, | |
| Item@[]@+ | items | |||
| ) |
| Item GetDoor | ( | uint16 | hexX, | |
| uint16 | hexY | |||
| ) |
| bool OpenDoor | ( | Item& | door | ) |
| bool CloseDoor | ( | Item& | door | ) |
| Item GetCar | ( | uint16 | hexX, | |
| uint16 | hexY | |||
| ) |
| bool CheckPlaceForCar | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint16 | protoCar | |||
| ) |
| uint CountEntire | ( | uint8 | entire | ) |
| bool GetEntireCoords | ( | uint8 | entire, | |
| uint8 | num, | |||
| uint16& | hexX, | |||
| uint16& | hexY | |||
| ) |
| bool GetEntireCoords | ( | int | entire, | |
| uint | skip, | |||
| uint16& | hexX, | |||
| uint16& | hexY, | |||
| uint8& | dir | |||
| ) |
| bool GetNearEntireCoords | ( | int& | entire, | |
| uint16& | hexX, | |||
| uint16& | hexY | |||
| ) |
| bool GetNearEntireCoords | ( | int& | entire, | |
| uint16& | hexX, | |||
| uint16& | hexY, | |||
| uint8& | dir | |||
| ) |
| void GetHexCoord | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16& | toHx, | |||
| uint16& | toHy, | |||
| float | angle, | |||
| uint | dist | |||
| ) |
| void GetHexCoordWall | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16& | toHx, | |||
| uint16& | toHy, | |||
| float | angle, | |||
| uint | dist | |||
| ) |
| bool IsHexPassed | ( | uint16 | hexX, | |
| uint16 | hexY | |||
| ) |
| bool IsHexRaked | ( | uint16 | hexX, | |
| uint16 | hexY | |||
| ) |
| uint GetPathLength | ( | uint16 | fromHx, | |
| uint16 | fromHy, | |||
| uint16 | toHx, | |||
| uint16 | toHy, | |||
| uint | cut | |||
| ) |
| uint GetPathLength | ( | Critter& | cr, | |
| uint16 | toHx, | |||
| uint16 | toHy, | |||
| uint | cut | |||
| ) |
| void MoveHexByDir | ( | uint16& | hexX, | |
| uint16& | hexY, | |||
| uint8 | dir, | |||
| uint | steps | |||
| ) |
| Scenery GetScenery | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| uint16 | protoId | |||
| ) |
| uint GetSceneries | ( | uint16 | hexX, | |
| uint16 | hexY, | |||
| Scenery@[]@+ | sceneries | |||
| ) |
| uint GetSceneries | ( | uint16 | protoId, | |
| Scenery@[]@+ | sceneries | |||
| ) |
| const uint Id |
| const bool IsNotValid |
Allows to check whether underlying object is valid.
1.7.1