├── .gitattributes ├── .gitignore ├── Assets ├── Fonts │ └── Bunch Blossoms.ttf ├── Main Character.png ├── grass tile sheet.png ├── grass tile sheet1.png └── stone tile sheet.png ├── Camera.h ├── ClassDiagramClosed.cd ├── ClassDiagramClosed.png ├── ClassDiagramOpened.cd ├── ClassDiagramOpened.png ├── Color.h ├── Enemy.cpp ├── Enemy.h ├── Entity.cpp ├── Entity.h ├── Game.cpp ├── Game.h ├── GameSDL.sln ├── GameSDL.vcxproj ├── GameSDL.vcxproj.filters ├── Geometry.cpp ├── Geometry.h ├── Graphics.cpp ├── Graphics.h ├── Keyboard.cpp ├── Keyboard.h ├── Mouse.cpp ├── Mouse.h ├── MovingEntity.cpp ├── MovingEntity.h ├── Node.cpp ├── Node.h ├── Player.cpp ├── Player.h ├── QuadTree.cpp ├── QuadTree.h ├── Random.cpp ├── Random.h ├── SDL Game Development Reference.pdf ├── SDL2-2.0.8 ├── BUGS.txt ├── COPYING.txt ├── README-SDL.txt ├── README.txt ├── WhatsNew.txt ├── docs │ ├── README-android.md │ ├── README-cmake.md │ ├── README-directfb.md │ ├── README-dynapi.md │ ├── README-emscripten.md │ ├── README-gesture.md │ ├── README-hg.md │ ├── README-ios.md │ ├── README-linux.md │ ├── README-macosx.md │ ├── README-nacl.md │ ├── README-pandora.md │ ├── README-platforms.md │ ├── README-porting.md │ ├── README-psp.md │ ├── README-raspberrypi.md │ ├── README-touch.md │ ├── README-wince.md │ ├── README-windows.md │ ├── README-winrt.md │ ├── README.md │ └── doxyfile ├── include │ ├── 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.h.cmake │ ├── SDL_config.h.in │ ├── SDL_config_android.h │ ├── SDL_config_iphoneos.h │ ├── SDL_config_macosx.h │ ├── SDL_config_macosx.h.orig │ ├── 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 │ ├── x64 │ ├── SDL2.dll │ ├── SDL2.lib │ ├── SDL2main.lib │ └── SDL2test.lib │ └── x86 │ ├── SDL2.dll │ ├── SDL2.lib │ ├── SDL2main.lib │ └── SDL2test.lib ├── SDL2.dll ├── SDL2.lib ├── SDL2_framerate.c ├── SDL2_framerate.h ├── SDL2_gfxPrimitives.c ├── SDL2_gfxPrimitives.h ├── SDL2_gfxPrimitives_font.h ├── SDL2_image-2.0.3 ├── CHANGES.txt ├── COPYING.txt ├── README.txt ├── include │ └── SDL_image.h └── lib │ ├── x64 │ ├── LICENSE.jpeg.txt │ ├── LICENSE.png.txt │ ├── LICENSE.tiff.txt │ ├── LICENSE.webp.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_image.dll │ ├── SDL2_image.lib │ ├── libjpeg-9.dll │ ├── libpng16-16.dll │ ├── libtiff-5.dll │ ├── libwebp-7.dll │ └── zlib1.dll │ └── x86 │ ├── LICENSE.jpeg.txt │ ├── LICENSE.png.txt │ ├── LICENSE.tiff.txt │ ├── LICENSE.webp.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_image.dll │ ├── SDL2_image.lib │ ├── libjpeg-9.dll │ ├── libpng16-16.dll │ ├── libtiff-5.dll │ ├── libwebp-7.dll │ └── zlib1.dll ├── SDL2_image.dll ├── SDL2_image.lib ├── SDL2_imageFilter.c ├── SDL2_imageFilter.h ├── SDL2_rotozoom.c ├── SDL2_rotozoom.h ├── SDL2_ttf-2.0.14 ├── CHANGES.txt ├── COPYING.txt ├── README.txt ├── include │ └── SDL_ttf.h └── lib │ ├── x64 │ ├── LICENSE.freetype.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_ttf.dll │ ├── SDL2_ttf.lib │ ├── libfreetype-6.dll │ └── zlib1.dll │ └── x86 │ ├── LICENSE.freetype.txt │ ├── LICENSE.zlib.txt │ ├── SDL2_ttf.dll │ ├── SDL2_ttf.lib │ ├── libfreetype-6.dll │ └── zlib1.dll ├── SDL2_ttf.lib ├── SDL2main.lib ├── Save └── save_file.txt ├── Tile.cpp ├── Tile.h ├── Utils.cpp ├── Utils.h ├── libjpeg-9.dll ├── libpng16-16.dll ├── libtiff-5.dll ├── libwebp-7.dll ├── main.cpp ├── minijario.spr ├── olcEngine.h ├── olcfont_consolas.bmp ├── oldEngine.h ├── x64 ├── Debug │ ├── Assets │ │ ├── Character.png │ │ ├── Fonts │ │ │ └── Bunch Blossoms.ttf │ │ ├── Main Character.png │ │ ├── grass tile sheet.png │ │ └── stone tile sheet.png │ ├── GameSDL.exe │ ├── GameSDL.exe.recipe │ ├── GameSDL.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── GameSDL.lastbuildstate │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ └── link.write.1.tlog │ ├── GameSDL.vcxproj.FileListAbsolute.txt │ ├── SDL2.dll │ ├── SDL2_image.dll │ ├── SDL2_ttf.dll │ ├── Save │ │ └── save_file.txt │ ├── libfreetype-6.dll │ ├── libjpeg-9.dll │ ├── libpng16-16.dll │ ├── libtiff-5.dll │ ├── libwebp-7.dll │ ├── vc141.idb │ ├── vc142.idb │ └── zlib1.dll └── Release │ ├── Assets │ ├── Character.png │ ├── Fonts │ │ └── Bunch Blossoms.ttf │ ├── Main Character.png │ ├── grass tile sheet.png │ └── stone tile sheet.png │ ├── GameSDL.exe │ ├── GameSDL.exe.lastcodeanalysissucceeded │ ├── GameSDL.iobj │ ├── GameSDL.ipdb │ ├── GameSDL.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── GameSDL.lastbuildstate │ ├── GameSDL.write.1u.tlog │ ├── link.command.1.tlog │ ├── link.delete.1.tlog │ ├── link.read.1.tlog │ └── link.write.1.tlog │ ├── NativeCodeAnalysis.read.1.tlog │ ├── SDL2.dll │ ├── SDL2_image.dll │ ├── SDL2_ttf.dll │ ├── Save │ └── save_file.txt │ ├── libfreetype-6.dll │ ├── libjpeg-9.dll │ ├── libpng16-16.dll │ ├── libtiff-5.dll │ ├── libwebp-7.dll │ └── zlib1.dll └── zlib1.dll /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Assets/Fonts/Bunch Blossoms.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/Assets/Fonts/Bunch Blossoms.ttf -------------------------------------------------------------------------------- /Assets/Main Character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/Assets/Main Character.png -------------------------------------------------------------------------------- /Assets/grass tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/Assets/grass tile sheet.png -------------------------------------------------------------------------------- /Assets/grass tile sheet1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/Assets/grass tile sheet1.png -------------------------------------------------------------------------------- /Assets/stone tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/Assets/stone tile sheet.png -------------------------------------------------------------------------------- /Camera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics.h" 4 | #include "Geometry.h" 5 | 6 | class Camera 7 | { 8 | public: 9 | Camera(void) 10 | { 11 | m_pos.x = 0; 12 | m_pos.y = 0; 13 | 14 | SDL_DisplayMode dm; 15 | if (SDL_GetDesktopDisplayMode(0, &dm) != 0) 16 | SDL_Log("SDL_GetDesktopDisplayMode failed in Camera CONSTRUCTOR: %s", SDL_GetError()); 17 | 18 | m_width = dm.w; 19 | m_height = dm.h; 20 | } 21 | 22 | public: 23 | v2d m_pos; // current position of the camera 24 | private: 25 | int m_width; // viewport size = Graphics::ScreenWidth 26 | int m_height; // viewport size = Graphics::ScreenHeight 27 | }; -------------------------------------------------------------------------------- /ClassDiagramClosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/ClassDiagramClosed.png -------------------------------------------------------------------------------- /ClassDiagramOpened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/ClassDiagramOpened.png -------------------------------------------------------------------------------- /Color.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Color 4 | { 5 | public: 6 | uint32_t dword= 0; 7 | public: 8 | constexpr Color() : dword(0) {} 9 | constexpr Color(const Color& col) 10 | : 11 | dword(col.dword) 12 | {} 13 | constexpr Color(uint32_t dw = 0) 14 | : 15 | dword(dw) 16 | {} 17 | constexpr Color(uint8_t x, uint8_t r, uint8_t g, uint8_t b) 18 | : 19 | dword((x << 24u) | (r << 16u) | (g << 8u) | b) 20 | {} 21 | constexpr Color(uint8_t r, uint8_t g, uint8_t b) 22 | : 23 | dword((r << 16u) | (g << 8u) | b) 24 | {} 25 | constexpr Color(Color col, uint8_t x) 26 | : 27 | Color((x << 24u) | col.dword) 28 | {} 29 | Color& operator =(Color color) 30 | { 31 | dword = color.dword; 32 | return *this; 33 | } 34 | constexpr uint8_t GetX() const 35 | { 36 | return dword & 0xFFu; 37 | } 38 | constexpr uint8_t GetA() const 39 | { 40 | return GetX(); 41 | } 42 | constexpr uint8_t GetR() const 43 | { 44 | return (dword >> 24u) & 0xFFu; 45 | } 46 | constexpr uint8_t GetG() const 47 | { 48 | return (dword >> 16u) & 0xFFu; 49 | } 50 | constexpr uint8_t GetB() const 51 | { 52 | return (dword >> 8u) & 0xFFu; 53 | } 54 | void SetR(uint8_t r) 55 | { 56 | dword = (dword & 0xFFFFFFu) | (r << 24u); 57 | } 58 | void SetA(uint8_t a) 59 | { 60 | SetX(a); 61 | } 62 | void SetG(uint8_t g) 63 | { 64 | dword = (dword & 0xFF00FFFFu) | (g << 16u); 65 | } 66 | void SetB(uint8_t b) 67 | { 68 | dword = (dword & 0xFFFF00FFu) | (b << 8u); 69 | } 70 | void SetX(uint8_t x) 71 | { 72 | dword = (dword & 0xFFFFFF00u) | x; 73 | } 74 | 75 | 76 | operator uint32_t() const 77 | { 78 | return dword; 79 | } 80 | }; 81 | 82 | namespace Colors 83 | { 84 | inline static constexpr Color MakeRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a) noexcept 85 | { 86 | return (r << 24) | (g << 16) | (b << 8) | a; 87 | } 88 | 89 | inline static constexpr Color MakeRGB(uint8_t r, uint8_t g, uint8_t b) noexcept 90 | { 91 | return MakeRGBA(r, g, b, (uint8_t)0xff); 92 | } 93 | 94 | static constexpr Color White = MakeRGB(255u, 255u, 255u); 95 | static constexpr Color Black = MakeRGB(0u, 0u, 0u); 96 | static constexpr Color Gray = MakeRGB(0x80u, 0x80u, 0x80u); 97 | static constexpr Color LightGray = MakeRGB(0xD3u, 0xD3u, 0xD3u); 98 | static constexpr Color Red = MakeRGB(255u, 0u, 0u); 99 | static constexpr Color Green = MakeRGB(0u, 255u, 0u); 100 | static constexpr Color Blue = MakeRGB(0u, 0u, 255u); 101 | static constexpr Color Yellow = MakeRGB(255u, 255u, 0u); 102 | static constexpr Color Cyan = MakeRGB(0u, 255u, 255u); 103 | static constexpr Color Magenta = MakeRGB(255u, 0u, 255u); 104 | } 105 | -------------------------------------------------------------------------------- /Enemy.cpp: -------------------------------------------------------------------------------- 1 | #include "Enemy.h" 2 | 3 | Enemy::Enemy() 4 | { 5 | } 6 | 7 | Enemy::~Enemy() 8 | { 9 | } 10 | -------------------------------------------------------------------------------- /Enemy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Entity.h" 4 | 5 | class Enemy : public Entity 6 | { 7 | public: 8 | Enemy(); 9 | ~Enemy(); 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /Entity.cpp: -------------------------------------------------------------------------------- 1 | #include "Entity.h" 2 | 3 | Entity::Entity() 4 | { 5 | 6 | } 7 | 8 | Entity::~Entity() 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Entity.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "Geometry.h" 8 | #include "Utils.h" 9 | #include "QuadTree.h" 10 | 11 | class Entity 12 | { 13 | public: 14 | Entity(); 15 | ~Entity(); 16 | 17 | // todo: protected: 18 | public: 19 | v2d m_pos; 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /Game.cpp: -------------------------------------------------------------------------------- 1 | #include "Game.h" 2 | 3 | 4 | std::vector> points = { 5 | {10.0f, 10.f}, 6 | {600.f, 10.f}, 7 | {10.f, 600.f}, 8 | {600.f,600.f} 9 | }; 10 | 11 | Game::Game() 12 | { 13 | m_IsRunning = true; 14 | } 15 | 16 | Game::~Game(void) 17 | { 18 | 19 | } 20 | 21 | void Game::Go() 22 | { 23 | gfx.BeginFrame(); 24 | 25 | if (m_IsRunning) 26 | { 27 | HandleInput(); 28 | } 29 | if (m_IsRunning) 30 | { 31 | UpdateModel(); 32 | } 33 | if (m_IsRunning) 34 | { 35 | ComposeFrame(); 36 | } 37 | 38 | gfx.EndFrame(); 39 | } 40 | 41 | void Game::HandleInput() 42 | { 43 | SDL_Event e; 44 | SDL_PollEvent(&e); 45 | 46 | // keyboard code 47 | if (kbd.KeyIsPressed(SDL_SCANCODE_ESCAPE)) 48 | { 49 | m_IsRunning = false; 50 | return; 51 | } 52 | if (kbd.KeyIsPressed(SDL_SCANCODE_DELETE)) 53 | { 54 | } 55 | 56 | double step = 2e-1; // will be changed to player.m_vel; 57 | if (kbd.KeyIsPressed(SDL_SCANCODE_SPACE)) 58 | { 59 | } 60 | if (kbd.KeyIsPressed(SDL_SCANCODE_LEFT) || kbd.KeyIsPressed(SDL_SCANCODE_A)) 61 | { 62 | } 63 | if (kbd.KeyIsPressed(SDL_SCANCODE_RIGHT) || kbd.KeyIsPressed(SDL_SCANCODE_D)) 64 | { 65 | } 66 | 67 | if (kbd.KeyIsPressed(SDL_SCANCODE_1)) 68 | { 69 | } 70 | if (kbd.KeyIsPressed(SDL_SCANCODE_2)) 71 | { 72 | } 73 | 74 | //mouse.SetMouseState(e); 75 | // mouse code 76 | { 77 | int x = mouse.GetX(); 78 | int y = mouse.GetY(); 79 | } 80 | 81 | SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT); 82 | //while (SDL_PollEvent(&e)); 83 | } 84 | 85 | void Game::UpdateModel() 86 | { 87 | 88 | } 89 | 90 | void Game::ComposeFrame() 91 | { 92 | //gfx.DrawFilledRect(50, 50, 150, 100, Colors::Cyan); 93 | 94 | gfx.DrawLine(points[0].m_x, points[0].m_y, points[1].m_x, points[1].m_y, Colors::LightGray); 95 | gfx.DrawLine(points[1].m_x, points[1].m_y, points[3].m_x, points[3].m_y, Colors::LightGray); 96 | gfx.DrawLine(points[2].m_x, points[2].m_y, points[3].m_x, points[3].m_y, Colors::LightGray); 97 | 98 | gfx.DrawCubicBezierCurve(points, Colors::MakeRGB(0xdd, 0x1a, 0x7d)); 99 | 100 | for (auto& i : points) 101 | { 102 | gfx.DrawCircle(i.m_x, i.m_y, 5, Colors::Blue); 103 | 104 | i.m_x += rnd.NextFloat(-1.0f, 1.0f) / 1.e-2f; 105 | i.m_y += rnd.NextFloat(-1.0f, 1.0f) / 1.e-2f; 106 | if (i.m_x < 0) 107 | i.m_x = 0; 108 | if (i.m_x >= gfx.ScreenWidth) 109 | i.m_x = gfx.ScreenWidth - 1; 110 | if (i.m_y < 0) 111 | i.m_y = 0; 112 | if (i.m_y >= gfx.ScreenHeight) 113 | i.m_y = gfx.ScreenHeight - 1; 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /Game.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Camera.h" 12 | #include "Graphics.h" 13 | #include "Mouse.h" 14 | #include "Keyboard.h" 15 | #include "Utils.h" 16 | #include "QuadTree.h" 17 | #include "Geometry.h" 18 | #include "Random.h" 19 | #include "Player.h" 20 | 21 | class Game 22 | { 23 | public: 24 | Game(); 25 | Game(const Game&) = delete; 26 | Game& operator=(const Game&) = delete; 27 | ~Game(void); 28 | 29 | void Go(); 30 | inline bool IsRunning(void) const { return m_IsRunning; } 31 | private: 32 | void HandleInput(); 33 | void UpdateModel(); 34 | void ComposeFrame(); 35 | 36 | private: 37 | Graphics gfx; 38 | Mouse mouse; 39 | Keyboard kbd; 40 | bool m_IsRunning; 41 | 42 | Random rnd; 43 | CTimer timer; 44 | }; -------------------------------------------------------------------------------- /GameSDL.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2042 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameSDL", "GameSDL.vcxproj", "{6443202B-416A-4CFA-AF41-3E2CC927FA25}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Debug|x64.ActiveCfg = Debug|x64 17 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Debug|x64.Build.0 = Debug|x64 18 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Debug|x86.ActiveCfg = Debug|Win32 19 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Debug|x86.Build.0 = Debug|Win32 20 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Release|x64.ActiveCfg = Release|x64 21 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Release|x64.Build.0 = Release|x64 22 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Release|x86.ActiveCfg = Release|Win32 23 | {6443202B-416A-4CFA-AF41-3E2CC927FA25}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {C340679D-B5AF-4049-823D-4ECB72FA6A30} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Geometry.cpp: -------------------------------------------------------------------------------- 1 | #include "geometry.h" 2 | 3 | template 4 | Vector2::Vector2(T ix, T iy) : x(ix), y(iy) {} 5 | template 6 | Vector2::Vector2(T ia) : x(ia), y(ia) {} 7 | template 8 | Vector2::Vector2() : x(0), y(0) {} 9 | 10 | template 11 | Vector2 Vector2::operator+(const Vector2 &right) const { 12 | Vector2 temp(*this); 13 | temp += right; 14 | return temp; 15 | } 16 | template 17 | Vector2 Vector2::operator-(const Vector2 &right) const { 18 | Vector2 temp(*this); 19 | temp -= right; 20 | return temp; 21 | } 22 | template 23 | Vector2 Vector2::operator*(const Vector2 &right) const { 24 | Vector2 temp(*this); 25 | temp *= right; 26 | return temp; 27 | } 28 | template 29 | Vector2 Vector2::operator/(const Vector2 &right) const { 30 | Vector2 temp(*this); 31 | temp /= right; 32 | return temp; 33 | } 34 | template 35 | Vector2& Vector2::operator+=(const Vector2 &right) { 36 | x += right.x; 37 | y += right.y; 38 | return *this; 39 | } 40 | template 41 | Vector2& Vector2::operator-=(const Vector2 &right) { 42 | x -= right.x; 43 | y -= right.y; 44 | return *this; 45 | } 46 | template 47 | Vector2& Vector2::operator*=(const Vector2 &right) { 48 | x *= right.x; 49 | y *= right.y; 50 | return *this; 51 | } 52 | template 53 | Vector2& Vector2::operator/=(const Vector2 &right) { 54 | if (right.x != 0 && right.y != 0) { 55 | x /= right.x; 56 | y /= right.y; 57 | } 58 | return *this; 59 | } 60 | template 61 | void Vector2::normalize() { 62 | if (x != 0 || y != 0) { 63 | T lenght = std::sqrt(x * x + y * y); 64 | x /= lenght; 65 | y /= lenght; 66 | } 67 | } 68 | template 69 | void Vector2::rotate(T rotation) { 70 | T x_1 = x; 71 | x = (x * std::cos(rotation)) - (y * std::sin(rotation)); 72 | y = (x_1 * std::sin(rotation)) + (y * std::cos(rotation)); 73 | } 74 | template 75 | Vector2 Vector2::rotated(T rotation) const { 76 | return Vector2( 77 | (x * std::cos(rotation)) - (y * std::sin(rotation)), 78 | (x * std::sin(rotation)) + (y * std::cos(rotation)) 79 | ); 80 | } 81 | template 82 | Vector2 Vector2::normalized() const { 83 | if (x != 0 || y != 0) { 84 | T lenght = std::sqrt(x * x + y * y); 85 | return Vector2( 86 | x / lenght, 87 | y / lenght); 88 | } 89 | else { 90 | return Vector2(0, 0); 91 | } 92 | } 93 | template 94 | T Vector2::absolute() const { 95 | return std::sqrt(x * x + y * y); 96 | } 97 | template 98 | T Vector2::dotProduct(const Vector2 &left, const Vector2 &right) { 99 | return left.x * right.x + left.y * right.y; 100 | } 101 | 102 | template 103 | std::ostream& operator<<(std::ostream& os, const Vector2& vector2) { 104 | os << '{' << vector2.x << ',' << vector2.y << '}'; 105 | return os; 106 | } 107 | 108 | //compile the following classes and function using the templates 109 | 110 | //Compile for double 111 | template class Vector2; 112 | template std::ostream& operator<<(std::ostream& os, const Vector2& vector2); 113 | //Compile for float 114 | template class Vector2; 115 | template std::ostream& operator<<(std::ostream& os, const Vector2& vector2); -------------------------------------------------------------------------------- /Geometry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | template 7 | class Vector2 { 8 | public: 9 | //constructors 10 | Vector2(T ix, T iy); 11 | Vector2(T ia); 12 | Vector2(); 13 | 14 | //variables 15 | T x, y; 16 | 17 | //operators 18 | Vector2 operator+(const Vector2 &right) const; 19 | Vector2 operator-(const Vector2 &right) const; 20 | Vector2 operator*(const Vector2 &right) const; 21 | Vector2 operator/(const Vector2 &right) const; 22 | Vector2& operator+=(const Vector2 &right); 23 | Vector2& operator-=(const Vector2 &right); 24 | Vector2& operator*=(const Vector2 &right); 25 | Vector2& operator/=(const Vector2 &right); 26 | 27 | //functions 28 | /** 29 | * @brief Change the vector length to exactly one 30 | */ 31 | void normalize(); 32 | /** 33 | * @brief Rotate the vector clockwize in the z direction 34 | * 35 | * @param rotation Rotation angle in radians. 36 | */ 37 | void rotate(T rotation); 38 | /** 39 | * @brief Rotate the vector clockwize in the z direction 40 | * 41 | * @param rotation Rotation angle in radians. 42 | */ 43 | Vector2 rotated(T rotation) const; 44 | /** 45 | * @brief Return a vector that is the normelized vector of this vector 46 | * @details [long description] 47 | * @return this vector normilized 48 | */ 49 | Vector2 normalized() const; 50 | /** 51 | * @brief Calcultes the length of the vector and returns it. 52 | * @details [long description] 53 | * @return The lenght of this vector 54 | */ 55 | T absolute() const; 56 | /** 57 | * @brief Calculate the dot product of two vetors. 58 | * @details The dot product is the product of the vector in the 59 | * same length. 60 | * 61 | * @param left Left hand side of the dot operator. 62 | * @param right Right hand side of the dot operator. 63 | * 64 | * @return Vector result of the dot operation. 65 | */ 66 | static T dotProduct(const Vector2 &left, const Vector2 &right); 67 | }; 68 | 69 | typedef Vector2 v2d; 70 | typedef Vector2 v2f; 71 | typedef Vector2 v2i; 72 | 73 | template 74 | std::ostream& operator<<(std::ostream& os, const Vector2& vector2); -------------------------------------------------------------------------------- /Graphics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "SDL2_gfxPrimitives.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Color.h" 12 | #include "Utils.h" 13 | 14 | class Graphics; 15 | 16 | class Image 17 | { 18 | public: 19 | Image(void); 20 | ~Image(void); 21 | 22 | bool LoadData(Graphics & gfx, const std::string & file_name); 23 | SDL_Texture * GetData(void)const; 24 | private: 25 | SDL_Texture * m_texture; 26 | public: 27 | int m_width; 28 | int m_height; 29 | }; 30 | 31 | class Graphics 32 | { 33 | public: 34 | Graphics(void); 35 | ~Graphics(void); 36 | 37 | void BeginFrame(void); 38 | void EndFrame(void); 39 | 40 | void PutPixel(unsigned x, unsigned y, const Color & color); 41 | void DrawLine(unsigned x1, unsigned y1, unsigned x2, unsigned y2, const Color & color); 42 | //void DrawThickLine(unsigned width, unsigned x1, unsigned y1, unsigned x2, unsigned y2, const Color& color); 43 | 44 | void DrawCircle(int _x, int _y, int radius, const Color & c); 45 | void DrawFilledRect(int x, int y, int w, int h, const Color& c); 46 | void DrawRect(int rx, int ry, int w, int h, const Color & color); 47 | void DrawFilledCircle(int _x, int _y, int radius, const Color& c); 48 | void DrawCubicBezierCurve(const std::vector> & points, const Color & color); 49 | 50 | 51 | void DrawImage(int x, int y, const Image & img); 52 | void DrawPartImage(int x, int y, int fromx, int fromy, int width, int height, const Image & img); 53 | 54 | inline unsigned width(void) { return ScreenWidth; } 55 | inline unsigned height(void){ return ScreenHeight; } 56 | public: 57 | SDL_Window * wnd; 58 | SDL_Renderer * ren; 59 | 60 | unsigned int ScreenWidth; 61 | unsigned int ScreenHeight; 62 | }; 63 | -------------------------------------------------------------------------------- /Keyboard.cpp: -------------------------------------------------------------------------------- 1 | #include "Keyboard.h" 2 | 3 | Keyboard::Keyboard() {} 4 | Keyboard::~Keyboard() {} 5 | 6 | bool Keyboard::PollEvent(void) 7 | { 8 | SDL_Event e; 9 | if (SDL_PollEvent(&e)) 10 | return true; 11 | return false; 12 | } 13 | 14 | bool Keyboard::KeyIsPressed(const SDL_Scancode & scan_code) 15 | { 16 | const Uint8 * keystate = SDL_GetKeyboardState(nullptr); 17 | //continuous-response keys 18 | if (keystate != nullptr) 19 | return keystate[scan_code]; 20 | return false; 21 | } 22 | 23 | bool Keyboard::KeyWasPressedOnce(const SDL_Keycode & key_code) 24 | { 25 | const Uint8 * keystate = SDL_GetKeyboardState(nullptr); 26 | // non-continuous response keys 27 | if (keystate != nullptr) 28 | { 29 | if (keystate[key_code]) 30 | { 31 | SDL_PumpEvents(); 32 | return true; 33 | } 34 | } 35 | return false; 36 | } -------------------------------------------------------------------------------- /Keyboard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class Keyboard 6 | { 7 | public: 8 | Keyboard(); 9 | ~Keyboard(); 10 | 11 | bool PollEvent(void); 12 | static bool KeyIsPressed(const SDL_Scancode& scan_code); 13 | static bool KeyWasPressedOnce(const SDL_Keycode& scan_code); 14 | 15 | static const SDL_Scancode Up = SDL_SCANCODE_SPACE; 16 | static const SDL_Scancode Down = SDL_SCANCODE_S; 17 | static const SDL_Scancode Left = SDL_SCANCODE_A; 18 | static const SDL_Scancode Right = SDL_SCANCODE_D; 19 | }; 20 | -------------------------------------------------------------------------------- /Mouse.cpp: -------------------------------------------------------------------------------- 1 | #include "Mouse.h" 2 | 3 | 4 | 5 | Mouse::Mouse() 6 | : x(0), y(0) 7 | { 8 | std::fill(MouseStates.begin(), MouseStates.end(), false); 9 | } 10 | 11 | 12 | Mouse::~Mouse() 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /Mouse.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class Mouse 7 | { 8 | public: 9 | Mouse(); 10 | ~Mouse(); 11 | 12 | void SetMouseState(SDL_Event & event) 13 | { 14 | if (event.type == SDL_MOUSEBUTTONDOWN) 15 | MouseStates[event.button.button - 1] = true; 16 | else if (event.type == SDL_MOUSEBUTTONUP) 17 | MouseStates[event.button.button - 1] = false; 18 | 19 | SDL_GetMouseState(&x, &y); 20 | } 21 | 22 | inline int GetX(void) const 23 | { 24 | return x; 25 | } 26 | 27 | inline int GetY(void) const 28 | { 29 | return y; 30 | } 31 | 32 | inline auto GetPos(void) const 33 | { 34 | return std::make_pair(x, y); 35 | } 36 | 37 | inline bool LeftIsPressed(void)const 38 | { 39 | return MouseStates[mouse_buttons::Left]; 40 | } 41 | 42 | inline bool RightIsPressed(void)const 43 | { 44 | return MouseStates[mouse_buttons::Right]; 45 | } 46 | 47 | private: 48 | std::array MouseStates; 49 | int x, y; 50 | 51 | enum mouse_buttons 52 | { 53 | Left,Center,Right 54 | }; 55 | }; 56 | -------------------------------------------------------------------------------- /MovingEntity.cpp: -------------------------------------------------------------------------------- 1 | #include "MovingEntity.h" 2 | 3 | MovingEntity::MovingEntity() 4 | { 5 | } 6 | 7 | MovingEntity::~MovingEntity() 8 | { 9 | } 10 | 11 | bool MovingEntity::GetTColl(const QuadTree & terrain) 12 | { 13 | std::vector ceiling = terrain.range(GetTRect()); 14 | for (const auto & i : ceiling) 15 | if (i->m_tile != tile_type::air) 16 | return true; 17 | return false; 18 | } 19 | 20 | bool MovingEntity::GetBColl(const QuadTree & terrain) 21 | { 22 | std::vector floor = terrain.range(GetBRect()); 23 | for (const auto & i : floor) 24 | if (i->m_tile != tile_type::air) 25 | return true; 26 | return false; 27 | } 28 | 29 | bool MovingEntity::GetLColl(const QuadTree & terrain) 30 | { 31 | std::vector left_wall = terrain.range(GetLRect()); 32 | for (const auto & i : left_wall) 33 | if (i->m_tile != tile_type::air) 34 | return true; 35 | return false; 36 | } 37 | 38 | bool MovingEntity::GetRColl(const QuadTree & terrain) 39 | { 40 | std::vector right_wall = terrain.range(GetRRect()); 41 | for (const auto & i : right_wall) 42 | if (i->m_tile != tile_type::air) 43 | return true; 44 | return false; 45 | } 46 | 47 | Trect MovingEntity::GetTRect(void) 48 | { 49 | return { std::floor(m_pos.x), m_pos.y - 1, std::ceil(m_pos.x + m_bbox.Width()), m_pos.y }; 50 | } 51 | Trect MovingEntity::GetBRect(void) 52 | { 53 | return { std::floor(m_pos.x), m_pos.y + m_bbox.Height()-1, std::ceil(m_pos.x + m_bbox.Width()), m_pos.y + m_bbox.Height() }; 54 | } 55 | Trect MovingEntity::GetLRect(void) 56 | { 57 | return { m_pos.x - 1,std::floor(m_pos.y), m_pos.x , std::ceil(m_pos.y + m_bbox.Height()-0.1) }; 58 | } 59 | Trect MovingEntity::GetRRect(void) 60 | { 61 | return { m_pos.x + m_bbox.Width()-1, std::floor(m_pos.y), m_pos.x + m_bbox.Width() , std::ceil(m_pos.y + m_bbox.Height()-0.1) }; 62 | } 63 | -------------------------------------------------------------------------------- /MovingEntity.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "Entity.h" 6 | 7 | class MovingEntity : public Entity 8 | { 9 | public: 10 | MovingEntity(); 11 | ~MovingEntity(); 12 | 13 | virtual bool GetTColl(const QuadTree & terrain); 14 | virtual bool GetBColl(const QuadTree & terrain); 15 | virtual bool GetLColl(const QuadTree & terrain); 16 | virtual bool GetRColl(const QuadTree & terrain); 17 | 18 | virtual Trect GetTRect(void); 19 | virtual Trect GetBRect(void); 20 | virtual Trect GetLRect(void); 21 | virtual Trect GetRRect(void); 22 | 23 | public: 24 | v2d m_vel; 25 | v2d m_acc; 26 | Trect m_bbox; 27 | }; 28 | 29 | -------------------------------------------------------------------------------- /Node.cpp: -------------------------------------------------------------------------------- 1 | #include "node.h" 2 | 3 | Node::Node(int x, int y, const tile_type & ttile, const Trect & boundary) 4 | : m_x(x), m_y(y), 5 | m_nw(nullptr), m_ne(nullptr), m_sw(nullptr), m_se(nullptr), 6 | m_tile(ttile), m_boundary(boundary) 7 | {} 8 | Node::Node(const Node & src) 9 | : m_x(src.m_x), m_y(src.m_y), 10 | m_nw(nullptr), m_ne(nullptr), m_sw(nullptr), m_se(nullptr), 11 | m_tile(src.m_tile), 12 | m_boundary(src.m_boundary) 13 | {} 14 | 15 | Node & Node::operator = (const Node & src) 16 | { 17 | if (this == &src) 18 | return *this; 19 | 20 | delete m_nw; delete m_ne; delete m_sw; delete m_se; 21 | 22 | m_nw = nullptr; 23 | m_ne = nullptr; 24 | m_sw = nullptr; 25 | m_se = nullptr; 26 | m_tile = src.m_tile; 27 | m_x = src.m_x; 28 | m_y = src.m_y; 29 | m_boundary = src.m_boundary; 30 | return *this; 31 | } 32 | 33 | Node::~Node(void) 34 | { 35 | delete m_nw; delete m_ne; delete m_sw; delete m_se; 36 | } 37 | 38 | bool Node::insert(const Node & n) 39 | { 40 | if (m_x == n.m_x && m_y == n.m_y) 41 | return false; 42 | 43 | if (!m_boundary.contains(n.m_x, n.m_y)) 44 | return false; 45 | 46 | Tpoint middle({ (m_boundary.m_upleft.m_x + m_boundary.m_downright.m_x) / 2, 47 | (m_boundary.m_upleft.m_y + m_boundary.m_downright.m_y) / 2 }); 48 | if (n.m_x < middle.m_x) // WEST 49 | { 50 | if (n.m_y < middle.m_y) // NORTH 51 | { 52 | if (m_nw == nullptr) 53 | { 54 | m_nw = new Node(n.m_x, n.m_y, n.m_tile, { m_boundary.m_upleft, middle }); 55 | return true; 56 | } 57 | else 58 | return m_nw->insert(n); 59 | } 60 | else // SOUTH 61 | { 62 | if (m_sw == nullptr) 63 | { 64 | m_sw = new Node(n.m_x, n.m_y, n.m_tile, 65 | { { m_boundary.m_upleft.m_x, middle.m_y }, 66 | { middle.m_x, m_boundary.m_downright.m_y } }); 67 | return true; 68 | } 69 | else 70 | return m_sw->insert(n); 71 | } 72 | } 73 | else // EAST 74 | { 75 | if (n.m_y < middle.m_y) // NORTH 76 | { 77 | if (m_ne == nullptr) 78 | { 79 | m_ne = new Node(n.m_x, n.m_y, n.m_tile, 80 | { { middle.m_x, m_boundary.m_upleft.m_y }, 81 | { m_boundary.m_downright.m_x, middle.m_y } }); 82 | return true; 83 | } 84 | else 85 | return m_ne->insert(n); 86 | 87 | } 88 | else // SOUTH 89 | { 90 | if (m_se == nullptr) 91 | { 92 | m_se = new Node(n.m_x, n.m_y, n.m_tile, { middle, m_boundary.m_downright }); 93 | return true; 94 | } 95 | else 96 | return m_se->insert(n); 97 | } 98 | } 99 | } 100 | 101 | void Node::range(std::vector & PointsInRange, const Trect & range) const 102 | { 103 | if (range.contains(m_x, m_y)) 104 | PointsInRange.push_back(this); 105 | 106 | if (m_nw != nullptr) 107 | { 108 | if (range.CheckCollide(m_nw->m_boundary)) 109 | m_nw->range(PointsInRange, range); 110 | } 111 | if (m_ne != nullptr) 112 | { 113 | if (range.CheckCollide(m_ne->m_boundary)) 114 | m_ne->range(PointsInRange, range); 115 | } 116 | if (m_sw != nullptr) 117 | { 118 | if (range.CheckCollide(m_sw->m_boundary)) 119 | m_sw->range(PointsInRange, range); 120 | } 121 | if (m_se != nullptr) 122 | { 123 | if (range.CheckCollide(m_se->m_boundary)) 124 | m_se->range(PointsInRange, range); 125 | } 126 | } 127 | 128 | const Node * Node::at(int x, int y) const 129 | { 130 | if (m_x == x && m_y == y) 131 | return this; 132 | if (m_boundary.contains(x, y)) 133 | { 134 | if (m_nw != nullptr) 135 | { 136 | if (m_nw->m_boundary.contains(x, y)) 137 | return m_nw->access(x, y); 138 | } 139 | if (m_ne != nullptr) 140 | { 141 | if (m_ne->m_boundary.contains(x, y)) 142 | return m_ne->access(x, y); 143 | } 144 | if (m_sw != nullptr) 145 | { 146 | if (m_sw->m_boundary.contains(x, y)) 147 | return m_sw->access(x, y); 148 | } 149 | if (m_se != nullptr) 150 | { 151 | if (m_se->m_boundary.contains(x, y)) 152 | return m_se->access(x, y); 153 | } 154 | } 155 | return nullptr; 156 | } 157 | 158 | Node * Node::access(int x, int y) 159 | { 160 | if (m_x == x && m_y == y) 161 | return this; 162 | if (m_boundary.contains(x, y)) 163 | { 164 | if (m_nw != nullptr) 165 | { 166 | if (m_nw->m_boundary.contains(x, y)) 167 | return m_nw->access(x, y); 168 | } 169 | if (m_ne != nullptr) 170 | { 171 | if (m_ne->m_boundary.contains(x, y)) 172 | return m_ne->access(x, y); 173 | } 174 | if (m_sw != nullptr) 175 | { 176 | if (m_sw->m_boundary.contains(x, y)) 177 | return m_sw->access(x, y); 178 | } 179 | if (m_se != nullptr) 180 | { 181 | if (m_se->m_boundary.contains(x, y)) 182 | return m_se->access(x, y); 183 | } 184 | } 185 | return nullptr; 186 | } 187 | -------------------------------------------------------------------------------- /Node.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils.h" 4 | #include "Graphics.h" 5 | #include "Color.h" 6 | #include 7 | #include "Tile.h" 8 | 9 | 10 | class Node 11 | { 12 | public: 13 | Node(int x, int y, const tile_type & ttile, const Trect & boundary = {}); 14 | Node(const Node & src); 15 | Node & operator = (const Node & src); 16 | ~Node(void); 17 | 18 | bool insert(const Node & n); 19 | void range(std::vector & PointsInRange, const Trect & range) const; 20 | const Node * at(int x, int y) const; 21 | Node * access(int x, int y); 22 | 23 | friend std::ostream & operator << (std::ostream & os, const Node & src) 24 | { 25 | if (src.m_nw != nullptr) os << *src.m_nw; 26 | if (src.m_ne != nullptr) os << *src.m_ne; 27 | if (src.m_sw != nullptr) os << *src.m_sw; 28 | if (src.m_se != nullptr) os << *src.m_se; 29 | 30 | return os << src.m_x << " " << src.m_y << " " << (int)src.m_tile << " # "; 31 | } 32 | 33 | int m_x; 34 | int m_y; 35 | Node * m_nw, *m_ne, *m_sw, *m_se; 36 | Trect m_boundary; 37 | tile_type m_tile; 38 | }; -------------------------------------------------------------------------------- /Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MovingEntity.h" 4 | #include "Graphics.h" 5 | #include "Geometry.h" 6 | #include "QuadTree.h" 7 | #include "Utils.h" 8 | #include "Camera.h" 9 | #include "Keyboard.h" 10 | 11 | #include // temporary 12 | 13 | class Player : public MovingEntity // todo: class Player : protected MovingEntity 14 | { 15 | public: 16 | Player(Image * img); 17 | ~Player(); 18 | 19 | void Update(const QuadTree & terrain); 20 | void ApplyForce(const v2d & force); 21 | 22 | const float GRAVITY = 9.0f; 23 | const float MAX_VELOCITY = -10.0f; 24 | const float MAX_AIR_TIME = 1.2f; 25 | 26 | float timeInAir = 0.0f; 27 | float jumpImpulseTime = 0.2f; 28 | float jumpImpulseVel = -10.0f; 29 | float jumpAccel = -0.3f; 30 | 31 | bool stands_on_ground(const QuadTree& terrain) 32 | { 33 | Trect floor_box = { m_pos.x, m_pos.y + m_bbox.Height(), m_pos.x + m_bbox.Width() , m_pos.y + m_bbox.Height() + 1 }; 34 | std::vector floor = terrain.range(floor_box); 35 | for (const auto& i : floor) 36 | if (i->m_tile != tile_type::air) 37 | return true; 38 | return false; 39 | } 40 | 41 | void do_jump(const QuadTree & terrain) { 42 | v2d acc (0.0, 0.0); 43 | v2d vel (0.0, 0.0); 44 | 45 | // Allow player to jump 46 | if (this->GetBColl(terrain)) { 47 | timeInAir = 0.0f; 48 | acc.y = 0.0; 49 | vel.y = 0.0; 50 | } 51 | 52 | // Handle vertical velocity and acceleration 53 | if (Keyboard::KeyIsPressed(Keyboard::Up)) { 54 | // First, jump up quickly.. 55 | if (timeInAir < jumpImpulseTime) { 56 | vel.y = jumpImpulseVel; 57 | } 58 | // Then slowly go higher.. 59 | else if (timeInAir < MAX_AIR_TIME) { 60 | acc.y = jumpAccel; 61 | } 62 | // Until finally falling 63 | else { 64 | acc.y = GRAVITY; 65 | } 66 | } 67 | else { 68 | // Prevent double jumps 69 | timeInAir = MAX_AIR_TIME; 70 | acc.y = GRAVITY; 71 | } 72 | 73 | m_vel.y = vel.y; 74 | m_acc.y = acc.y; 75 | } 76 | 77 | void update(float deltaTime) 78 | { 79 | 80 | } 81 | 82 | enum PlayerState 83 | { 84 | idle, 85 | walk, 86 | jump, 87 | attack 88 | }; 89 | 90 | Image * m_player_img; 91 | PlayerState m_curr_state; 92 | 93 | public: // only for now - make it private later 94 | bool CheckCeilingCollision (const QuadTree & terrain, Graphics & gfx, Camera & cam)const; 95 | bool CheckFloorCollision (const QuadTree & terrain, Graphics & gfx, Camera & cam)const; 96 | bool CheckLeftWallCollision (const QuadTree & terrain, Graphics & gfx, Camera & cam)const; 97 | bool CheckRightWallCollision(const QuadTree & terrain, Graphics & gfx, Camera & cam)const; 98 | }; -------------------------------------------------------------------------------- /QuadTree.cpp: -------------------------------------------------------------------------------- 1 | #include "QuadTree.h" 2 | 3 | QuadTree::QuadTree(void) 4 | : m_root(nullptr), m_size(0) 5 | {} 6 | 7 | QuadTree::~QuadTree(void) 8 | { 9 | delete m_root; 10 | } 11 | 12 | void QuadTree::insert(const Node & n) 13 | { 14 | if (m_root == nullptr) 15 | { 16 | Trect boundary{ { -100000, -100000 },{ 100000, 100000 } }; 17 | if (boundary.contains(n.m_x, n.m_y)) 18 | { 19 | m_root = new Node(n.m_x, n.m_y, n.m_tile, boundary); 20 | m_size = 1; 21 | } 22 | } 23 | else 24 | { 25 | if (m_root->insert(n)) 26 | m_size++; 27 | } 28 | } 29 | 30 | std::vector QuadTree::range(const Trect & range) const 31 | { 32 | std::vector res; 33 | if (m_root != nullptr) 34 | m_root->range(res, range); 35 | return res; 36 | } 37 | 38 | const Node * QuadTree::at(int x, int y) const 39 | { 40 | if (m_root == nullptr) 41 | return nullptr; 42 | else 43 | return m_root->at(x, y); 44 | } 45 | 46 | Node * QuadTree::access(int x, int y) 47 | { 48 | if (m_root == nullptr) 49 | return nullptr; 50 | else 51 | return m_root->access(x, y); 52 | } 53 | 54 | void QuadTree::clear(void) 55 | { 56 | delete m_root; 57 | m_root = nullptr; 58 | m_size = 0; 59 | } 60 | 61 | unsigned QuadTree::size(void) const 62 | { 63 | return m_size; 64 | } 65 | 66 | Trect QuadTree::boundary(void) const 67 | { 68 | if (m_root == nullptr) 69 | return Trect(); 70 | return m_root->m_boundary; 71 | } 72 | 73 | void QuadTree::SaveToFile(const std::string & file_name) 74 | { 75 | std::ofstream file(file_name, std::fstream::out); 76 | if (!file.is_open()) 77 | throw file_name + " cannot be opened."; 78 | 79 | if (m_root != nullptr) 80 | { 81 | file << *m_root; 82 | } 83 | file.close(); 84 | } 85 | 86 | void QuadTree::LoadFromFile(const std::string & file_name) 87 | { 88 | std::ifstream tmp_file(file_name); 89 | if (!tmp_file.is_open()) 90 | { 91 | this->SaveToFile(file_name); 92 | } 93 | 94 | std::ifstream file(file_name); 95 | 96 | if (m_root != nullptr) 97 | { 98 | delete m_root; 99 | m_root = nullptr; 100 | m_size = 0; 101 | } 102 | 103 | while (true) 104 | { 105 | int x; 106 | int y; 107 | int tmp_tile; 108 | char dummy; 109 | file >> x >> y >> tmp_tile >> dummy; 110 | 111 | this->insert(Node(x, y, static_cast(tmp_tile))); 112 | 113 | if (file.eof()) 114 | break; 115 | } 116 | file.close(); 117 | } -------------------------------------------------------------------------------- /QuadTree.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utils.h" 4 | #include "Graphics.h" 5 | #include "Color.h" 6 | #include "node.h" 7 | #include 8 | #include 9 | #include 10 | 11 | class QuadTree 12 | { 13 | public: 14 | QuadTree(void); 15 | ~QuadTree(void); 16 | 17 | void insert(const Node & n); 18 | std::vector range(const Trect & range) const; 19 | const Node * at(int x, int y) const; 20 | 21 | Node * access(int x, int y); 22 | 23 | void clear(void); 24 | unsigned size(void) const; 25 | Trect boundary(void) const; 26 | 27 | void SaveToFile(const std::string & file_name); 28 | void LoadFromFile(const std::string & file_name); 29 | 30 | 31 | private: 32 | Node * m_root; 33 | unsigned m_size; 34 | }; -------------------------------------------------------------------------------- /Random.cpp: -------------------------------------------------------------------------------- 1 | #include "Random.h" 2 | 3 | 4 | Random::Random(std::uint_least32_t seed) 5 | : randomNumberGenerator(seed), 6 | byteDistribution(0, 256) 7 | { 8 | } 9 | 10 | std::int32_t Random::Next() 11 | { 12 | return this->Next(0, std::numeric_limits::max()); 13 | } 14 | 15 | std::int32_t Random::Next(std::int32_t maxValue) 16 | { 17 | return this->Next(0, maxValue); 18 | } 19 | 20 | std::int32_t Random::Next(std::int32_t minValue, std::int32_t maxValue) 21 | { 22 | if (minValue < 0 || maxValue < minValue) 23 | { 24 | throw 25 | std::invalid_argument("minValue and maxValue must be non-negative. maxValue must be greater than minvalue"); 26 | } 27 | std::uniform_int_distribution distribution(minValue, maxValue); 28 | return distribution(this->randomNumberGenerator); 29 | } 30 | 31 | std::double_t Random::NextDouble() 32 | { 33 | return this->NextDouble(0.0, 1.0); 34 | } 35 | 36 | std::double_t Random::NextDouble(std::double_t minValue, std::double_t maxValue) 37 | { 38 | if(maxValue < minValue) 39 | std::swap(minValue, maxValue); 40 | //if (minValue < 0.0 || maxValue < minValue) 41 | //{ 42 | // throw 43 | // std::invalid_argument("minValue and maxValue must be non-negative. maxValue must be greater than minvalue"); 44 | //} 45 | std::uniform_real_distribution distribution(minValue, maxValue); 46 | return distribution(this->randomNumberGenerator); 47 | } 48 | 49 | std::float_t Random::NextFloat() 50 | { 51 | return this->NextFloat(0.0, 1.0); 52 | } 53 | 54 | std::float_t Random::NextFloat(std::float_t minValue, std::float_t maxValue) 55 | { 56 | if (maxValue < minValue) 57 | std::swap(minValue, maxValue); 58 | //if (minValue < 0.0 || maxValue < minValue) 59 | //{ 60 | // throw 61 | // std::invalid_argument("minValue and maxValue must be non-negative. maxValue must be greater than minvalue"); 62 | //} 63 | std::uniform_real_distribution distribution(minValue, maxValue); 64 | return distribution(this->randomNumberGenerator); 65 | } 66 | 67 | void Random::NextBytes(std::vector& buffer) 68 | { 69 | for (auto& i : buffer) 70 | { 71 | i = static_cast(byteDistribution(this->randomNumberGenerator)); 72 | } 73 | } -------------------------------------------------------------------------------- /Random.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class IRandom 10 | { 11 | public: 12 | virtual ~IRandom() = default; 13 | 14 | virtual std::int32_t Next() = 0; 15 | 16 | virtual std::int32_t Next(std::int32_t maxValue) = 0; 17 | 18 | virtual std::int32_t Next(std::int32_t minValue, std::int32_t maxValue) = 0; 19 | 20 | virtual std::double_t NextDouble() = 0; 21 | 22 | virtual std::double_t NextDouble(std::double_t minValue, std::double_t maxValue) = 0; 23 | 24 | virtual std::float_t NextFloat() = 0; 25 | 26 | virtual std::float_t NextFloat(std::float_t minValue, std::float_t maxValue) = 0; 27 | 28 | virtual void NextBytes(std::vector& buffer) = 0; 29 | }; 30 | 31 | class Random : public IRandom 32 | { 33 | std::mt19937 randomNumberGenerator; 34 | std::uniform_int_distribution byteDistribution; 35 | public: 36 | Random(std::uint_least32_t seed); 37 | Random() : Random(std::_Random_device()) {}; 38 | std::int32_t Next() override; 39 | std::int32_t Next(std::int32_t maxValue) override; 40 | std::int32_t Next(std::int32_t minValue, std::int32_t maxValue) override; 41 | std::double_t NextDouble() override; 42 | std::double_t NextDouble(std::double_t minValue, std::double_t maxValue) override; 43 | std::float_t NextFloat() override; 44 | std::float_t NextFloat(std::float_t minValue, std::float_t maxValue) override; 45 | void NextBytes(std::vector& buffer) override; 46 | }; -------------------------------------------------------------------------------- /SDL Game Development Reference.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL Game Development Reference.pdf -------------------------------------------------------------------------------- /SDL2-2.0.8/BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL bug tracker, here: 3 | 4 | https://bugzilla.libsdl.org/ 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | You may also find help at the SDL forums/mailing list: 11 | 12 | https://discourse.libsdl.org/ 13 | 14 | Bug reports are welcome here, but we really appreciate if you use Bugzilla, as 15 | bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /SDL2-2.0.8/COPYING.txt: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games 6 | and emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | https://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /SDL2-2.0.8/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer 3 | 4 | (SDL) 5 | 6 | Version 2.0 7 | 8 | --- 9 | https://www.libsdl.org/ 10 | 11 | Simple DirectMedia Layer is a cross-platform development library designed 12 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 13 | hardware via OpenGL and Direct3D. It is used by video playback software, 14 | emulators, and popular games including Valve's award winning catalog 15 | and many Humble Bundle games. 16 | 17 | More extensive documentation is available in the docs directory, starting 18 | with README.md 19 | 20 | Enjoy! 21 | Sam Lantinga (slouken@libsdl.org) 22 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-cmake.md: -------------------------------------------------------------------------------- 1 | CMake 2 | ================================================================================ 3 | (www.cmake.org) 4 | 5 | SDL's build system was traditionally based on autotools. Over time, this 6 | approach has suffered from several issues across the different supported 7 | platforms. 8 | To solve these problems, a new build system based on CMake is under development. 9 | It works in parallel to the legacy system, so users can experiment with it 10 | without complication. 11 | While still experimental, the build system should be usable on the following 12 | platforms: 13 | 14 | * FreeBSD 15 | * Linux 16 | * VS.NET 2010 17 | * MinGW and Msys 18 | * OS X with support for XCode 19 | 20 | 21 | ================================================================================ 22 | Usage 23 | ================================================================================ 24 | 25 | Assuming the source for SDL is located at ~/sdl 26 | 27 | cd ~ 28 | mkdir build 29 | cd build 30 | cmake ../sdl 31 | 32 | This will build the static and dynamic versions of SDL in the ~/build directory. 33 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-directfb.md: -------------------------------------------------------------------------------- 1 | DirectFB 2 | ======== 3 | 4 | Supports: 5 | 6 | - Hardware YUV overlays 7 | - OpenGL - software only 8 | - 2D/3D accelerations (depends on directfb driver) 9 | - multiple displays 10 | - windows 11 | 12 | What you need: 13 | 14 | * DirectFB 1.0.1, 1.2.x, 1.3.0 15 | * Kernel-Framebuffer support: required: vesafb, radeonfb .... 16 | * Mesa 7.0.x - optional for OpenGL 17 | 18 | /etc/directfbrc 19 | 20 | This file should contain the following lines to make 21 | your joystick work and avoid crashes: 22 | ------------------------ 23 | disable-module=joystick 24 | disable-module=cle266 25 | disable-module=cyber5k 26 | no-linux-input-grab 27 | ------------------------ 28 | 29 | To disable to use x11 backend when DISPLAY variable is found use 30 | 31 | export SDL_DIRECTFB_X11_CHECK=0 32 | 33 | To disable the use of linux input devices, i.e. multimice/multikeyboard support, 34 | use 35 | 36 | export SDL_DIRECTFB_LINUX_INPUT=0 37 | 38 | To use hardware accelerated YUV-overlays for YUV-textures, use: 39 | 40 | export SDL_DIRECTFB_YUV_DIRECT=1 41 | 42 | This is disabled by default. It will only support one 43 | YUV texture, namely the first. Every other YUV texture will be 44 | rendered in software. 45 | 46 | In addition, you may use (directfb-1.2.x) 47 | 48 | export SDL_DIRECTFB_YUV_UNDERLAY=1 49 | 50 | to make the YUV texture an underlay. This will make the cursor to 51 | be shown. 52 | 53 | Simple Window Manager 54 | ===================== 55 | 56 | The driver has support for a very, very basic window manager you may 57 | want to use when running with "wm=default". Use 58 | 59 | export SDL_DIRECTFB_WM=1 60 | 61 | to enable basic window borders. In order to have the window title rendered, 62 | you need to have the following font installed: 63 | 64 | /usr/share/fonts/truetype/freefont/FreeSans.ttf 65 | 66 | OpenGL Support 67 | ============== 68 | 69 | The following instructions will give you *software* OpenGL. However this 70 | works at least on all directfb supported platforms. 71 | 72 | As of this writing 20100802 you need to pull Mesa from git and do the following: 73 | 74 | ------------------------ 75 | git clone git://anongit.freedesktop.org/git/mesa/mesa 76 | cd mesa 77 | git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a 78 | ------------------------ 79 | 80 | Edit configs/linux-directfb so that the Directories-section looks like 81 | ------------------------ 82 | # Directories 83 | SRC_DIRS = mesa glu 84 | GLU_DIRS = sgi 85 | DRIVER_DIRS = directfb 86 | PROGRAM_DIRS = 87 | ------------------------ 88 | 89 | make linux-directfb 90 | make 91 | 92 | echo Installing - please enter sudo pw. 93 | 94 | sudo make install INSTALL_DIR=/usr/local/dfb_GL 95 | cd src/mesa/drivers/directfb 96 | make 97 | sudo make install INSTALL_DIR=/usr/local/dfb_GL 98 | ------------------------ 99 | 100 | To run the SDL - testprograms: 101 | 102 | export SDL_VIDEODRIVER=directfb 103 | export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib 104 | export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7 105 | 106 | ./testgl 107 | 108 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-emscripten.md: -------------------------------------------------------------------------------- 1 | Emscripten 2 | ================================================================================ 3 | 4 | Build: 5 | 6 | $ mkdir build 7 | $ cd build 8 | $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2" 9 | $ emmake make 10 | 11 | Or with cmake: 12 | 13 | $ mkdir build 14 | $ cd build 15 | $ emcmake cmake .. 16 | $ emmake make 17 | 18 | To build one of the tests: 19 | 20 | $ cd test/ 21 | $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html 22 | 23 | Uses GLES2 renderer or software 24 | 25 | Some other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere): 26 | 27 | SDL_mixer (http://www.libsdl.org/projects/SDL_mixer/): 28 | 29 | $ EMCONFIGURE_JS=1 emconfigure ../configure 30 | build as usual... 31 | 32 | SDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx): 33 | 34 | $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx 35 | build as usual... 36 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-gesture.md: -------------------------------------------------------------------------------- 1 | Dollar Gestures 2 | =========================================================================== 3 | SDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures. 4 | 5 | Gestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. 6 | 7 | Dollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID. 8 | 9 | Recording: 10 | ---------- 11 | To begin recording on a touch device call: 12 | SDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices. 13 | 14 | Recording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event. 15 | A SDL_DOLLARRECORD event is a dgesture with the following fields: 16 | 17 | * event.dgesture.touchId - the Id of the touch used to record the gesture. 18 | * event.dgesture.gestureId - the unique id of the recorded gesture. 19 | 20 | 21 | Performing: 22 | ----------- 23 | As long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields: 24 | 25 | * event.dgesture.touchId - the Id of the touch which performed the gesture. 26 | * event.dgesture.gestureId - the unique id of the closest gesture to the performed stroke. 27 | * event.dgesture.error - the difference between the gesture template and the actual performed gesture. Lower error is a better match. 28 | * event.dgesture.numFingers - the number of fingers used to draw the stroke. 29 | 30 | Most programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed). 31 | 32 | 33 | 34 | Saving: 35 | ------- 36 | To save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored. 37 | 38 | To save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored. 39 | 40 | Both functions return the number of gestures successfully saved. 41 | 42 | 43 | Loading: 44 | -------- 45 | To load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. 46 | 47 | SDL_LoadDollarTemplates returns the number of templates successfully loaded. 48 | 49 | 50 | 51 | =========================================================================== 52 | Multi Gestures 53 | =========================================================================== 54 | SDL provides simple support for pinch/rotate/swipe gestures. 55 | Every time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields: 56 | 57 | * event.mgesture.touchId - the Id of the touch on which the gesture was performed. 58 | * event.mgesture.x - the normalized x coordinate of the gesture. (0..1) 59 | * event.mgesture.y - the normalized y coordinate of the gesture. (0..1) 60 | * event.mgesture.dTheta - the amount that the fingers rotated during this motion. 61 | * event.mgesture.dDist - the amount that the fingers pinched during this motion. 62 | * event.mgesture.numFingers - the number of fingers used in the gesture. 63 | 64 | 65 | =========================================================================== 66 | Notes 67 | =========================================================================== 68 | For a complete example see test/testgesture.c 69 | 70 | Please direct questions/comments to: 71 | jim.tla+sdl_touch@gmail.com 72 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-hg.md: -------------------------------------------------------------------------------- 1 | Mercurial 2 | ========= 3 | 4 | The latest development version of SDL is available via Mercurial. 5 | Mercurial allows you to get up-to-the-minute fixes and enhancements; 6 | as a developer works on a source tree, you can use "hg" to mirror that 7 | source tree instead of waiting for an official release. Please look 8 | at the Mercurial website ( https://www.mercurial-scm.org/ ) for more 9 | information on using hg, where you can also download software for 10 | Mac OS X, Windows, and Unix systems. 11 | 12 | hg clone http://hg.libsdl.org/SDL 13 | 14 | If you are building SDL via configure, you will need to run autogen.sh 15 | before running configure. 16 | 17 | There is a web interface to the subversion repository at: 18 | http://hg.libsdl.org/SDL/ 19 | 20 | There is an RSS feed available at that URL, for those that want to 21 | track commits in real time. 22 | 23 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-linux.md: -------------------------------------------------------------------------------- 1 | Linux 2 | ================================================================================ 3 | 4 | By default SDL will only link against glibc, the rest of the features will be 5 | enabled dynamically at runtime depending on the available features on the target 6 | system. So, for example if you built SDL with Xinerama support and the target 7 | system does not have the Xinerama libraries installed, it will be disabled 8 | at runtime, and you won't get a missing library error, at least with the 9 | default configuration parameters. 10 | 11 | 12 | ================================================================================ 13 | Build Dependencies 14 | ================================================================================ 15 | 16 | Ubuntu 13.04, all available features enabled: 17 | 18 | sudo apt-get install build-essential mercurial make cmake autoconf automake \ 19 | libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \ 20 | libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \ 21 | libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \ 22 | libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \ 23 | fcitx-libs-dev libsamplerate0-dev libsndio-dev 24 | 25 | Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols" 26 | to that command line for Wayland support. 27 | 28 | Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command 29 | line for Mir support. 30 | 31 | NOTES: 32 | - This includes all the audio targets except arts, because Ubuntu pulled the 33 | artsc0-dev package, but in theory SDL still supports it. 34 | - libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime 35 | for higher-quality audio resampling. SDL will work without it if the library 36 | is missing, so it's safe to build in support even if the end user doesn't 37 | have this library installed. 38 | - DirectFB isn't included because the configure script (currently) fails to find 39 | it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the 40 | configure script to include DirectFB support. Send patches. :) 41 | 42 | 43 | ================================================================================ 44 | Joystick does not work 45 | ================================================================================ 46 | 47 | If you compiled or are using a version of SDL with udev support (and you should!) 48 | there's a few issues that may cause SDL to fail to detect your joystick. To 49 | debug this, start by installing the evtest utility. On Ubuntu/Debian: 50 | 51 | sudo apt-get install evtest 52 | 53 | Then run: 54 | 55 | sudo evtest 56 | 57 | You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX" 58 | Now run: 59 | 60 | cat /dev/input/event/XX 61 | 62 | If you get a permission error, you need to set a udev rule to change the mode of 63 | your device (see below) 64 | 65 | Also, try: 66 | 67 | sudo udevadm info --query=all --name=input/eventXX 68 | 69 | If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it, 70 | you need to set up an udev rule to force this variable. 71 | 72 | A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks 73 | like: 74 | 75 | SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" 76 | SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" 77 | 78 | You can set up similar rules for your device by changing the values listed in 79 | idProduct and idVendor. To obtain these values, try: 80 | 81 | sudo udevadm info -a --name=input/eventXX | grep idVendor 82 | sudo udevadm info -a --name=input/eventXX | grep idProduct 83 | 84 | If multiple values come up for each of these, the one you want is the first one of each. 85 | 86 | On other systems which ship with an older udev (such as CentOS), you may need 87 | to set up a rule such as: 88 | 89 | SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1" 90 | 91 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-pandora.md: -------------------------------------------------------------------------------- 1 | Pandora 2 | ===================================================================== 3 | 4 | ( http://openpandora.org/ ) 5 | - A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES 6 | support to work on the pandora under the framebuffer. This driver do not have 7 | input support for now, so if you use it you will have to add your own control code. 8 | The video driver name is "pandora" so if you have problem running it from 9 | the framebuffer, try to set the following variable before starting your application : 10 | "export SDL_VIDEODRIVER=pandora" 11 | 12 | - OpenGL ES support was added to the x11 driver, so it's working like the normal 13 | x11 driver one with OpenGLX support, with SDL input event's etc.. 14 | 15 | 16 | David Carré (Cpasjuste) 17 | cpasjuste@gmail.com 18 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-platforms.md: -------------------------------------------------------------------------------- 1 | Platforms 2 | ========= 3 | 4 | We maintain the list of supported platforms on our wiki now, and how to 5 | build and install SDL for those platforms: 6 | 7 | https://wiki.libsdl.org/Installation 8 | 9 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-porting.md: -------------------------------------------------------------------------------- 1 | Porting 2 | ======= 3 | 4 | * Porting To A New Platform 5 | 6 | The first thing you have to do when porting to a new platform, is look at 7 | include/SDL_platform.h and create an entry there for your operating system. 8 | The standard format is "__PLATFORM__", where PLATFORM is the name of the OS. 9 | Ideally SDL_platform.h will be able to auto-detect the system it's building 10 | on based on C preprocessor symbols. 11 | 12 | There are two basic ways of building SDL at the moment: 13 | 14 | 1. The "UNIX" way: ./configure; make; make install 15 | 16 | If you have a GNUish system, then you might try this. Edit configure.in, 17 | take a look at the large section labelled: 18 | 19 | "Set up the configuration based on the host platform!" 20 | 21 | Add a section for your platform, and then re-run autogen.sh and build! 22 | 23 | 2. Using an IDE: 24 | 25 | If you're using an IDE or other non-configure build system, you'll probably 26 | want to create a custom SDL_config.h for your platform. Edit SDL_config.h, 27 | add a section for your platform, and create a custom SDL_config_{platform}.h, 28 | based on SDL_config_minimal.h and SDL_config.h.in 29 | 30 | Add the top level include directory to the header search path, and then add 31 | the following sources to the project: 32 | 33 | src/*.c 34 | src/atomic/*.c 35 | src/audio/*.c 36 | src/cpuinfo/*.c 37 | src/events/*.c 38 | src/file/*.c 39 | src/haptic/*.c 40 | src/joystick/*.c 41 | src/power/*.c 42 | src/render/*.c 43 | src/render/software/*.c 44 | src/stdlib/*.c 45 | src/thread/*.c 46 | src/timer/*.c 47 | src/video/*.c 48 | src/audio/disk/*.c 49 | src/audio/dummy/*.c 50 | src/filesystem/dummy/*.c 51 | src/video/dummy/*.c 52 | src/haptic/dummy/*.c 53 | src/joystick/dummy/*.c 54 | src/main/dummy/*.c 55 | src/thread/generic/*.c 56 | src/timer/dummy/*.c 57 | src/loadso/dummy/*.c 58 | 59 | 60 | Once you have a working library without any drivers, you can go back to each 61 | of the major subsystems and start implementing drivers for your platform. 62 | 63 | If you have any questions, don't hesitate to ask on the SDL mailing list: 64 | http://www.libsdl.org/mailing-list.php 65 | 66 | Enjoy! 67 | Sam Lantinga (slouken@libsdl.org) 68 | 69 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-psp.md: -------------------------------------------------------------------------------- 1 | PSP 2 | ====== 3 | SDL port for the Sony PSP contributed by 4 | Captian Lex 5 | 6 | Credit to 7 | Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP 8 | Geecko for his PSP GU lib "Glib2d" 9 | 10 | Building 11 | -------- 12 | To build for the PSP, make sure psp-config is in the path and run: 13 | make -f Makefile.psp 14 | 15 | 16 | 17 | To Do 18 | ------ 19 | PSP Screen Keyboard 20 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-touch.md: -------------------------------------------------------------------------------- 1 | Touch 2 | =========================================================================== 3 | System Specific Notes 4 | =========================================================================== 5 | Linux: 6 | The linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it. 7 | 8 | Mac: 9 | The Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do. 10 | 11 | iPhone: 12 | Works out of box. 13 | 14 | Windows: 15 | Unfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com 16 | 17 | =========================================================================== 18 | Events 19 | =========================================================================== 20 | SDL_FINGERDOWN: 21 | Sent when a finger (or stylus) is placed on a touch device. 22 | Fields: 23 | * event.tfinger.touchId - the Id of the touch device. 24 | * event.tfinger.fingerId - the Id of the finger which just went down. 25 | * event.tfinger.x - the x coordinate of the touch (0..1) 26 | * event.tfinger.y - the y coordinate of the touch (0..1) 27 | * event.tfinger.pressure - the pressure of the touch (0..1) 28 | 29 | SDL_FINGERMOTION: 30 | Sent when a finger (or stylus) is moved on the touch device. 31 | Fields: 32 | Same as SDL_FINGERDOWN but with additional: 33 | * event.tfinger.dx - change in x coordinate during this motion event. 34 | * event.tfinger.dy - change in y coordinate during this motion event. 35 | 36 | SDL_FINGERUP: 37 | Sent when a finger (or stylus) is lifted from the touch device. 38 | Fields: 39 | Same as SDL_FINGERDOWN. 40 | 41 | 42 | =========================================================================== 43 | Functions 44 | =========================================================================== 45 | SDL provides the ability to access the underlying SDL_Finger structures. 46 | These structures should _never_ be modified. 47 | 48 | The following functions are included from SDL_touch.h 49 | 50 | To get a SDL_TouchID call SDL_GetTouchDevice(int index). 51 | This returns a SDL_TouchID. 52 | IMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this! 53 | 54 | The number of touch devices can be queried with SDL_GetNumTouchDevices(). 55 | 56 | A SDL_TouchID may be used to get pointers to SDL_Finger. 57 | 58 | SDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device. 59 | 60 | The most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following: 61 | 62 | float x = event.tfinger.x; 63 | float y = event.tfinger.y; 64 | 65 | 66 | 67 | To get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger. 68 | This returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed. 69 | A SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled. 70 | As a result, be very careful to check for NULL return values. 71 | 72 | A SDL_Finger has the following fields: 73 | * x, y: 74 | The current coordinates of the touch. 75 | * pressure: 76 | The pressure of the touch. 77 | 78 | 79 | =========================================================================== 80 | Notes 81 | =========================================================================== 82 | For a complete example see test/testgesture.c 83 | 84 | Please direct questions/comments to: 85 | jim.tla+sdl_touch@gmail.com 86 | (original author, API was changed since) 87 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-wince.md: -------------------------------------------------------------------------------- 1 | WinCE 2 | ===== 3 | 4 | Windows CE is no longer supported by SDL. 5 | 6 | We have left the CE support in SDL 1.2 for those that must have it, and we 7 | have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. 8 | 9 | --ryan. 10 | 11 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README-windows.md: -------------------------------------------------------------------------------- 1 | Windows 2 | ================================================================================ 3 | 4 | ================================================================================ 5 | OpenGL ES 2.x support 6 | ================================================================================ 7 | 8 | SDL has support for OpenGL ES 2.x under Windows via two alternative 9 | implementations. 10 | The most straightforward method consists in running your app in a system with 11 | a graphic card paired with a relatively recent (as of November of 2013) driver 12 | which supports the WGL_EXT_create_context_es2_profile extension. Vendors known 13 | to ship said extension on Windows currently include nVidia and Intel. 14 | 15 | The other method involves using the ANGLE library (https://code.google.com/p/angleproject/) 16 | If an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile 17 | extension is found, SDL will try to load the libEGL.dll library provided by 18 | ANGLE. 19 | To obtain the ANGLE binaries, you can either compile from source from 20 | https://chromium.googlesource.com/angle/angle or copy the relevant binaries from 21 | a recent Chrome/Chromium install for Windows. The files you need are: 22 | 23 | * libEGL.dll 24 | * libGLESv2.dll 25 | * d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler) 26 | or... 27 | * d3dcompiler_43.dll (supports Windows XP or later) 28 | 29 | If you compile ANGLE from source, you can configure it so it does not need the 30 | d3dcompiler_* DLL at all (for details on this, see their documentation). 31 | However, by default SDL will try to preload the d3dcompiler_46.dll to 32 | comply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to 33 | support Windows XP) or to skip this step at all, you can use the 34 | SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details). 35 | 36 | Known Bugs: 37 | 38 | * SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears 39 | that there's a bug in the library which prevents the window contents from 40 | refreshing if this is set to anything other than the default value. 41 | 42 | Vulkan Surface Support 43 | ============== 44 | 45 | Support for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application. 46 | -------------------------------------------------------------------------------- /SDL2-2.0.8/docs/README.md: -------------------------------------------------------------------------------- 1 | Simple DirectMedia Layer {#mainpage} 2 | ======================== 3 | 4 | (SDL) 5 | 6 | Version 2.0 7 | 8 | --- 9 | http://www.libsdl.org/ 10 | 11 | Simple DirectMedia Layer is a cross-platform development library designed 12 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 13 | hardware via OpenGL and Direct3D. It is used by video playback software, 14 | emulators, and popular games including Valve's award winning catalog 15 | and many Humble Bundle games. 16 | 17 | SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. 18 | Support for other platforms may be found in the source code. 19 | 20 | SDL is written in C, works natively with C++, and there are bindings 21 | available for several other languages, including C# and Python. 22 | 23 | This library is distributed under the zlib license, which can be found 24 | in the file "COPYING.txt". 25 | 26 | The best way to learn how to use SDL is to check out the header files in 27 | the "include" subdirectory and the programs in the "test" subdirectory. 28 | The header files and test programs are well commented and always up to date. 29 | 30 | More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/) 31 | 32 | - [Android](README-android.md) 33 | - [CMake](README-cmake.md) 34 | - [DirectFB](README-directfb.md) 35 | - [DynAPI](README-dynapi.md) 36 | - [Emscripten](README-emscripten.md) 37 | - [Gesture](README-gesture.md) 38 | - [Mercurial](README-hg.md) 39 | - [iOS](README-ios.md) 40 | - [Linux](README-linux.md) 41 | - [OS X](README-macosx.md) 42 | - [Native Client](README-nacl.md) 43 | - [Pandora](README-pandora.md) 44 | - [Supported Platforms](README-platforms.md) 45 | - [Porting information](README-porting.md) 46 | - [PSP](README-psp.md) 47 | - [Raspberry Pi](README-raspberrypi.md) 48 | - [Touch](README-touch.md) 49 | - [WinCE](README-wince.md) 50 | - [Windows](README-windows.md) 51 | - [WinRT](README-winrt.md) 52 | 53 | If you need help with the library, or just want to discuss SDL related 54 | issues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php) 55 | 56 | If you want to report bugs or contribute patches, please submit them to 57 | [bugzilla](https://bugzilla.libsdl.org/) 58 | 59 | Enjoy! 60 | 61 | 62 | Sam Lantinga 63 | 64 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/SDL.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.h 24 | * 25 | * Main include header for the SDL library 26 | */ 27 | 28 | 29 | #ifndef SDL_h_ 30 | #define SDL_h_ 31 | 32 | #include "SDL_main.h" 33 | #include "SDL_stdinc.h" 34 | #include "SDL_assert.h" 35 | #include "SDL_atomic.h" 36 | #include "SDL_audio.h" 37 | #include "SDL_clipboard.h" 38 | #include "SDL_cpuinfo.h" 39 | #include "SDL_endian.h" 40 | #include "SDL_error.h" 41 | #include "SDL_events.h" 42 | #include "SDL_filesystem.h" 43 | #include "SDL_gamecontroller.h" 44 | #include "SDL_haptic.h" 45 | #include "SDL_hints.h" 46 | #include "SDL_joystick.h" 47 | #include "SDL_loadso.h" 48 | #include "SDL_log.h" 49 | #include "SDL_messagebox.h" 50 | #include "SDL_mutex.h" 51 | #include "SDL_power.h" 52 | #include "SDL_render.h" 53 | #include "SDL_rwops.h" 54 | #include "SDL_shape.h" 55 | #include "SDL_system.h" 56 | #include "SDL_thread.h" 57 | #include "SDL_timer.h" 58 | #include "SDL_version.h" 59 | #include "SDL_video.h" 60 | 61 | #include "begin_code.h" 62 | /* Set up for C function definitions, even when using C++ */ 63 | #ifdef __cplusplus 64 | extern "C" { 65 | #endif 66 | 67 | /* As of version 0.5, SDL is loaded dynamically into the application */ 68 | 69 | /** 70 | * \name SDL_INIT_* 71 | * 72 | * These are the flags which may be passed to SDL_Init(). You should 73 | * specify the subsystems which you will be using in your application. 74 | */ 75 | /* @{ */ 76 | #define SDL_INIT_TIMER 0x00000001u 77 | #define SDL_INIT_AUDIO 0x00000010u 78 | #define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ 79 | #define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */ 80 | #define SDL_INIT_HAPTIC 0x00001000u 81 | #define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ 82 | #define SDL_INIT_EVENTS 0x00004000u 83 | #define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */ 84 | #define SDL_INIT_EVERYTHING ( \ 85 | SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ 86 | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ 87 | ) 88 | /* @} */ 89 | 90 | /** 91 | * This function initializes the subsystems specified by \c flags 92 | */ 93 | extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); 94 | 95 | /** 96 | * This function initializes specific SDL subsystems 97 | * 98 | * Subsystem initialization is ref-counted, you must call 99 | * SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly 100 | * shutdown a subsystem manually (or call SDL_Quit() to force shutdown). 101 | * If a subsystem is already loaded then this call will 102 | * increase the ref-count and return. 103 | */ 104 | extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); 105 | 106 | /** 107 | * This function cleans up specific SDL subsystems 108 | */ 109 | extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); 110 | 111 | /** 112 | * This function returns a mask of the specified subsystems which have 113 | * previously been initialized. 114 | * 115 | * If \c flags is 0, it returns a mask of all initialized subsystems. 116 | */ 117 | extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); 118 | 119 | /** 120 | * This function cleans up all initialized subsystems. You should 121 | * call it upon all exit conditions. 122 | */ 123 | extern DECLSPEC void SDLCALL SDL_Quit(void); 124 | 125 | /* Ends C function definitions when using C++ */ 126 | #ifdef __cplusplus 127 | } 128 | #endif 129 | #include "close_code.h" 130 | 131 | #endif /* SDL_h_ */ 132 | 133 | /* vi: set ts=4 sw=4 expandtab: */ 134 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/SDL_config_psp.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_psp_h_ 23 | #define SDL_config_psp_h_ 24 | #define SDL_config_h_ 25 | 26 | #include "SDL_platform.h" 27 | 28 | 29 | 30 | #ifdef __GNUC__ 31 | #define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1 32 | #endif 33 | 34 | #define HAVE_GCC_ATOMICS 1 35 | 36 | #define HAVE_ALLOCA_H 1 37 | #define HAVE_SYS_TYPES_H 1 38 | #define HAVE_STDIO_H 1 39 | #define STDC_HEADERS 1 40 | #define HAVE_STRING_H 1 41 | #define HAVE_INTTYPES_H 1 42 | #define HAVE_STDINT_H 1 43 | #define HAVE_CTYPE_H 1 44 | #define HAVE_MATH_H 1 45 | #define HAVE_SIGNAL_H 1 46 | 47 | /* C library functions */ 48 | #define HAVE_MALLOC 1 49 | #define HAVE_CALLOC 1 50 | #define HAVE_REALLOC 1 51 | #define HAVE_FREE 1 52 | #define HAVE_ALLOCA 1 53 | #define HAVE_GETENV 1 54 | #define HAVE_SETENV 1 55 | #define HAVE_PUTENV 1 56 | #define HAVE_SETENV 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_MEMCMP 1 65 | #define HAVE_STRLEN 1 66 | #define HAVE_STRLCPY 1 67 | #define HAVE_STRLCAT 1 68 | #define HAVE_STRDUP 1 69 | #define HAVE_STRCHR 1 70 | #define HAVE_STRRCHR 1 71 | #define HAVE_STRSTR 1 72 | #define HAVE_STRTOL 1 73 | #define HAVE_STRTOUL 1 74 | #define HAVE_STRTOLL 1 75 | #define HAVE_STRTOULL 1 76 | #define HAVE_STRTOD 1 77 | #define HAVE_ATOI 1 78 | #define HAVE_ATOF 1 79 | #define HAVE_STRCMP 1 80 | #define HAVE_STRNCMP 1 81 | #define HAVE_STRCASECMP 1 82 | #define HAVE_STRNCASECMP 1 83 | #define HAVE_VSSCANF 1 84 | #define HAVE_VSNPRINTF 1 85 | #define HAVE_M_PI 1 86 | #define HAVE_ATAN 1 87 | #define HAVE_ATAN2 1 88 | #define HAVE_ACOS 1 89 | #define HAVE_ASIN 1 90 | #define HAVE_CEIL 1 91 | #define HAVE_COPYSIGN 1 92 | #define HAVE_COS 1 93 | #define HAVE_COSF 1 94 | #define HAVE_FABS 1 95 | #define HAVE_FLOOR 1 96 | #define HAVE_LOG 1 97 | #define HAVE_POW 1 98 | #define HAVE_SCALBN 1 99 | #define HAVE_SIN 1 100 | #define HAVE_SINF 1 101 | #define HAVE_SQRT 1 102 | #define HAVE_SQRTF 1 103 | #define HAVE_TAN 1 104 | #define HAVE_TANF 1 105 | #define HAVE_SETJMP 1 106 | #define HAVE_NANOSLEEP 1 107 | /* #define HAVE_SYSCONF 1 */ 108 | /* #define HAVE_SIGACTION 1 */ 109 | 110 | 111 | /* PSP isn't that sophisticated */ 112 | #define LACKS_SYS_MMAN_H 1 113 | 114 | /* Enable the stub thread support (src/thread/psp/\*.c) */ 115 | #define SDL_THREAD_PSP 1 116 | 117 | /* Enable the stub timer support (src/timer/psp/\*.c) */ 118 | #define SDL_TIMERS_PSP 1 119 | 120 | /* Enable the stub joystick driver (src/joystick/psp/\*.c) */ 121 | #define SDL_JOYSTICK_PSP 1 122 | 123 | /* Enable the stub audio driver (src/audio/psp/\*.c) */ 124 | #define SDL_AUDIO_DRIVER_PSP 1 125 | 126 | /* PSP video dirver */ 127 | #define SDL_VIDEO_DRIVER_PSP 1 128 | 129 | /* PSP render dirver */ 130 | #define SDL_VIDEO_RENDER_PSP 1 131 | 132 | #define SDL_POWER_PSP 1 133 | 134 | /* !!! FIXME: what does PSP do for filesystem stuff? */ 135 | #define SDL_FILESYSTEM_DUMMY 1 136 | 137 | /* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */ 138 | #define SDL_HAPTIC_DISABLED 1 139 | 140 | /* PSP can't load shared object (src/loadso/dummy/\*.c) */ 141 | #define SDL_LOADSO_DISABLED 1 142 | 143 | 144 | #endif /* SDL_config_psp_h_ */ 145 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-11914:f1084c419f33" 2 | #define SDL_REVISION_NUMBER 11914 3 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/include/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 | -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x64/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x64/SDL2.dll -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x64/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x64/SDL2.lib -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x64/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x64/SDL2main.lib -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x64/SDL2test.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x64/SDL2test.lib -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x86/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x86/SDL2.dll -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x86/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x86/SDL2.lib -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x86/SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x86/SDL2main.lib -------------------------------------------------------------------------------- /SDL2-2.0.8/lib/x86/SDL2test.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2-2.0.8/lib/x86/SDL2test.lib -------------------------------------------------------------------------------- /SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2.dll -------------------------------------------------------------------------------- /SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2.lib -------------------------------------------------------------------------------- /SDL2_framerate.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | SDL2_framerate.h: framerate manager 4 | 5 | Copyright (C) 2012 Andreas Schiffler 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 23 | 3. This notice may not be removed or altered from any source 24 | distribution. 25 | 26 | Andreas Schiffler -- aschiffler at ferzkopp dot net 27 | 28 | */ 29 | 30 | #ifndef _SDL2_framerate_h 31 | #define _SDL2_framerate_h 32 | 33 | /* Set up for C function definitions, even when using C++ */ 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | /* --- */ 39 | 40 | #include "SDL.h" 41 | 42 | /* --------- Definitions */ 43 | 44 | /*! 45 | \brief Highest possible rate supported by framerate controller in Hz (1/s). 46 | */ 47 | #define FPS_UPPER_LIMIT 200 48 | 49 | /*! 50 | \brief Lowest possible rate supported by framerate controller in Hz (1/s). 51 | */ 52 | #define FPS_LOWER_LIMIT 1 53 | 54 | /*! 55 | \brief Default rate of framerate controller in Hz (1/s). 56 | */ 57 | #define FPS_DEFAULT 30 58 | 59 | /*! 60 | \brief Structure holding the state and timing information of the framerate controller. 61 | */ 62 | typedef struct { 63 | Uint32 framecount; 64 | float rateticks; 65 | Uint32 baseticks; 66 | Uint32 lastticks; 67 | Uint32 rate; 68 | } FPSmanager; 69 | 70 | /* ---- Function Prototypes */ 71 | 72 | #ifdef _MSC_VER 73 | # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) 74 | # define SDL2_FRAMERATE_SCOPE __declspec(dllexport) 75 | # else 76 | # ifdef LIBSDL2_GFX_DLL_IMPORT 77 | # define SDL2_FRAMERATE_SCOPE __declspec(dllimport) 78 | # endif 79 | # endif 80 | #endif 81 | #ifndef SDL2_FRAMERATE_SCOPE 82 | # define SDL2_FRAMERATE_SCOPE extern 83 | #endif 84 | 85 | /* Functions return 0 or value for sucess and -1 for error */ 86 | 87 | SDL2_FRAMERATE_SCOPE void SDL_initFramerate(FPSmanager * manager); 88 | SDL2_FRAMERATE_SCOPE int SDL_setFramerate(FPSmanager * manager, Uint32 rate); 89 | SDL2_FRAMERATE_SCOPE int SDL_getFramerate(FPSmanager * manager); 90 | SDL2_FRAMERATE_SCOPE int SDL_getFramecount(FPSmanager * manager); 91 | SDL2_FRAMERATE_SCOPE Uint32 SDL_framerateDelay(FPSmanager * manager); 92 | 93 | /* --- */ 94 | 95 | /* Ends C function definitions when using C++ */ 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | 100 | #endif /* _SDL2_framerate_h */ 101 | -------------------------------------------------------------------------------- /SDL2_gfxPrimitives_font.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_gfxPrimitives_font.h -------------------------------------------------------------------------------- /SDL2_image-2.0.3/COPYING.txt: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_image: An example image loading library for use with SDL 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 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/README.txt: -------------------------------------------------------------------------------- 1 | 2 | SDL_image 2.0 3 | 4 | The latest version of this library is available from: 5 | http://www.libsdl.org/projects/SDL_image/ 6 | 7 | This is a simple library to load images of various formats as SDL surfaces. 8 | This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG, 9 | TGA, TIFF, and simple SVG formats. 10 | 11 | API: 12 | #include "SDL_image.h" 13 | 14 | SDL_Surface *IMG_Load(const char *file); 15 | or 16 | SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc); 17 | or 18 | SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type); 19 | 20 | where type is a string specifying the format (i.e. "PNG" or "pcx"). 21 | Note that IMG_Load_RW cannot load TGA images. 22 | 23 | To create a surface from an XPM image included in C source, use: 24 | 25 | SDL_Surface *IMG_ReadXPMFromArray(char **xpm); 26 | 27 | An example program 'showimage' is included, with source in showimage.c 28 | 29 | JPEG support requires the JPEG library: http://www.ijg.org/ 30 | PNG support requires the PNG library: http://www.libpng.org/pub/png/libpng.html 31 | and the Zlib library: http://www.gzip.org/zlib/ 32 | TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/ 33 | 34 | If you have these libraries installed in non-standard places, you can 35 | try adding those paths to the configure script, e.g. 36 | sh ./configure CPPFLAGS="-I/somewhere/include" LDFLAGS="-L/somewhere/lib" 37 | If this works, you may need to add /somewhere/lib to your LD_LIBRARY_PATH 38 | so shared library loading works correctly. 39 | 40 | This library is under the zlib License, see the file "COPYING.txt" for details. 41 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/LICENSE.jpeg.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | LEGAL ISSUES 6 | ============ 7 | 8 | In plain English: 9 | 10 | 1. We don't promise that this software works. (But if you find any bugs, 11 | please let us know!) 12 | 2. You can use this software for whatever you want. You don't have to pay us. 13 | 3. You may not pretend that you wrote this software. If you use it in a 14 | program, you must acknowledge somewhere in your documentation that 15 | you've used the IJG code. 16 | 17 | In legalese: 18 | 19 | The authors make NO WARRANTY or representation, either express or implied, 20 | with respect to this software, its quality, accuracy, merchantability, or 21 | fitness for a particular purpose. This software is provided "AS IS", and you, 22 | its user, assume the entire risk as to its quality and accuracy. 23 | 24 | This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. 25 | All Rights Reserved except as specified below. 26 | 27 | Permission is hereby granted to use, copy, modify, and distribute this 28 | software (or portions thereof) for any purpose, without fee, subject to these 29 | conditions: 30 | (1) If any part of the source code for this software is distributed, then this 31 | README file must be included, with this copyright and no-warranty notice 32 | unaltered; and any additions, deletions, or changes to the original files 33 | must be clearly indicated in accompanying documentation. 34 | (2) If only executable code is distributed, then the accompanying 35 | documentation must state that "this software is based in part on the work of 36 | the Independent JPEG Group". 37 | (3) Permission for use of this software is granted only if the user accepts 38 | full responsibility for any undesirable consequences; the authors accept 39 | NO LIABILITY for damages of any kind. 40 | 41 | These conditions apply to any software derived from or based on the IJG code, 42 | not just to the unmodified library. If you use our work, you ought to 43 | acknowledge us. 44 | 45 | Permission is NOT granted for the use of any IJG author's name or company name 46 | in advertising or publicity relating to this software or products derived from 47 | it. This software may be referred to only as "the Independent JPEG Group's 48 | software". 49 | 50 | We specifically permit and encourage the use of this software as the basis of 51 | commercial products, provided that all warranty or liability claims are 52 | assumed by the product vendor. 53 | 54 | 55 | The Unix configuration script "configure" was produced with GNU Autoconf. 56 | It is copyright by the Free Software Foundation but is freely distributable. 57 | The same holds for its supporting scripts (config.guess, config.sub, 58 | ltmain.sh). Another support script, install-sh, is copyright by X Consortium 59 | but is also freely distributable. 60 | 61 | The IJG distribution formerly included code to read and write GIF files. 62 | To avoid entanglement with the Unisys LZW patent (now expired), GIF reading 63 | support has been removed altogether, and the GIF writer has been simplified 64 | to produce "uncompressed GIFs". This technique does not use the LZW 65 | algorithm; the resulting GIF files are larger than usual, but are readable 66 | by all standard GIF decoders. 67 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/LICENSE.tiff.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 1988-1997 Sam Leffler 6 | Copyright (c) 1991-1997 Silicon Graphics, Inc. 7 | 8 | Permission to use, copy, modify, distribute, and sell this software and 9 | its documentation for any purpose is hereby granted without fee, provided 10 | that (i) the above copyright notices and this permission notice appear in 11 | all copies of the software and related documentation, and (ii) the names of 12 | Sam Leffler and Silicon Graphics may not be used in any advertising or 13 | publicity relating to the software without the specific, prior written 14 | permission of Sam Leffler and Silicon Graphics. 15 | 16 | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 18 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 19 | 20 | IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 21 | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 22 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 23 | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 24 | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 25 | OF THIS SOFTWARE. 26 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/LICENSE.webp.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 2010, Google Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are 9 | met: 10 | 11 | * Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | * Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in 16 | the documentation and/or other materials provided with the 17 | distribution. 18 | 19 | * Neither the name of Google nor the names of its contributors may 20 | be used to endorse or promote products derived from this software 21 | without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2017 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | 33 | If you redistribute modified sources, we would appreciate that you include in 34 | the file ChangeLog history information documenting your changes. Please read 35 | the FAQ for more information on the distribution of modified source versions. 36 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/SDL2_image.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/SDL2_image.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/SDL2_image.lib -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/libjpeg-9.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/libpng16-16.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/libtiff-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/libtiff-5.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/libwebp-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/libwebp-7.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x64/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x64/zlib1.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/LICENSE.jpeg.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | LEGAL ISSUES 6 | ============ 7 | 8 | In plain English: 9 | 10 | 1. We don't promise that this software works. (But if you find any bugs, 11 | please let us know!) 12 | 2. You can use this software for whatever you want. You don't have to pay us. 13 | 3. You may not pretend that you wrote this software. If you use it in a 14 | program, you must acknowledge somewhere in your documentation that 15 | you've used the IJG code. 16 | 17 | In legalese: 18 | 19 | The authors make NO WARRANTY or representation, either express or implied, 20 | with respect to this software, its quality, accuracy, merchantability, or 21 | fitness for a particular purpose. This software is provided "AS IS", and you, 22 | its user, assume the entire risk as to its quality and accuracy. 23 | 24 | This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. 25 | All Rights Reserved except as specified below. 26 | 27 | Permission is hereby granted to use, copy, modify, and distribute this 28 | software (or portions thereof) for any purpose, without fee, subject to these 29 | conditions: 30 | (1) If any part of the source code for this software is distributed, then this 31 | README file must be included, with this copyright and no-warranty notice 32 | unaltered; and any additions, deletions, or changes to the original files 33 | must be clearly indicated in accompanying documentation. 34 | (2) If only executable code is distributed, then the accompanying 35 | documentation must state that "this software is based in part on the work of 36 | the Independent JPEG Group". 37 | (3) Permission for use of this software is granted only if the user accepts 38 | full responsibility for any undesirable consequences; the authors accept 39 | NO LIABILITY for damages of any kind. 40 | 41 | These conditions apply to any software derived from or based on the IJG code, 42 | not just to the unmodified library. If you use our work, you ought to 43 | acknowledge us. 44 | 45 | Permission is NOT granted for the use of any IJG author's name or company name 46 | in advertising or publicity relating to this software or products derived from 47 | it. This software may be referred to only as "the Independent JPEG Group's 48 | software". 49 | 50 | We specifically permit and encourage the use of this software as the basis of 51 | commercial products, provided that all warranty or liability claims are 52 | assumed by the product vendor. 53 | 54 | 55 | The Unix configuration script "configure" was produced with GNU Autoconf. 56 | It is copyright by the Free Software Foundation but is freely distributable. 57 | The same holds for its supporting scripts (config.guess, config.sub, 58 | ltmain.sh). Another support script, install-sh, is copyright by X Consortium 59 | but is also freely distributable. 60 | 61 | The IJG distribution formerly included code to read and write GIF files. 62 | To avoid entanglement with the Unisys LZW patent (now expired), GIF reading 63 | support has been removed altogether, and the GIF writer has been simplified 64 | to produce "uncompressed GIFs". This technique does not use the LZW 65 | algorithm; the resulting GIF files are larger than usual, but are readable 66 | by all standard GIF decoders. 67 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/LICENSE.tiff.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 1988-1997 Sam Leffler 6 | Copyright (c) 1991-1997 Silicon Graphics, Inc. 7 | 8 | Permission to use, copy, modify, distribute, and sell this software and 9 | its documentation for any purpose is hereby granted without fee, provided 10 | that (i) the above copyright notices and this permission notice appear in 11 | all copies of the software and related documentation, and (ii) the names of 12 | Sam Leffler and Silicon Graphics may not be used in any advertising or 13 | publicity relating to the software without the specific, prior written 14 | permission of Sam Leffler and Silicon Graphics. 15 | 16 | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 18 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 19 | 20 | IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 21 | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 22 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 23 | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 24 | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 25 | OF THIS SOFTWARE. 26 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/LICENSE.webp.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 2010, Google Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are 9 | met: 10 | 11 | * Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | * Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in 16 | the documentation and/or other materials provided with the 17 | distribution. 18 | 19 | * Neither the name of Google nor the names of its contributors may 20 | be used to endorse or promote products derived from this software 21 | without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2017 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | 33 | If you redistribute modified sources, we would appreciate that you include in 34 | the file ChangeLog history information documenting your changes. Please read 35 | the FAQ for more information on the distribution of modified source versions. 36 | -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/SDL2_image.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/SDL2_image.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/SDL2_image.lib -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/libjpeg-9.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/libpng16-16.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/libtiff-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/libtiff-5.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/libwebp-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/libwebp-7.dll -------------------------------------------------------------------------------- /SDL2_image-2.0.3/lib/x86/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image-2.0.3/lib/x86/zlib1.dll -------------------------------------------------------------------------------- /SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image.dll -------------------------------------------------------------------------------- /SDL2_image.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_image.lib -------------------------------------------------------------------------------- /SDL2_rotozoom.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | SDL2_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces 4 | 5 | Copyright (C) 2001-2012 Andreas Schiffler 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 23 | 3. This notice may not be removed or altered from any source 24 | distribution. 25 | 26 | Andreas Schiffler -- aschiffler at ferzkopp dot net 27 | 28 | */ 29 | 30 | #ifndef _SDL2_rotozoom_h 31 | #define _SDL2_rotozoom_h 32 | 33 | #include 34 | 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | #ifndef M_PI 41 | #define M_PI 3.1415926535897932384626433832795 42 | #endif 43 | 44 | #include "SDL.h" 45 | 46 | /* ---- Defines */ 47 | 48 | /*! 49 | \brief Disable anti-aliasing (no smoothing). 50 | */ 51 | #define SMOOTHING_OFF 0 52 | 53 | /*! 54 | \brief Enable anti-aliasing (smoothing). 55 | */ 56 | #define SMOOTHING_ON 1 57 | 58 | /* ---- Function Prototypes */ 59 | 60 | #ifdef _MSC_VER 61 | # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT) 62 | # define SDL2_ROTOZOOM_SCOPE __declspec(dllexport) 63 | # else 64 | # ifdef LIBSDL2_GFX_DLL_IMPORT 65 | # define SDL2_ROTOZOOM_SCOPE __declspec(dllimport) 66 | # endif 67 | # endif 68 | #endif 69 | #ifndef SDL2_ROTOZOOM_SCOPE 70 | # define SDL2_ROTOZOOM_SCOPE extern 71 | #endif 72 | 73 | /* 74 | 75 | Rotozoom functions 76 | 77 | */ 78 | 79 | SDL2_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth); 80 | 81 | SDL2_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurfaceXY 82 | (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth); 83 | 84 | 85 | SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, 86 | int *dstheight); 87 | 88 | SDL2_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY 89 | (int width, int height, double angle, double zoomx, double zoomy, 90 | int *dstwidth, int *dstheight); 91 | 92 | /* 93 | 94 | Zooming functions 95 | 96 | */ 97 | 98 | SDL2_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth); 99 | 100 | SDL2_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight); 101 | 102 | /* 103 | 104 | Shrinking functions 105 | 106 | */ 107 | 108 | SDL2_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory); 109 | 110 | /* 111 | 112 | Specialized rotation functions 113 | 114 | */ 115 | 116 | SDL2_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns); 117 | 118 | /* Ends C function definitions when using C++ */ 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | 123 | #endif /* _SDL2_rotozoom_h */ 124 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 2.0.14: 2 | Ryan Gordon - Fri Jan 29 12:53:29 PST 2016 3 | * Deprecated TTF_GetFontKerningSize() which takes font glyph indices and added TTF_GetFontKerningSizeGlyphs() which takes characters 4 | 5 | 2.0.13: 6 | Sylvain - Sat Jun 28 11:42:42 2014 7 | * Fixed bug rendering text starting with a glyph with negative starting offset 8 | beuc - Sun Jun 15 18:27:28 2014 9 | * Fixed regression loading non-scalable fonts 10 | Sam Lantinga - Sun Jun 15 18:21:04 PDT 2014 11 | * TTF_GetFontKerningSize() gets kerning between two characters, not two glyph indices 12 | David Ludwig - Sun Apr 13 22:28:26 2014 13 | * Added support for building for Windows RT and Windows Phone 14 | 15 | 2.0.12: 16 | Sam Lantinga - Sat Jun 1 19:11:26 PDT 2013 17 | * Updated for SDL 2.0 release 18 | 19 | 2.0.11: 20 | Sam Lantinga - Sat Dec 31 10:49:42 EST 2011 21 | * SDL_ttf is now under the zlib license 22 | Peter Kosyh - Mon Feb 28 14:57:03 PST 2011 23 | * Improved font glyph caching for non-latin languages 24 | Erik Snoek - Wed Jan 12 09:10:15 PST 2011 25 | * Added API to get kerning info: TTF_GetFontKerningSize() 26 | Sam Lantinga - Mon Jan 10 10:58:34 2011 -0800 27 | * Added Android.mk to build on the Android platform 28 | 29 | 2.0.10: 30 | Adam Strzelecki - Wed Oct 21 21:02:37 PDT 2009 31 | * Find the Unicode or symbol character map if it's available in the font 32 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/COPYING.txt: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts 3 | Copyright (C) 1997-2016 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 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/README.txt: -------------------------------------------------------------------------------- 1 | 2 | This library is a wrapper around the excellent FreeType 2.0 library, 3 | available at: 4 | http://www.freetype.org/ 5 | 6 | This library allows you to use TrueType fonts to render text in SDL 7 | applications. 8 | 9 | To make the library, first install the FreeType library, then type 10 | './configure' then 'make' to build the SDL truetype library and the 11 | showfont and glfont example applications. 12 | 13 | Be careful when including fonts with your application, as many of them 14 | are copyrighted. The Microsoft fonts, for example, are not freely 15 | redistributable and even the free "web" fonts they provide are only 16 | redistributable in their special executable installer form (May 1998). 17 | There are plenty of freeware and shareware fonts available on the Internet 18 | though, and may suit your purposes. 19 | 20 | This library is under the zlib license, see the file "COPYING.txt" for details. 21 | 22 | Portions of this software are copyright © 2013 The FreeType Project (www.freetype.org). All rights reserved. 23 | 24 | Enjoy! 25 | -Sam Lantinga (6/20/2001) 26 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/LICENSE.freetype.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x64/LICENSE.freetype.txt -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_ttf can be found here: 2 | http://www.libsdl.org/projects/SDL_ttf/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x64/SDL2_ttf.dll -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/SDL2_ttf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x64/SDL2_ttf.lib -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/libfreetype-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x64/libfreetype-6.dll -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x64/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x64/zlib1.dll -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/LICENSE.freetype.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x86/LICENSE.freetype.txt -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_ttf can be found here: 2 | http://www.libsdl.org/projects/SDL_ttf/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x86/SDL2_ttf.dll -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/SDL2_ttf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x86/SDL2_ttf.lib -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/libfreetype-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x86/libfreetype-6.dll -------------------------------------------------------------------------------- /SDL2_ttf-2.0.14/lib/x86/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf-2.0.14/lib/x86/zlib1.dll -------------------------------------------------------------------------------- /SDL2_ttf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2_ttf.lib -------------------------------------------------------------------------------- /SDL2main.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/SDL2main.lib -------------------------------------------------------------------------------- /Tile.cpp: -------------------------------------------------------------------------------- 1 | #include "tile.h" 2 | -------------------------------------------------------------------------------- /Tile.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum class tile_type 4 | { 5 | air = 0, dirt = 1, stone = 2 6 | }; -------------------------------------------------------------------------------- /Utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | //----------------------------------------------------------------------------- 4 | int random_int(int min, int max) 5 | { 6 | int range = max - min + 1; 7 | return (rand() % range) + min; 8 | } 9 | 10 | template 11 | T random_between(const T & min, const T & max) 12 | { 13 | return (max - min) * ((T)rand() / (T)RAND_MAX) + min; 14 | } 15 | 16 | long sq_distance(const Tpoint & a, const Tpoint & b) 17 | { 18 | return (long)((a.m_x - b.m_x) * (long)(a.m_x - b.m_x)) 19 | + (long)((a.m_y - b.m_y) * (long)(a.m_y - b.m_y)); 20 | } 21 | long long sq_distance(const Tpoint & a, const Tpoint & b) 22 | { 23 | return (long)((a.m_x - b.m_x) * (long)(a.m_x - b.m_x)) 24 | + (long)((a.m_y - b.m_y) * (long)(a.m_y - b.m_y)); 25 | } 26 | double sq_distance(const Tpoint & a, const Tpoint & b) 27 | { 28 | return (double)((a.m_x - b.m_x) * (double)(a.m_x - b.m_x)) 29 | + (double)((a.m_y - b.m_y) * (double)(a.m_y - b.m_y)); 30 | } 31 | double sq_distance(const Tpoint & a, const Tpoint & b) 32 | { 33 | return (double)((a.m_x - b.m_x) * (double)(a.m_x - b.m_x)) 34 | + (double)((a.m_y - b.m_y) * (double)(a.m_y - b.m_y)); 35 | } 36 | 37 | 38 | //----------------------------------------------------------------------------- 39 | //----------------------------------------------------------------------------- 40 | bool equal(double a, double b) 41 | { 42 | double epsilon = 1e-5; 43 | return (std::abs(a - b) < epsilon) ? true : false; 44 | } 45 | std::vector rgb_to_hsv(const Color & c) 46 | { 47 | double r = c.GetR(); 48 | double g = c.GetG(); 49 | double b = c.GetB(); 50 | 51 | double h, s, v = std::max({ r,g,b }); 52 | 53 | double diff = v - std::min({ r,g,b }); 54 | 55 | if (equal(diff, 0)) 56 | h = s = 0; 57 | else 58 | { 59 | double rr = (v - r) / 6 / diff + 1 / 2.0; 60 | double gg = (v - g) / 6 / diff + 1 / 2.0; 61 | double bb = (v - b) / 6 / diff + 1 / 2.0; 62 | 63 | s = diff / v; 64 | if (equal(r, v)) 65 | { 66 | h = bb - gg; 67 | } 68 | else if (equal(g, v)) 69 | { 70 | h = (1 / 3.0) + rr - bb; 71 | } 72 | else if (equal(b, v)) 73 | { 74 | h = (2 / 3.0) + gg - rr; 75 | } 76 | if (h < 0) 77 | { 78 | h += 1.0; 79 | } 80 | else if (h > 1) 81 | { 82 | h -= 1.0; 83 | } 84 | } 85 | //if (v * 100.0 >= 100) 86 | v = 1.0; 87 | 88 | return std::vector({ std::round(h * 360), std::round(s * 100), std::round(v * 100) }); 89 | } 90 | 91 | Color hsv_to_rgb(const std::vector & hsv) 92 | { 93 | double r, g, b; 94 | 95 | double h = std::round(hsv[0]); 96 | double s = std::round(hsv[1] * 255 / 100); 97 | double v = std::round(hsv[2] * 255 / 100); 98 | if (equal(s, 0)) 99 | { 100 | r = v; 101 | g = v; 102 | b = v; 103 | } 104 | else 105 | { 106 | double t1 = v; 107 | double t2 = (255 - s) * v / 255.0; 108 | double t3 = (t1 - t2) * ((int)h % 60) / 60.0; 109 | if (equal(h, 360)) h = 0.0; 110 | if (h < 60) { r = t1; b = t2; g = t2 + t3; } 111 | else if (h < 120) { g = t1; b = t2; r = t1 - t3; } 112 | else if (h < 180) { g = t1; r = t2; b = t2 + t3; } 113 | else if (h < 240) { b = t1; r = t2; g = t1 - t3; } 114 | else if (h < 300) { b = t1; g = t2; r = t2 + t3; } 115 | else if (h < 360) { r = t1; g = t2; b = t1 - t3; } 116 | else { r = g = b = 0; } 117 | } 118 | return Colors::MakeRGB((unsigned int)std::round(r), (unsigned int)std::round(g), (unsigned int)std::round(b)); 119 | } 120 | 121 | Color interpolation(const Color & a, const Color & b, double factor) 122 | { 123 | std::vector hsvA = rgb_to_hsv(a); 124 | std::vector hsvB = rgb_to_hsv(b); 125 | std::vector hsvcomb = 126 | { 127 | (hsvA[0] * (1 - factor) + hsvB[0] * factor), 128 | (hsvA[1] * (1 - factor) + hsvB[1] * factor), 129 | (hsvA[2] * (1 - factor) + hsvB[2] * factor) 130 | }; 131 | return hsv_to_rgb(hsvcomb); 132 | } 133 | 134 | std::vector generate_colors(const Color & start, const Color & end, int number_of_colors) 135 | { 136 | std::vector res; 137 | for (int i = 0; i < number_of_colors; i++) 138 | { 139 | Color rgb = interpolation(start, end, (double)i / (std::max(number_of_colors, 2) - 1)); 140 | res.push_back(rgb); 141 | } 142 | return res; 143 | } 144 | //----------------------------------------------------------------------------- 145 | -------------------------------------------------------------------------------- /libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/libjpeg-9.dll -------------------------------------------------------------------------------- /libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/libpng16-16.dll -------------------------------------------------------------------------------- /libtiff-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/libtiff-5.dll -------------------------------------------------------------------------------- /libwebp-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/libwebp-7.dll -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "Utils.h" 5 | #undef main 6 | 7 | #pragma comment (lib, "SDL2.lib") 8 | #pragma comment (lib, "SDL2main.lib") 9 | #pragma comment (lib, "SDL2_image.lib") 10 | 11 | #include "Game.h" 12 | 13 | int main(void) 14 | { 15 | Game TheGame; 16 | while (TheGame.IsRunning() == true) 17 | { 18 | TheGame.Go(); 19 | } 20 | 21 | IMG_Quit(); 22 | SDL_Quit(); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /minijario.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/minijario.spr -------------------------------------------------------------------------------- /olcfont_consolas.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/olcfont_consolas.bmp -------------------------------------------------------------------------------- /x64/Debug/Assets/Character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/Assets/Character.png -------------------------------------------------------------------------------- /x64/Debug/Assets/Fonts/Bunch Blossoms.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/Assets/Fonts/Bunch Blossoms.ttf -------------------------------------------------------------------------------- /x64/Debug/Assets/Main Character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/Assets/Main Character.png -------------------------------------------------------------------------------- /x64/Debug/Assets/grass tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/Assets/grass tile sheet.png -------------------------------------------------------------------------------- /x64/Debug/Assets/stone tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/Assets/stone tile sheet.png -------------------------------------------------------------------------------- /x64/Debug/GameSDL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.exe -------------------------------------------------------------------------------- /x64/Debug/GameSDL.exe.recipe: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | C:\Users\janch\OneDrive\Plocha\C++stuff\GameSDL\GameSDL\x64\Debug\GameSDL.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/GameSDL.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: 2 | Debug|x64|C:\Users\janch\OneDrive\Plocha\C++stuff\GameSDL\GameSDL\| 3 | -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/GameSDL.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /x64/Debug/GameSDL.vcxproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\janch\Desktop\C++stuff\GameSDL\GameSDL\x64\Debug\GameSDL.exe 2 | C:\Users\janch\Desktop\C++stuff\GameSDL\GameSDL\x64\Debug\GameSDL.pdb 3 | C:\Users\janch\OneDrive\Plocha\C++stuff\GameSDL\GameSDL\x64\Debug\GameSDL.exe 4 | C:\Users\Eliška\Desktop\Honzik\GameSDL-master\x64\Debug\GameSDL.exe 5 | -------------------------------------------------------------------------------- /x64/Debug/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/SDL2.dll -------------------------------------------------------------------------------- /x64/Debug/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/SDL2_image.dll -------------------------------------------------------------------------------- /x64/Debug/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/SDL2_ttf.dll -------------------------------------------------------------------------------- /x64/Debug/libfreetype-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/libfreetype-6.dll -------------------------------------------------------------------------------- /x64/Debug/libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/libjpeg-9.dll -------------------------------------------------------------------------------- /x64/Debug/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/libpng16-16.dll -------------------------------------------------------------------------------- /x64/Debug/libtiff-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/libtiff-5.dll -------------------------------------------------------------------------------- /x64/Debug/libwebp-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/libwebp-7.dll -------------------------------------------------------------------------------- /x64/Debug/vc141.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/vc141.idb -------------------------------------------------------------------------------- /x64/Debug/vc142.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/vc142.idb -------------------------------------------------------------------------------- /x64/Debug/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Debug/zlib1.dll -------------------------------------------------------------------------------- /x64/Release/Assets/Character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/Assets/Character.png -------------------------------------------------------------------------------- /x64/Release/Assets/Fonts/Bunch Blossoms.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/Assets/Fonts/Bunch Blossoms.ttf -------------------------------------------------------------------------------- /x64/Release/Assets/Main Character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/Assets/Main Character.png -------------------------------------------------------------------------------- /x64/Release/Assets/grass tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/Assets/grass tile sheet.png -------------------------------------------------------------------------------- /x64/Release/Assets/stone tile sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/Assets/stone tile sheet.png -------------------------------------------------------------------------------- /x64/Release/GameSDL.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.exe -------------------------------------------------------------------------------- /x64/Release/GameSDL.exe.lastcodeanalysissucceeded: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.exe.lastcodeanalysissucceeded -------------------------------------------------------------------------------- /x64/Release/GameSDL.iobj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.iobj -------------------------------------------------------------------------------- /x64/Release/GameSDL.ipdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.ipdb -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/GameSDL.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0 2 | Release|x64|C:\Users\janch\Desktop\C++stuff\GameSDL\GameSDL\| 3 | -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/GameSDL.write.1u.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/GameSDL.write.1u.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/link.delete.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/link.delete.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /x64/Release/GameSDL.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/GameSDL.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /x64/Release/NativeCodeAnalysis.read.1.tlog: -------------------------------------------------------------------------------- 1 | C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\TEAM TOOLS\STATIC ANALYSIS TOOLS\\RULE SETS\NATIVERECOMMENDEDRULES.RULESET 2 | -------------------------------------------------------------------------------- /x64/Release/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/SDL2.dll -------------------------------------------------------------------------------- /x64/Release/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/SDL2_image.dll -------------------------------------------------------------------------------- /x64/Release/SDL2_ttf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/SDL2_ttf.dll -------------------------------------------------------------------------------- /x64/Release/libfreetype-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/libfreetype-6.dll -------------------------------------------------------------------------------- /x64/Release/libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/libjpeg-9.dll -------------------------------------------------------------------------------- /x64/Release/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/libpng16-16.dll -------------------------------------------------------------------------------- /x64/Release/libtiff-5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/libtiff-5.dll -------------------------------------------------------------------------------- /x64/Release/libwebp-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/libwebp-7.dll -------------------------------------------------------------------------------- /x64/Release/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/x64/Release/zlib1.dll -------------------------------------------------------------------------------- /zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chrajdal/GameSDL/14b290742bad77e3b53a41ae577abeb21409ec56/zlib1.dll --------------------------------------------------------------------------------