├── CMakeLists.txt ├── LICENSE ├── README.md ├── contrib ├── SDL2 │ ├── bin │ │ └── SDL2.dll │ ├── include │ │ └── SDL2 │ │ │ ├── SDL.h │ │ │ ├── SDL_assert.h │ │ │ ├── SDL_atomic.h │ │ │ ├── SDL_audio.h │ │ │ ├── SDL_bits.h │ │ │ ├── SDL_blendmode.h │ │ │ ├── SDL_clipboard.h │ │ │ ├── SDL_config.h │ │ │ ├── SDL_config_android.h │ │ │ ├── SDL_config_iphoneos.h │ │ │ ├── SDL_config_macosx.h │ │ │ ├── SDL_config_minimal.h │ │ │ ├── SDL_config_pandora.h │ │ │ ├── SDL_config_psp.h │ │ │ ├── SDL_config_windows.h │ │ │ ├── SDL_config_winrt.h │ │ │ ├── SDL_config_wiz.h │ │ │ ├── SDL_copying.h │ │ │ ├── SDL_cpuinfo.h │ │ │ ├── SDL_egl.h │ │ │ ├── SDL_endian.h │ │ │ ├── SDL_error.h │ │ │ ├── SDL_events.h │ │ │ ├── SDL_filesystem.h │ │ │ ├── SDL_gamecontroller.h │ │ │ ├── SDL_gesture.h │ │ │ ├── SDL_haptic.h │ │ │ ├── SDL_hints.h │ │ │ ├── SDL_joystick.h │ │ │ ├── SDL_keyboard.h │ │ │ ├── SDL_keycode.h │ │ │ ├── SDL_loadso.h │ │ │ ├── SDL_log.h │ │ │ ├── SDL_main.h │ │ │ ├── SDL_messagebox.h │ │ │ ├── SDL_mouse.h │ │ │ ├── SDL_mutex.h │ │ │ ├── SDL_name.h │ │ │ ├── SDL_opengl.h │ │ │ ├── SDL_opengl_glext.h │ │ │ ├── SDL_opengles.h │ │ │ ├── SDL_opengles2.h │ │ │ ├── SDL_opengles2_gl2.h │ │ │ ├── SDL_opengles2_gl2ext.h │ │ │ ├── SDL_opengles2_gl2platform.h │ │ │ ├── SDL_opengles2_khrplatform.h │ │ │ ├── SDL_pixels.h │ │ │ ├── SDL_platform.h │ │ │ ├── SDL_power.h │ │ │ ├── SDL_quit.h │ │ │ ├── SDL_rect.h │ │ │ ├── SDL_render.h │ │ │ ├── SDL_revision.h │ │ │ ├── SDL_rwops.h │ │ │ ├── SDL_scancode.h │ │ │ ├── SDL_shape.h │ │ │ ├── SDL_stdinc.h │ │ │ ├── SDL_surface.h │ │ │ ├── SDL_system.h │ │ │ ├── SDL_syswm.h │ │ │ ├── SDL_test.h │ │ │ ├── SDL_test_assert.h │ │ │ ├── SDL_test_common.h │ │ │ ├── SDL_test_compare.h │ │ │ ├── SDL_test_crc32.h │ │ │ ├── SDL_test_font.h │ │ │ ├── SDL_test_fuzzer.h │ │ │ ├── SDL_test_harness.h │ │ │ ├── SDL_test_images.h │ │ │ ├── SDL_test_log.h │ │ │ ├── SDL_test_md5.h │ │ │ ├── SDL_test_memory.h │ │ │ ├── SDL_test_random.h │ │ │ ├── SDL_thread.h │ │ │ ├── SDL_timer.h │ │ │ ├── SDL_touch.h │ │ │ ├── SDL_types.h │ │ │ ├── SDL_version.h │ │ │ ├── SDL_video.h │ │ │ ├── SDL_vulkan.h │ │ │ ├── begin_code.h │ │ │ └── close_code.h │ └── lib │ │ ├── SDL2.lib │ │ ├── SDL2main.lib │ │ └── SDL2test.lib └── openal-soft │ ├── bin │ └── soft_oal.dll │ ├── include │ └── AL │ │ ├── al.h │ │ ├── alc.h │ │ ├── alext.h │ │ ├── efx-creative.h │ │ ├── efx-presets.h │ │ └── efx.h │ └── lib │ └── OpenAL32.lib ├── data ├── fonts │ ├── creepy.png │ ├── sum.png │ └── tiny.png ├── models │ ├── bl1 │ │ ├── Graveyard_GraveyardMesh_bake.png │ │ ├── bl1.blend │ │ ├── bl1.mtl │ │ ├── bl1.obj │ │ ├── brick.png │ │ ├── bush.png │ │ ├── concrete.png │ │ ├── damaged_grass.png │ │ ├── dark_wood.png │ │ ├── dirt.png │ │ ├── fence.png │ │ ├── grass.png │ │ ├── grave_wall.png │ │ ├── lightmap.png │ │ ├── rusty_metal.png │ │ ├── stone.png │ │ ├── tiles.png │ │ ├── tombstone.png │ │ └── white.png │ ├── bongo │ │ ├── bongo.blend │ │ ├── bongo.mtl │ │ ├── bongo.obj │ │ └── lightmap.png │ ├── curuthers │ │ ├── Whiskers_diffuse.png │ │ ├── curuthers.mtl │ │ └── curuthers.obj │ ├── re_hall │ │ ├── dining_lightmap.png │ │ ├── hall_lightmap.png │ │ ├── re_house_baked.mtl │ │ └── re_house_baked.obj │ └── skybox_night │ │ ├── skybox.blend │ │ ├── skybox.mtl │ │ ├── skybox.obj │ │ └── skybox.png ├── sounds │ ├── bongo.ogg │ ├── dixie_horn.ogg │ ├── zombie_activate.ogg │ └── zombie_groan.ogg ├── sprites │ ├── bongo_cat.png │ ├── heart.png │ ├── pitchfork.png │ ├── weapons.png │ ├── zombie.png │ └── zombie_full.png └── ui │ ├── hud_bar.png │ └── hud_indent.png ├── docs ├── ss1.png ├── ss2.png └── ss3.png ├── scripts └── bake.py └── src ├── blood ├── BongoCat.cpp ├── BongoCat.h ├── BongoScreen.cpp ├── BongoScreen.h ├── Fade.cpp ├── Fade.h ├── GameScreen.cpp ├── GameScreen.h ├── HitBox.cpp ├── HitBox.h ├── Pickup.cpp ├── Pickup.h ├── Player.cpp ├── Player.h ├── SkyBox.cpp ├── SkyBox.h ├── Zombie.cpp ├── Zombie.h └── main.cpp ├── example └── main.cpp ├── net_platform ├── game │ ├── game.vcxproj │ └── game.vcxproj.filters ├── native │ ├── native.cpp │ ├── native.vcxproj │ └── native.vcxproj.filters ├── net_platform.sln ├── net_platform │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── net_platform.csproj │ └── net_platform.csproj.user ├── qplatform │ ├── qplatform.vcxproj │ └── qplatform.vcxproj.filters └── qsoft │ ├── qsoft.vcxproj │ └── qsoft.vcxproj.filters ├── qplatform ├── Audio.cpp ├── Audio.h ├── BoxCollider.cpp ├── BoxCollider.h ├── Camera.cpp ├── Camera.h ├── Component.cpp ├── Component.h ├── Entity.cpp ├── Entity.h ├── Environment.cpp ├── Environment.h ├── Exception.h ├── Font.cpp ├── Font.h ├── Gui.cpp ├── Gui.h ├── Keyboard.cpp ├── Keyboard.h ├── MaterialGroup.cpp ├── MaterialGroup.h ├── Model.cpp ├── Model.h ├── ModelRenderer.cpp ├── ModelRenderer.h ├── Part.cpp ├── Part.h ├── Platform.cpp ├── Platform.h ├── Resource.cpp ├── Resource.h ├── Resources.cpp ├── Resources.h ├── Sound.cpp ├── Sound.h ├── SpriteRenderer.cpp ├── SpriteRenderer.h ├── StaticModelCollider.cpp ├── StaticModelCollider.h ├── Texture.cpp ├── Texture.h ├── Transform.cpp ├── Transform.h ├── Window.cpp ├── Window.h ├── World.cpp ├── World.h ├── config.h ├── entry.cpp ├── qplatform.h ├── stb_image.h ├── stb_vorbis.h └── tribox.cpp ├── qsoft ├── Color.h ├── Debug.cpp ├── Debug.h ├── Face.h ├── Matrix.cpp ├── Matrix.h ├── Mesh.cpp ├── Mesh.h ├── Renderer.cpp ├── Renderer.h ├── Shadow.cpp ├── Shadow.h ├── Texture.cpp ├── Texture.h ├── ThreadPool.h ├── Util.cpp ├── Util.h ├── Vector.cpp ├── Vector.h ├── Vertex.cpp ├── Vertex.h └── qsoft.h ├── sdl2_platform └── main.cpp ├── sdl_platform └── main.cpp ├── sr1 ├── memory ├── noncopyable ├── shared_ptr ├── vector ├── weak_ptr └── zero_initialized └── x11_platform └── main.cpp /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.6) 2 | project(QSOFT) 3 | 4 | if(MSVC) 5 | #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox") 6 | else() 7 | #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -fopenmp") 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O3") 9 | #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") 10 | endif() 11 | 12 | #add_definitions(-DSTD_SR1_DEBUG) 13 | 14 | if(WIN32) 15 | include_directories( 16 | ${PROJECT_SOURCE_DIR}/contrib/SDL2/include 17 | ${PROJECT_SOURCE_DIR}/contrib/openal-soft/include 18 | ) 19 | else() 20 | include_directories( 21 | /usr/X11R6/include 22 | /usr/local/include 23 | ) 24 | endif() 25 | 26 | if(WIN32) 27 | link_directories( 28 | ${PROJECT_SOURCE_DIR}/contrib/SDL2/lib 29 | ${PROJECT_SOURCE_DIR}/contrib/openal-soft/lib 30 | ) 31 | else() 32 | link_directories( 33 | /usr/X11R6/lib 34 | /usr/local/lib 35 | ) 36 | endif() 37 | 38 | include_directories( 39 | src 40 | ${PROJECT_SOURCE_DIR}/contrib 41 | ) 42 | 43 | if(MSVC) 44 | add_definitions(-DSDL_MAIN_HANDLED) 45 | endif() 46 | 47 | add_library(qsoft 48 | src/qsoft/Texture.cpp 49 | src/qsoft/Renderer.cpp 50 | src/qsoft/Mesh.cpp 51 | src/qsoft/Matrix.cpp 52 | src/qsoft/Vertex.cpp 53 | src/qsoft/Vector.cpp 54 | src/qsoft/Debug.cpp 55 | src/qsoft/Util.cpp 56 | src/qsoft/Shadow.cpp 57 | ) 58 | 59 | add_executable(example 60 | src/example/main.cpp 61 | ) 62 | target_link_libraries(example qsoft SDL2main SDL2) 63 | 64 | add_library(qplatform 65 | src/qplatform/entry.cpp 66 | src/qplatform/tribox.cpp 67 | src/qplatform/Platform.cpp 68 | src/qplatform/World.cpp 69 | src/qplatform/Component.cpp 70 | src/qplatform/Entity.cpp 71 | src/qplatform/Resource.cpp 72 | src/qplatform/Resources.cpp 73 | src/qplatform/Model.cpp 74 | src/qplatform/Window.cpp 75 | src/qplatform/Part.cpp 76 | src/qplatform/MaterialGroup.cpp 77 | src/qplatform/ModelRenderer.cpp 78 | src/qplatform/Texture.cpp 79 | src/qplatform/Environment.cpp 80 | src/qplatform/StaticModelCollider.cpp 81 | src/qplatform/Transform.cpp 82 | src/qplatform/Camera.cpp 83 | src/qplatform/Keyboard.cpp 84 | src/qplatform/SpriteRenderer.cpp 85 | src/qplatform/Gui.cpp 86 | src/qplatform/Audio.cpp 87 | src/qplatform/Sound.cpp 88 | src/qplatform/BoxCollider.cpp 89 | src/qplatform/Font.cpp 90 | ) 91 | 92 | if(MSVC) 93 | target_link_libraries(qplatform qsoft openal32) 94 | else() 95 | target_link_libraries(qplatform qsoft openal) 96 | endif() 97 | 98 | add_library(blood 99 | src/blood/main.cpp 100 | src/blood/GameScreen.cpp 101 | src/blood/BongoScreen.cpp 102 | src/blood/Player.cpp 103 | src/blood/SkyBox.cpp 104 | src/blood/Zombie.cpp 105 | src/blood/HitBox.cpp 106 | src/blood/Fade.cpp 107 | src/blood/BongoCat.cpp 108 | src/blood/Pickup.cpp 109 | ) 110 | 111 | add_executable(sdl2_platform 112 | src/sdl2_platform/main.cpp 113 | ) 114 | target_link_libraries(sdl2_platform SDL2 qplatform blood qplatform blood) 115 | 116 | add_executable(sdl_platform 117 | src/sdl_platform/main.cpp 118 | ) 119 | target_link_libraries(sdl_platform SDL qplatform blood qplatform blood) 120 | 121 | add_executable(x11_platform 122 | src/x11_platform/main.cpp 123 | ) 124 | 125 | target_link_libraries(x11_platform X11 qplatform blood qplatform blood) 126 | 127 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Software 3D Renderer 2 | A 3D renderer I wrote during a games jam at work. The game is inspired by Monolith's Blood (1997). All rendering is done entirely in software on the CPU. As such it does not require an accelerated GPU and should work quite nicely in emulators and virtualisers. 3 | 4 | To enable parallelisation in the renderer, set the corresponding flag in the CMakeLists.txt to enable OpenMP in capable compilers. Note that currently pthreads are also supported on compatible systems. 5 | 6 | 7 | 8 | 9 | Everything was written pretty much from scratch in C++ and due to the fact that no GPU is needed the project has barely any dependencies and is fairly portable to most platforms. The only ones I have tested on are OpenBSD and Windows. 10 | 11 | The renderer, engine and game can be built and run using the following: 12 | 13 | $ mkdir build 14 | $ cd build 15 | $ cmake .. -DCMAKE_BUILD_TYPE=Release 16 | $ cd .. 17 | $ cmake --build build 18 | $ build/blood 19 | 20 | Controls are arrow keys to move around, space to attack and 't' and 'y' to change levels. The second level is basically a secret boss. 21 | 22 | 23 | 24 | Please note that the end boss in Monolith's 1997 Blood was not in fact Bongo Cat. 25 | 26 | Enjoy! 27 | -------------------------------------------------------------------------------- /contrib/SDL2/bin/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/SDL2/bin/SDL2.dll -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef SDL_bits_h_ 29 | #define SDL_bits_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return Index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | #if defined(__WATCOMC__) && defined(__386__) 51 | extern _inline int _SDL_clz_watcom (Uint32); 52 | #pragma aux _SDL_clz_watcom = \ 53 | "bsr eax, eax" \ 54 | "xor eax, 31" \ 55 | parm [eax] nomemory \ 56 | value [eax] \ 57 | modify exact [eax] nomemory; 58 | #endif 59 | 60 | SDL_FORCE_INLINE int 61 | SDL_MostSignificantBitIndex32(Uint32 x) 62 | { 63 | #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 64 | /* Count Leading Zeroes builtin in GCC. 65 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 66 | */ 67 | if (x == 0) { 68 | return -1; 69 | } 70 | return 31 - __builtin_clz(x); 71 | #elif defined(__WATCOMC__) && defined(__386__) 72 | if (x == 0) { 73 | return -1; 74 | } 75 | return 31 - _SDL_clz_watcom(x); 76 | #else 77 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 78 | * , released in the public domain. 79 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 80 | */ 81 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 82 | const int S[] = {1, 2, 4, 8, 16}; 83 | 84 | int msbIndex = 0; 85 | int i; 86 | 87 | if (x == 0) { 88 | return -1; 89 | } 90 | 91 | for (i = 4; i >= 0; i--) 92 | { 93 | if (x & b[i]) 94 | { 95 | x >>= S[i]; 96 | msbIndex |= S[i]; 97 | } 98 | } 99 | 100 | return msbIndex; 101 | #endif 102 | } 103 | 104 | /* Ends C function definitions when using C++ */ 105 | #ifdef __cplusplus 106 | } 107 | #endif 108 | #include "close_code.h" 109 | 110 | #endif /* SDL_bits_h_ */ 111 | 112 | /* vi: set ts=4 sw=4 expandtab: */ 113 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef SDL_clipboard_h_ 29 | #define SDL_clipboard_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Put UTF-8 text into the clipboard 43 | * 44 | * \sa SDL_GetClipboardText() 45 | */ 46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 47 | 48 | /** 49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 50 | * 51 | * \sa SDL_SetClipboardText() 52 | */ 53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 54 | 55 | /** 56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 57 | * 58 | * \sa SDL_GetClipboardText() 59 | */ 60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* SDL_clipboard_h_ */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_config_minimal.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2017 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_config_minimal_h_ 23 | #define SDL_config_minimal_h_ 24 | #define SDL_config_h_ 25 | 26 | #include "SDL_platform.h" 27 | 28 | /** 29 | * \file SDL_config_minimal.h 30 | * 31 | * This is the minimal configuration that can be used to build SDL. 32 | */ 33 | 34 | #define HAVE_STDARG_H 1 35 | #define HAVE_STDDEF_H 1 36 | 37 | /* Most everything except Visual Studio 2008 and earlier has stdint.h now */ 38 | #if defined(_MSC_VER) && (_MSC_VER < 1600) 39 | /* Here are some reasonable defaults */ 40 | typedef unsigned int size_t; 41 | typedef signed char int8_t; 42 | typedef unsigned char uint8_t; 43 | typedef signed short int16_t; 44 | typedef unsigned short uint16_t; 45 | typedef signed int int32_t; 46 | typedef unsigned int uint32_t; 47 | typedef signed long long int64_t; 48 | typedef unsigned long long uint64_t; 49 | typedef unsigned long uintptr_t; 50 | #else 51 | #define HAVE_STDINT_H 1 52 | #endif /* Visual Studio 2008 */ 53 | 54 | #ifdef __GNUC__ 55 | #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 56 | #endif 57 | 58 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 59 | #define SDL_AUDIO_DRIVER_DUMMY 1 60 | 61 | /* Enable the stub joystick driver (src/joystick/dummy/\*.c) */ 62 | #define SDL_JOYSTICK_DISABLED 1 63 | 64 | /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ 65 | #define SDL_HAPTIC_DISABLED 1 66 | 67 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 68 | #define SDL_LOADSO_DISABLED 1 69 | 70 | /* Enable the stub thread support (src/thread/generic/\*.c) */ 71 | #define SDL_THREADS_DISABLED 1 72 | 73 | /* Enable the stub timer support (src/timer/dummy/\*.c) */ 74 | #define SDL_TIMERS_DISABLED 1 75 | 76 | /* Enable the dummy video driver (src/video/dummy/\*.c) */ 77 | #define SDL_VIDEO_DRIVER_DUMMY 1 78 | 79 | /* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */ 80 | #define SDL_FILESYSTEM_DUMMY 1 81 | 82 | #endif /* SDL_config_minimal_h_ */ 83 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_config_pandora.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2017 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_config_pandora_h_ 23 | #define SDL_config_pandora_h_ 24 | #define SDL_config_h_ 25 | 26 | /* This is a set of defines to configure the SDL features */ 27 | 28 | /* General platform specific identifiers */ 29 | #include "SDL_platform.h" 30 | 31 | #ifdef __LP64__ 32 | #define SIZEOF_VOIDP 8 33 | #else 34 | #define SIZEOF_VOIDP 4 35 | #endif 36 | 37 | #define SDL_BYTEORDER 1234 38 | 39 | #define HAVE_ALLOCA_H 1 40 | #define HAVE_SYS_TYPES_H 1 41 | #define HAVE_STDIO_H 1 42 | #define STDC_HEADERS 1 43 | #define HAVE_STDLIB_H 1 44 | #define HAVE_STDARG_H 1 45 | #define HAVE_MALLOC_H 1 46 | #define HAVE_MEMORY_H 1 47 | #define HAVE_STRING_H 1 48 | #define HAVE_STRINGS_H 1 49 | #define HAVE_INTTYPES_H 1 50 | #define HAVE_STDINT_H 1 51 | #define HAVE_CTYPE_H 1 52 | #define HAVE_MATH_H 1 53 | #define HAVE_ICONV_H 1 54 | #define HAVE_SIGNAL_H 1 55 | #define HAVE_MALLOC 1 56 | #define HAVE_CALLOC 1 57 | #define HAVE_REALLOC 1 58 | #define HAVE_FREE 1 59 | #define HAVE_ALLOCA 1 60 | #define HAVE_GETENV 1 61 | #define HAVE_SETENV 1 62 | #define HAVE_PUTENV 1 63 | #define HAVE_UNSETENV 1 64 | #define HAVE_QSORT 1 65 | #define HAVE_ABS 1 66 | #define HAVE_BCOPY 1 67 | #define HAVE_MEMSET 1 68 | #define HAVE_MEMCPY 1 69 | #define HAVE_MEMMOVE 1 70 | #define HAVE_STRLEN 1 71 | #define HAVE_STRDUP 1 72 | #define HAVE_STRCHR 1 73 | #define HAVE_STRRCHR 1 74 | #define HAVE_STRSTR 1 75 | #define HAVE_STRTOL 1 76 | #define HAVE_STRTOUL 1 77 | #define HAVE_STRTOLL 1 78 | #define HAVE_STRTOULL 1 79 | #define HAVE_ATOI 1 80 | #define HAVE_ATOF 1 81 | #define HAVE_STRCMP 1 82 | #define HAVE_STRNCMP 1 83 | #define HAVE_STRCASECMP 1 84 | #define HAVE_STRNCASECMP 1 85 | #define HAVE_VSSCANF 1 86 | #define HAVE_VSNPRINTF 1 87 | #define HAVE_M_PI 1 88 | #define HAVE_CEIL 1 89 | #define HAVE_COPYSIGN 1 90 | #define HAVE_COS 1 91 | #define HAVE_COSF 1 92 | #define HAVE_FABS 1 93 | #define HAVE_FLOOR 1 94 | #define HAVE_LOG 1 95 | #define HAVE_SCALBN 1 96 | #define HAVE_SIN 1 97 | #define HAVE_SINF 1 98 | #define HAVE_SQRT 1 99 | #define HAVE_SQRTF 1 100 | #define HAVE_TAN 1 101 | #define HAVE_TANF 1 102 | #define HAVE_SIGACTION 1 103 | #define HAVE_SETJMP 1 104 | #define HAVE_NANOSLEEP 1 105 | 106 | #define SDL_AUDIO_DRIVER_DUMMY 1 107 | #define SDL_AUDIO_DRIVER_OSS 1 108 | 109 | #define SDL_INPUT_LINUXEV 1 110 | #define SDL_INPUT_TSLIB 1 111 | #define SDL_JOYSTICK_LINUX 1 112 | #define SDL_HAPTIC_LINUX 1 113 | 114 | #define SDL_LOADSO_DLOPEN 1 115 | 116 | #define SDL_THREAD_PTHREAD 1 117 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 118 | 119 | #define SDL_TIMER_UNIX 1 120 | #define SDL_FILESYSTEM_UNIX 1 121 | 122 | #define SDL_VIDEO_DRIVER_DUMMY 1 123 | #define SDL_VIDEO_DRIVER_X11 1 124 | #define SDL_VIDEO_DRIVER_PANDORA 1 125 | #define SDL_VIDEO_RENDER_OGL_ES 1 126 | #define SDL_VIDEO_OPENGL_ES 1 127 | 128 | #endif /* SDL_config_pandora_h_ */ 129 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_config_wiz.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2017 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_config_wiz_h_ 23 | #define SDL_config_wiz_h_ 24 | #define SDL_config_h_ 25 | 26 | /* This is a set of defines to configure the SDL features */ 27 | 28 | /* General platform specific identifiers */ 29 | #include "SDL_platform.h" 30 | 31 | #define SDL_BYTEORDER 1234 32 | 33 | #define HAVE_ALLOCA_H 1 34 | #define HAVE_SYS_TYPES_H 1 35 | #define HAVE_STDIO_H 1 36 | #define STDC_HEADERS 1 37 | #define HAVE_STDLIB_H 1 38 | #define HAVE_STDARG_H 1 39 | #define HAVE_MALLOC_H 1 40 | #define HAVE_MEMORY_H 1 41 | #define HAVE_STRING_H 1 42 | #define HAVE_STRINGS_H 1 43 | #define HAVE_INTTYPES_H 1 44 | #define HAVE_STDINT_H 1 45 | #define HAVE_CTYPE_H 1 46 | #define HAVE_MATH_H 1 47 | #define HAVE_ICONV_H 1 48 | #define HAVE_SIGNAL_H 1 49 | #define HAVE_MALLOC 1 50 | #define HAVE_CALLOC 1 51 | #define HAVE_REALLOC 1 52 | #define HAVE_FREE 1 53 | #define HAVE_ALLOCA 1 54 | #define HAVE_GETENV 1 55 | #define HAVE_SETENV 1 56 | #define HAVE_PUTENV 1 57 | #define HAVE_UNSETENV 1 58 | #define HAVE_QSORT 1 59 | #define HAVE_ABS 1 60 | #define HAVE_BCOPY 1 61 | #define HAVE_MEMSET 1 62 | #define HAVE_MEMCPY 1 63 | #define HAVE_MEMMOVE 1 64 | #define HAVE_STRLEN 1 65 | #define HAVE_STRDUP 1 66 | #define HAVE_STRCHR 1 67 | #define HAVE_STRRCHR 1 68 | #define HAVE_STRSTR 1 69 | #define HAVE_STRTOL 1 70 | #define HAVE_STRTOUL 1 71 | #define HAVE_STRTOLL 1 72 | #define HAVE_STRTOULL 1 73 | #define HAVE_ATOI 1 74 | #define HAVE_ATOF 1 75 | #define HAVE_STRCMP 1 76 | #define HAVE_STRNCMP 1 77 | #define HAVE_STRCASECMP 1 78 | #define HAVE_STRNCASECMP 1 79 | #define HAVE_VSSCANF 1 80 | #define HAVE_VSNPRINTF 1 81 | #define HAVE_M_PI 1 82 | #define HAVE_CEIL 1 83 | #define HAVE_COPYSIGN 1 84 | #define HAVE_COS 1 85 | #define HAVE_COSF 1 86 | #define HAVE_FABS 1 87 | #define HAVE_FLOOR 1 88 | #define HAVE_LOG 1 89 | #define HAVE_SCALBN 1 90 | #define HAVE_SIN 1 91 | #define HAVE_SINF 1 92 | #define HAVE_SQRT 1 93 | #define HAVE_SQRTF 1 94 | #define HAVE_TAN 1 95 | #define HAVE_TANF 1 96 | #define HAVE_SIGACTION 1 97 | #define HAVE_SETJMP 1 98 | #define HAVE_NANOSLEEP 1 99 | #define HAVE_POW 1 100 | 101 | #define SDL_AUDIO_DRIVER_DUMMY 1 102 | #define SDL_AUDIO_DRIVER_OSS 1 103 | 104 | #define SDL_INPUT_LINUXEV 1 105 | #define SDL_INPUT_TSLIB 1 106 | #define SDL_JOYSTICK_LINUX 1 107 | #define SDL_HAPTIC_LINUX 1 108 | 109 | #define SDL_LOADSO_DLOPEN 1 110 | 111 | #define SDL_THREAD_PTHREAD 1 112 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 113 | 114 | #define SDL_TIMER_UNIX 1 115 | 116 | #define SDL_VIDEO_DRIVER_DUMMY 1 117 | #define SDL_VIDEO_DRIVER_PANDORA 1 118 | #define SDL_VIDEO_RENDER_OGL_ES 1 119 | #define SDL_VIDEO_OPENGL_ES 1 120 | 121 | #endif /* SDL_config_wiz_h_ */ 122 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2017 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_error.h 24 | * 25 | * Simple error message routines for SDL. 26 | */ 27 | 28 | #ifndef SDL_error_h_ 29 | #define SDL_error_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Public functions */ 40 | /* SDL_SetError() unconditionally returns -1. */ 41 | extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 42 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 43 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 44 | 45 | /** 46 | * \name Internal error functions 47 | * 48 | * \internal 49 | * Private error reporting function - used internally. 50 | */ 51 | /* @{ */ 52 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 53 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 54 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 55 | typedef enum 56 | { 57 | SDL_ENOMEM, 58 | SDL_EFREAD, 59 | SDL_EFWRITE, 60 | SDL_EFSEEK, 61 | SDL_UNSUPPORTED, 62 | SDL_LASTERROR 63 | } SDL_errorcode; 64 | /* SDL_Error() unconditionally returns -1. */ 65 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 66 | /* @} *//* Internal error functions */ 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* SDL_error_h_ */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef SDL_gesture_h_ 29 | #define SDL_gesture_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 50 | * 51 | * 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 54 | 55 | 56 | /** 57 | * \brief Save all currently loaded Dollar Gesture templates 58 | * 59 | * 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 62 | 63 | /** 64 | * \brief Save a currently loaded Dollar Gesture template 65 | * 66 | * 67 | */ 68 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 69 | 70 | 71 | /** 72 | * \brief Load Dollar Gesture templates from a file 73 | * 74 | * 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 77 | 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* SDL_gesture_h_ */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef SDL_loadso_h_ 42 | #define SDL_loadso_h_ 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * This function dynamically loads a shared object and returns a pointer 55 | * to the object handle (or NULL if there was an error). 56 | * The 'sofile' parameter is a system dependent name of the object file. 57 | */ 58 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 59 | 60 | /** 61 | * Given an object handle, this function looks up the address of the 62 | * named function in the shared object and returns it. This address 63 | * is no longer valid after calling SDL_UnloadObject(). 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 66 | const char *name); 67 | 68 | /** 69 | * Unload a shared object from memory. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* SDL_loadso_h_ */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifndef _MSC_VER 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_power_h_ 23 | #define SDL_power_h_ 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * \brief Get the current power supply details. 54 | * 55 | * \param secs Seconds of battery life left. You can pass a NULL here if 56 | * you don't care. Will return -1 if we can't determine a 57 | * value, or we're not running on a battery. 58 | * 59 | * \param pct Percentage of battery life left, between 0 and 100. You can 60 | * pass a NULL here if you don't care. Will return -1 if we 61 | * can't determine a value, or we're not running on a battery. 62 | * 63 | * \return The state of the battery (if any). 64 | */ 65 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 66 | 67 | /* Ends C function definitions when using C++ */ 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* SDL_power_h_ */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef SDL_quit_h_ 29 | #define SDL_quit_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* SDL_quit_h_ */ 59 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-11914:f1084c419f33" 2 | #define SDL_REVISION_NUMBER 11914 3 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_h_ 31 | #define SDL_test_h_ 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_assert.h" 35 | #include "SDL_test_common.h" 36 | #include "SDL_test_compare.h" 37 | #include "SDL_test_crc32.h" 38 | #include "SDL_test_font.h" 39 | #include "SDL_test_fuzzer.h" 40 | #include "SDL_test_harness.h" 41 | #include "SDL_test_images.h" 42 | #include "SDL_test_log.h" 43 | #include "SDL_test_md5.h" 44 | #include "SDL_test_memory.h" 45 | #include "SDL_test_random.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* Global definitions */ 54 | 55 | /* 56 | * Note: Maximum size of SDLTest log message is less than SDL's limit 57 | * to ensure we can fit additional information such as the timestamp. 58 | */ 59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_assert.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_assert_h_ 37 | #define SDL_test_assert_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 72 | 73 | /** 74 | * \brief Explicitly pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(void); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(void); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(void); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* SDL_test_assert_h_ */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_compare_h_ 37 | #define SDL_test_compare_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_compare_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_crc32.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Implements CRC32 calculations (default output is Perl String::CRC32 compatible). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_crc32_h_ 37 | #define SDL_test_crc32_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | 46 | /* ------------ Definitions --------- */ 47 | 48 | /* Definition shared by all CRC routines */ 49 | 50 | #ifndef CrcUint32 51 | #define CrcUint32 unsigned int 52 | #endif 53 | #ifndef CrcUint8 54 | #define CrcUint8 unsigned char 55 | #endif 56 | 57 | #ifdef ORIGINAL_METHOD 58 | #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ 59 | #else 60 | #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ 61 | #endif 62 | 63 | /** 64 | * Data structure for CRC32 (checksum) computation 65 | */ 66 | typedef struct { 67 | CrcUint32 crc32_table[256]; /* CRC table */ 68 | } SDLTest_Crc32Context; 69 | 70 | /* ---------- Function Prototypes ------------- */ 71 | 72 | /** 73 | * \brief Initialize the CRC context 74 | * 75 | * Note: The function initializes the crc table required for all crc calculations. 76 | * 77 | * \param crcContext pointer to context variable 78 | * 79 | * \returns 0 for OK, -1 on error 80 | * 81 | */ 82 | int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext); 83 | 84 | 85 | /** 86 | * \brief calculate a crc32 from a data block 87 | * 88 | * \param crcContext pointer to context variable 89 | * \param inBuf input buffer to checksum 90 | * \param inLen length of input buffer 91 | * \param crc32 pointer to Uint32 to store the final CRC into 92 | * 93 | * \returns 0 for OK, -1 on error 94 | * 95 | */ 96 | int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 97 | 98 | /* Same routine broken down into three steps */ 99 | int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 100 | int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 101 | int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 102 | 103 | 104 | /** 105 | * \brief clean up CRC context 106 | * 107 | * \param crcContext pointer to context variable 108 | * 109 | * \returns 0 for OK, -1 on error 110 | * 111 | */ 112 | 113 | int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); 114 | 115 | 116 | /* Ends C function definitions when using C++ */ 117 | #ifdef __cplusplus 118 | } 119 | #endif 120 | #include "close_code.h" 121 | 122 | #endif /* SDL_test_crc32_h_ */ 123 | 124 | /* vi: set ts=4 sw=4 expandtab: */ 125 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_font.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_font_h_ 31 | #define SDL_test_font_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | #define FONT_CHARACTER_SIZE 8 42 | 43 | /** 44 | * \brief Draw a string in the currently set font. 45 | * 46 | * \param renderer The renderer to draw on. 47 | * \param x The X coordinate of the upper left corner of the character. 48 | * \param y The Y coordinate of the upper left corner of the character. 49 | * \param c The character to draw. 50 | * 51 | * \returns Returns 0 on success, -1 on failure. 52 | */ 53 | int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c); 54 | 55 | /** 56 | * \brief Draw a string in the currently set font. 57 | * 58 | * \param renderer The renderer to draw on. 59 | * \param x The X coordinate of the upper left corner of the string. 60 | * \param y The Y coordinate of the upper left corner of the string. 61 | * \param s The string to draw. 62 | * 63 | * \returns Returns 0 on success, -1 on failure. 64 | */ 65 | int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s); 66 | 67 | 68 | /** 69 | * \brief Cleanup textures used by font drawing functions. 70 | */ 71 | void SDLTest_CleanupTextDrawing(void); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* SDL_test_font_h_ */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef SDL_test_images_h_ 37 | #define SDL_test_images_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(void); 59 | SDL_Surface *SDLTest_ImageBlitColor(void); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(void); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void); 62 | SDL_Surface *SDLTest_ImageBlitBlend(void); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void); 66 | SDL_Surface *SDLTest_ImageFace(void); 67 | SDL_Surface *SDLTest_ImagePrimitives(void); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* SDL_test_images_h_ */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_log_h_ 37 | #define SDL_test_log_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* SDL_test_log_h_ */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_memory.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_memory_h_ 31 | #define SDL_test_memory_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /** 41 | * \brief Start tracking SDL memory allocations 42 | * 43 | * \note This should be called before any other SDL functions for complete tracking coverage 44 | */ 45 | int SDLTest_TrackAllocations(); 46 | 47 | /** 48 | * \brief Print a log of any outstanding allocations 49 | * 50 | * \note This can be called after SDL_Quit() 51 | */ 52 | void SDLTest_LogAllocations(); 53 | 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* SDL_test_memory_h_ */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_test_random.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_random.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | A "32-bit Multiply with carry random number generator. Very fast. 33 | Includes a list of recommended multipliers. 34 | 35 | multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. 36 | period: (a*2^31)-1 37 | 38 | */ 39 | 40 | #ifndef SDL_test_random_h_ 41 | #define SDL_test_random_h_ 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /* --- Definitions */ 50 | 51 | /* 52 | * Macros that return a random number in a specific format. 53 | */ 54 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 55 | 56 | /* 57 | * Context structure for the random number generator state. 58 | */ 59 | typedef struct { 60 | unsigned int a; 61 | unsigned int x; 62 | unsigned int c; 63 | unsigned int ah; 64 | unsigned int al; 65 | } SDLTest_RandomContext; 66 | 67 | 68 | /* --- Function prototypes */ 69 | 70 | /** 71 | * \brief Initialize random number generator with two integers. 72 | * 73 | * Note: The random sequence of numbers returned by ...Random() is the 74 | * same for the same two integers and has a period of 2^31. 75 | * 76 | * \param rndContext pointer to context structure 77 | * \param xi integer that defines the random sequence 78 | * \param ci integer that defines the random sequence 79 | * 80 | */ 81 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 82 | unsigned int ci); 83 | 84 | /** 85 | * \brief Initialize random number generator based on current system time. 86 | * 87 | * \param rndContext pointer to context structure 88 | * 89 | */ 90 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 91 | 92 | 93 | /** 94 | * \brief Initialize random number generator based on current system time. 95 | * 96 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 97 | * before using this function. 98 | * 99 | * \param rndContext pointer to context structure 100 | * 101 | * \returns A random number (32bit unsigned integer) 102 | * 103 | */ 104 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_test_random_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_timer_h_ 23 | #define SDL_timer_h_ 24 | 25 | /** 26 | * \file SDL_timer.h 27 | * 28 | * Header for the SDL time management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | #include "begin_code.h" 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * \brief Get the number of milliseconds since the SDL library initialization. 42 | * 43 | * \note This value wraps if the program runs for more than ~49 days. 44 | */ 45 | extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); 46 | 47 | /** 48 | * \brief Compare SDL ticks values, and return true if A has passed B 49 | * 50 | * e.g. if you want to wait 100 ms, you could do this: 51 | * Uint32 timeout = SDL_GetTicks() + 100; 52 | * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { 53 | * ... do work until timeout has elapsed 54 | * } 55 | */ 56 | #define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0) 57 | 58 | /** 59 | * \brief Get the current value of the high resolution counter 60 | */ 61 | extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); 62 | 63 | /** 64 | * \brief Get the count per second of the high resolution counter 65 | */ 66 | extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); 67 | 68 | /** 69 | * \brief Wait a specified number of milliseconds before returning. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); 72 | 73 | /** 74 | * Function prototype for the timer callback function. 75 | * 76 | * The callback function is passed the current timer interval and returns 77 | * the next timer interval. If the returned value is the same as the one 78 | * passed in, the periodic alarm continues, otherwise a new alarm is 79 | * scheduled. If the callback returns 0, the periodic alarm is cancelled. 80 | */ 81 | typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param); 82 | 83 | /** 84 | * Definition of the timer ID type. 85 | */ 86 | typedef int SDL_TimerID; 87 | 88 | /** 89 | * \brief Add a new timer to the pool of timers already running. 90 | * 91 | * \return A timer ID, or 0 when an error occurs. 92 | */ 93 | extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, 94 | SDL_TimerCallback callback, 95 | void *param); 96 | 97 | /** 98 | * \brief Remove a timer knowing its ID. 99 | * 100 | * \return A boolean value indicating success or failure. 101 | * 102 | * \warning It is not safe to remove a timer multiple times. 103 | */ 104 | extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_timer_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef SDL_touch_h_ 29 | #define SDL_touch_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef struct SDL_Finger 45 | { 46 | SDL_FingerID id; 47 | float x; 48 | float y; 49 | float pressure; 50 | } SDL_Finger; 51 | 52 | /* Used as the device ID for mouse events simulated with touch input */ 53 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 54 | 55 | 56 | /* Function prototypes */ 57 | 58 | /** 59 | * \brief Get the number of registered touch devices. 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 62 | 63 | /** 64 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 65 | */ 66 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 67 | 68 | /** 69 | * \brief Get the number of active fingers for a given touch device. 70 | */ 71 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 72 | 73 | /** 74 | * \brief Get the finger object of the given touch, with the given index. 75 | */ 76 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* SDL_touch_h_ */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /contrib/SDL2/include/SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /* Reset structure packing at previous byte alignment */ 32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /contrib/SDL2/lib/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/SDL2/lib/SDL2.lib -------------------------------------------------------------------------------- /contrib/SDL2/lib/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/SDL2/lib/SDL2main.lib -------------------------------------------------------------------------------- /contrib/SDL2/lib/SDL2test.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/SDL2/lib/SDL2test.lib -------------------------------------------------------------------------------- /contrib/openal-soft/bin/soft_oal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/openal-soft/bin/soft_oal.dll -------------------------------------------------------------------------------- /contrib/openal-soft/include/AL/efx-creative.h: -------------------------------------------------------------------------------- 1 | /* The tokens that would be defined here are already defined in efx.h. This 2 | * empty file is here to provide compatibility with Windows-based projects 3 | * that would include it. */ 4 | -------------------------------------------------------------------------------- /contrib/openal-soft/lib/OpenAL32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/contrib/openal-soft/lib/OpenAL32.lib -------------------------------------------------------------------------------- /data/fonts/creepy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/fonts/creepy.png -------------------------------------------------------------------------------- /data/fonts/sum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/fonts/sum.png -------------------------------------------------------------------------------- /data/fonts/tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/fonts/tiny.png -------------------------------------------------------------------------------- /data/models/bl1/Graveyard_GraveyardMesh_bake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/Graveyard_GraveyardMesh_bake.png -------------------------------------------------------------------------------- /data/models/bl1/bl1.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/bl1.blend -------------------------------------------------------------------------------- /data/models/bl1/bl1.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'bl1.blend' 2 | # Material Count: 13 3 | 4 | newmtl None_brick.png 5 | Ns 0.000000 6 | Ka 0.000000 0.000000 0.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.800000 0.800000 0.800000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 2 13 | map_Kd Graveyard_GraveyardMesh_bake.png 14 | 15 | newmtl None_bush.png 16 | Ns 0.000000 17 | Ka 0.000000 0.000000 0.000000 18 | Kd 0.800000 0.800000 0.800000 19 | Ks 0.800000 0.800000 0.800000 20 | Ke 0.000000 0.000000 0.000000 21 | Ni 1.000000 22 | d 1.000000 23 | illum 2 24 | map_Kd Graveyard_GraveyardMesh_bake.png 25 | 26 | newmtl None_concrete.png 27 | Ns 0.000000 28 | Ka 0.000000 0.000000 0.000000 29 | Kd 0.800000 0.800000 0.800000 30 | Ks 0.800000 0.800000 0.800000 31 | Ke 0.000000 0.000000 0.000000 32 | Ni 1.000000 33 | d 1.000000 34 | illum 2 35 | map_Kd Graveyard_GraveyardMesh_bake.png 36 | 37 | newmtl None_damaged_grass.png 38 | Ns 0.000000 39 | Ka 0.000000 0.000000 0.000000 40 | Kd 0.800000 0.800000 0.800000 41 | Ks 0.800000 0.800000 0.800000 42 | Ke 0.000000 0.000000 0.000000 43 | Ni 1.000000 44 | d 1.000000 45 | illum 2 46 | map_Kd Graveyard_GraveyardMesh_bake.png 47 | 48 | newmtl None_dark_wood.png 49 | Ns 0.000000 50 | Ka 0.000000 0.000000 0.000000 51 | Kd 0.800000 0.800000 0.800000 52 | Ks 0.800000 0.800000 0.800000 53 | Ke 0.000000 0.000000 0.000000 54 | Ni 1.000000 55 | d 1.000000 56 | illum 2 57 | map_Kd Graveyard_GraveyardMesh_bake.png 58 | 59 | newmtl None_dirt.png 60 | Ns 0.000000 61 | Ka 0.000000 0.000000 0.000000 62 | Kd 0.800000 0.800000 0.800000 63 | Ks 0.800000 0.800000 0.800000 64 | Ke 0.000000 0.000000 0.000000 65 | Ni 1.000000 66 | d 1.000000 67 | illum 2 68 | map_Kd Graveyard_GraveyardMesh_bake.png 69 | 70 | newmtl None_fence.png 71 | Ns 0.000000 72 | Ka 0.000000 0.000000 0.000000 73 | Kd 0.800000 0.800000 0.800000 74 | Ks 0.800000 0.800000 0.800000 75 | Ke 0.000000 0.000000 0.000000 76 | Ni 1.000000 77 | d 1.000000 78 | illum 2 79 | map_Kd fence.png 80 | 81 | newmtl None_grave_wall.png 82 | Ns 0.000000 83 | Ka 0.000000 0.000000 0.000000 84 | Kd 0.800000 0.800000 0.800000 85 | Ks 0.800000 0.800000 0.800000 86 | Ke 0.000000 0.000000 0.000000 87 | Ni 1.000000 88 | d 1.000000 89 | illum 2 90 | map_Kd Graveyard_GraveyardMesh_bake.png 91 | 92 | newmtl None_rusty_metal.png 93 | Ns 0.000000 94 | Ka 0.000000 0.000000 0.000000 95 | Kd 0.800000 0.800000 0.800000 96 | Ks 0.800000 0.800000 0.800000 97 | Ke 0.000000 0.000000 0.000000 98 | Ni 1.000000 99 | d 1.000000 100 | illum 2 101 | map_Kd Graveyard_GraveyardMesh_bake.png 102 | 103 | newmtl None_stone.png 104 | Ns 0.000000 105 | Ka 0.000000 0.000000 0.000000 106 | Kd 0.800000 0.800000 0.800000 107 | Ks 0.800000 0.800000 0.800000 108 | Ke 0.000000 0.000000 0.000000 109 | Ni 1.000000 110 | d 1.000000 111 | illum 2 112 | map_Kd Graveyard_GraveyardMesh_bake.png 113 | 114 | newmtl None_tiles.png 115 | Ns 0.000000 116 | Ka 0.000000 0.000000 0.000000 117 | Kd 0.800000 0.800000 0.800000 118 | Ks 0.800000 0.800000 0.800000 119 | Ke 0.000000 0.000000 0.000000 120 | Ni 1.000000 121 | d 1.000000 122 | illum 2 123 | map_Kd Graveyard_GraveyardMesh_bake.png 124 | 125 | newmtl None_tombstone.png 126 | Ns 0.000000 127 | Ka 0.000000 0.000000 0.000000 128 | Kd 0.800000 0.800000 0.800000 129 | Ks 0.800000 0.800000 0.800000 130 | Ke 0.000000 0.000000 0.000000 131 | Ni 1.000000 132 | d 1.000000 133 | illum 2 134 | map_Kd Graveyard_GraveyardMesh_bake.png 135 | 136 | newmtl None_white.png 137 | Ns 0.000000 138 | Ka 0.000000 0.000000 0.000000 139 | Kd 0.800000 0.800000 0.800000 140 | Ks 0.800000 0.800000 0.800000 141 | Ke 0.000000 0.000000 0.000000 142 | Ni 1.000000 143 | d 1.000000 144 | illum 2 145 | map_Kd Graveyard_GraveyardMesh_bake.png 146 | -------------------------------------------------------------------------------- /data/models/bl1/brick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/brick.png -------------------------------------------------------------------------------- /data/models/bl1/bush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/bush.png -------------------------------------------------------------------------------- /data/models/bl1/concrete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/concrete.png -------------------------------------------------------------------------------- /data/models/bl1/damaged_grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/damaged_grass.png -------------------------------------------------------------------------------- /data/models/bl1/dark_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/dark_wood.png -------------------------------------------------------------------------------- /data/models/bl1/dirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/dirt.png -------------------------------------------------------------------------------- /data/models/bl1/fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/fence.png -------------------------------------------------------------------------------- /data/models/bl1/grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/grass.png -------------------------------------------------------------------------------- /data/models/bl1/grave_wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/grave_wall.png -------------------------------------------------------------------------------- /data/models/bl1/lightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/lightmap.png -------------------------------------------------------------------------------- /data/models/bl1/rusty_metal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/rusty_metal.png -------------------------------------------------------------------------------- /data/models/bl1/stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/stone.png -------------------------------------------------------------------------------- /data/models/bl1/tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/tiles.png -------------------------------------------------------------------------------- /data/models/bl1/tombstone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/tombstone.png -------------------------------------------------------------------------------- /data/models/bl1/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bl1/white.png -------------------------------------------------------------------------------- /data/models/bongo/bongo.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bongo/bongo.blend -------------------------------------------------------------------------------- /data/models/bongo/bongo.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'bongo.blend' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 96.078431 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.640000 0.640000 0.640000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 2 13 | map_Kd lightmap.png 14 | -------------------------------------------------------------------------------- /data/models/bongo/lightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/bongo/lightmap.png -------------------------------------------------------------------------------- /data/models/curuthers/Whiskers_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/curuthers/Whiskers_diffuse.png -------------------------------------------------------------------------------- /data/models/curuthers/curuthers.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'None' 2 | # Material Count: 1 3 | 4 | newmtl 02___Default.001_Whiskers_diffuse.png 5 | Ns 92.156863 6 | Ka 0.000000 0.000000 0.000000 7 | Kd 0.376448 0.376448 0.376448 8 | Ks 0.500000 0.500000 0.500000 9 | Ni 1.000000 10 | d 1.000000 11 | illum 2 12 | map_Kd Whiskers_diffuse.png 13 | -------------------------------------------------------------------------------- /data/models/re_hall/dining_lightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/re_hall/dining_lightmap.png -------------------------------------------------------------------------------- /data/models/re_hall/hall_lightmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/re_hall/hall_lightmap.png -------------------------------------------------------------------------------- /data/models/skybox_night/skybox.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/skybox_night/skybox.blend -------------------------------------------------------------------------------- /data/models/skybox_night/skybox.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'skybox.blend' 2 | # Material Count: 2 3 | 4 | newmtl sky 5 | Ns 96.078431 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.640000 0.640000 0.640000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 0 13 | map_Kd skybox.png 14 | 15 | newmtl sky_NONE 16 | Ns 96.078431 17 | Ka 1.000000 1.000000 1.000000 18 | Kd 0.640000 0.640000 0.640000 19 | Ks 0.500000 0.500000 0.500000 20 | Ke 0.000000 0.000000 0.000000 21 | Ni 1.000000 22 | d 1.000000 23 | illum 0 24 | map_Kd skybox.png 25 | -------------------------------------------------------------------------------- /data/models/skybox_night/skybox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/models/skybox_night/skybox.png -------------------------------------------------------------------------------- /data/sounds/bongo.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sounds/bongo.ogg -------------------------------------------------------------------------------- /data/sounds/dixie_horn.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sounds/dixie_horn.ogg -------------------------------------------------------------------------------- /data/sounds/zombie_activate.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sounds/zombie_activate.ogg -------------------------------------------------------------------------------- /data/sounds/zombie_groan.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sounds/zombie_groan.ogg -------------------------------------------------------------------------------- /data/sprites/bongo_cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/bongo_cat.png -------------------------------------------------------------------------------- /data/sprites/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/heart.png -------------------------------------------------------------------------------- /data/sprites/pitchfork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/pitchfork.png -------------------------------------------------------------------------------- /data/sprites/weapons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/weapons.png -------------------------------------------------------------------------------- /data/sprites/zombie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/zombie.png -------------------------------------------------------------------------------- /data/sprites/zombie_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/sprites/zombie_full.png -------------------------------------------------------------------------------- /data/ui/hud_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/ui/hud_bar.png -------------------------------------------------------------------------------- /data/ui/hud_indent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/data/ui/hud_indent.png -------------------------------------------------------------------------------- /docs/ss1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/docs/ss1.png -------------------------------------------------------------------------------- /docs/ss2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/docs/ss2.png -------------------------------------------------------------------------------- /docs/ss3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osen/software-3d-renderer/ba1798081267dd333af769de4b3cd969ea7633d6/docs/ss3.png -------------------------------------------------------------------------------- /scripts/bake.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | 3 | def unselect_all(): 4 | for obj in bpy.data.objects: 5 | obj.select = False 6 | 7 | bpy.context.scene.objects.active = None 8 | 9 | def set_active(obj): 10 | unselect_all() 11 | obj.select = True 12 | bpy.context.scene.objects.active = obj 13 | 14 | def lightmap_unwrap(obj): 15 | print("Generating light map [" + obj.name + "]") 16 | set_active(obj) 17 | 18 | bakeMap = obj.data.uv_textures.new("BakeMap") 19 | bakeMap.active = True; 20 | image = bpy.data.images.new(obj.name + "_bake", width=2048, height=2048) 21 | image.filepath = obj.name + "_bake.png" 22 | 23 | for face in obj.data.polygons: 24 | face.select = True 25 | 26 | bpy.ops.object.mode_set(mode = 'EDIT') 27 | bpy.data.screens['UV Editing'].areas[1].spaces[0].image = image 28 | bpy.ops.uv.lightmap_pack() 29 | bpy.ops.object.mode_set(mode = 'OBJECT') 30 | 31 | for face in obj.data.polygons: 32 | face.select = False 33 | 34 | return image 35 | 36 | def strip_none(obj): 37 | print("Removing textureless faces [" + obj.name + "]") 38 | set_active(obj) 39 | mesh = obj.data 40 | selected = 0 41 | 42 | for face in mesh.polygons: 43 | material = mesh.materials[face.material_index] 44 | if material.active_texture == None: 45 | face.select = True 46 | selected = selected + 1 47 | else: 48 | face.select = False 49 | 50 | if selected > 0: 51 | bpy.ops.object.mode_set(mode = 'EDIT') 52 | bpy.ops.mesh.delete(type='FACE') 53 | bpy.ops.object.mode_set(mode = 'OBJECT') 54 | 55 | def perform_bake(obj, image): 56 | print("Performing bake [" + obj.name + "]") 57 | 58 | if len(obj.data.polygons) < 1: 59 | print("Nothing to bake [" + obj.name + "]") 60 | return 61 | 62 | #bpy.data.scenes["Scene"].render.bake_type = 'SHADOW' 63 | bpy.ops.object.bake_image() 64 | #image.save() 65 | image.save_render(image.filepath) 66 | 67 | def bake_scene(): 68 | outPath = bpy.path.display_name_from_filepath(bpy.context.blend_data.filepath) 69 | bpy.ops.object.mode_set(mode = 'OBJECT') 70 | unselect_all() 71 | 72 | for obj in bpy.data.objects: 73 | if obj.type == "MESH": 74 | obj.data.name = obj.name + "Mesh" 75 | 76 | bpy.ops.export_scene.obj( 77 | filepath=outPath + ".obj", 78 | path_mode='COPY') 79 | 80 | for obj in bpy.data.objects: 81 | if obj.type == "MESH": 82 | obj.select = True; 83 | bpy.ops.object.delete() 84 | 85 | bpy.ops.import_scene.obj(filepath = outPath + ".obj") 86 | 87 | for obj in bpy.data.objects: 88 | if obj.type == "MESH": 89 | strip_none(obj) 90 | 91 | if obj.name != "NoBake_NoBakeMesh": 92 | image = lightmap_unwrap(obj) 93 | perform_bake(obj, image) 94 | 95 | bpy.ops.export_scene.obj( 96 | filepath=outPath + "_lightmap.obj", 97 | path_mode='RELATIVE') 98 | 99 | bake_scene() 100 | 101 | -------------------------------------------------------------------------------- /src/blood/BongoCat.cpp: -------------------------------------------------------------------------------- 1 | #include "BongoCat.h" 2 | 3 | void BongoCat::onInit() 4 | { 5 | music = getResources()->load("sounds/bongo"); 6 | getTransform()->setScale(Vector3(30, 30, 1)); 7 | getTransform()->setPosition(Vector3(0, 10, -25)); 8 | 9 | texture = getResources()->load("sprites/bongo_cat"); 10 | spriteRenderer = getEntity()->addComponent(texture); 11 | spriteRenderer->setLayout(1, 2); 12 | spriteRenderer->setFrame(0, 0); 13 | } 14 | 15 | void BongoCat::onTick() 16 | { 17 | frame += 4 * getEnvironment()->getDeltaTime(); 18 | 19 | if(frame > 2) 20 | { 21 | frame = 0; 22 | getAudio()->playSound(music); 23 | } 24 | 25 | spriteRenderer->setFrame(0, frame); 26 | } 27 | -------------------------------------------------------------------------------- /src/blood/BongoCat.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class BongoCat : public Component 6 | { 7 | std::sr1::shared_ptr texture; 8 | std::sr1::shared_ptr spriteRenderer; 9 | std::sr1::shared_ptr music; 10 | std::sr1::zero_initialized frame; 11 | 12 | void onTick(); 13 | 14 | public: 15 | void onInit(); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /src/blood/BongoScreen.cpp: -------------------------------------------------------------------------------- 1 | #include "BongoScreen.h" 2 | #include "Player.h" 3 | #include "Zombie.h" 4 | #include "BongoCat.h" 5 | 6 | #include 7 | 8 | void BongoScreen::onInit() 9 | { 10 | std::sr1::shared_ptr model = getResources()->load("models/bongo/bongo"); 11 | getEntity()->addComponent(model); 12 | std::sr1::shared_ptr smc = getEntity()->addComponent(); 13 | 14 | std::sr1::shared_ptr player = getWorld()->addEntity(); 15 | player->getComponent()->setPosition(Vector3(-4, 3, 0)); 16 | player->getComponent()->setRotation(Vector3(0, -90, 0)); 17 | 18 | getWorld()->addEntity(); 19 | 20 | timeout = 10; 21 | } 22 | 23 | void BongoScreen::onTick() 24 | { 25 | timeout -= getEnvironment()->getDeltaTime(); 26 | 27 | if(timeout <= 0) 28 | { 29 | std::cout << "Timeout reached" << std::endl; 30 | 31 | for(size_t i = 0; i < 5; i++) 32 | { 33 | addZombie(); 34 | } 35 | 36 | timeout = 5; 37 | } 38 | } 39 | 40 | float BongoScreen::generateRandom() 41 | { 42 | int r = rand(); 43 | 44 | return (float) r / (float)RAND_MAX; 45 | } 46 | 47 | void BongoScreen::addZombie() 48 | { 49 | std::sr1::shared_ptr e = getWorld()->addEntity(); 50 | //e->getComponent()->setPosition(position); 51 | float x = generateRandom(); 52 | float y = generateRandom(); 53 | 54 | x *= 25; 55 | y *= 25; 56 | 57 | std::cout << "Zombie Spawn: " << x << " " << y << std::endl; 58 | 59 | e->getComponent()->setPosition(Vector3(x, 3, y)); 60 | std::sr1::shared_ptr sr = e->addComponent(); 61 | sr->activate(); 62 | } 63 | -------------------------------------------------------------------------------- /src/blood/BongoScreen.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class BongoScreen : public Component 6 | { 7 | std::sr1::zero_initialized timeout; 8 | 9 | void onTick(); 10 | void addZombie(); 11 | float generateRandom(); 12 | 13 | public: 14 | void onInit(); 15 | 16 | }; 17 | -------------------------------------------------------------------------------- /src/blood/Fade.cpp: -------------------------------------------------------------------------------- 1 | #include "Fade.h" 2 | 3 | void Fade::onTick() 4 | { 5 | if(disable) return; 6 | Color c(0, 0, 0, amount); 7 | 8 | for(size_t y = 0; y < overlay->getHeight(); y++) 9 | { 10 | for(size_t x = 0; x < overlay->getHeight(); x++) 11 | { 12 | overlay->setPixel(x, y, c); 13 | } 14 | } 15 | 16 | if(fadeIn == true) 17 | { 18 | amount -= 100 * getEnvironment()->getDeltaTime(); 19 | 20 | if(amount <= 0) 21 | { 22 | disable = true; 23 | } 24 | } 25 | } 26 | 27 | void Fade::onGui() 28 | { 29 | if(disable) return; 30 | getGui()->image(Vector2(0, 0), overlay); 31 | } 32 | 33 | void Fade::onInit() 34 | { 35 | overlay = getResources()->create( 36 | getWindow()->getBuffer()->getWidth(), 37 | getWindow()->getBuffer()->getHeight()); 38 | 39 | fadeIn = true; 40 | 41 | if(fadeIn == true) 42 | { 43 | amount = 255; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/blood/Fade.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class Fade : public Component 6 | { 7 | std::sr1::shared_ptr overlay; 8 | std::sr1::zero_initialized amount; 9 | std::sr1::zero_initialized fadeIn; 10 | std::sr1::zero_initialized disable; 11 | 12 | void onTick(); 13 | void onGui(); 14 | 15 | public: 16 | void onInit(); 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /src/blood/GameScreen.cpp: -------------------------------------------------------------------------------- 1 | #include "GameScreen.h" 2 | #include "Player.h" 3 | #include "SkyBox.h" 4 | #include "Zombie.h" 5 | #include "Pickup.h" 6 | 7 | void GameScreen::onInit() 8 | { 9 | model = getResources()->load("models/bl1/bl1"); 10 | modelRenderer = getEntity()->addComponent(model); 11 | smc = getEntity()->addComponent(); 12 | 13 | std::sr1::shared_ptr player = getWorld()->addEntity(); 14 | player->getComponent()->setPosition(Vector3(-4, 4, 0)); 15 | player->getComponent()->setRotation(Vector3(0, -90, 0)); 16 | 17 | std::sr1::shared_ptr skyBox = getWorld()->addEntity(); 18 | 19 | //addSprite("sprites/weapons", Vector3(0, 2, 0)); 20 | 21 | addZombie(Vector3(12, 3, -32)); 22 | addZombie(Vector3(12, 3, -50)); 23 | addZombie(Vector3(0, 3, -50)); 24 | 25 | std::sr1::shared_ptr e = getWorld()->addEntity(); 26 | e->getComponent()->setPosition(Vector3(-4, 4, 0)); 27 | std::sr1::shared_ptr p = e->addComponent(); 28 | } 29 | 30 | void GameScreen::addZombie(Vector3 position) 31 | { 32 | std::sr1::shared_ptr e = getWorld()->addEntity(); 33 | e->getComponent()->setPosition(position); 34 | std::sr1::shared_ptr sr = e->addComponent(); 35 | } 36 | 37 | void GameScreen::addSprite(std::string path, Vector3 position) 38 | { 39 | std::sr1::shared_ptr e = getWorld()->addEntity(); 40 | e->getComponent()->setPosition(position); 41 | std::sr1::shared_ptr sr = e->addComponent(); 42 | sr->setLayout(10, 10); 43 | sr->setTexture(getResources()->load(path)); 44 | } 45 | -------------------------------------------------------------------------------- /src/blood/GameScreen.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class GameScreen : public Component 6 | { 7 | std::sr1::shared_ptr model; 8 | std::sr1::shared_ptr modelRenderer; 9 | std::sr1::shared_ptr smc; 10 | 11 | void addSprite(std::string path, Vector3 position); 12 | void addZombie(Vector3 position); 13 | 14 | public: 15 | void onInit(); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /src/blood/HitBox.cpp: -------------------------------------------------------------------------------- 1 | #include "HitBox.h" 2 | 3 | void HitBox::onInit(std::sr1::shared_ptr owner) 4 | { 5 | this->owner = owner; 6 | 7 | //std::sr1::shared_ptr sr = getEntity()->addComponent(); 8 | //sr->setTexture(getResources()->load("sprites/zombie")); 9 | 10 | timeout = 0.5f; 11 | } 12 | 13 | void HitBox::onTick() 14 | { 15 | if(timeout <= 0) 16 | { 17 | getEntity()->kill(); 18 | } 19 | 20 | //timeout -= getEnvironment()->getDeltaTime(); 21 | timeout -= 1; 22 | } 23 | 24 | std::sr1::shared_ptr HitBox::getOwner() 25 | { 26 | return owner.lock(); 27 | } 28 | -------------------------------------------------------------------------------- /src/blood/HitBox.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class HitBox : public Component 6 | { 7 | std::sr1::weak_ptr owner; 8 | std::sr1::zero_initialized timeout; 9 | 10 | void onTick(); 11 | 12 | public: 13 | void onInit(std::sr1::shared_ptr owner); 14 | 15 | std::sr1::shared_ptr getOwner(); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /src/blood/Pickup.cpp: -------------------------------------------------------------------------------- 1 | #include "Pickup.h" 2 | 3 | void Pickup::onInit() 4 | { 5 | std::sr1::shared_ptr texture = getResources()->load("sprites/weapons"); 6 | spriteRenderer = getEntity()->addComponent(texture); 7 | 8 | std::sr1::shared_ptr bc = getEntity()->addComponent(); 9 | bc->setSize(Vector3(1, 2, 1)); 10 | bc->setOffset(Vector3(0, -1, 0)); 11 | 12 | getTransform()->setScale(Vector3(5, 5, 1)); 13 | getTransform()->setPosition(Vector3(0, 0, -5)); 14 | } 15 | -------------------------------------------------------------------------------- /src/blood/Pickup.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class Pickup : public Component 6 | { 7 | std::sr1::shared_ptr spriteRenderer; 8 | std::sr1::shared_ptr collected; 9 | 10 | public: 11 | void onInit(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /src/blood/Player.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class Player : public Component 6 | { 7 | std::sr1::shared_ptr model; 8 | std::sr1::shared_ptr pitchfork; 9 | std::sr1::shared_ptr heart; 10 | std::sr1::shared_ptr modelRenderer; 11 | std::sr1::zero_initialized speed; 12 | std::sr1::zero_initialized health; 13 | std::sr1::zero_initialized attack; 14 | std::sr1::shared_ptr font; 15 | std::sr1::shared_ptr hudBar; 16 | std::sr1::shared_ptr hudIndent; 17 | 18 | void onTick(); 19 | void onGui(); 20 | void doAttack(); 21 | void checkHits(); 22 | 23 | public: 24 | void onInit(); 25 | 26 | }; 27 | -------------------------------------------------------------------------------- /src/blood/SkyBox.cpp: -------------------------------------------------------------------------------- 1 | #include "SkyBox.h" 2 | 3 | void SkyBox::onInit() 4 | { 5 | //model = getResources()->load("models/curuthers/curuthers"); 6 | model = getResources()->load("models/skybox_night/skybox"); 7 | //model = getResources()->load("models/re_hall/re_house_baked"); 8 | modelRenderer = getEntity()->addComponent(model); 9 | } 10 | 11 | void SkyBox::onTick() 12 | { 13 | getTransform()->setPosition(getWindow()->getCurrentCamera()->getTransform()->getPosition()); 14 | } 15 | -------------------------------------------------------------------------------- /src/blood/SkyBox.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class SkyBox : public Component 4 | { 5 | std::sr1::shared_ptr model; 6 | std::sr1::shared_ptr modelRenderer; 7 | 8 | void onTick(); 9 | 10 | public: 11 | void onInit(); 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /src/blood/Zombie.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | class Zombie : public Component 6 | { 7 | std::sr1::shared_ptr texture; 8 | std::sr1::shared_ptr spriteRenderer; 9 | std::sr1::shared_ptr groan; 10 | std::sr1::shared_ptr activateGroan; 11 | std::sr1::zero_initialized frame; 12 | std::sr1::zero_initialized attack; 13 | std::sr1::zero_initialized state; 14 | 15 | void onTick(); 16 | void checkHits(); 17 | void doAttack(); 18 | 19 | public: 20 | void onInit(); 21 | void activate(); 22 | 23 | }; 24 | -------------------------------------------------------------------------------- /src/blood/main.cpp: -------------------------------------------------------------------------------- 1 | #include "GameScreen.h" 2 | 3 | #include 4 | 5 | void platform_main(std::sr1::shared_ptr platform) 6 | { 7 | std::sr1::shared_ptr e = platform->getWorld()->addEntity(); 8 | std::sr1::shared_ptr ms = e->addComponent(); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/example/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | #define WIDTH 800 10 | #define HEIGHT 600 11 | 12 | #undef main 13 | 14 | int main() 15 | { 16 | if(SDL_Init(SDL_INIT_VIDEO) < 0) abort(); 17 | SDL_Window* window = SDL_CreateWindow("QSoft - Software Renderer", 18 | 100, 100, WIDTH, HEIGHT, SDL_WINDOW_RESIZABLE); 19 | 20 | if(!window) abort(); 21 | SDL_Surface* screen = SDL_GetWindowSurface(window); 22 | 23 | std::sr1::shared_ptr b = qsoft::Texture::create(320, 240); 24 | std::sr1::shared_ptr t = qsoft::Texture::create(2, 2); 25 | qsoft::Renderer r; 26 | qsoft::Mesh m; 27 | 28 | qsoft::Face f; 29 | f.a.position = qsoft::Vector3(0, 0, 0); 30 | f.a.texCoord = qsoft::Vector2(0, 0); 31 | f.b.position = qsoft::Vector3(0, 1, 0); 32 | f.b.texCoord = qsoft::Vector2(0, 1); 33 | f.c.position = qsoft::Vector3(1, 1, 0); 34 | f.c.texCoord = qsoft::Vector2(1, 1); 35 | m.addFace(f); 36 | f.a.position = qsoft::Vector3(0, 0, 0); 37 | f.a.texCoord = qsoft::Vector2(0, 0); 38 | f.b.position = qsoft::Vector3(1, 0, 0); 39 | f.b.texCoord = qsoft::Vector2(1, 0); 40 | f.c.position = qsoft::Vector3(1, 1, 0); 41 | f.c.texCoord = qsoft::Vector2(1, 1); 42 | m.addFace(f); 43 | 44 | t->setPixel(0, 0, qsoft::Color(255, 0, 255)); 45 | t->setPixel(1, 0, qsoft::Color(0, 255, 0)); 46 | t->setPixel(0, 1, qsoft::Color(0, 0, 255)); 47 | t->setPixel(1, 1, qsoft::Color(255, 0, 0)); 48 | 49 | r.setTarget(b); 50 | r.setMesh(m); 51 | r.setTexture(t); 52 | 53 | r.setProjection(qsoft::Matrix::perspective(70.0f, (float)WIDTH / (float)HEIGHT, 0.01f, 100.0f)); 54 | 55 | SDL_Event event = {0}; 56 | bool quit = false; 57 | float pos = 0; 58 | 59 | while(!quit) 60 | { 61 | while(SDL_PollEvent(&event)) 62 | { 63 | if(event.type == SDL_QUIT) 64 | { 65 | quit = true; 66 | } 67 | else if(event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) 68 | { 69 | screen = SDL_GetWindowSurface(window); 70 | } 71 | } 72 | 73 | pos += 0.01f; 74 | 75 | b->clear(); 76 | 77 | r.setView( 78 | //qsoft::Matrix::rotation(qsoft::Vector3(0, 1, 0), pos * 10) 79 | qsoft::Matrix::translation(qsoft::Vector3(0, 0, 5)) 80 | ); 81 | 82 | r.setModel( 83 | qsoft::Matrix::translation(qsoft::Vector3(0, pos * 0.1f, 0)) * 84 | qsoft::Matrix::rotation(qsoft::Vector3(-pos, -pos * 100, -pos)) 85 | //qsoft::Matrix::rotation(qsoft::Vector3(0, pos, 0)) 86 | //qsoft::Matrix::rotation(qsoft::Vector3(0, 1, 0), pos) 87 | ); 88 | 89 | r.render(); 90 | 91 | SDL_FillRect(screen, &screen->clip_rect, SDL_MapRGB(screen->format, 255, 255, 255)); 92 | 93 | for(int y = 0; y < b->getHeight(); y++) 94 | { 95 | for(int x = 0; x < b->getWidth(); x++) 96 | { 97 | qsoft::Color c = b->getPixel(x, y); 98 | if(c.a == 0) continue; 99 | SDL_Rect r; 100 | r.x = x * 2; 101 | r.y = y * 2; 102 | r.w = 2; 103 | r.h = 2; 104 | SDL_FillRect(screen, &r, SDL_MapRGB(screen->format, c.r, c.g, c.b)); 105 | } 106 | } 107 | 108 | SDL_UpdateWindowSurface(window); 109 | } 110 | 111 | return 0; 112 | } 113 | -------------------------------------------------------------------------------- /src/net_platform/game/game.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | Header Files 70 | 71 | 72 | Header Files 73 | 74 | 75 | Header Files 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/net_platform/native/native.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" 4 | { 5 | 6 | void PlatformInit(); 7 | void PlatformTick(); 8 | void PlatformDisplay(int width, int height, int type, unsigned char *buffer); 9 | void PlatformKeyDown(char key); 10 | void PlatformKeyUp(char key); 11 | 12 | } 13 | 14 | extern "C" __declspec(dllexport) void native_platform_init() 15 | { 16 | PlatformInit(); 17 | } 18 | 19 | extern "C" __declspec(dllexport) void native_platform_tick() 20 | { 21 | PlatformTick(); 22 | } 23 | 24 | extern "C" __declspec(dllexport) void native_platform_display(int width, int height, int format, unsigned char *buffer) 25 | { 26 | PlatformDisplay(width, height, format, buffer); 27 | } 28 | 29 | extern "C" __declspec(dllexport) void native_platform_keydown(char key) 30 | { 31 | PlatformKeyDown(key); 32 | } 33 | 34 | extern "C" __declspec(dllexport) void native_platform_keyup(char key) 35 | { 36 | PlatformKeyUp(key); 37 | } -------------------------------------------------------------------------------- /src/net_platform/native/native.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {25F42288-124B-4FA0-9557-372B591E4DEF} 15 | native 16 | 17 | 18 | 19 | DynamicLibrary 20 | true 21 | MultiByte 22 | 23 | 24 | DynamicLibrary 25 | false 26 | true 27 | MultiByte 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | $(SolutionDir)bin\$(Configuration)\ 41 | obj\$(Configuration)\ 42 | 43 | 44 | $(SolutionDir)bin\$(Configuration)\ 45 | obj\$(Configuration)\ 46 | 47 | 48 | 49 | Level3 50 | Disabled 51 | 52 | 53 | true 54 | 55 | 56 | 57 | 58 | Level3 59 | MaxSpeed 60 | true 61 | true 62 | 63 | 64 | true 65 | true 66 | true 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | {44f5a9f9-6e6b-4b03-acc9-c1afa1b215c8} 75 | 76 | 77 | {6d4a9ad8-76ae-4a72-86a7-308b3bc74cd4} 78 | 79 | 80 | {e2329691-f602-4355-bf70-74489a0e59c3} 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/net_platform/native/native.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/net_platform/net_platform/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using System.Drawing; 4 | using System.Drawing.Imaging; 5 | using System.Drawing.Drawing2D; 6 | using System.Runtime.InteropServices; 7 | using System.IO; 8 | 9 | class Program : Form 10 | { 11 | [DllImport("native", CallingConvention = CallingConvention.Cdecl)] 12 | extern static void native_platform_init(); 13 | 14 | [DllImport("native", CallingConvention = CallingConvention.Cdecl)] 15 | extern static void native_platform_tick(); 16 | 17 | [DllImport("native", CallingConvention = CallingConvention.Cdecl)] 18 | extern static void native_platform_display(int width, int height, int format, IntPtr buffer); 19 | 20 | [DllImport("native", CallingConvention = CallingConvention.Cdecl)] 21 | extern static void native_platform_keydown(char key); 22 | 23 | [DllImport("native", CallingConvention = CallingConvention.Cdecl)] 24 | extern static void native_platform_keyup(char key); 25 | 26 | Timer timer; 27 | Bitmap bm; 28 | 29 | Program() 30 | { 31 | ClientSize = new Size(800, 600); 32 | bm = new Bitmap(320, 240, PixelFormat.Format24bppRgb); 33 | 34 | native_platform_init(); 35 | 36 | timer = new Timer(); 37 | timer.Interval = 1; 38 | timer.Tick += new EventHandler(Tick); 39 | timer.Start(); 40 | } 41 | 42 | private void Tick(object sender, EventArgs e) 43 | { 44 | native_platform_tick(); 45 | Invalidate(); 46 | } 47 | 48 | protected override void OnKeyDown(KeyEventArgs e) 49 | { 50 | base.OnKeyDown(e); 51 | 52 | string key = "" + (char)e.KeyValue; 53 | key = key.ToLower(); 54 | char c = key[0]; 55 | native_platform_keydown(c); 56 | } 57 | 58 | protected override void OnKeyUp(KeyEventArgs e) 59 | { 60 | base.OnKeyUp(e); 61 | 62 | string key = "" + (char)e.KeyValue; 63 | key = key.ToLower(); 64 | char c = key[0]; 65 | native_platform_keyup(c); 66 | } 67 | 68 | protected override void OnPaintBackground(PaintEventArgs e) 69 | { 70 | int Width = ClientSize.Width; 71 | int Height = ClientSize.Height; 72 | 73 | Width -= Width % 4; 74 | 75 | Graphics g = e.Graphics; 76 | g.InterpolationMode = InterpolationMode.NearestNeighbor; 77 | 78 | //if(bm.Width != Width || bm.Height != Height) 79 | //{ 80 | // bm = new Bitmap(Width, Height, PixelFormat.Format24bppRgb); 81 | //} 82 | 83 | BitmapData da = bm.LockBits(new Rectangle(0, 0, bm.Width, bm.Height), ImageLockMode.WriteOnly, bm.PixelFormat); 84 | native_platform_display(Width, Height, 6, da.Scan0); 85 | bm.UnlockBits(da); 86 | 87 | Rectangle dest = new Rectangle(0, 0, Width, Height); 88 | Rectangle src = new Rectangle(0, 0, 320, 240); 89 | 90 | g.DrawImage(bm, dest, src, GraphicsUnit.Pixel); 91 | //g.DrawImage(bm, 0, 0); 92 | } 93 | 94 | static void Main(string[] args) 95 | { 96 | Program program = new Program(); 97 | Application.Run(program); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/net_platform/net_platform/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("net_platform")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("net_platform")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("26cd6000-edac-4e7e-a73c-70dc872f43c3")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/net_platform/net_platform/net_platform.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {E6481CF2-061A-472B-A832-3027DED5F893} 9 | Exe 10 | Properties 11 | net_platform 12 | net_platform 13 | v4.0 14 | Client 15 | 512 16 | 17 | 18 | x86 19 | true 20 | full 21 | false 22 | ..\bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | x86 29 | pdbonly 30 | true 31 | ..\bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | 53 | 54 | 61 | -------------------------------------------------------------------------------- /src/net_platform/net_platform/net_platform.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ..\..\..\..\ 5 | 6 | 7 | ..\..\..\..\ 8 | 9 | -------------------------------------------------------------------------------- /src/net_platform/qsoft/qsoft.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | Header Files 70 | 71 | 72 | Header Files 73 | 74 | 75 | Header Files 76 | 77 | 78 | Header Files 79 | 80 | 81 | Header Files 82 | 83 | 84 | Header Files 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/qplatform/Audio.cpp: -------------------------------------------------------------------------------- 1 | #include "Audio.h" 2 | #include "Sound.h" 3 | 4 | std::sr1::shared_ptr