My SDL Lib

The basic lib

Most of the programs of this site will use a basic collection of functions based on the SDL.
It is meant to ease the use of of a 2D display where we can set the color of each pixel.
As you will see it will be very convenient to create simple graphic representations to explain most of the
algorithms.
You can download this basic library here but it is not mandatory as it will be included in most of the
programs on this site.

Here is an explanation of the files it contains.

CSDL.cpp & CSDL.h:
To keep the code of my programs as clear as possible I want to avoid adding too much error checking in the main
code.
So this class is a simple interface to the SDL, where each function call the SDL function of the same name and
take cares of displaying any error that can occur.
By the way these functions are not meant to be called directly by our programs. They will rather be used in the
other modules of the library - Graphics and System.

Graphics.cpp & Graphics.h:
This module contains the core functions of most of the programs you will see:
System.cpp & System.h:
These files contains general purpose functions that are not related to graphics.
For example this is where we will handle the inputs.
The basic library only contains 3 functions:

The updated lib

As I write new programs for this site, I will occasionally add some functions to this lib.
Here you will be able to download an updated version of my lib that gathers all these additions.

The updated lib

Changes:
gfx.line(), sys.StartPerfCounter(), sys.StopPerfCounter(), ABS() and SGN() added in Bresenham's line algorithm
Complex numbers class added in The Mandelbrot set
DEG_TO_RAD() added in Circles and ellipses
SDL_MOUSEMOTION event added in The Julia set
Vec2f class added in Vectors
gfx.rect() and gfx.rectFill() added in Segregation
Vec2f class updated in Vectors 2
Vec2f class updated in Basic transformations
Vec2f division fixed
Complex numbers class updated
Complex numbers updated and mouse handling added in Newton tool
Lost functions in Vec2f
Optimizations and circle in Bresenham's circle algorithm
circleFill in Filled circles
file functions and Targa format in TrueVision Targa