From 0e66d9c915d69deb9e312441b52cf0be02b5638b Mon Sep 17 00:00:00 2001 From: NishiOwO <89888985+NishiOwO@users.noreply.github.com> Date: Fri, 18 Apr 2025 02:24:50 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20NishiOwO?= =?UTF-8?q?/nishbox@95673f7829c097e3c5df276f47b30f977c7a4a3d=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/gf__draw_8h.html | 8 +- engine/gf__draw_8h_source.html | 8 +- engine/gf__draw__common_8c_source.html | 158 ++++++++++++------------- 3 files changed, 86 insertions(+), 88 deletions(-) diff --git a/engine/gf__draw_8h.html b/engine/gf__draw_8h.html index d83eb2a..3485511 100644 --- a/engine/gf__draw_8h.html +++ b/engine/gf__draw_8h.html @@ -246,7 +246,7 @@ Functions -

Definition at line 120 of file gf_draw_common.c.

+

Definition at line 118 of file gf_draw_common.c.

@@ -312,7 +312,7 @@ Functions -

Definition at line 86 of file gf_draw_common.c.

+

Definition at line 84 of file gf_draw_common.c.

@@ -348,7 +348,7 @@ Functions -

Definition at line 81 of file gf_draw_common.c.

+

Definition at line 79 of file gf_draw_common.c.

@@ -385,7 +385,7 @@ Functions
Returns
0 if successful, otherwise if failed
-

Definition at line 112 of file gf_draw_common.c.

+

Definition at line 110 of file gf_draw_common.c.

diff --git a/engine/gf__draw_8h_source.html b/engine/gf__draw_8h_source.html index 9050a40..26c3d4b 100644 --- a/engine/gf__draw_8h_source.html +++ b/engine/gf__draw_8h_source.html @@ -133,10 +133,10 @@ $(document).ready(function(){initNavTree('gf__draw_8h_source.html',''); initResi
draw.h
Type definitions related to drawing interface.
gf_draw_end
void gf_draw_end(void)
Cleanup drawing stuffs.
Definition gf_draw_common.c:28
gf_draw_begin
void gf_draw_begin(void)
Initialize drawing stuffs.
Definition gf_draw_common.c:26
-
gf_draw_step
int gf_draw_step(gf_draw_t *draw)
Do drawing single step.
Definition gf_draw_common.c:112
-
gf_draw_frame
void gf_draw_frame(gf_draw_t *draw)
Draw frame (common part)
Definition gf_draw_common.c:86
-
gf_draw_destroy
void gf_draw_destroy(gf_draw_t *draw)
Destroy drawing interface.
Definition gf_draw_common.c:120
-
gf_draw_reshape
void gf_draw_reshape(gf_draw_t *draw)
Do stuffs required on resizing window.
Definition gf_draw_common.c:81
+
gf_draw_step
int gf_draw_step(gf_draw_t *draw)
Do drawing single step.
Definition gf_draw_common.c:110
+
gf_draw_frame
void gf_draw_frame(gf_draw_t *draw)
Draw frame (common part)
Definition gf_draw_common.c:84
+
gf_draw_destroy
void gf_draw_destroy(gf_draw_t *draw)
Destroy drawing interface.
Definition gf_draw_common.c:118
+
gf_draw_reshape
void gf_draw_reshape(gf_draw_t *draw)
Do stuffs required on resizing window.
Definition gf_draw_common.c:79
gf_draw_create
gf_draw_t * gf_draw_create(gf_engine_t *engine, const char *title)
Create drawing interface.
Definition gf_draw_common.c:32
gf_macro.h
Macro.
GF_EXPORT
#define GF_EXPORT
Macro for platform-dependent symbol export/import.
Definition gf_macro.h:174
diff --git a/engine/gf__draw__common_8c_source.html b/engine/gf__draw__common_8c_source.html index 0455cc1..8b52d94 100644 --- a/engine/gf__draw__common_8c_source.html +++ b/engine/gf__draw__common_8c_source.html @@ -145,92 +145,90 @@ $(document).ready(function(){initNavTree('gf__draw__common_8c_source.html','');
43 strcpy(draw->title, title);
44 draw->platform = gf_draw_platform_create(engine, draw);
45 if(draw->platform != NULL) {
-
46 int i;
-
47 int regcount;
-
48 draw->driver = gf_draw_driver_create(engine, draw);
-
49 gf_draw_reshape(draw);
-
50 draw->running = 1;
-
51
-
52 draw->light[0] = 0.0;
-
53 draw->light[1] = 10.0;
-
54 draw->light[2] = 0.0;
-
55 draw->light[3] = 1.0;
-
56
-
57 draw->camera[0] = 0;
-
58 draw->camera[1] = 2;
-
59 draw->camera[2] = 2;
-
60
-
61 draw->lookat[0] = 0;
-
62 draw->lookat[1] = 0;
-
63 draw->lookat[2] = 0;
+
46 draw->driver = gf_draw_driver_create(engine, draw);
+
47 gf_draw_reshape(draw);
+
48 draw->running = 1;
+
49
+
50 draw->light[0] = 0.0;
+
51 draw->light[1] = 10.0;
+
52 draw->light[2] = 0.0;
+
53 draw->light[3] = 1.0;
+
54
+
55 draw->camera[0] = 0;
+
56 draw->camera[1] = 2;
+
57 draw->camera[2] = 2;
+
58
+
59 draw->lookat[0] = 0;
+
60 draw->lookat[1] = 0;
+
61 draw->lookat[2] = 0;
+
62
+
63 draw->font = gf_font_create(draw, "font/helvR24.bdf");
64
-
65 draw->font = gf_font_create(draw, "font/helvR24.bdf");
-
66
-
67 draw->gui = gf_gui_create(engine, draw);
-
68 if(1) {
-
69 int w, h, c;
-
70 unsigned char* d = stbi_load("texture/test.bmp", &w, &h, &c, 4);
-
71 test_texture = gf_texture_create(draw, w, h, d);
-
72 free(d);
-
73 }
-
74 } else {
-
75 gf_draw_destroy(draw);
-
76 draw = NULL;
-
77 }
-
78 return draw;
-
79}
+
65 draw->gui = gf_gui_create(engine, draw);
+
66 if(1) {
+
67 int w, h, c;
+
68 unsigned char* d = stbi_load("texture/test.bmp", &w, &h, &c, 4);
+
69 test_texture = gf_texture_create(draw, w, h, d);
+
70 free(d);
+
71 }
+
72 } else {
+
73 gf_draw_destroy(draw);
+
74 draw = NULL;
+
75 }
+
76 return draw;
+
77}
+
78
+
79void gf_draw_reshape(gf_draw_t* draw) { gf_draw_driver_reshape(draw); }
80
-
81void gf_draw_reshape(gf_draw_t* draw) { gf_draw_driver_reshape(draw); }
+
81gf_gui_id_t button = -1;
82
-
83gf_gui_id_t button = -1;
-
84
-
85/* Runs every frame */
-
-
86void gf_draw_frame(gf_draw_t* draw) {
-
87 gf_graphic_color_t color;
-
88 color.r = color.g = color.b = color.a = 255;
-
89 if(button == -1) {
-
90 button = gf_gui_create_button(draw->gui, 0, 0, 200, 100, "\"Test\" text");
-
91 }
-
92 if(draw->draw_3d) {
-
93 gf_graphic_draw_texture_polygon(draw, test_texture, color, GF_GRAPHIC_3D, 4,
-
94 /* clang-format off */
-
95 0.0, 0.0,
-
96 -1.0, 0.0, -1.0,
-
97
-
98 0.0, 4.0,
-
99 -1.0, 0.0, 1.0,
-
100
-
101 4.0, 4.0,
-
102 1.0, 0.0, 1.0,
-
103
-
104 4.0, 0.0,
-
105 1.0, 0.0, -1.0
-
106 /* clang-format on */
-
107 );
-
108 }
-
109 gf_gui_render(draw->gui);
-
110}
+
83/* Runs every frame */
+
+
84void gf_draw_frame(gf_draw_t* draw) {
+ +
86 color.r = color.g = color.b = color.a = 255;
+
87 if(button == -1) {
+
88 button = gf_gui_create_button(draw->gui, 0, 0, 200, 100, "\"Test\" text");
+
89 }
+
90 if(draw->draw_3d) {
+
91 gf_graphic_draw_texture_polygon(draw, test_texture, color, GF_GRAPHIC_3D, 4,
+
92 /* clang-format off */
+
93 0.0, 0.0,
+
94 -1.0, 0.0, -1.0,
+
95
+
96 0.0, 4.0,
+
97 -1.0, 0.0, 1.0,
+
98
+
99 4.0, 4.0,
+
100 1.0, 0.0, 1.0,
+
101
+
102 4.0, 0.0,
+
103 1.0, 0.0, -1.0
+
104 /* clang-format on */
+
105 );
+
106 }
+
107 gf_gui_render(draw->gui);
+
108}
-
111
-
-
112int gf_draw_step(gf_draw_t* draw) {
-
113 int ret = gf_draw_platform_step(draw);
-
114 if(ret != 0) return ret;
-
115 draw->close = 0;
-
116
-
117 return 0;
-
118}
+
109
+
+
110int gf_draw_step(gf_draw_t* draw) {
+
111 int ret = gf_draw_platform_step(draw);
+
112 if(ret != 0) return ret;
+
113 draw->close = 0;
+
114
+
115 return 0;
+
116}
-
119
-
-
120void gf_draw_destroy(gf_draw_t* draw) {
-
121 if(draw->driver != NULL) gf_draw_driver_destroy(draw->driver);
-
122 if(draw->platform != NULL) gf_draw_platform_destroy(draw->platform);
-
123 gf_log_function(draw->engine, "Destroyed drawing interface", "");
-
124 free(draw);
-
125}
+
117
+
+
118void gf_draw_destroy(gf_draw_t* draw) {
+
119 if(draw->driver != NULL) gf_draw_driver_destroy(draw->driver);
+
120 if(draw->platform != NULL) gf_draw_platform_destroy(draw->platform);
+
121 gf_log_function(draw->engine, "Destroyed drawing interface", "");
+
122 free(draw);
+
123}
Drawing interface.