Skip to content

Commit

Permalink
little fixes and recipies
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed Apr 28, 2024
1 parent 6e97964 commit 658823c
Show file tree
Hide file tree
Showing 12 changed files with 422 additions and 54 deletions.
Binary file modified Assets/Textures/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions Assets/Textures/block.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
<sprite n="grassSide" x="512" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="iron_ore" x="512" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="leaves" x="512" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="sand" x="0" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="shadow" x="128" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="stone" x="256" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="water" x="384" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="wood" x="512" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="woodenPlank" x="640" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="null" x="0" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="sand" x="128" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="shadow" x="256" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="stone" x="384" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="water" x="512" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="wood" x="640" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="woodenPlank" x="640" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
</TextureAtlas>
Binary file modified Assets/Textures/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 45 additions & 42 deletions Assets/Textures/items.xml
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<TextureAtlas imagePath="items.png" width="896" height="768" scale="1" format="RGBA8888">
<sprite n="item_cobblestone" x="0" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_crafting_table" x="128" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond" x="0" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_axe" x="128" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_boots" x="256" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_chestplate" x="256" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_helmet" x="0" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_pick" x="128" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_shovel" x="256" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_sword" x="384" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_dirt" x="384" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_axe" x="384" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_boots" x="0" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_chestplate" x="128" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_helmet" x="256" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_ingot" x="384" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_shovel" x="512" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_golden_pick" x="512" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_golden_sword" x="512" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_grass" x="512" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_axe" x="0" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_boots" x="128" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_chestplate" x="256" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_helmet" x="384" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_ingot" x="512" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_pick" x="640" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_shovel" x="640" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_sword" x="640" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_leaves" x="640" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_sand" x="640" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stick" x="0" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone" x="128" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_axe" x="256" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_pick" x="384" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_shovel" x="512" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_sword" x="640" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood" x="768" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_axe" x="768" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_pick" x="768" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_sword" x="768" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wooden_planks" x="768" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<TextureAtlas imagePath="items.png" width="1024" height="768" scale="1" format="RGBA8888">
<sprite n="item_coal" x="0" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_cobblestone" x="128" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_crafting_table" x="0" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond" x="128" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_axe" x="256" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_boots" x="256" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_chestplate" x="0" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_helmet" x="128" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_pick" x="256" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_shovel" x="384" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_diamond_sword" x="384" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_dirt" x="384" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_axe" x="0" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_boots" x="128" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_chestplate" x="256" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_helmet" x="384" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_ingot" x="512" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_gold_shovel" x="512" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_golden_pick" x="512" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_golden_sword" x="512" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_grass" x="0" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_axe" x="128" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_boots" x="256" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_chestplate" x="384" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_helmet" x="512" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_ingot" x="640" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_pick" x="640" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_shovel" x="640" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_iron_sword" x="640" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_leaves" x="640" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_sand" x="0" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stick" x="128" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone" x="256" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_axe" x="384" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_pick" x="512" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_shovel" x="640" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_stone_sword" x="768" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood" x="768" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_axe" x="768" y="256" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_pick" x="768" y="384" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_shovel" x="768" y="512" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wood_sword" x="768" y="640" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="item_wooden_planks" x="896" y="0" w="128" h="128" pX="0.5" pY="0.5"/>
<sprite n="null" x="896" y="128" w="128" h="128" pX="0.5" pY="0.5"/>
</TextureAtlas>
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ glad.c

"app.rc" "Game/Objects/Base/Blocks/Water.cpp" "Game/Objects/Base/Blocks/Bedrock.h" "Game/Objects/Base/Blocks/CoalOre.h" "Game/Objects/Base/Blocks/IronOre.h" "Game/Objects/Base/Blocks/GoldOre.h" "Game/Objects/Base/Blocks/DiamondOre.h"
Engine/Helpers/Performance.h
"Game/Objects/Base/FallingBlock.h" "Game/Objects/Base/FallingBlock.cpp" "Game/Objects/Base/Blocks/Sand.cpp")
"Game/Objects/Base/FallingBlock.h" "Game/Objects/Base/FallingBlock.cpp" "Game/Objects/Base/Blocks/Sand.cpp" "Game/Objects/Base/Blocks/NullBlock.h")

link_directories(bassLibrary)

Expand Down
5 changes: 4 additions & 1 deletion src/Engine/External/Spritesheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const Sprite SpriteSheet::GetSprite(std::string s) const
}
}

return Sprite();
if (s == "null")
return Sprite{ "null", 0, 0, 0, 0 };

return GetSprite("null");
}

glm::vec4 SpriteSheet::GetUV(std::string s) const
Expand Down
Loading

0 comments on commit 658823c

Please sign in to comment.