summaryrefslogtreecommitdiff
path: root/height-map-display/src/map/node.c
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2024-03-18 01:44:32 -0700
committerSchark <jordan@schark.online>2024-03-18 01:44:32 -0700
commit8e2508626776d1300b351f2326773b5bb0cb528f (patch)
treeee7daf330a91c8770ed860564c2c2d77fb138fb4 /height-map-display/src/map/node.c
parent69de9b320ad3c45e0a19845c88ae8323cfb59bf1 (diff)
downloadgamedev-8e2508626776d1300b351f2326773b5bb0cb528f.tar.gz
gamedev-8e2508626776d1300b351f2326773b5bb0cb528f.zip
Adding selected square functionality and aesthetics
Diffstat (limited to '')
-rw-r--r--height-map-display/src/map/node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/height-map-display/src/map/node.c b/height-map-display/src/map/node.c
index eaf2877..33d568d 100644
--- a/height-map-display/src/map/node.c
+++ b/height-map-display/src/map/node.c
@@ -18,3 +18,11 @@ void change_node_height(Node* node, float diff) {
if (node != NULL) { node->elevation = node->elevation + diff; }
}
+int* get_coords(Node* node) {
+ int *coordinate = malloc(2 * sizeof(int));
+ if (coordinate != NULL) {
+ coordinate[0] = node->x;
+ coordinate[1] = node->y;
+ }
+ return coordinate;
+}