From ddeb2b5ac0bc938aacb7f4f008e22a437d892d6e Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 25 May 2016 18:45:35 -0500 Subject: [PATCH] organize nuklear files in their own subfolder --- Makefile.common | 4 ++-- griffin/griffin.c | 4 ++-- menu/drivers/nuklear.c | 2 +- menu/drivers/{ => nuklear}/nk_common.c | 10 +++++----- menu/drivers/{ => nuklear}/nk_common.h | 6 +++--- menu/drivers/{ => nuklear}/nk_menu.c | 22 +++++++++++----------- menu/drivers/{ => nuklear}/nk_menu.h | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) rename menu/drivers/{ => nuklear}/nk_common.c (97%) rename menu/drivers/{ => nuklear}/nk_common.h (91%) rename menu/drivers/{ => nuklear}/nk_menu.c (87%) rename menu/drivers/{ => nuklear}/nk_menu.h (93%) diff --git a/Makefile.common b/Makefile.common index 960cdcf767..a4e0dd0bee 100644 --- a/Makefile.common +++ b/Makefile.common @@ -421,8 +421,8 @@ ifeq ($(HAVE_MATERIALUI), 1) DEFINES += -DHAVE_MATERIALUI endif ifeq ($(HAVE_NUKLEAR), 1) - OBJ += menu/drivers/nk_common.o - OBJ += menu/drivers/nk_menu.o + OBJ += menu/drivers/nuklear/nk_common.o + OBJ += menu/drivers/nuklear/nk_menu.o OBJ += menu/drivers/nuklear.o DEFINES += -DHAVE_NUKLEAR endif diff --git a/griffin/griffin.c b/griffin/griffin.c index a96ce1b2cc..4989bb4c58 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -915,8 +915,8 @@ MENU #endif #ifdef HAVE_NUKLEAR -#include "../menu/drivers/nk_common.c" -#include "../menu/drivers/nk_menu.c" +#include "../menu/drivers/nuklear/nk_common.c" +#include "../menu/drivers/nuklear/nk_menu.c" #include "../menu/drivers/nuklear.c" #endif diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 8354691d1d..181a5698b4 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -32,7 +32,7 @@ #include #include "menu_generic.h" -#include "nk_menu.h" +#include "nuklear/nk_menu.h" #include "../menu_driver.h" #include "../menu_animation.h" diff --git a/menu/drivers/nk_common.c b/menu/drivers/nuklear/nk_common.c similarity index 97% rename from menu/drivers/nk_common.c rename to menu/drivers/nuklear/nk_common.c index abae5095f0..ea6d0b5388 100644 --- a/menu/drivers/nk_common.c +++ b/menu/drivers/nuklear/nk_common.c @@ -27,11 +27,11 @@ #include "nk_common.h" -#include "../menu_display.h" -#include "../../gfx/video_shader_driver.h" +#include "../../menu_display.h" +#include "../../../gfx/video_shader_driver.h" -#include "../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h" -#include "../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h" +#include "../../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.vert.h" +#include "../../../gfx/drivers/gl_shaders/pipeline_nuklear.glsl.frag.h" struct nk_font *font; struct nk_font_atlas atlas; @@ -69,7 +69,7 @@ char* nk_common_file_load(const char* path, size_t* size) return (char*)buf; } -NK_API void nk_common_device_init(struct nk_device *dev) +void nk_common_device_init(struct nk_device *dev) { #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) GLint status; diff --git a/menu/drivers/nk_common.h b/menu/drivers/nuklear/nk_common.h similarity index 91% rename from menu/drivers/nk_common.h rename to menu/drivers/nuklear/nk_common.h index 67b678facd..cc3f698732 100644 --- a/menu/drivers/nk_common.h +++ b/menu/drivers/nuklear/nk_common.h @@ -23,11 +23,11 @@ #define NK_INCLUDE_DEFAULT_FONT #include -#include "../../deps/nuklear/nuklear.h" -#include "../../deps/stb/stb_image.h" +#include "../../../deps/nuklear/nuklear.h" +#include "../../../deps/stb/stb_image.h" #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) -#include "../../gfx/common/gl_common.h" +#include "../../../gfx/common/gl_common.h" #endif #define MAX_VERTEX_MEMORY (512 * 1024) diff --git a/menu/drivers/nk_menu.c b/menu/drivers/nuklear/nk_menu.c similarity index 87% rename from menu/drivers/nk_menu.c rename to menu/drivers/nuklear/nk_menu.c index eab809cd52..a12ecd9545 100644 --- a/menu/drivers/nk_menu.c +++ b/menu/drivers/nuklear/nk_menu.c @@ -28,26 +28,26 @@ #include #include -#include "../menu_driver.h" -#include "../menu_hash.h" +#include "../../menu_driver.h" +#include "../../menu_hash.h" -#include "../../gfx/common/gl_common.h" -#include "../../core_info.h" -#include "../../configuration.h" -#include "../../retroarch.h" +#include "../../../gfx/common/gl_common.h" +#include "../../../core_info.h" +#include "../../../configuration.h" +#include "../../../retroarch.h" #define LEN(a) (sizeof(a)/sizeof(a)[0]) -void nk_menu_set_state(nk_menu_handle_t *zr, const int id, +void nk_menu_wnd_set_state(nk_menu_handle_t *zr, const int id, struct nk_vec2 pos, struct nk_vec2 size) { zr->window[id].position = pos; zr->window[id].size = size; } -void nk_menu_get_state(nk_menu_handle_t *zr, const int id, +void nk_menu_wnd_get_state(nk_menu_handle_t *zr, const int id, struct nk_vec2 *pos, struct nk_vec2 *size) { *pos = zr->window[id].position; @@ -97,7 +97,7 @@ void nk_menu_wnd_shader_parameters(nk_menu_handle_t *zr) } } /* save position and size to restore after context reset */ - nk_menu_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); + nk_menu_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); nk_end(ctx); } @@ -138,7 +138,7 @@ void nk_menu_wnd_test(nk_menu_handle_t *zr) size = menu_entries_get_size(); } /* save position and size to restore after context reset */ - nk_menu_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); + nk_menu_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); nk_end(ctx); } @@ -168,7 +168,7 @@ void nk_menu_wnd_main(nk_menu_handle_t *zr) /* save position and size to restore after context reset */ - nk_menu_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); + nk_menu_wnd_set_state(zr, id, nk_window_get_position(ctx), nk_window_get_size(ctx)); if (zr->size_changed) nk_window_set_size(ctx, nk_vec2(nk_window_get_size(ctx).x, zr->size.y)); diff --git a/menu/drivers/nk_menu.h b/menu/drivers/nuklear/nk_menu.h similarity index 93% rename from menu/drivers/nk_menu.h rename to menu/drivers/nuklear/nk_menu.h index ee49218842..d9199dc5b1 100644 --- a/menu/drivers/nk_menu.h +++ b/menu/drivers/nuklear/nk_menu.h @@ -16,8 +16,8 @@ */ #include "nk_common.h" -#include "../menu_display.h" -#include "../menu_input.h" +#include "../../menu_display.h" +#include "../../menu_input.h" enum {