From 9ff08e4a911e6c9b4c3716208b63209198ec5b0d Mon Sep 17 00:00:00 2001 From: N0VA Date: Tue, 24 Feb 2026 14:03:43 +0100 Subject: [PATCH] Use prettynames.h --- iris_c/Makefile | 4 ++-- iris_c/main.c | 19 +------------------ 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/iris_c/Makefile b/iris_c/Makefile index 7c4a10c..6eb7cce 100644 --- a/iris_c/Makefile +++ b/iris_c/Makefile @@ -6,8 +6,8 @@ TARGET = main all: $(TARGET) -$(TARGET): main.c random.c random.h world.c world.h - $(CC) $(CFLAGS) -o $@ main.c random.c world.c +$(TARGET): main.c random.c random.h world.c world.h prettynames.c prettynames.h + $(CC) $(CFLAGS) -o $@ main.c random.c world.c prettynames.c clean: rm -f $(TARGET) diff --git a/iris_c/main.c b/iris_c/main.c index 72ea830..39a6d2e 100644 --- a/iris_c/main.c +++ b/iris_c/main.c @@ -1,27 +1,10 @@ #include #include +#include "prettynames.h" #include "random.h" #include "world.h" -static const char *quadrant_type_name(quadrant_type type) { - switch (type) { - case Q_EMPTY: return "Empty"; - case Q_ASTEROID_FIELD: return "Asteroid field"; - case Q_STAR_SYSTEM: return "Star system"; - case Q_NEBULA: return "Nebula"; - case Q_BLACK_HOLE: return "Black hole"; - case Q_WHITE_HOLE: return "White hole"; - case Q_PULSAR: return "Pulsar"; - case Q_QUASAR: return "Quasar"; - case Q_SUPERNOVA: return "Supernova"; - case Q_ANOMALY: return "Anomaly"; - case Q_SINGULARITY: return "Singularity"; - case Q_COUNT: return "Count"; - default: return "Undefined"; - } -} - int main() { uint32_t seed; printf("Enter seed: ");