From 8161ab573fd6f8a45b3986278ce7fc1596140526 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 24 Jun 2013 04:17:50 +0200 Subject: Remove texture atlas / AtlasPointer, rename getTextureRaw to getTexture --- src/nodedef.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/nodedef.cpp') diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 7d8ce70d3..13e7e9958 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -674,7 +674,9 @@ public: // Tiles (fill in f->tiles[]) for(u16 j=0; j<6; j++){ // Texture - f->tiles[j].texture = tsrc->getTexture(tiledef[j].name); + f->tiles[j].texture = tsrc->getTexture( + tiledef[j].name, + &f->tiles[j].texture_id); // Alpha f->tiles[j].alpha = f->alpha; // Material type @@ -689,10 +691,9 @@ public: if(f->tiles[j].material_flags & MATERIAL_FLAG_ANIMATION_VERTICAL_FRAMES) { - // Get raw texture size to determine frame count by + // Get texture size to determine frame count by // aspect ratio - video::ITexture *t = tsrc->getTextureRaw(tiledef[j].name); - v2u32 size = t->getOriginalSize(); + v2u32 size = f->tiles[j].texture->getOriginalSize(); int frame_height = (float)size.X / (float)tiledef[j].animation.aspect_w * (float)tiledef[j].animation.aspect_h; @@ -715,8 +716,9 @@ public: // Special tiles (fill in f->special_tiles[]) for(u16 j=0; jspecial_tiles[j].texture = - tsrc->getTexture(f->tiledef_special[j].name); + f->special_tiles[j].texture = tsrc->getTexture( + f->tiledef_special[j].name, + &f->special_tiles[j].texture_id); // Alpha f->special_tiles[j].alpha = f->alpha; // Material type @@ -731,10 +733,9 @@ public: if(f->special_tiles[j].material_flags & MATERIAL_FLAG_ANIMATION_VERTICAL_FRAMES) { - // Get raw texture size to determine frame count by + // Get texture size to determine frame count by // aspect ratio - video::ITexture *t = tsrc->getTextureRaw(f->tiledef_special[j].name); - v2u32 size = t->getOriginalSize(); + v2u32 size = f->special_tiles[j].texture->getOriginalSize(); int frame_height = (float)size.X / (float)f->tiledef_special[j].animation.aspect_w * (float)f->tiledef_special[j].animation.aspect_h; -- cgit v1.2.3