mirror of
https://github.com/nishiowo/nishbox
synced 2025-04-21 20:24:39 +00:00
update some
This commit is contained in:
parent
9d662dc88b
commit
627f2a3cdd
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Stack
|
## Stack
|
||||||
- OpenGL 1.1 (probably) on WGL/GLX/[GLFW](https://www.glfw.org/)
|
- OpenGL 1.1 (probably) on WGL/GLX/[GLFW](https://www.glfw.org/)
|
||||||
|
- DirectX 8?
|
||||||
- [Open Dynamics Engine](https://ode.org)
|
- [Open Dynamics Engine](https://ode.org)
|
||||||
- [zlib](https://zlib.net)
|
- [zlib](https://zlib.net)
|
||||||
- [Lua](https://lua.org)
|
- [Lua](https://lua.org)
|
||||||
|
@ -20,6 +20,12 @@
|
|||||||
|
|
||||||
/* Standard */
|
/* Standard */
|
||||||
|
|
||||||
|
#define GF_SET_COLOR(color, red, green, blue, alpha) \
|
||||||
|
color.r = (red); \
|
||||||
|
color.g = (green); \
|
||||||
|
color.b = (blue); \
|
||||||
|
color.a = (alpha)
|
||||||
|
|
||||||
GF_EXPORT void gf_graphic_clear(gf_draw_t* draw);
|
GF_EXPORT void gf_graphic_clear(gf_draw_t* draw);
|
||||||
|
|
||||||
GF_EXPORT void gf_graphic_begin_2d(gf_draw_t* draw);
|
GF_EXPORT void gf_graphic_begin_2d(gf_draw_t* draw);
|
||||||
|
@ -31,10 +31,7 @@ void draw_frame(gf_draw_t* draw) {
|
|||||||
for(y = 0; y < draw->height; y += s) {
|
for(y = 0; y < draw->height; y += s) {
|
||||||
for(x = 0; x < draw->width; x += s / 2) {
|
for(x = 0; x < draw->width; x += s / 2) {
|
||||||
str[0] = d[(i++) % strlen(d)];
|
str[0] = d[(i++) % strlen(d)];
|
||||||
col.r = 255.0f / max * r;
|
GF_SET_COLOR(col, 255.0f / max * r, 255.0f / max * g, 255.0f / max * b, 255);
|
||||||
col.g = 255.0f / max * g;
|
|
||||||
col.b = 255.0f / max * b;
|
|
||||||
col.a = 255;
|
|
||||||
gf_graphic_text(draw, x, y, s, str, col);
|
gf_graphic_text(draw, x, y, s, str, col);
|
||||||
|
|
||||||
b++;
|
b++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user