diff --git a/.gitignore b/.gitignore index 89807ac3..3d053adb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ /obj # Exclude the (recommended) CMake build directory -/build +/build* # Exclude executables /game_english/CSE2_debug.exe @@ -15,6 +15,7 @@ /game_english/DoConfig /game_english/CSE2_debug.rpx /game_english/CSE2.rpx +/game_english/\!CSE2 /game_japanese/CSE2_debug.exe /game_japanese/DoConfig_debug.exe /game_japanese/CSE2.exe @@ -25,6 +26,7 @@ /game_japanese/DoConfig /game_japanese/CSE2_debug.rpx /game_japanese/CSE2.rpx +/game_japanese/\!CSE2 # Exclude MSVC debug data /game_english/CSE2_debug.ilk @@ -97,8 +99,5 @@ # Portable branch # ################### -# Exclude Wii U build directory -/buildwiiu - # Exclude converted resource files /src/Resource diff --git a/CMakeLists.txt b/CMakeLists.txt index 63ad6011..1d075d49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -775,3 +775,7 @@ if(DOCONFIG) RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BUILD_DIRECTORY} ) endif() + +if(RISCOS) + include(RISCOSApp) +endif() diff --git a/assets/riscos/!Boot,feb b/assets/riscos/!Boot,feb new file mode 100644 index 00000000..c156edab --- /dev/null +++ b/assets/riscos/!Boot,feb @@ -0,0 +1,2 @@ +Set CSE2$Dir +IconSprites .!Sprites diff --git a/assets/riscos/!Run,feb b/assets/riscos/!Run,feb new file mode 100644 index 00000000..9cab7e0b --- /dev/null +++ b/assets/riscos/!Run,feb @@ -0,0 +1,2 @@ +Set CSE2$Dir +Run .CSE2 >.Log 2>&1 diff --git a/assets/riscos/!Sprites,ff9 b/assets/riscos/!Sprites,ff9 new file mode 100644 index 00000000..631ddd2a Binary files /dev/null and b/assets/riscos/!Sprites,ff9 differ diff --git a/cmake/RISCOSApp.cmake b/cmake/RISCOSApp.cmake new file mode 100644 index 00000000..803df9b7 --- /dev/null +++ b/cmake/RISCOSApp.cmake @@ -0,0 +1,22 @@ +# Use the following commands to build for RISC OS: +# cmake -B build-riscos -DCMAKE_BUILD_TYPE=Release -DBACKEND_PLATFORM=SDL1 -DBACKEND_RENDERER=Software -DBACKEND_AUDIO=SDL1 -DDOCONFIG=OFF -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake -DRISCOS=ON -DPKG_CONFIG_STATIC_LIBS=ON +# cmake --build build-riscos +# (cd game_english && $GCCSDK_INSTALL_ENV/bin/zip -,9r cse2-riscos.zip \!CSE2) + +function(elf_to_aif) + cmake_parse_arguments(ELFTOAIF "" "TARGET;OUTPUT" "" ${ARGN}) + get_filename_component(ELFTOAIF_OUTPUT_DIR "${ELFTOAIF_OUTPUT}" DIRECTORY) + add_custom_command(OUTPUT "${ELFTOAIF_OUTPUT}" + COMMAND ${CMAKE_COMMAND} -E make_directory ${ELFTOAIF_OUTPUT_DIR} + COMMAND elf2aif $ ${ELFTOAIF_OUTPUT} + DEPENDS ${ELFTOAIF_TARGET}) + add_custom_target(${ELFTOAIF_TARGET}-aif ALL DEPENDS ${ELFTOAIF_OUTPUT}) +endfunction(elf_to_aif) + +elf_to_aif(TARGET CSE2 OUTPUT ${BUILD_DIRECTORY}/!CSE2/CSE2,ff8) + +configure_file(${ASSETS_DIRECTORY}/riscos/!Boot,feb ${BUILD_DIRECTORY}/!CSE2/!Boot,feb COPYONLY) +configure_file(${ASSETS_DIRECTORY}/riscos/!Run,feb ${BUILD_DIRECTORY}/!CSE2/!Run,feb COPYONLY) +configure_file(${ASSETS_DIRECTORY}/riscos/!Sprites,ff9 ${BUILD_DIRECTORY}/!CSE2/!Sprites,ff9 COPYONLY) +configure_file(${BUILD_DIRECTORY}/licence.txt ${BUILD_DIRECTORY}/!CSE2/Licence COPYONLY) +file(COPY ${BUILD_DIRECTORY}/data DESTINATION ${BUILD_DIRECTORY}/!CSE2) diff --git a/src/Config.cpp b/src/Config.cpp index 4e355d80..c85a62bd 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -65,6 +65,8 @@ void DefaultConfigData(CONFIGDATA *conf) #ifdef _3DS conf->display_mode = 1; +#elif defined(__riscos__) + conf->display_mode = 2; #endif // Reset joystick settings (as these can't simply be set to 0)