├── .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 |
30 |
31 |
40 |
41 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | REGoth
3 | https://www.worldofgothic.de/download.php?id=3
4 |
5 |
--------------------------------------------------------------------------------
/REGoth-Android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/REGoth-Android/app/src/test/java/com/regothproject/regoth/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.regothproject.regoth;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/REGoth-Android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/REGoth-Android/build.sh:
--------------------------------------------------------------------------------
1 | pushd "$(dirname "$0")"
2 |
3 | ./gradlew build
4 |
5 | popd # Leaving script folder
6 |
--------------------------------------------------------------------------------
/REGoth-Android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | android.builder.sdkDownload=true
20 |
--------------------------------------------------------------------------------
/REGoth-Android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/REGoth-Android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/REGoth-Android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Jun 13 20:25:35 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/REGoth-Android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/REGoth-Android/install_dependencies_and_build.sh:
--------------------------------------------------------------------------------
1 | git submodule update --init --recursive
2 |
3 | pushd "$(dirname "$0")"
4 |
5 | mkdir -p android-dependencies
6 |
7 | pushd android-dependencies
8 |
9 | # Download Android SDK and NDK
10 | #curl -L https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip -O
11 | curl -L https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
12 |
13 |
14 | # Install NDK
15 | #mkdir -p android-ndk
16 | #unzip -q android-ndk-r14b-linux-x86_64.zip -d android-ndk
17 | #rm android-ndk-r14b-linux-x86_64.zip
18 |
19 | # Install SDK
20 | mkdir -p android-sdk
21 | unzip -q sdk-tools-linux-3859397.zip -d android-sdk
22 | rm sdk-tools-linux-3859397.zip
23 |
24 | # Setup environment
25 | export ANDROID_HOME=`pwd`/android-sdk
26 | #export ANDROID_NDK_HOME=`pwd`/android-ndk
27 | #export LOCAL_ANDROID_NDK_HOME="$ANDROID_NDK_HOME"
28 | #export LOCAL_ANDROID_NDK_HOST_PLATFORM="linux-x86_64"
29 | export PATH=$PATH:${ANDROID_HOME}
30 | export PATH=$PATH:${ANDROID_HOME}/tools
31 | #export PATH=$PATH:${ANDROID_NDK_HOME}
32 |
33 | # Setup Android SDK
34 | echo "Updating SDK"
35 | yes | ${ANDROID_HOME}/tools/bin/sdkmanager --update > /dev/null # /dev/null because travis complains about the build log getting too long
36 |
37 | echo "Downloading Android Build Tools"
38 | yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-21" "build-tools;25.0.2" "extras;google;m2repository" "extras;android;m2repository" "ndk-bundle" > /dev/null
39 |
40 | echo "Andorid SDK Licenses..."
41 | yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses
42 |
43 | popd # Leaving dependencies
44 |
45 | export TERM=dumb # Fixes gradle output looking bad
46 | ./gradlew build
47 |
48 | popd # Leaving script-folder
49 |
--------------------------------------------------------------------------------
/REGoth-Android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/bin/archive_android.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x -o pipefail
3 |
4 | rm -rf dist/
5 | mkdir -p dist/
6 | if [ -z "$PLATFORM" ]; then
7 | PLATFORM=$TRAVIS_OS_NAME
8 | fi
9 | FILENAME=REGoth-${TRAVIS_BRANCH}-${PLATFORM}-debug.apk
10 | cp REGoth-Android/app/build/outputs/apk/app-arm-debug.apk dist/${FILENAME}
11 |
--------------------------------------------------------------------------------
/bin/archive_unix.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x -o pipefail
3 |
4 | rm -rf dist/
5 | mkdir -p dist/
6 | if [ -z "$PLATFORM" ]; then
7 | PLATFORM=$TRAVIS_OS_NAME
8 | fi
9 | FILENAME=REGoth-${TRAVIS_BRANCH}-${PLATFORM}.tar.gz
10 | tar -zcf dist/${FILENAME} -C build/bin REGoth shaders/
11 |
--------------------------------------------------------------------------------
/bin/build_android.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x -o pipefail
3 |
4 | export TERM=dumb # Fixes gradle output looking bad
5 |
6 | mkdir build-libsndfile
7 | cd build-libsndfile
8 |
9 | cmake -DCMAKE_SYSTEM_NAME=Android -DBUILD_PROGRAMS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF \
10 | -DBUILD_REGTEST=OFF -DANDROID_NDK=$ANDROID_NDK_HOME -DDISABLE_EXTERNAL_LIBS=On \
11 | -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a \
12 | -DCMAKE_INSTALL_PREFIX=$ANDROID_NDK_HOME/sysroot ../lib/libdmusic/utils/dls2sf/lib/libsndfile
13 | make -j4
14 | make install
15 |
16 | mkdir -p ../REGoth-Android/app/src/main/jniLibs/armeabi-v7a
17 | cp $ANDROID_NDK_HOME/sysroot/lib/libsndfile.so ../REGoth-Android/app/src/main/jniLibs/armeabi-v7a/libsndfile.so
18 |
19 | cd ../REGoth-Android/
20 | # Release build should be signed, while debug signs automatically
21 | ./gradlew assembleDebug
22 |
--------------------------------------------------------------------------------
/bin/build_unix.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e -x -o pipefail
3 |
4 | if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
5 |
6 | mkdir -p build
7 | cd build
8 | cmake -DCMAKE_BUILD_TYPE=Release ..
9 | make -j4
10 |
--------------------------------------------------------------------------------
/cmake/clang-format.cmake:
--------------------------------------------------------------------------------
1 | file(GLOB_RECURSE
2 | ALL_CXX_SOURCE_FILES
3 | ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h
4 | )
5 |
6 | find_program(CLANG_FORMAT "clang-format")
7 | if(CLANG_FORMAT)
8 | add_custom_target(
9 | clang-format
10 | COMMAND ${CLANG_FORMAT}
11 | -i
12 | -style=file
13 | ${ALL_CXX_SOURCE_FILES}
14 | )
15 | endif()
16 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_image.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_image.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_image.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_image.bin : \
2 | varying.def.sc \
3 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh
4 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_image.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec2 v_texcoord0;
2 | uniform sampler2D s_texColor;
3 | void main ()
4 | {
5 | lowp vec4 tmpvar_1;
6 | tmpvar_1 = texture2D (s_texColor, v_texcoord0);
7 | gl_FragColor = tmpvar_1;
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_particle_textured.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_particle_textured.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_particle_textured.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_particle_textured.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_particle_textured.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec4 v_color;
2 | varying highp vec2 v_texcoord0;
3 | varying highp vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform highp vec4 u_FogNearFar;
6 | void main ()
7 | {
8 | lowp vec4 color_1;
9 | color_1 = ((texture2D (s_texColor, v_texcoord0) * v_color) * clamp ((
10 | (sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x)
11 | /
12 | (u_FogNearFar.y - u_FogNearFar.x)
13 | ), 0.0, 1.0));
14 | gl_FragColor = color_1;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_point_light.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_point_light.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_point_light.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_point_light.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_point_light.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec2 v_texcoord0;
2 | varying highp vec3 v_view_normal;
3 | varying highp vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform highp vec4 u_LightPosition_Radius;
6 | uniform highp vec4 u_LightColor;
7 | uniform highp vec4 u_FogColor;
8 | uniform highp vec4 u_FogNearFar;
9 | void main ()
10 | {
11 | highp float tmpvar_1;
12 | tmpvar_1 = (u_LightPosition_Radius.w * 5.0);
13 | highp float tmpvar_2;
14 | highp vec3 x_3;
15 | x_3 = (u_LightPosition_Radius.xyz - v_view_pos);
16 | tmpvar_2 = sqrt(dot (x_3, x_3));
17 | highp float tmpvar_4;
18 | tmpvar_4 = clamp ((1.0 - (
19 | (tmpvar_2 * tmpvar_2)
20 | /
21 | (tmpvar_1 * tmpvar_1)
22 | )), 0.0, 1.0);
23 | lowp vec4 color_5;
24 | lowp vec4 tmpvar_6;
25 | tmpvar_6 = texture2D (s_texColor, v_texcoord0);
26 | if ((tmpvar_6.w < 0.6)) {
27 | discard;
28 | };
29 | color_5.xyz = mix (tmpvar_6.xyz, u_FogColor.xyz, clamp ((
30 | (sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x)
31 | /
32 | (u_FogNearFar.y - u_FogNearFar.x)
33 | ), 0.0, 1.0));
34 | color_5.w = 1.0;
35 | mediump vec4 tmpvar_7;
36 | tmpvar_7.w = 1.0;
37 | tmpvar_7.xyz = (((color_5.xyz * u_LightColor.xyz) * (tmpvar_4 * tmpvar_4)) * max (dot (v_view_normal,
38 | normalize((u_LightPosition_Radius.xyz - v_view_pos))
39 | ), 0.0));
40 | gl_FragColor = tmpvar_7;
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_screenquad.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_screenquad.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_screenquad.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_screenquad.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_screenquad.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec4 v_color;
2 | varying highp vec2 v_texcoord0;
3 | uniform sampler2D s_texColor;
4 | void main ()
5 | {
6 | lowp vec4 tmpvar_1;
7 | tmpvar_1 = texture2D (s_texColor, v_texcoord0);
8 | gl_FragColor = (tmpvar_1 * v_color);
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_sky_domecolor.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_sky_domecolor.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_sky_domecolor.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_sky_domecolor.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_sky_domecolor.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec4 v_color;
2 | void main ()
3 | {
4 | gl_FragColor = v_color;
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_skylayer.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_skylayer.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_skylayer.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_skylayer.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_skylayer.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec4 v_color;
2 | varying highp vec2 v_texcoord0;
3 | uniform sampler2D s_texColor;
4 | void main ()
5 | {
6 | lowp vec4 tmpvar_1;
7 | tmpvar_1 = (texture2D (s_texColor, v_texcoord0) * v_color);
8 | gl_FragColor = tmpvar_1;
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_stencil_texture_clip.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/fs_stencil_texture_clip.bin
--------------------------------------------------------------------------------
/content/shaders/essl/fs_stencil_texture_clip.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/fs_stencil_texture_clip.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/fs_stencil_texture_clip.bin.disasm:
--------------------------------------------------------------------------------
1 | varying highp vec4 v_color;
2 | varying highp vec2 v_texcoord0;
3 | varying highp vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform highp vec4 u_FogColor;
6 | uniform highp vec4 u_FogNearFar;
7 | void main ()
8 | {
9 | lowp vec4 color_1;
10 | lowp vec4 tmpvar_2;
11 | tmpvar_2 = texture2D (s_texColor, v_texcoord0);
12 | lowp vec4 tmpvar_3;
13 | tmpvar_3 = (tmpvar_2 * v_color);
14 | color_1.w = tmpvar_3.w;
15 | if ((tmpvar_2.w < 0.6)) {
16 | discard;
17 | };
18 | color_1.xyz = mix (tmpvar_3.xyz, u_FogColor.xyz, clamp ((
19 | (sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x)
20 | /
21 | (u_FogNearFar.y - u_FogNearFar.x)
22 | ), 0.0, 1.0));
23 | gl_FragColor = color_1;
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_image.bin:
--------------------------------------------------------------------------------
1 | VSHo><
2 | u_viewProj 0 attribute highp vec3 a_position;
3 | attribute highp vec2 a_texcoord0;
4 | varying highp vec2 v_texcoord0;
5 | uniform highp mat4 u_viewProj;
6 | void main ()
7 | {
8 | highp vec4 tmpvar_1;
9 | tmpvar_1.zw = vec2(0.0, 1.0);
10 | tmpvar_1.xy = a_position.xy;
11 | gl_Position = (u_viewProj * tmpvar_1);
12 | v_texcoord0 = a_texcoord0;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_image.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_image.bin : \
2 | varying.def.sc \
3 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh
4 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_image.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec3 a_position;
2 | attribute highp vec2 a_texcoord0;
3 | varying highp vec2 v_texcoord0;
4 | uniform highp mat4 u_viewProj;
5 | void main ()
6 | {
7 | highp vec4 tmpvar_1;
8 | tmpvar_1.zw = vec2(0.0, 1.0);
9 | tmpvar_1.xy = a_position.xy;
10 | gl_Position = (u_viewProj * tmpvar_1);
11 | v_texcoord0 = a_texcoord0;
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_particle.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_particle.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_particle.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_particle.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_particle.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_position;
3 | attribute highp vec2 a_texcoord0;
4 | varying highp vec4 v_color;
5 | varying highp vec2 v_texcoord0;
6 | varying highp vec3 v_view_pos;
7 | uniform highp mat4 u_modelView;
8 | uniform highp mat4 u_modelViewProj;
9 | void main ()
10 | {
11 | highp vec4 tmpvar_1;
12 | tmpvar_1.w = 1.0;
13 | tmpvar_1.xyz = a_position;
14 | gl_Position = (u_modelViewProj * tmpvar_1);
15 | v_texcoord0 = a_texcoord0;
16 | v_color = a_color0;
17 | highp vec4 tmpvar_2;
18 | tmpvar_2.w = 1.0;
19 | tmpvar_2.xyz = a_position;
20 | v_view_pos = (u_modelView * tmpvar_2).xyz;
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_screenquad.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_screenquad.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_screenquad.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_screenquad.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_screenquad.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_position;
3 | attribute highp vec2 a_texcoord0;
4 | varying highp vec4 v_color;
5 | varying highp vec2 v_texcoord0;
6 | uniform highp mat4 u_modelViewProj;
7 | void main ()
8 | {
9 | highp vec4 tmpvar_1;
10 | tmpvar_1.w = 1.0;
11 | tmpvar_1.xyz = a_position;
12 | gl_Position = (u_modelViewProj * tmpvar_1);
13 | v_color = a_color0;
14 | v_texcoord0 = a_texcoord0;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_skinned.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_skinned.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_skinned.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_skinned.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_skinned.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_normal;
3 | attribute highp vec2 a_texcoord0;
4 | attribute highp vec3 a_texcoord1;
5 | attribute highp vec3 a_texcoord2;
6 | attribute highp vec3 a_texcoord3;
7 | attribute highp vec3 a_texcoord4;
8 | attribute highp vec4 a_texcoord5;
9 | attribute highp vec4 a_texcoord6;
10 | varying highp vec4 v_color;
11 | varying highp vec2 v_texcoord0;
12 | varying highp vec3 v_view_pos;
13 | uniform mat4 u_model[100];
14 | uniform highp mat4 u_modelView;
15 | uniform highp mat4 u_modelViewProj;
16 | uniform vec4 u_SkyColors[2];
17 | uniform highp vec4 u_color;
18 | void main ()
19 | {
20 | highp vec3 position_1;
21 | highp vec4 tmpvar_2;
22 | tmpvar_2.w = 1.0;
23 | tmpvar_2.xyz = a_texcoord1;
24 | position_1 = ((u_model[(1 +
25 | int(a_texcoord5.x)
26 | )] * tmpvar_2).xyz * a_texcoord6.x);
27 | highp vec4 tmpvar_3;
28 | tmpvar_3.w = 1.0;
29 | tmpvar_3.xyz = a_texcoord2;
30 | position_1 = (position_1 + ((u_model[
31 | (1 + int(a_texcoord5.y))
32 | ] * tmpvar_3).xyz * a_texcoord6.y));
33 | highp vec4 tmpvar_4;
34 | tmpvar_4.w = 1.0;
35 | tmpvar_4.xyz = a_texcoord3;
36 | position_1 = (position_1 + ((u_model[
37 | (1 + int(a_texcoord5.z))
38 | ] * tmpvar_4).xyz * a_texcoord6.z));
39 | highp vec4 tmpvar_5;
40 | tmpvar_5.w = 1.0;
41 | tmpvar_5.xyz = a_texcoord4;
42 | position_1 = (position_1 + ((u_model[
43 | (1 + int(a_texcoord5.w))
44 | ] * tmpvar_5).xyz * a_texcoord6.w));
45 | highp vec4 tmpvar_6;
46 | tmpvar_6.w = 1.0;
47 | tmpvar_6.xyz = position_1;
48 | gl_Position = (u_modelViewProj * tmpvar_6);
49 | v_texcoord0 = a_texcoord0;
50 | highp mat3 tmpvar_7;
51 | highp mat4 tmpvar_8;
52 | tmpvar_8 = u_model[0];
53 | tmpvar_7[0] = tmpvar_8[0].xyz;
54 | tmpvar_7[1] = tmpvar_8[1].xyz;
55 | tmpvar_7[2] = tmpvar_8[2].xyz;
56 | v_color = (min (1.0, (
57 | (max (0.0, dot ((tmpvar_7 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * u_color.x)
58 | +
59 | (u_color.x * 0.5)
60 | )) * a_color0);
61 | v_color = mix (u_SkyColors[0], u_SkyColors[1], v_color.x);
62 | highp vec4 tmpvar_9;
63 | tmpvar_9.w = 1.0;
64 | tmpvar_9.xyz = position_1;
65 | v_view_pos = (u_modelView * tmpvar_9).xyz;
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_sky.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_sky.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_position;
3 | attribute highp vec2 a_texcoord0;
4 | varying highp vec4 v_color;
5 | varying highp vec2 v_texcoord0;
6 | varying highp vec3 v_view_pos;
7 | uniform highp mat4 u_modelView;
8 | uniform highp mat4 u_modelViewProj;
9 | uniform highp vec4 u_color;
10 | uniform highp vec4 u_skyTextureParams;
11 | void main ()
12 | {
13 | highp vec4 tmpvar_1;
14 | tmpvar_1.w = 1.0;
15 | tmpvar_1.xyz = a_position;
16 | gl_Position = (u_modelViewProj * tmpvar_1);
17 | v_texcoord0 = ((a_texcoord0 * u_skyTextureParams.xy) + u_skyTextureParams.zw);
18 | v_color = (a_color0 * u_color);
19 | highp vec4 tmpvar_2;
20 | tmpvar_2.w = 1.0;
21 | tmpvar_2.xyz = a_position;
22 | v_view_pos = (u_modelView * tmpvar_2).xyz;
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky_domecolor.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_sky_domecolor.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky_domecolor.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_sky_domecolor.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_sky_domecolor.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_position;
3 | attribute highp vec2 a_texcoord0;
4 | varying highp vec4 v_color;
5 | varying highp vec2 v_texcoord0;
6 | varying highp vec3 v_view_pos;
7 | uniform highp mat4 u_modelView;
8 | uniform highp mat4 u_modelViewProj;
9 | uniform vec4 u_SkyColors[2];
10 | void main ()
11 | {
12 | highp vec4 tmpvar_1;
13 | tmpvar_1.w = 1.0;
14 | tmpvar_1.xyz = a_position;
15 | gl_Position = (u_modelViewProj * tmpvar_1);
16 | v_texcoord0 = a_texcoord0;
17 | v_color.xyz = (mix (u_SkyColors[0].xyz, u_SkyColors[1].xyz, a_color0.w) * a_color0.w);
18 | v_color.w = 1.0;
19 | highp vec4 tmpvar_2;
20 | tmpvar_2.w = 1.0;
21 | tmpvar_2.xyz = a_position;
22 | v_view_pos = (u_modelView * tmpvar_2).xyz;
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_world.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_world.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_normal;
3 | attribute highp vec3 a_position;
4 | attribute highp vec2 a_texcoord0;
5 | varying highp vec4 v_color;
6 | varying highp vec2 v_texcoord0;
7 | varying highp vec3 v_view_pos;
8 | uniform mat4 u_model[32];
9 | uniform highp mat4 u_modelView;
10 | uniform highp mat4 u_modelViewProj;
11 | uniform vec4 u_SkyColors[2];
12 | uniform highp vec4 u_color;
13 | void main ()
14 | {
15 | highp vec4 tmpvar_1;
16 | tmpvar_1.w = 1.0;
17 | tmpvar_1.xyz = a_position;
18 | gl_Position = (u_modelViewProj * tmpvar_1);
19 | v_texcoord0 = a_texcoord0;
20 | highp mat3 tmpvar_2;
21 | highp mat4 tmpvar_3;
22 | tmpvar_3 = u_model[0];
23 | tmpvar_2[0] = tmpvar_3[0].xyz;
24 | tmpvar_2[1] = tmpvar_3[1].xyz;
25 | tmpvar_2[2] = tmpvar_3[2].xyz;
26 | v_color.xyz = (min (1.0, (
27 | (max (0.0, dot ((tmpvar_2 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * u_color.x)
28 | +
29 | (u_color.x * 0.5)
30 | )) * a_color0.xyz);
31 | v_color.xyz = mix (u_SkyColors[0], u_SkyColors[1], v_color.x).xyz;
32 | v_color.w = (v_color.w * u_color.w);
33 | highp vec4 tmpvar_4;
34 | tmpvar_4.w = 1.0;
35 | tmpvar_4.xyz = a_position;
36 | v_view_pos = (u_modelView * tmpvar_4).xyz;
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world_instanced.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/essl/vs_world_instanced.bin
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world_instanced.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/essl/vs_world_instanced.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/essl/vs_world_instanced.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute highp vec4 a_color0;
2 | attribute highp vec3 a_normal;
3 | attribute highp vec3 a_position;
4 | attribute highp vec2 a_texcoord0;
5 | attribute highp vec4 i_data0;
6 | attribute highp vec4 i_data1;
7 | attribute highp vec4 i_data2;
8 | attribute highp vec4 i_data3;
9 | attribute highp vec4 i_data4;
10 | varying highp vec4 v_color;
11 | varying highp vec2 v_texcoord0;
12 | varying highp vec3 v_view_pos;
13 | uniform highp mat4 u_view;
14 | uniform highp mat4 u_viewProj;
15 | uniform vec4 SKY_CLUT[256];
16 | void main ()
17 | {
18 | highp mat4 model_1;
19 | model_1[0] = i_data0;
20 | model_1[1] = i_data1;
21 | model_1[2] = i_data2;
22 | model_1[3] = i_data3;
23 | highp vec4 tmpvar_2;
24 | tmpvar_2.w = 1.0;
25 | tmpvar_2.xyz = a_position;
26 | gl_Position = ((u_viewProj * model_1) * tmpvar_2);
27 | v_texcoord0 = a_texcoord0;
28 | highp mat3 tmpvar_3;
29 | tmpvar_3[0] = model_1[0].xyz;
30 | tmpvar_3[1] = model_1[1].xyz;
31 | tmpvar_3[2] = model_1[2].xyz;
32 | v_color.xyz = (min (1.0, (
33 | (max (0.0, dot ((tmpvar_3 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * i_data4.x)
34 | +
35 | (i_data4.x * 0.5)
36 | )) * a_color0.xyz);
37 | v_color.xyz = SKY_CLUT[ivec4((v_color * 255.0)).x].xyz;
38 | highp vec4 tmpvar_4;
39 | tmpvar_4.w = 1.0;
40 | tmpvar_4.xyz = a_position;
41 | v_view_pos = ((u_view * model_1) * tmpvar_4).xyz;
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_image.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_image.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_image.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_image.bin : \
2 | varying.def.sc \
3 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh
4 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_image.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec2 v_texcoord0;
2 | uniform sampler2D s_texColor;
3 | void main ()
4 | {
5 | gl_FragColor = texture2D (s_texColor, v_texcoord0);
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_particle_textured.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_particle_textured.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_particle_textured.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_particle_textured.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_particle_textured.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec4 v_color;
2 | varying vec2 v_texcoord0;
3 | varying vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform vec4 u_FogNearFar;
6 | void main ()
7 | {
8 | gl_FragColor = ((texture2D (s_texColor, v_texcoord0) * v_color) * (1.0 - clamp (
9 | ((sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x) / (u_FogNearFar.y - u_FogNearFar.x))
10 | , 0.0, 1.0)));
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_point_light.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_point_light.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_point_light.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_point_light.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_point_light.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec2 v_texcoord0;
2 | varying vec3 v_view_normal;
3 | varying vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform vec4 u_LightPosition_Radius;
6 | uniform vec4 u_LightColor;
7 | uniform vec4 u_FogColor;
8 | uniform vec4 u_FogNearFar;
9 | void main ()
10 | {
11 | float tmpvar_1;
12 | tmpvar_1 = (u_LightPosition_Radius.w * 5.0);
13 | float tmpvar_2;
14 | vec3 x_3;
15 | x_3 = (u_LightPosition_Radius.xyz - v_view_pos);
16 | tmpvar_2 = sqrt(dot (x_3, x_3));
17 | float tmpvar_4;
18 | tmpvar_4 = clamp ((1.0 - (
19 | (tmpvar_2 * tmpvar_2)
20 | /
21 | (tmpvar_1 * tmpvar_1)
22 | )), 0.0, 1.0);
23 | vec4 color_5;
24 | vec4 tmpvar_6;
25 | tmpvar_6 = texture2D (s_texColor, v_texcoord0);
26 | if ((tmpvar_6.w < 0.6)) {
27 | discard;
28 | };
29 | color_5.xyz = mix (tmpvar_6.xyz, u_FogColor.xyz, clamp ((
30 | (sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x)
31 | /
32 | (u_FogNearFar.y - u_FogNearFar.x)
33 | ), 0.0, 1.0));
34 | color_5.w = 1.0;
35 | vec4 tmpvar_7;
36 | tmpvar_7.w = 1.0;
37 | tmpvar_7.xyz = (((color_5.xyz * u_LightColor.xyz) * (tmpvar_4 * tmpvar_4)) * max (dot (v_view_normal,
38 | normalize((u_LightPosition_Radius.xyz - v_view_pos))
39 | ), 0.0));
40 | gl_FragColor = tmpvar_7;
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_screenquad.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_screenquad.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_screenquad.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_screenquad.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_screenquad.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec4 v_color;
2 | varying vec2 v_texcoord0;
3 | uniform sampler2D s_texColor;
4 | void main ()
5 | {
6 | gl_FragColor = (texture2D (s_texColor, v_texcoord0) * v_color);
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_sky_domecolor.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_sky_domecolor.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_sky_domecolor.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_sky_domecolor.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_sky_domecolor.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec4 v_color;
2 | void main ()
3 | {
4 | gl_FragColor = v_color;
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_skylayer.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_skylayer.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_skylayer.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_skylayer.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_skylayer.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec4 v_color;
2 | varying vec2 v_texcoord0;
3 | uniform sampler2D s_texColor;
4 | void main ()
5 | {
6 | gl_FragColor = (texture2D (s_texColor, v_texcoord0) * v_color);
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_stencil_texture_clip.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/fs_stencil_texture_clip.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_stencil_texture_clip.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/fs_stencil_texture_clip.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/fs_stencil_texture_clip.bin.disasm:
--------------------------------------------------------------------------------
1 | varying vec4 v_color;
2 | varying vec2 v_texcoord0;
3 | varying vec3 v_view_pos;
4 | uniform sampler2D s_texColor;
5 | uniform vec4 u_FogColor;
6 | uniform vec4 u_FogNearFar;
7 | void main ()
8 | {
9 | vec4 color_1;
10 | vec4 tmpvar_2;
11 | tmpvar_2 = texture2D (s_texColor, v_texcoord0);
12 | vec4 tmpvar_3;
13 | tmpvar_3 = (tmpvar_2 * v_color);
14 | color_1.w = tmpvar_3.w;
15 | if ((tmpvar_2.w < 0.6)) {
16 | discard;
17 | };
18 | color_1.xyz = mix (tmpvar_3.xyz, u_FogColor.xyz, clamp ((
19 | (sqrt(dot (v_view_pos, v_view_pos)) - u_FogNearFar.x)
20 | /
21 | (u_FogNearFar.y - u_FogNearFar.x)
22 | ), 0.0, 1.0));
23 | gl_FragColor = color_1;
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_image.bin:
--------------------------------------------------------------------------------
1 | VSHo><
2 | u_viewProj attribute vec3 a_position;
3 | attribute vec2 a_texcoord0;
4 | varying vec2 v_texcoord0;
5 | uniform mat4 u_viewProj;
6 | void main ()
7 | {
8 | vec4 tmpvar_1;
9 | tmpvar_1.zw = vec2(0.0, 1.0);
10 | tmpvar_1.xy = a_position.xy;
11 | gl_Position = (u_viewProj * tmpvar_1);
12 | v_texcoord0 = a_texcoord0;
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_image.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_image.bin : \
2 | varying.def.sc \
3 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh
4 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_image.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec3 a_position;
2 | attribute vec2 a_texcoord0;
3 | varying vec2 v_texcoord0;
4 | uniform mat4 u_viewProj;
5 | void main ()
6 | {
7 | vec4 tmpvar_1;
8 | tmpvar_1.zw = vec2(0.0, 1.0);
9 | tmpvar_1.xy = a_position.xy;
10 | gl_Position = (u_viewProj * tmpvar_1);
11 | v_texcoord0 = a_texcoord0;
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_particle.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_particle.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_particle.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_particle.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_particle.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_position;
3 | attribute vec2 a_texcoord0;
4 | varying vec4 v_color;
5 | varying vec2 v_texcoord0;
6 | varying vec3 v_view_pos;
7 | uniform mat4 u_modelView;
8 | uniform mat4 u_modelViewProj;
9 | void main ()
10 | {
11 | vec4 tmpvar_1;
12 | tmpvar_1.w = 1.0;
13 | tmpvar_1.xyz = a_position;
14 | gl_Position = (u_modelViewProj * tmpvar_1);
15 | v_texcoord0 = a_texcoord0;
16 | v_color = a_color0;
17 | vec4 tmpvar_2;
18 | tmpvar_2.w = 1.0;
19 | tmpvar_2.xyz = a_position;
20 | v_view_pos = (u_modelView * tmpvar_2).xyz;
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_screenquad.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_screenquad.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_screenquad.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_screenquad.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_screenquad.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_position;
3 | attribute vec2 a_texcoord0;
4 | varying vec4 v_color;
5 | varying vec2 v_texcoord0;
6 | uniform mat4 u_modelViewProj;
7 | void main ()
8 | {
9 | vec4 tmpvar_1;
10 | tmpvar_1.w = 1.0;
11 | tmpvar_1.xyz = a_position;
12 | gl_Position = (u_modelViewProj * tmpvar_1);
13 | v_color = a_color0;
14 | v_texcoord0 = a_texcoord0;
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_skinned.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_skinned.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_skinned.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_skinned.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_skinned.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_normal;
3 | attribute vec2 a_texcoord0;
4 | attribute vec3 a_texcoord1;
5 | attribute vec3 a_texcoord2;
6 | attribute vec3 a_texcoord3;
7 | attribute vec3 a_texcoord4;
8 | attribute vec4 a_texcoord5;
9 | attribute vec4 a_texcoord6;
10 | varying vec4 v_color;
11 | varying vec2 v_texcoord0;
12 | varying vec3 v_view_pos;
13 | uniform mat4 u_model[100];
14 | uniform mat4 u_modelView;
15 | uniform mat4 u_modelViewProj;
16 | uniform vec4 u_SkyColors[2];
17 | uniform vec4 u_color;
18 | void main ()
19 | {
20 | vec3 position_1;
21 | vec4 tmpvar_2;
22 | tmpvar_2.w = 1.0;
23 | tmpvar_2.xyz = a_texcoord1;
24 | position_1 = ((u_model[(1 +
25 | int(a_texcoord5.x)
26 | )] * tmpvar_2).xyz * a_texcoord6.x);
27 | vec4 tmpvar_3;
28 | tmpvar_3.w = 1.0;
29 | tmpvar_3.xyz = a_texcoord2;
30 | position_1 = (position_1 + ((u_model[
31 | (1 + int(a_texcoord5.y))
32 | ] * tmpvar_3).xyz * a_texcoord6.y));
33 | vec4 tmpvar_4;
34 | tmpvar_4.w = 1.0;
35 | tmpvar_4.xyz = a_texcoord3;
36 | position_1 = (position_1 + ((u_model[
37 | (1 + int(a_texcoord5.z))
38 | ] * tmpvar_4).xyz * a_texcoord6.z));
39 | vec4 tmpvar_5;
40 | tmpvar_5.w = 1.0;
41 | tmpvar_5.xyz = a_texcoord4;
42 | position_1 = (position_1 + ((u_model[
43 | (1 + int(a_texcoord5.w))
44 | ] * tmpvar_5).xyz * a_texcoord6.w));
45 | vec4 tmpvar_6;
46 | tmpvar_6.w = 1.0;
47 | tmpvar_6.xyz = position_1;
48 | gl_Position = (u_modelViewProj * tmpvar_6);
49 | v_texcoord0 = a_texcoord0;
50 | mat3 tmpvar_7;
51 | mat4 tmpvar_8;
52 | tmpvar_8 = u_model[0];
53 | tmpvar_7[0] = tmpvar_8[0].xyz;
54 | tmpvar_7[1] = tmpvar_8[1].xyz;
55 | tmpvar_7[2] = tmpvar_8[2].xyz;
56 | v_color = (min (1.0, (
57 | (max (0.0, dot ((tmpvar_7 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * u_color.x)
58 | +
59 | (u_color.x * 0.5)
60 | )) * a_color0);
61 | v_color = mix (u_SkyColors[0], u_SkyColors[1], v_color.x);
62 | vec4 tmpvar_9;
63 | tmpvar_9.w = 1.0;
64 | tmpvar_9.xyz = position_1;
65 | v_view_pos = (u_modelView * tmpvar_9).xyz;
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_sky.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_sky.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_position;
3 | attribute vec2 a_texcoord0;
4 | varying vec4 v_color;
5 | varying vec2 v_texcoord0;
6 | varying vec3 v_view_pos;
7 | uniform mat4 u_modelView;
8 | uniform mat4 u_modelViewProj;
9 | uniform vec4 u_color;
10 | uniform vec4 u_skyTextureParams;
11 | void main ()
12 | {
13 | vec4 tmpvar_1;
14 | tmpvar_1.w = 1.0;
15 | tmpvar_1.xyz = a_position;
16 | gl_Position = (u_modelViewProj * tmpvar_1);
17 | v_texcoord0 = ((a_texcoord0 * u_skyTextureParams.xy) + u_skyTextureParams.zw);
18 | v_color = (a_color0 * u_color);
19 | vec4 tmpvar_2;
20 | tmpvar_2.w = 1.0;
21 | tmpvar_2.xyz = a_position;
22 | v_view_pos = (u_modelView * tmpvar_2).xyz;
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky_domecolor.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_sky_domecolor.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky_domecolor.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_sky_domecolor.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_sky_domecolor.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_position;
3 | attribute vec2 a_texcoord0;
4 | varying vec4 v_color;
5 | varying vec2 v_texcoord0;
6 | varying vec3 v_view_pos;
7 | uniform mat4 u_modelView;
8 | uniform mat4 u_modelViewProj;
9 | uniform vec4 u_SkyColors[2];
10 | void main ()
11 | {
12 | vec4 tmpvar_1;
13 | tmpvar_1.w = 1.0;
14 | tmpvar_1.xyz = a_position;
15 | gl_Position = (u_modelViewProj * tmpvar_1);
16 | v_texcoord0 = a_texcoord0;
17 | v_color.xyz = (mix (u_SkyColors[0].xyz, u_SkyColors[1].xyz, a_color0.w) * a_color0.w);
18 | v_color.w = 1.0;
19 | vec4 tmpvar_2;
20 | tmpvar_2.w = 1.0;
21 | tmpvar_2.xyz = a_position;
22 | v_view_pos = (u_modelView * tmpvar_2).xyz;
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_world.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_world.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh \
6 | tools.sh
7 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_normal;
3 | attribute vec3 a_position;
4 | attribute vec2 a_texcoord0;
5 | varying vec4 v_color;
6 | varying vec2 v_texcoord0;
7 | varying vec3 v_view_pos;
8 | uniform mat4 u_model[32];
9 | uniform mat4 u_modelView;
10 | uniform mat4 u_modelViewProj;
11 | uniform vec4 u_SkyColors[2];
12 | uniform vec4 u_color;
13 | void main ()
14 | {
15 | vec4 tmpvar_1;
16 | tmpvar_1.w = 1.0;
17 | tmpvar_1.xyz = a_position;
18 | gl_Position = (u_modelViewProj * tmpvar_1);
19 | v_texcoord0 = a_texcoord0;
20 | mat3 tmpvar_2;
21 | mat4 tmpvar_3;
22 | tmpvar_3 = u_model[0];
23 | tmpvar_2[0] = tmpvar_3[0].xyz;
24 | tmpvar_2[1] = tmpvar_3[1].xyz;
25 | tmpvar_2[2] = tmpvar_3[2].xyz;
26 | v_color.xyz = (min (1.0, (
27 | (max (0.0, dot ((tmpvar_2 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * u_color.x)
28 | +
29 | (u_color.x * 0.5)
30 | )) * a_color0.xyz);
31 | v_color.xyz = mix (u_SkyColors[0], u_SkyColors[1], v_color.x).xyz;
32 | v_color.w = (v_color.w * u_color.w);
33 | vec4 tmpvar_4;
34 | tmpvar_4.w = 1.0;
35 | tmpvar_4.xyz = a_position;
36 | v_view_pos = (u_modelView * tmpvar_4).xyz;
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world_instanced.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REGoth-project/REGoth/b6d91b8107bfeae1431dfd11af5a20545b3e7643/content/shaders/glsl/vs_world_instanced.bin
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world_instanced.bin.d:
--------------------------------------------------------------------------------
1 | ../../content/shaders/glsl/vs_world_instanced.bin : \
2 | varying.def.sc \
3 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/common.sh \
4 | ../../lib/bgfx-cmake/bgfx/scripts//../src/bgfx_shader.sh \
5 | ./../../lib/bgfx-cmake/bgfx/examples/common/../common/shaderlib.sh
6 |
--------------------------------------------------------------------------------
/content/shaders/glsl/vs_world_instanced.bin.disasm:
--------------------------------------------------------------------------------
1 | attribute vec4 a_color0;
2 | attribute vec3 a_normal;
3 | attribute vec3 a_position;
4 | attribute vec2 a_texcoord0;
5 | attribute vec4 i_data0;
6 | attribute vec4 i_data1;
7 | attribute vec4 i_data2;
8 | attribute vec4 i_data3;
9 | attribute vec4 i_data4;
10 | varying vec4 v_color;
11 | varying vec2 v_texcoord0;
12 | varying vec3 v_view_pos;
13 | uniform mat4 u_view;
14 | uniform mat4 u_viewProj;
15 | uniform vec4 SKY_CLUT[256];
16 | void main ()
17 | {
18 | mat4 model_1;
19 | model_1[0] = i_data0;
20 | model_1[1] = i_data1;
21 | model_1[2] = i_data2;
22 | model_1[3] = i_data3;
23 | vec4 tmpvar_2;
24 | tmpvar_2.w = 1.0;
25 | tmpvar_2.xyz = a_position;
26 | gl_Position = ((u_viewProj * model_1) * tmpvar_2);
27 | v_texcoord0 = a_texcoord0;
28 | mat3 tmpvar_3;
29 | tmpvar_3[0] = model_1[0].xyz;
30 | tmpvar_3[1] = model_1[1].xyz;
31 | tmpvar_3[2] = model_1[2].xyz;
32 | v_color.xyz = (min (1.0, (
33 | (max (0.0, dot ((tmpvar_3 * a_normal), vec3(-0.5773503, 0.5773503, 0.5773503))) * i_data4.x)
34 | +
35 | (i_data4.x * 0.5)
36 | )) * a_color0.xyz);
37 | v_color.xyz = SKY_CLUT[ivec4((v_color * 255.0)).x].xyz;
38 | vec4 tmpvar_4;
39 | tmpvar_4.w = 1.0;
40 | tmpvar_4.xyz = a_position;
41 | v_view_pos = ((u_view * model_1) * tmpvar_4).xyz;
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/content/sky.json:
--------------------------------------------------------------------------------
1 | # *******************************************************************************************************************************
2 | # Sky configuration for REGoth.
3 | #
4 | # This file stores the day-colors for each game and zen-files, similar to the "[SKY_OUTDOOR]"-section of the original Gothic.ini.
5 | #
6 | # *******************************************************************************************************************************
7 |
8 | {
9 | "gothic-1":{
10 | "default":{
11 | "DayColor0":{
12 | "r":116,
13 | "g":89,
14 | "b":75
15 | },
16 | "DayColor1":{
17 | "r":80,
18 | "g":90,
19 | "b":80
20 | },
21 | "DayColor2":{
22 | "r":120,
23 | "g":140,
24 | "b":180
25 | },
26 | "DayColor3":{
27 | "r":120,
28 | "g":140,
29 | "b":180
30 | }
31 | }
32 | },
33 | "gothic-2":{
34 | "default":{
35 | "DayColor0":{
36 | "r":82,
37 | "g":109,
38 | "b":198
39 | },
40 | "DayColor1":{
41 | "r":255,
42 | "g":255,
43 | "b":0
44 | },
45 | "DayColor2":{
46 | "r":18,
47 | "g":16,
48 | "b":60
49 | },
50 | "DayColor3":{
51 | "r":134,
52 | "g":104,
53 | "b":125
54 | }
55 | },
56 | "oldworld":{
57 | "DayColor0":{
58 | "r":90,
59 | "g":80,
60 | "b":80
61 | },
62 | "DayColor1":{
63 | "r":90,
64 | "g":80,
65 | "b":80
66 | },
67 | "DayColor2":{
68 | "r":90,
69 | "g":80,
70 | "b":80
71 | },
72 | "DayColor3":{
73 | "r":90,
74 | "g":80,
75 | "b":80
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/create_git_hooks.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | GIT_REPO_DIR=$(git rev-parse --show-toplevel)
4 |
5 | cd "$GIT_REPO_DIR"
6 |
7 | for hook in hooks/*
8 | do
9 | SYMLINK_HOOK=.git/$hook
10 | if [ -f $hook ] && [ ! -e "$SYMLINK_HOOK" ] && [ ! -L "$SYMLINK_HOOK" ]
11 | then
12 | ln -v -s "../../$hook" .git/hooks/
13 | fi
14 | done
15 |
--------------------------------------------------------------------------------
/lib/adpcm/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.1)
2 | project(adpcm)
3 |
4 | add_library(adpcm STATIC adpcm-lib.cpp)
5 | set_target_properties(adpcm PROPERTIES LINKER_LANGUAGE C)
6 |
--------------------------------------------------------------------------------
/lib/adpcm/adpcm-lib.h:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////////////////////////////////
2 | // **** ADPCM-XQ **** //
3 | // Xtreme Quality ADPCM Encoder/Decoder //
4 | // Copyright (c) 2015 David Bryant. //
5 | // All Rights Reserved. //
6 | // Distributed under the BSD Software License (see license.txt) //
7 | ////////////////////////////////////////////////////////////////////////////
8 |
9 | #ifndef ADPCMLIB_H_
10 | #define ADPCMLIB_H_
11 |
12 | #if defined(_MSC_VER) && _MSC_VER < 1600
13 | typedef unsigned __int64 uint64_t;
14 | typedef unsigned __int32 uint32_t;
15 | typedef unsigned __int16 uint16_t;
16 | typedef unsigned __int8 uint8_t;
17 | typedef __int64 int64_t;
18 | typedef __int32 int32_t;
19 | typedef __int16 int16_t;
20 | typedef __int8 int8_t;
21 | #else
22 | #include
23 | #endif
24 |
25 | void *adpcm_create_context (int num_channels, int lookahead, int noise_shaping, int32_t initial_deltas [2]);
26 | int adpcm_encode_block (void *p, uint8_t *outbuf, size_t *outbufsize, const int16_t *inbuf, int inbufcount);
27 | int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, int channels);
28 | void adpcm_free_context (void *p);
29 |
30 | #define NOISE_SHAPING_OFF 0 // flat noise (no shaping)
31 | #define NOISE_SHAPING_STATIC 1 // first-order highpass shaping
32 | #define NOISE_SHAPING_DYNAMIC 2 // dynamically tilted noise based on signal
33 |
34 | #endif /* ADPCMLIB_H_ */
35 |
--------------------------------------------------------------------------------
/lib/adpcm/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) David Bryant
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice,
8 | this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the
11 | documentation and/or other materials provided with the distribution.
12 | * Neither the name of Conifer Software nor the names of its contributors
13 | may be used to endorse or promote products derived from this software
14 | without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/lib/json/LICENSE.MIT:
--------------------------------------------------------------------------------
1 | JSON for Modern C++ is licensed under the MIT License
2 | :
3 |
4 | Copyright (c) 2013-2016 Niels Lohmann
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | of the Software, and to permit persons to whom the Software is furnished to do
11 | so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/src/android/AndroidManifest.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/android/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 2.8.3)
2 |
3 | # Usage:
4 | # cmake -DANDROID_NDK=$NDK -DCMAKE_TOOLCHAIN_FILE=$NDK/cmake/toolchain.cmake -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=23 ..
5 |
6 |
7 | project(testBuilder)
8 |
9 | include("Apk.cmake" REQUIRED)
10 |
11 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
12 | set(ARM_TARGET armeabi-v7a)
13 |
14 | include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
15 |
16 | set(TEST_SRC
17 | ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c
18 | ../target/hydravis.cpp
19 | )
20 |
21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -ffor-scope -fno-rtti -fno-exceptions -pipe -ffunction-sections -fdata-sections -ffast-math -Wnon-virtual-dtor -Wreorder -Wsign-promo -fvisibility=hidden -fvisibility-inlines-hidden -Wstrict-null-sentinel -Os -funroll-all-loops -fpeel-loops -ftree-vectorize")
22 | set(LINKER_FLAGS "${LINKER_FLAGS} -Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined -Wl,--strip-all -Wl,-rpath-link=${ANDROID_NDK_SYSROOT}/usr/lib/ -L${ANDROID_NDK_SYSROOT}/usr/lib/")
23 |
24 | add_library(testapk SHARED ${TEST_SRC})
25 |
26 | target_link_libraries(testapk log android crystax)
27 | set_target_properties(testapk PROPERTIES COMPILE_DEFINITIONS "ANDROID")
28 |
29 | set(APP_SHARED_LIBRARIES "${LIBRARY_OUTPUT_PATH}/libtestapk.so")
30 | #set(APP_SHARED_LIBRARIES "${APP_SHARED_LIBRARIES};${CMAKE_CURRENT_SOURCE_DIR}/lib/armeabi-v7a/libcrystax.so")
31 | set(APP_SHARED_LIBRARIES "${APP_SHARED_LIBRARIES};${CMAKE_CURRENT_SOURCE_DIR}/lib/x86/libcrystax.so")
32 |
33 | message(STATUS ${APP_SHARED_LIBRARIES})
34 |
35 | android_create_apk(testapk "${CMAKE_BINARY_DIR}/apk" "${APP_SHARED_LIBRARIES}" "" "Data")
36 |
37 |
--------------------------------------------------------------------------------
/src/android/LoadLibraries.java.in:
--------------------------------------------------------------------------------
1 | // IMPORTANT: Do not manually manipulate this automatically generated file, changes will be gone after the next build!
2 |
3 | package ${ANDROID_APK_TOP_LEVEL_DOMAIN}.${ANDROID_APK_DOMAIN}.${ANDROID_APK_SUBDOMAIN};
4 |
5 | import android.app.NativeActivity;
6 |
7 | public class LoadLibraries extends NativeActivity {
8 |
9 | static {
10 | // List of libraries to load in (e.g. "PLCore;PLMath" etc.)
11 | String sharedLibrariesToLoad = "${ANDROID_SHARED_LIBRARIES_TO_LOAD}";
12 |
13 | // Load in all shared libraries
14 | String [] libraries = sharedLibrariesToLoad.split(";");
15 | for (int i=0; i
26 | #include
27 |
28 | __BEGIN_DECLS
29 |
30 | extern __mallocfunc void* malloc(size_t);
31 | extern __mallocfunc void* calloc(size_t, size_t);
32 | extern void* realloc(void*, size_t);
33 | extern void free(void*);
34 |
35 | extern void* memalign(size_t alignment, size_t bytesize);
36 | extern size_t malloc_usable_size(const void*);
37 |
38 | extern void* valloc(size_t bytesize);
39 | extern void* pvalloc(size_t bytesize);
40 |
41 | #ifndef STRUCT_MALLINFO_DECLARED
42 | #define STRUCT_MALLINFO_DECLARED 1
43 | struct mallinfo
44 | {
45 | size_t arena;
46 | size_t ordblks;
47 | size_t smblks;
48 | size_t hblks;
49 | size_t hblkhd;
50 | size_t usmblks;
51 | size_t fsmblks;
52 | size_t uordblks;
53 | size_t fordblks;
54 | size_t keepcost;
55 | };
56 | #endif /* STRUCT_MALLINFO_DECLARED */
57 |
58 | extern struct mallinfo mallinfo(void);
59 |
60 | __END_DECLS
61 |
62 | #endif /* LIBC_INCLUDE_MALLOC_H_ */
63 |
--------------------------------------------------------------------------------
/src/android/src/Main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #define APPNAME "TestApp"
5 |
6 | void android_main(struct android_app* state)
7 | {
8 | app_dummy(); // Make sure glue isn't stripped
9 |
10 | __android_log_print(ANDROID_LOG_INFO, APPNAME, "HolyShit you did it !");
11 |
12 | ANativeActivity_finish(state->activity);
13 | }
14 |
--------------------------------------------------------------------------------
/src/android/strings.xml.in:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ${ANDROID_NAME}
7 |
8 |
--------------------------------------------------------------------------------
/src/audio/AudioEngine.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "AudioEngine.h"
10 |
11 | namespace Audio
12 | {
13 | void AudioEngine::enumerateDevices(std::vector& enumerated)
14 | {
15 | if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT"))
16 | {
17 | size_t len = 0;
18 | const ALCchar* devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
19 | const ALCchar *device = devices, *next = devices + 1;
20 |
21 | while (device && *device != '\0' && next && *next != '\0')
22 | {
23 | enumerated.push_back(device);
24 |
25 | len = strlen(device);
26 | device += (len + 1);
27 | next += (len + 2);
28 | }
29 | }
30 |
31 | if (enumerated.empty())
32 | enumerated.push_back(std::string()); // empty string is default device
33 | }
34 |
35 | const char* AudioEngine::getErrorString(size_t errorCode)
36 | {
37 | switch (errorCode)
38 | {
39 | case AL_NO_ERROR:
40 | return "AL_NO_ERROR";
41 | case AL_INVALID_NAME:
42 | return "AL_INVALID_NAME";
43 | case AL_INVALID_ENUM:
44 | return "AL_INVALID_ENUM";
45 | case AL_INVALID_VALUE:
46 | return "AL_INVALID_VALUE";
47 | case AL_INVALID_OPERATION:
48 | return "AL_INVALID_OPERATION";
49 | case AL_OUT_OF_MEMORY:
50 | return "AL_OUT_OF_MEMORY";
51 | }
52 | return "UNKNOWN";
53 | }
54 |
55 | AudioEngine::AudioEngine(const std::string& name)
56 | {
57 | m_Device = alcOpenDevice(name.empty() ? NULL : name.c_str());
58 | if (!m_Device)
59 | {
60 | LogWarn() << "Could not open audio device '" << (name.empty() ? "default" : name) << "': "
61 | << getErrorString(alGetError()) << ", sound disabled";
62 | return;
63 | }
64 | }
65 |
66 | AudioEngine::~AudioEngine()
67 | {
68 | if (m_Device)
69 | alcCloseDevice(m_Device);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/audio/AudioEngine.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #include
7 |
8 | typedef struct ALCdevice_struct ALCdevice;
9 |
10 | namespace Audio
11 | {
12 | class AudioWorld;
13 |
14 | /** The AudioEngine represents the target OS sound system.
15 | *
16 | * The engine class matches the OpenAL device level.
17 | *
18 | */
19 | class AudioEngine final
20 | {
21 | public:
22 | /** Initializes the AudioEngine.
23 | *
24 | * The @p device param specifies the device to use and can be determined
25 | * using enumerateDevices().
26 | *
27 | * @param device_name The name of the device to use.
28 | *
29 | * @see AudioEngine::enumerateDevices()
30 | *
31 | */
32 | AudioEngine(const std::string& device_name = std::string());
33 |
34 | /** Deinitializes the AudioEngine.
35 | */
36 | ~AudioEngine();
37 |
38 | /** Returns the OpenAL device used by this engine.
39 | *
40 | * @return The OpenAL device or nullptr when initialization has failed.
41 | */
42 | ALCdevice* getDevice() const { return m_Device; }
43 | /** Enumerates the audio devices available on the current machine.
44 | *
45 | * Note that not all OpenAL implementations support enumeration. In this case you'll
46 | * retrieve a single element list with an empty device name, indicating that it is
47 | * the default device.
48 | *
49 | * @param[out] devices A list of available devices.
50 | *
51 | */
52 | static void enumerateDevices(std::vector& devices);
53 |
54 | /** Returns a text representation of an error code.
55 | *
56 | * @param The error code returned by alGetError() or alcGetError().
57 | *
58 | * @return The error text.
59 | *
60 | */
61 | static const char* getErrorString(size_t errorCode);
62 |
63 | private:
64 | ALCdevice* m_Device = nullptr;
65 | };
66 | }
67 |
--------------------------------------------------------------------------------
/src/audio/WavReader.h:
--------------------------------------------------------------------------------
1 | #ifndef WAVREADER_H
2 | #define WAVREADER_H
3 |
4 | #include
5 | #include
6 |
7 | /** A class which reads ADPCM / raw .wav files.
8 | *
9 | */
10 | class WavReader
11 | {
12 | public:
13 | /** Constructs the .wav reader.
14 | * @brief WavReader
15 | * @param data
16 | */
17 | WavReader(const void* data, unsigned size);
18 |
19 | bool open();
20 |
21 | unsigned getChannels() const { return m_Channels; }
22 | unsigned getRate() const { return m_Rate; }
23 | unsigned getBlockSize() const { return m_BlockSize; }
24 | unsigned getSampleCount() const { return m_SampleCount; }
25 | /** Reads all data from the wav.
26 | *
27 | * @return Returns the number of bytes read or < 0.
28 | *
29 | */
30 | int read() { return read(-1); }
31 | int read(unsigned max_samples);
32 |
33 | /** Returns the current block of decoded data.
34 | *
35 | * Call read() before accessing data.
36 | *
37 | * @return The currently decoded block.
38 | *
39 | */
40 | const void* getData() const { return m_Dest.empty() ? nullptr : &m_Dest[0]; }
41 | unsigned getDataSize() const { return m_Dest.size(); }
42 | private:
43 | const uint8_t* m_Source = nullptr;
44 | unsigned m_SourceSize = 0;
45 | unsigned m_SourceOffset = 0;
46 |
47 | std::vector m_Dest;
48 |
49 | bool m_ADPCM = false;
50 | uint16_t m_Channels = 0;
51 | uint32_t m_Rate = 0;
52 | uint16_t m_BlockSize = 0;
53 |
54 | unsigned m_SampleCount = 0;
55 |
56 | int decodeADPCM(unsigned max_samples);
57 | };
58 |
59 | #endif // WAVREADER_H
60 |
--------------------------------------------------------------------------------
/src/components/Entities.cpp:
--------------------------------------------------------------------------------
1 | #include "Entities.h"
2 | #include "AnimHandler.h"
3 |
4 | using namespace Components;
5 |
6 |
7 | void AnimationComponent::init(AnimationComponent& c)
8 | {
9 | c.m_AnimHandler = new AnimHandler;
10 | }
11 |
--------------------------------------------------------------------------------
/src/components/EntityActions.cpp:
--------------------------------------------------------------------------------
1 | #include "EntityActions.h"
2 | #include
3 | #include
4 | #include
5 |
6 | void ::Components::Actions::Logic::destroyLogicComponent(Components::LogicComponent& c)
7 | {
8 | delete c.m_pLogicController;
9 | c.m_pLogicController = nullptr;
10 | }
11 |
12 | void ::Components::Actions::Logic::destroyVisualComponent(VisualComponent& c)
13 | {
14 | delete c.m_pVisualController;
15 | c.m_pVisualController = nullptr;
16 | }
17 |
18 | void ::Components::Actions::Logic::destroyPfxComponent(Components::PfxComponent& c)
19 | {
20 | if (bgfx::isValid(c.m_ParticleVB))
21 | {
22 | bgfx::destroy(c.m_ParticleVB);
23 | c.m_ParticleVB = BGFX_INVALID_HANDLE;
24 | }
25 | }
26 |
27 | void ::Components::Actions::Animation::destroyAnimationComponent(AnimationComponent& c)
28 | {
29 | delete c.m_AnimHandler;
30 | c.m_AnimHandler = nullptr;
31 | }
32 |
--------------------------------------------------------------------------------
/src/content/AnimationLibrary.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include