git repos / saland

commit 95a9e57b

Poul Sander · 2022-10-02 13:48
95a9e57b4c44db3ca7116cf0da0186158b1107c5 patch · browse files
parent b00fe713ed3592d4e03862af4b6277787a532f74

Add palm tree

Changed files

M data/sprites/items.sprite before
A data/textures/plant_repack.png
A data/textures/plant_repack.png.txt
M src/saland/Game.cpp before
M src/saland/GameItems.cpp before
diff --git a/data/sprites/items.sprite b/data/sprites/items.sprite index 58763a0..b3b50c2 100644 --- a/data/sprites/items.sprite +++ b/data/sprites/items.sprite
@@ -34,6 +34,18 @@
"frame_time" : 100,
"originx" : 48,
"originy" : 128
+},
+
+"tree_palm" : {
+ "texture" : "plant_repack",
+ "topx" : 320,
+ "topy" : 288,
+ "height" : 128,
+ "width" : 96,
+ "number_of_frames" : 1,
+ "frame_time" : 100,
+ "originx" : 48,
+ "originy" : 112
}
}
diff --git a/data/textures/plant_repack.png b/data/textures/plant_repack.png new file mode 100644 index 0000000..5d4a171
Binary files /dev/null and b/data/textures/plant_repack.png differ
diff --git a/data/textures/plant_repack.png.txt b/data/textures/plant_repack.png.txt new file mode 100644 index 0000000..b6c0530 --- /dev/null +++ b/data/textures/plant_repack.png.txt
@@ -0,0 +1,42 @@
+License
+-------
+
+CC-BY-SA 3.0:
+- http://creativecommons.org/licenses/by-sa/3.0/
+GNU GPL 3.0:
+- http://www.gnu.org/licenses/gpl-3.0.html
+
+If you need to figure out exactly who made what please see the Liberated Pixel Cup entries.
+
+Liberated Pixel Cup Assets:
+http://opengameart.org/lpc-art-entries
+
+LPC participants:
+----------------
+
+Barbara Rivera
+- Concept Art for LPC Entry
+
+Casper Nilsson
+ email: casper.nilsson@gmail.com
+ Freenode: CasperN
+ OpenGameArt.org: C.Nilsson
+- LPC C.Nilsson (2D art)
+
+Johann CHARLOT
+ Homepage http://poufpoufproduction.fr
+ Email johannc@poufpoufproduction.fr
+- Shoot'em up graphic kit
+
+Chris Phillips
+- Team River Fox
+
+
+LPC Base assets found here:
+http://lpc.opengameart.org/static/lpc-style-guide/assets.html
+
+Lanea Zimmerman (AKA Sharm)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- treetop.png
+- trunk.png
\ No newline at end of file
diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index dab62ee..1ce9995 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp
@@ -298,6 +298,10 @@ Game::Game() {
slot6.icon = "item_barrel";
slot6.name = "spell_spawn_item";
slot6.item_name = "barrel";
+ Spell& slot7 = data->slot_spell.at(7);
+ slot7.icon = "tree_palm"; //Quite big. As this has no icon
+ slot7.name = "spell_spawn_item";
+ slot7.item_name = "tree_palm";
Spell& slot9 = data->slot_spell.at(9);
slot9.icon = "icon_trash_can";
slot9.name = "spell_clear_block";
diff --git a/src/saland/GameItems.cpp b/src/saland/GameItems.cpp index 92311e6..9a82d68 100644 --- a/src/saland/GameItems.cpp +++ b/src/saland/GameItems.cpp
@@ -49,5 +49,10 @@ const ItemDef& getItem(const std::string& itemName) {
itemDef.sprite2 = "tree_pine_top";
itemDef.isStatic = true;
}
+ if (itemName == "tree_palm") {
+ itemDef.radius = 20.0f;
+ itemDef.sprite = "tree_palm";
+ itemDef.isStatic = true;
+ }
return itemDef;
}
\ No newline at end of file