├── .clang-format ├── .gitattributes ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── common ├── CCommandLine.cpp ├── CCommandLine.h ├── ICommandLine.h ├── winheaders.h ├── winsani_in.h └── winsani_out.h ├── external ├── ImGUI │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_impl_opengl2.cpp │ ├── imgui_impl_opengl2.h │ ├── imgui_impl_sdl.cpp │ ├── imgui_impl_sdl.h │ ├── imgui_internal.h │ ├── imgui_tables.cpp │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ └── imstb_truetype.h ├── MinHook │ ├── MinHook.h │ ├── buffer.c │ ├── buffer.h │ ├── hde │ │ ├── hde32.c │ │ ├── hde32.h │ │ ├── hde64.c │ │ ├── hde64.h │ │ ├── pstdint.h │ │ ├── table32.h │ │ └── table64.h │ ├── hook.c │ ├── trampoline.c │ └── trampoline.h ├── SDL2 │ ├── SDL.h │ ├── SDL2.lib │ ├── SDL_assert.h │ ├── SDL_atomic.h │ ├── SDL_audio.h │ ├── SDL_bits.h │ ├── SDL_blendmode.h │ ├── SDL_clipboard.h │ ├── SDL_config.h │ ├── SDL_config_android.h │ ├── SDL_config_iphoneos.h │ ├── SDL_config_macosx.h │ ├── SDL_config_minimal.h │ ├── SDL_config_nintendods.h │ ├── SDL_config_pandora.h │ ├── SDL_config_windows.h │ ├── SDL_config_wiz.h │ ├── SDL_copying.h │ ├── SDL_cpuinfo.h │ ├── SDL_endian.h │ ├── SDL_error.h │ ├── SDL_events.h │ ├── SDL_gamecontroller.h │ ├── SDL_gesture.h │ ├── SDL_haptic.h │ ├── SDL_hints.h │ ├── SDL_input.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_opengles.h │ ├── SDL_opengles2.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_random.h │ ├── SDL_thread.h │ ├── SDL_timer.h │ ├── SDL_touch.h │ ├── SDL_types.h │ ├── SDL_version.h │ ├── SDL_video.h │ ├── begin_code.h │ ├── close_code.h │ └── merge_sdl2.sh ├── SPTLib │ ├── DetoursUtils.cpp │ ├── DetoursUtils.hpp │ ├── MemUtils.h │ ├── Utils.hpp │ ├── patterns.hpp │ ├── patterns_macros.hpp │ └── sptlib-stdafx.hpp └── avikit │ ├── include │ └── avikit.h │ └── lib │ └── avikit.lib ├── launcher ├── goldsrc_hook.cpp ├── goldsrc_hook.h ├── goldsrc_patterns.hpp ├── hl.aps ├── hl.ico ├── hl.rc ├── imgui_manager.cpp ├── imgui_manager.hpp ├── launcher.cpp ├── launcher.vcxproj ├── launcher.vcxproj.filters ├── launcher.vcxproj.user ├── plugins_loader.cpp ├── plugins_loader.hpp └── resource.h ├── projects └── projects.sln └── public ├── FileSystem.h ├── FileSystem_Helpers.cpp ├── FileSystem_Helpers.h ├── IRegistry.h ├── archtypes.h ├── engine_launcher_api.h ├── interface.cpp ├── interface.h ├── registry.cpp ├── registry.h ├── steam ├── friends │ └── IFriendsUser.h ├── isteamapps.h ├── isteamclient.h ├── isteamcontroller.h ├── isteamfriends.h ├── isteamgameserver.h ├── isteamgameserverstats.h ├── isteamhttp.h ├── isteammatchmaking.h ├── isteamnetworking.h ├── isteamremotestorage.h ├── isteamscreenshots.h ├── isteamunifiedmessages.h ├── isteamuser.h ├── isteamuserstats.h ├── isteamutils.h ├── matchmakingtypes.h ├── steam2compat.h ├── steam_api.h ├── steam_gameserver.h ├── steamclientpublic.h ├── steamhttpenums.h └── steamtypes.h ├── tier0 ├── MinMax.h ├── afxmem_override.cpp ├── annotations.h ├── basetypes.h ├── commonmacros.h ├── dbg.h ├── dbgflag.h ├── eventmasks.h ├── eventmodes.h ├── fasttimer.h ├── ia32detect.h ├── icommandline.h ├── ioctlcodes.h ├── k8performancecounters.h ├── l2cache.h ├── mem.h ├── memalloc.h ├── memdbgoff.h ├── memdbgon.h ├── memoverride-vc7.cpp ├── memoverride.cpp ├── minidump.h ├── p4performancecounters.h ├── p5p6performancecounters.h ├── platform.h ├── pmelib.h ├── protected_things.h ├── testthread.h ├── threadtools.h ├── tslist.h ├── validator.h ├── valobject.h ├── valve_minmax_off.h ├── valve_minmax_on.h ├── valve_off.h ├── valve_on.h ├── vcr_shared.h ├── vcrmode.h ├── vprof.h ├── wchartypes.h └── xbox_codeline_defines.h └── winlite.h /.clang-format: -------------------------------------------------------------------------------- 1 | # Visual Studio generated .clang-format file 2 | 3 | # The style options in this file are a best effort attempt to replicate the 4 | # current IDE formatting configuration from Tools > Options. 5 | 6 | AccessModifierOffset: -4 7 | AlignAfterOpenBracket: DontAlign 8 | AllowShortBlocksOnASingleLine: true 9 | AllowShortCaseLabelsOnASingleLine: true 10 | AllowShortFunctionsOnASingleLine: All 11 | BasedOnStyle: LLVM 12 | BraceWrapping: 13 | BeforeLambdaBody: true 14 | AfterCaseLabel: true 15 | AfterClass: true 16 | AfterControlStatement: true 17 | AfterEnum: true 18 | AfterFunction: true 19 | AfterNamespace: true 20 | AfterStruct: true 21 | AfterUnion: true 22 | BeforeCatch: true 23 | BeforeElse: true 24 | IndentBraces: false 25 | SplitEmptyFunction: true 26 | SplitEmptyRecord: true 27 | BreakBeforeBraces: Custom 28 | ColumnLimit: 0 29 | Cpp11BracedListStyle: true 30 | FixNamespaceComments: false 31 | IndentCaseLabels: false 32 | IndentPPDirectives: None 33 | IndentWidth: 4 34 | MaxEmptyLinesToKeep: 10 35 | NamespaceIndentation: None 36 | PointerAlignment: Left 37 | SortIncludes: false 38 | SortUsingDeclarations: false 39 | SpaceAfterCStyleCast: false 40 | SpaceBeforeAssignmentOperators: true 41 | SpaceBeforeCaseColon: false 42 | SpaceBeforeCtorInitializerColon: false 43 | SpaceBeforeInheritanceColon: false 44 | SpaceBeforeParens: ControlStatements 45 | SpaceBeforeSquareBrackets: false 46 | SpaceInEmptyParentheses: false 47 | SpacesInCStyleCastParentheses: false 48 | SpacesInParentheses: false 49 | SpacesInSquareBrackets: false 50 | TabWidth: 4 51 | UseTab: true 52 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | pull_request: 6 | workflow_dispatch: 7 | schedule: 8 | - cron: '0 0 1 * *' # Monthly 9 | 10 | 11 | jobs: 12 | build: 13 | runs-on: windows-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2.3.4 17 | - name: Add MSBuild to PATH 18 | uses: microsoft/setup-msbuild@v1.0.3 19 | - name: Build 20 | run: | 21 | MSBuild.exe launcher/launcher.vcxproj /p:Configuration=Release 22 | MSBuild.exe launcher/launcher.vcxproj /p:Configuration=Debug 23 | - name: Move builded EXE into specific directory 24 | run: | 25 | mkdir compiled 26 | mv launcher/Release/hl.exe ./compiled 27 | mv launcher/Debug/hl.exe ./compiled/hl_debug.exe 28 | - name: Deploy 29 | uses: actions/upload-artifact@v2.2.4 30 | with: 31 | name: hl_launcher 32 | path: compiled -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.obj 2 | *.pdb 3 | 4 | /.vs 5 | /projects/.vs 6 | /launcher/.vs 7 | /launcher/Debug 8 | /launcher/Release 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GoldSrc Launcher 2 | 3 | Improved GoldSrc-compatible launcher. Taken from [GoldSrcRebuild](https://github.com/Triang3l/GoldSourceRebuild) and modified as a project for VS2019 without CMake. Only x86 Debug/Release build. 4 | 5 | New features / parameters: 6 | - `-low` - sets low priority for hl.exe 7 | - `-high` - sets high priority for hl.exe 8 | - `-textmode` - currently allocates console 9 | - Debug build doesn't unlink DLLs and create mutex. 10 | - Now stencil buffer is enabled and available for stencil shadows implementation! 11 | - OpenGL context version - 2 12 | - ImGUI integration 13 | 14 | In the future: 15 | - Plugin system 16 | - Asynchronous startup 17 | - AVI playback (WON feature) 18 | 19 | Half Life 1 SDK LICENSE 20 | ====================== 21 | 22 | Half Life 1 SDK Copyright© Valve Corp. 23 | 24 | THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE READ IT BEFORE DOWNLOADING OR USING THE HALF LIFE 1 SDK (“SDK”). BY DOWNLOADING AND/OR USING THE SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON’T DOWNLOAD OR USE THE SDK. 25 | 26 | You may, free of charge, download and use the SDK to develop a modified Valve game running on the Half-Life engine. You may distribute your modified Valve game in source and object code form, but only for free. Terms of use for Valve games are found in the Steam Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ 27 | 28 | You may copy, modify, and distribute the SDK and any modifications you make to the SDK in source and object code form, but only for free. Any distribution of this SDK must include this license.txt and third_party_licenses.txt. 29 | 30 | Any distribution of the SDK or a substantial portion of the SDK must include the above copyright notice and the following: 31 | 32 | DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED “AS IS”. VALVE AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE. 33 | 34 | LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 35 | 36 | If you would like to use the SDK for a commercial purpose, please contact Valve at sourceengine@valvesoftware.com. 37 | -------------------------------------------------------------------------------- /common/CCommandLine.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_CCOMMANDLINE_H 2 | #define COMMON_CCOMMANDLINE_H 3 | 4 | #include "ICommandLine.h" 5 | 6 | class CCommandLine final : public ICommandLine 7 | { 8 | public: 9 | CCommandLine(); 10 | ~CCommandLine(); 11 | 12 | void CreateCmdLine( const char* commandline ) override; 13 | void CreateCmdLine( int argc, const char** argv ) override; 14 | 15 | char* GetCmdLine() override; 16 | 17 | char* CheckParm( const char* psz, char** ppszValue ) override; 18 | 19 | void RemoveParm( const char* pszParm ) override; 20 | void AppendParm( const char* pszParm, const char* pszValues ) override; 21 | 22 | void SetParm( const char* pszParm, const char* pszValues )override; 23 | void SetParm( const char* pszParm, int iValue ) override; 24 | 25 | private: 26 | char* m_pszCmdLine = nullptr; 27 | }; 28 | 29 | #endif //COMMON_CCOMMANDLINE_H 30 | -------------------------------------------------------------------------------- /common/ICommandLine.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_ICOMMANDLINE_H 2 | #define COMMON_ICOMMANDLINE_H 3 | 4 | /** 5 | * Stores off the command line and allows modification. 6 | */ 7 | class ICommandLine 8 | { 9 | public: 10 | virtual void CreateCmdLine( const char* commandline ) = 0; 11 | virtual void CreateCmdLine( int argc, const char** argv ) = 0; 12 | 13 | virtual char* GetCmdLine() = 0; 14 | 15 | virtual char* CheckParm( const char* psz, char** ppszValue ) = 0; 16 | 17 | virtual void RemoveParm( const char* pszParm ) = 0; 18 | virtual void AppendParm( const char* pszParm, const char* pszValues ) = 0; 19 | 20 | virtual void SetParm( const char* pszParm, const char* pszValues ) = 0; 21 | virtual void SetParm( const char* pszParm, int iValue ) = 0; 22 | }; 23 | 24 | /** 25 | * Global command line instance. 26 | */ 27 | extern ICommandLine* cmdline; 28 | 29 | #endif //COMMON_ICOMMANDLINE_H 30 | -------------------------------------------------------------------------------- /common/winheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_WINHEADERS_H 2 | #define COMMON_WINHEADERS_H 3 | 4 | /** 5 | * @file 6 | * 7 | * Header that includes the base Windows headers 8 | */ 9 | 10 | #ifdef WIN32 11 | #include "winsani_in.h" 12 | #include "../public/winlite.h" 13 | #include "winsani_out.h" 14 | 15 | #undef GetCurrentTime 16 | #endif 17 | 18 | #endif //COMMON_WINHEADERS_H -------------------------------------------------------------------------------- /common/winsani_in.h: -------------------------------------------------------------------------------- 1 | #if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) 2 | #pragma push_macro("ARRAYSIZE") 3 | #ifdef ARRAYSIZE 4 | #undef ARRAYSIZE 5 | #endif 6 | #define HSPRITE WINDOWS_HSPRITE 7 | #endif 8 | -------------------------------------------------------------------------------- /common/winsani_out.h: -------------------------------------------------------------------------------- 1 | #if _MSC_VER >= 1500 // MSVC++ 9.0 (Visual Studio 2008) 2 | #undef HSPRITE 3 | #pragma pop_macro("ARRAYSIZE") 4 | #endif 5 | -------------------------------------------------------------------------------- /external/ImGUI/imgui_impl_opengl2.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for OpenGL2 (legacy OpenGL, fixed pipeline) 2 | // This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID! 6 | 7 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 8 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 9 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 10 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 11 | 12 | // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** 13 | // **Prefer using the code in imgui_impl_opengl3.cpp** 14 | // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read. 15 | // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more 16 | // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might 17 | // confuse your GPU driver. 18 | // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API. 19 | 20 | #pragma once 21 | #include "imgui.h" // IMGUI_IMPL_API 22 | 23 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init(); 24 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown(); 25 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame(); 26 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data); 27 | 28 | // Called by Init/NewFrame/Shutdown 29 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture(); 30 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture(); 31 | IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects(); 32 | IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(); 33 | -------------------------------------------------------------------------------- /external/ImGUI/imgui_impl_sdl.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Backend for SDL2 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Clipboard support. 7 | // [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy SDL_SCANCODE_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set] 8 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 9 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 10 | // Missing features: 11 | // [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME. 12 | 13 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 14 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 15 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 16 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | 21 | struct SDL_Window; 22 | struct SDL_Renderer; 23 | typedef union SDL_Event SDL_Event; 24 | 25 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); 26 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); 27 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window); 28 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window); 29 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer); 30 | IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); 31 | IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(); 32 | IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); 33 | 34 | #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 35 | static inline void ImGui_ImplSDL2_NewFrame(SDL_Window*) { ImGui_ImplSDL2_NewFrame(); } // 1.84: removed unnecessary parameter 36 | #endif 37 | -------------------------------------------------------------------------------- /external/MinHook/buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 20 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #pragma once 30 | 31 | // Size of each memory slot. 32 | #if defined(_M_X64) || defined(__x86_64__) 33 | #define MEMORY_SLOT_SIZE 64 34 | #else 35 | #define MEMORY_SLOT_SIZE 32 36 | #endif 37 | 38 | VOID InitializeBuffer(VOID); 39 | VOID UninitializeBuffer(VOID); 40 | LPVOID AllocateBuffer(LPVOID pOrigin); 41 | VOID FreeBuffer(LPVOID pBuffer); 42 | BOOL IsExecutableAddress(LPVOID pAddress); 43 | -------------------------------------------------------------------------------- /external/MinHook/hde/hde32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 3 | * Copyright (c) 2006-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | * hde32.h: C/C++ header file 7 | * 8 | */ 9 | 10 | #ifndef _HDE32_H_ 11 | #define _HDE32_H_ 12 | 13 | /* stdint.h - C99 standard header 14 | * http://en.wikipedia.org/wiki/stdint.h 15 | * 16 | * if your compiler doesn't contain "stdint.h" header (for 17 | * example, Microsoft Visual C++), you can download file: 18 | * http://www.azillionmonkeys.com/qed/pstdint.h 19 | * and change next line to: 20 | * #include "pstdint.h" 21 | */ 22 | #include "pstdint.h" 23 | 24 | #define F_MODRM 0x00000001 25 | #define F_SIB 0x00000002 26 | #define F_IMM8 0x00000004 27 | #define F_IMM16 0x00000008 28 | #define F_IMM32 0x00000010 29 | #define F_DISP8 0x00000020 30 | #define F_DISP16 0x00000040 31 | #define F_DISP32 0x00000080 32 | #define F_RELATIVE 0x00000100 33 | #define F_2IMM16 0x00000800 34 | #define F_ERROR 0x00001000 35 | #define F_ERROR_OPCODE 0x00002000 36 | #define F_ERROR_LENGTH 0x00004000 37 | #define F_ERROR_LOCK 0x00008000 38 | #define F_ERROR_OPERAND 0x00010000 39 | #define F_PREFIX_REPNZ 0x01000000 40 | #define F_PREFIX_REPX 0x02000000 41 | #define F_PREFIX_REP 0x03000000 42 | #define F_PREFIX_66 0x04000000 43 | #define F_PREFIX_67 0x08000000 44 | #define F_PREFIX_LOCK 0x10000000 45 | #define F_PREFIX_SEG 0x20000000 46 | #define F_PREFIX_ANY 0x3f000000 47 | 48 | #define PREFIX_SEGMENT_CS 0x2e 49 | #define PREFIX_SEGMENT_SS 0x36 50 | #define PREFIX_SEGMENT_DS 0x3e 51 | #define PREFIX_SEGMENT_ES 0x26 52 | #define PREFIX_SEGMENT_FS 0x64 53 | #define PREFIX_SEGMENT_GS 0x65 54 | #define PREFIX_LOCK 0xf0 55 | #define PREFIX_REPNZ 0xf2 56 | #define PREFIX_REPX 0xf3 57 | #define PREFIX_OPERAND_SIZE 0x66 58 | #define PREFIX_ADDRESS_SIZE 0x67 59 | 60 | #pragma pack(push,1) 61 | 62 | typedef struct { 63 | uint8_t len; 64 | uint8_t p_rep; 65 | uint8_t p_lock; 66 | uint8_t p_seg; 67 | uint8_t p_66; 68 | uint8_t p_67; 69 | uint8_t opcode; 70 | uint8_t opcode2; 71 | uint8_t modrm; 72 | uint8_t modrm_mod; 73 | uint8_t modrm_reg; 74 | uint8_t modrm_rm; 75 | uint8_t sib; 76 | uint8_t sib_scale; 77 | uint8_t sib_index; 78 | uint8_t sib_base; 79 | union { 80 | uint8_t imm8; 81 | uint16_t imm16; 82 | uint32_t imm32; 83 | } imm; 84 | union { 85 | uint8_t disp8; 86 | uint16_t disp16; 87 | uint32_t disp32; 88 | } disp; 89 | uint32_t flags; 90 | } hde32s; 91 | 92 | #pragma pack(pop) 93 | 94 | #ifdef __cplusplus 95 | extern "C" { 96 | #endif 97 | 98 | /* __cdecl */ 99 | unsigned int hde32_disasm(const void *code, hde32s *hs); 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* _HDE32_H_ */ -------------------------------------------------------------------------------- /external/MinHook/hde/hde64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 64 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | * hde64.h: C/C++ header file 7 | * 8 | */ 9 | 10 | #ifndef _HDE64_H_ 11 | #define _HDE64_H_ 12 | 13 | /* stdint.h - C99 standard header 14 | * http://en.wikipedia.org/wiki/stdint.h 15 | * 16 | * if your compiler doesn't contain "stdint.h" header (for 17 | * example, Microsoft Visual C++), you can download file: 18 | * http://www.azillionmonkeys.com/qed/pstdint.h 19 | * and change next line to: 20 | * #include "pstdint.h" 21 | */ 22 | #include "pstdint.h" 23 | 24 | #define F_MODRM 0x00000001 25 | #define F_SIB 0x00000002 26 | #define F_IMM8 0x00000004 27 | #define F_IMM16 0x00000008 28 | #define F_IMM32 0x00000010 29 | #define F_IMM64 0x00000020 30 | #define F_DISP8 0x00000040 31 | #define F_DISP16 0x00000080 32 | #define F_DISP32 0x00000100 33 | #define F_RELATIVE 0x00000200 34 | #define F_ERROR 0x00001000 35 | #define F_ERROR_OPCODE 0x00002000 36 | #define F_ERROR_LENGTH 0x00004000 37 | #define F_ERROR_LOCK 0x00008000 38 | #define F_ERROR_OPERAND 0x00010000 39 | #define F_PREFIX_REPNZ 0x01000000 40 | #define F_PREFIX_REPX 0x02000000 41 | #define F_PREFIX_REP 0x03000000 42 | #define F_PREFIX_66 0x04000000 43 | #define F_PREFIX_67 0x08000000 44 | #define F_PREFIX_LOCK 0x10000000 45 | #define F_PREFIX_SEG 0x20000000 46 | #define F_PREFIX_REX 0x40000000 47 | #define F_PREFIX_ANY 0x7f000000 48 | 49 | #define PREFIX_SEGMENT_CS 0x2e 50 | #define PREFIX_SEGMENT_SS 0x36 51 | #define PREFIX_SEGMENT_DS 0x3e 52 | #define PREFIX_SEGMENT_ES 0x26 53 | #define PREFIX_SEGMENT_FS 0x64 54 | #define PREFIX_SEGMENT_GS 0x65 55 | #define PREFIX_LOCK 0xf0 56 | #define PREFIX_REPNZ 0xf2 57 | #define PREFIX_REPX 0xf3 58 | #define PREFIX_OPERAND_SIZE 0x66 59 | #define PREFIX_ADDRESS_SIZE 0x67 60 | 61 | #pragma pack(push,1) 62 | 63 | typedef struct { 64 | uint8_t len; 65 | uint8_t p_rep; 66 | uint8_t p_lock; 67 | uint8_t p_seg; 68 | uint8_t p_66; 69 | uint8_t p_67; 70 | uint8_t rex; 71 | uint8_t rex_w; 72 | uint8_t rex_r; 73 | uint8_t rex_x; 74 | uint8_t rex_b; 75 | uint8_t opcode; 76 | uint8_t opcode2; 77 | uint8_t modrm; 78 | uint8_t modrm_mod; 79 | uint8_t modrm_reg; 80 | uint8_t modrm_rm; 81 | uint8_t sib; 82 | uint8_t sib_scale; 83 | uint8_t sib_index; 84 | uint8_t sib_base; 85 | union { 86 | uint8_t imm8; 87 | uint16_t imm16; 88 | uint32_t imm32; 89 | uint64_t imm64; 90 | } imm; 91 | union { 92 | uint8_t disp8; 93 | uint16_t disp16; 94 | uint32_t disp32; 95 | } disp; 96 | uint32_t flags; 97 | } hde64s; 98 | 99 | #pragma pack(pop) 100 | 101 | #ifdef __cplusplus 102 | extern "C" { 103 | #endif 104 | 105 | /* __cdecl */ 106 | unsigned int hde64_disasm(const void *code, hde64s *hs); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif /* _HDE64_H_ */ -------------------------------------------------------------------------------- /external/MinHook/hde/pstdint.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include 30 | 31 | // Integer types for HDE. 32 | typedef INT8 int8_t; 33 | typedef INT16 int16_t; 34 | typedef INT32 int32_t; 35 | typedef INT64 int64_t; 36 | typedef UINT8 uint8_t; 37 | typedef UINT16 uint16_t; 38 | typedef UINT32 uint32_t; 39 | typedef UINT64 uint64_t; -------------------------------------------------------------------------------- /external/MinHook/hde/table32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 C 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | */ 7 | 8 | #define C_NONE 0x00 9 | #define C_MODRM 0x01 10 | #define C_IMM8 0x02 11 | #define C_IMM16 0x04 12 | #define C_IMM_P66 0x10 13 | #define C_REL8 0x20 14 | #define C_REL32 0x40 15 | #define C_GROUP 0x80 16 | #define C_ERROR 0xff 17 | 18 | #define PRE_ANY 0x00 19 | #define PRE_NONE 0x01 20 | #define PRE_F2 0x02 21 | #define PRE_F3 0x04 22 | #define PRE_66 0x08 23 | #define PRE_67 0x10 24 | #define PRE_LOCK 0x20 25 | #define PRE_SEG 0x40 26 | #define PRE_ALL 0xff 27 | 28 | #define DELTA_OPCODES 0x4a 29 | #define DELTA_FPU_REG 0xf1 30 | #define DELTA_FPU_MODRM 0xf8 31 | #define DELTA_PREFIXES 0x130 32 | #define DELTA_OP_LOCK_OK 0x1a1 33 | #define DELTA_OP2_LOCK_OK 0x1b9 34 | #define DELTA_OP_ONLY_MEM 0x1cb 35 | #define DELTA_OP2_ONLY_MEM 0x1da 36 | 37 | unsigned char hde32_table[] = { 38 | 0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3, 39 | 0xa8,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xac,0xaa,0xb2,0xaa,0x9f,0x9f, 40 | 0x9f,0x9f,0xb5,0xa3,0xa3,0xa4,0xaa,0xaa,0xba,0xaa,0x96,0xaa,0xa8,0xaa,0xc3, 41 | 0xc3,0x96,0x96,0xb7,0xae,0xd6,0xbd,0xa3,0xc5,0xa3,0xa3,0x9f,0xc3,0x9c,0xaa, 42 | 0xaa,0xac,0xaa,0xbf,0x03,0x7f,0x11,0x7f,0x01,0x7f,0x01,0x3f,0x01,0x01,0x90, 43 | 0x82,0x7d,0x97,0x59,0x59,0x59,0x59,0x59,0x7f,0x59,0x59,0x60,0x7d,0x7f,0x7f, 44 | 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x9a,0x88,0x7d, 45 | 0x59,0x50,0x50,0x50,0x50,0x59,0x59,0x59,0x59,0x61,0x94,0x61,0x9e,0x59,0x59, 46 | 0x85,0x59,0x92,0xa3,0x60,0x60,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, 47 | 0x59,0x59,0x9f,0x01,0x03,0x01,0x04,0x03,0xd5,0x03,0xcc,0x01,0xbc,0x03,0xf0, 48 | 0x10,0x10,0x10,0x10,0x50,0x50,0x50,0x50,0x14,0x20,0x20,0x20,0x20,0x01,0x01, 49 | 0x01,0x01,0xc4,0x02,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0xc0,0xc2,0x10,0x11, 50 | 0x02,0x03,0x11,0x03,0x03,0x04,0x00,0x00,0x14,0x00,0x02,0x00,0x00,0xc6,0xc8, 51 | 0x02,0x02,0x02,0x02,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xca, 52 | 0x01,0x01,0x01,0x00,0x06,0x00,0x04,0x00,0xc0,0xc2,0x01,0x01,0x03,0x01,0xff, 53 | 0xff,0x01,0x00,0x03,0xc4,0xc4,0xc6,0x03,0x01,0x01,0x01,0xff,0x03,0x03,0x03, 54 | 0xc8,0x40,0x00,0x0a,0x00,0x04,0x00,0x00,0x00,0x00,0x7f,0x00,0x33,0x01,0x00, 55 | 0x00,0x00,0x00,0x00,0x00,0xff,0xbf,0xff,0xff,0x00,0x00,0x00,0x00,0x07,0x00, 56 | 0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 57 | 0x00,0xff,0xff,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 58 | 0x7f,0x00,0x00,0xff,0x4a,0x4a,0x4a,0x4a,0x4b,0x52,0x4a,0x4a,0x4a,0x4a,0x4f, 59 | 0x4c,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x55,0x45,0x40,0x4a,0x4a,0x4a, 60 | 0x45,0x59,0x4d,0x46,0x4a,0x5d,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, 61 | 0x4a,0x4a,0x4a,0x4a,0x4a,0x61,0x63,0x67,0x4e,0x4a,0x4a,0x6b,0x6d,0x4a,0x4a, 62 | 0x45,0x6d,0x4a,0x4a,0x44,0x45,0x4a,0x4a,0x00,0x00,0x00,0x02,0x0d,0x06,0x06, 63 | 0x06,0x06,0x0e,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x00,0x06,0x06,0x02,0x06, 64 | 0x00,0x0a,0x0a,0x07,0x07,0x06,0x02,0x05,0x05,0x02,0x02,0x00,0x00,0x04,0x04, 65 | 0x04,0x04,0x00,0x00,0x00,0x0e,0x05,0x06,0x06,0x06,0x01,0x06,0x00,0x00,0x08, 66 | 0x00,0x10,0x00,0x18,0x00,0x20,0x00,0x28,0x00,0x30,0x00,0x80,0x01,0x82,0x01, 67 | 0x86,0x00,0xf6,0xcf,0xfe,0x3f,0xab,0x00,0xb0,0x00,0xb1,0x00,0xb3,0x00,0xba, 68 | 0xf8,0xbb,0x00,0xc0,0x00,0xc1,0x00,0xc7,0xbf,0x62,0xff,0x00,0x8d,0xff,0x00, 69 | 0xc4,0xff,0x00,0xc5,0xff,0x00,0xff,0xff,0xeb,0x01,0xff,0x0e,0x12,0x08,0x00, 70 | 0x13,0x09,0x00,0x16,0x08,0x00,0x17,0x09,0x00,0x2b,0x09,0x00,0xae,0xff,0x07, 71 | 0xb2,0xff,0x00,0xb4,0xff,0x00,0xb5,0xff,0x00,0xc3,0x01,0x00,0xc7,0xff,0xbf, 72 | 0xe7,0x08,0x00,0xf0,0x02,0x00 73 | }; -------------------------------------------------------------------------------- /external/MinHook/hde/table64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 64 C 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | */ 7 | 8 | #define C_NONE 0x00 9 | #define C_MODRM 0x01 10 | #define C_IMM8 0x02 11 | #define C_IMM16 0x04 12 | #define C_IMM_P66 0x10 13 | #define C_REL8 0x20 14 | #define C_REL32 0x40 15 | #define C_GROUP 0x80 16 | #define C_ERROR 0xff 17 | 18 | #define PRE_ANY 0x00 19 | #define PRE_NONE 0x01 20 | #define PRE_F2 0x02 21 | #define PRE_F3 0x04 22 | #define PRE_66 0x08 23 | #define PRE_67 0x10 24 | #define PRE_LOCK 0x20 25 | #define PRE_SEG 0x40 26 | #define PRE_ALL 0xff 27 | 28 | #define DELTA_OPCODES 0x4a 29 | #define DELTA_FPU_REG 0xfd 30 | #define DELTA_FPU_MODRM 0x104 31 | #define DELTA_PREFIXES 0x13c 32 | #define DELTA_OP_LOCK_OK 0x1ae 33 | #define DELTA_OP2_LOCK_OK 0x1c6 34 | #define DELTA_OP_ONLY_MEM 0x1d8 35 | #define DELTA_OP2_ONLY_MEM 0x1e7 36 | 37 | unsigned char hde64_table[] = { 38 | 0xa5,0xaa,0xa5,0xb8,0xa5,0xaa,0xa5,0xaa,0xa5,0xb8,0xa5,0xb8,0xa5,0xb8,0xa5, 39 | 0xb8,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xac,0xc0,0xcc,0xc0,0xa1,0xa1, 40 | 0xa1,0xa1,0xb1,0xa5,0xa5,0xa6,0xc0,0xc0,0xd7,0xda,0xe0,0xc0,0xe4,0xc0,0xea, 41 | 0xea,0xe0,0xe0,0x98,0xc8,0xee,0xf1,0xa5,0xd3,0xa5,0xa5,0xa1,0xea,0x9e,0xc0, 42 | 0xc0,0xc2,0xc0,0xe6,0x03,0x7f,0x11,0x7f,0x01,0x7f,0x01,0x3f,0x01,0x01,0xab, 43 | 0x8b,0x90,0x64,0x5b,0x5b,0x5b,0x5b,0x5b,0x92,0x5b,0x5b,0x76,0x90,0x92,0x92, 44 | 0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x6a,0x73,0x90, 45 | 0x5b,0x52,0x52,0x52,0x52,0x5b,0x5b,0x5b,0x5b,0x77,0x7c,0x77,0x85,0x5b,0x5b, 46 | 0x70,0x5b,0x7a,0xaf,0x76,0x76,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b, 47 | 0x5b,0x5b,0x86,0x01,0x03,0x01,0x04,0x03,0xd5,0x03,0xd5,0x03,0xcc,0x01,0xbc, 48 | 0x03,0xf0,0x03,0x03,0x04,0x00,0x50,0x50,0x50,0x50,0xff,0x20,0x20,0x20,0x20, 49 | 0x01,0x01,0x01,0x01,0xc4,0x02,0x10,0xff,0xff,0xff,0x01,0x00,0x03,0x11,0xff, 50 | 0x03,0xc4,0xc6,0xc8,0x02,0x10,0x00,0xff,0xcc,0x01,0x01,0x01,0x00,0x00,0x00, 51 | 0x00,0x01,0x01,0x03,0x01,0xff,0xff,0xc0,0xc2,0x10,0x11,0x02,0x03,0x01,0x01, 52 | 0x01,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0x10, 53 | 0x10,0x10,0x10,0x02,0x10,0x00,0x00,0xc6,0xc8,0x02,0x02,0x02,0x02,0x06,0x00, 54 | 0x04,0x00,0x02,0xff,0x00,0xc0,0xc2,0x01,0x01,0x03,0x03,0x03,0xca,0x40,0x00, 55 | 0x0a,0x00,0x04,0x00,0x00,0x00,0x00,0x7f,0x00,0x33,0x01,0x00,0x00,0x00,0x00, 56 | 0x00,0x00,0xff,0xbf,0xff,0xff,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0xff,0x00, 57 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, 58 | 0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00, 59 | 0xff,0x40,0x40,0x40,0x40,0x41,0x49,0x40,0x40,0x40,0x40,0x4c,0x42,0x40,0x40, 60 | 0x40,0x40,0x40,0x40,0x40,0x40,0x4f,0x44,0x53,0x40,0x40,0x40,0x44,0x57,0x43, 61 | 0x5c,0x40,0x60,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, 62 | 0x40,0x40,0x64,0x66,0x6e,0x6b,0x40,0x40,0x6a,0x46,0x40,0x40,0x44,0x46,0x40, 63 | 0x40,0x5b,0x44,0x40,0x40,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x01,0x06, 64 | 0x06,0x02,0x06,0x06,0x00,0x06,0x00,0x0a,0x0a,0x00,0x00,0x00,0x02,0x07,0x07, 65 | 0x06,0x02,0x0d,0x06,0x06,0x06,0x0e,0x05,0x05,0x02,0x02,0x00,0x00,0x04,0x04, 66 | 0x04,0x04,0x05,0x06,0x06,0x06,0x00,0x00,0x00,0x0e,0x00,0x00,0x08,0x00,0x10, 67 | 0x00,0x18,0x00,0x20,0x00,0x28,0x00,0x30,0x00,0x80,0x01,0x82,0x01,0x86,0x00, 68 | 0xf6,0xcf,0xfe,0x3f,0xab,0x00,0xb0,0x00,0xb1,0x00,0xb3,0x00,0xba,0xf8,0xbb, 69 | 0x00,0xc0,0x00,0xc1,0x00,0xc7,0xbf,0x62,0xff,0x00,0x8d,0xff,0x00,0xc4,0xff, 70 | 0x00,0xc5,0xff,0x00,0xff,0xff,0xeb,0x01,0xff,0x0e,0x12,0x08,0x00,0x13,0x09, 71 | 0x00,0x16,0x08,0x00,0x17,0x09,0x00,0x2b,0x09,0x00,0xae,0xff,0x07,0xb2,0xff, 72 | 0x00,0xb4,0xff,0x00,0xb5,0xff,0x00,0xc3,0x01,0x00,0xc7,0xff,0xbf,0xe7,0x08, 73 | 0x00,0xf0,0x02,0x00 74 | }; -------------------------------------------------------------------------------- /external/MinHook/trampoline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MinHook - The Minimalistic API Hooking Library for x64/x86 3 | * Copyright (C) 2009-2017 Tsuda Kageyu. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 19 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 20 | * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #pragma once 30 | 31 | #pragma pack(push, 1) 32 | 33 | // Structs for writing x86/x64 instructions. 34 | 35 | // 8-bit relative jump. 36 | typedef struct _JMP_REL_SHORT 37 | { 38 | UINT8 opcode; // EB xx: JMP +2+xx 39 | UINT8 operand; 40 | } JMP_REL_SHORT, *PJMP_REL_SHORT; 41 | 42 | // 32-bit direct relative jump/call. 43 | typedef struct _JMP_REL 44 | { 45 | UINT8 opcode; // E9/E8 xxxxxxxx: JMP/CALL +5+xxxxxxxx 46 | UINT32 operand; // Relative destination address 47 | } JMP_REL, *PJMP_REL, CALL_REL; 48 | 49 | // 64-bit indirect absolute jump. 50 | typedef struct _JMP_ABS 51 | { 52 | UINT8 opcode0; // FF25 00000000: JMP [+6] 53 | UINT8 opcode1; 54 | UINT32 dummy; 55 | UINT64 address; // Absolute destination address 56 | } JMP_ABS, *PJMP_ABS; 57 | 58 | // 64-bit indirect absolute call. 59 | typedef struct _CALL_ABS 60 | { 61 | UINT8 opcode0; // FF15 00000002: CALL [+6] 62 | UINT8 opcode1; 63 | UINT32 dummy0; 64 | UINT8 dummy1; // EB 08: JMP +10 65 | UINT8 dummy2; 66 | UINT64 address; // Absolute destination address 67 | } CALL_ABS; 68 | 69 | // 32-bit direct relative conditional jumps. 70 | typedef struct _JCC_REL 71 | { 72 | UINT8 opcode0; // 0F8* xxxxxxxx: J** +6+xxxxxxxx 73 | UINT8 opcode1; 74 | UINT32 operand; // Relative destination address 75 | } JCC_REL; 76 | 77 | // 64bit indirect absolute conditional jumps that x64 lacks. 78 | typedef struct _JCC_ABS 79 | { 80 | UINT8 opcode; // 7* 0E: J** +16 81 | UINT8 dummy0; 82 | UINT8 dummy1; // FF25 00000000: JMP [+6] 83 | UINT8 dummy2; 84 | UINT32 dummy3; 85 | UINT64 address; // Absolute destination address 86 | } JCC_ABS; 87 | 88 | #pragma pack(pop) 89 | 90 | typedef struct _TRAMPOLINE 91 | { 92 | LPVOID pTarget; // [In] Address of the target function. 93 | LPVOID pDetour; // [In] Address of the detour function. 94 | LPVOID pTrampoline; // [In] Buffer address for the trampoline and relay function. 95 | 96 | #if defined(_M_X64) || defined(__x86_64__) 97 | LPVOID pRelay; // [Out] Address of the relay function. 98 | #endif 99 | BOOL patchAbove; // [Out] Should use the hot patch area? 100 | UINT nIP; // [Out] Number of the instruction boundaries. 101 | UINT8 oldIPs[8]; // [Out] Instruction boundaries of the target function. 102 | UINT8 newIPs[8]; // [Out] Instruction boundaries of the trampoline function. 103 | } TRAMPOLINE, *PTRAMPOLINE; 104 | 105 | BOOL CreateTrampolineFunction(PTRAMPOLINE ct); -------------------------------------------------------------------------------- /external/SDL2/SDL2.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/external/SDL2/SDL2.lib -------------------------------------------------------------------------------- /external/SDL2/SDL_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 37 | extern "C" { 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | /** 42 | * \file SDL_bits.h 43 | */ 44 | 45 | /** 46 | * Get the index of the most significant bit. Result is undefined when called 47 | * with 0. This operation can also be stated as "count leading zeroes" and 48 | * "log base 2". 49 | * 50 | * \return Index of the most significant bit. 51 | */ 52 | SDL_FORCE_INLINE Sint8 53 | SDL_MostSignificantBitIndex32(Uint32 x) 54 | { 55 | #if defined(__GNUC__) && __GNUC__ >= 4 56 | /* Count Leading Zeroes builtin in GCC. 57 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 58 | */ 59 | return 31 - __builtin_clz(x); 60 | #else 61 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 62 | * , released in the public domain. 63 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 64 | */ 65 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 66 | const Uint8 S[] = {1, 2, 4, 8, 16}; 67 | 68 | Uint8 msbIndex = 0; 69 | int i; 70 | 71 | for (i = 4; i >= 0; i--) 72 | { 73 | if (x & b[i]) 74 | { 75 | x >>= S[i]; 76 | msbIndex |= S[i]; 77 | } 78 | } 79 | 80 | return msbIndex; 81 | #endif 82 | } 83 | 84 | /* Ends C function definitions when using C++ */ 85 | #ifdef __cplusplus 86 | /* *INDENT-OFF* */ 87 | } 88 | /* *INDENT-ON* */ 89 | #endif 90 | #include "close_code.h" 91 | 92 | #endif /* _SDL_bits_h */ 93 | 94 | /* vi: set ts=4 sw=4 expandtab: */ 95 | -------------------------------------------------------------------------------- /external/SDL2/SDL_blendmode.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_blendmode.h 24 | * 25 | * Header file declaring the SDL_BlendMode enumeration 26 | */ 27 | 28 | #ifndef _SDL_blendmode_h 29 | #define _SDL_blendmode_h 30 | 31 | #include "begin_code.h" 32 | /* Set up for C function definitions, even when using C++ */ 33 | #ifdef __cplusplus 34 | /* *INDENT-OFF* */ 35 | extern "C" { 36 | /* *INDENT-ON* */ 37 | #endif 38 | 39 | /** 40 | * \brief The blend mode used in SDL_RenderCopy() and drawing operations. 41 | */ 42 | typedef enum 43 | { 44 | SDL_BLENDMODE_NONE = 0x00000000, /**< No blending */ 45 | SDL_BLENDMODE_BLEND = 0x00000001, /**< dst = (src * A) + (dst * (1-A)) */ 46 | SDL_BLENDMODE_ADD = 0x00000002, /**< dst = (src * A) + dst */ 47 | SDL_BLENDMODE_MOD = 0x00000004 /**< dst = src * dst */ 48 | } SDL_BlendMode; 49 | 50 | /* Ends C function definitions when using C++ */ 51 | #ifdef __cplusplus 52 | /* *INDENT-OFF* */ 53 | } 54 | /* *INDENT-ON* */ 55 | #endif 56 | #include "close_code.h" 57 | 58 | #endif /* _SDL_video_h */ 59 | 60 | /* vi: set ts=4 sw=4 expandtab: */ 61 | -------------------------------------------------------------------------------- /external/SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 37 | extern "C" { 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | /* Function prototypes */ 42 | 43 | /** 44 | * \brief Put UTF-8 text into the clipboard 45 | * 46 | * \sa SDL_GetClipboardText() 47 | */ 48 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 49 | 50 | /** 51 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 52 | * 53 | * \sa SDL_SetClipboardText() 54 | */ 55 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 56 | 57 | /** 58 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 59 | * 60 | * \sa SDL_GetClipboardText() 61 | */ 62 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 63 | 64 | 65 | /* Ends C function definitions when using C++ */ 66 | #ifdef __cplusplus 67 | /* *INDENT-OFF* */ 68 | } 69 | /* *INDENT-ON* */ 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* _SDL_clipboard_h */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_h 23 | #define _SDL_config_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config.h 29 | */ 30 | 31 | /* Add any platform that doesn't build using the configure system. */ 32 | #if defined(__WIN32__) 33 | #include "SDL_config_windows.h" 34 | #elif defined(__MACOSX__) 35 | #include "SDL_config_macosx.h" 36 | #elif defined(__IPHONEOS__) 37 | #include "SDL_config_iphoneos.h" 38 | #elif defined(__ANDROID__) 39 | #include "SDL_config_android.h" 40 | #elif defined(__PSP__) 41 | #include "SDL_config_psp.h" 42 | #else 43 | /* This is a minimal configuration just to get SDL running on new platforms */ 44 | #include "SDL_config_minimal.h" 45 | #endif /* platform config */ 46 | 47 | #ifdef USING_GENERATED_CONFIG_H 48 | #error Wrong SDL_config.h, check your include path? 49 | #endif 50 | 51 | #endif /* _SDL_config_h */ 52 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config_android.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_android_h 23 | #define _SDL_config_android_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /** 28 | * \file SDL_config_android.h 29 | * 30 | * This is a configuration that can be used to build SDL for Android 31 | */ 32 | 33 | #include 34 | 35 | #define HAVE_ALLOCA_H 1 36 | #define HAVE_SYS_TYPES_H 1 37 | #define HAVE_STDIO_H 1 38 | #define STDC_HEADERS 1 39 | #define HAVE_STRING_H 1 40 | #define HAVE_INTTYPES_H 1 41 | #define HAVE_STDINT_H 1 42 | #define HAVE_CTYPE_H 1 43 | #define HAVE_MATH_H 1 44 | #define HAVE_SIGNAL_H 1 45 | 46 | /* C library functions */ 47 | #define HAVE_MALLOC 1 48 | #define HAVE_CALLOC 1 49 | #define HAVE_REALLOC 1 50 | #define HAVE_FREE 1 51 | #define HAVE_ALLOCA 1 52 | #define HAVE_GETENV 1 53 | #define HAVE_SETENV 1 54 | #define HAVE_PUTENV 1 55 | #define HAVE_SETENV 1 56 | #define HAVE_UNSETENV 1 57 | #define HAVE_QSORT 1 58 | #define HAVE_ABS 1 59 | #define HAVE_BCOPY 1 60 | #define HAVE_MEMSET 1 61 | #define HAVE_MEMCPY 1 62 | #define HAVE_MEMMOVE 1 63 | #define HAVE_MEMCMP 1 64 | #define HAVE_STRLEN 1 65 | #define HAVE_STRLCPY 1 66 | #define HAVE_STRLCAT 1 67 | #define HAVE_STRDUP 1 68 | #define HAVE_STRCHR 1 69 | #define HAVE_STRRCHR 1 70 | #define HAVE_STRSTR 1 71 | #define HAVE_STRTOL 1 72 | #define HAVE_STRTOUL 1 73 | #define HAVE_STRTOLL 1 74 | #define HAVE_STRTOULL 1 75 | #define HAVE_STRTOD 1 76 | #define HAVE_ATOI 1 77 | #define HAVE_ATOF 1 78 | #define HAVE_STRCMP 1 79 | #define HAVE_STRNCMP 1 80 | #define HAVE_STRCASECMP 1 81 | #define HAVE_STRNCASECMP 1 82 | #define HAVE_SSCANF 1 83 | #define HAVE_SNPRINTF 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_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_POW 1 96 | #define HAVE_SCALBN 1 97 | #define HAVE_SIN 1 98 | #define HAVE_SINF 1 99 | #define HAVE_SQRT 1 100 | #define HAVE_SIGACTION 1 101 | #define HAVE_SETJMP 1 102 | #define HAVE_NANOSLEEP 1 103 | #define HAVE_SYSCONF 1 104 | 105 | #define SIZEOF_VOIDP 4 106 | 107 | /* Enable various audio drivers */ 108 | #define SDL_AUDIO_DRIVER_ANDROID 1 109 | #define SDL_AUDIO_DRIVER_DUMMY 1 110 | 111 | /* Enable various input drivers */ 112 | #define SDL_JOYSTICK_ANDROID 1 113 | #define SDL_HAPTIC_DUMMY 1 114 | 115 | /* Enable various shared object loading systems */ 116 | #define SDL_LOADSO_DLOPEN 1 117 | 118 | /* Enable various threading systems */ 119 | #define SDL_THREAD_PTHREAD 1 120 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 121 | 122 | /* Enable various timer systems */ 123 | #define SDL_TIMER_UNIX 1 124 | 125 | /* Enable various video drivers */ 126 | #define SDL_VIDEO_DRIVER_ANDROID 1 127 | 128 | /* Enable OpenGL ES */ 129 | #define SDL_VIDEO_OPENGL_ES 1 130 | #define SDL_VIDEO_RENDER_OGL_ES 1 131 | #define SDL_VIDEO_RENDER_OGL_ES2 1 132 | 133 | /* Enable system power support */ 134 | #define SDL_POWER_ANDROID 1 135 | 136 | #endif /* _SDL_config_android_h */ 137 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config_iphoneos.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_iphoneos_h 23 | #define _SDL_config_iphoneos_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | #ifdef __LP64__ 28 | #define SIZEOF_VOIDP 8 29 | #else 30 | #define SIZEOF_VOIDP 4 31 | #endif 32 | 33 | #define HAVE_GCC_ATOMICS 1 34 | 35 | #define HAVE_ALLOCA_H 1 36 | #define HAVE_SYS_TYPES_H 1 37 | #define HAVE_STDIO_H 1 38 | #define STDC_HEADERS 1 39 | #define HAVE_STRING_H 1 40 | #define HAVE_INTTYPES_H 1 41 | #define HAVE_STDINT_H 1 42 | #define HAVE_CTYPE_H 1 43 | #define HAVE_MATH_H 1 44 | #define HAVE_SIGNAL_H 1 45 | 46 | /* C library functions */ 47 | #define HAVE_MALLOC 1 48 | #define HAVE_CALLOC 1 49 | #define HAVE_REALLOC 1 50 | #define HAVE_FREE 1 51 | #define HAVE_ALLOCA 1 52 | #define HAVE_GETENV 1 53 | #define HAVE_SETENV 1 54 | #define HAVE_PUTENV 1 55 | #define HAVE_SETENV 1 56 | #define HAVE_UNSETENV 1 57 | #define HAVE_QSORT 1 58 | #define HAVE_ABS 1 59 | #define HAVE_BCOPY 1 60 | #define HAVE_MEMSET 1 61 | #define HAVE_MEMCPY 1 62 | #define HAVE_MEMMOVE 1 63 | #define HAVE_MEMCMP 1 64 | #define HAVE_STRLEN 1 65 | #define HAVE_STRLCPY 1 66 | #define HAVE_STRLCAT 1 67 | #define HAVE_STRDUP 1 68 | #define HAVE_STRCHR 1 69 | #define HAVE_STRRCHR 1 70 | #define HAVE_STRSTR 1 71 | #define HAVE_STRTOL 1 72 | #define HAVE_STRTOUL 1 73 | #define HAVE_STRTOLL 1 74 | #define HAVE_STRTOULL 1 75 | #define HAVE_STRTOD 1 76 | #define HAVE_ATOI 1 77 | #define HAVE_ATOF 1 78 | #define HAVE_STRCMP 1 79 | #define HAVE_STRNCMP 1 80 | #define HAVE_STRCASECMP 1 81 | #define HAVE_STRNCASECMP 1 82 | #define HAVE_SSCANF 1 83 | #define HAVE_SNPRINTF 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_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_POW 1 96 | #define HAVE_SCALBN 1 97 | #define HAVE_SIN 1 98 | #define HAVE_SINF 1 99 | #define HAVE_SQRT 1 100 | #define HAVE_SIGACTION 1 101 | #define HAVE_SETJMP 1 102 | #define HAVE_NANOSLEEP 1 103 | #define HAVE_SYSCONF 1 104 | #define HAVE_SYSCTLBYNAME 1 105 | 106 | /* enable iPhone version of Core Audio driver */ 107 | #define SDL_AUDIO_DRIVER_COREAUDIO 1 108 | /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ 109 | #define SDL_AUDIO_DRIVER_DUMMY 1 110 | 111 | /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ 112 | #define SDL_HAPTIC_DISABLED 1 113 | 114 | /* Enable Unix style SO loading */ 115 | /* Technically this works, but it violates the iPhone developer agreement */ 116 | /* #define SDL_LOADSO_DLOPEN 1 */ 117 | 118 | /* Enable the stub shared object loader (src/loadso/dummy/\*.c) */ 119 | #define SDL_LOADSO_DISABLED 1 120 | 121 | /* Enable various threading systems */ 122 | #define SDL_THREAD_PTHREAD 1 123 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 124 | 125 | /* Enable various timer systems */ 126 | #define SDL_TIMER_UNIX 1 127 | 128 | /* Supported video drivers */ 129 | #define SDL_VIDEO_DRIVER_UIKIT 1 130 | #define SDL_VIDEO_DRIVER_DUMMY 1 131 | 132 | /* enable OpenGL ES */ 133 | #define SDL_VIDEO_OPENGL_ES 1 134 | #define SDL_VIDEO_RENDER_OGL_ES 1 135 | #define SDL_VIDEO_RENDER_OGL_ES2 1 136 | 137 | /* Enable system power support */ 138 | #define SDL_POWER_UIKIT 1 139 | 140 | /* enable iPhone keyboard support */ 141 | #define SDL_IPHONE_KEYBOARD 1 142 | 143 | /* enable joystick subsystem */ 144 | #define SDL_JOYSTICK_DISABLED 0 145 | 146 | /* Set max recognized G-force from accelerometer 147 | See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed 148 | */ 149 | #define SDL_IPHONE_MAX_GFORCE 5.0 150 | 151 | #endif /* _SDL_config_iphoneos_h */ 152 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config_nintendods.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_nintendods_h 23 | #define _SDL_config_nintendods_h 24 | 25 | #include "SDL_platform.h" 26 | 27 | /* This is a set of defines to configure the SDL features */ 28 | 29 | #if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H) 30 | typedef signed char int8_t; 31 | typedef unsigned char uint8_t; 32 | typedef signed short int16_t; 33 | typedef unsigned short uint16_t; 34 | typedef signed int int32_t; 35 | typedef unsigned int uint32_t; 36 | typedef signed long long int64_t; 37 | typedef unsigned long long uint64_t; 38 | 39 | /* LiF: __PTRDIFF_TYPE__ was causing errors of conflicting typedefs with the 40 | shipping with devkitARM. copied a similar ifdef from it. */ 41 | #ifndef __PTRDIFF_TYPE__ 42 | typedef unsigned long uintptr_t; 43 | #else 44 | typedef unsigned __PTRDIFF_TYPE__ uintptr_t; 45 | #endif 46 | #endif /* !_STDINT_H_ && !HAVE_STDINT_H */ 47 | 48 | #define SIZEOF_VOIDP 4 49 | 50 | /* Useful headers */ 51 | #define HAVE_SYS_TYPES_H 1 52 | #define HAVE_STDIO_H 1 53 | #define STDC_HEADERS 1 54 | #define HAVE_STRING_H 1 55 | #define HAVE_CTYPE_H 1 56 | 57 | /* C library functions */ 58 | #define HAVE_MALLOC 1 59 | #define HAVE_CALLOC 1 60 | #define HAVE_REALLOC 1 61 | #define HAVE_FREE 1 62 | #define HAVE_ALLOCA 1 63 | #define HAVE_GETENV 1 64 | #define HAVE_SETENV 1 65 | #define HAVE_PUTENV 1 66 | #define HAVE_QSORT 1 67 | #define HAVE_ABS 1 68 | #define HAVE_BCOPY 1 69 | #define HAVE_MEMSET 1 70 | #define HAVE_MEMCPY 1 71 | #define HAVE_MEMMOVE 1 72 | #define HAVE_MEMCMP 1 73 | #define HAVE_STRLEN 1 74 | #define HAVE_STRDUP 1 75 | #define HAVE_INDEX 1 76 | #define HAVE_RINDEX 1 77 | #define HAVE_STRCHR 1 78 | #define HAVE_STRRCHR 1 79 | #define HAVE_STRSTR 1 80 | #define HAVE_STRTOL 1 81 | #define HAVE_STRTOD 1 82 | #define HAVE_ATOI 1 83 | #define HAVE_ATOF 1 84 | #define HAVE_STRCMP 1 85 | #define HAVE_STRNCMP 1 86 | #define HAVE_STRICMP 1 87 | #define HAVE_STRCASECMP 1 88 | #define HAVE_SSCANF 1 89 | #define HAVE_SNPRINTF 1 90 | #define HAVE_VSNPRINTF 1 91 | 92 | /* DS isn't that sophisticated */ 93 | #define LACKS_SYS_MMAN_H 1 94 | 95 | /* Enable various audio drivers */ 96 | #define SDL_AUDIO_DRIVER_NDS 1 97 | /*#define SDL_AUDIO_DRIVER_DUMMY 1 TODO: uncomment this later*/ 98 | 99 | /* Enable various input drivers */ 100 | #define SDL_JOYSTICK_NDS 1 101 | /*#define SDL_JOYSTICK_DUMMY 1 TODO: uncomment this later*/ 102 | 103 | /* DS has no dynamic linking afaik */ 104 | #define SDL_LOADSO_DISABLED 1 105 | 106 | /* Enable various threading systems */ 107 | /*#define SDL_THREAD_NDS 1*/ 108 | #define SDL_THREADS_DISABLED 1 109 | 110 | /* Enable various timer systems */ 111 | #define SDL_TIMER_NDS 1 112 | 113 | /* Enable various video drivers */ 114 | #define SDL_VIDEO_DRIVER_NDS 1 115 | #ifdef USE_HW_RENDERER 116 | #define SDL_VIDEO_RENDER_NDS 1 117 | #else 118 | #define SDL_VIDEO_RENDER_NDS 0 119 | #endif 120 | 121 | /* Enable system power support */ 122 | #define SDL_POWER_NINTENDODS 1 123 | 124 | /* Enable haptic support */ 125 | #define SDL_HAPTIC_NDS 1 126 | 127 | #define SDL_BYTEORDER SDL_LIL_ENDIAN 128 | 129 | #endif /* _SDL_config_nintendods_h */ 130 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config_pandora.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_h 23 | #define _SDL_config_h 24 | 25 | /* This is a set of defines to configure the SDL features */ 26 | 27 | /* General platform specific identifiers */ 28 | #include "SDL_platform.h" 29 | 30 | #ifdef __LP64__ 31 | #define SIZEOF_VOIDP 8 32 | #else 33 | #define SIZEOF_VOIDP 4 34 | #endif 35 | 36 | #define SDL_BYTEORDER 1234 37 | 38 | #define HAVE_ALLOCA_H 1 39 | #define HAVE_SYS_TYPES_H 1 40 | #define HAVE_STDIO_H 1 41 | #define STDC_HEADERS 1 42 | #define HAVE_STDLIB_H 1 43 | #define HAVE_STDARG_H 1 44 | #define HAVE_MALLOC_H 1 45 | #define HAVE_MEMORY_H 1 46 | #define HAVE_STRING_H 1 47 | #define HAVE_STRINGS_H 1 48 | #define HAVE_INTTYPES_H 1 49 | #define HAVE_STDINT_H 1 50 | #define HAVE_CTYPE_H 1 51 | #define HAVE_MATH_H 1 52 | #define HAVE_ICONV_H 1 53 | #define HAVE_SIGNAL_H 1 54 | #define HAVE_MALLOC 1 55 | #define HAVE_CALLOC 1 56 | #define HAVE_REALLOC 1 57 | #define HAVE_FREE 1 58 | #define HAVE_ALLOCA 1 59 | #define HAVE_GETENV 1 60 | #define HAVE_SETENV 1 61 | #define HAVE_PUTENV 1 62 | #define HAVE_UNSETENV 1 63 | #define HAVE_QSORT 1 64 | #define HAVE_ABS 1 65 | #define HAVE_BCOPY 1 66 | #define HAVE_MEMSET 1 67 | #define HAVE_MEMCPY 1 68 | #define HAVE_MEMMOVE 1 69 | #define HAVE_STRLEN 1 70 | #define HAVE_STRDUP 1 71 | #define HAVE_STRCHR 1 72 | #define HAVE_STRRCHR 1 73 | #define HAVE_STRSTR 1 74 | #define HAVE_STRTOL 1 75 | #define HAVE_STRTOUL 1 76 | #define HAVE_STRTOLL 1 77 | #define HAVE_STRTOULL 1 78 | #define HAVE_ATOI 1 79 | #define HAVE_ATOF 1 80 | #define HAVE_STRCMP 1 81 | #define HAVE_STRNCMP 1 82 | #define HAVE_STRCASECMP 1 83 | #define HAVE_STRNCASECMP 1 84 | #define HAVE_SSCANF 1 85 | #define HAVE_SNPRINTF 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_SIGACTION 1 100 | #define HAVE_SETJMP 1 101 | #define HAVE_NANOSLEEP 1 102 | 103 | #define SDL_AUDIO_DRIVER_DUMMY 1 104 | #define SDL_AUDIO_DRIVER_OSS 1 105 | 106 | #define SDL_INPUT_LINUXEV 1 107 | #define SDL_INPUT_TSLIB 1 108 | #define SDL_JOYSTICK_LINUX 1 109 | #define SDL_HAPTIC_LINUX 1 110 | 111 | #define SDL_LOADSO_DLOPEN 1 112 | 113 | #define SDL_THREAD_PTHREAD 1 114 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 115 | 116 | #define SDL_TIMER_UNIX 1 117 | 118 | #define SDL_VIDEO_DRIVER_DUMMY 1 119 | #define SDL_VIDEO_DRIVER_X11 1 120 | #define SDL_VIDEO_DRIVER_PANDORA 1 121 | #define SDL_VIDEO_RENDER_OGL_ES 1 122 | #define SDL_VIDEO_OPENGL_ES 1 123 | 124 | #endif /* _SDL_config_h */ 125 | -------------------------------------------------------------------------------- /external/SDL2/SDL_config_wiz.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_h 23 | #define _SDL_config_h 24 | 25 | /* This is a set of defines to configure the SDL features */ 26 | 27 | /* General platform specific identifiers */ 28 | #include "SDL_platform.h" 29 | 30 | #define SDL_BYTEORDER 1234 31 | 32 | #define HAVE_ALLOCA_H 1 33 | #define HAVE_SYS_TYPES_H 1 34 | #define HAVE_STDIO_H 1 35 | #define STDC_HEADERS 1 36 | #define HAVE_STDLIB_H 1 37 | #define HAVE_STDARG_H 1 38 | #define HAVE_MALLOC_H 1 39 | #define HAVE_MEMORY_H 1 40 | #define HAVE_STRING_H 1 41 | #define HAVE_STRINGS_H 1 42 | #define HAVE_INTTYPES_H 1 43 | #define HAVE_STDINT_H 1 44 | #define HAVE_CTYPE_H 1 45 | #define HAVE_MATH_H 1 46 | #define HAVE_ICONV_H 1 47 | #define HAVE_SIGNAL_H 1 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_UNSETENV 1 57 | #define HAVE_QSORT 1 58 | #define HAVE_ABS 1 59 | #define HAVE_BCOPY 1 60 | #define HAVE_MEMSET 1 61 | #define HAVE_MEMCPY 1 62 | #define HAVE_MEMMOVE 1 63 | #define HAVE_STRLEN 1 64 | #define HAVE_STRDUP 1 65 | #define HAVE_STRCHR 1 66 | #define HAVE_STRRCHR 1 67 | #define HAVE_STRSTR 1 68 | #define HAVE_STRTOL 1 69 | #define HAVE_STRTOUL 1 70 | #define HAVE_STRTOLL 1 71 | #define HAVE_STRTOULL 1 72 | #define HAVE_ATOI 1 73 | #define HAVE_ATOF 1 74 | #define HAVE_STRCMP 1 75 | #define HAVE_STRNCMP 1 76 | #define HAVE_STRCASECMP 1 77 | #define HAVE_STRNCASECMP 1 78 | #define HAVE_SSCANF 1 79 | #define HAVE_SNPRINTF 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_SIGACTION 1 94 | #define HAVE_SETJMP 1 95 | #define HAVE_NANOSLEEP 1 96 | #define HAVE_POW 1 97 | 98 | #define SDL_CDROM_DISABLED 1 99 | #define SDL_AUDIO_DRIVER_DUMMY 1 100 | #define SDL_AUDIO_DRIVER_OSS 1 101 | 102 | #define SDL_INPUT_LINUXEV 1 103 | #define SDL_INPUT_TSLIB 1 104 | #define SDL_JOYSTICK_LINUX 1 105 | #define SDL_HAPTIC_LINUX 1 106 | 107 | #define SDL_LOADSO_DLOPEN 1 108 | 109 | #define SDL_THREAD_PTHREAD 1 110 | #define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1 111 | 112 | #define SDL_TIMER_UNIX 1 113 | 114 | #define SDL_VIDEO_DRIVER_DUMMY 1 115 | #define SDL_VIDEO_DRIVER_PANDORA 1 116 | #define SDL_VIDEO_RENDER_OGL_ES 1 117 | #define SDL_VIDEO_OPENGL_ES 1 118 | 119 | #endif /* _SDL_config_h */ 120 | -------------------------------------------------------------------------------- /external/SDL2/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | -------------------------------------------------------------------------------- /external/SDL2/SDL_cpuinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_cpuinfo.h 24 | * 25 | * CPU feature detection for SDL. 26 | */ 27 | 28 | #ifndef _SDL_cpuinfo_h 29 | #define _SDL_cpuinfo_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | /* Need to do this here because intrin.h has C++ code in it */ 34 | /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */ 35 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 36 | #include 37 | #ifndef _WIN64 38 | #define __MMX__ 39 | #define __3dNOW__ 40 | #endif 41 | #define __SSE__ 42 | #define __SSE2__ 43 | #elif defined(__MINGW64_VERSION_MAJOR) 44 | #include 45 | #else 46 | #ifdef __ALTIVEC__ 47 | #if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) 48 | #include 49 | #undef pixel 50 | #endif 51 | #endif 52 | #ifdef __MMX__ 53 | #include 54 | #endif 55 | #ifdef __3dNOW__ 56 | #include 57 | #endif 58 | #ifdef __SSE__ 59 | #include 60 | #endif 61 | #ifdef __SSE2__ 62 | #include 63 | #endif 64 | #endif 65 | 66 | #include "begin_code.h" 67 | /* Set up for C function definitions, even when using C++ */ 68 | #ifdef __cplusplus 69 | /* *INDENT-OFF* */ 70 | extern "C" { 71 | /* *INDENT-ON* */ 72 | #endif 73 | 74 | /* This is a guess for the cacheline size used for padding. 75 | * Most x86 processors have a 64 byte cache line. 76 | * The 64-bit PowerPC processors have a 128 byte cache line. 77 | * We'll use the larger value to be generally safe. 78 | */ 79 | #define SDL_CACHELINE_SIZE 128 80 | 81 | /** 82 | * This function returns the number of CPU cores available. 83 | */ 84 | extern DECLSPEC int SDLCALL SDL_GetCPUCount(void); 85 | 86 | /** 87 | * This function returns the L1 cache line size of the CPU 88 | * 89 | * This is useful for determining multi-threaded structure padding 90 | * or SIMD prefetch sizes. 91 | */ 92 | extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); 93 | 94 | /** 95 | * This function returns true if the CPU has the RDTSC instruction. 96 | */ 97 | extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); 98 | 99 | /** 100 | * This function returns true if the CPU has AltiVec features. 101 | */ 102 | extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); 103 | 104 | /** 105 | * This function returns true if the CPU has MMX features. 106 | */ 107 | extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); 108 | 109 | /** 110 | * This function returns true if the CPU has 3DNow! features. 111 | */ 112 | extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); 113 | 114 | /** 115 | * This function returns true if the CPU has SSE features. 116 | */ 117 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); 118 | 119 | /** 120 | * This function returns true if the CPU has SSE2 features. 121 | */ 122 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); 123 | 124 | /** 125 | * This function returns true if the CPU has SSE3 features. 126 | */ 127 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void); 128 | 129 | /** 130 | * This function returns true if the CPU has SSE4.1 features. 131 | */ 132 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void); 133 | 134 | /** 135 | * This function returns true if the CPU has SSE4.2 features. 136 | */ 137 | extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void); 138 | 139 | 140 | /* Ends C function definitions when using C++ */ 141 | #ifdef __cplusplus 142 | /* *INDENT-OFF* */ 143 | } 144 | /* *INDENT-ON* */ 145 | #endif 146 | #include "close_code.h" 147 | 148 | #endif /* _SDL_cpuinfo_h */ 149 | 150 | /* vi: set ts=4 sw=4 expandtab: */ 151 | -------------------------------------------------------------------------------- /external/SDL2/SDL_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 37 | extern "C" { 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | /* Public functions */ 42 | /* SDL_SetError() unconditionally returns -1. */ 43 | extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...); 44 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 45 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 46 | 47 | /** 48 | * \name Internal error functions 49 | * 50 | * \internal 51 | * Private error reporting function - used internally. 52 | */ 53 | /*@{*/ 54 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 55 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 56 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 57 | typedef enum 58 | { 59 | SDL_ENOMEM, 60 | SDL_EFREAD, 61 | SDL_EFWRITE, 62 | SDL_EFSEEK, 63 | SDL_UNSUPPORTED, 64 | SDL_LASTERROR 65 | } SDL_errorcode; 66 | /* SDL_Error() unconditionally returns -1. */ 67 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 68 | /*@}*//*Internal error functions*/ 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | /* *INDENT-OFF* */ 73 | } 74 | /* *INDENT-ON* */ 75 | #endif 76 | #include "close_code.h" 77 | 78 | #endif /* _SDL_error_h */ 79 | 80 | /* vi: set ts=4 sw=4 expandtab: */ 81 | -------------------------------------------------------------------------------- /external/SDL2/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 42 | extern "C" { 43 | /* *INDENT-ON* */ 44 | #endif 45 | 46 | typedef Sint64 SDL_GestureID; 47 | 48 | /* Function prototypes */ 49 | 50 | /** 51 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 52 | * 53 | * 54 | */ 55 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 56 | 57 | 58 | /** 59 | * \brief Save all currently loaded Dollar Gesture templates 60 | * 61 | * 62 | */ 63 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *src); 64 | 65 | /** 66 | * \brief Save a currently loaded Dollar Gesture template 67 | * 68 | * 69 | */ 70 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *src); 71 | 72 | 73 | /** 74 | * \brief Load Dollar Gesture templates from a file 75 | * 76 | * 77 | */ 78 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 79 | 80 | 81 | /* Ends C function definitions when using C++ */ 82 | #ifdef __cplusplus 83 | /* *INDENT-OFF* */ 84 | } 85 | /* *INDENT-ON* */ 86 | #endif 87 | #include "close_code.h" 88 | 89 | #endif /* _SDL_gesture_h */ 90 | 91 | /* vi: set ts=4 sw=4 expandtab: */ 92 | -------------------------------------------------------------------------------- /external/SDL2/SDL_input.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_input.h 24 | * 25 | * Include file for lowlevel SDL input device handling. 26 | * 27 | * This talks about individual devices, and not the system cursor. If you 28 | * just want to know when the user moves the pointer somewhere in your 29 | * window, this is NOT the API you want. This one handles things like 30 | * multi-touch, drawing tablets, and multiple, separate mice. 31 | * 32 | * The other API is in SDL_mouse.h 33 | */ 34 | 35 | #ifndef _SDL_input_h 36 | #define _SDL_input_h 37 | 38 | #include "SDL_stdinc.h" 39 | #include "SDL_error.h" 40 | #include "SDL_video.h" 41 | 42 | #include "begin_code.h" 43 | /* Set up for C function definitions, even when using C++ */ 44 | #ifdef __cplusplus 45 | /* *INDENT-OFF* */ 46 | extern "C" { 47 | /* *INDENT-ON* */ 48 | #endif 49 | 50 | 51 | /* Function prototypes */ 52 | 53 | /* !!! FIXME: real documentation 54 | * - Redetect devices 55 | * - This invalidates all existing device information from previous queries! 56 | * - There is an implicit (re)detect upon SDL_Init(). 57 | */ 58 | extern DECLSPEC int SDLCALL SDL_RedetectInputDevices(void); 59 | 60 | /** 61 | * \brief Get the number of mouse input devices available. 62 | */ 63 | extern DECLSPEC int SDLCALL SDL_GetNumInputDevices(void); 64 | 65 | /** 66 | * \brief Gets the name of a device with the given index. 67 | * 68 | * \param index is the index of the device, whose name is to be returned. 69 | * 70 | * \return the name of the device with the specified index 71 | */ 72 | extern DECLSPEC const char *SDLCALL SDL_GetInputDeviceName(int index); 73 | 74 | 75 | extern DECLSPEC int SDLCALL SDL_IsDeviceDisconnected(int index); 76 | 77 | /* Ends C function definitions when using C++ */ 78 | #ifdef __cplusplus 79 | /* *INDENT-OFF* */ 80 | } 81 | /* *INDENT-ON* */ 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* _SDL_mouse_h */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /external/SDL2/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 51 | extern "C" { 52 | /* *INDENT-ON* */ 53 | #endif 54 | 55 | /** 56 | * This function dynamically loads a shared object and returns a pointer 57 | * to the object handle (or NULL if there was an error). 58 | * The 'sofile' parameter is a system dependent name of the object file. 59 | */ 60 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 61 | 62 | /** 63 | * Given an object handle, this function looks up the address of the 64 | * named function in the shared object and returns it. This address 65 | * is no longer valid after calling SDL_UnloadObject(). 66 | */ 67 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 68 | const char *name); 69 | 70 | /** 71 | * Unload a shared object from memory. 72 | */ 73 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 74 | 75 | /* Ends C function definitions when using C++ */ 76 | #ifdef __cplusplus 77 | /* *INDENT-OFF* */ 78 | } 79 | /* *INDENT-ON* */ 80 | #endif 81 | #include "close_code.h" 82 | 83 | #endif /* _SDL_loadso_h */ 84 | 85 | /* vi: set ts=4 sw=4 expandtab: */ 86 | -------------------------------------------------------------------------------- /external/SDL2/SDL_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_main_h 23 | #define _SDL_main_h 24 | 25 | #include "SDL_stdinc.h" 26 | 27 | /** 28 | * \file SDL_main.h 29 | * 30 | * Redefine main() on some platforms so that it is called by SDL. 31 | */ 32 | 33 | #if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__) 34 | #ifndef SDL_MAIN_HANDLED 35 | #define SDL_MAIN_NEEDED 36 | #endif 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | #define C_LINKAGE "C" 41 | #else 42 | #define C_LINKAGE 43 | #endif /* __cplusplus */ 44 | 45 | /** 46 | * \file SDL_main.h 47 | * 48 | * The application's main() function must be called with C linkage, 49 | * and should be declared like this: 50 | * \code 51 | * #ifdef __cplusplus 52 | * extern "C" 53 | * #endif 54 | * int main(int argc, char *argv[]) 55 | * { 56 | * } 57 | * \endcode 58 | */ 59 | 60 | #ifdef SDL_MAIN_NEEDED 61 | #define main SDL_main 62 | #endif 63 | 64 | /** 65 | * The prototype for the application's main() function 66 | */ 67 | extern C_LINKAGE int SDL_main(int argc, char *argv[]); 68 | 69 | 70 | #include "begin_code.h" 71 | #ifdef __cplusplus 72 | /* *INDENT-OFF* */ 73 | extern "C" { 74 | /* *INDENT-ON* */ 75 | #endif 76 | 77 | #ifdef __WIN32__ 78 | 79 | /** 80 | * This can be called to set the application class at startup 81 | */ 82 | extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, 83 | void *hInst); 84 | extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); 85 | 86 | #endif /* __WIN32__ */ 87 | 88 | 89 | #ifdef __cplusplus 90 | /* *INDENT-OFF* */ 91 | } 92 | /* *INDENT-ON* */ 93 | #endif 94 | #include "close_code.h" 95 | 96 | #endif /* _SDL_main_h */ 97 | 98 | /* vi: set ts=4 sw=4 expandtab: */ 99 | -------------------------------------------------------------------------------- /external/SDL2/SDL_messagebox.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_messagebox_h 23 | #define _SDL_messagebox_h 24 | 25 | #include "SDL_stdinc.h" 26 | #include "SDL_video.h" /* For SDL_Window */ 27 | 28 | #include "begin_code.h" 29 | /* Set up for C function definitions, even when using C++ */ 30 | #ifdef __cplusplus 31 | /* *INDENT-OFF* */ 32 | extern "C" { 33 | /* *INDENT-ON* */ 34 | #endif 35 | 36 | /** 37 | * \brief SDL_MessageBox flags. If supported will display warning icon, etc. 38 | */ 39 | typedef enum 40 | { 41 | SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */ 42 | SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */ 43 | SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */ 44 | } SDL_MessageBoxFlags; 45 | 46 | /** 47 | * \brief Flags for SDL_MessageBoxButtonData. 48 | */ 49 | typedef enum 50 | { 51 | SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */ 52 | SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */ 53 | } SDL_MessageBoxButtonFlags; 54 | 55 | /** 56 | * \brief Individual button data. 57 | */ 58 | typedef struct 59 | { 60 | Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */ 61 | int buttonid; /**< User defined button id (value returned via SDL_MessageBox) */ 62 | const char * text; /**< The UTF-8 button text */ 63 | } SDL_MessageBoxButtonData; 64 | 65 | /** 66 | * \brief RGB value used in a message box color scheme 67 | */ 68 | typedef struct 69 | { 70 | Uint8 r, g, b; 71 | } SDL_MessageBoxColor; 72 | 73 | typedef enum 74 | { 75 | SDL_MESSAGEBOX_COLOR_BACKGROUND, 76 | SDL_MESSAGEBOX_COLOR_TEXT, 77 | SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, 78 | SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, 79 | SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, 80 | SDL_MESSAGEBOX_COLOR_MAX 81 | } SDL_MessageBoxColorType; 82 | 83 | /** 84 | * \brief A set of colors to use for message box dialogs 85 | */ 86 | typedef struct 87 | { 88 | SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX]; 89 | } SDL_MessageBoxColorScheme; 90 | 91 | /** 92 | * \brief MessageBox structure containing title, text, window, etc. 93 | */ 94 | typedef struct 95 | { 96 | Uint32 flags; /**< ::SDL_MessageBoxFlags */ 97 | SDL_Window *window; /**< Parent window, can be NULL */ 98 | const char *title; /**< UTF-8 title */ 99 | const char *message; /**< UTF-8 message text */ 100 | 101 | int numbuttons; 102 | const SDL_MessageBoxButtonData *buttons; 103 | 104 | const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */ 105 | } SDL_MessageBoxData; 106 | 107 | /** 108 | * \brief Create a modal message box. 109 | * 110 | * \param messagebox The SDL_MessageBox structure with title, text, etc. 111 | * 112 | * \return -1 on error, otherwise 0 and buttonid contains user id of button 113 | * hit or -1 if dialog was closed. 114 | * 115 | * \note This function should be called on the thread that created the parent 116 | * window, or on the main thread if the messagebox has no parent. It will 117 | * block execution of that thread until the user clicks a button or 118 | * closes the messagebox. 119 | */ 120 | extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); 121 | 122 | /** 123 | * \brief Create a simple modal message box 124 | * 125 | * \param flags ::SDL_MessageBoxFlags 126 | * \param title UTF-8 title text 127 | * \param message UTF-8 message text 128 | * \param window The parent window, or NULL for no parent 129 | * 130 | * \return 0 on success, -1 on error 131 | * 132 | * \sa SDL_ShowMessageBox 133 | */ 134 | extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window); 135 | 136 | 137 | /* Ends C function definitions when using C++ */ 138 | #ifdef __cplusplus 139 | /* *INDENT-OFF* */ 140 | } 141 | /* *INDENT-ON* */ 142 | #endif 143 | #include "close_code.h" 144 | 145 | #endif /* _SDL_messagebox_h */ 146 | 147 | /* vi: set ts=4 sw=4 expandtab: */ 148 | -------------------------------------------------------------------------------- /external/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _SDLname_h_ 3 | #define _SDLname_h_ 4 | 5 | #if defined(__STDC__) || defined(__cplusplus) 6 | #define NeedFunctionPrototypes 1 7 | #endif 8 | 9 | #define SDL_NAME(X) SDL_##X 10 | 11 | #endif /* _SDLname_h_ */ 12 | -------------------------------------------------------------------------------- /external/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /external/SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 2.0 API headers. 26 | */ 27 | 28 | #ifdef __IPHONEOS__ 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /external/SDL2/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_platform.h 24 | * 25 | * Try to get a standard set of platform defines. 26 | */ 27 | 28 | #ifndef _SDL_platform_h 29 | #define _SDL_platform_h 30 | 31 | #if defined(_AIX) 32 | #undef __AIX__ 33 | #define __AIX__ 1 34 | #endif 35 | #if defined(__BEOS__) 36 | #undef __BEOS__ 37 | #define __BEOS__ 1 38 | #endif 39 | #if defined(__HAIKU__) 40 | #undef __HAIKU__ 41 | #define __HAIKU__ 1 42 | #endif 43 | #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__) 44 | #undef __BSDI__ 45 | #define __BSDI__ 1 46 | #endif 47 | #if defined(_arch_dreamcast) 48 | #undef __DREAMCAST__ 49 | #define __DREAMCAST__ 1 50 | #endif 51 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) 52 | #undef __FREEBSD__ 53 | #define __FREEBSD__ 1 54 | #endif 55 | #if defined(hpux) || defined(__hpux) || defined(__hpux__) 56 | #undef __HPUX__ 57 | #define __HPUX__ 1 58 | #endif 59 | #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE) 60 | #undef __IRIX__ 61 | #define __IRIX__ 1 62 | #endif 63 | #if defined(linux) || defined(__linux) || defined(__linux__) 64 | #undef __LINUX__ 65 | #define __LINUX__ 1 66 | #endif 67 | #if defined(ANDROID) 68 | #undef __ANDROID__ 69 | #undef __LINUX__ /*do we need to do this?*/ 70 | #define __ANDROID__ 1 71 | #endif 72 | 73 | #if defined(__APPLE__) 74 | /* lets us know what version of Mac OS X we're compiling on */ 75 | #include "AvailabilityMacros.h" 76 | #include "TargetConditionals.h" 77 | #if TARGET_OS_IPHONE 78 | /* if compiling for iPhone */ 79 | #undef __IPHONEOS__ 80 | #define __IPHONEOS__ 1 81 | #undef __MACOSX__ 82 | #else 83 | /* if not compiling for iPhone */ 84 | #undef __MACOSX__ 85 | #define __MACOSX__ 1 86 | #endif /* TARGET_OS_IPHONE */ 87 | #endif /* defined(__APPLE__) */ 88 | 89 | #if defined(__NetBSD__) 90 | #undef __NETBSD__ 91 | #define __NETBSD__ 1 92 | #endif 93 | #if defined(__OpenBSD__) 94 | #undef __OPENBSD__ 95 | #define __OPENBSD__ 1 96 | #endif 97 | #if defined(__OS2__) 98 | #undef __OS2__ 99 | #define __OS2__ 1 100 | #endif 101 | #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE) 102 | #undef __OSF__ 103 | #define __OSF__ 1 104 | #endif 105 | #if defined(__QNXNTO__) 106 | #undef __QNXNTO__ 107 | #define __QNXNTO__ 1 108 | #endif 109 | #if defined(riscos) || defined(__riscos) || defined(__riscos__) 110 | #undef __RISCOS__ 111 | #define __RISCOS__ 1 112 | #endif 113 | #if defined(__SVR4) 114 | #undef __SOLARIS__ 115 | #define __SOLARIS__ 1 116 | #endif 117 | #if defined(WIN32) || defined(_WIN32) 118 | #undef __WIN32__ 119 | #define __WIN32__ 1 120 | #endif 121 | #if defined(__PSP__) 122 | #undef __PSP__ 123 | #define __PSP__ 1 124 | #endif 125 | 126 | #include "begin_code.h" 127 | /* Set up for C function definitions, even when using C++ */ 128 | #ifdef __cplusplus 129 | /* *INDENT-OFF* */ 130 | extern "C" { 131 | /* *INDENT-ON* */ 132 | #endif 133 | 134 | /** 135 | * \brief Gets the name of the platform. 136 | */ 137 | extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void); 138 | 139 | /* Ends C function definitions when using C++ */ 140 | #ifdef __cplusplus 141 | /* *INDENT-OFF* */ 142 | } 143 | /* *INDENT-ON* */ 144 | #endif 145 | #include "close_code.h" 146 | 147 | #endif /* _SDL_platform_h */ 148 | 149 | /* vi: set ts=4 sw=4 expandtab: */ 150 | -------------------------------------------------------------------------------- /external/SDL2/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 37 | extern "C" { 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | /** 42 | * \brief The basic state for the system's power supply. 43 | */ 44 | typedef enum 45 | { 46 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 47 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 48 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 49 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 50 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 51 | } SDL_PowerState; 52 | 53 | 54 | /** 55 | * \brief Get the current power supply details. 56 | * 57 | * \param secs Seconds of battery life left. You can pass a NULL here if 58 | * you don't care. Will return -1 if we can't determine a 59 | * value, or we're not running on a battery. 60 | * 61 | * \param pct Percentage of battery life left, between 0 and 100. You can 62 | * pass a NULL here if you don't care. Will return -1 if we 63 | * can't determine a value, or we're not running on a battery. 64 | * 65 | * \return The state of the battery (if any). 66 | */ 67 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 68 | 69 | /* Ends C function definitions when using C++ */ 70 | #ifdef __cplusplus 71 | /* *INDENT-OFF* */ 72 | } 73 | /* *INDENT-ON* */ 74 | #endif 75 | #include "close_code.h" 76 | 77 | #endif /* _SDL_power_h */ 78 | 79 | /* vi: set ts=4 sw=4 expandtab: */ 80 | -------------------------------------------------------------------------------- /external/SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | -------------------------------------------------------------------------------- /external/SDL2/SDL_rect.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_rect.h 24 | * 25 | * Header file for SDL_rect definition and management functions. 26 | */ 27 | 28 | #ifndef _SDL_rect_h 29 | #define _SDL_rect_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_pixels.h" 34 | #include "SDL_rwops.h" 35 | 36 | #include "begin_code.h" 37 | /* Set up for C function definitions, even when using C++ */ 38 | #ifdef __cplusplus 39 | /* *INDENT-OFF* */ 40 | extern "C" { 41 | /* *INDENT-ON* */ 42 | #endif 43 | 44 | /** 45 | * \brief The structure that defines a point 46 | * 47 | * \sa SDL_EnclosePoints 48 | */ 49 | typedef struct 50 | { 51 | int x; 52 | int y; 53 | } SDL_Point; 54 | 55 | /** 56 | * \brief A rectangle, with the origin at the upper left. 57 | * 58 | * \sa SDL_RectEmpty 59 | * \sa SDL_RectEquals 60 | * \sa SDL_HasIntersection 61 | * \sa SDL_IntersectRect 62 | * \sa SDL_UnionRect 63 | * \sa SDL_EnclosePoints 64 | */ 65 | typedef struct SDL_Rect 66 | { 67 | int x, y; 68 | int w, h; 69 | } SDL_Rect; 70 | 71 | /** 72 | * \brief Returns true if the rectangle has no area. 73 | */ 74 | #define SDL_RectEmpty(X) ((!(X)) || ((X)->w <= 0) || ((X)->h <= 0)) 75 | 76 | /** 77 | * \brief Returns true if the two rectangles are equal. 78 | */ 79 | #define SDL_RectEquals(A, B) (((A)) && ((B)) && \ 80 | ((A)->x == (B)->x) && ((A)->y == (B)->y) && \ 81 | ((A)->w == (B)->w) && ((A)->h == (B)->h)) 82 | 83 | /** 84 | * \brief Determine whether two rectangles intersect. 85 | * 86 | * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. 87 | */ 88 | extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A, 89 | const SDL_Rect * B); 90 | 91 | /** 92 | * \brief Calculate the intersection of two rectangles. 93 | * 94 | * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. 95 | */ 96 | extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A, 97 | const SDL_Rect * B, 98 | SDL_Rect * result); 99 | 100 | /** 101 | * \brief Calculate the union of two rectangles. 102 | */ 103 | extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, 104 | const SDL_Rect * B, 105 | SDL_Rect * result); 106 | 107 | /** 108 | * \brief Calculate a minimal rectangle enclosing a set of points 109 | * 110 | * \return SDL_TRUE if any points were within the clipping rect 111 | */ 112 | extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, 113 | int count, 114 | const SDL_Rect * clip, 115 | SDL_Rect * result); 116 | 117 | /** 118 | * \brief Calculate the intersection of a rectangle and line segment. 119 | * 120 | * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. 121 | */ 122 | extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * 123 | rect, int *X1, 124 | int *Y1, int *X2, 125 | int *Y2); 126 | 127 | /* Ends C function definitions when using C++ */ 128 | #ifdef __cplusplus 129 | /* *INDENT-OFF* */ 130 | } 131 | /* *INDENT-ON* */ 132 | #endif 133 | #include "close_code.h" 134 | 135 | #endif /* _SDL_rect_h */ 136 | 137 | /* vi: set ts=4 sw=4 expandtab: */ 138 | -------------------------------------------------------------------------------- /external/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-0:aaaaaaaaaaah" 2 | #define SDL_REVISION_NUMBER 0 3 | -------------------------------------------------------------------------------- /external/SDL2/SDL_system.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_system.h 24 | * 25 | * Include file for platform specific SDL API functions 26 | */ 27 | 28 | #ifndef _SDL_system_h 29 | #define _SDL_system_h 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #if defined(__IPHONEOS__) && __IPHONEOS__ 34 | #include "SDL_video.h" 35 | #include "SDL_keyboard.h" 36 | #endif 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | /* *INDENT-OFF* */ 42 | extern "C" { 43 | /* *INDENT-ON* */ 44 | #endif 45 | 46 | /* Platform specific functions for iOS */ 47 | #if defined(__IPHONEOS__) && __IPHONEOS__ 48 | 49 | extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); 50 | extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); 51 | 52 | #endif /* __IPHONEOS__ */ 53 | 54 | 55 | /* Platform specific functions for Android */ 56 | #if defined(__ANDROID__) && __ANDROID__ 57 | 58 | /* Get the JNI environment for the current thread 59 | This returns JNIEnv*, but the prototype is void* so we don't need jni.h 60 | */ 61 | extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(); 62 | 63 | /* Get the SDL Activity object for the application 64 | This returns jobject, but the prototype is void* so we don't need jni.h 65 | */ 66 | extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(); 67 | 68 | /* See the official Android developer guide for more information: 69 | http://developer.android.com/guide/topics/data/data-storage.html 70 | */ 71 | #define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01 72 | #define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02 73 | 74 | /* Get the path used for internal storage for this application. 75 | This path is unique to your application and cannot be written to 76 | by other applications. 77 | */ 78 | extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(); 79 | 80 | /* Get the current state of external storage, a bitmask of these values: 81 | SDL_ANDROID_EXTERNAL_STORAGE_READ 82 | SDL_ANDROID_EXTERNAL_STORAGE_WRITE 83 | If external storage is currently unavailable, this will return 0. 84 | */ 85 | extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(); 86 | 87 | /* Get the path used for external storage for this application. 88 | This path is unique to your application, but is public and can be 89 | written to by other applications. 90 | */ 91 | extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(); 92 | 93 | #endif /* __ANDROID__ */ 94 | 95 | 96 | /* Ends C function definitions when using C++ */ 97 | #ifdef __cplusplus 98 | /* *INDENT-OFF* */ 99 | } 100 | /* *INDENT-ON* */ 101 | #endif 102 | #include "close_code.h" 103 | 104 | #endif /* _SDL_system_h */ 105 | 106 | /* vi: set ts=4 sw=4 expandtab: */ 107 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_common.h" 35 | #include "SDL_test_font.h" 36 | #include "SDL_test_random.h" 37 | #include "SDL_test_fuzzer.h" 38 | #include "SDL_test_crc32.h" 39 | #include "SDL_test_md5.h" 40 | #include "SDL_test_log.h" 41 | #include "SDL_test_assert.h" 42 | #include "SDL_test_harness.h" 43 | #include "SDL_test_images.h" 44 | #include "SDL_test_compare.h" 45 | 46 | #include "begin_code.h" 47 | /* Set up for C function definitions, even when using C++ */ 48 | #ifdef __cplusplus 49 | /* *INDENT-OFF* */ 50 | extern "C" { 51 | /* *INDENT-ON* */ 52 | #endif 53 | 54 | /* Global definitions */ 55 | 56 | /* 57 | * Note: Maximum size of SDLTest log message is less than SDLs limit 58 | * to ensure we can fit additional information such as the timestamp. 59 | */ 60 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 61 | 62 | /* Ends C function definitions when using C++ */ 63 | #ifdef __cplusplus 64 | /* *INDENT-OFF* */ 65 | } 66 | /* *INDENT-ON* */ 67 | #endif 68 | #include "close_code.h" 69 | 70 | #endif /* _SDL_test_h */ 71 | 72 | /* vi: set ts=4 sw=4 expandtab: */ 73 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 43 | extern "C" { 44 | /* *INDENT-ON* */ 45 | #endif 46 | 47 | /** 48 | * \brief Fails the assert. 49 | */ 50 | #define ASSERT_FAIL 0 51 | 52 | /** 53 | * \brief Passes the assert. 54 | */ 55 | #define ASSERT_PASS 1 56 | 57 | /** 58 | * \brief Assert that logs and break execution flow on failures. 59 | * 60 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 61 | * \param assertDescription Message to log with the assert describing it. 62 | */ 63 | void SDLTest_Assert(int assertCondition, const char *assertDescription, ...); 64 | 65 | /** 66 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 67 | * 68 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 69 | * \param assertDescription Message to log with the assert describing it. 70 | * 71 | * \returns Returns the assertCondition so it can be used to externally to break execution flow if desired. 72 | */ 73 | int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...); 74 | 75 | /** 76 | * \brief Explicitely pass without checking an assertion condition. Updates assertion counter. 77 | * 78 | * \param assertDescription Message to log with the assert describing it. 79 | */ 80 | void SDLTest_AssertPass(const char *assertDescription, ...); 81 | 82 | /** 83 | * \brief Resets the assert summary counters to zero. 84 | */ 85 | void SDLTest_ResetAssertSummary(); 86 | 87 | /** 88 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 89 | */ 90 | void SDLTest_LogAssertSummary(); 91 | 92 | 93 | /** 94 | * \brief Converts the current assert summary state to a test result. 95 | * 96 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 97 | */ 98 | int SDLTest_AssertSummaryToTestResult(); 99 | 100 | #ifdef __cplusplus 101 | /* *INDENT-OFF* */ 102 | } 103 | /* *INDENT-ON* */ 104 | #endif 105 | #include "close_code.h" 106 | 107 | #endif /* _SDL_test_assert_h */ 108 | 109 | /* vi: set ts=4 sw=4 expandtab: */ 110 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 47 | extern "C" { 48 | /* *INDENT-ON* */ 49 | #endif 50 | 51 | /** 52 | * \brief Compares a surface and with reference image data for equality 53 | * 54 | * \param surface Surface used in comparison 55 | * \param referenceSurface Test Surface used in comparison 56 | * \param allowable_error Allowable difference (squared) in blending accuracy. 57 | * 58 | * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 59 | */ 60 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | /* *INDENT-OFF* */ 66 | } 67 | /* *INDENT-ON* */ 68 | #endif 69 | #include "close_code.h" 70 | 71 | #endif /* _SDL_test_compare_h */ 72 | 73 | /* vi: set ts=4 sw=4 expandtab: */ 74 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 43 | extern "C" { 44 | /* *INDENT-ON* */ 45 | #endif 46 | 47 | 48 | /* ------------ Definitions --------- */ 49 | 50 | /* Definition shared by all CRC routines */ 51 | 52 | #ifndef CrcUint32 53 | #define CrcUint32 unsigned int 54 | #endif 55 | #ifndef CrcUint8 56 | #define CrcUint8 unsigned char 57 | #endif 58 | 59 | #ifdef ORIGINAL_METHOD 60 | #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ 61 | #else 62 | #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ 63 | #endif 64 | 65 | /** 66 | * Data structure for CRC32 (checksum) computation 67 | */ 68 | typedef struct { 69 | CrcUint32 crc32_table[256]; /* CRC table */ 70 | } SDLTest_Crc32Context; 71 | 72 | /* ---------- Function Prototypes ------------- */ 73 | 74 | /** 75 | * /brief Initialize the CRC context 76 | * 77 | * Note: The function initializes the crc table required for all crc calculations. 78 | * 79 | * /param crcContext pointer to context variable 80 | * 81 | * /returns 0 for OK, -1 on error 82 | * 83 | */ 84 | int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext); 85 | 86 | 87 | /** 88 | * /brief calculate a crc32 from a data block 89 | * 90 | * /param crcContext pointer to context variable 91 | * /param inBuf input buffer to checksum 92 | * /param inLen length of input buffer 93 | * /param crc32 pointer to Uint32 to store the final CRC into 94 | * 95 | * /returns 0 for OK, -1 on error 96 | * 97 | */ 98 | int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 99 | 100 | /* Same routine broken down into three steps */ 101 | int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 102 | int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 103 | int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 104 | 105 | 106 | /** 107 | * /brief clean up CRC context 108 | * 109 | * /param crcContext pointer to context variable 110 | * 111 | * /returns 0 for OK, -1 on error 112 | * 113 | */ 114 | 115 | int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); 116 | 117 | 118 | /* Ends C function definitions when using C++ */ 119 | #ifdef __cplusplus 120 | /* *INDENT-OFF* */ 121 | } 122 | /* *INDENT-ON* */ 123 | #endif 124 | #include "close_code.h" 125 | 126 | #endif /* _SDL_test_crc32_h */ 127 | 128 | /* vi: set ts=4 sw=4 expandtab: */ 129 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 37 | extern "C" { 38 | /* *INDENT-ON* */ 39 | #endif 40 | 41 | /* Function prototypes */ 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 string. 48 | * \param y The Y coordinate of the upper left corner of the string. 49 | * \param s The string to draw. 50 | * 51 | * \returns Returns 0 on success, -1 on failure. 52 | */ 53 | int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s); 54 | 55 | 56 | /* Ends C function definitions when using C++ */ 57 | #ifdef __cplusplus 58 | /* *INDENT-OFF* */ 59 | } 60 | /* *INDENT-ON* */ 61 | #endif 62 | #include "close_code.h" 63 | 64 | #endif /* _SDL_test_font_h */ 65 | 66 | /* vi: set ts=4 sw=4 expandtab: */ 67 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_harness.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_harness.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 | Defines types for test case definitions and the test execution harness API. 32 | 33 | Based on original GSOC code by Markus Kauppila 34 | */ 35 | 36 | #ifndef _SDL_test_harness_h 37 | #define _SDL_test_harness_h 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | /* *INDENT-OFF* */ 43 | extern "C" { 44 | /* *INDENT-ON* */ 45 | #endif 46 | 47 | 48 | //! Definitions for test case structures 49 | #define TEST_ENABLED 1 50 | #define TEST_DISABLED 0 51 | 52 | //! Definition of all the possible test return values of the test case method 53 | #define TEST_ABORTED -1 54 | #define TEST_COMPLETED 0 55 | #define TEST_SKIPPED 1 56 | 57 | //! Definition of all the possible test results for the harness 58 | #define TEST_RESULT_PASSED 0 59 | #define TEST_RESULT_FAILED 1 60 | #define TEST_RESULT_NO_ASSERT 2 61 | #define TEST_RESULT_SKIPPED 3 62 | #define TEST_RESULT_SETUP_FAILURE 4 63 | 64 | //!< Function pointer to a test case setup function (run before every test) 65 | typedef void (*SDLTest_TestCaseSetUpFp)(void *arg); 66 | 67 | //!< Function pointer to a test case function 68 | typedef void (*SDLTest_TestCaseFp)(void *arg); 69 | 70 | //!< Function pointer to a test case teardown function (run after every test) 71 | typedef void (*SDLTest_TestCaseTearDownFp)(void *arg); 72 | 73 | /** 74 | * Holds information about a single test case. 75 | */ 76 | typedef struct SDLTest_TestCaseReference { 77 | /*!< Func2Stress */ 78 | SDLTest_TestCaseFp testCase; 79 | /*!< Short name (or function name) "Func2Stress" */ 80 | char *name; 81 | /*!< Long name or full description "This test pushes func2() to the limit." */ 82 | char *description; 83 | /*!< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */ 84 | int enabled; 85 | } SDLTest_TestCaseReference; 86 | 87 | /** 88 | * Holds information about a test suite (multiple test cases). 89 | */ 90 | typedef struct SDLTest_TestSuiteReference { 91 | /*!< "PlatformSuite" */ 92 | char *name; 93 | /*!< The function that is run before each test. NULL skips. */ 94 | SDLTest_TestCaseSetUpFp testSetUp; 95 | /*!< The test cases that are run as part of the suite. Last item should be NULL. */ 96 | const SDLTest_TestCaseReference **testCases; 97 | /*!< The function that is run after each test. NULL skips. */ 98 | SDLTest_TestCaseTearDownFp testTearDown; 99 | } SDLTest_TestSuiteReference; 100 | 101 | 102 | /** 103 | * \brief Execute a test suite using the given run seed and execution key. 104 | * 105 | * \param testSuites Suites containing the test case. 106 | * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one. 107 | * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one. 108 | * \param filter Filter specification. NULL disables. Case sensitive. 109 | * \param testIterations Number of iterations to run each test case. 110 | * 111 | * \returns Test run result; 0 when all tests passed, 1 if any tests failed. 112 | */ 113 | int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations); 114 | 115 | 116 | /* Ends C function definitions when using C++ */ 117 | #ifdef __cplusplus 118 | /* *INDENT-OFF* */ 119 | } 120 | /* *INDENT-ON* */ 121 | #endif 122 | #include "close_code.h" 123 | 124 | #endif /* _SDL_test_harness_h */ 125 | 126 | /* vi: set ts=4 sw=4 expandtab: */ 127 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 45 | extern "C" { 46 | /* *INDENT-ON* */ 47 | #endif 48 | 49 | /** 50 | *Type for test images. 51 | */ 52 | typedef struct SDLTest_SurfaceImage_s { 53 | int width; 54 | int height; 55 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 56 | const char *pixel_data; 57 | } SDLTest_SurfaceImage_t; 58 | 59 | /* Test images */ 60 | SDL_Surface *SDLTest_ImageBlit(); 61 | SDL_Surface *SDLTest_ImageBlitColor(); 62 | SDL_Surface *SDLTest_ImageBlitAlpha(); 63 | SDL_Surface *SDLTest_ImageBlitBlendAdd(); 64 | SDL_Surface *SDLTest_ImageBlitBlend(); 65 | SDL_Surface *SDLTest_ImageBlitBlendMod(); 66 | SDL_Surface *SDLTest_ImageBlitBlendNone(); 67 | SDL_Surface *SDLTest_ImageBlitBlendAll(); 68 | SDL_Surface *SDLTest_ImageFace(); 69 | SDL_Surface *SDLTest_ImagePrimitives(); 70 | SDL_Surface *SDLTest_ImagePrimitivesBlend(); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | /* *INDENT-OFF* */ 75 | } 76 | /* *INDENT-ON* */ 77 | #endif 78 | #include "close_code.h" 79 | 80 | #endif /* _SDL_test_images_h */ 81 | 82 | /* vi: set ts=4 sw=4 expandtab: */ 83 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 43 | extern "C" { 44 | /* *INDENT-ON* */ 45 | #endif 46 | 47 | /** 48 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 49 | * 50 | * \param fmt Message to be logged 51 | */ 52 | void SDLTest_Log(const char *fmt, ...); 53 | 54 | /** 55 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 56 | * 57 | * \param fmt Message to be logged 58 | */ 59 | void SDLTest_LogError(const char *fmt, ...); 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | /* *INDENT-OFF* */ 64 | } 65 | /* *INDENT-ON* */ 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* _SDL_test_log_h */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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_md5.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 | ** Header file for implementation of MD5 ** 33 | ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** 34 | ** Created: 2/17/90 RLR ** 35 | ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** 36 | ** Revised (for MD5): RLR 4/27/91 ** 37 | ** -- G modified to have y&~z instead of y&z ** 38 | ** -- FF, GG, HH modified to add in last register done ** 39 | ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** 40 | ** -- distinct additive constant for each step ** 41 | ** -- round 4 added, working mod 7 ** 42 | *********************************************************************** 43 | */ 44 | 45 | /* 46 | *********************************************************************** 47 | ** Message-digest routines: ** 48 | ** To form the message digest for a message M ** 49 | ** (1) Initialize a context buffer mdContext using MD5Init ** 50 | ** (2) Call MD5Update on mdContext and M ** 51 | ** (3) Call MD5Final on mdContext ** 52 | ** The message digest is now in mdContext->digest[0...15] ** 53 | *********************************************************************** 54 | */ 55 | 56 | #ifndef _SDL_test_md5_h 57 | #define _SDL_test_md5_h 58 | 59 | #include "begin_code.h" 60 | /* Set up for C function definitions, even when using C++ */ 61 | #ifdef __cplusplus 62 | /* *INDENT-OFF* */ 63 | extern "C" { 64 | /* *INDENT-ON* */ 65 | #endif 66 | 67 | /* ------------ Definitions --------- */ 68 | 69 | /* typedef a 32-bit type */ 70 | typedef unsigned long int MD5UINT4; 71 | 72 | /* Data structure for MD5 (Message-Digest) computation */ 73 | typedef struct { 74 | MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ 75 | MD5UINT4 buf[4]; /* scratch buffer */ 76 | unsigned char in[64]; /* input buffer */ 77 | unsigned char digest[16]; /* actual digest after Md5Final call */ 78 | } SDLTest_Md5Context; 79 | 80 | /* ---------- Function Prototypes ------------- */ 81 | 82 | /** 83 | * /brief initialize the context 84 | * 85 | * /param mdContext pointer to context variable 86 | * 87 | * Note: The function initializes the message-digest context 88 | * mdContext. Call before each new use of the context - 89 | * all fields are set to zero. 90 | */ 91 | void SDLTest_Md5Init(SDLTest_Md5Context * mdContext); 92 | 93 | 94 | /** 95 | * /brief update digest from variable length data 96 | * 97 | * /param mdContext pointer to context variable 98 | * /param inBuf pointer to data array/string 99 | * /param inLen length of data array/string 100 | * 101 | * Note: The function updates the message-digest context to account 102 | * for the presence of each of the characters inBuf[0..inLen-1] 103 | * in the message whose digest is being computed. 104 | */ 105 | 106 | void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, 107 | unsigned int inLen); 108 | 109 | 110 | /* 111 | * /brief complete digest computation 112 | * 113 | * /param mdContext pointer to context variable 114 | * 115 | * Note: The function terminates the message-digest computation and 116 | * ends with the desired message digest in mdContext.digest[0..15]. 117 | * Always call before using the digest[] variable. 118 | */ 119 | 120 | void SDLTest_Md5Final(SDLTest_Md5Context * mdContext); 121 | 122 | 123 | /* Ends C function definitions when using C++ */ 124 | #ifdef __cplusplus 125 | /* *INDENT-OFF* */ 126 | } 127 | /* *INDENT-ON* */ 128 | #endif 129 | #include "close_code.h" 130 | 131 | #endif /* _SDL_test_md5_h */ 132 | 133 | /* vi: set ts=4 sw=4 expandtab: */ 134 | -------------------------------------------------------------------------------- /external/SDL2/SDL_test_random.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 47 | extern "C" { 48 | /* *INDENT-ON* */ 49 | #endif 50 | 51 | /* --- Definitions */ 52 | 53 | /* 54 | * Macros that return a random number in a specific format. 55 | */ 56 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 57 | 58 | /* 59 | * Context structure for the random number generator state. 60 | */ 61 | typedef struct { 62 | unsigned int a; 63 | unsigned int x; 64 | unsigned int c; 65 | unsigned int ah; 66 | unsigned int al; 67 | } SDLTest_RandomContext; 68 | 69 | 70 | /* --- Function prototypes */ 71 | 72 | /** 73 | * \brief Initialize random number generator with two integers. 74 | * 75 | * Note: The random sequence of numbers returned by ...Random() is the 76 | * same for the same two integers and has a period of 2^31. 77 | * 78 | * \param rndContext pointer to context structure 79 | * \param xi integer that defines the random sequence 80 | * \param ci integer that defines the random sequence 81 | * 82 | */ 83 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 84 | unsigned int ci); 85 | 86 | /** 87 | * \brief Initialize random number generator based on current system time. 88 | * 89 | * \param rndContext pointer to context structure 90 | * 91 | */ 92 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 93 | 94 | 95 | /** 96 | * \brief Initialize random number generator based on current system time. 97 | * 98 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 99 | * before using this function. 100 | * 101 | * \param rndContext pointer to context structure 102 | * 103 | * \returns A random number (32bit unsigned integer) 104 | * 105 | */ 106 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 107 | 108 | 109 | /* Ends C function definitions when using C++ */ 110 | #ifdef __cplusplus 111 | /* *INDENT-OFF* */ 112 | } 113 | /* *INDENT-ON* */ 114 | #endif 115 | #include "close_code.h" 116 | 117 | #endif /* _SDL_test_random_h */ 118 | 119 | /* vi: set ts=4 sw=4 expandtab: */ 120 | -------------------------------------------------------------------------------- /external/SDL2/SDL_timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 38 | extern "C" { 39 | /* *INDENT-ON* */ 40 | #endif 41 | 42 | /** 43 | * \brief Get the number of milliseconds since the SDL library initialization. 44 | * 45 | * \note This value wraps if the program runs for more than ~49 days. 46 | */ 47 | extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); 48 | 49 | /** 50 | * \brief Get the current value of the high resolution counter 51 | */ 52 | extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); 53 | 54 | /** 55 | * \brief Get the count per second of the high resolution counter 56 | */ 57 | extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); 58 | 59 | /** 60 | * \brief Wait a specified number of milliseconds before returning. 61 | */ 62 | extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); 63 | 64 | /** 65 | * Function prototype for the timer callback function. 66 | * 67 | * The callback function is passed the current timer interval and returns 68 | * the next timer interval. If the returned value is the same as the one 69 | * passed in, the periodic alarm continues, otherwise a new alarm is 70 | * scheduled. If the callback returns 0, the periodic alarm is cancelled. 71 | */ 72 | typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param); 73 | 74 | /** 75 | * Definition of the timer ID type. 76 | */ 77 | typedef int SDL_TimerID; 78 | 79 | /** 80 | * \brief Add a new timer to the pool of timers already running. 81 | * 82 | * \return A timer ID, or NULL when an error occurs. 83 | */ 84 | extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, 85 | SDL_TimerCallback callback, 86 | void *param); 87 | 88 | /** 89 | * \brief Remove a timer knowing its ID. 90 | * 91 | * \return A boolean value indicating success or failure. 92 | * 93 | * \warning It is not safe to remove a timer multiple times. 94 | */ 95 | extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); 96 | 97 | 98 | /* Ends C function definitions when using C++ */ 99 | #ifdef __cplusplus 100 | /* *INDENT-OFF* */ 101 | } 102 | /* *INDENT-ON* */ 103 | #endif 104 | #include "close_code.h" 105 | 106 | #endif /* _SDL_timer_h */ 107 | 108 | /* vi: set ts=4 sw=4 expandtab: */ 109 | -------------------------------------------------------------------------------- /external/SDL2/SDL_touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | /* *INDENT-OFF* */ 39 | extern "C" { 40 | /* *INDENT-ON* */ 41 | #endif 42 | 43 | typedef Sint64 SDL_TouchID; 44 | typedef Sint64 SDL_FingerID; 45 | 46 | typedef struct SDL_Finger 47 | { 48 | SDL_FingerID id; 49 | float x; 50 | float y; 51 | float pressure; 52 | } SDL_Finger; 53 | 54 | /* Used as the device ID for mouse events simulated with touch input */ 55 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 56 | 57 | 58 | /* Function prototypes */ 59 | 60 | /** 61 | * \brief Get the number of registered touch devices. 62 | */ 63 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(); 64 | 65 | /** 66 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 67 | */ 68 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 69 | 70 | /** 71 | * \brief Get the number of active fingers for a given touch device. 72 | */ 73 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 74 | 75 | /** 76 | * \brief Get the finger object of the given touch, with the given index. 77 | */ 78 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 79 | 80 | /* Ends C function definitions when using C++ */ 81 | #ifdef __cplusplus 82 | /* *INDENT-OFF* */ 83 | } 84 | /* *INDENT-ON* */ 85 | #endif 86 | #include "close_code.h" 87 | 88 | #endif /* _SDL_touch_h */ 89 | 90 | /* vi: set ts=4 sw=4 expandtab: */ 91 | -------------------------------------------------------------------------------- /external/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 | -------------------------------------------------------------------------------- /external/SDL2/begin_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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 begin_code.h 24 | * 25 | * This file sets things up for C dynamic library function definitions, 26 | * static inlined functions, and structures aligned at 4-byte alignment. 27 | * If you don't like ugly C preprocessor code, don't look at this file. :) 28 | */ 29 | 30 | /* This shouldn't be nested -- included it around code only. */ 31 | #ifdef _begin_code_h 32 | #error Nested inclusion of begin_code.h 33 | #endif 34 | #define _begin_code_h 35 | 36 | /* Some compilers use a special export keyword */ 37 | #ifndef DECLSPEC 38 | # if defined(__BEOS__) || defined(__HAIKU__) 39 | # if defined(__GNUC__) 40 | # define DECLSPEC __declspec(dllexport) 41 | # else 42 | # define DECLSPEC __declspec(export) 43 | # endif 44 | # elif defined(__WIN32__) 45 | # ifdef __BORLANDC__ 46 | # ifdef BUILD_SDL 47 | # define DECLSPEC 48 | # else 49 | # define DECLSPEC __declspec(dllimport) 50 | # endif 51 | # else 52 | # define DECLSPEC __declspec(dllexport) 53 | # endif 54 | # else 55 | # if defined(__GNUC__) && __GNUC__ >= 4 56 | # define DECLSPEC __attribute__ ((visibility("default"))) 57 | # else 58 | # define DECLSPEC 59 | # endif 60 | # endif 61 | #endif 62 | 63 | /* By default SDL uses the C calling convention */ 64 | #ifndef SDLCALL 65 | #if defined(__WIN32__) && !defined(__GNUC__) 66 | #define SDLCALL __cdecl 67 | #else 68 | #define SDLCALL 69 | #endif 70 | #endif /* SDLCALL */ 71 | 72 | /* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */ 73 | #ifdef __SYMBIAN32__ 74 | #undef DECLSPEC 75 | #define DECLSPEC 76 | #endif /* __SYMBIAN32__ */ 77 | 78 | /* Force structure packing at 4 byte alignment. 79 | This is necessary if the header is included in code which has structure 80 | packing set to an alternate value, say for loading structures from disk. 81 | The packing is reset to the previous value in close_code.h 82 | */ 83 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 84 | #ifdef _MSC_VER 85 | #pragma warning(disable: 4103) 86 | #endif 87 | #ifdef __BORLANDC__ 88 | #pragma nopackwarning 89 | #endif 90 | #ifdef _M_X64 91 | /* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */ 92 | #pragma pack(push,8) 93 | #else 94 | #pragma pack(push,4) 95 | #endif 96 | #endif /* Compiler needs structure packing set */ 97 | 98 | /* Set up compiler-specific options for inlining functions */ 99 | #ifndef SDL_INLINE_OKAY 100 | #ifdef __GNUC__ 101 | #define SDL_INLINE_OKAY 102 | #else 103 | /* Add any special compiler-specific cases here */ 104 | #if defined(_MSC_VER) || defined(__BORLANDC__) || \ 105 | defined(__DMC__) || defined(__SC__) || \ 106 | defined(__WATCOMC__) || defined(__LCC__) || \ 107 | defined(__DECC) 108 | #ifndef __inline__ 109 | #define __inline__ __inline 110 | #endif 111 | #define SDL_INLINE_OKAY 112 | #else 113 | #if !defined(__MRC__) && !defined(_SGI_SOURCE) 114 | #ifndef __inline__ 115 | #define __inline__ inline 116 | #endif 117 | #define SDL_INLINE_OKAY 118 | #endif /* Not a funky compiler */ 119 | #endif /* Visual C++ */ 120 | #endif /* GNU C */ 121 | #endif /* SDL_INLINE_OKAY */ 122 | 123 | /* If inlining isn't supported, remove "__inline__", turning static 124 | inlined functions into static functions (resulting in code bloat 125 | in all files which include the offending header files) 126 | */ 127 | #ifndef SDL_INLINE_OKAY 128 | #define __inline__ 129 | #endif 130 | 131 | #ifndef SDL_FORCE_INLINE 132 | #if defined(_MSC_VER) 133 | #define SDL_FORCE_INLINE __forceinline 134 | #elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) ) 135 | #define SDL_FORCE_INLINE __attribute__((always_inline)) static inline 136 | #else 137 | #define SDL_FORCE_INLINE static __inline__ 138 | #endif 139 | #endif 140 | 141 | /* Apparently this is needed by several Windows compilers */ 142 | #if !defined(__MACH__) 143 | #ifndef NULL 144 | #ifdef __cplusplus 145 | #define NULL 0 146 | #else 147 | #define NULL ((void *)0) 148 | #endif 149 | #endif /* NULL */ 150 | #endif /* ! Mac OS X - breaks precompiled headers */ 151 | -------------------------------------------------------------------------------- /external/SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2013 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(__WATCOMC__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /external/SDL2/merge_sdl2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | p4 integ -i -d -Dt //steam/rel/client/src/external/SDL2/... //ValveGames/main/GoldSrc/external/SDL2/... 4 | p4 integ -i -d -Dt //steam/rel/client/client/osx32/libsdl... //ValveGames/rel/goldsource/hl1/game/libsdl... 5 | p4 integ -i -d -Dt //steam/rel/client/client/osx32/libsdl... //ValveGames/main/GoldSrc/linux/libsdl... 6 | p4 integ -i -d -Dt //steam/rel/client/client/ubuntu12_32/libsdl... //ValveGames/rel/goldsource/hl1/game/libsdl... 7 | p4 integ -i -d -Dt //steam/rel/client/client/ubuntu12_32/libsdl... //ValveGames/main/GoldSrc/linux/libsdl... 8 | 9 | p4 integ -i -d -Dt //steam/rel/client/client/sdl... //ValveGames/rel/goldsource/hl1/game/sdl... 10 | p4 resolve -am //ValveGames/main/GoldSrc/external/SDL2/... 11 | p4 resolve -at //ValveGames/rel/goldsource/hl1/game/sdl... //ValveGames/rel/goldsource/hl1/game/libsdl... //ValveGames/main/GoldSrc/linux/libsdl... 12 | -------------------------------------------------------------------------------- /external/SPTLib/DetoursUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "sptlib-stdafx.hpp" 2 | 3 | #include "DetoursUtils.hpp" 4 | #include 5 | 6 | namespace DetoursUtils 7 | { 8 | using namespace std; 9 | 10 | static map tramp_to_original; 11 | static mutex tramp_to_original_mutex; 12 | 13 | void AttachDetours(const wstring& moduleName, size_t n, const pair funcPairs[]) 14 | { 15 | size_t hook_count = 0; 16 | for (size_t i = 0; i < n; ++i) 17 | { 18 | void** target = funcPairs[i].first; 19 | void* detour = funcPairs[i].second; 20 | assert(target); 21 | 22 | if (*target && detour) 23 | { 24 | void* original = *target; 25 | auto status = MH_CreateHook(original, detour, target); 26 | if (status != MH_OK) 27 | { 28 | continue; 29 | } 30 | 31 | status = MH_QueueEnableHook(original); 32 | if (status != MH_OK) 33 | { 34 | continue; 35 | } 36 | 37 | { 38 | lock_guard lock(tramp_to_original_mutex); 39 | tramp_to_original[*target] = original; 40 | } 41 | hook_count++; 42 | } 43 | } 44 | 45 | if (hook_count == 0) 46 | { 47 | return; 48 | } 49 | } 50 | 51 | void DetachDetours(const wstring& moduleName, size_t n, void** const functions[]) 52 | { 53 | size_t hook_count = 0; 54 | for (size_t i = 0; i < n; ++i) 55 | { 56 | void** tramp = functions[i]; 57 | assert(tramp); 58 | 59 | if (*tramp) 60 | { 61 | void* original; 62 | { 63 | lock_guard lock(tramp_to_original_mutex); 64 | original = tramp_to_original[*tramp]; 65 | tramp_to_original.erase(*tramp); 66 | } 67 | 68 | auto status = MH_RemoveHook(original); 69 | if (status != MH_OK) 70 | { 71 | continue; 72 | } 73 | 74 | *tramp = original; 75 | hook_count++; 76 | } 77 | } 78 | 79 | if (!hook_count) 80 | { 81 | return; 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /external/SPTLib/DetoursUtils.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | // This is used only by SPTLib itself and we know that every SPTLib .cpp file contains 5 | // a sptlib-stdafx.hpp include in the very beginning, which has all the required headers. 6 | 7 | namespace DetoursUtils 8 | { 9 | void AttachDetours(const std::wstring& moduleName, size_t n, const std::pair funcPairs[]); 10 | void DetachDetours(const std::wstring& moduleName, size_t n, void** const functions[]); 11 | } -------------------------------------------------------------------------------- /external/SPTLib/Utils.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MemUtils.h" 3 | #include "patterns.hpp" 4 | #include 5 | 6 | typedef struct Utils { 7 | Utils(void* handle, void* base, size_t length) { 8 | this->m_Handle = handle; 9 | this->m_Base = base; 10 | this->m_Length = length; 11 | } 12 | 13 | template 14 | inline auto FindAsync( 15 | Result& address, 16 | const std::array& patterns) 17 | { 18 | return MemUtils::find_unique_sequence_async( 19 | reinterpret_cast(address), 20 | m_Base, 21 | m_Length, 22 | patterns.cbegin(), 23 | patterns.cend()); 24 | } 25 | 26 | template 27 | inline auto FindAsync( 28 | Result& address, 29 | const std::array& patterns, 30 | std::function::const_iterator)> onFound) 31 | { 32 | return MemUtils::find_unique_sequence_async( 33 | reinterpret_cast(address), 34 | m_Base, 35 | m_Length, 36 | patterns.cbegin(), 37 | patterns.cend(), 38 | onFound); 39 | } 40 | 41 | template 42 | inline auto FindFunctionAsync( 43 | Result& address, 44 | const char* name, 45 | const std::array& patterns) 46 | { 47 | return MemUtils::find_function_async( 48 | reinterpret_cast(address), 49 | m_Handle, 50 | name, 51 | m_Base, 52 | m_Length, 53 | patterns.cbegin(), 54 | patterns.cend()); 55 | } 56 | 57 | template 58 | inline auto FindFunctionAsync( 59 | Result& address, 60 | const char* name, 61 | const std::array& patterns, 62 | std::function::const_iterator)> onFound) 63 | { 64 | return MemUtils::find_function_async( 65 | reinterpret_cast(address), 66 | m_Handle, 67 | name, 68 | m_Base, 69 | m_Length, 70 | patterns.cbegin(), 71 | patterns.cend(), 72 | onFound); 73 | } 74 | 75 | protected: 76 | void* m_Handle; 77 | void* m_Base; 78 | size_t m_Length; 79 | } Utils; -------------------------------------------------------------------------------- /external/SPTLib/sptlib-stdafx.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef _WIN32 4 | #define WIN32_LEAN_AND_MEAN 5 | #define NOMINMAX 6 | #include 7 | #include 8 | #include "MinHook/MinHook.h" 9 | #pragma comment( lib, "psapi.lib" ) 10 | #endif 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | using std::uintptr_t; 31 | using std::size_t; 32 | 33 | #define stricmp _stricmp -------------------------------------------------------------------------------- /external/avikit/lib/avikit.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/external/avikit/lib/avikit.lib -------------------------------------------------------------------------------- /launcher/goldsrc_hook.cpp: -------------------------------------------------------------------------------- 1 | #include "goldsrc_hook.h" 2 | 3 | #include "MinHook.h" 4 | #include "Utils.hpp" 5 | 6 | #include "imgui_manager.hpp" 7 | 8 | #include 9 | 10 | CImGuiManager imgui; 11 | 12 | _SDL_CreateWindow ORIG_SDL_CreateWindow = NULL; 13 | _SDL_GL_SwapWindow ORIG_SDL_GL_SwapWindow = NULL; 14 | SDL_Window* goldsrcWindow; 15 | 16 | //----------------------------------------------------------------------------- 17 | // By hooking SDL_CreateWindow we set attributes and init ImGUI backends 18 | // Result: goldsrcWindow (original SDL_Window* from engine) 19 | //----------------------------------------------------------------------------- 20 | SDL_Window* HOOKED_SDL_CreateWindow(const char* title, int x, int y, int w, int h, Uint32 flags) 21 | { 22 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); 23 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); 24 | SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); 25 | 26 | goldsrcWindow = ORIG_SDL_CreateWindow(title, x, y, w, h, flags); 27 | 28 | imgui.InitBackends(goldsrcWindow); 29 | 30 | return goldsrcWindow; 31 | } 32 | 33 | //----------------------------------------------------------------------------- 34 | // By hooking SDL_GL_SwapWindow we can render ImGui 35 | //----------------------------------------------------------------------------- 36 | void HOOKED_SDL_GL_SwapWindow(SDL_Window* window) 37 | { 38 | imgui.Draw(window); 39 | ORIG_SDL_GL_SwapWindow(window); 40 | } 41 | 42 | //----------------------------------------------------------------------------- 43 | // Hook SDL2.dll 44 | //----------------------------------------------------------------------------- 45 | void HookSDL2() 46 | { 47 | // Get SDL functions 48 | HMODULE hSdl2 = GetModuleHandle("SDL2.dll"); 49 | ORIG_SDL_CreateWindow = (_SDL_CreateWindow)GetProcAddress(hSdl2, "SDL_CreateWindow"); 50 | ORIG_SDL_GL_SwapWindow = (_SDL_GL_SwapWindow)GetProcAddress(hSdl2, "SDL_GL_SwapWindow"); 51 | 52 | if (ORIG_SDL_CreateWindow) 53 | printf("[SDL2.dll] Got SDL_CreateWindow! Setting up stencil buffer...\n"); 54 | else 55 | printf("[SDL2.dll] Can't get SDL_CreateWindow! There will be no stencil buffer.\n"); 56 | 57 | if (ORIG_SDL_GL_SwapWindow) 58 | printf("[SDL2.dll] Got SDL_GL_SwapWindow! Now you can use ImGUI...\n"); 59 | else 60 | printf("[SDL2.dll] Can't get SDL_GL_SwapWindow! There will be no ImGUI.\n"); 61 | 62 | if (ORIG_SDL_CreateWindow) 63 | { 64 | void* pSDL_CreateWindow = (void*)ORIG_SDL_CreateWindow; 65 | MH_CreateHook(pSDL_CreateWindow, (void*)HOOKED_SDL_CreateWindow, (void**)&ORIG_SDL_CreateWindow); 66 | MH_EnableHook(pSDL_CreateWindow); 67 | } 68 | 69 | if (ORIG_SDL_GL_SwapWindow) 70 | { 71 | imgui.Init(); 72 | 73 | void* pSDL_GL_SwapWindow = (void*)ORIG_SDL_GL_SwapWindow; 74 | MH_CreateHook(pSDL_GL_SwapWindow, (void*)HOOKED_SDL_GL_SwapWindow, (void**)&ORIG_SDL_GL_SwapWindow); 75 | MH_EnableHook(pSDL_GL_SwapWindow); 76 | 77 | SDL_AddEventWatch(ImGui_ProcessEvent, NULL); 78 | } 79 | } 80 | 81 | //----------------------------------------------------------------------------- 82 | // Hook hw.dll 83 | //----------------------------------------------------------------------------- 84 | void HookEngine() 85 | { 86 | void* handle; 87 | void* base; 88 | size_t size; 89 | 90 | if (!MemUtils::GetModuleInfo(L"hw.dll", &handle, &base, &size)) 91 | { 92 | printf("[hl.exe] Can't get module info about hw.dll! Stopping hooking...\n"); 93 | return; 94 | } 95 | 96 | Utils utils = Utils::Utils(handle, base, size); 97 | printf("[hl.exe] Hooked hw.dll!\n"); 98 | } 99 | -------------------------------------------------------------------------------- /launcher/goldsrc_hook.h: -------------------------------------------------------------------------------- 1 | #ifdef GOLDSRC_HOOK_H_RECURSE_GUARD 2 | #error Recursive header files inclusion detected in goldsrc_hook.h 3 | #else //GOLDSRC_HOOK_H_RECURSE_GUARD 4 | 5 | #define GOLDSRC_HOOK_H_RECURSE_GUARD 6 | 7 | #ifndef GOLDSRC_HOOK_H_GUARD 8 | #define GOLDSRC_HOOK_H_GUARD 9 | #pragma once 10 | 11 | #include "SDL2/SDL.h" 12 | 13 | typedef SDL_Window* (*_SDL_CreateWindow)(const char* title, int x, int y, int w, int h, Uint32 flags); 14 | typedef void (*_SDL_GL_SwapWindow)(SDL_Window* window); 15 | 16 | extern _SDL_CreateWindow ORIG_SDL_CreateWindow; 17 | extern _SDL_GL_SwapWindow ORIG_SDL_GL_SwapWindow; 18 | 19 | void HookSDL2(); 20 | void HookEngine(); 21 | 22 | #endif //GOLDSRC_HOOK_H_GUARD 23 | 24 | #undef GOLDSRC_HOOK_H_RECURSE_GUARD 25 | #endif //GOLDSRC_HOOK_H_RECURSE_GUARD -------------------------------------------------------------------------------- /launcher/goldsrc_patterns.hpp: -------------------------------------------------------------------------------- 1 | #ifdef GOLDSRC_PATTERNS_HPP_RECURSE_GUARD 2 | #error Recursive header files inclusion detected in goldsrc_patterns.hpp 3 | #else //GOLDSRC_PATTERNS_HPP_RECURSE_GUARD 4 | 5 | #define GOLDSRC_PATTERNS_HPP_RECURSE_GUARD 6 | 7 | #ifndef GOLDSRC_PATTERNS_HPP_GUARD 8 | #define GOLDSRC_PATTERNS_HPP_GUARD 9 | #pragma once 10 | 11 | #include "patterns.hpp" 12 | #include "MemUtils.h" 13 | 14 | namespace patterns 15 | { 16 | namespace engine 17 | { 18 | PATTERNS(AdjustWindowForMode, 19 | "GoldSrc-8684", 20 | "53 56 8B F1 57 8B 06 FF 50 ??"); 21 | } 22 | } 23 | 24 | #endif //GOLDSRC_PATTERNS_HPP_GUARD 25 | 26 | #undef GOLDSRC_PATTERNS_HPP_RECURSE_GUARD 27 | #endif //GOLDSRC_PATTERNS_HPP_RECURSE_GUARD -------------------------------------------------------------------------------- /launcher/hl.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/launcher/hl.aps -------------------------------------------------------------------------------- /launcher/hl.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/launcher/hl.ico -------------------------------------------------------------------------------- /launcher/hl.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/launcher/hl.rc -------------------------------------------------------------------------------- /launcher/imgui_manager.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui_manager.hpp" 2 | 3 | #include 4 | #include 5 | #include "SDL2/SDL_opengl.h" 6 | 7 | //----------------------------------------------------------------------------- 8 | // Initialize ImGui by creating context 9 | //----------------------------------------------------------------------------- 10 | void CImGuiManager::Init() 11 | { 12 | IMGUI_CHECKVERSION(); 13 | ImGui::CreateContext(); 14 | ImGuiIO& io = ImGui::GetIO(); 15 | (void)io; 16 | 17 | io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange; 18 | } 19 | 20 | //----------------------------------------------------------------------------- 21 | // Initialize OpenGL2/SDL2 backends of ImGui 22 | //----------------------------------------------------------------------------- 23 | void CImGuiManager::InitBackends(SDL_Window* window) 24 | { 25 | ImGui_ImplOpenGL2_Init(); 26 | ImGui_ImplSDL2_InitForOpenGL(window, ImGui::GetCurrentContext()); 27 | 28 | // Do other things... 29 | } 30 | 31 | //----------------------------------------------------------------------------- 32 | // Draw ImGui elements 33 | //----------------------------------------------------------------------------- 34 | void CImGuiManager::Draw(SDL_Window* window) 35 | { 36 | ImGui_ImplOpenGL2_NewFrame(); 37 | ImGui_ImplSDL2_NewFrame(window); 38 | ImGui::NewFrame(); 39 | 40 | // Here you draw... 41 | // ------------------------- 42 | 43 | ImGui::ShowDemoWindow(); 44 | 45 | // ------------------------- 46 | 47 | glViewport(0, 0, (int)ImGui::GetIO().DisplaySize.x, (int)ImGui::GetIO().DisplaySize.y); 48 | ImGui::Render(); 49 | ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData()); 50 | } 51 | 52 | //----------------------------------------------------------------------------- 53 | // ImGui process event for SDL2 54 | //----------------------------------------------------------------------------- 55 | int ImGui_ProcessEvent(void* data, SDL_Event* event) 56 | { 57 | return ImGui_ImplSDL2_ProcessEvent(event); 58 | } -------------------------------------------------------------------------------- /launcher/imgui_manager.hpp: -------------------------------------------------------------------------------- 1 | #ifdef IMGUI_MANAGER_HPP_RECURSE_GUARD 2 | #error Recursive header files inclusion detected in imgui_manager.hpp 3 | #else //IMGUI_MANAGER_HPP_RECURSE_GUARD 4 | 5 | #define IMGUI_MANAGER_HPP_RECURSE_GUARD 6 | 7 | #ifndef IMGUI_MANAGER_HPP_GUARD 8 | #define IMGUI_MANAGER_HPP_GUARD 9 | #pragma once 10 | 11 | #include "ImGUI/imgui.h" 12 | #include "ImGUI/imgui_impl_sdl.h" 13 | #include "ImGUI/imgui_impl_opengl2.h" 14 | 15 | class CImGuiManager 16 | { 17 | public: 18 | void Init(); 19 | void InitBackends(SDL_Window* window); 20 | void Draw(SDL_Window* window); 21 | }; 22 | 23 | int ImGui_ProcessEvent(void* data, SDL_Event* event); 24 | 25 | #endif //IMGUI_MANAGER_HPP_GUARD 26 | 27 | #undef IMGUI_MANAGER_HPP_RECURSE_GUARD 28 | #endif //IMGUI_MANAGER_HPP_RECURSE_GUARD -------------------------------------------------------------------------------- /launcher/launcher.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | C:\Program Files (x86)\Steam\steamapps\common\Half-Life\hl.exe 5 | -textmode -windowed -dev 6 | C:\Program Files (x86)\Steam\steamapps\common\Half-Life 7 | WindowsLocalDebugger 8 | 9 | 10 | C:\Program Files (x86)\Steam\steamapps\common\Half-Life\hl.exe 11 | -textmode -windowed -dev 12 | C:\Program Files (x86)\Steam\steamapps\common\Half-Life 13 | WindowsLocalDebugger 14 | 15 | -------------------------------------------------------------------------------- /launcher/plugins_loader.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include "plugins_loader.hpp" 6 | 7 | void CPluginsLoader::InitializePlugin(HMODULE plugin) 8 | { 9 | // TODO: implement - ScriptedSnark 10 | } 11 | 12 | void CPluginsLoader::LoadPlugins() 13 | { 14 | // TODO: implement - ScriptedSnark 15 | } -------------------------------------------------------------------------------- /launcher/plugins_loader.hpp: -------------------------------------------------------------------------------- 1 | #ifdef PLUGINS_LOADER_HPP_RECURSE_GUARD 2 | #error Recursive header files inclusion detected in PLUGINS_loader.hpp 3 | #else //PLUGINS_LOADER_HPP_RECURSE_GUARD 4 | 5 | #define PLUGINS_LOADER_HPP_RECURSE_GUARD 6 | 7 | #ifndef PLUGINS_LOADER_HPP_GUARD 8 | #define PLUGINS_LOADER_HPP_GUARD 9 | #pragma once 10 | 11 | class CPluginsLoader 12 | { 13 | public: 14 | void InitializePlugin(HMODULE PLUGINS); 15 | void LoadPlugins(); 16 | }; 17 | 18 | #endif //PLUGINS_LOADER_HPP_GUARD 19 | 20 | #undef PLUGINS_LOADER_HPP_RECURSE_GUARD 21 | #endif //PLUGINS_LOADER_HPP_RECURSE_GUARD -------------------------------------------------------------------------------- /launcher/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/launcher/resource.h -------------------------------------------------------------------------------- /projects/projects.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31515.178 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "launcher", "..\launcher\launcher.vcxproj", "{F880720B-EB5C-4EB5-AD24-A256B4E9A973}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F880720B-EB5C-4EB5-AD24-A256B4E9A973}.Debug|x86.ActiveCfg = Debug|Win32 15 | {F880720B-EB5C-4EB5-AD24-A256B4E9A973}.Debug|x86.Build.0 = Debug|Win32 16 | {F880720B-EB5C-4EB5-AD24-A256B4E9A973}.Release|x86.ActiveCfg = Release|Win32 17 | {F880720B-EB5C-4EB5-AD24-A256B4E9A973}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E1BDCF59-021F-465A-A47C-0AA8FCF27D90} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /public/FileSystem_Helpers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/FileSystem_Helpers.cpp -------------------------------------------------------------------------------- /public/FileSystem_Helpers.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/FileSystem_Helpers.h -------------------------------------------------------------------------------- /public/IRegistry.h: -------------------------------------------------------------------------------- 1 | #ifndef PUBLIC_IREGISTRY_H 2 | #define PUBLIC_IREGISTRY_H 3 | 4 | /** 5 | * Provides access to the registry. 6 | */ 7 | class IRegistry 8 | { 9 | public: 10 | /** 11 | * Initializes the registry. 12 | */ 13 | virtual void Init() = 0; 14 | 15 | /** 16 | * Shuts down the registry. 17 | */ 18 | virtual void Shutdown() = 0; 19 | 20 | virtual int ReadInt( const char* key, int defaultValue ) = 0; 21 | virtual void WriteInt( const char* key, int value ) = 0; 22 | 23 | virtual const char* ReadString( const char* key, const char* defaultValue ) = 0; 24 | virtual void WriteString( const char* key, const char* string ) = 0; 25 | }; 26 | 27 | /** 28 | * Global registry instance. 29 | */ 30 | extern IRegistry* registry; 31 | 32 | #endif //PUBLIC_IREGISTRY_H 33 | -------------------------------------------------------------------------------- /public/archtypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // Word size dependent definitions 3 | // DAL 1/03 4 | // 5 | #ifndef ARCHTYPES_H 6 | #define ARCHTYPES_H 7 | 8 | #include "../public/steam/steamtypes.h" 9 | 10 | #ifndef _WIN32 11 | #define MAX_PATH PATH_MAX 12 | #include 13 | #include 14 | #include 15 | #include 16 | #define _S_IREAD S_IREAD 17 | #define _S_IWRITE S_IWRITE 18 | typedef long unsigned int ulong; 19 | #endif 20 | 21 | #endif // ARCHTYPES_H 22 | -------------------------------------------------------------------------------- /public/engine_launcher_api.h: -------------------------------------------------------------------------------- 1 | #ifndef PUBLIC_ENGINE_LAUNCHER_API_H 2 | #define PUBLIC_ENGINE_LAUNCHER_API_H 3 | 4 | #include "interface.h" 5 | 6 | /** 7 | * Interface exposed by the engine to the launcher. 8 | */ 9 | class IEngineAPI : public IBaseInterface 10 | { 11 | public: 12 | virtual int Run( void* instance, char* basedir, char* cmdline, char* postRestartCmdLineArgs, CreateInterfaceFn launcherFactory, CreateInterfaceFn filesystemFactory ) = 0; 13 | }; 14 | 15 | #define ENGINE_LAUNCHER_INTERFACE_VERSION "VENGINE_LAUNCHER_API_VERSION002" 16 | 17 | #endif //PUBLIC_ENGINE_LAUNCHER_API_H 18 | -------------------------------------------------------------------------------- /public/registry.h: -------------------------------------------------------------------------------- 1 | #ifndef PUBLIC_REGISTRY_H 2 | #define PUBLIC_REGISTRY_H 3 | 4 | #ifndef WIN32 5 | #include 6 | 7 | #include 8 | #endif 9 | 10 | #include "IRegistry.h" 11 | 12 | class CRegistry final : public IRegistry 13 | { 14 | private: 15 | struct KV 16 | { 17 | char key[ 64 ]; 18 | char value[ 64 ]; 19 | }; 20 | 21 | public: 22 | CRegistry() = default; 23 | ~CRegistry() = default; 24 | 25 | void Init() override; 26 | void Shutdown() override; 27 | 28 | int ReadInt( const char* key, int defaultValue ) override; 29 | void WriteInt( const char* key, int value ) override; 30 | 31 | const char* ReadString( const char* key, const char* defaultValue ) override; 32 | void WriteString( const char* key, const char* string ) override; 33 | 34 | private: 35 | #ifndef WIN32 36 | void LoadKeyValuesFromDisk(); 37 | void WriteKeyValuesToDisk(); 38 | void GetKeyValues(); 39 | #endif 40 | 41 | private: 42 | #ifdef WIN32 43 | HKEY m_hKey = NULL; 44 | bool m_bInitialized = false; 45 | #else 46 | bool m_bValid = false; 47 | int m_hKey = 0; 48 | FILE* m_fConfig = nullptr; 49 | CUtlVector m_vecValues; 50 | #endif 51 | }; 52 | 53 | #endif //PUBLIC_REGISTRY_H 54 | -------------------------------------------------------------------------------- /public/steam/friends/IFriendsUser.h: -------------------------------------------------------------------------------- 1 | #ifndef STEAM_FRIENDS_IFRIENDSUSER_H 2 | #define STEAM_FRIENDS_IFRIENDSUSER_H 3 | 4 | /** 5 | * Steam Friends interface 6 | * TODO: not used in GameUI, probably never loaded in - Solokiller 7 | */ 8 | class IFriendsUser 9 | { 10 | public: 11 | }; 12 | 13 | #define FRIENDSUSER_INTERFACE_VERSION "FriendsUser001" 14 | 15 | #endif //STEAM_FRIENDS_IFRIENDSUSER_H 16 | -------------------------------------------------------------------------------- /public/steam/isteamcontroller.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: interface to valve controller 4 | // 5 | //============================================================================= 6 | 7 | #ifndef ISTEAMCONTROLLER_H 8 | #define ISTEAMCONTROLLER_H 9 | #ifdef _WIN32 10 | #pragma once 11 | #endif 12 | 13 | #include "isteamclient.h" 14 | 15 | // callbacks 16 | #if defined( VALVE_CALLBACK_PACK_SMALL ) 17 | #pragma pack( push, 4 ) 18 | #elif defined( VALVE_CALLBACK_PACK_LARGE ) 19 | #pragma pack( push, 8 ) 20 | #else 21 | #error isteamclient.h must be included 22 | #endif 23 | 24 | 25 | #pragma pack( pop ) 26 | 27 | //----------------------------------------------------------------------------- 28 | // Purpose: Functions for accessing stats, achievements, and leaderboard information 29 | //----------------------------------------------------------------------------- 30 | class ISteamController 31 | { 32 | public: 33 | 34 | }; 35 | 36 | #define STEAMCONTROLLER_INTERFACE_VERSION "STEAMCONTROLLER_INTERFACE_VERSION" 37 | 38 | // callbacks 39 | #if defined( VALVE_CALLBACK_PACK_SMALL ) 40 | #pragma pack( push, 4 ) 41 | #elif defined( VALVE_CALLBACK_PACK_LARGE ) 42 | #pragma pack( push, 8 ) 43 | #else 44 | #error isteamclient.h must be included 45 | #endif 46 | 47 | //----------------------------------------------------------------------------- 48 | // Purpose: 49 | //----------------------------------------------------------------------------- 50 | /* 51 | struct ControllerCallback_t 52 | { 53 | enum { k_iCallback = k_iSteamControllerCallbacks + 1 }; 54 | 55 | }; 56 | */ 57 | 58 | 59 | #pragma pack( pop ) 60 | 61 | 62 | #endif // ISTEAMCONTROLLER_H 63 | -------------------------------------------------------------------------------- /public/steam/isteamgameserverstats.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: interface for game servers to steam stats and achievements 4 | // 5 | //============================================================================= 6 | 7 | #ifndef ISTEAMGAMESERVERSTATS_H 8 | #define ISTEAMGAMESERVERSTATS_H 9 | #ifdef _WIN32 10 | #pragma once 11 | #endif 12 | 13 | #include "isteamclient.h" 14 | 15 | //----------------------------------------------------------------------------- 16 | // Purpose: Functions for authenticating users via Steam to play on a game server 17 | //----------------------------------------------------------------------------- 18 | class ISteamGameServerStats 19 | { 20 | public: 21 | // downloads stats for the user 22 | // returns a GSStatsReceived_t callback when completed 23 | // if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail 24 | // these stats will only be auto-updated for clients playing on the server. For other 25 | // users you'll need to call RequestUserStats() again to refresh any data 26 | virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0; 27 | 28 | // requests stat information for a user, usable after a successful call to RequestUserStats() 29 | virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0; 30 | virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0; 31 | virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0; 32 | 33 | // Set / update stats and achievements. 34 | // Note: These updates will work only on stats game servers are allowed to edit and only for 35 | // game servers that have been declared as officially controlled by the game creators. 36 | // Set the IP range of your official servers on the Steamworks page 37 | virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, int32 nData ) = 0; 38 | virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, float fData ) = 0; 39 | virtual bool UpdateUserAvgRateStat( CSteamID steamIDUser, const char *pchName, float flCountThisSession, double dSessionLength ) = 0; 40 | 41 | virtual bool SetUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0; 42 | virtual bool ClearUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0; 43 | 44 | // Store the current data on the server, will get a GSStatsStored_t callback when set. 45 | // 46 | // If the callback has a result of k_EResultInvalidParam, one or more stats 47 | // uploaded has been rejected, either because they broke constraints 48 | // or were out of date. In this case the server sends back updated values. 49 | // The stats should be re-iterated to keep in sync. 50 | virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0; 51 | }; 52 | 53 | #define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001" 54 | 55 | // callbacks 56 | #if defined( VALVE_CALLBACK_PACK_SMALL ) 57 | #pragma pack( push, 4 ) 58 | #elif defined( VALVE_CALLBACK_PACK_LARGE ) 59 | #pragma pack( push, 8 ) 60 | #else 61 | #error isteamclient.h must be included 62 | #endif 63 | 64 | //----------------------------------------------------------------------------- 65 | // Purpose: called when the latests stats and achievements have been received 66 | // from the server 67 | //----------------------------------------------------------------------------- 68 | struct GSStatsReceived_t 69 | { 70 | enum { k_iCallback = k_iSteamGameServerStatsCallbacks }; 71 | EResult m_eResult; // Success / error fetching the stats 72 | CSteamID m_steamIDUser; // The user for whom the stats are retrieved for 73 | }; 74 | 75 | 76 | //----------------------------------------------------------------------------- 77 | // Purpose: result of a request to store the user stats for a game 78 | //----------------------------------------------------------------------------- 79 | struct GSStatsStored_t 80 | { 81 | enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 }; 82 | EResult m_eResult; // success / error 83 | CSteamID m_steamIDUser; // The user for whom the stats were stored 84 | }; 85 | 86 | //----------------------------------------------------------------------------- 87 | // Purpose: Callback indicating that a user's stats have been unloaded. 88 | // Call RequestUserStats again to access stats for this user 89 | //----------------------------------------------------------------------------- 90 | struct GSStatsUnloaded_t 91 | { 92 | enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 }; 93 | CSteamID m_steamIDUser; // User whose stats have been unloaded 94 | }; 95 | 96 | #pragma pack( pop ) 97 | 98 | 99 | #endif // ISTEAMGAMESERVERSTATS_H 100 | -------------------------------------------------------------------------------- /public/steam/isteamscreenshots.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: public interface to user remote file storage in Steam 4 | // 5 | //============================================================================= 6 | 7 | #ifndef ISTEAMSCREENSHOTS_H 8 | #define ISTEAMSCREENSHOTS_H 9 | #ifdef _WIN32 10 | #pragma once 11 | #endif 12 | 13 | #include "isteamclient.h" 14 | 15 | const uint32 k_nScreenshotMaxTaggedUsers = 32; 16 | const uint32 k_nScreenshotMaxTaggedPublishedFiles = 32; 17 | const int k_cubUFSTagTypeMax = 255; 18 | const int k_cubUFSTagValueMax = 255; 19 | 20 | // Required with of a thumbnail provided to AddScreenshotToLibrary. If you do not provide a thumbnail 21 | // one will be generated. 22 | const int k_ScreenshotThumbWidth = 200; 23 | 24 | // Handle is valid for the lifetime of your process and no longer 25 | typedef uint32 ScreenshotHandle; 26 | #define INVALID_SCREENSHOT_HANDLE 0 27 | 28 | //----------------------------------------------------------------------------- 29 | // Purpose: Functions for adding screenshots to the user's screenshot library 30 | //----------------------------------------------------------------------------- 31 | class ISteamScreenshots 32 | { 33 | public: 34 | // Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. 35 | // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. 36 | virtual ScreenshotHandle WriteScreenshot( void *pubRGB, uint32 cubRGB, int nWidth, int nHeight ) = 0; 37 | 38 | // Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio 39 | // as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. 40 | // The return value is a handle that is valid for the duration of the game process and can be used to apply tags. 41 | // JPEG, TGA, and PNG formats are supported. 42 | virtual ScreenshotHandle AddScreenshotToLibrary( const char *pchFilename, const char *pchThumbnailFilename, int nWidth, int nHeight ) = 0; 43 | 44 | // Causes the Steam overlay to take a screenshot. If screenshots are being hooked by the game then a ScreenshotRequested_t callback is sent back to the game instead. 45 | virtual void TriggerScreenshot() = 0; 46 | 47 | // Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or the game handles them. If the game is hooking screenshots, 48 | // then the ScreenshotRequested_t callback will be sent if the user presses the hotkey, and the game is expected to call WriteScreenshot or AddScreenshotToLibrary 49 | // in response. 50 | virtual void HookScreenshots( bool bHook ) = 0; 51 | 52 | // Sets metadata about a screenshot's location (for example, the name of the map) 53 | virtual bool SetLocation( ScreenshotHandle hScreenshot, const char *pchLocation ) = 0; 54 | 55 | // Tags a user as being visible in the screenshot 56 | virtual bool TagUser( ScreenshotHandle hScreenshot, CSteamID steamID ) = 0; 57 | 58 | // Tags a published file as being visible in the screenshot 59 | virtual bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID ) = 0; 60 | }; 61 | 62 | #define STEAMSCREENSHOTS_INTERFACE_VERSION "STEAMSCREENSHOTS_INTERFACE_VERSION002" 63 | 64 | // callbacks 65 | #if defined( VALVE_CALLBACK_PACK_SMALL ) 66 | #pragma pack( push, 4 ) 67 | #elif defined( VALVE_CALLBACK_PACK_LARGE ) 68 | #pragma pack( push, 8 ) 69 | #else 70 | #error isteamclient.h must be included 71 | #endif 72 | //----------------------------------------------------------------------------- 73 | // Purpose: Screenshot successfully written or otherwise added to the library 74 | // and can now be tagged 75 | //----------------------------------------------------------------------------- 76 | struct ScreenshotReady_t 77 | { 78 | enum { k_iCallback = k_iSteamScreenshotsCallbacks + 1 }; 79 | ScreenshotHandle m_hLocal; 80 | EResult m_eResult; 81 | }; 82 | 83 | //----------------------------------------------------------------------------- 84 | // Purpose: Screenshot has been requested by the user. Only sent if 85 | // HookScreenshots() has been called, in which case Steam will not take 86 | // the screenshot itself. 87 | //----------------------------------------------------------------------------- 88 | struct ScreenshotRequested_t 89 | { 90 | enum { k_iCallback = k_iSteamScreenshotsCallbacks + 2 }; 91 | }; 92 | 93 | #pragma pack( pop ) 94 | 95 | 96 | #endif // ISTEAMSCREENSHOTS_H 97 | -------------------------------------------------------------------------------- /public/steam/isteamunifiedmessages.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: Interface to unified messages client 4 | // 5 | // You should not need to use this interface except if your product is using a language other than C++. 6 | // Contact your Steam Tech contact for more details. 7 | // 8 | //============================================================================= 9 | 10 | #ifndef ISTEAMUNIFIEDMESSAGES_H 11 | #define ISTEAMUNIFIEDMESSAGES_H 12 | #ifdef _WIN32 13 | #pragma once 14 | #endif 15 | 16 | typedef uint64 ClientUnifiedMessageHandle; 17 | 18 | class ISteamUnifiedMessages 19 | { 20 | public: 21 | static const ClientUnifiedMessageHandle k_InvalidUnifiedMessageHandle = 0; 22 | 23 | // Sends a service method (in binary serialized form) using the Steam Client. 24 | // Returns a unified message handle (k_InvalidUnifiedMessageHandle if could not send the message). 25 | virtual ClientUnifiedMessageHandle SendMethod( const char *pchServiceMethod, const void *pRequestBuffer, uint32 unRequestBufferSize, uint64 unContext ) = 0; 26 | 27 | // Gets the size of the response and the EResult. Returns false if the response is not ready yet. 28 | virtual bool GetMethodResponseInfo( ClientUnifiedMessageHandle hHandle, uint32 *punResponseSize, EResult *peResult ) = 0; 29 | 30 | // Gets a response in binary serialized form (and optionally release the corresponding allocated memory). 31 | virtual bool GetMethodResponseData( ClientUnifiedMessageHandle hHandle, void *pResponseBuffer, uint32 unResponseBufferSize, bool bAutoRelease ) = 0; 32 | 33 | // Releases the message and its corresponding allocated memory. 34 | virtual bool ReleaseMethod( ClientUnifiedMessageHandle hHandle ) = 0; 35 | 36 | // Sends a service notification (in binary serialized form) using the Steam Client. 37 | // Returns true if the notification was sent successfully. 38 | virtual bool SendNotification( const char *pchServiceNotification, const void *pNotificationBuffer, uint32 unNotificationBufferSize ) = 0; 39 | }; 40 | 41 | #define STEAMUNIFIEDMESSAGES_INTERFACE_VERSION "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001" 42 | 43 | // callbacks 44 | #if defined( VALVE_CALLBACK_PACK_SMALL ) 45 | #pragma pack( push, 4 ) 46 | #elif defined( VALVE_CALLBACK_PACK_LARGE ) 47 | #pragma pack( push, 8 ) 48 | #else 49 | #error isteamclient.h must be included 50 | #endif 51 | 52 | struct SteamUnifiedMessagesSendMethodResult_t 53 | { 54 | enum { k_iCallback = k_iClientUnifiedMessagesCallbacks + 1 }; 55 | ClientUnifiedMessageHandle m_hHandle; // The handle returned by SendMethod(). 56 | uint64 m_unContext; // Context provided when calling SendMethod(). 57 | EResult m_eResult; // The result of the method call. 58 | uint32 m_unResponseSize; // The size of the response. 59 | }; 60 | 61 | #pragma pack( pop ) 62 | 63 | #endif // ISTEAMUNIFIEDMESSAGES_H 64 | -------------------------------------------------------------------------------- /public/steam/steam2compat.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: 4 | // 5 | //============================================================================= 6 | #ifndef STEAM_STEAM2COMPAT_H 7 | #define STEAM_STEAM2COMPAT_H 8 | 9 | #include "steam_api.h" 10 | 11 | /** 12 | * @file 13 | * 14 | * Declares Steam 2 types and constants for backwards compatibility 15 | */ 16 | 17 | struct TSteamProgress 18 | { 19 | int bValid; 20 | unsigned int uPercentDone; 21 | char szProgress[ 255 ]; 22 | }; 23 | 24 | enum ESteamError 25 | { 26 | eSteamErrorNone = 0, 27 | eSteamErrorUnknown, 28 | eSteamErrorLibraryNotInitialized, 29 | eSteamErrorLibraryAlreadyInitialized, 30 | eSteamErrorConfig, 31 | eSteamErrorContentServerConnect, 32 | eSteamErrorBadHandle, 33 | eSteamErrorHandlesExhausted, 34 | eSteamErrorBadArg, 35 | eSteamErrorNotFound, 36 | eSteamErrorRead, 37 | eSteamErrorEOF, 38 | eSteamErrorSeek, 39 | eSteamErrorCannotWriteNonUserConfigFile, 40 | eSteamErrorCacheOpen, 41 | eSteamErrorCacheRead, 42 | eSteamErrorCacheCorrupted, 43 | eSteamErrorCacheWrite, 44 | eSteamErrorCacheSession, 45 | eSteamErrorCacheInternal, 46 | eSteamErrorCacheBadApp, 47 | eSteamErrorCacheVersion, 48 | eSteamErrorCacheBadFingerPrint, 49 | eSteamErrorNotFinishedProcessing, 50 | eSteamErrorNothingToDo, 51 | eSteamErrorCorruptEncryptedUserIDTicket, 52 | eSteamErrorSocketLibraryNotInitialized, 53 | eSteamErrorFailedToConnectToUserIDTicketValidationServer, 54 | eSteamErrorBadProtocolVersion, 55 | eSteamErrorReplayedUserIDTicketFromClient, 56 | eSteamErrorReceiveResultBufferTooSmall, 57 | eSteamErrorSendFailed, 58 | eSteamErrorReceiveFailed, 59 | eSteamErrorReplayedReplyFromUserIDTicketValidationServer, 60 | eSteamErrorBadSignatureFromUserIDTicketValidationServer, 61 | eSteamErrorValidationStalledSoAborted, 62 | eSteamErrorInvalidUserIDTicket, 63 | eSteamErrorClientLoginRateTooHigh, 64 | eSteamErrorClientWasNeverValidated, 65 | eSteamErrorInternalSendBufferTooSmall, 66 | eSteamErrorInternalReceiveBufferTooSmall, 67 | eSteamErrorUserTicketExpired, 68 | eSteamErrorCDKeyAlreadyInUseOnAnotherClient, 69 | eSteamErrorNotLoggedIn, 70 | eSteamErrorAlreadyExists, 71 | eSteamErrorAlreadySubscribed, 72 | eSteamErrorNotSubscribed, 73 | eSteamErrorAccessDenied, 74 | eSteamErrorFailedToCreateCacheFile, 75 | eSteamErrorCallStalledSoAborted, 76 | eSteamErrorEngineNotRunning, 77 | eSteamErrorEngineConnectionLost, 78 | eSteamErrorLoginFailed, 79 | eSteamErrorAccountPending, 80 | eSteamErrorCacheWasMissingRetry, 81 | eSteamErrorLocalTimeIncorrect, 82 | eSteamErrorCacheNeedsDecryption, 83 | eSteamErrorAccountDisabled, 84 | eSteamErrorCacheNeedsRepair, 85 | eSteamErrorRebootRequired, 86 | eSteamErrorNetwork, 87 | eSteamErrorOffline, 88 | }; 89 | 90 | enum EDetailedPlatformErrorType 91 | { 92 | eNoDetailedErrorAvailable = 0, 93 | eStandardCerrno, 94 | eWin32LastError, 95 | eWinSockLastError, 96 | eDetailedPlatformErrorCount, 97 | }; 98 | 99 | struct TSteamError 100 | { 101 | ESteamError eSteamError; 102 | EDetailedPlatformErrorType eDetailedErrorType; 103 | int nDetailedErrorCode; 104 | char szDesc[ 255 ]; 105 | }; 106 | 107 | typedef unsigned int SteamHandle_t; 108 | 109 | #endif //STEAM_STEAM2COMPAT_H 110 | -------------------------------------------------------------------------------- /public/steam/steamhttpenums.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: HTTP related enums, stuff that is shared by both clients and servers, and our 4 | // UI projects goes here. 5 | // 6 | //============================================================================= 7 | 8 | #ifndef STEAMHTTPENUMS_H 9 | #define STEAMHTTPENUMS_H 10 | #ifdef _WIN32 11 | #pragma once 12 | #endif 13 | 14 | // HTTP related types 15 | 16 | // This enum is used in client API methods, do not re-number existing values. 17 | enum EHTTPMethod 18 | { 19 | k_EHTTPMethodInvalid = 0, 20 | k_EHTTPMethodGET, 21 | k_EHTTPMethodHEAD, 22 | k_EHTTPMethodPOST, 23 | 24 | // The remaining HTTP methods are not yet supported, per rfc2616 section 5.1.1 only GET and HEAD are required for 25 | // a compliant general purpose server. We'll likely add more as we find uses for them. 26 | 27 | // k_EHTTPMethodOPTIONS, 28 | k_EHTTPMethodPUT, 29 | k_EHTTPMethodDELETE, 30 | // k_EHTTPMethodTRACE, 31 | // k_EHTTPMethodCONNECT 32 | }; 33 | 34 | 35 | // HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions 36 | // of each of these. 37 | enum EHTTPStatusCode 38 | { 39 | // Invalid status code (this isn't defined in HTTP, used to indicate unset in our code) 40 | k_EHTTPStatusCodeInvalid = 0, 41 | 42 | // Informational codes 43 | k_EHTTPStatusCode100Continue = 100, 44 | k_EHTTPStatusCode101SwitchingProtocols = 101, 45 | 46 | // Success codes 47 | k_EHTTPStatusCode200OK = 200, 48 | k_EHTTPStatusCode201Created = 201, 49 | k_EHTTPStatusCode202Accepted = 202, 50 | k_EHTTPStatusCode203NonAuthoritative = 203, 51 | k_EHTTPStatusCode204NoContent = 204, 52 | k_EHTTPStatusCode205ResetContent = 205, 53 | k_EHTTPStatusCode206PartialContent = 206, 54 | 55 | // Redirection codes 56 | k_EHTTPStatusCode300MultipleChoices = 300, 57 | k_EHTTPStatusCode301MovedPermanently = 301, 58 | k_EHTTPStatusCode302Found = 302, 59 | k_EHTTPStatusCode303SeeOther = 303, 60 | k_EHTTPStatusCode304NotModified = 304, 61 | k_EHTTPStatusCode305UseProxy = 305, 62 | //k_EHTTPStatusCode306Unused = 306, (used in old HTTP spec, now unused in 1.1) 63 | k_EHTTPStatusCode307TemporaryRedirect = 307, 64 | 65 | // Error codes 66 | k_EHTTPStatusCode400BadRequest = 400, 67 | k_EHTTPStatusCode401Unauthorized = 401, 68 | k_EHTTPStatusCode402PaymentRequired = 402, // This is reserved for future HTTP specs, not really supported by clients 69 | k_EHTTPStatusCode403Forbidden = 403, 70 | k_EHTTPStatusCode404NotFound = 404, 71 | k_EHTTPStatusCode405MethodNotAllowed = 405, 72 | k_EHTTPStatusCode406NotAcceptable = 406, 73 | k_EHTTPStatusCode407ProxyAuthRequired = 407, 74 | k_EHTTPStatusCode408RequestTimeout = 408, 75 | k_EHTTPStatusCode409Conflict = 409, 76 | k_EHTTPStatusCode410Gone = 410, 77 | k_EHTTPStatusCode411LengthRequired = 411, 78 | k_EHTTPStatusCode412PreconditionFailed = 412, 79 | k_EHTTPStatusCode413RequestEntityTooLarge = 413, 80 | k_EHTTPStatusCode414RequestURITooLong = 414, 81 | k_EHTTPStatusCode415UnsupportedMediaType = 415, 82 | k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416, 83 | k_EHTTPStatusCode417ExpectationFailed = 417, 84 | 85 | // Server error codes 86 | k_EHTTPStatusCode500InternalServerError = 500, 87 | k_EHTTPStatusCode501NotImplemented = 501, 88 | k_EHTTPStatusCode502BadGateway = 502, 89 | k_EHTTPStatusCode503ServiceUnavailable = 503, 90 | k_EHTTPStatusCode504GatewayTimeout = 504, 91 | k_EHTTPStatusCode505HTTPVersionNotSupported = 505, 92 | }; 93 | 94 | #endif // STEAMHTTPENUMS_H -------------------------------------------------------------------------------- /public/steam/steamtypes.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | // 3 | // Purpose: 4 | // 5 | //============================================================================= 6 | 7 | #ifndef STEAMTYPES_H 8 | #define STEAMTYPES_H 9 | #ifdef _WIN32 10 | #pragma once 11 | #endif 12 | 13 | // Steam-specific types. Defined here so this header file can be included in other code bases. 14 | #ifndef WCHARTYPES_H 15 | typedef unsigned char uint8; 16 | #endif 17 | 18 | #if defined( __GNUC__ ) && !defined(POSIX) 19 | #if __GNUC__ < 4 20 | #error "Steamworks requires GCC 4.X (4.2 or 4.4 have been tested)" 21 | #endif 22 | #define POSIX 1 23 | #endif 24 | 25 | #if defined(__x86_64__) || defined(_WIN64) 26 | #define X64BITS 27 | #endif 28 | 29 | // Make sure VALVE_BIG_ENDIAN gets set on PS3, may already be set previously in Valve internal code. 30 | #if !defined(VALVE_BIG_ENDIAN) && defined(_PS3) 31 | #define VALVE_BIG_ENDIAN 32 | #endif 33 | 34 | typedef unsigned char uint8; 35 | typedef signed char int8; 36 | 37 | #if defined( _WIN32 ) 38 | 39 | typedef __int16 int16; 40 | typedef unsigned __int16 uint16; 41 | typedef __int32 int32; 42 | typedef unsigned __int32 uint32; 43 | typedef __int64 int64; 44 | typedef unsigned __int64 uint64; 45 | 46 | #ifdef X64BITS 47 | typedef __int64 intp; // intp is an integer that can accomodate a pointer 48 | typedef unsigned __int64 uintp; // (ie, sizeof(intp) >= sizeof(int) && sizeof(intp) >= sizeof(void *) 49 | #else 50 | typedef __int32 intp; 51 | typedef unsigned __int32 uintp; 52 | #endif 53 | 54 | #else // _WIN32 55 | 56 | typedef short int16; 57 | typedef unsigned short uint16; 58 | typedef int int32; 59 | typedef unsigned int uint32; 60 | typedef long long int64; 61 | typedef unsigned long long uint64; 62 | #ifdef X64BITS 63 | typedef long long intp; 64 | typedef unsigned long long uintp; 65 | #else 66 | typedef int intp; 67 | typedef unsigned int uintp; 68 | #endif 69 | 70 | #endif // else _WIN32 71 | 72 | const int k_cubSaltSize = 8; 73 | typedef uint8 Salt_t[ k_cubSaltSize ]; 74 | 75 | //----------------------------------------------------------------------------- 76 | // GID (GlobalID) stuff 77 | // This is a globally unique identifier. It's guaranteed to be unique across all 78 | // racks and servers for as long as a given universe persists. 79 | //----------------------------------------------------------------------------- 80 | // NOTE: for GID parsing/rendering and other utils, see gid.h 81 | typedef uint64 GID_t; 82 | 83 | const GID_t k_GIDNil = 0xffffffffffffffffull; 84 | 85 | // For convenience, we define a number of types that are just new names for GIDs 86 | typedef GID_t JobID_t; // Each Job has a unique ID 87 | typedef GID_t TxnID_t; // Each financial transaction has a unique ID 88 | 89 | const GID_t k_TxnIDNil = k_GIDNil; 90 | const GID_t k_TxnIDUnknown = 0; 91 | 92 | 93 | // this is baked into client messages and interfaces as an int, 94 | // make sure we never break this. 95 | typedef uint32 PackageId_t; 96 | const PackageId_t k_uPackageIdFreeSub = 0x0; 97 | const PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF; 98 | 99 | 100 | // this is baked into client messages and interfaces as an int, 101 | // make sure we never break this. 102 | typedef uint32 AppId_t; 103 | const AppId_t k_uAppIdInvalid = 0x0; 104 | 105 | typedef uint64 AssetClassId_t; 106 | const AssetClassId_t k_ulAssetClassIdInvalid = 0x0; 107 | 108 | typedef uint32 PhysicalItemId_t; 109 | const PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0; 110 | 111 | 112 | // this is baked into client messages and interfaces as an int, 113 | // make sure we never break this. AppIds and DepotIDs also presently 114 | // share the same namespace, but since we'd like to change that in the future 115 | // I've defined it seperately here. 116 | typedef uint32 DepotId_t; 117 | const DepotId_t k_uDepotIdInvalid = 0x0; 118 | 119 | // RTime32 120 | // We use this 32 bit time representing real world time. 121 | // It offers 1 second resolution beginning on January 1, 1970 (Unix time) 122 | typedef uint32 RTime32; 123 | 124 | typedef uint32 CellID_t; 125 | const CellID_t k_uCellIDInvalid = 0xFFFFFFFF; 126 | 127 | // handle to a Steam API call 128 | typedef uint64 SteamAPICall_t; 129 | const SteamAPICall_t k_uAPICallInvalid = 0x0; 130 | 131 | typedef uint32 AccountID_t; 132 | 133 | typedef uint32 PartnerId_t; 134 | const PartnerId_t k_uPartnerIdInvalid = 0; 135 | 136 | #endif // STEAMTYPES_H 137 | -------------------------------------------------------------------------------- /public/tier0/MinMax.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_MINMAX_H 2 | #define COMMON_MINMAX_H 3 | 4 | #include 5 | 6 | #if defined( min ) || defined( max ) 7 | #error "Don't define min and/or max, use std::min and std::max instead!" 8 | #endif 9 | 10 | using std::min; 11 | using std::max; 12 | 13 | //C++17 will have std::clamp, so make sure it matches the function declaration. - Solokiller 14 | //Note: std::clamp will return const ref, which can produce dangling references. This version returns a copy. 15 | template 16 | T clamp( const T& val, const T& min, const T& max ) 17 | { 18 | return ( ( val > max ) ? max : ( ( val < min ) ? min : val ) ); 19 | } 20 | 21 | #endif //COMMON_MINMAX_H 22 | -------------------------------------------------------------------------------- /public/tier0/afxmem_override.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/afxmem_override.cpp -------------------------------------------------------------------------------- /public/tier0/annotations.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | #ifndef ANALYSIS_ANNOTATIONS_H 3 | #define ANALYSIS_ANNOTATIONS_H 4 | 5 | #if _MSC_VER >= 1600 // VS 2010 and above. 6 | //----------------------------------------------------------------------------- 7 | // Upgrading important helpful warnings to errors 8 | //----------------------------------------------------------------------------- 9 | #pragma warning(error : 4789 ) // warning C4789: destination of memory copy is too small 10 | 11 | // Suppress some code analysis warnings 12 | #ifdef _PREFAST_ 13 | // Include the annotation header file. 14 | #include 15 | 16 | // For temporarily suppressing warnings -- the warnings are suppressed for the next source line. 17 | #define ANALYZE_SUPPRESS(wnum) __pragma(warning(suppress: wnum)) 18 | #define ANALYZE_SUPPRESS2(wnum1, wnum2) __pragma(warning(supress: wnum1 wnum2)) 19 | #define ANALYZE_SUPPRESS3(wnum1, wnum2, wnum3) __pragma(warning(suppress: wnum1 wnum2 wnum3)) 20 | #define ANALYZE_SUPPRESS4(wnum1, wnum2, wnum3, wnum4) __pragma(warning(suppress: wnum1 wnum2 wnum3 wnum4)) 21 | 22 | // Tag all printf style format strings with this 23 | #define PRINTF_FORMAT_STRING _Printf_format_string_ 24 | #define SCANF_FORMAT_STRING _Scanf_format_string_impl_ 25 | // Various macros for specifying the capacity of the buffer pointed 26 | // to by a function parameter. Variations include in/out/inout, 27 | // CAP (elements) versus BYTECAP (bytes), and null termination or 28 | // not (_Z). 29 | #define IN_Z _In_z_ 30 | #define IN_CAP(x) _In_count_(x) 31 | #define IN_BYTECAP(x) _In_bytecount_(x) 32 | #define OUT_Z_CAP(x) _Out_z_cap_(x) 33 | #define OUT_CAP(x) _Out_cap_(x) 34 | #define OUT_CAP_C(x) _Out_cap_c_(x) // Output buffer with specified *constant* capacity in elements 35 | #define OUT_BYTECAP(x) _Out_bytecap_(x) 36 | #define OUT_Z_BYTECAP(x) _Out_z_bytecap_(x) 37 | #define INOUT_BYTECAP(x) _Inout_bytecap_(x) 38 | #define INOUT_Z_CAP(x) _Inout_z_cap_(x) 39 | #define INOUT_Z_BYTECAP(x) _Inout_z_bytecap_(x) 40 | // These macros are use for annotating array reference parameters, typically used in functions 41 | // such as V_strcpy_safe. Because they are array references the capacity is already known. 42 | #if _MSC_VER >= 1700 43 | #define IN_Z_ARRAY _Pre_z_ 44 | #define OUT_Z_ARRAY _Post_z_ 45 | #define INOUT_Z_ARRAY _Prepost_z_ 46 | #else 47 | #define IN_Z_ARRAY _Deref_pre_z_ 48 | #define OUT_Z_ARRAY _Deref_post_z_ 49 | #define INOUT_Z_ARRAY _Deref_prepost_z_ 50 | #endif // _MSC_VER >= 1700 51 | // Used for annotating functions to describe their return types. 52 | #define MUST_CHECK_RETURN _Check_return_ 53 | // Use the macros above to annotate string functions that fill buffers as shown here, 54 | // in order to give VS's /analyze more opportunities to find bugs. 55 | // void V_wcsncpy( OUT_Z_BYTECAP(maxLenInBytes) wchar_t *pDest, wchar_t const *pSrc, int maxLenInBytes ); 56 | // int V_snwprintf( OUT_Z_CAP(maxLenInCharacters) wchar_t *pDest, int maxLenInCharacters, PRINTF_FORMAT_STRING const wchar_t *pFormat, ... ); 57 | 58 | #endif // _PREFAST_ 59 | #endif // _MSC_VER >= 1600 // VS 2010 and above. 60 | 61 | #ifndef ANALYZE_SUPPRESS 62 | #define ANALYZE_SUPPRESS(wnum) 63 | #define ANALYZE_SUPPRESS2(wnum1, wnum2) 64 | #define ANALYZE_SUPPRESS3(wnum1, wnum2, wnum3) 65 | #define ANALYZE_SUPPRESS4(wnum1, wnum2, wnum3, wnum4) 66 | #define PRINTF_FORMAT_STRING 67 | #define SCANF_FORMAT_STRING 68 | #define IN_Z 69 | #define IN_CAP(x) 70 | #define IN_BYTECAP(x) 71 | #define OUT_Z_CAP(x) 72 | #define OUT_CAP(x) 73 | #define OUT_CAP_C(x) 74 | #define OUT_BYTECAP(x) 75 | #define OUT_Z_BYTECAP(x) 76 | #define INOUT_BYTECAP(x) 77 | #define INOUT_Z_CAP(x) 78 | #define INOUT_Z_BYTECAP(x) 79 | #define OUT_Z_ARRAY 80 | #define INOUT_Z_ARRAY 81 | #define MUST_CHECK_RETURN 82 | #endif 83 | 84 | #endif // ANALYSIS_ANNOTATIONS_H 85 | -------------------------------------------------------------------------------- /public/tier0/basetypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/basetypes.h -------------------------------------------------------------------------------- /public/tier0/commonmacros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/commonmacros.h -------------------------------------------------------------------------------- /public/tier0/dbg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/dbg.h -------------------------------------------------------------------------------- /public/tier0/dbgflag.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/dbgflag.h -------------------------------------------------------------------------------- /public/tier0/eventmasks.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/eventmasks.h -------------------------------------------------------------------------------- /public/tier0/eventmodes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/eventmodes.h -------------------------------------------------------------------------------- /public/tier0/fasttimer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/fasttimer.h -------------------------------------------------------------------------------- /public/tier0/ia32detect.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/ia32detect.h -------------------------------------------------------------------------------- /public/tier0/icommandline.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/icommandline.h -------------------------------------------------------------------------------- /public/tier0/ioctlcodes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/ioctlcodes.h -------------------------------------------------------------------------------- /public/tier0/k8performancecounters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/k8performancecounters.h -------------------------------------------------------------------------------- /public/tier0/l2cache.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/l2cache.h -------------------------------------------------------------------------------- /public/tier0/mem.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/mem.h -------------------------------------------------------------------------------- /public/tier0/memalloc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/memalloc.h -------------------------------------------------------------------------------- /public/tier0/memdbgoff.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/memdbgoff.h -------------------------------------------------------------------------------- /public/tier0/memdbgon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/memdbgon.h -------------------------------------------------------------------------------- /public/tier0/memoverride-vc7.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/memoverride-vc7.cpp -------------------------------------------------------------------------------- /public/tier0/memoverride.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/memoverride.cpp -------------------------------------------------------------------------------- /public/tier0/minidump.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/minidump.h -------------------------------------------------------------------------------- /public/tier0/p4performancecounters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/p4performancecounters.h -------------------------------------------------------------------------------- /public/tier0/p5p6performancecounters.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/p5p6performancecounters.h -------------------------------------------------------------------------------- /public/tier0/platform.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/platform.h -------------------------------------------------------------------------------- /public/tier0/pmelib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/pmelib.h -------------------------------------------------------------------------------- /public/tier0/protected_things.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/protected_things.h -------------------------------------------------------------------------------- /public/tier0/testthread.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/testthread.h -------------------------------------------------------------------------------- /public/tier0/threadtools.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/threadtools.h -------------------------------------------------------------------------------- /public/tier0/tslist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/tslist.h -------------------------------------------------------------------------------- /public/tier0/validator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/validator.h -------------------------------------------------------------------------------- /public/tier0/valobject.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/valobject.h -------------------------------------------------------------------------------- /public/tier0/valve_minmax_off.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | #ifdef min 3 | #undef min 4 | #endif 5 | #ifdef max 6 | #undef max 7 | #endif 8 | -------------------------------------------------------------------------------- /public/tier0/valve_minmax_on.h: -------------------------------------------------------------------------------- 1 | //========= Copyright Valve Corporation, All rights reserved. ============// 2 | #if !defined(POSIX) 3 | #ifndef min 4 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 5 | #endif 6 | #ifndef max 7 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 8 | #endif 9 | #endif 10 | -------------------------------------------------------------------------------- /public/tier0/valve_off.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/valve_off.h -------------------------------------------------------------------------------- /public/tier0/valve_on.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/valve_on.h -------------------------------------------------------------------------------- /public/tier0/vcr_shared.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/vcr_shared.h -------------------------------------------------------------------------------- /public/tier0/vcrmode.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/vcrmode.h -------------------------------------------------------------------------------- /public/tier0/vprof.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/vprof.h -------------------------------------------------------------------------------- /public/tier0/wchartypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/wchartypes.h -------------------------------------------------------------------------------- /public/tier0/xbox_codeline_defines.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/tier0/xbox_codeline_defines.h -------------------------------------------------------------------------------- /public/winlite.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScriptedSnark/goldsrc-launcher/91029e6f46d78e0276e60cf459f0b1a46ee3f9eb/public/winlite.h --------------------------------------------------------------------------------