From af03f388cbcff795158ea8345b5c876470229e8b Mon Sep 17 00:00:00 2001 From: Schark Date: Mon, 18 Mar 2024 23:28:37 -0700 Subject: More granular square control --- height-map-display/src/map/square.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'height-map-display/src/map/square.c') diff --git a/height-map-display/src/map/square.c b/height-map-display/src/map/square.c index 54add55..9109123 100644 --- a/height-map-display/src/map/square.c +++ b/height-map-display/src/map/square.c @@ -40,3 +40,15 @@ Square* find_selected_square(Square*** squares, int x, int y) { return NULL; } + +float* get_terrain_color(Terrain_Type terrain) { + static float colors[6][3] = { + {0.0f, 0.0f, 0.0f}, // init + {0.0f, 0.5f, 0.0f}, // rough + {0.2f, 0.7f, 0.2f}, // fairway + {0.3f, 0.8f, 0.3f}, // green + {0.1f, 0.2f, 0.8f}, // water + {0.9f, 0.7f, 0.7f}, // sand + }; + return colors[terrain]; +} -- cgit v1.2.3-18-g5258