unigi/README.md

32 lines
1.9 KiB
Markdown
Raw Normal View History

2024-04-21 11:35:56 +00:00
# unigi
2024-06-30 20:18:03 +00:00
unigi (Universal Graphics & Input) is a collection of headers, that implement a cross-platform API for drawing to the screen (framebuffer or window), and taking inputs (keyboard, mouse, joypad). This approach should work well for general computers, like PCs and many 6th generation consoles.
2024-04-21 11:35:56 +00:00
2024-06-16 11:56:54 +00:00
This repository contains documentation, links and example applications.
2024-04-21 11:35:56 +00:00
2024-04-21 12:23:00 +00:00
<img src="assets/preview.png" title="Preview">
2024-06-16 11:56:54 +00:00
# Compatibility
* GNU C99 compatible
2024-06-16 11:56:54 +00:00
* No `make` required, entirely configurable from your compiler, or header files
2024-04-21 14:07:16 +00:00
* Supports wide range of hardware (16-bit+, little/big endian)
2024-06-16 11:56:54 +00:00
* Standardized 16-bit color format (AAAARRRRGGGGBBBB, effectively 12-bit on most platforms)
* Screen coordinates are standardized
* Decent performance (Though some performance is sacrificed for standardization)
# Layers
A unigi app is built from different layers:
2024-09-10 20:40:39 +00:00
* **Headers (this repository)** - The functions to be implemented by the Platform
2024-06-16 18:07:18 +00:00
* **[Platform](#official-platforms)** - Implements the functions from Headers to work on a particular system
2024-07-31 20:07:43 +00:00
* **...** - Optionally, more layers (Like [unigi.ext](https://git.lumen.sh/Fierelier/unigi.ext))
2024-06-30 20:20:07 +00:00
* **App** - Your code, uses other layers for input/output. You can find examples in test/\*
2024-06-16 11:56:54 +00:00
# Platforms
Platforms act as the translation layer for different systems. The idea is to minimize the amount of work it takes to port graphical applications.
## Official platforms
2024-09-12 02:21:01 +00:00
* **[SDL1](https://git.lumen.sh/Fierelier/unigi.platform.sdl1)** - The highly compatible SDL 1.2, works on old Linux, Windows 95+ and some consoles
* **[SDL2](https://git.lumen.sh/Fierelier/unigi.platform.sdl2)** - SDL 2.x, works on somewhat recent Linux, Windows XP+ and some consoles
2024-06-16 11:58:52 +00:00
* **DOS (soon)** - DOS (Disk Operating System), compatible with FreeDOS and MS-DOS
* **PSP (soon)** - PlayStation Portable gaming console
* **Null (soon)** - A placeholder that does "nothing", good if you want to test basic compilation for an unsupported platform