Skip to content

Commit cc0c4ae

Browse files
committed
Merge branch 'master' into sound-v2
2 parents f87a6db + 5ef48b8 commit cc0c4ae

Some content is hidden

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

63 files changed

+548
-506
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,33 @@ on:
66

77
jobs:
88
linux:
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
include:
13-
- name: OpenGL ES
14-
flags: "-DUSE_GLES1_COMPATIBILITY_LAYER=ON"
15-
- name: OpenGL
16-
flags: "-DUSE_GLES1_COMPATIBILITY_LAYER=OFF"
17-
name: Linux (${{ matrix.name }})
9+
name: Linux
1810
runs-on: ubuntu-latest
1911
steps:
2012
- name: Checkout Repository
21-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
2214
with:
2315
submodules: true
2416
- name: Install Dependencies
2517
run: |
2618
sudo apt-get update
27-
sudo apt-get install --no-install-recommends -y build-essential cmake ninja-build libopenal-dev libsdl2-dev zlib1g-dev
19+
sudo apt-get install --no-install-recommends -y \
20+
build-essential \
21+
cmake ninja-build \
22+
libopenal-dev \
23+
libsdl2-dev zlib1g-dev
2824
- name: Build
2925
run: |
30-
cd platforms/sdl
3126
mkdir build
3227
cd build
33-
cmake -GNinja ${{ matrix.flags }} ..
28+
cmake -GNinja ..
3429
cmake --build .
3530
wasm:
3631
name: WASM
3732
runs-on: ubuntu-latest
3833
steps:
3934
- name: Checkout Repository
40-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
4136
with:
4237
submodules: true
4338
- name: Install Dependencies
@@ -51,15 +46,16 @@ jobs:
5146
runs-on: macos-latest
5247
steps:
5348
- name: Checkout Repository
54-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5550
with:
5651
submodules: true
5752
- name: Install MacPorts
5853
uses: melusina-org/setup-macports@v1
5954
- name: Install Dependencies
6055
run: |
61-
sudo port install libsdl2 +universal
62-
sudo port install libpng +universal
56+
port selfupdate
57+
port install libsdl2 +universal
58+
port install libpng +universal
6359
- name: Build macOS Archive
6460
run: |
6561
cd platforms/macos/projects/Minecraft
@@ -103,11 +99,11 @@ jobs:
10399
runs-on: ubuntu-latest
104100
steps:
105101
- name: Checkout Repository
106-
uses: actions/checkout@v3
102+
uses: actions/checkout@v4
107103
with:
108104
submodules: true
109105
- name: Setup JDK
110-
uses: actions/setup-java@v3
106+
uses: actions/setup-java@v4
111107
with:
112108
java-version: '17'
113109
distribution: 'temurin'
@@ -116,3 +112,32 @@ jobs:
116112
run: |
117113
cd ${{ matrix.directory }}
118114
./gradlew build
115+
mingw:
116+
strategy:
117+
fail-fast: false
118+
matrix:
119+
include:
120+
- name: Win32
121+
flags: "-DREMCPE_PLATFORM=windows"
122+
- name: SDL
123+
flags: "-DREMCPE_PLATFORM=sdl"
124+
name: MinGW-w64 (${{ matrix.name }})
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Checkout Repository
128+
uses: actions/checkout@v4
129+
with:
130+
submodules: true
131+
- name: Install Dependencies
132+
run: |
133+
sudo apt-get update
134+
sudo apt-get install --no-install-recommends -y \
135+
build-essential \
136+
cmake ninja-build \
137+
mingw-w64
138+
- name: Build
139+
run: |
140+
mkdir build
141+
cd build
142+
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw-w64-toolchain.cmake ${{ matrix.flags }} ..
143+
cmake --build .

.gitignore

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ xcuserdata/
211211
/game/assets/gui/touchgui2.png
212212
/game/assets/item/arrows.png
213213
/game/assets/item/sign.png
214+
# Sound
215+
/game/assets/sound
216+
/game/assets/music
214217
# Java
215218
/game/assets/terrain/sun.png
216219
/game/assets/terrain/moon.png
@@ -242,17 +245,11 @@ xcuserdata/
242245
# Ignore options.txt - where your configuration will be saved
243246
/game/options.txt
244247
/game/assetsO
245-
/game/assets/gui/feedback_fill.png
246-
/game/assets/gui/feedback_outer.png
247-
/game/assets/snow.png
248-
/game/assets/mob/pig.png
249248

250249
# CLion
251250
/.idea
252-
cmake-build-*
251+
/cmake-build-*
253252

254-
# Sound
253+
# PCM sound extraction
255254
/tools/__pycache__
256255
/tools/venv
257-
/game/assets/sound
258-
/game/assets/music

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "thirdparty/coi-serviceworker"]
22
path = thirdparty/coi-serviceworker
33
url = https://github.com/gzuidhof/coi-serviceworker.git
4-
[submodule "thirdparty/gles-compatibility-layer"]
5-
path = thirdparty/gles-compatibility-layer
6-
url = https://github.com/TheBrokenRail/gles-compatibility-layer.git
74
[submodule "thirdparty/SDL-src"]
85
path = thirdparty/SDL2/src
96
url = https://github.com/libsdl-org/SDL.git

CMakeLists.txt

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
cmake_minimum_required(VERSION 3.16.0)
2+
project(reminecraftpe)
3+
4+
# Store Output In Top-Level Build Directory
5+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
6+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
7+
8+
# WASM
9+
if(EMSCRIPTEN)
10+
function(add_compile_and_link_options)
11+
add_compile_options(${ARGV})
12+
add_link_options(${ARGV})
13+
endfunction()
14+
set(CMAKE_EXECUTABLE_SUFFIX ".js")
15+
add_link_options("$<$<CONFIG:DEBUG>:-gsource-map>")
16+
add_link_options(-Wno-pthreads-mem-growth -sALLOW_MEMORY_GROWTH=1)
17+
endif()
18+
19+
# Clang
20+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
21+
add_compile_options(-Wno-inconsistent-missing-override -Wno-enum-compare-switch -Wno-register)
22+
endif()
23+
24+
# Windows Linking
25+
if(WIN32)
26+
add_link_options(
27+
-static-libgcc
28+
-static-libstdc++
29+
)
30+
endif()
31+
32+
# HaikuOS Network Library
33+
if(HAIKU)
34+
link_libraries(network)
35+
endif()
36+
37+
# Threading
38+
if(EMSCRIPTEN)
39+
add_compile_and_link_options(-pthread)
40+
else()
41+
find_package(Threads)
42+
link_libraries(Threads::Threads)
43+
endif()
44+
45+
# Android Logging
46+
if(ANDROID)
47+
link_libraries(log)
48+
endif()
49+
50+
# stb_image And Other Libraries
51+
add_subdirectory(thirdparty/stb_image EXCLUDE_FROM_ALL)
52+
53+
# Load Common Code
54+
add_subdirectory(source)
55+
56+
# Load Platform-Specific Code
57+
add_subdirectory(platforms)
58+
59+
# Assets
60+
if(EMSCRIPTEN)
61+
target_link_options(reminecraftpe PRIVATE --use-preload-plugins --preload-file "${CMAKE_CURRENT_SOURCE_DIR}/game@/")
62+
else()
63+
file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/game/assets" "${CMAKE_CURRENT_BINARY_DIR}/assets" SYMBOLIC)
64+
endif()

Makefile

Lines changed: 0 additions & 71 deletions
This file was deleted.

MakefileMinGW

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)