From 862ef7759bc90a46dc982b4a477998997ddd9b68 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 20 Jul 2013 19:17:10 +0100 Subject: [PATCH] [Change] Split the star rendering to be able to switch to nebulae soon. --- src/space.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/space.c b/src/space.c index d276537..1c83d44 100644 --- a/src/space.c +++ b/src/space.c @@ -16,6 +16,7 @@ #include "toolkit.h" #include "spfx.h" #include "ltime.h" +#include "nebulae.h" #include "player.h" #define XML_PLANET_ID "Planets" @@ -70,6 +71,7 @@ static int mstars = 0; /* Memory stars are taking. */ /* Intern. */ static Planet* planet_pull(const char* name); +static void space_renderStars(double dt); static void space_addFleet(Fleet* fleet); static StarSystem* system_parse(const xmlNodePtr parent); static void system_parseJumps(const xmlNodePtr parent); @@ -790,6 +792,12 @@ int space_load(void) { /* Render the system. -- Just playing god now. */ void space_render(double dt) { + space_renderStars(dt); + /* nebu_render(); */ +} + +/* Render stars. */ +static void space_renderStars(double dt) { int i; unsigned int t, timer; double x, y, m, b;