liblibgb.c 1.2021.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # gb
2
+
3
+ gb single-file public domain libraries for C & C++, by [gingerBill](https://github.com/gingerBill).
4
+
5
+ library | latest version | category | description
6
+ ----------------|----------------|----------|-------------
7
+ **gb.h** | 0.27 | misc | Helper library (Standard library _improvement_)
8
+ **gb_math.h** | 0.07e | math | Vector math library geared towards game development
9
+ **gb_gl.h** | 0.05 | graphics | OpenGL Helper Library
10
+ **gb_string.h** | 0.95a | strings | A better string library (this is built into gb.h too with custom allocator support!)
11
+ **gb_ini.h** | 0.93 | misc | Simple ini file loader library
12
+
13
+
14
+ ## Installation
15
+
16
+ Run:
17
+
18
+ ```bash
19
+ $ npm i libgb.c
20
+ ```
21
+
22
+ And then include `gb.h`, and related, as follows:
23
+
24
+ ```c
25
+ // main.c
26
+ #define GB_IMPLEMENTATION
27
+ #include "node_modules/libgb.c/gb.h"
28
+ #define GB_MATH_IMPLEMENTATION
29
+ #include "node_modules/libgb.c/gb_math.h"
30
+ #define GB_STRING_IMPLEMENTATION
31
+ #include "node_modules/libgb.c/gb_string.h"
32
+ #define GB_INI_IMPLEMENTATION
33
+ #include "node_modules/libgb.c/gb_ini.h"
34
+ #define GBGL_IMPLEMENTATION
35
+ #include "node_modules/libgb.c/gb_gl.h"
36
+
37
+ int main() { /* ... */ }
38
+ ```
39
+
40
+ And then compile with `clang` or `gcc` as usual.
41
+
42
+ ```bash
43
+ $ clang main.c # or, use gcc
44
+ $ gcc main.c
45
+ ```
46
+
47
+ You may also use a simpler approach:
48
+
49
+ ```c
50
+ // main.c
51
+ #define GB_IMPLEMENTATION
52
+ #include <gb/gb.h>
53
+ #define GB_MATH_IMPLEMENTATION
54
+ #include <gb/gb_math.h>
55
+ #define GB_STRING_IMPLEMENTATION
56
+ #include <gb/gb_string.h>
57
+ #define GB_INI_IMPLEMENTATION
58
+ #include <gb/gb_ini.h>
59
+ #define GBGL_IMPLEMENTATION
60
+ #include <gb/gb_gl.h>
61
+
62
+ int main() { /* ... */ }
63
+ ```
64
+
65
+ If you add the path `node_modules/libgb.c` to your compiler's include paths.
66
+
67
+ ```bash
68
+ $ clang -I./node_modules/libgb.c main.c # or, use gcc
69
+ $ gcc -I./node_modules/libgb.c main.c
70
+ ```
71
+
72
+ <br>
73
+
74
+ ## FAQ
75
+
76
+ ### What's the license?
77
+
78
+ These libraries are in the public domain. You can do anything you want with them. You have no legal obligation to do anything else, although I would appreciate attribution.
79
+
80
+ ### If I wrap an gb library in a new library, does the new library have to be public domain?
81
+
82
+ No.
83
+
84
+ ### Is this in the style of the [stb libraries](https://github.com/nothings/stb)?
85
+
86
+ Yes. I think these libraries are brilliant and use many of these on a daily basis.
87
+
88
+ ### May I contribute?
89
+
90
+ Yes.
91
+
92
+ ### What is the versioning system that you use?
93
+
94
+ I may change it in the future but at the moment it is like this this:
95
+
96
+ `1.23b`
97
+
98
+ * `1` = major version
99
+ * `23` = minor version
100
+ * `b` = patch
101
+ - 1.23 => zero patches
102
+ - 1.23a => patch 1
103
+ - 1.23b => patch 2
104
+ - etc.
105
+
106
+ <br>
107
+ <br>
108
+
109
+
110
+ [![SRC](https://img.shields.io/badge/src-repo-green?logo=Org)](https://github.com/gingerBill/gb)
111
+ [![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
112
+ ![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/libgb.c)