Add support world drawing

This commit is contained in:
2017-11-09 21:43:59 -06:00
parent 539aa1e7eb
commit 2edee450aa
22 changed files with 232 additions and 61 deletions

View File

@ -3,18 +3,21 @@
set -e
BIN=./dist/current/bin/
NOSTALGA_BIN=build/gba-release/src/nostalgia/player/nostalgia.bin
PATH=$BIN:${DEVKITARM}/bin/:$PATH
NOSTALGA_BIN=build/gba-*/src/nostalgia/player/nostalgia.bin
NOSTALGA_MEDIA=nostalgia_media.oxfs
NOSTALGA_GBA=nostalgia.gba
MEDIA_HEADER=media_header.txt
CHARSET_FILE=src/nostalgia/core/studio/charset.png
TILESHEET_TEST_REGION1=media/tilesheet_test_region1.png
echo NOSTALGIA_MEDIA_HEADER_________ > $MEDIA_HEADER
$BIN/oxfs format 32 1k $NOSTALGA_MEDIA
$BIN/nost-pack -fs $NOSTALGA_MEDIA -img $CHARSET_FILE -inode 101 -tiles 127 -bpp 4 -c
oxfs format 32 1k $NOSTALGA_MEDIA
nost-pack -fs $NOSTALGA_MEDIA -img $CHARSET_FILE -inode 101 -tiles 127 -bpp 4 -c
nost-pack -fs $NOSTALGA_MEDIA -img $TILESHEET_TEST_REGION1 -inode 102 -tiles 4 -bpp 4 -c
${DEVKITARM}/bin/padbin 32 $NOSTALGA_BIN
padbin 32 $NOSTALGA_BIN
cat $NOSTALGA_BIN $MEDIA_HEADER $NOSTALGA_MEDIA > $NOSTALGA_GBA
rm -f $MEDIA_HEADER $NOSTALGA_MEDIA
${DEVKITARM}/bin/gbafix $NOSTALGA_GBA
gbafix $NOSTALGA_GBA

View File

@ -11,5 +11,5 @@ namespace = "namespace nostalgia {\nnamespace %s {\n\n}\n}" % pkg
hpp = "#pragma once\n"
cpp = "#include \"%s.hpp\"\n\n%s" % (name, namespace)
open("src/%s/%s.hpp" % (pkg, name), "w").write(hpp)
open("src/%s/%s.cpp" % (pkg, name), "w").write(cpp)
open("src/nostalgia/%s/%s.hpp" % (pkg, name), "w").write(hpp)
open("src/nostalgia/%s/%s.cpp" % (pkg, name), "w").write(cpp)

View File

@ -7,6 +7,10 @@ project=$(pwd)/
TARGET=$1
BUILD_TYPE=$2
#if [[ $(which ninja) != "ninja not found" ]]; then
# buildTool="-GNinja"
#fi
if [[ $TARGET == windows ]]; then
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
elif [[ $TARGET == gba ]]; then
@ -28,6 +32,7 @@ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="$distDir" \
-DCMAKE_INSTALL_RPATH="$project/dist/${TARGET}-${BUILD_TYPE}/lib/nostalgia" \
-DNOSTALGIA_IDE_BUILD=OFF \
$buildTool \
$buildTypeArgs \
$toolchain \
$project