libgb.c 1.2021.2 → 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 +50 -6
- package/gb/gb.h +10824 -0
- package/{gb_gl.h → gb/gb_gl.h} +2592 -2592
- package/{gb_ini.h → gb/gb_ini.h} +425 -425
- package/{gb_math.h → gb/gb_math.h} +2234 -2234
- package/{gb_string.h → gb/gb_string.h} +511 -511
- package/gb.h +11 -10820
- package/package.json +18 -7
package/README.md
CHANGED
|
@@ -14,19 +14,62 @@ library | latest version | category | description
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
Run:
|
|
17
|
+
|
|
17
18
|
```bash
|
|
18
19
|
$ npm i libgb.c
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
And then include `gb.h`, and related, as follows:
|
|
23
|
+
|
|
22
24
|
```c
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
#include "node_modules/libgb.c/
|
|
26
|
-
#
|
|
27
|
-
#include "node_modules/libgb.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
|
|
28
45
|
```
|
|
29
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>
|
|
30
73
|
|
|
31
74
|
## FAQ
|
|
32
75
|
|
|
@@ -64,5 +107,6 @@ I may change it in the future but at the moment it is like this this:
|
|
|
64
107
|
<br>
|
|
65
108
|
|
|
66
109
|
|
|
110
|
+
[](https://github.com/gingerBill/gb)
|
|
67
111
|
[](https://nodef.github.io)
|
|
68
|
-

|