- BlockType::Faces block_fill = { true, true, true, true, true, true };
- BlockType::Faces slab_fill = { false, true, false, false, false, false };
- BlockType::Faces stair_fill = { false, true, false, false, false, true };
-
- block_tex.Bind();
- block_tex.Reserve(16, 16, 4, Format());
- assets.LoadTexture("debug", block_tex, 0);
- assets.LoadTexture("rock-1", block_tex, 1);
- assets.LoadTexture("rock-2", block_tex, 2);
- assets.LoadTexture("rock-3", block_tex, 3);
- block_tex.FilterNearest();
-
- { // white block
- BlockType type(true, { 1.0f, 1.0f, 1.0f }, &blockShape);
- type.texture = 1;
- type.label = "White Block";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
- { // white slab
- BlockType type(true, { 1.0f, 1.0f, 1.0f }, &slabShape);
- type.texture = 1;
- type.label = "White Slab";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = slab_fill;
- blockType.Add(type);
- }
- { // white stair
- BlockType type(true, { 1.0f, 1.0f, 1.0f }, &stairShape);
- type.texture = 1;
- type.label = "White Stair";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = stair_fill;
- blockType.Add(type);
- }
-
- { // red block
- BlockType type(true, { 1.0f, 0.0f, 0.0f }, &blockShape);
- type.texture = 3;
- type.label = "Red Block";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
- { // red slab
- BlockType type(true, { 1.0f, 0.0f, 0.0f }, &slabShape);
- type.texture = 3;
- type.label = "Red Slab";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = slab_fill;
- blockType.Add(type);
- }
- { // red stair
- BlockType type(true, { 1.0f, 0.0f, 0.0f }, &stairShape);
- type.texture = 3;
- type.label = "Red Stair";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = stair_fill;
- blockType.Add(type);
- }
-
- { // green block
- BlockType type(true, { 0.0f, 1.0f, 0.0f }, &blockShape);
- type.texture = 1;
- type.label = "Green Block";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
- { // green slab
- BlockType type(true, { 0.0f, 1.0f, 0.0f }, &slabShape);
- type.texture = 1;
- type.label = "Green Slab";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = slab_fill;
- blockType.Add(type);
- }
- { // green stair
- BlockType type(true, { 0.0f, 1.0f, 0.0f }, &stairShape);
- type.texture = 1;
- type.label = "Green Stair";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = stair_fill;
- blockType.Add(type);
- }
-
- { // blue block
- BlockType type(true, { 0.0f, 0.0f, 1.0f }, &blockShape);
- type.texture = 3;
- type.label = "Blue Block";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
- { // blue slab
- BlockType type(true, { 0.0f, 0.0f, 1.0f }, &slabShape);
- type.texture = 3;
- type.label = "Blue Slab";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = slab_fill;
- blockType.Add(type);
- }
- { // blue stair
- BlockType type(true, { 0.0f, 0.0f, 1.0f }, &stairShape);
- type.texture = 3;
- type.label = "Blue Stair";
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = stair_fill;
- blockType.Add(type);
- }
-
- { // glowing yellow block
- BlockType type(true, { 1.0f, 1.0f, 0.0f }, &blockShape);
- type.texture = 2;
- type.label = "Light";
- type.luminosity = 15;
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
-
- { // the mysterious debug cube
- BlockType type(true, { 1.0f, 1.0f, 1.0f }, &blockShape);
- type.texture = 0;
- type.label = "Debug Cube";
- type.luminosity = 0;
- type.block_light = true;
- type.collision = true;
- type.collide_block = true;
- type.fill = block_fill;
- blockType.Add(type);
- }
-