the whole game
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
build/
|
||||
linux-build/
|
||||
156
CMakeLists.txt
Executable file
@@ -0,0 +1,156 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
project(MinecraftPE)
|
||||
|
||||
include(cmake/CPM.cmake)
|
||||
|
||||
CPMAddPackage("gh:madler/zlib@1.3.2")
|
||||
CPMAddPackage(
|
||||
NAME "libpng"
|
||||
GIT_REPOSITORY "https://github.com/pnggroup/libpng.git"
|
||||
GIT_TAG "v1.6.55"
|
||||
OPTIONS
|
||||
"ZLIB_ROOT ${zlib_SOURCE_DIR}"
|
||||
"ZLIB_INCLUDE_DIRS ${zlib_SOURCE_DIR}"
|
||||
"PNG_TOOLS OFF"
|
||||
"PNG_TESTS OFF"
|
||||
"BUILD_SHARED_LIBS ON"
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME "openal"
|
||||
GIT_REPOSITORY "https://github.com/kcat/openal-soft.git"
|
||||
GIT_TAG "1.25.1"
|
||||
OPTIONS
|
||||
"ALSOFT_EXAMPLES OFF"
|
||||
"ALSOFT_TESTS OFF"
|
||||
"ALSOFT_UTILS OFF"
|
||||
"BUILD_SHARED_LIBS ON"
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME "glfw"
|
||||
GIT_REPOSITORY "https://github.com/glfw/glfw.git"
|
||||
GIT_TAG "3.4"
|
||||
OPTIONS
|
||||
"GLFW_BUILD_EXAMPLES OFF"
|
||||
"GLFW_BUILD_TESTS OFF"
|
||||
"GLFW_BUILD_DOCS OFF"
|
||||
"BUILD_SHARED_LIBS ON"
|
||||
)
|
||||
|
||||
file(GLOB SOURCES
|
||||
"src/client/*.cpp"
|
||||
|
||||
"src/client/gamemode/*.cpp"
|
||||
"src/client/gui/*.cpp"
|
||||
"src/client/gui/components/*.cpp"
|
||||
"src/client/gui/screens/*.cpp"
|
||||
"src/client/gui/screens/crafting/*.cpp"
|
||||
"src/client/gui/screens/touch/*.cpp"
|
||||
|
||||
"src/client/model/*.cpp"
|
||||
"src/client/model/geom/*.cpp"
|
||||
|
||||
"src/client/particle/*.cpp"
|
||||
|
||||
"src/client/player/*.cpp"
|
||||
"src/client/player/input/*.cpp"
|
||||
"src/client/player/input/touchscreen/*.cpp"
|
||||
|
||||
"src/client/renderer/*.cpp"
|
||||
"src/client/renderer/culling/*.cpp"
|
||||
"src/client/renderer/entity/*.cpp"
|
||||
"src/client/renderer/ptexture/*.cpp"
|
||||
"src/client/renderer/tileentity/*.cpp"
|
||||
|
||||
"src/client/sound/*.cpp"
|
||||
|
||||
"src/locale/*.cpp"
|
||||
|
||||
"src/nbt/*.cpp"
|
||||
|
||||
"src/network/*.cpp"
|
||||
"src/network/command/*.cpp"
|
||||
|
||||
"src/platform/*.cpp"
|
||||
"src/platform/audio/SoundSystemAL.cpp"
|
||||
"src/platform/input/*.cpp"
|
||||
|
||||
"src/raknet/**.cpp"
|
||||
|
||||
"src/server/**.cpp"
|
||||
|
||||
"src/util/**.cpp"
|
||||
|
||||
"src/world/*.cpp"
|
||||
"src/world/phys/*.cpp"
|
||||
"src/world/entity/*.cpp"
|
||||
"src/world/entity/ai/control/*.cpp"
|
||||
"src/world/entity/animal/*.cpp"
|
||||
"src/world/entity/item/*.cpp"
|
||||
"src/world/entity/monster/*.cpp"
|
||||
"src/world/entity/player/*.cpp"
|
||||
"src/world/entity/projectile/*.cpp"
|
||||
|
||||
"src/world/food/*.cpp"
|
||||
"src/world/inventory/*.cpp"
|
||||
|
||||
"src/world/item/*.cpp"
|
||||
"src/world/item/crafting/*.cpp"
|
||||
|
||||
"src/world/level/*.cpp"
|
||||
"src/world/level/biome/*.cpp"
|
||||
"src/world/level/chunk/*.cpp"
|
||||
"src/world/level/dimension/*.cpp"
|
||||
"src/world/level/levelgen/*.cpp"
|
||||
"src/world/level/levelgen/feature/*.cpp"
|
||||
"src/world/level/levelgen/synth/*.cpp"
|
||||
"src/world/level/material/*.cpp"
|
||||
"src/world/level/pathfinder/*.cpp"
|
||||
"src/world/level/storage/*.cpp"
|
||||
"src/world/level/tile/*.cpp"
|
||||
"src/world/level/tile/entity/*.cpp"
|
||||
|
||||
"src/SharedConstants.cpp"
|
||||
"src/main.cpp"
|
||||
"src/NinecraftApp.cpp"
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
${SOURCES}
|
||||
|
||||
#TODO: if PLATFORM=PLATFORM_GLFW
|
||||
"src/AppPlatform_glfw.cpp"
|
||||
|
||||
"glad/src/glad.c"
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
"${CMAKE_SOURCE_DIR}/glad/include/"
|
||||
"${CMAKE_SOURCE_DIR}/src"
|
||||
"${openal_SOURCE_DIR}/include"
|
||||
"${glfw_SOURCE_DIR}/include"
|
||||
"lib/include"
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC "OPENGL_ES" "NO_EGL" "_CRT_SECURE_NO_WARNINGS" "PLATFORM_GLFW")
|
||||
|
||||
# TODO: add ws2_32 lib if windows
|
||||
# TODO: fix openal linking for windows
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} zlib png_shared alsoft.common OpenAL glfw)
|
||||
|
||||
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:${PROJECT_NAME}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/data" $<TARGET_FILE_DIR:${PROJECT_NAME}>/data
|
||||
)
|
||||
1363
cmake/CPM.cmake
Executable file
BIN
data/app/ios/bg128.png
Executable file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
data/app/ios/bg64.png
Executable file
|
After Width: | Height: | Size: 745 B |
BIN
data/app/ios/dialog/cancel_0.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/app/ios/dialog/cancel_0_1.png
Executable file
|
After Width: | Height: | Size: 637 B |
BIN
data/app/ios/dialog/cancel_0_3.png
Executable file
|
After Width: | Height: | Size: 924 B |
BIN
data/app/ios/dialog/cancel_1.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
data/app/ios/dialog/cancel_1_1.png
Executable file
|
After Width: | Height: | Size: 673 B |
BIN
data/app/ios/dialog/cancel_1_3.png
Executable file
|
After Width: | Height: | Size: 972 B |
BIN
data/app/ios/dialog/create_0.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
data/app/ios/dialog/create_0_1.png
Executable file
|
After Width: | Height: | Size: 652 B |
BIN
data/app/ios/dialog/create_0_3.png
Executable file
|
After Width: | Height: | Size: 940 B |
BIN
data/app/ios/dialog/create_1.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
data/app/ios/dialog/create_1_1.png
Executable file
|
After Width: | Height: | Size: 701 B |
BIN
data/app/ios/dialog/create_1_3.png
Executable file
|
After Width: | Height: | Size: 1012 B |
BIN
data/app/ios/dialog/ipad/cancel_0_4.png
Executable file
|
After Width: | Height: | Size: 1023 B |
BIN
data/app/ios/dialog/ipad/cancel_1_4.png
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
data/app/ios/dialog/ipad/create_0_4.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/app/ios/dialog/ipad/create_1_4.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/app/ios/dialog/ipad/creative_0_4.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/app/ios/dialog/ipad/creative_1_4.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
data/app/ios/dialog/ipad/creative_3_4.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
data/app/ios/dialog/ipad/survival_0_4.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/app/ios/dialog/ipad/survival_1_4.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
data/app/ios/dialog/ipad/survival_3_4.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
data/app/ios/dialog/ipad/worldname_ipad_4.png
Executable file
|
After Width: | Height: | Size: 931 B |
BIN
data/app/ios/dialog/save_0.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/app/ios/dialog/save_0_3.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
data/app/ios/dialog/save_1.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/app/ios/dialog/save_1_3.png
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
data/app/ios/dialog/worldname_ipad.png
Executable file
|
After Width: | Height: | Size: 539 B |
BIN
data/app/ios/dialog/worldname_ipad_3.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
data/app/ios/dialog/worldname_iphone.png
Executable file
|
After Width: | Height: | Size: 521 B |
BIN
data/app/ios/dialog/worldname_iphone_3.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
data/app/ios/dialog2/cancel_0_1.png
Executable file
|
After Width: | Height: | Size: 612 B |
BIN
data/app/ios/dialog2/cancel_0_3.png
Executable file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
data/app/ios/dialog2/cancel_1_1.png
Executable file
|
After Width: | Height: | Size: 632 B |
BIN
data/app/ios/dialog2/cancel_1_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/create_0_1.png
Executable file
|
After Width: | Height: | Size: 630 B |
BIN
data/app/ios/dialog2/create_0_3.png
Executable file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
data/app/ios/dialog2/create_1_1.png
Executable file
|
After Width: | Height: | Size: 649 B |
BIN
data/app/ios/dialog2/create_1_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/creative_0_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/creative_1_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/survival_0_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/survival_1_3.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
data/app/ios/dialog2/worldname.png
Executable file
|
After Width: | Height: | Size: 589 B |
BIN
data/app/ios/dialog2/worldname_3.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/app/ios/dialog2/worldname_ipad.png
Executable file
|
After Width: | Height: | Size: 539 B |
BIN
data/app/ios/dialog2/worldname_ipad_3.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
data/app/ios/dialog2/worldname_iphone.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
data/app/ios/dialog2/worldname_iphone5_3.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
data/app/ios/dialog2/worldname_iphone_3.png
Executable file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
data/app/ios/icons/Icon-72.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
data/app/ios/icons/Icon-72_lite.png
Executable file
|
After Width: | Height: | Size: 13 KiB |
BIN
data/app/ios/icons/Icon-Small-50.png
Executable file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
data/app/ios/icons/Icon-Small-50_lite.png
Executable file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
data/app/ios/icons/Icon-Small.png
Executable file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
data/app/ios/icons/Icon-Small@2x.png
Executable file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
data/app/ios/icons/Icon-Small@2x_lite.png
Executable file
|
After Width: | Height: | Size: 10 KiB |
BIN
data/app/ios/icons/Icon-Small_lite.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
data/app/ios/icons/Icon.png
Executable file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
data/app/ios/icons/Icon@2x.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
BIN
data/app/ios/icons/Icon@2x_lite.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
data/app/ios/icons/Icon_lite.png
Executable file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
data/app/ios/icons/mcpe_ios_icon.png
Executable file
|
After Width: | Height: | Size: 76 KiB |
BIN
data/app/ios/icons/mcpe_lite_ios_icon.png
Executable file
|
After Width: | Height: | Size: 91 KiB |
BIN
data/app/launch/Default-Landscape~ipad.png
Executable file
|
After Width: | Height: | Size: 66 KiB |
BIN
data/app/launch/Default.png
Executable file
|
After Width: | Height: | Size: 20 KiB |
BIN
data/app/launch/Default@2x.png
Executable file
|
After Width: | Height: | Size: 67 KiB |
BIN
data/fonts/minecraft.ttf
Executable file
BIN
data/images/armor/chain_1.png
Executable file
|
After Width: | Height: | Size: 964 B |
BIN
data/images/armor/chain_2.png
Executable file
|
After Width: | Height: | Size: 523 B |
BIN
data/images/armor/cloth_1.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/images/armor/cloth_2.png
Executable file
|
After Width: | Height: | Size: 710 B |
BIN
data/images/armor/diamond_1.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/armor/diamond_2.png
Executable file
|
After Width: | Height: | Size: 724 B |
BIN
data/images/armor/gold_1.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/armor/gold_2.png
Executable file
|
After Width: | Height: | Size: 708 B |
BIN
data/images/armor/iron_1.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
data/images/armor/iron_2.png
Executable file
|
After Width: | Height: | Size: 686 B |
BIN
data/images/art/kz.png
Executable file
|
After Width: | Height: | Size: 84 KiB |
BIN
data/images/environment/clouds.png
Executable file
|
After Width: | Height: | Size: 13 KiB |
BIN
data/images/font/default8.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
data/images/gui/background.png
Executable file
|
After Width: | Height: | Size: 368 B |
BIN
data/images/gui/badge/minecon140.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
data/images/gui/bg32.png
Executable file
|
After Width: | Height: | Size: 508 B |
BIN
data/images/gui/cursor.png
Executable file
|
After Width: | Height: | Size: 281 B |
BIN
data/images/gui/default_world.png
Executable file
|
After Width: | Height: | Size: 25 KiB |
BIN
data/images/gui/gui.png
Executable file
|
After Width: | Height: | Size: 23 KiB |
BIN
data/images/gui/gui2.png
Executable file
|
After Width: | Height: | Size: 14 KiB |
BIN
data/images/gui/gui_blocks.png
Executable file
|
After Width: | Height: | Size: 174 KiB |
BIN
data/images/gui/icons.png
Executable file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
data/images/gui/itemframe.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
data/images/gui/items.png
Executable file
|
After Width: | Height: | Size: 29 KiB |
BIN
data/images/gui/logo/raknet_high_72.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
data/images/gui/logo/raknet_low_18.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
data/images/gui/pi_title.png
Executable file
|
After Width: | Height: | Size: 6.6 KiB |