aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 9c245c4bf7a589aa9bd448c1f7dcde3dd77db4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# lzy
Simple game framework for SDL2 and gint.

## Usage

Drop (inc/lzy.h)[lzy.h] into an existing project.

Include implementation in a single source file:
```c
#define LZY_IMPLEMENTATION
#include "lzy.h"
```

Optional defines before implementation:
```c
#define LZY_IMPLEMENTATION
#define LZY_SDL_INCLUDE <SDL.h>
#define LZY_SDL_IMAGE_INCLUDE <SDL_image.h>
#define LZY_SDL_MIXER_INCLUDE <SDL_mixer.h>
#define LZY_GINT_TILESET bimg_tset
#define LZY_GINT_FONT bimg_font
#define LZY_DISPLAY_WIDTH 396
#define LZY_DISPLAY_HEIGHT 224
#define LZY_TILE_SIZE 16
#define LZY_CHR_WIDTH LZY_TILE_SIZE
#define LZY_CHR_HEIGHT LZY_TILE_SIZE
#define LZY_FIRST_CHR ' '
#include "lzy.h"
```

Don't define `LZY_IMPLEMENTATION` before other inclusions.


For data structures and function prototypes, read the source.