diff --git a/.github/workflows/dreamcast.yml b/.github/workflows/dreamcast.yml index 7d5c94e9a0d..06beb3e4708 100644 --- a/.github/workflows/dreamcast.yml +++ b/.github/workflows/dreamcast.yml @@ -84,14 +84,16 @@ jobs: run: | source /opt/toolchains/dc/kos/environ.sh && cd build && kos-make + # diabdat.mpq isn't available so this doesn't do anything, but I'll leave it here for documentation purposes - name: Patch RAM-heavy assets + if: ${{ hashFiles('DIABDAT.MPQ') != '' }} run: | - [ -e build/data/diabdat ] && \ - cp build/data/diabdat/monsters/snake/snakbl.trn build/data/diabdat/monsters/snake/snakb.trn && \ - cp blackd.clx build/data/diabdat/monsters/black/blackd.clx && \ - cp diablod.clx build/data/diabdat/monsters/diablo/diablod.clx && \ - cp diablon.clx build/data/diabdat/monsters/diablo/diablon.clx && \ - patch build/data/txt/monsters/monstdat.tsv -l -p0 < monstdat.patch + unpack_and_minify_mpq DIABDAT.MPQ && \ + cp diabdat/monsters/snake/snakbl.trn diabdat/monsters/snake/snakb.trn && \ + cp blackd.clx diabdat/monsters/black/blackd.clx && \ + cp diablod.clx diabdat/monsters/diablo/diablod.clx && \ + cp diablon.clx diabdat/monsters/diablo/diablon.clx && \ + patch build/data/txtdata/monsters/monstdat.tsv -l -p0 < monstdat.patch - name: Generate .cdi run: | diff --git a/Dockerfile b/Dockerfile index b020bf32c59..e1dd0e68984 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,12 +52,12 @@ RUN echo "Compiling..." RUN source /opt/toolchains/dc/kos/environ.sh && cd build && kos-make RUN echo "Patching RAM-heavy assets..." -RUN [ -e build/data/diabdat ] && \ - cp build/data/diabdat/monsters/snake/snakbl.trn build/data/diabdat/monsters/snake/snakb.trn && \ - cp blackd.clx build/data/diabdat/monsters/black/blackd.clx && \ - cp diablod.clx build/data/diabdat/monsters/diablo/diablod.clx && \ - cp diablon.clx build/data/diabdat/monsters/diablo/diablon.clx && \ - patch build/data/txt/monsters/monstdat.tsv -l -p0 < monstdat.patch +RUN [ -e diabdat ] && \ + cp diabdat/monsters/snake/snakbl.trn diabdat/monsters/snake/snakb.trn && \ + cp blackd.clx diabdat/monsters/black/blackd.clx && \ + cp diablod.clx diabdat/monsters/diablo/diablod.clx && \ + cp diablon.clx diabdat/monsters/diablo/diablon.clx && \ + patch build/data/txtdata/monsters/monstdat.tsv -l -p0 < monstdat.patch RUN echo "Generating CDI" RUN source /opt/toolchains/dc/kos/environ.sh && \ diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 6372f9dd5a7..804a38b9c43 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -3,7 +3,6 @@ include(functions/devilutionx_library) include(functions/genex) set(libdevilutionx_SRCS - memory_stats.cpp appfat.cpp automap.cpp capture.cpp @@ -282,6 +281,9 @@ if(DEVILUTIONX_SCREENSHOT_FORMAT STREQUAL DEVILUTIONX_SCREENSHOT_FORMAT_PNG) utils/surface_to_png.cpp ) endif() +if(PLATFORM_DREAMCAST) + list(APPEND libdevilutionx_SRCS memory_stats.cpp) +endif() add_devilutionx_library(libdevilutionx OBJECT ${libdevilutionx_SRCS}) target_include_directories(libdevilutionx PUBLIC ${CMAKE_CURRENT_BINARY_DIR})