diff options
author | Nipun Garg | 2019-07-05 00:42:20 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:11 +0200 |
commit | 292ada30e344fbf9d8ba53a9f0bc264082d492b0 (patch) | |
tree | 8f318a3d484c9ac720ce87b099bb70b8e5c127b7 /engines/hdb/ai-lists.cpp | |
parent | 7a6a169422fd465e62ab64263976b77cb2ce4560 (diff) | |
download | scummvm-rg350-292ada30e344fbf9d8ba53a9f0bc264082d492b0.tar.gz scummvm-rg350-292ada30e344fbf9d8ba53a9f0bc264082d492b0.tar.bz2 scummvm-rg350-292ada30e344fbf9d8ba53a9f0bc264082d492b0.zip |
HDB: Add _fairystones functions
Diffstat (limited to 'engines/hdb/ai-lists.cpp')
-rw-r--r-- | engines/hdb/ai-lists.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index d6534cc6cf..890b943ab9 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -236,6 +236,24 @@ void AI::animateBridges() { } } +void AI::addToFairystones(int index, int tileX, int tileY, int sourceOrDest) { + if (!sourceOrDest) { + _fairystones[index].srcX = tileX; + _fairystones[index].srcY = tileY; + } else { + _fairystones[index].destX = tileX; + _fairystones[index].destY = tileY; + } +} + +int AI::checkFairystones(int tileX, int tileY) { + int i; + for (i = 0; i < kMaxFairystones; i++) + if (_fairystones[i].destX == tileX && _fairystones[i].destY == tileY) + return i; + return -1; +} + // Add an action location to the list of possible actions // Each action must be paired with another of the same number void AI::addToActionList(int actionIndex, int x, int y, char *luaFuncInt, char *luaFuncUse) { |