From 432602c4ca5d47aee91d25271fa57ad0f6d67250 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 30 Aug 2008 21:31:01 +0000 Subject: renamed gc_ui.* to ui.* --- src/game/client/components/console.cpp | 2 +- src/game/client/components/damageind.cpp | 2 +- src/game/client/components/emoticon.cpp | 2 +- src/game/client/components/items.cpp | 2 +- src/game/client/components/menus.cpp | 2 +- src/game/client/components/menus.hpp | 2 +- src/game/client/components/menus_browser.cpp | 2 +- src/game/client/components/menus_settings.cpp | 2 +- src/game/client/components/players.cpp | 2 +- src/game/client/gc_render.hpp | 2 +- src/game/client/gc_ui.cpp | 297 -------------------------- src/game/client/gc_ui.hpp | 65 ------ src/game/client/ui.cpp | 297 ++++++++++++++++++++++++++ src/game/client/ui.hpp | 65 ++++++ src/game/editor/ed_editor.cpp | 2 +- src/game/editor/ed_editor.hpp | 2 +- src/game/server/hooks.cpp | 1 - 17 files changed, 374 insertions(+), 375 deletions(-) delete mode 100644 src/game/client/gc_ui.cpp delete mode 100644 src/game/client/gc_ui.hpp create mode 100644 src/game/client/ui.cpp create mode 100644 src/game/client/ui.hpp (limited to 'src') diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index 9b5161a0..fe2ecfa5 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -15,7 +15,7 @@ extern "C" { #include #include -#include +#include #include diff --git a/src/game/client/components/damageind.cpp b/src/game/client/components/damageind.cpp index 15ca4b18..f6176346 100644 --- a/src/game/client/components/damageind.cpp +++ b/src/game/client/components/damageind.cpp @@ -3,7 +3,7 @@ #include #include // get_angle -#include +#include #include #include "damageind.hpp" diff --git a/src/game/client/components/emoticon.cpp b/src/game/client/components/emoticon.cpp index 75859f60..bed050dd 100644 --- a/src/game/client/components/emoticon.cpp +++ b/src/game/client/components/emoticon.cpp @@ -4,7 +4,7 @@ #include // get_angle #include -#include +#include #include #include "emoticon.hpp" diff --git a/src/game/client/components/items.cpp b/src/game/client/components/items.cpp index 940c39fd..43ad3319 100644 --- a/src/game/client/components/items.cpp +++ b/src/game/client/components/items.cpp @@ -4,7 +4,7 @@ #include // get_angle #include -#include +#include #include #include diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 4893d0ea..4284f84c 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -25,7 +25,7 @@ extern "C" { #include #include #include -#include +#include #include vec4 MENUS::gui_color; diff --git a/src/game/client/components/menus.hpp b/src/game/client/components/menus.hpp index 6caaa479..71128498 100644 --- a/src/game/client/components/menus.hpp +++ b/src/game/client/components/menus.hpp @@ -1,7 +1,7 @@ #include #include -#include +#include class MENUS : public COMPONENT { diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index fae6df5b..e2e1ae9e 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -11,7 +11,7 @@ extern "C" { #include #include -#include +#include #include #include "menus.hpp" diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index f031c20f..95a097c2 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -13,7 +13,7 @@ extern "C" { #include #include -#include +#include #include #include #include diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 1d4452d4..f2d81323 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -5,7 +5,7 @@ #include // get_angle #include #include -#include +#include #include #include diff --git a/src/game/client/gc_render.hpp b/src/game/client/gc_render.hpp index ae2b7097..280f0532 100644 --- a/src/game/client/gc_render.hpp +++ b/src/game/client/gc_render.hpp @@ -5,7 +5,7 @@ #include #include "../mapitems.hpp" -#include "gc_ui.hpp" +#include "ui.hpp" struct TEE_RENDER_INFO { diff --git a/src/game/client/gc_ui.cpp b/src/game/client/gc_ui.cpp deleted file mode 100644 index e873cc86..00000000 --- a/src/game/client/gc_ui.cpp +++ /dev/null @@ -1,297 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -#include - -#include -#include -#include "gc_ui.hpp" - -/******************************************************** - UI -*********************************************************/ -static const void *hot_item = 0; -static const void *active_item = 0; -static const void *last_active_item = 0; -static const void *becomming_hot_item = 0; -static float mouse_x, mouse_y; /* in gui space */ -static float mouse_wx, mouse_wy; /* in world space */ -static unsigned mouse_buttons = 0; -static unsigned last_mouse_buttons = 0; - -float ui_mouse_x() { return mouse_x; } -float ui_mouse_y() { return mouse_y; } -float ui_mouse_world_x() { return mouse_wx; } -float ui_mouse_world_y() { return mouse_wy; } -int ui_mouse_button(int index) { return (mouse_buttons>>index)&1; } -int ui_mouse_button_clicked(int index) { return ui_mouse_button(index) && !((last_mouse_buttons>>index)&1) ; } - -void ui_set_hot_item(const void *id) { becomming_hot_item = id; } -void ui_set_active_item(const void *id) { active_item = id; if (id) last_active_item = id; } -void ui_clear_last_active_item() { last_active_item = 0; } -const void *ui_hot_item() { return hot_item; } -const void *ui_next_hot_item() { return becomming_hot_item; } -const void *ui_active_item() { return active_item; } -const void *ui_last_active_item() { return last_active_item; } - -int ui_update(float mx, float my, float mwx, float mwy, int buttons) -{ - mouse_x = mx; - mouse_y = my; - mouse_wx = mwx; - mouse_wy = mwy; - last_mouse_buttons = mouse_buttons; - mouse_buttons = buttons; - hot_item = becomming_hot_item; - if(active_item) - hot_item = active_item; - becomming_hot_item = 0; - return 0; -} -/* -bool ui_ -*/ -int ui_mouse_inside(const RECT *r) -{ - if(mouse_x >= r->x && mouse_x <= r->x+r->w && mouse_y >= r->y && mouse_y <= r->y+r->h) - return 1; - return 0; -} - -static RECT screen = { 0.0f, 0.0f, 848.0f, 480.0f }; - -RECT *ui_screen() -{ - float aspect = gfx_screenaspect(); - float w, h; - - h = 600; - w = aspect*h; - - screen.w = w; - screen.h = h; - - return &screen; -} - -void ui_set_scale(float s) -{ - config.ui_scale = (int)(s*100.0f); -} - -float ui_scale() -{ - return config.ui_scale/100.0f; -} - -void ui_clip_enable(const RECT *r) -{ - float xscale = gfx_screenwidth()/ui_screen()->w; - float yscale = gfx_screenheight()/ui_screen()->h; - gfx_clip_enable((int)(r->x*xscale), (int)(r->y*yscale), (int)(r->w*xscale), (int)(r->h*yscale)); -} - -void ui_clip_disable() -{ - gfx_clip_disable(); -} - -void ui_hsplit_t(const RECT *original, float cut, RECT *top, RECT *bottom) -{ - RECT r = *original; - cut *= ui_scale(); - - if (top) - { - top->x = r.x; - top->y = r.y; - top->w = r.w; - top->h = cut; - } - - if (bottom) - { - bottom->x = r.x; - bottom->y = r.y + cut; - bottom->w = r.w; - bottom->h = r.h - cut; - } -} - -void ui_hsplit_b(const RECT *original, float cut, RECT *top, RECT *bottom) -{ - RECT r = *original; - cut *= ui_scale(); - - if (top) - { - top->x = r.x; - top->y = r.y; - top->w = r.w; - top->h = r.h - cut; - } - - if (bottom) - { - bottom->x = r.x; - bottom->y = r.y + r.h - cut; - bottom->w = r.w; - bottom->h = cut; - } -} - - -void ui_vsplit_mid(const RECT *original, RECT *left, RECT *right) -{ - RECT r = *original; - float cut = r.w/2; - - if (left) - { - left->x = r.x; - left->y = r.y; - left->w = cut; - left->h = r.h; - } - - if (right) - { - right->x = r.x + cut; - right->y = r.y; - right->w = r.w - cut; - right->h = r.h; - } -} - -void ui_vsplit_l(const RECT *original, float cut, RECT *left, RECT *right) -{ - RECT r = *original; - cut *= ui_scale(); - - if (left) - { - left->x = r.x; - left->y = r.y; - left->w = cut; - left->h = r.h; - } - - if (right) - { - right->x = r.x + cut; - right->y = r.y; - right->w = r.w - cut; - right->h = r.h; - } -} - -void ui_vsplit_r(const RECT *original, float cut, RECT *left, RECT *right) -{ - RECT r = *original; - cut *= ui_scale(); - - if (left) - { - left->x = r.x; - left->y = r.y; - left->w = r.w - cut; - left->h = r.h; - } - - if (right) - { - right->x = r.x + r.w - cut; - right->y = r.y; - right->w = cut; - right->h = r.h; - } -} - -void ui_margin(const RECT *original, float cut, RECT *other_rect) -{ - RECT r = *original; - cut *= ui_scale(); - - other_rect->x = r.x + cut; - other_rect->y = r.y + cut; - other_rect->w = r.w - 2*cut; - other_rect->h = r.h - 2*cut; -} - -void ui_vmargin(const RECT *original, float cut, RECT *other_rect) -{ - RECT r = *original; - cut *= ui_scale(); - - other_rect->x = r.x + cut; - other_rect->y = r.y; - other_rect->w = r.w - 2*cut; - other_rect->h = r.h; -} - -void ui_hmargin(const RECT *original, float cut, RECT *other_rect) -{ - RECT r = *original; - cut *= ui_scale(); - - other_rect->x = r.x; - other_rect->y = r.y + cut; - other_rect->w = r.w; - other_rect->h = r.h - 2*cut; -} - - -int ui_do_button(const void *id, const char *text, int checked, const RECT *r, ui_draw_button_func draw_func, const void *extra) -{ - /* logic */ - int ret = 0; - int inside = ui_mouse_inside(r); - static int button_used = 0; - - if(ui_active_item() == id) - { - if(!ui_mouse_button(button_used)) - { - if(inside && checked >= 0) - ret = 1+button_used; - ui_set_active_item(0); - } - } - else if(ui_hot_item() == id) - { - if(ui_mouse_button(0)) - { - ui_set_active_item(id); - button_used = 0; - } - - if(ui_mouse_button(1)) - { - ui_set_active_item(id); - button_used = 1; - } - } - - if(inside) - ui_set_hot_item(id); - - if(draw_func) - draw_func(id, text, checked, r, extra); - return ret; -} - -void ui_do_label(const RECT *r, const char *text, float size, int align, int max_width) -{ - gfx_blend_normal(); - size *= ui_scale(); - if(align == 0) - { - float tw = gfx_text_width(0, size, text, max_width); - gfx_text(0, r->x + r->w/2-tw/2, r->y, size, text, max_width); - } - else if(align < 0) - gfx_text(0, r->x, r->y, size, text, max_width); - else if(align > 0) - { - float tw = gfx_text_width(0, size, text, max_width); - gfx_text(0, r->x + r->w-tw, r->y, size, text, max_width); - } -} diff --git a/src/game/client/gc_ui.hpp b/src/game/client/gc_ui.hpp deleted file mode 100644 index 26c4dcdb..00000000 --- a/src/game/client/gc_ui.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ -#ifndef _UI_H -#define _UI_H - -typedef struct -{ - float x, y, w, h; -} RECT; - -enum -{ - CORNER_TL=1, - CORNER_TR=2, - CORNER_BL=4, - CORNER_BR=8, - - CORNER_T=CORNER_TL|CORNER_TR, - CORNER_B=CORNER_BL|CORNER_BR, - CORNER_R=CORNER_TR|CORNER_BR, - CORNER_L=CORNER_TL|CORNER_BL, - - CORNER_ALL=CORNER_T|CORNER_B -}; - -int ui_update(float mx, float my, float mwx, float mwy, int buttons); - -float ui_mouse_x(); -float ui_mouse_y(); -float ui_mouse_world_x(); -float ui_mouse_world_y(); -int ui_mouse_button(int index); -int ui_mouse_button_clicked(int index); - -void ui_set_hot_item(const void *id); -void ui_set_active_item(const void *id); -void ui_clear_last_active_item(); -const void *ui_hot_item(); -const void *ui_next_hot_item(); -const void *ui_active_item(); -const void *ui_last_active_item(); - -int ui_mouse_inside(const RECT *r); - -RECT *ui_screen(); -void ui_set_scale(float s); -float ui_scale(); -void ui_clip_enable(const RECT *r); -void ui_clip_disable(); - -void ui_hsplit_t(const RECT *original, float cut, RECT *top, RECT *bottom); -void ui_hsplit_b(const RECT *original, float cut, RECT *top, RECT *bottom); -void ui_vsplit_mid(const RECT *original, RECT *left, RECT *right); -void ui_vsplit_l(const RECT *original, float cut, RECT *left, RECT *right); -void ui_vsplit_r(const RECT *original, float cut, RECT *left, RECT *right); - -void ui_margin(const RECT *original, float cut, RECT *other_rect); -void ui_vmargin(const RECT *original, float cut, RECT *other_rect); -void ui_hmargin(const RECT *original, float cut, RECT *other_rect); - -typedef void (*ui_draw_button_func)(const void *id, const char *text, int checked, const RECT *r, const void *extra); -int ui_do_button(const void *id, const char *text, int checked, const RECT *r, ui_draw_button_func draw_func, const void *extra); -void ui_do_label(const RECT *r, const char *text, float size, int align, int max_width = -1); - - -#endif diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp new file mode 100644 index 00000000..1361b85c --- /dev/null +++ b/src/game/client/ui.cpp @@ -0,0 +1,297 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ +#include + +#include +#include +#include "ui.hpp" + +/******************************************************** + UI +*********************************************************/ +static const void *hot_item = 0; +static const void *active_item = 0; +static const void *last_active_item = 0; +static const void *becomming_hot_item = 0; +static float mouse_x, mouse_y; /* in gui space */ +static float mouse_wx, mouse_wy; /* in world space */ +static unsigned mouse_buttons = 0; +static unsigned last_mouse_buttons = 0; + +float ui_mouse_x() { return mouse_x; } +float ui_mouse_y() { return mouse_y; } +float ui_mouse_world_x() { return mouse_wx; } +float ui_mouse_world_y() { return mouse_wy; } +int ui_mouse_button(int index) { return (mouse_buttons>>index)&1; } +int ui_mouse_button_clicked(int index) { return ui_mouse_button(index) && !((last_mouse_buttons>>index)&1) ; } + +void ui_set_hot_item(const void *id) { becomming_hot_item = id; } +void ui_set_active_item(const void *id) { active_item = id; if (id) last_active_item = id; } +void ui_clear_last_active_item() { last_active_item = 0; } +const void *ui_hot_item() { return hot_item; } +const void *ui_next_hot_item() { return becomming_hot_item; } +const void *ui_active_item() { return active_item; } +const void *ui_last_active_item() { return last_active_item; } + +int ui_update(float mx, float my, float mwx, float mwy, int buttons) +{ + mouse_x = mx; + mouse_y = my; + mouse_wx = mwx; + mouse_wy = mwy; + last_mouse_buttons = mouse_buttons; + mouse_buttons = buttons; + hot_item = becomming_hot_item; + if(active_item) + hot_item = active_item; + becomming_hot_item = 0; + return 0; +} +/* +bool ui_ +*/ +int ui_mouse_inside(const RECT *r) +{ + if(mouse_x >= r->x && mouse_x <= r->x+r->w && mouse_y >= r->y && mouse_y <= r->y+r->h) + return 1; + return 0; +} + +static RECT screen = { 0.0f, 0.0f, 848.0f, 480.0f }; + +RECT *ui_screen() +{ + float aspect = gfx_screenaspect(); + float w, h; + + h = 600; + w = aspect*h; + + screen.w = w; + screen.h = h; + + return &screen; +} + +void ui_set_scale(float s) +{ + config.ui_scale = (int)(s*100.0f); +} + +float ui_scale() +{ + return config.ui_scale/100.0f; +} + +void ui_clip_enable(const RECT *r) +{ + float xscale = gfx_screenwidth()/ui_screen()->w; + float yscale = gfx_screenheight()/ui_screen()->h; + gfx_clip_enable((int)(r->x*xscale), (int)(r->y*yscale), (int)(r->w*xscale), (int)(r->h*yscale)); +} + +void ui_clip_disable() +{ + gfx_clip_disable(); +} + +void ui_hsplit_t(const RECT *original, float cut, RECT *top, RECT *bottom) +{ + RECT r = *original; + cut *= ui_scale(); + + if (top) + { + top->x = r.x; + top->y = r.y; + top->w = r.w; + top->h = cut; + } + + if (bottom) + { + bottom->x = r.x; + bottom->y = r.y + cut; + bottom->w = r.w; + bottom->h = r.h - cut; + } +} + +void ui_hsplit_b(const RECT *original, float cut, RECT *top, RECT *bottom) +{ + RECT r = *original; + cut *= ui_scale(); + + if (top) + { + top->x = r.x; + top->y = r.y; + top->w = r.w; + top->h = r.h - cut; + } + + if (bottom) + { + bottom->x = r.x; + bottom->y = r.y + r.h - cut; + bottom->w = r.w; + bottom->h = cut; + } +} + + +void ui_vsplit_mid(const RECT *original, RECT *left, RECT *right) +{ + RECT r = *original; + float cut = r.w/2; + + if (left) + { + left->x = r.x; + left->y = r.y; + left->w = cut; + left->h = r.h; + } + + if (right) + { + right->x = r.x + cut; + right->y = r.y; + right->w = r.w - cut; + right->h = r.h; + } +} + +void ui_vsplit_l(const RECT *original, float cut, RECT *left, RECT *right) +{ + RECT r = *original; + cut *= ui_scale(); + + if (left) + { + left->x = r.x; + left->y = r.y; + left->w = cut; + left->h = r.h; + } + + if (right) + { + right->x = r.x + cut; + right->y = r.y; + right->w = r.w - cut; + right->h = r.h; + } +} + +void ui_vsplit_r(const RECT *original, float cut, RECT *left, RECT *right) +{ + RECT r = *original; + cut *= ui_scale(); + + if (left) + { + left->x = r.x; + left->y = r.y; + left->w = r.w - cut; + left->h = r.h; + } + + if (right) + { + right->x = r.x + r.w - cut; + right->y = r.y; + right->w = cut; + right->h = r.h; + } +} + +void ui_margin(const RECT *original, float cut, RECT *other_rect) +{ + RECT r = *original; + cut *= ui_scale(); + + other_rect->x = r.x + cut; + other_rect->y = r.y + cut; + other_rect->w = r.w - 2*cut; + other_rect->h = r.h - 2*cut; +} + +void ui_vmargin(const RECT *original, float cut, RECT *other_rect) +{ + RECT r = *original; + cut *= ui_scale(); + + other_rect->x = r.x + cut; + other_rect->y = r.y; + other_rect->w = r.w - 2*cut; + other_rect->h = r.h; +} + +void ui_hmargin(const RECT *original, float cut, RECT *other_rect) +{ + RECT r = *original; + cut *= ui_scale(); + + other_rect->x = r.x; + other_rect->y = r.y + cut; + other_rect->w = r.w; + other_rect->h = r.h - 2*cut; +} + + +int ui_do_button(const void *id, const char *text, int checked, const RECT *r, ui_draw_button_func draw_func, const void *extra) +{ + /* logic */ + int ret = 0; + int inside = ui_mouse_inside(r); + static int button_used = 0; + + if(ui_active_item() == id) + { + if(!ui_mouse_button(button_used)) + { + if(inside && checked >= 0) + ret = 1+button_used; + ui_set_active_item(0); + } + } + else if(ui_hot_item() == id) + { + if(ui_mouse_button(0)) + { + ui_set_active_item(id); + button_used = 0; + } + + if(ui_mouse_button(1)) + { + ui_set_active_item(id); + button_used = 1; + } + } + + if(inside) + ui_set_hot_item(id); + + if(draw_func) + draw_func(id, text, checked, r, extra); + return ret; +} + +void ui_do_label(const RECT *r, const char *text, float size, int align, int max_width) +{ + gfx_blend_normal(); + size *= ui_scale(); + if(align == 0) + { + float tw = gfx_text_width(0, size, text, max_width); + gfx_text(0, r->x + r->w/2-tw/2, r->y, size, text, max_width); + } + else if(align < 0) + gfx_text(0, r->x, r->y, size, text, max_width); + else if(align > 0) + { + float tw = gfx_text_width(0, size, text, max_width); + gfx_text(0, r->x + r->w-tw, r->y, size, text, max_width); + } +} diff --git a/src/game/client/ui.hpp b/src/game/client/ui.hpp new file mode 100644 index 00000000..7a6cb5de --- /dev/null +++ b/src/game/client/ui.hpp @@ -0,0 +1,65 @@ +/* copyright (c) 2007 magnus auvinen, see licence.txt for more info */ +#ifndef FILE_GAME_CLIENT_UI_H +#define FILE_GAME_CLIENT_UI_H + +typedef struct +{ + float x, y, w, h; +} RECT; + +enum +{ + CORNER_TL=1, + CORNER_TR=2, + CORNER_BL=4, + CORNER_BR=8, + + CORNER_T=CORNER_TL|CORNER_TR, + CORNER_B=CORNER_BL|CORNER_BR, + CORNER_R=CORNER_TR|CORNER_BR, + CORNER_L=CORNER_TL|CORNER_BL, + + CORNER_ALL=CORNER_T|CORNER_B +}; + +int ui_update(float mx, float my, float mwx, float mwy, int buttons); + +float ui_mouse_x(); +float ui_mouse_y(); +float ui_mouse_world_x(); +float ui_mouse_world_y(); +int ui_mouse_button(int index); +int ui_mouse_button_clicked(int index); + +void ui_set_hot_item(const void *id); +void ui_set_active_item(const void *id); +void ui_clear_last_active_item(); +const void *ui_hot_item(); +const void *ui_next_hot_item(); +const void *ui_active_item(); +const void *ui_last_active_item(); + +int ui_mouse_inside(const RECT *r); + +RECT *ui_screen(); +void ui_set_scale(float s); +float ui_scale(); +void ui_clip_enable(const RECT *r); +void ui_clip_disable(); + +void ui_hsplit_t(const RECT *original, float cut, RECT *top, RECT *bottom); +void ui_hsplit_b(const RECT *original, float cut, RECT *top, RECT *bottom); +void ui_vsplit_mid(const RECT *original, RECT *left, RECT *right); +void ui_vsplit_l(const RECT *original, float cut, RECT *left, RECT *right); +void ui_vsplit_r(const RECT *original, float cut, RECT *left, RECT *right); + +void ui_margin(const RECT *original, float cut, RECT *other_rect); +void ui_vmargin(const RECT *original, float cut, RECT *other_rect); +void ui_hmargin(const RECT *original, float cut, RECT *other_rect); + +typedef void (*ui_draw_button_func)(const void *id, const char *text, int checked, const RECT *r, const void *extra); +int ui_do_button(const void *id, const char *text, int checked, const RECT *r, ui_draw_button_func draw_func, const void *extra); +void ui_do_label(const RECT *r, const char *text, float size, int align, int max_width = -1); + + +#endif diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 9b5c7f9e..940472ce 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -13,7 +13,7 @@ extern "C" { } #include -#include +#include #include #include diff --git a/src/game/editor/ed_editor.hpp b/src/game/editor/ed_editor.hpp index e32b5cb7..f9527f33 100644 --- a/src/game/editor/ed_editor.hpp +++ b/src/game/editor/ed_editor.hpp @@ -15,7 +15,7 @@ extern "C" { #include } -#include +#include typedef void (*INDEX_MODIFY_FUNC)(int *index); diff --git a/src/game/server/hooks.cpp b/src/game/server/hooks.cpp index 485c7850..dd2d9db9 100644 --- a/src/game/server/hooks.cpp +++ b/src/game/server/hooks.cpp @@ -11,7 +11,6 @@ #include #include - #include #include "gamecontext.hpp" -- cgit 1.4.1