From 221f8b42adeb776e10944a5ed3835b8f00434985 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 5 Jan 2011 13:26:58 +0000 Subject: Added some structure to allow pluggable display drivers. --- BUILD | 24 +++++++++++++++++------- config/config | 30 ++++++++++++++++++++++++++++++ driver/BUILD | 18 ++++++++++++++++++ 3 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 driver/BUILD diff --git a/BUILD b/BUILD index e7b3102..d5a19b5 100644 --- a/BUILD +++ b/BUILD @@ -1,17 +1,27 @@ -sdlgrav has the following dependencies: +grav has the following dependencies: - * SDL 1.2 * GNU Multiple Precision Arithmetic Library - * OpenGL -To build sdlgrav: +To build grav: -$ cd sdlgrav +$ cd grav $ make depend $ make +This will generate the executable, grav. See INSTRUCTIONS for instructions on +how to use the software. + +Note that grav cannot display by itself, but uses plugins to display the +simulated systems. There is in-built support for displaying information to +stdout in the abscence of any other display. + +The instructions for building display drivers can be found in the driver +directory. + + * SDL 1.2 + * SDL Image + * OpenGL + -This will generate the stand-alone executable, sdlgrav. See INSTRUCTIONS for -instructions on how to use the software. diff --git a/config/config b/config/config index 1f6b18a..08a7a4a 100644 --- a/config/config +++ b/config/config @@ -1,2 +1,32 @@ # Example configuration file # +# +# General format is: +# +# [section] +# variable = value +# +# Any blank lines or lines starting with a comment are ignored. +# + + +# This defines any textures to load, and the names applied to them. Any image +# format supported by SDL Image should be loadable. +# +[textures] +example1 = files/file.png +example2 = files/file.png + + +# This enables or disables various graphical effects. The defaults for the +# effects are given here. +# +[gfx] +trails = yes + + +# This defines the bodies that will be placed in the simulation. +# +[universe] +body = sun +body = planet diff --git a/driver/BUILD b/driver/BUILD new file mode 100644 index 0000000..ae16a7a --- /dev/null +++ b/driver/BUILD @@ -0,0 +1,18 @@ + +The following display drivers are available: + +SDL-GL [NOT YET AVAILABLE] + + Displays using OpenGL and SDL. Require the following: + + * SDL 1.2 + * SDL Image + * OpenGL + + To make: + + $ cd sdl-gl + $ make depend + $ make + + This generates sdl-gl.so -- cgit v1.2.3