From d2917cb21a5403f04ec8d19874a618860adb7780 Mon Sep 17 00:00:00 2001 From: Anselme Date: Tue, 31 May 2016 23:47:33 +0200 Subject: [PATCH] fixed resource error, changed folder naming policy --- resource/main.cpp | 5 ++--- template.cmake | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/resource/main.cpp b/resource/main.cpp index 242f9bb..8ba3dc9 100644 --- a/resource/main.cpp +++ b/resource/main.cpp @@ -1,5 +1,6 @@ #include #include +#include using namespace std; @@ -59,9 +60,7 @@ int main(int argc, char *argv[]) packName = packName.substr(0, packName.find_first_of('.')); for(char c : packName) { - if(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9') - ; // OK - else + if(!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9')) { printf("error : \"%s\" is an invalid resource pack name, it must match this regex : [a-zA-Z0-9]+\n", packName.c_str()); return EXIT_SUCCESS; diff --git a/template.cmake b/template.cmake index acd8624..88b3efe 100644 --- a/template.cmake +++ b/template.cmake @@ -104,7 +104,7 @@ if(USE_ENGINE) # window and system are already requested by sparrowInput LIST(APPEND SFML_MODULES graphics audio) - LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../sparrowengine/src) + LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../SparrowEngine/src) LIST(APPEND LIB_DEPENDENCIES_LIST ${SPARROW_ENGINE_LIBRARY}) endif() @@ -118,7 +118,6 @@ if(USE_INPUT) LIST(APPEND SFML_MODULES window system) - LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../sparrowinput/src) LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../SparrowInput/src) LIST(APPEND LIB_DEPENDENCIES_LIST ${SPARROW_INPUT_LIBRARY}) endif() @@ -353,7 +352,7 @@ if(USE_RENDERER) set(USE_OPENGL True) - LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../sparrowrenderer/src) + LIST(APPEND INCLUDE_PATHS ${PROJECT_SOURCE_DIR}/../SparrowRenderer/src) LIST(APPEND LIB_DEPENDENCIES_LIST ${SPARROW_RENDERER_LIBRARY}) endif()