update some

This commit is contained in:
NishiOwO 2025-04-14 14:11:58 +09:00
parent 9d662dc88b
commit 627f2a3cdd
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
3 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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++;