Add tools directory

This commit is contained in:
Gary Talent 2017-04-12 00:28:20 -05:00
parent dc376f2be3
commit c5712f26e2
4 changed files with 44 additions and 18 deletions

View File

@ -2,28 +2,14 @@ cmake_minimum_required(VERSION 2.8.8)
#setup libraries #setup libraries
if(WOMBAT_BUILD_TYPE STREQUAL "Native") if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
#find_package(SDL REQUIRED) find_package(Qt5Widgets)
#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")
endif() endif()
find_package(Ox REQUIRED) find_package(Ox REQUIRED)
include_directories(${Ox_INCLUDE_DIRS}) include_directories(${Ox_INCLUDE_DIRS})
#project packages #project packages
include_directories(".") include_directories(".")
@ -31,3 +17,7 @@ include_directories(".")
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(common) add_subdirectory(common)
add_subdirectory(player) add_subdirectory(player)
if(NOT WOMBAT_BUILD_TYPE STREQUAL "GBA")
add_subdirectory(tools)
endif()

View File

@ -51,7 +51,7 @@ ox::std::Error initGfx() {
char out[6]; char out[6];
FileStore32::FsSize_t outSize = 0; FileStore32::FsSize_t outSize = 0;
fs->read(3, out, &outSize); 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][138] = 1;
MEM_BG_MAP[28][139] = 1; MEM_BG_MAP[28][139] = 1;
} }

21
src/tools/CMakeLists.txt Normal file
View File

@ -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)

15
src/tools/pack.cpp Normal file
View File

@ -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 <QImage>
#include <ox/clargs/clargs.hpp>
int main(int argc, const char **args) {
QImage src("charset.png");
return 0;
}