| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- #include "blocks.h"
- int atlasData[] =
- {
- //front
- 0, 0,
- 3, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 4, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 3,//sand_stone
- 4, 11,//snow_dirt
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 3, 13, //block shelf
- 5, 8, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 11, 12,//crafting table
- 13, 12,//furnace on
- 12, 13,//furnace off
- 5, 4, //glass
- 0, 7, //hay
- //back
- 0, 0,
- 3, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 4, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 3,//sand_stone
- 4, 11,//snow_dirt
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 3, 13, //block shelf
- 5, 8, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 11, 12,//crafting table
- 13, 13,//furnace on
- 13, 13,//furnace off
- 5, 4, //glass
- 0, 7, //hay
- //top
- 0, 0,
- 0, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 4, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 4,//sand_stone
- 2, 11,// snow_grass
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 4, 15, //block shelf
- 5, 14, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 11, 13,//crafting table
- 14, 12,//furnace on
- 14, 12,//furnace off
- 5, 4, //glass
- 0, 8, //hay
- //bottom
- 0, 0,
- 2, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 5, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 2,//sand_stone
- 2, 15, // snow_grass
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 4, 15, //block shelf
- 5, 14, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 4, 15,//crafting table
- 14, 12,//furnace on
- 14, 12,//furnace off
- 5, 4, //glass
- 0, 8, //hay
- //left
- 0, 0,
- 3, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 4, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 3,//sand_stone
- 4, 11,//snow_dirt
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 3, 13, //block shelf
- 5, 8, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 12, 12,//crafting table
- 13, 13,//furnace on
- 13, 13,//furnace off
- 5, 4, //glass
- 0, 7, //hay
- //right
- 0, 0,
- 3, 15, //grass
- 2, 15, // dirt
- 1, 15, //stone
- 3, 11, //ice
- 4, 14,//log
- 4, 15,//wooden_plank
- 0, 14,//cobblestone
- 7, 14,//gold_block
- 7, 15,//bricks
- 2, 14,//sand
- 0, 3,//sand_stone
- 4, 11,//snow_dirt
- 5, 12,//leaves
- 0, 13, // gold ore
- 2, 13, // coal ore
- 6, 12, //stone brick
- 1, 13, // iron ore
- 2, 12, // diamond ore
- 3, 13, //block shelf
- 5, 8, //birch wood
- 3, 14, //gravel
- 7, 13,//herbs
- 12, 15,//rose
- 6, 14,//iron block
- 9, 9, //glowstone
- 3, 12,//redstone ore
- 12, 12,//crafting table
- 13, 13,//furnace on
- 13, 13,//furnace off
- 5, 4, //glass
- 0, 7, //hay
- };
- const int padd = BlockTypes::BlocksCount * 2;
- glm::vec2 getAtlasTop(int type)
- {
- return glm::vec2( atlasData[padd * 2 + type * 2] , atlasData[padd * 2 + type * 2 + 1] );
- }
- glm::vec2 getAtlasBottom(int type)
- {
- return glm::vec2(atlasData[padd * 3 + type * 2], atlasData[padd * 3 + type * 2 + 1]);
- }
- glm::vec2 getAtlasLeft(int type)
- {
- return glm::vec2(atlasData[padd * 4 + type * 2], atlasData[padd * 4 + type * 2 + 1]);
- }
- glm::vec2 getAtlasRight(int type)
- {
- return glm::vec2(atlasData[padd * 5 + type * 2], atlasData[padd * 5 + type * 2 + 1]);
- }
- glm::vec2 getAtlasFront(int type)
- {
- return glm::vec2(atlasData[type * 2], atlasData[type * 2 + 1]);
- }
- glm::vec2 getAtlasBack(int type)
- {
- return glm::vec2(atlasData[padd + type * 2], atlasData[padd + type * 2 + 1]);
- }
|