@@ -197,22 +197,22 @@ struct FrameSpec
197
197
struct TileSpec
198
198
{
199
199
TileSpec ():
200
- texture_id (0 ),
201
200
texture (NULL ),
202
- normal_texture ( NULL ),
203
- flags_texture ( NULL ),
201
+ texture_id ( 0 ),
202
+ color ( ),
204
203
material_type (TILE_MATERIAL_BASIC),
205
204
material_flags (
206
205
// 0 // <- DEBUG, Use the one below
207
206
MATERIAL_FLAG_BACKFACE_CULLING
208
207
),
208
+ rotation (0 ),
209
+ emissive_light (0 ),
209
210
shader_id (0 ),
210
- animation_frame_count (1 ),
211
+ normal_texture (NULL ),
212
+ flags_texture (NULL ),
211
213
animation_frame_length_ms (0 ),
212
- rotation (0 ),
213
- has_color (false ),
214
- color (),
215
- emissive_light (0 )
214
+ animation_frame_count (1 ),
215
+ has_color (false )
216
216
{
217
217
}
218
218
@@ -284,30 +284,33 @@ struct TileSpec
284
284
material.TextureLayer [1 ].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
285
285
}
286
286
}
287
-
288
- u32 texture_id;
287
+
288
+ // ordered for performance! please do not reorder unless you pahole it first.
289
289
video::ITexture *texture;
290
- video::ITexture *normal_texture;
291
- video::ITexture *flags_texture;
292
-
290
+ u32 texture_id;
291
+ // The color of the tile, or if the tile does not own
292
+ // a color then the color of the node owning this tile.
293
+ video::SColor color;
293
294
// Material parameters
294
295
u8 material_type;
295
296
u8 material_flags;
297
+
298
+ u8 rotation;
299
+ // ! This much light does the tile emit.
300
+ u8 emissive_light;
301
+
296
302
u32 shader_id;
303
+
304
+ video::ITexture *normal_texture;
305
+ // cacheline (64)
306
+
307
+ video::ITexture *flags_texture;
297
308
// Animation parameters
298
- u8 animation_frame_count;
299
309
u16 animation_frame_length_ms;
300
- std::vector<FrameSpec> frames;
301
-
302
- u8 rotation;
310
+ u8 animation_frame_count;
303
311
// ! If true, the tile has its own color.
304
312
bool has_color;
305
- /* !
306
- * The color of the tile, or if the tile does not own
307
- * a color then the color of the node owning this tile.
308
- */
309
- video::SColor color;
310
- // ! This much light does the tile emit.
311
- u8 emissive_light;
313
+
314
+ std::vector<FrameSpec> frames;
312
315
};
313
316
#endif
0 commit comments