From 810d7f2c5df002bcaded1bf68800a28ce5ec2be6 Mon Sep 17 00:00:00 2001 From: Captain4LK Date: Sun, 19 Jul 2020 20:34:43 +0200 Subject: [PATCH] Clean up README.md --- README.md | 47 +++++++++++++++++++++++++++++++---------------- include/SLK/SLK.h | 1 - 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 50373f4..fd1ca5b 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,54 @@ # SoftLK Engine -A software accelerated engine that uses OpenGL to bring the graphics to the screen. It's made for low resolutions (eg. 256x240), but can be used for higher resolutions, too. +A software accelerated engine using OpenGL to bring the graphics to the screen. It's made for low resolutions (eg. 256x240), but should handle higher resolutions, too. ## Features * Layers: Draw to multiple independent layers * RGB drawing: Draw in 32bit rgba colorspace * Pal drawing: Draw in palletized 8bit colorspace and change the palette on the fly, without needing to redraw -* Image loading: Load and save from and to multiple file formats +* Image loading: Load and save sprites from and to multiple file formats * OpenGL 2.1: It's old. It's antiquated. I mean, who needs shaders anyway? ## License SoftLK is free Software (as in freedom) and is released under the 3-clause BSD license, see LICENSE.md for details. Most of the examples are released under the same license, unless noted otherwise of course. -## Using SoftLK - -To use SoftLK you need to have the following libraries installed: - -* [SDL 2](https://www.libsdl.org/) - -You need to link your programm to the following libraries: - -Linux: - -* -lSDL2 -* -lGL -* -ldl +## Getting started + +1. Get a compiler: I use gcc but clang works too. +2. Install the SDL2 development files: + + On Debian/Ubuntu: `` sudo apt install libsdl2-dev`` (Note: I haven't used a Debian/Ubuntu based distro in a while) + + On Void-Linux: `` sudo xbps-install SDL2-devel`` +3. Clone this repository: `` git clone https://codeberg.org/Captain4LK/SoftLK-lib.git`` +4. Compile SoftLK: + + You can either use the provided makefile: + + ``` + cd SoftLK-lib/lib + make + ``` + + Or compile it yourself: + + ``` + cd SoftLK-lib/lib + gcc -O3 -c ../src/*.c -lm -lSDL2 -lGL #Compile to object files first + gcc -O3 -c ../external/glad.c -lm -lGL #Compile glad too + ar cr libSLK.a *.o #Then link them together + ``` + +5. If everything went right you are now ready to start using SoftLK. Now you can either look at some of the examples, look at the [Getting started](https://codeberg.org/Captain4LK/SoftLK-lib/wiki/Getting-started) wikipage or figure things out yourself by looking at the source. + ## Plattforms SoftLK has been tested and is working on the following plattforms/os: * Void GNU/Linux, amd64 (glibc/musl-libc) -* Raspbian 10, raspberry pi 4b SoftLK should work on any plattform that has a C compiler, SDL2 and OpenGL 2.1, the plattforms listed here are just the ones I frequently test SoftLK on. diff --git a/include/SLK/SLK.h b/include/SLK/SLK.h index e7654d8..627b7fa 100644 --- a/include/SLK/SLK.h +++ b/include/SLK/SLK.h @@ -25,7 +25,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND #include #include #include -#include "../../external/glad.h" //Internal includes #include "SLK_types.h"