]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CGUISpriteBank.h
SpriteBank: error check on non existing textureNumber
[irrlicht.git] / source / Irrlicht / CGUISpriteBank.h
index affd6bfd3fc2dd6c4d2433a5b3f8fb1387743975..5bd115bc8e65645ec98f13a9acf59109ab6d6b55 100644 (file)
@@ -64,19 +64,7 @@ public:
 \r
 protected:\r
 \r
-       inline u32 getFrameNr(u32 index, u32 time, bool loop) const\r
-       {\r
-               u32 frame = 0;\r
-               if (Sprites[index].frameTime && Sprites[index].Frames.size() )\r
-               {\r
-                       u32 f = (time / Sprites[index].frameTime);\r
-                       if (loop)\r
-                               frame = f % Sprites[index].Frames.size();\r
-                       else\r
-                               frame = (f >= Sprites[index].Frames.size()) ? Sprites[index].Frames.size()-1 : f;\r
-               }\r
-               return frame;\r
-       }\r
+       bool getFrameNr(u32& frameNr, u32 index, u32 time, bool loop) const;\r
 \r
        struct SDrawBatch\r
        {\r