SDL_grf - functions for 2D/3D graphics (including text), sound and input + a few
demonstrative programs. Images can be saved in *.bmp files or displayed with
SDL-1.2, SDL-2 or SDL-3. Sound requires SDL.

Copyright 2018-2023 Matei Petrescu

SDL 1.2: https://sourceforge.net/projects/libsdl/files/SDL/1.2.15/

SDL 2 or 3: https://github.com/libsdl-org/SDL/tags

All files from directories graphics, src and doc are available under the terms
of the GNU General Public License, version 3, see file ../COPYING for details.
The license used for game Licar can also be used for the files in directory
src.

To compile the functions and the programs from directory src:

1. Edit graphics/genconf.c, where you can replace "gcc" with "g++", "k8" with
   "native", "pentium2" or any other CPU and "mfpmath=sse" with "mfpmath=387",
   "mfpmath=sse+387" or "".

2. From directory tredsrc (this one here) type:

   ./comp-graph

   Then carefully select all desired parameters, after which, if no error
   messages are displayed, type:

   ./comp demo

   ./comp hello

   ./comp pbm

   ./comp sol

   ./comp tred

Of course, you will need to install SDL 1, 2 or 3 first, for which some
recommendations are in file ../SDL.txt.

To run the programs, you can type:

1. ./demo

2. ./hello

   These are simple demos, no description needed.

3. ./pbm imagefile.ppm

   Program for viewing images saved in *.ppm, *.pgm or *.pbm text files.

4. ./sol

   This is an approximate simulation of the Solar System, which uses Verlet's
   method. The program can be controlled with the arrow keys:

   RIGHT, LEFT: change simulation speed
   UP, DOWN: change distance to the model

   https://en.wikipedia.org/wiki/Verlet_integration

   The parameters are in file config from this directory. Units of mass, time
   and length are 5.972e24kg (mass of Earth), 3.1557e7s (a year) and 7.3491e9m,
   so the gravitational constant is 1. After "planets 8", the 1st number on
   each line is the mass of the planet and the 2nd is the distance to the sun.
   The speed is calculated automatically and you can of course change all
   parameters and declare any number of planets.

5. ./tred

   ./tred ../datafiles/LCbonus1

   Track editor made for Licar, more information in file ../README.txt.

The documentation for the functions available here is in directory doc. To
compile your own program, you can edit file comp, add your program there and
maybe remove the other ones. For any questions, you can contact me:

https://sourceforge.net/u/matei_v/profile/

https://matei.one/
