Go to file
Adrien Marquès 0b7e7a2948 set default xSprite clip / projection 2020-02-04 20:21:35 +01:00
.vscode Create project barebone 2019-11-05 21:52:41 +01:00
include create orchestrable xSpriteGroup (no more xSprite alone) 2020-02-02 16:18:20 +01:00
xSDL set default xSprite clip / projection 2020-02-04 20:21:35 +01:00
.gitignore Create project barebone 2019-11-05 21:52:41 +01:00
LICENSE add license information 2019-11-05 21:52:55 +01:00
README.md update readme: explain orchestrable and how xSpriteAnimation implements it 2019-11-06 22:56:03 +01:00
main.h Create project barebone 2019-11-05 21:52:41 +01:00
makefile Create project barebone 2019-11-05 21:52:41 +01:00

README.md

xSDL

package:  xSDL
language: c++
version:  0.1.0
author:   xdrm-brackets

xSDL is a simple 2D wrapper around the SDL2 to make your life easier.

Documentation

The API aims to be straightforward as possible and tries to take advantage of patterns and principles to achieve its goal.

xSDL can be compiled as a dynamic library (e.g. lib.so). The include header is located in include/xSDL.h. It can also be compiled directly within your application.

The class xApplication is a singleton representing your application, its window, renderer, etc. An xApplication features a xController that manages user input.

The interface xElement represents any graphical feature to be drawn on the screen. Any number of xElement can be pushed to or pulled from the application at any time in order to show them or not.

The interface xOrchestrable represents any class that can be called during the application scheduling. Any number of xOrchestrable can be added or removed from the application at any time in order to execute them or not.

The class xSprite represents a sprite that can is a rectangle that can draw either as a single color, an image, or a copy of another sprite. It can be moved over time. Also, it allows you to set a custom clip if this is an image sprite.

The class xSpriteAnimation derives from an image sprite, which clip can change over time. These clips are called frames and have to be set beforehand. It is also an orchestrable (i.e. animates on application ticks), you can start or stop the animation with a specified time interval. Every xSpriteAnimation is scheduled by the xApplication.