diff options
author | Nipun Garg | 2019-06-23 06:19:48 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:57 +0200 |
commit | a9314535c8e16af992e0c8fd0ae9019c989cef18 (patch) | |
tree | eb0aa7e5a44b78cf6bc94670ddf54f6456924b93 | |
parent | fbc5dffc10f2563e94ebdc03ff269c7f9da75386 (diff) | |
download | scummvm-rg350-a9314535c8e16af992e0c8fd0ae9019c989cef18.tar.gz scummvm-rg350-a9314535c8e16af992e0c8fd0ae9019c989cef18.tar.bz2 scummvm-rg350-a9314535c8e16af992e0c8fd0ae9019c989cef18.zip |
HDB: Remove 'Add Animating Info' stub
-rw-r--r-- | engines/hdb/draw-manager.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 0cdc7e35dc..bc297eed8b 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -76,9 +76,28 @@ bool DrawMan::init() { } } - /* - TODO: Add Animating Tile Info - */ + + // Add Animating Tile Info + int found = -1; + char search[32]; + strcpy(search, "anim_"); + for (index = 0; index < _numTiles; index++) { + // IF we have not found a start, look for it + // ELSE IF we have found a start and are in the middle of an anim group + // ELSE IF we're in an anim group and have just reached the end + if (!strncmp(_tLookupArray[index].filename, search, strlen(search)) && found == -1) { + found = index; + strncpy(search, _tLookupArray[index].filename, strlen(_tLookupArray[index].filename) - 2); + } else if (!strncmp(_tLookupArray[index].filename, search, strlen(search)) && found >= 0) + _tLookupArray[index - 1].animIndex = index; + else if (strncmp(_tLookupArray[index].filename, search, strlen(search)) && found >= 0) { + _tLookupArray[index - 1].animIndex = found; + strcpy(search, "anim_"); + found = -1; + if (!strncmp(_tLookupArray[index].filename, search, strlen(search))) + index--; + } + } // Init Sky Data _currentSky = 0; |