Skip to content

Commit b3f1ffc

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents d4e4645 + 4ee3680 commit b3f1ffc

File tree

169 files changed

+8046
-4705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+8046
-4705
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ insert_final_newline = true
1111
indent_style = space
1212
indent_size = 4
1313

14-
[*.{sh,rb,js,yml,adoc}]
14+
[*.{sh,rb,js,yml,yaml,adoc}]
1515
indent_style = space
1616
indent_size = 2
1717

.github/workflows/linter.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Lint Files
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
name: YAML, CMake & Markdown
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone Repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Install tools
18+
run: |
19+
pip install yamllint
20+
pip install cmakelint
21+
22+
- uses: tj-actions/changed-files@v46
23+
if: '!cancelled()'
24+
id: changed-files-yaml
25+
with:
26+
files: |
27+
**/*.yaml
28+
**/*.yml
29+
- name: Lint YAML files
30+
if: steps.changed-files-yaml.outputs.any_changed == 'true'
31+
run: |
32+
yamllint -d "{extends: relaxed, rules: {line-length: {max: 100}}}" \
33+
${{ steps.changed-files-yaml.outputs.all_changed_files }}
34+
# we often have extra long lines, so relaxing the check (from 80)
35+
36+
- uses: tj-actions/changed-files@v46
37+
if: '!cancelled()'
38+
id: changed-files-cmake
39+
with:
40+
files: |
41+
**/*.cmake
42+
**/CMakeLists.txt
43+
- name: Lint CMake files
44+
if: steps.changed-files-cmake.outputs.any_changed == 'true'
45+
run: |
46+
cmakelint --filter=-whitespace/tabs --linelength=120 \
47+
${{ steps.changed-files-cmake.outputs.all_changed_files }}
48+
# we often have extra long lines, so relaxing the check (from 80)
49+
# also do not warn about tabstops
50+
51+
- uses: tj-actions/changed-files@v46
52+
if: '!cancelled()'
53+
id: changed-files-md
54+
with:
55+
files: '**/*.md'
56+
separator: ","
57+
- name: Lint Markdown files
58+
if: steps.changed-files-md.outputs.any_changed == 'true'
59+
uses: DavidAnson/markdownlint-cli2-action@v20
60+
with:
61+
globs: ${{ steps.changed-files-md.outputs.all_changed_files }}
62+
separator: ","

.github/workflows/pr_labels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Clone repository
1616
uses: actions/checkout@v4
1717
with:
18-
# pull_request_target is run under forks, use main repo source
19-
fetch-depth: 0
20-
repository: EasyRPG/Player
21-
ref: master
18+
# pull_request_target is run under forks, use main repo source
19+
fetch-depth: 0
20+
repository: EasyRPG/Player
21+
ref: master
2222

2323
- name: Update labels
2424
uses: actions/labeler@v5

.github/workflows/stable-compilation.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ defaults:
1919

2020
jobs:
2121
docker:
22-
name: ${{ matrix.image }}
23-
runs-on: ubuntu-latest
22+
name: ${{ matrix.image }} (${{ matrix.os.arch }})
23+
runs-on: ${{ matrix.os.name }}
2424
container:
2525
image: ${{ matrix.image }}
2626

@@ -30,10 +30,22 @@ jobs:
3030
image:
3131
# version of: # CMake | g++ | SDL | support end #
3232
# -------------------------------------------------------------
33-
- ubuntu:20.04 # 3.16.3 | 9.3.0 | 2.0.10 | LTS (4/25) #
3433
- debian:11 # 3.18.4 | 10.2.1 | 2.0.14 | oldstable (8/24) #
35-
- ubuntu:22.04 # 3.22.1 | 11.2.0 | 2.0.20 | LTS (6/27) #
34+
- ubuntu:22.04 # 3.22.1 | 11.2.0 | 2.0.20 | LTS (4/27) #
3635
- debian:12 # 3.25.1 | 12.2.0 | 2.26.5 | stable (6/26) #
36+
- ubuntu:24.04 # 3.28.3 | 13.2.0 | 2.30.0 | LTS (4/29) #
37+
os:
38+
- arch: x86_64
39+
name: ubuntu-latest
40+
- arch: arm64
41+
name: ubuntu-24.04-arm
42+
exclude:
43+
- os:
44+
arch: arm64
45+
image: debian:11
46+
- os:
47+
arch: arm64
48+
image: ubuntu:22.04
3749

3850
steps:
3951
- name: Install dependencies
@@ -45,7 +57,7 @@ jobs:
4557
libicu-dev libexpat1-dev libinih-dev nlohmann-json3-dev \
4658
libsdl2-dev libpng-dev libpixman-1-dev libfmt-dev \
4759
libfreetype6-dev libharfbuzz-dev libmpg123-dev libsndfile-dev \
48-
libvorbis-dev libopusfile-dev libspeexdsp-dev \
60+
libvorbis-dev libopusfile-dev libspeexdsp-dev liblhasa-dev \
4961
libdrm-dev libgbm-dev # only needed for sdl2 on debian 11
5062
5163
- name: Clone Repository

CMakeLists.txt

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cmake_minimum_required(VERSION 3.16...3.31 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.18...3.31 FATAL_ERROR)
22

3-
project(EasyRPG_Player VERSION 0.8
3+
project(EasyRPG_Player VERSION 0.8.1
44
DESCRIPTION "Interpreter for RPG Maker 2000/2003 games"
55
HOMEPAGE_URL "https://easyrpg.org"
66
LANGUAGES CXX)
@@ -31,6 +31,8 @@ option(BUILD_SHARED_LIBS "Build shared easyrpg_libretro core" ON)
3131

3232
option(CMAKE_FIND_PACKAGE_PREFER_CONFIG "Prefer config files over bundled FindXXX files. Set this to OFF when configuration fails and report a bug." ON)
3333

34+
option(PLAYER_NONFREE "For commercial usage disable libraries and fonts that are licensed under (L)GPL." OFF)
35+
3436
# Source Files
3537
add_library(${PROJECT_NAME} OBJECT
3638
src/lcf_data.cpp
@@ -68,8 +70,6 @@ add_library(${PROJECT_NAME} OBJECT
6870
src/baseui.h
6971
src/battle_animation.cpp
7072
src/battle_animation.h
71-
src/battle_message.cpp
72-
src/battle_message.h
7373
src/bitmap.cpp
7474
src/bitmapfont.h
7575
src/bitmapfont_glyph.h
@@ -182,6 +182,8 @@ add_library(${PROJECT_NAME} OBJECT
182182
src/game_interpreter_battle.h
183183
src/game_interpreter_control_variables.cpp
184184
src/game_interpreter_control_variables.h
185+
src/game_interpreter_debug.cpp
186+
src/game_interpreter_debug.h
185187
src/game_interpreter.cpp
186188
src/game_interpreter.h
187189
src/game_interpreter_map.cpp
@@ -192,6 +194,8 @@ add_library(${PROJECT_NAME} OBJECT
192194
src/game_map.h
193195
src/game_message.cpp
194196
src/game_message.h
197+
src/game_message_terms.cpp
198+
src/game_message_terms.h
195199
src/game_party_base.cpp
196200
src/game_party_base.h
197201
src/game_party.cpp
@@ -201,6 +205,8 @@ add_library(${PROJECT_NAME} OBJECT
201205
src/game_player.cpp
202206
src/game_player.h
203207
src/game_playerother.h
208+
src/game_runtime_patches.cpp
209+
src/game_runtime_patches.h
204210
src/game_quit.cpp
205211
src/game_quit.h
206212
src/game_screen.cpp
@@ -219,6 +225,7 @@ add_library(${PROJECT_NAME} OBJECT
219225
src/game_vehicle.h
220226
src/game_windows.cpp
221227
src/game_windows.h
228+
src/generated/bitmapfont_baekmuk.h
222229
src/generated/bitmapfont_rmg2000.h
223230
src/generated/bitmapfont_ttyp0.h
224231
src/generated/bitmapfont_wqy.h
@@ -629,7 +636,7 @@ elseif(PLAYER_TARGET_PLATFORM STREQUAL "SDL2")
629636
# SDL2 depends on some systems on SDL2::SDL2main but SDL2::SDL2 is not always a dependency of it
630637
# Manually add the dependencies
631638
player_find_package(NAME SDL2
632-
VERSION 2.0.5
639+
VERSION 2.0.14
633640
TARGET SDL2::SDL2
634641
REQUIRED)
635642

@@ -801,6 +808,10 @@ endif()
801808
# Shared by homebrew platforms
802809
if(NINTENDO_3DS OR NINTENDO_WII OR NINTENDO_WIIU OR NINTENDO_WIIU OR NINTENDO_SWITCH OR VITA)
803810
target_compile_options(${PROJECT_NAME} PUBLIC -fno-exceptions -fno-rtti)
811+
if(VITA)
812+
# This optimisation is unstable on Vita (crashes at the end of MainLoop)
813+
target_compile_options(${PROJECT_NAME} PUBLIC -fno-optimize-sibling-calls)
814+
endif()
804815
set(CMAKE_DL_LIBS "") # hack4icu!
805816
set(PLAYER_ENABLE_TESTS OFF)
806817
option(PLAYER_VERSIONED_PACKAGES "Create zip packages with versioned name (for internal use)" ON)
@@ -942,7 +953,7 @@ if(PLAYER_BUILD_LIBLCF)
942953
target_link_libraries(${PROJECT_NAME} lcf)
943954
else()
944955
# Use system package
945-
player_find_package(NAME liblcf VERSION 0.8
956+
player_find_package(NAME liblcf VERSION 0.8.1
946957
TARGET liblcf::liblcf
947958
REQUIRED)
948959
endif()
@@ -1054,13 +1065,13 @@ if(PLAYER_HAS_AUDIO)
10541065
endif()
10551066
endif()
10561067

1057-
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_MPG123 "Play MP3 audio with libmpg123" ON "PLAYER_HAS_AUDIO" OFF)
1058-
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_LIBSNDFILE "Play WAV audio with libsndfile" ON "PLAYER_HAS_AUDIO" OFF)
1068+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_MPG123 "Play MP3 audio with libmpg123" ON "PLAYER_HAS_AUDIO;NOT PLAYER_NONFREE" OFF)
1069+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_LIBSNDFILE "Play WAV audio with libsndfile" ON "PLAYER_HAS_AUDIO;NOT PLAYER_NONFREE" OFF)
10591070
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_OGGVORBIS "Play Ogg Vorbis audio with libvorbis" ON "PLAYER_HAS_AUDIO" OFF)
10601071
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_OPUS "Play Opus audio with opusfile" ON "PLAYER_HAS_AUDIO" OFF)
1061-
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_WILDMIDI "Play MIDI audio with wildmidi" ON "PLAYER_HAS_AUDIO" OFF)
1062-
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_FLUIDSYNTH "Play MIDI audio with fluidsynth" ON "PLAYER_HAS_AUDIO" OFF)
1063-
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_FLUIDLITE "Play MIDI audio with fluidlite" ON "PLAYER_HAS_AUDIO" OFF)
1072+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_WILDMIDI "Play MIDI audio with wildmidi" ON "PLAYER_HAS_AUDIO;NOT PLAYER_NONFREE" OFF)
1073+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_FLUIDSYNTH "Play MIDI audio with fluidsynth" ON "PLAYER_HAS_AUDIO;NOT PLAYER_NONFREE" OFF)
1074+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_FLUIDLITE "Play MIDI audio with fluidlite" ON "PLAYER_HAS_AUDIO;NOT PLAYER_NONFREE" OFF)
10641075
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_XMP "Play MOD audio with libxmp" ON "PLAYER_HAS_AUDIO" OFF)
10651076
CMAKE_DEPENDENT_OPTION(PLAYER_ENABLE_DRWAV "Play WAV audio with dr_wav (built-in). Unsupported files are played by libsndfile." ON "PLAYER_HAS_AUDIO" OFF)
10661077

@@ -1179,6 +1190,18 @@ if(PLAYER_HAS_AUDIO)
11791190
endif()
11801191
endif()
11811192

1193+
# Fonts
1194+
option(PLAYER_WITH_BAEKMUK "Enable built-in Baekmuk font (Korean)" ON)
1195+
CMAKE_DEPENDENT_OPTION(PLAYER_WITH_WQY "Enable built-in WenQuanYi font (Chinese)" ON "NOT PLAYER_NONFREE" OFF)
1196+
1197+
if(PLAYER_WITH_BAEKMUK)
1198+
target_compile_definitions(${PROJECT_NAME} PUBLIC WANT_FONT_BAEKMUK=1)
1199+
endif()
1200+
1201+
if(PLAYER_WITH_WQY)
1202+
target_compile_definitions(${PROJECT_NAME} PUBLIC WANT_FONT_WQY=1)
1203+
endif()
1204+
11821205
# Executable
11831206
if(PLAYER_BUILD_EXECUTABLE AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL.*$" AND NOT PLAYER_CONSOLE_PORT)
11841207
if(APPLE)

Makefile.am

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ libeasyrpg_player_a_SOURCES = \
4242
src/baseui.h \
4343
src/battle_animation.cpp \
4444
src/battle_animation.h \
45-
src/battle_message.cpp \
46-
src/battle_message.h \
4745
src/bitmap.cpp \
4846
src/bitmap.h \
4947
src/bitmapfont.h \
@@ -160,6 +158,8 @@ libeasyrpg_player_a_SOURCES = \
160158
src/game_interpreter_battle.h \
161159
src/game_interpreter_control_variables.cpp \
162160
src/game_interpreter_control_variables.h \
161+
src/game_interpreter_debug.cpp \
162+
src/game_interpreter_debug.h \
163163
src/game_interpreter_map.cpp \
164164
src/game_interpreter_map.h \
165165
src/game_interpreter_shared.cpp \
@@ -168,6 +168,8 @@ libeasyrpg_player_a_SOURCES = \
168168
src/game_map.h \
169169
src/game_message.cpp \
170170
src/game_message.h \
171+
src/game_message_terms.cpp \
172+
src/game_message_terms.h \
171173
src/game_party.cpp \
172174
src/game_party.h \
173175
src/game_party_base.cpp \
@@ -176,6 +178,8 @@ libeasyrpg_player_a_SOURCES = \
176178
src/game_pictures.h \
177179
src/game_player.cpp \
178180
src/game_player.h \
181+
src/game_runtime_patches.cpp \
182+
src/game_runtime_patches.h \
179183
src/game_screen.cpp \
180184
src/game_screen.h \
181185
src/game_strings.cpp \
@@ -192,6 +196,7 @@ libeasyrpg_player_a_SOURCES = \
192196
src/game_vehicle.h \
193197
src/game_windows.cpp \
194198
src/game_windows.h \
199+
src/generated/bitmapfont_baekmuk.h \
195200
src/generated/bitmapfont_rmg2000.h \
196201
src/generated/bitmapfont_ttyp0.h \
197202
src/generated/bitmapfont_wqy.h \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Documentation is available at the documentation wiki: https://wiki.easyrpg.org
1616
### minimal / required
1717

1818
- [liblcf] for RPG Maker data reading.
19-
- SDL3 or SDL2 >= 2.0.5 for screen backend support.
19+
- SDL3 or SDL2 >= 2.0.14 for screen backend support.
2020
- Pixman for low level pixel manipulation.
2121
- libpng for PNG image support.
2222
- zlib for XYZ image and ZIP archive support.

builds/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ android {
55
assetPacks = [":assets"]
66
defaultConfig {
77
applicationId "org.easyrpg.player"
8-
compileSdk 35
8+
compileSdk 36
99
minSdkVersion 21
10-
targetSdkVersion 35
10+
targetSdkVersion 36
1111
versionName VERSION_NAME
1212
versionCode Integer.parseInt(VERSION_CODE)
1313
}
@@ -77,10 +77,11 @@ allprojects {
7777

7878
dependencies {
7979
implementation 'androidx.appcompat:appcompat:1.7.0'
80+
implementation "androidx.activity:activity:1.10.1"
8081
implementation 'com.google.android.material:material:1.12.0'
8182
implementation 'androidx.cardview:cardview:1.0.0'
82-
implementation 'androidx.recyclerview:recyclerview:1.3.2'
83-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
83+
implementation 'androidx.recyclerview:recyclerview:1.4.0'
84+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
8485
implementation 'androidx.documentfile:documentfile:1.0.1'
8586
implementation 'org.ini4j:ini4j:0.5.4'
8687
}

builds/android/app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
android:allowBackup="true"
3737
android:icon="@drawable/ic_launcher"
3838
android:label="@string/app_name"
39-
android:theme="@style/AppTheme">
39+
android:theme="@style/AppTheme"
40+
android:enableOnBackInvokedCallback="true"
41+
>
4042

4143
<!-- Setting SDL hints from AndroidManifest.xml: -->
4244
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0" />
@@ -70,7 +72,8 @@
7072
<!-- Player's Activity -->
7173
<activity
7274
android:name=".player.EasyRpgPlayerActivity"
73-
android:configChanges="orientation|screenSize" />
75+
android:configChanges="orientation|screenSize"
76+
android:theme="@style/AppThemePlayerActivity"/>
7477
<!-- Settings' Activity -->
7578
<activity
7679
android:name=".settings.SettingsMainActivity"
@@ -105,6 +108,7 @@
105108
</activity>
106109
<activity
107110
android:name=".button_mapping.ButtonMappingActivity"
111+
android:theme="@style/AppTheme.NoActionBar"
108112
android:configChanges="orientation|screenSize" />
109113

110114
<provider

0 commit comments

Comments
 (0)