Skip to content

Commit

Permalink
Upload source code
Browse files Browse the repository at this point in the history
  • Loading branch information
MFDGaming committed Sep 7, 2022
0 parents commit 6aca5df
Show file tree
Hide file tree
Showing 85 changed files with 15,872 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/
assets/
libs/x86/libminecraftpe.so
libs/arm/libminecraftpe.so
.vscode/
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.1)
project(mcpereborn)

if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm)|(armhf)|(aarch64)|(arm64)")
set(IS_ARM_BUILD TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthumb")
else()
set(IS_ARM_BUILD FALSE)
endif()

add_subdirectory(libhybris)
add_subdirectory(glad)
add_subdirectory(ninecraft)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 MFDGaming

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DEFAULT_GOAL := build

BUILD_DIR ?= build/

.PHONY: build
build: clean
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}; cmake ..; make

.PHONY: clean
clean:
rm -rf $(BUILD_DIR)
7 changes: 7 additions & 0 deletions cmake/FindEGL.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)

set(EGL_NAMES ${EGL_NAMES} egl EGL)
find_library(EGL_LIBRARY NAMES ${EGL_NAMES})

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL DEFAULT_MSG EGL_INCLUDE_DIR EGL_LIBRARY)
7 changes: 7 additions & 0 deletions cmake/FindGLFW3.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find_path(GLFW3_INCLUDE_DIR NAMES GLFW/glfw3.h)

set(GLFW3_NAMES ${GLFW3_NAMES} glfw3 glfw)
find_library(GLFW3_LIBRARY NAMES ${GLFW3_NAMES})

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW3 DEFAULT_MSG GLFW3_INCLUDE_DIR GLFW3_LIBRARY)
11 changes: 11 additions & 0 deletions glad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required (VERSION 3.1)

project(glad)

set(GLAD_SOURCES src/glad.c)

add_library(glad ${GLAD_SOURCES})
target_include_directories(glad PUBLIC include/)
if (NOT ${IS_ARM_BUILD})
set_target_properties(glad PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
endif()
Loading

0 comments on commit 6aca5df

Please sign in to comment.