Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-01-24 13:56:12 +00:00
commit 26475dacdf
802 changed files with 25 additions and 21 deletions

21
.gitignore vendored
View file

@ -1,8 +1,25 @@
# Exclude obj directory (object files for Makefile build) # Exclude obj directory (object files for Makefile build)
/obj /obj
# Exclude build output directory # Exclude executables (English)
/game /game_english/CSE2_debug.exe
/game_english/DoConfig_debug.exe
/game_english/CSE2.exe
/game_english/DoConfig.exe
/game_english/CSE2_debug
/game_english/DoConfig_debug
/game_english/CSE2
/game_english/DoConfig
# Exclude executables (Japanese)
/game_japanese/CSE2_debug.exe
/game_japanese/DoConfig_debug.exe
/game_japanese/CSE2.exe
/game_japanese/DoConfig.exe
/game_japanese/CSE2_debug
/game_japanese/DoConfig_debug
/game_japanese/CSE2
/game_japanese/DoConfig
#### ####
# Accurate branch # Accurate branch

View file

@ -8,7 +8,6 @@ if((${CMAKE_VERSION} VERSION_EQUAL 3.11) OR (${CMAKE_VERSION} VERSION_GREATER 3.
cmake_policy(SET CMP0072 NEW) cmake_policy(SET CMP0072 NEW)
endif() endif()
set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/game")
set(ASSETS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/assets") set(ASSETS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/assets")
option(JAPANESE "Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation)" OFF) option(JAPANESE "Enable the Japanese-language build (instead of the unofficial Aeon Genesis English translation)" OFF)
@ -269,11 +268,11 @@ set(RESOURCES
# Handle options # Handle options
if(JAPANESE) if(JAPANESE)
set(DATA_DIRECTORY "${ASSETS_DIRECTORY}/data_jp") set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/game_japanese")
list(APPEND RESOURCES "BITMAP/pixel_jp.bmp" "FONT/NotoSansMonoCJKjp.otf") list(APPEND RESOURCES "BITMAP/pixel_jp.bmp" "FONT/NotoSansMonoCJKjp.otf")
target_compile_definitions(CSE2 PRIVATE JAPANESE) target_compile_definitions(CSE2 PRIVATE JAPANESE)
else() else()
set(DATA_DIRECTORY "${ASSETS_DIRECTORY}/data_en") set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/game_english")
list(APPEND RESOURCES "BITMAP/pixel.bmp" "FONT/LiberationMono.ttf") list(APPEND RESOURCES "BITMAP/pixel.bmp" "FONT/LiberationMono.ttf")
endif() endif()
@ -438,12 +437,6 @@ set_target_properties(CSE2 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BUILD_DIRECTORY} RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BUILD_DIRECTORY}
) )
# Copy data folder to build directory
add_custom_command(TARGET CSE2 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIRECTORY}/data"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${DATA_DIRECTORY}" "${BUILD_DIRECTORY}/data"
)
# Enable link-time optimisation if available # Enable link-time optimisation if available
if(LTO) if(LTO)
if((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9)) if((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9))

View file

@ -3,7 +3,6 @@ NATIVECXX ?= c++
WINDRES ?= windres WINDRES ?= windres
PKGCONFIG ?= pkg-config PKGCONFIG ?= pkg-config
BUILD_DIRECTORY = game
ASSETS_DIRECTORY = assets ASSETS_DIRECTORY = assets
# Default options # Default options
@ -37,11 +36,11 @@ ifeq ($(LTO), 1)
endif endif
ifeq ($(JAPANESE), 1) ifeq ($(JAPANESE), 1)
DATA_DIRECTORY = $(ASSETS_DIRECTORY)/data_jp BUILD_DIRECTORY = game_japanese
DEFINES += -DJAPANESE DEFINES += -DJAPANESE
else else
DATA_DIRECTORY = $(ASSETS_DIRECTORY)/data_en BUILD_DIRECTORY = game_english
endif endif
FILENAME ?= $(FILENAME_DEF) FILENAME ?= $(FILENAME_DEF)
@ -273,14 +272,9 @@ ifeq ($(WINDOWS), 1)
OBJECTS += obj/$(FILENAME)/windows_resources.o OBJECTS += obj/$(FILENAME)/windows_resources.o
endif endif
all: $(BUILD_DIRECTORY)/$(FILENAME) $(BUILD_DIRECTORY)/data $(BUILD_DIRECTORY)/$(DOCONFIG_FILENAME) all: $(BUILD_DIRECTORY)/$(FILENAME) $(BUILD_DIRECTORY)/$(DOCONFIG_FILENAME)
$(info Finished) $(info Finished)
$(BUILD_DIRECTORY)/data: $(DATA_DIRECTORY)
@mkdir -p $(@D)
@rm -rf $(BUILD_DIRECTORY)/data
@cp -r $(DATA_DIRECTORY) $(BUILD_DIRECTORY)/data
$(BUILD_DIRECTORY)/$(FILENAME): $(OBJECTS) $(BUILD_DIRECTORY)/$(FILENAME): $(OBJECTS)
@mkdir -p $(@D) @mkdir -p $(@D)
$(info Linking $@) $(info Linking $@)

View file

@ -108,7 +108,7 @@ Name | Function
`WARNINGS_ALL=1` | Enable ALL compiler warnings (Clang only) `WARNINGS_ALL=1` | Enable ALL compiler warnings (Clang only)
`WARNINGS_FATAL=1` | Make all compiler warnings errors `WARNINGS_FATAL=1` | Make all compiler warnings errors
Once built, the executables and assets can be found in the newly-generated `game` folder. Once built, the executables can be found in the `game_english`/`game_japanese` folder, depending on the selected language.
## Licensing ## Licensing

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 134 B

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 638 B

After

Width:  |  Height:  |  Size: 638 B

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Some files were not shown because too many files have changed in this diff Show more