Skip to content

Commit

Permalink
Only build memory_stats for the Dreamcast
Browse files Browse the repository at this point in the history
  • Loading branch information
azihassan committed Dec 2, 2024
1 parent 09a6e2c commit b9ba2e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/dreamcast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
4 changes: 3 additions & 1 deletion Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include(functions/devilutionx_library)
include(functions/genex)

set(libdevilutionx_SRCS
memory_stats.cpp
appfat.cpp
automap.cpp
capture.cpp
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit b9ba2e5

Please sign in to comment.