Skip to content

Commit a8fa8bb

Browse files
committed
format
1 parent 7850d06 commit a8fa8bb

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

engine/include/gf_gui_static.h

+16-16
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
* @~english
3232
* @brief Initialize GUI component calls
3333
*/
34-
static void gf_gui_init_calls(void){
34+
static void gf_gui_init_calls(void) {
3535
extern gf_gui_call_t gf_gui_calls[4];
3636
/*** Begin button ***/
3737
gf_gui_calls[0].name = malloc(512);
@@ -60,11 +60,11 @@ static void gf_gui_init_calls(void){
6060
* @param gui GUI
6161
* @param c Component
6262
*/
63-
static void gf_gui_all_render(gf_gui_t* gui, gf_gui_component_t* c){
64-
extern void gf_gui_button_render(gf_gui_t* gui, gf_gui_component_t* c);
65-
extern void gf_gui_frame_render(gf_gui_t* gui, gf_gui_component_t* c);
66-
extern void gf_gui_text_render(gf_gui_t* gui, gf_gui_component_t* c);
67-
extern void gf_gui_window_render(gf_gui_t* gui, gf_gui_component_t* c);
63+
static void gf_gui_all_render(gf_gui_t* gui, gf_gui_component_t* c) {
64+
extern void gf_gui_button_render(gf_gui_t * gui, gf_gui_component_t * c);
65+
extern void gf_gui_frame_render(gf_gui_t * gui, gf_gui_component_t * c);
66+
extern void gf_gui_text_render(gf_gui_t * gui, gf_gui_component_t * c);
67+
extern void gf_gui_window_render(gf_gui_t * gui, gf_gui_component_t * c);
6868
gf_gui_button_render(gui, c);
6969
gf_gui_frame_render(gui, c);
7070
gf_gui_text_render(gui, c);
@@ -77,11 +77,11 @@ static void gf_gui_all_render(gf_gui_t* gui, gf_gui_component_t* c){
7777
* @param gui GUI
7878
* @param c Component
7979
*/
80-
static void gf_gui_all_drag(gf_gui_t* gui, gf_gui_component_t* c){
81-
extern void gf_gui_button_drag(gf_gui_t* gui, gf_gui_component_t* c);
82-
extern void gf_gui_frame_drag(gf_gui_t* gui, gf_gui_component_t* c);
83-
extern void gf_gui_text_drag(gf_gui_t* gui, gf_gui_component_t* c);
84-
extern void gf_gui_window_drag(gf_gui_t* gui, gf_gui_component_t* c);
80+
static void gf_gui_all_drag(gf_gui_t* gui, gf_gui_component_t* c) {
81+
extern void gf_gui_button_drag(gf_gui_t * gui, gf_gui_component_t * c);
82+
extern void gf_gui_frame_drag(gf_gui_t * gui, gf_gui_component_t * c);
83+
extern void gf_gui_text_drag(gf_gui_t * gui, gf_gui_component_t * c);
84+
extern void gf_gui_window_drag(gf_gui_t * gui, gf_gui_component_t * c);
8585
gf_gui_button_drag(gui, c);
8686
gf_gui_frame_drag(gui, c);
8787
gf_gui_text_drag(gui, c);
@@ -94,11 +94,11 @@ static void gf_gui_all_drag(gf_gui_t* gui, gf_gui_component_t* c){
9494
* @param gui GUI
9595
* @param c Component
9696
*/
97-
static void gf_gui_all_click(gf_gui_t* gui, gf_gui_component_t* c){
98-
extern void gf_gui_button_click(gf_gui_t* gui, gf_gui_component_t* c);
99-
extern void gf_gui_frame_click(gf_gui_t* gui, gf_gui_component_t* c);
100-
extern void gf_gui_text_click(gf_gui_t* gui, gf_gui_component_t* c);
101-
extern void gf_gui_window_click(gf_gui_t* gui, gf_gui_component_t* c);
97+
static void gf_gui_all_click(gf_gui_t* gui, gf_gui_component_t* c) {
98+
extern void gf_gui_button_click(gf_gui_t * gui, gf_gui_component_t * c);
99+
extern void gf_gui_frame_click(gf_gui_t * gui, gf_gui_component_t * c);
100+
extern void gf_gui_text_click(gf_gui_t * gui, gf_gui_component_t * c);
101+
extern void gf_gui_window_click(gf_gui_t * gui, gf_gui_component_t * c);
102102
gf_gui_button_click(gui, c);
103103
gf_gui_frame_click(gui, c);
104104
gf_gui_text_click(gui, c);

engine/src/gf_draw_common.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ int gf_draw_step(gf_draw_t* draw) {
135135
draw->close = 0;
136136
gf_lua_close(draw->engine->lua);
137137
}
138-
if(draw->fps == -1){
138+
if(draw->fps == -1) {
139139
draw->fps = 0;
140-
}else{
141-
double sfps = 60;
140+
} else {
141+
double sfps = 60;
142142
gf_draw_time_t t;
143143

144-
do{
144+
do {
145145
gf_draw_time(&t);
146-
}while((gf_draw_time_number(&t) - gf_draw_time_number(&draw->last_draw)) < 1.0 / sfps);
146+
} while((gf_draw_time_number(&t) - gf_draw_time_number(&draw->last_draw)) < 1.0 / sfps);
147147
}
148148

149149
return draw->close;

engine/src/gf_gui.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void gf_gui_render(gf_gui_t* gui) {
241241
gf_graphic_clip_pop(gui->draw);
242242
if(!ignore_mouse && input->mouse_x != -1 && input->mouse_y != -1 && gui->pressed == -1 && (input->mouse_flag & GF_INPUT_MOUSE_LEFT_MASK) && (cx <= input->mouse_x && input->mouse_x <= cx + cw) && (cy <= input->mouse_y && input->mouse_y <= cy + ch)) {
243243
gui->pressed = c->key;
244-
gui->hover = c->key;
244+
gui->hover = c->key;
245245
gf_prop_set_integer(&c->prop, "clicked-x", input->mouse_x);
246246
gf_prop_set_integer(&c->prop, "clicked-y", input->mouse_y);
247247
gf_prop_set_integer(&c->prop, "diff-x", input->mouse_x - cx);

engine/src/graphic/opengl/gdi/gf_draw.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp
122122

123123
int gf_draw_platform_has_extension(gf_draw_t* draw, const char* query) {
124124
#if defined(TYPE_NATIVE)
125-
const char* ext = NULL;
125+
const char* ext = NULL;
126126
const char* ptr;
127127
PFNWGLGETEXTENSIONSSTRINGARB proc;
128128
#endif
@@ -174,13 +174,13 @@ int gf_draw_platform_step(gf_draw_t* draw) {
174174
}
175175

176176
gf_draw_platform_t* gf_draw_platform_create(gf_engine_t* engine, gf_draw_t* draw) {
177-
WNDCLASSEX wc;
177+
WNDCLASSEX wc;
178178
#ifdef DO_SWAP_INTERVAL
179179
PFNWGLSWAPINTERVALPROC wglSwapIntervalEXT;
180180
#endif
181181
#if defined(TYPE_NATIVE)
182182
PIXELFORMATDESCRIPTOR desc;
183-
int fmt;
183+
int fmt;
184184
#endif
185185
RECT rect;
186186
DWORD style;

0 commit comments

Comments
 (0)