diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index daf06e22..5b9110e1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,28 +2,14 @@ cmake_minimum_required(VERSION 2.8.8) #setup libraries -if(WOMBAT_BUILD_TYPE STREQUAL "Native") - #find_package(SDL REQUIRED) - #include_directories(${SDL_INCLUDE_DIR}) - #set(LIBS ${LIBS} ${SDL_LIBRARY}) - - #find_package(OpenGL REQUIRED) - #include_directories(${OPENGL_INCLUDE_DIR}) - #set(LIBS ${LIBS} ${OPENGL_LIBRARY}) - - #find_package(SDL_IMAGE REQUIRED) - #include_directories(${SDL_IMAGE_INCLUDE_DIR}) - #set(LIBS ${LIBS} ${SDL_IMAGE_LIBRARY}) - - #find_package(SDL_ttf REQUIRED) - #include_directories(${SDL_TTF_INCLUDE_DIR}) - #set(LIBS ${LIBS} ${SDL_TTF_LIBRARY}) -elseif(WOMBAT_BUILD_TYPE STREQUAL "GBA") +if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA") + find_package(Qt5Widgets) endif() find_package(Ox REQUIRED) include_directories(${Ox_INCLUDE_DIRS}) + #project packages include_directories(".") @@ -31,3 +17,7 @@ include_directories(".") add_subdirectory(core) add_subdirectory(common) add_subdirectory(player) + +if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA") + add_subdirectory(tools) +endif() diff --git a/src/core/gba/gfx.cpp b/src/core/gba/gfx.cpp index 0ed31c25..ae903b2b 100644 --- a/src/core/gba/gfx.cpp +++ b/src/core/gba/gfx.cpp @@ -51,7 +51,7 @@ ox::std::Error initGfx() { char out[6]; FileStore32::FsSize_t outSize = 0; fs->read(3, out, &outSize); - if (outSize == 5 && ox_strcmp(out, "narf") == 0) { + if (outSize == 5) { MEM_BG_MAP[28][138] = 1; MEM_BG_MAP[28][139] = 1; } diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt new file mode 100644 index 00000000..5de07b64 --- /dev/null +++ b/src/tools/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 2.8.8) + +project(nost-pack) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +add_executable(nost-pack pack.cpp) + +target_link_libraries( + nost-pack + Qt5::Widgets + NostalgiaCore + ${OxStd_LIBRARY} + ${OxClArgs_LIBRARY} + ${OxFS_LIBRARY} +) + +set(CMAKE_INCLUDE_CURRENT_DIR OFF) +set(CMAKE_AUTOMOC OFF) + diff --git a/src/tools/pack.cpp b/src/tools/pack.cpp new file mode 100644 index 00000000..4728bd54 --- /dev/null +++ b/src/tools/pack.cpp @@ -0,0 +1,15 @@ +/* + * Copyright 2016-2017 gtalent2@gmail.com + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +int main(int argc, const char **args) { + QImage src("charset.png"); + return 0; +}