├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .travis.yml ├── .ycm_extra_conf.py ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── REGoth-Android ├── .gitignore ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ └── shaders.zip │ │ ├── ic_launcher-web.png │ │ ├── java │ │ │ └── com │ │ │ │ └── regothproject │ │ │ │ └── regoth │ │ │ │ ├── ExtractInstallerAsyncTask.java │ │ │ │ ├── InstallerExtract.java │ │ │ │ ├── LoadLibraries.java │ │ │ │ └── StartupActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── app_icon.png │ │ │ ├── layout │ │ │ └── activity_startup.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── regothproject │ │ └── regoth │ │ └── ExampleUnitTest.java ├── build.gradle ├── build.sh ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── install_dependencies_and_build.sh └── settings.gradle ├── bin ├── archive_android.sh ├── archive_unix.sh ├── build_android.sh └── build_unix.sh ├── cmake └── clang-format.cmake ├── content ├── shaders │ ├── essl │ │ ├── fs_image.bin │ │ ├── fs_image.bin.d │ │ ├── fs_image.bin.disasm │ │ ├── fs_particle_textured.bin │ │ ├── fs_particle_textured.bin.d │ │ ├── fs_particle_textured.bin.disasm │ │ ├── fs_point_light.bin │ │ ├── fs_point_light.bin.d │ │ ├── fs_point_light.bin.disasm │ │ ├── fs_screenquad.bin │ │ ├── fs_screenquad.bin.d │ │ ├── fs_screenquad.bin.disasm │ │ ├── fs_sky_domecolor.bin │ │ ├── fs_sky_domecolor.bin.d │ │ ├── fs_sky_domecolor.bin.disasm │ │ ├── fs_skylayer.bin │ │ ├── fs_skylayer.bin.d │ │ ├── fs_skylayer.bin.disasm │ │ ├── fs_stencil_texture_clip.bin │ │ ├── fs_stencil_texture_clip.bin.d │ │ ├── fs_stencil_texture_clip.bin.disasm │ │ ├── vs_image.bin │ │ ├── vs_image.bin.d │ │ ├── vs_image.bin.disasm │ │ ├── vs_particle.bin │ │ ├── vs_particle.bin.d │ │ ├── vs_particle.bin.disasm │ │ ├── vs_screenquad.bin │ │ ├── vs_screenquad.bin.d │ │ ├── vs_screenquad.bin.disasm │ │ ├── vs_skinned.bin │ │ ├── vs_skinned.bin.d │ │ ├── vs_skinned.bin.disasm │ │ ├── vs_sky.bin │ │ ├── vs_sky.bin.d │ │ ├── vs_sky.bin.disasm │ │ ├── vs_sky_domecolor.bin │ │ ├── vs_sky_domecolor.bin.d │ │ ├── vs_sky_domecolor.bin.disasm │ │ ├── vs_world.bin │ │ ├── vs_world.bin.d │ │ ├── vs_world.bin.disasm │ │ ├── vs_world_instanced.bin │ │ ├── vs_world_instanced.bin.d │ │ └── vs_world_instanced.bin.disasm │ └── glsl │ │ ├── fs_image.bin │ │ ├── fs_image.bin.d │ │ ├── fs_image.bin.disasm │ │ ├── fs_particle_textured.bin │ │ ├── fs_particle_textured.bin.d │ │ ├── fs_particle_textured.bin.disasm │ │ ├── fs_point_light.bin │ │ ├── fs_point_light.bin.d │ │ ├── fs_point_light.bin.disasm │ │ ├── fs_screenquad.bin │ │ ├── fs_screenquad.bin.d │ │ ├── fs_screenquad.bin.disasm │ │ ├── fs_sky_domecolor.bin │ │ ├── fs_sky_domecolor.bin.d │ │ ├── fs_sky_domecolor.bin.disasm │ │ ├── fs_skylayer.bin │ │ ├── fs_skylayer.bin.d │ │ ├── fs_skylayer.bin.disasm │ │ ├── fs_stencil_texture_clip.bin │ │ ├── fs_stencil_texture_clip.bin.d │ │ ├── fs_stencil_texture_clip.bin.disasm │ │ ├── vs_image.bin │ │ ├── vs_image.bin.d │ │ ├── vs_image.bin.disasm │ │ ├── vs_particle.bin │ │ ├── vs_particle.bin.d │ │ ├── vs_particle.bin.disasm │ │ ├── vs_screenquad.bin │ │ ├── vs_screenquad.bin.d │ │ ├── vs_screenquad.bin.disasm │ │ ├── vs_skinned.bin │ │ ├── vs_skinned.bin.d │ │ ├── vs_skinned.bin.disasm │ │ ├── vs_sky.bin │ │ ├── vs_sky.bin.d │ │ ├── vs_sky.bin.disasm │ │ ├── vs_sky_domecolor.bin │ │ ├── vs_sky_domecolor.bin.d │ │ ├── vs_sky_domecolor.bin.disasm │ │ ├── vs_world.bin │ │ ├── vs_world.bin.d │ │ ├── vs_world.bin.disasm │ │ ├── vs_world_instanced.bin │ │ ├── vs_world_instanced.bin.d │ │ └── vs_world_instanced.bin.disasm └── sky.json ├── create_git_hooks.sh ├── hooks └── pre-commit ├── lib ├── adpcm │ ├── CMakeLists.txt │ ├── README │ ├── adpcm-lib.cpp │ ├── adpcm-lib.h │ ├── adpcm-xq.c │ └── license.txt └── json │ ├── LICENSE.MIT │ └── json.hpp ├── src ├── android │ ├── AndroidManifest.xml.in │ ├── Apk.cmake │ ├── CMakeLists.txt │ ├── LoadLibraries.java.in │ ├── android.toolchain.cmake │ ├── compat │ │ ├── malloc.c │ │ └── malloc.h │ ├── src │ │ └── Main.cpp │ └── strings.xml.in ├── audio │ ├── AudioEngine.cpp │ ├── AudioEngine.h │ ├── AudioWorld.cpp │ ├── AudioWorld.h │ ├── WavReader.cpp │ └── WavReader.h ├── components │ ├── AnimHandler.cpp │ ├── AnimHandler.h │ ├── Entities.cpp │ ├── Entities.h │ ├── EntityActions.cpp │ ├── EntityActions.h │ ├── Vob.cpp │ ├── Vob.h │ ├── VobClasses.cpp │ └── VobClasses.h ├── content │ ├── Animation.h │ ├── AnimationAllocator.h │ ├── AnimationLibrary.cpp │ ├── AnimationLibrary.h │ ├── ContentLoad.cpp │ ├── ContentLoad.h │ ├── GenericMeshAllocator.cpp │ ├── GenericMeshAllocator.h │ ├── Materials.h │ ├── Shader.cpp │ ├── Shader.h │ ├── SkeletalMeshAllocator.cpp │ ├── SkeletalMeshAllocator.h │ ├── Sky.cpp │ ├── Sky.h │ ├── SkyConfig.cpp │ ├── SkyConfig.h │ ├── StaticLevelMesh.cpp │ ├── StaticLevelMesh.h │ ├── StaticMesh.h │ ├── StaticMeshAllocator.cpp │ ├── StaticMeshAllocator.h │ ├── Texture.cpp │ ├── Texture.h │ ├── VertexTypes.cpp │ └── VertexTypes.h ├── engine │ ├── BaseEngine.cpp │ ├── BaseEngine.h │ ├── BspTree.cpp │ ├── BspTree.h │ ├── GameClock.cpp │ ├── GameClock.h │ ├── GameEngine.cpp │ ├── GameEngine.h │ ├── GameSession.cpp │ ├── GameSession.h │ ├── Input.cpp │ ├── Input.h │ ├── JobManager.cpp │ ├── JobManager.h │ ├── Platform.cpp │ ├── Platform.h │ ├── PlatformAndroid.cpp │ ├── PlatformAndroid.h │ ├── PlatformGLFW.cpp │ ├── PlatformGLFW.h │ ├── Waynet.cpp │ ├── Waynet.h │ ├── World.cpp │ ├── World.h │ ├── WorldAllocators.h │ ├── WorldMesh.cpp │ ├── WorldMesh.h │ └── WorldTypes.h ├── handle │ ├── Handle.h │ └── HandleDef.h ├── logic │ ├── CameraController.cpp │ ├── CameraController.h │ ├── CharacterEquipment.cpp │ ├── CharacterEquipment.h │ ├── Console.cpp │ ├── Console.h │ ├── Controller.cpp │ ├── Controller.h │ ├── ControllerTypes.h │ ├── DialogManager.cpp │ ├── DialogManager.h │ ├── Inventory.cpp │ ├── Inventory.h │ ├── ItemController.cpp │ ├── ItemController.h │ ├── LogManager.cpp │ ├── LogManager.h │ ├── LogicDef.h │ ├── MobController.cpp │ ├── MobController.h │ ├── MusicController.cpp │ ├── MusicController.h │ ├── NpcAIHandler.cpp │ ├── NpcAIHandler.h │ ├── NpcAnimationHandler.cpp │ ├── NpcAnimationHandler.h │ ├── NpcScriptState.cpp │ ├── NpcScriptState.h │ ├── Pathfinder.cpp │ ├── Pathfinder.h │ ├── PfxManager.cpp │ ├── PfxManager.h │ ├── PlayerController.cpp │ ├── PlayerController.h │ ├── SavegameManager.cpp │ ├── SavegameManager.h │ ├── ScriptEngine.cpp │ ├── ScriptEngine.h │ ├── SoundController.cpp │ ├── SoundController.h │ ├── VisualController.cpp │ ├── VisualController.h │ ├── messages │ │ ├── EventManager.cpp │ │ ├── EventManager.h │ │ ├── EventMessage.cpp │ │ └── EventMessage.h │ ├── mobs │ │ ├── Bed.cpp │ │ ├── Bed.h │ │ ├── Container.cpp │ │ ├── Container.h │ │ ├── Ladder.cpp │ │ └── Ladder.h │ ├── scriptExternals │ │ ├── Externals.cpp │ │ ├── Externals.h │ │ ├── Stubs.cpp │ │ ├── Stubs.h │ │ └── findUnimplemented.py │ └── visuals │ │ ├── ModelVisual.cpp │ │ ├── ModelVisual.h │ │ ├── PfxVisual.cpp │ │ ├── PfxVisual.h │ │ ├── StaticMeshVisual.cpp │ │ ├── StaticMeshVisual.h │ │ └── VisualTypes.h ├── math │ ├── mathlib.cpp │ └── mathlib.h ├── memory │ ├── AllocatorBundle.h │ ├── ComponentSystem.h │ ├── Config.h │ ├── FreeList.h │ ├── MemUtils.h │ ├── MeshAllocator.h │ ├── ObjectAllocator.h │ └── StaticReferencedAllocator.h ├── physics │ ├── DebugDrawer.h │ ├── MotionState.cpp │ ├── MotionState.h │ ├── PhysicsSystem.cpp │ └── PhysicsSystem.h ├── render │ ├── RenderSystem.cpp │ ├── RenderSystem.h │ ├── SkyRendering.cpp │ ├── SkyRendering.h │ ├── ViewList.h │ ├── WorldRender.cpp │ └── WorldRender.h ├── rgconfig.h.in ├── shaders │ ├── fs_image.sc │ ├── fs_particle_textured.sc │ ├── fs_point_light.sc │ ├── fs_screenquad.sc │ ├── fs_sky_domecolor.sc │ ├── fs_skylayer.sc │ ├── fs_stencil_texture_clip.sc │ ├── makefile │ ├── tools.sh │ ├── varying.def.sc │ ├── vs_image.sc │ ├── vs_particle.sc │ ├── vs_screenquad.sc │ ├── vs_skinned.sc │ ├── vs_sky.sc │ ├── vs_sky_domecolor.sc │ ├── vs_world.sc │ └── vs_world_instanced.sc ├── target │ ├── CMakeLists.txt │ ├── REGoth.cpp │ └── REGoth.h ├── ui │ ├── BarView.cpp │ ├── BarView.h │ ├── ConsoleBox.cpp │ ├── ConsoleBox.h │ ├── DialogBox.cpp │ ├── DialogBox.h │ ├── Hud.cpp │ ├── Hud.h │ ├── ImageView.cpp │ ├── ImageView.h │ ├── IntroduceChapterView.cpp │ ├── IntroduceChapterView.h │ ├── LoadingScreen.cpp │ ├── LoadingScreen.h │ ├── Menu.cpp │ ├── Menu.h │ ├── MenuItem.cpp │ ├── MenuItem.h │ ├── MenuItemListbox.cpp │ ├── MenuItemListbox.h │ ├── MenuItemListboxEntry.cpp │ ├── MenuItemListboxEntry.h │ ├── MenuItemScrollableText.cpp │ ├── MenuItemScrollableText.h │ ├── Menu_Load.cpp │ ├── Menu_Load.h │ ├── Menu_Log.cpp │ ├── Menu_Log.h │ ├── Menu_Main.cpp │ ├── Menu_Main.h │ ├── Menu_Save.cpp │ ├── Menu_Save.h │ ├── Menu_Settings.cpp │ ├── Menu_Settings.h │ ├── Menu_Status.cpp │ ├── Menu_Status.h │ ├── PrintScreenMessages.cpp │ ├── PrintScreenMessages.h │ ├── SubtitleBox.cpp │ ├── SubtitleBox.h │ ├── TextView.cpp │ ├── TextView.h │ ├── View.cpp │ ├── View.h │ ├── zFont.cpp │ └── zFont.h └── utils │ ├── GLFW_Keys.h │ ├── Utils.cpp │ ├── Utils.h │ ├── bgfx_lib.h │ ├── cli.cpp │ ├── cli.h │ ├── naturalcompare.h │ ├── tuple.h │ ├── zTools.cpp │ └── zTools.h ├── toolchain └── toolchain-cross-compile-mingw32.cmake ├── update_ctags_cscope.sh ├── update_git.bat └── update_git.sh /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | IndentWidth: 4 5 | # don't indent public, private and protected 6 | AccessModifierOffset: -4 7 | BreakBeforeBraces: Allman 8 | # respect user choice for line breaking 9 | ColumnLimit: 0 10 | BreakConstructorInitializersBeforeComma: true 11 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 12 | SortIncludes: false 13 | DerivePointerAlignment: false 14 | PointerAlignment: Left 15 | NamespaceIndentation: All 16 | SortIncludes: true 17 | 18 | IncludeCategories: 19 | - Regex: '<[^./]+>' # c++ stl includes 20 | Priority: 1 21 | - Regex: '(<|")[^/]+(>|")' # includes without path 22 | Priority: 2 23 | - Regex: '(<|").+(>|")' # includes with path 24 | Priority: 3 25 | ... 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Compiled Static libraries 17 | *.lai 18 | *.la 19 | *.a 20 | *.lib 21 | 22 | # Executables 23 | *.exe 24 | *.out 25 | *.app 26 | 27 | #vdf 28 | *.vdf 29 | *.mod 30 | 31 | #build dir 32 | build/ 33 | winbuild/ 34 | *build/ 35 | and-build/ 36 | cmake-build*/ 37 | 38 | #dolphin 39 | .directory 40 | 41 | # clion 42 | .idea/ 43 | 44 | # vim 45 | *.swp 46 | *.vim 47 | 48 | # Gothic 49 | _work/ 50 | Data/ 51 | 52 | # CScope, Ctags 53 | cscope.files 54 | tags 55 | 56 | # Visual Studio 57 | .vs 58 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/bgfx-cmake"] 2 | path = lib/bgfx-cmake 3 | url = https://github.com/degenerated1123/bgfx-cmake.git 4 | [submodule "lib/ZenLib"] 5 | path = lib/ZenLib 6 | url = https://github.com/degenerated1123/ZenLib.git 7 | [submodule "lib/glm"] 8 | path = lib/glm 9 | url = https://github.com/g-truc/glm.git 10 | [submodule "lib/tinydir"] 11 | path = lib/tinydir 12 | url = https://github.com/cxong/tinydir.git 13 | [submodule "lib/bullet3"] 14 | path = lib/bullet3 15 | url = https://github.com/bulletphysics/bullet3.git 16 | [submodule "lib/glfw"] 17 | path = lib/glfw 18 | url = https://github.com/glfw/glfw.git 19 | [submodule "lib/adpcm-xq"] 20 | path = lib/adpcm-xq 21 | url = https://github.com/dbry/adpcm-xq.git 22 | [submodule "lib/openal-soft"] 23 | path = lib/openal-soft 24 | url = https://github.com/kcat/openal-soft.git 25 | [submodule "lib/CAB-Installer-Extractor"] 26 | path = lib/CAB-Installer-Extractor 27 | url = https://github.com/REGoth-project/CAB-Installer-Extractor.git 28 | [submodule "lib/libdmusic"] 29 | path = lib/libdmusic 30 | url = https://github.com/frabert/libdmusic.git 31 | [submodule "lib/optional"] 32 | path = lib/optional 33 | url = https://github.com/TartanLlama/optional.git 34 | -------------------------------------------------------------------------------- /REGoth-Android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | android-dependencies/ 10 | .externalNativeBuild/ 11 | -------------------------------------------------------------------------------- /REGoth-Android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /REGoth-Android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion '25.0.0' 6 | flavorDimensions "tier" 7 | 8 | productFlavors { 9 | arm { 10 | ndk { 11 | abiFilters "armeabi-v7a" 12 | dimension "tier" 13 | } 14 | } 15 | } 16 | 17 | defaultConfig { 18 | applicationId "com.regothproject.regoth" 19 | minSdkVersion 21 20 | targetSdkVersion 21 21 | versionCode 1 22 | versionName "1.0" 23 | externalNativeBuild { 24 | cmake { 25 | cppFlags "-std=c++14 -Wno-format-security" 26 | arguments '-DANDROID_STL=c++_shared', '-DCMAKE_BUILD_TYPE=RelWithDebInfo' 27 | } 28 | } 29 | } 30 | buildTypes { 31 | release { 32 | minifyEnabled false 33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 34 | } 35 | } 36 | externalNativeBuild { 37 | cmake { 38 | path '../../CMakeLists.txt' 39 | } 40 | } 41 | 42 | sourceSets { 43 | main { 44 | //jniLibs.srcDirs 'imported-lib/src/', 'more-imported-libs/src/' 45 | } 46 | } 47 | } 48 | 49 | dependencies { 50 | compile fileTree(dir: 'libs', include: ['*.jar']) 51 | compile 'com.android.support:appcompat-v7:21.0.3' 52 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 53 | testCompile 'junit:junit:4.12' 54 | } 55 | -------------------------------------------------------------------------------- /REGoth-Android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/desktop/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/assets/shaders.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/assets/shaders.zip -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/java/com/regothproject/regoth/InstallerExtract.java: -------------------------------------------------------------------------------- 1 | package com.regothproject.regoth; 2 | 3 | public class InstallerExtract 4 | { 5 | /** 6 | * Attempts to extract the given installer file 7 | * @param installerFile File to extract 8 | * @return Success 9 | */ 10 | public static native boolean extractInstaller(String installerFile); 11 | 12 | /** 13 | * @return Whether valid gamedata to run from is available 14 | */ 15 | public static native boolean hasGameData(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/java/com/regothproject/regoth/LoadLibraries.java: -------------------------------------------------------------------------------- 1 | package com.regothproject.regoth; 2 | 3 | import android.app.NativeActivity; 4 | import android.os.Bundle; 5 | 6 | public class LoadLibraries extends NativeActivity { 7 | 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/res/drawable/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/drawable/app_icon.png -------------------------------------------------------------------------------- /REGoth-Android/app/src/main/res/layout/activity_startup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 |