]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/tile.h
Write common mapgen params to map_meta.txt on world initialization
[dragonfireclient.git] / src / tile.h
index 78aaef00e2be36c0971f7efbbf0e7644080fbe6a..ea7a9135afb554133c159ddd6a2eba559408f32e 100644 (file)
@@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <IrrlichtDevice.h>
 #include "threads.h"
 #include <string>
-#include <map>
+#include <vector>
 
 class IGameDef;
 
@@ -229,7 +229,7 @@ struct TileSpec
        // Sets everything else except the texture in the material
        void applyMaterialOptions(video::SMaterial &material) const
        {
-               switch(material_type){
+               switch (material_type) {
                case TILE_MATERIAL_BASIC:
                        material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
                        break;
@@ -247,14 +247,16 @@ struct TileSpec
                        break;
                case TILE_MATERIAL_WAVING_PLANTS:
                        material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
-               break;
+                       break;
                }
-               material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING) ? true : false;
+               material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING)
+                       ? true : false;
        }
 
        void applyMaterialOptionsWithShaders(video::SMaterial &material) const
        {
-               material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING) ? true : false;
+               material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING)
+                       ? true : false;
        }
        
        u32 texture_id;
@@ -270,7 +272,7 @@ struct TileSpec
        // Animation parameters
        u8 animation_frame_count;
        u16 animation_frame_length_ms;
-       std::map<u32, FrameSpec> frames;
+       std::vector<FrameSpec> frames;
 
        u8 rotation;
 };