Skip to content

Instantly share code, notes, and snippets.

@sofar
Created April 13, 2017 05:41
Show Gist options
  • Save sofar/c51e75b0835f50764608485e19a5ac8e to your computer and use it in GitHub Desktop.
Save sofar/c51e75b0835f50764608485e19a5ac8e to your computer and use it in GitHub Desktop.
struct TileSpec {
u32 texture_id; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
class ITexture * texture; /* 8 8 */
class ITexture * normal_texture; /* 16 8 */
class ITexture * flags_texture; /* 24 8 */
u8 material_type; /* 32 1 */
u8 material_flags; /* 33 1 */
/* XXX 2 bytes hole, try to pack */
u32 shader_id; /* 36 4 */
u8 animation_frame_count; /* 40 1 */
/* XXX 1 byte hole, try to pack */
u16 animation_frame_length_ms; /* 42 2 */
/* XXX 4 bytes hole, try to pack */
class vector<FrameSpec, std::allocator<FrameSpec> > frames; /* 48 24 */
/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
u8 rotation; /* 72 1 */
bool has_color; /* 73 1 */
/* XXX 2 bytes hole, try to pack */
class SColor color; /* 76 4 */
u8 emissive_light; /* 80 1 */
void TileSpec(class TileSpec *);
bool operator==(const class TileSpec *, const class TileSpec &);
bool operator!=(const class TileSpec *, const class TileSpec &);
void applyMaterialOptions(const class TileSpec *, class SMaterial &);
void applyMaterialOptionsWithShaders(const class TileSpec *, class SMaterial &);
class TileSpec & operator=(class TileSpec *, );
void TileSpec(class TileSpec *, );
void TileSpec(class TileSpec *, const class TileSpec &);
class TileSpec & operator=(class TileSpec *, const class TileSpec &);
void ~TileSpec(class TileSpec *, int);
/* size: 88, cachelines: 2, members: 14 */
/* sum members: 68, holes: 5, sum holes: 13 */
/* padding: 7 */
/* last cacheline: 24 bytes */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment