Merge pull request #481 from tomkidd/xcode
Upgrades to Xcode project and Apple Silicon support
1
.gitignore
vendored
|
@ -13,6 +13,7 @@ Makefile.local
|
|||
.DS_Store
|
||||
.LSOverride
|
||||
Icon?
|
||||
make-macosx-values.local
|
||||
|
||||
# Xcode
|
||||
####################
|
||||
|
|
12
Makefile
|
@ -6,6 +6,14 @@
|
|||
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
|
||||
COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
|
||||
|
||||
#arm64 hack!
|
||||
ifeq ($(shell uname -m), arm64)
|
||||
COMPILE_ARCH=arm64
|
||||
endif
|
||||
ifeq ($(shell uname -m), aarch64)
|
||||
COMPILE_ARCH=arm64
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILE_PLATFORM),sunos)
|
||||
# Solaris uname and GNU uname differ
|
||||
COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
|
||||
|
@ -471,6 +479,10 @@ ifeq ($(PLATFORM),darwin)
|
|||
OPTIMIZEVM += -mfpmath=sse
|
||||
BASE_CFLAGS += -arch x86_64
|
||||
endif
|
||||
ifeq ($(ARCH),arm64)
|
||||
# HAVE_VM_COMPILED=false # TODO: implement compiled vm
|
||||
BASE_CFLAGS += -arch arm64
|
||||
endif
|
||||
|
||||
# When compiling on OSX for OSX, we're not cross compiling as far as the
|
||||
# Makefile is concerned, as target architecture is specified as a compiler
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -47,16 +47,20 @@
|
|||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_metal.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_locale.h"
|
||||
#include "SDL_misc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -80,10 +84,11 @@ extern "C" {
|
|||
#define SDL_INIT_HAPTIC 0x00001000u
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000u
|
||||
#define SDL_INIT_SENSOR 0x00008000u
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -53,6 +53,10 @@ assert can have unique static variables associated with it.
|
|||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
|
@ -185,92 +189,115 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
|||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
|
||||
/**
|
||||
* A callback that fires when an SDL assertion fails.
|
||||
*
|
||||
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
||||
* current assertion
|
||||
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
|
||||
* \returns an SDL_AssertState value indicating how to handle the failure.
|
||||
*/
|
||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_AssertData* data, void* userdata);
|
||||
|
||||
/**
|
||||
* \brief Set an application-defined assertion handler.
|
||||
* Set an application-defined assertion handler.
|
||||
*
|
||||
* This allows an app to show its own assertion UI and/or force the
|
||||
* response to an assertion failure. If the app doesn't provide this, SDL
|
||||
* will try to do the right thing, popping up a system-specific GUI dialog,
|
||||
* and probably minimizing any fullscreen windows.
|
||||
* This function allows an application to show its own assertion UI and/or
|
||||
* force the response to an assertion failure. If the application doesn't
|
||||
* provide this, SDL will try to do the right thing, popping up a
|
||||
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
||||
*
|
||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||
* it will only fire from one thread at a time.
|
||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||
* it will only fire from one thread at a time.
|
||||
*
|
||||
* Setting the callback to NULL restores SDL's original internal handler.
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
* \param handler the SDL_AssertionHandler function to call when an assertion
|
||||
* fails or NULL for the default handler
|
||||
* \param userdata a pointer that is passed to `handler`
|
||||
*
|
||||
* Return SDL_AssertState value of how to handle the assertion failure.
|
||||
*
|
||||
* \param handler Callback function, called when an assertion fails.
|
||||
* \param userdata A pointer passed to the callback as-is.
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
SDL_AssertionHandler handler,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Get the default assertion handler.
|
||||
* Get the default assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called by default when an
|
||||
* assertion is triggered. This is an internal function provided by SDL,
|
||||
* that is used for assertions when SDL_SetAssertionHandler() hasn't been
|
||||
* used to provide a different function.
|
||||
* This returns the function pointer that is called by default when an
|
||||
* assertion is triggered. This is an internal function provided by SDL, that
|
||||
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
||||
* provide a different function.
|
||||
*
|
||||
* \return The default SDL_AssertionHandler that is called when an assert triggers.
|
||||
* \returns the default SDL_AssertionHandler that is called when an assert
|
||||
* triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||
|
||||
/**
|
||||
* \brief Get the current assertion handler.
|
||||
* Get the current assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
* SDL_SetAssertionHandler(), or if no application-specified function is
|
||||
* set, is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
||||
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||
*
|
||||
* \param puserdata Pointer to a void*, which will store the "userdata"
|
||||
* pointer that was passed to SDL_SetAssertionHandler().
|
||||
* This value will always be NULL for the default handler.
|
||||
* If you don't care about this data, it is safe to pass
|
||||
* a NULL pointer to this function to ignore it.
|
||||
* \return The SDL_AssertionHandler that is called when an assert triggers.
|
||||
* The parameter `puserdata` is a pointer to a void*, which will store the
|
||||
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
||||
* will always be NULL for the default handler. If you don't care about this
|
||||
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
||||
*
|
||||
* \param puserdata pointer which is filled with the "userdata" pointer that
|
||||
* was passed to SDL_SetAssertionHandler()
|
||||
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_SetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||
|
||||
/**
|
||||
* \brief Get a list of all assertion failures.
|
||||
* Get a list of all assertion failures.
|
||||
*
|
||||
* Get all assertions triggered since last call to SDL_ResetAssertionReport(),
|
||||
* or the start of the program.
|
||||
* This function gets all assertions triggered since the last call to
|
||||
* SDL_ResetAssertionReport(), or the start of the program.
|
||||
*
|
||||
* The proper way to examine this data looks something like this:
|
||||
* The proper way to examine this data looks something like this:
|
||||
*
|
||||
* <code>
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
* item = item->next;
|
||||
* }
|
||||
* </code>
|
||||
* ```c
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
* item = item->next;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \return List of all assertions.
|
||||
* \sa SDL_ResetAssertionReport
|
||||
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||
* memory should not be modified or freed by the application.
|
||||
*
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
||||
/**
|
||||
* \brief Reset the list of all assertion failures.
|
||||
* Clear the list of all assertion failures.
|
||||
*
|
||||
* Reset list of all assertions triggered.
|
||||
* This function will clear the list of all assertions triggered up to that
|
||||
* point. Immediately following this call, SDL_GetAssertionReport will return
|
||||
* no items. In addition, any previously-triggered assertions will be reset to
|
||||
* a trigger_count of zero, and their always_ignore state will be false.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -162,12 +162,29 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
|||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||
/* Information from:
|
||||
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
|
||||
|
||||
The Linux kernel provides a helper function which provides the right code for a memory barrier,
|
||||
hard-coded at address 0xffff0fa0
|
||||
*/
|
||||
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#elif 0 /* defined(__QNXNTO__) */
|
||||
#include <sys/cpuinline.h>
|
||||
|
||||
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
|
||||
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
|
||||
#else
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
#else
|
||||
|
@ -177,6 +194,7 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
|||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif /* __LINUX__ || __ANDROID__ */
|
||||
#endif /* __GNUC__ && __arm__ */
|
||||
#else
|
||||
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -45,13 +45,12 @@ extern "C" {
|
|||
* with 0. This operation can also be stated as "count leading zeroes" and
|
||||
* "log base 2".
|
||||
*
|
||||
* \return Index of the most significant bit, or -1 if the value is 0.
|
||||
* \return the index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline int _SDL_clz_watcom (Uint32);
|
||||
#pragma aux _SDL_clz_watcom = \
|
||||
extern _inline int _SDL_bsr_watcom (Uint32);
|
||||
#pragma aux _SDL_bsr_watcom = \
|
||||
"bsr eax, eax" \
|
||||
"xor eax, 31" \
|
||||
parm [eax] nomemory \
|
||||
value [eax] \
|
||||
modify exact [eax] nomemory;
|
||||
|
@ -72,7 +71,13 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
|||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - _SDL_clz_watcom(x);
|
||||
return _SDL_bsr_watcom(x);
|
||||
#elif defined(_MSC_VER)
|
||||
unsigned long index;
|
||||
if (_BitScanReverse(&index, x)) {
|
||||
return index;
|
||||
}
|
||||
return -1;
|
||||
#else
|
||||
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||
* <seander@cs.stanford.edu>, released in the public domain.
|
||||
|
@ -101,6 +106,15 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
|||
#endif
|
||||
}
|
||||
|
||||
SDL_FORCE_INLINE SDL_bool
|
||||
SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||
{
|
||||
if (x && !(x & (x - 1))) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -50,6 +50,9 @@ typedef enum
|
|||
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
@ -90,12 +93,12 @@ typedef enum
|
|||
/**
|
||||
* \brief Create a custom blend mode, which may or may not be supported by a given renderer
|
||||
*
|
||||
* \param srcColorFactor
|
||||
* \param dstColorFactor
|
||||
* \param colorOperation
|
||||
* \param srcAlphaFactor
|
||||
* \param dstAlphaFactor
|
||||
* \param alphaOperation
|
||||
* \param srcColorFactor source color factor
|
||||
* \param dstColorFactor destination color factor
|
||||
* \param colorOperation color operation
|
||||
* \param srcAlphaFactor source alpha factor
|
||||
* \param dstAlphaFactor destination alpha factor
|
||||
* \param alphaOperation alpha operation
|
||||
*
|
||||
* The result of the blend mode operation will be:
|
||||
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -41,8 +41,10 @@
|
|||
#include "SDL_config_android.h"
|
||||
#elif defined(__PSP__)
|
||||
#include "SDL_config_psp.h"
|
||||
#elif defined(__OS2__)
|
||||
#include "SDL_config_os2.h"
|
||||
#else
|
||||
/* This is a minimal configuration just to get SDL running on new platforms */
|
||||
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||
#include "SDL_config_minimal.h"
|
||||
#endif /* platform config */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#ifdef __LP64__
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
@ -96,7 +96,15 @@
|
|||
#cmakedefine HAVE_WCSLEN 1
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
#cmakedefine HAVE_WCSLCAT 1
|
||||
#cmakedefine HAVE__WCSDUP 1
|
||||
#cmakedefine HAVE_WCSDUP 1
|
||||
#cmakedefine HAVE_WCSSTR 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_WCSNCMP 1
|
||||
#cmakedefine HAVE_WCSCASECMP 1
|
||||
#cmakedefine HAVE__WCSICMP 1
|
||||
#cmakedefine HAVE_WCSNCASECMP 1
|
||||
#cmakedefine HAVE__WCSNICMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
|
@ -108,6 +116,7 @@
|
|||
#cmakedefine HAVE_STRCHR 1
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
|
@ -127,6 +136,7 @@
|
|||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE__STRNICMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_SSCANF 1
|
||||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
|
@ -144,6 +154,8 @@
|
|||
#cmakedefine HAVE_COPYSIGNF 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_EXP 1
|
||||
#cmakedefine HAVE_EXPF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FABSF 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
|
@ -154,8 +166,12 @@
|
|||
#cmakedefine HAVE_LOGF 1
|
||||
#cmakedefine HAVE_LOG10 1
|
||||
#cmakedefine HAVE_LOG10F 1
|
||||
#cmakedefine HAVE_LROUND 1
|
||||
#cmakedefine HAVE_LROUNDF 1
|
||||
#cmakedefine HAVE_POW 1
|
||||
#cmakedefine HAVE_POWF 1
|
||||
#cmakedefine HAVE_ROUND 1
|
||||
#cmakedefine HAVE_ROUNDF 1
|
||||
#cmakedefine HAVE_SCALBN 1
|
||||
#cmakedefine HAVE_SCALBNF 1
|
||||
#cmakedefine HAVE_SIN 1
|
||||
|
@ -164,6 +180,8 @@
|
|||
#cmakedefine HAVE_SQRTF 1
|
||||
#cmakedefine HAVE_TAN 1
|
||||
#cmakedefine HAVE_TANF 1
|
||||
#cmakedefine HAVE_TRUNC 1
|
||||
#cmakedefine HAVE_TRUNCF 1
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
|
@ -181,12 +199,15 @@
|
|||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#cmakedefine HAVE_GETAUXVAL 1
|
||||
#cmakedefine HAVE_ELF_AUX_INFO 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
#cmakedefine HAVE__EXIT 1
|
||||
|
||||
#elif __WIN32__
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
|
||||
#else
|
||||
/* We may need some replacement for stdarg.h here */
|
||||
#include <stdarg.h>
|
||||
|
@ -194,11 +215,16 @@
|
|||
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_FCITX_FRONTEND_H 1
|
||||
#cmakedefine HAVE_FCITX 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_SYS_INOTIFY_H 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT 1
|
||||
#cmakedefine HAVE_INOTIFY_INIT1 1
|
||||
#cmakedefine HAVE_INOTIFY 1
|
||||
#cmakedefine HAVE_IMMINTRIN_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
#cmakedefine HAVE_LIBDECOR_H 1
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
|
@ -207,6 +233,11 @@
|
|||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
|
||||
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
|
||||
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
|
||||
#cmakedefine HAVE_SENSORSAPI_H @HAVE_SENSORSAPI_H@
|
||||
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
|
@ -221,6 +252,7 @@
|
|||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_SENSOR_DISABLED @SDL_SENSOR_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
|
||||
|
@ -233,6 +265,8 @@
|
|||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OPENSLES @SDL_AUDIO_DRIVER_OPENSLES@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_AAUDIO @SDL_AUDIO_DRIVER_AAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
|
||||
|
@ -253,6 +287,8 @@
|
|||
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE @SDL_AUDIO_DRIVER_PIPEWIRE@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC @SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@
|
||||
|
@ -261,11 +297,13 @@
|
|||
#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WASAPI @SDL_AUDIO_DRIVER_WASAPI@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OS2 @SDL_AUDIO_DRIVER_OS2@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_VITA @SDL_AUDIO_DRIVER_VITA@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||
#cmakedefine SDL_INPUT_FBSDKBIO @SDL_INPUT_FBSDKBIO@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
|
@ -275,47 +313,71 @@
|
|||
#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@
|
||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
||||
#cmakedefine SDL_JOYSTICK_OS2 @SDL_JOYSTICK_OS2@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
|
||||
#cmakedefine SDL_HAVE_MACHINE_JOYSTICK_H @SDL_HAVE_MACHINE_JOYSTICK_H@
|
||||
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
|
||||
#cmakedefine SDL_JOYSTICK_RAWINPUT @SDL_JOYSTICK_RAWINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
|
||||
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
|
||||
#cmakedefine SDL_JOYSTICK_VITA @SDL_JOYSTICK_VITA@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
|
||||
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
|
||||
#cmakedefine SDL_SENSOR_WINDOWS @SDL_SENSOR_WINDOWS@
|
||||
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
|
||||
#cmakedefine SDL_SENSOR_VITA @SDL_SENSOR_VITA@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
|
||||
#cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@
|
||||
#cmakedefine SDL_LOADSO_OS2 @SDL_LOADSO_OS2@
|
||||
|
||||
/* Enable various threading systems */
|
||||
#cmakedefine SDL_THREAD_GENERIC_COND_SUFFIX @SDL_THREAD_GENERIC_COND_SUFFIX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@
|
||||
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
|
||||
#cmakedefine SDL_THREAD_OS2 @SDL_THREAD_OS2@
|
||||
#cmakedefine SDL_THREAD_VITA @SDL_THREAD_VITA@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@
|
||||
#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@
|
||||
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
|
||||
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
||||
#cmakedefine SDL_TIMER_OS2 @SDL_TIMER_OS2@
|
||||
#cmakedefine SDL_TIMER_VITA @SDL_TIMER_VITA@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
|
@ -326,11 +388,8 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||
|
@ -352,6 +411,7 @@
|
|||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VITA @SDL_VIDEO_DRIVER_VITA@
|
||||
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
|
||||
|
@ -360,6 +420,7 @@
|
|||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_VITA_GXM @SDL_VIDEO_RENDER_VITA_GXM@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
|
@ -376,14 +437,20 @@
|
|||
/* Enable Vulkan support */
|
||||
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
|
||||
|
||||
/* Enable Metal support */
|
||||
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
#cmakedefine SDL_POWER_VITA @SDL_POWER_VITA@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||
|
@ -393,16 +460,25 @@
|
|||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
|
||||
#cmakedefine SDL_FILESYSTEM_OS2 @SDL_FILESYSTEM_OS2@
|
||||
#cmakedefine SDL_FILESYSTEM_VITA @SDL_FILESYSTEM_VITA@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
|
||||
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#if !defined(__WIN32__)
|
||||
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
|
||||
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
|
||||
|
||||
#cmakedefine SDL_VIDEO_VITA_PIB @SDL_VIDEO_VITA_PIB@
|
||||
|
||||
#if !defined(__WIN32__) && !defined(__WINRT__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#error You should run hg revert SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
|
@ -42,11 +42,12 @@
|
|||
#undef volatile
|
||||
|
||||
/* C datatypes */
|
||||
#ifdef __LP64__
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
|
||||
|
@ -99,7 +100,15 @@
|
|||
#undef HAVE_WCSLEN
|
||||
#undef HAVE_WCSLCPY
|
||||
#undef HAVE_WCSLCAT
|
||||
#undef HAVE__WCSDUP
|
||||
#undef HAVE_WCSDUP
|
||||
#undef HAVE_WCSSTR
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_WCSNCMP
|
||||
#undef HAVE_WCSCASECMP
|
||||
#undef HAVE__WCSICMP
|
||||
#undef HAVE_WCSNCASECMP
|
||||
#undef HAVE__WCSNICMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
|
@ -111,6 +120,7 @@
|
|||
#undef HAVE_STRCHR
|
||||
#undef HAVE_STRRCHR
|
||||
#undef HAVE_STRSTR
|
||||
#undef HAVE_STRTOK_R
|
||||
#undef HAVE_ITOA
|
||||
#undef HAVE__LTOA
|
||||
#undef HAVE__UITOA
|
||||
|
@ -149,6 +159,8 @@
|
|||
#undef HAVE_COPYSIGNF
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_EXP
|
||||
#undef HAVE_EXPF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FABSF
|
||||
#undef HAVE_FLOOR
|
||||
|
@ -159,8 +171,12 @@
|
|||
#undef HAVE_LOGF
|
||||
#undef HAVE_LOG10
|
||||
#undef HAVE_LOG10F
|
||||
#undef HAVE_LROUND
|
||||
#undef HAVE_LROUNDF
|
||||
#undef HAVE_POW
|
||||
#undef HAVE_POWF
|
||||
#undef HAVE_ROUND
|
||||
#undef HAVE_ROUNDF
|
||||
#undef HAVE_SCALBN
|
||||
#undef HAVE_SCALBNF
|
||||
#undef HAVE_SIN
|
||||
|
@ -169,6 +185,8 @@
|
|||
#undef HAVE_SQRTF
|
||||
#undef HAVE_TAN
|
||||
#undef HAVE_TANF
|
||||
#undef HAVE_TRUNC
|
||||
#undef HAVE_TRUNCF
|
||||
#undef HAVE_FOPEN64
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
|
@ -186,27 +204,39 @@
|
|||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_ELF_AUX_INFO
|
||||
#undef HAVE_POLL
|
||||
#undef HAVE__EXIT
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_FCITX_FRONTEND_H
|
||||
#undef HAVE_FCITX
|
||||
#undef HAVE_SYS_INOTIFY_H
|
||||
#undef HAVE_INOTIFY_INIT
|
||||
#undef HAVE_INOTIFY_INIT1
|
||||
#undef HAVE_INOTIFY
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_IMMINTRIN_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
#undef HAVE_LIBDECOR_H
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
|
||||
#undef HAVE_MMDEVICEAPI_H
|
||||
#undef HAVE_AUDIOCLIENT_H
|
||||
#undef HAVE_SENSORSAPI_H
|
||||
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
|
@ -221,6 +251,7 @@
|
|||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_SENSOR_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
#undef SDL_THREADS_DISABLED
|
||||
|
@ -254,6 +285,8 @@
|
|||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PIPEWIRE
|
||||
#undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_QSA
|
||||
|
@ -262,22 +295,29 @@
|
|||
#undef SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_WASAPI
|
||||
#undef SDL_AUDIO_DRIVER_WINMM
|
||||
#undef SDL_AUDIO_DRIVER_OS2
|
||||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
#undef SDL_INPUT_FBSDKBIO
|
||||
#undef SDL_INPUT_LINUXKD
|
||||
#undef SDL_INPUT_TSLIB
|
||||
#undef SDL_INPUT_WSCONS
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_MFI
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#undef SDL_JOYSTICK_ANDROID
|
||||
#undef SDL_JOYSTICK_WINMM
|
||||
#undef SDL_JOYSTICK_OS2
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||
#undef SDL_HAVE_MACHINE_JOYSTICK_H
|
||||
#undef SDL_JOYSTICK_HIDAPI
|
||||
#undef SDL_JOYSTICK_RAWINPUT
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_JOYSTICK_VIRTUAL
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_ANDROID
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
|
@ -285,23 +325,33 @@
|
|||
#undef SDL_HAPTIC_DINPUT
|
||||
#undef SDL_HAPTIC_XINPUT
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
#undef SDL_SENSOR_ANDROID
|
||||
#undef SDL_SENSOR_COREMOTION
|
||||
#undef SDL_SENSOR_WINDOWS
|
||||
#undef SDL_SENSOR_DUMMY
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
#undef SDL_LOADSO_LDG
|
||||
#undef SDL_LOADSO_WINDOWS
|
||||
#undef SDL_LOADSO_OS2
|
||||
|
||||
/* Enable various threading systems */
|
||||
#undef SDL_THREAD_GENERIC_COND_SUFFIX
|
||||
#undef SDL_THREAD_PTHREAD
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
|
||||
#undef SDL_THREAD_WINDOWS
|
||||
#undef SDL_THREAD_OS2
|
||||
|
||||
/* Enable various timer systems */
|
||||
#undef SDL_TIMER_HAIKU
|
||||
#undef SDL_TIMER_DUMMY
|
||||
#undef SDL_TIMER_UNIX
|
||||
#undef SDL_TIMER_WINDOWS
|
||||
#undef SDL_TIMER_OS2
|
||||
|
||||
/* Enable various video drivers */
|
||||
#undef SDL_VIDEO_DRIVER_HAIKU
|
||||
|
@ -316,9 +366,7 @@
|
|||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_MIR
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#undef SDL_VIDEO_DRIVER_RPI
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM
|
||||
|
@ -349,6 +397,7 @@
|
|||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||
#undef SDL_VIDEO_DRIVER_OS2
|
||||
#undef SDL_VIDEO_DRIVER_QNX
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
|
@ -374,6 +423,9 @@
|
|||
/* Enable Vulkan support */
|
||||
#undef SDL_VIDEO_VULKAN
|
||||
|
||||
/* Enable Metal support */
|
||||
#undef SDL_VIDEO_METAL
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
|
@ -392,10 +444,13 @@
|
|||
#undef SDL_FILESYSTEM_NACL
|
||||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
#undef SDL_FILESYSTEM_OS2
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
#undef SDL_ARM_SIMD_BLITTERS
|
||||
#undef SDL_ARM_NEON_BLITTERS
|
||||
|
||||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
@ -403,6 +458,9 @@
|
|||
/* Enable dynamic udev support */
|
||||
#undef SDL_UDEV_DYNAMIC
|
||||
|
||||
/* Enable dynamic libusb support */
|
||||
#undef SDL_LIBUSB_DYNAMIC
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#undef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -71,6 +71,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -98,6 +99,8 @@
|
|||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -108,8 +111,12 @@
|
|||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
|
@ -118,21 +125,34 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_OPENSLES 1
|
||||
#define SDL_AUDIO_DRIVER_AAUDIO 0
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable sensor driver */
|
||||
#define SDL_SENSOR_ANDROID 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -71,6 +71,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -99,6 +100,8 @@
|
|||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -109,8 +112,12 @@
|
|||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
|
@ -119,6 +126,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -133,8 +142,18 @@
|
|||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
|
||||
/* Enable MFi joystick support */
|
||||
/* Enable joystick support */
|
||||
/* Only enable HIDAPI support if you want to support Steam Controllers on iOS and tvOS */
|
||||
/*#define SDL_JOYSTICK_HIDAPI 1*/
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
#ifdef __TVOS__
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#else
|
||||
/* Enable the CoreMotion sensor driver */
|
||||
#define SDL_SENSOR_COREMOTION 1
|
||||
#endif
|
||||
|
||||
/* Enable Unix style SO loading */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
@ -151,13 +170,17 @@
|
|||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES */
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer */
|
||||
#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000))
|
||||
/* Metal supported on 64-bit devices running iOS 8.0 and tvOS 9.0 and newer
|
||||
Also supported in simulator from iOS 13.0 and tvOS 13.0
|
||||
*/
|
||||
#if (TARGET_OS_SIMULATOR && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (__TV_OS_VERSION_MIN_REQUIRED >= 130000))) || (!TARGET_CPU_ARM && ((__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 90000)))
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
|
@ -171,6 +194,10 @@
|
|||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
|
@ -180,11 +207,6 @@
|
|||
/* enable iOS extended launch screen */
|
||||
#define SDL_IPHONE_LAUNCHSCREEN 1
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -74,6 +74,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -102,6 +103,8 @@
|
|||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -112,8 +115,12 @@
|
|||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
|
@ -122,21 +129,41 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
|
||||
#if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* The MFI controller support requires ARC Objective C runtime */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
|
@ -151,13 +178,13 @@
|
|||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
|
@ -185,9 +212,15 @@
|
|||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||
#else
|
||||
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_RENDER_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_RENDER_METAL 0
|
||||
|
@ -211,13 +244,22 @@
|
|||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
/* Enable Vulkan and Metal support */
|
||||
#ifndef SDL_VIDEO_VULKAN
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_METAL
|
||||
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||
#define SDL_VIDEO_METAL 1
|
||||
#else
|
||||
#define SDL_VIDEO_METAL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -64,6 +64,9 @@ typedef unsigned long uintptr_t;
|
|||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub sensor driver (src/sensor/dummy/\*.c) */
|
||||
#define SDL_SENSOR_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
|
192
code/SDL2/include/SDL_config_os2.h
Normal file
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_os2_h_
|
||||
#define SDL_config_os2_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_OS2 1
|
||||
|
||||
#define SDL_POWER_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
/*#undef SDL_JOYSTICK_OS2 */
|
||||
/*#undef SDL_JOYSTICK_HIDAPI */
|
||||
/*#undef SDL_JOYSTICK_VIRTUAL */
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OS2 1
|
||||
|
||||
/* Enable OpenGL support */
|
||||
/* #undef SDL_VIDEO_OPENGL */
|
||||
|
||||
#define SDL_THREAD_OS2 1
|
||||
#define SDL_LOADSO_OS2 1
|
||||
#define SDL_TIMER_OS2 1
|
||||
#define SDL_FILESYSTEM_OS2 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
|
||||
/* use libsamplerate for audio rate conversion. */
|
||||
/*#define HAVE_LIBSAMPLERATE_H 1 */
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#define SDL_LIBSAMPLERATE_DYNAMIC "SAMPRATE.DLL"
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#if defined(__WATCOMC__)
|
||||
#define HAVE__FSEEKI64 1
|
||||
#define HAVE__FTELLI64 1
|
||||
#endif
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
/* #undef HAVE_WCSDUP */
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
/* #undef HAVE_INDEX */
|
||||
/* #undef HAVE_RINDEX */
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
#define HAVE_ITOA 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE__I64TOA 1
|
||||
#define HAVE__UI64TOA 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_ACOS 1
|
||||
/* #undef HAVE_ACOSF */
|
||||
#define HAVE_ASIN 1
|
||||
/* #undef HAVE_ASINF */
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
/* #undef HAVE_ATAN2F */
|
||||
#define HAVE_CEIL 1
|
||||
/* #undef HAVE_CEILF */
|
||||
/* #undef HAVE_COPYSIGN */
|
||||
/* #undef HAVE_COPYSIGNF */
|
||||
#define HAVE_COS 1
|
||||
/* #undef HAVE_COSF */
|
||||
#define HAVE_EXP 1
|
||||
/* #undef HAVE_EXPF */
|
||||
#define HAVE_FABS 1
|
||||
/* #undef HAVE_FABSF */
|
||||
#define HAVE_FLOOR 1
|
||||
/* #undef HAVE_FLOORF */
|
||||
#define HAVE_FMOD 1
|
||||
/* #undef HAVE_FMODF */
|
||||
#define HAVE_LOG 1
|
||||
/* #undef HAVE_LOGF */
|
||||
#define HAVE_LOG10 1
|
||||
/* #undef HAVE_LOG10F */
|
||||
#define HAVE_POW 1
|
||||
/* #undef HAVE_POWF */
|
||||
#define HAVE_SIN 1
|
||||
/* #undef HAVE_SINF */
|
||||
/* #undef HAVE_SCALBN */
|
||||
/* #undef HAVE_SCALBNF */
|
||||
#define HAVE_SQRT 1
|
||||
/* #undef HAVE_SQRTF */
|
||||
#define HAVE_TAN 1
|
||||
/* #undef HAVE_TANF */
|
||||
/* #undef HAVE_TRUNC */
|
||||
/* #undef HAVE_TRUNCF */
|
||||
/* #undef HAVE_LROUND */
|
||||
/* #undef HAVE_LROUNDF */
|
||||
/* #undef HAVE_ROUND */
|
||||
/* #undef HAVE_ROUNDF */
|
||||
|
||||
#endif /* SDL_config_os2_h_ */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -90,10 +90,15 @@
|
|||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
|
@ -101,6 +106,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -109,10 +116,12 @@
|
|||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -97,6 +97,8 @@
|
|||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -126,22 +128,26 @@
|
|||
/* PSP isn't that sophisticated */
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/psp/\*.c) */
|
||||
/* Enable the PSP thread support (src/thread/psp/\*.c) */
|
||||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/psp/\*.c) */
|
||||
/* Enable the PSP timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMERS_PSP 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/psp/\*.c) */
|
||||
/* Enable the PSP joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
|
||||
/* Enable the stub audio driver (src/audio/psp/\*.c) */
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable the PSP audio driver (src/audio/psp/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_PSP 1
|
||||
|
||||
/* PSP video dirver */
|
||||
/* PSP video driver */
|
||||
#define SDL_VIDEO_DRIVER_PSP 1
|
||||
|
||||
/* PSP render dirver */
|
||||
/* PSP render driver */
|
||||
#define SDL_VIDEO_RENDER_PSP 1
|
||||
|
||||
#define SDL_POWER_PSP 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -28,7 +28,7 @@
|
|||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__clang__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
|
@ -82,6 +82,16 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_SENSORSAPI_H 1
|
||||
#if (defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64)) && (defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#elif defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
|
@ -115,6 +125,7 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
/* #undef HAVE_STRTOK_R */
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
|
@ -127,6 +138,9 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE__WCSICMP 1
|
||||
#define HAVE__WCSNICMP 1
|
||||
#define HAVE__WCSDUP 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
|
@ -136,9 +150,11 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -161,9 +177,16 @@ typedef unsigned int uintptr_t;
|
|||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
|
@ -178,6 +201,20 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Check to see if we have Windows 10 build environment */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1911) /* Visual Studio 15.3 */
|
||||
#include <sdkddkver.h>
|
||||
#if _WIN32_WINNT >= 0x0601 /* Windows 7 */
|
||||
#define SDL_WINDOWS7_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0602 /* Windows 8 */
|
||||
#define SDL_WINDOWS8_SDK
|
||||
#endif
|
||||
#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */
|
||||
#define SDL_WINDOWS10_SDK
|
||||
#endif
|
||||
#endif /* _MSC_VER >= 1911 */
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
|
@ -187,14 +224,26 @@ typedef unsigned int uintptr_t;
|
|||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#ifndef __WINRT__
|
||||
#define SDL_JOYSTICK_RAWINPUT 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#ifdef SDL_WINDOWS10_SDK
|
||||
#define SDL_JOYSTICK_WGI 1
|
||||
#endif
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the sensor driver */
|
||||
#define SDL_SENSOR_WINDOWS 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
|
@ -207,8 +256,8 @@ typedef unsigned int uintptr_t;
|
|||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#ifdef SDL_WINDOWS7_SDK
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
|
@ -246,3 +295,5 @@ typedef unsigned int uintptr_t;
|
|||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -97,6 +97,10 @@ typedef unsigned int uintptr_t;
|
|||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
|
||||
#define HAVE_LIBC 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
|
@ -122,16 +126,13 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
|
||||
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
|
||||
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
//#define HAVE_STRTOLL 1
|
||||
/* #undef HAVE_STRTOLL */
|
||||
/* #undef HAVE_STRTOULL */
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
|
@ -140,7 +141,12 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
|
||||
/* TODO, WinRT: consider using ??_s versions of the following */
|
||||
/* #undef HAVE__STRLWR */
|
||||
/* #undef HAVE_ITOA */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
/* #undef HAVE_SSCANF */
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
|
@ -155,6 +161,8 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -165,8 +173,12 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE__SCALB 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
|
@ -174,6 +186,8 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
|
@ -186,15 +200,20 @@ typedef unsigned int uintptr_t;
|
|||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
#define SDL_THREAD_GENERIC_COND_SUFFIX 1
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
#else
|
||||
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -67,6 +67,7 @@
|
|||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
|
@ -94,6 +95,8 @@
|
|||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
|
@ -104,8 +107,12 @@
|
|||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
|
@ -114,6 +121,8 @@
|
|||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
@ -123,10 +132,12 @@
|
|||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -34,33 +34,68 @@
|
|||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */
|
||||
#undef __MMX__
|
||||
#undef __SSE__
|
||||
#undef __SSE2__
|
||||
#else
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#ifndef __MMX__
|
||||
#define __MMX__
|
||||
#endif
|
||||
#ifndef __3dNOW__
|
||||
#define __3dNOW__
|
||||
#endif
|
||||
#endif
|
||||
#ifndef __SSE__
|
||||
#define __SSE__
|
||||
#endif
|
||||
#ifndef __SSE2__
|
||||
#define __SSE2__
|
||||
#endif /* __clang__ */
|
||||
#endif
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
||||
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#undef bool
|
||||
#endif
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
# if defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
# elif defined(__WINDOWS__) || defined(__WINRT__)
|
||||
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||
# if defined(_M_ARM)
|
||||
# include <armintr.h>
|
||||
# include <arm_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# if defined (_M_ARM64)
|
||||
# include <arm64intr.h>
|
||||
# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif /* compiler version */
|
||||
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
|
@ -76,7 +111,6 @@
|
|||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif /* HAVE_IMMINTRIN_H */
|
||||
#endif /* compiler version */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -92,83 +126,392 @@ extern "C" {
|
|||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
/**
|
||||
* This function returns the number of CPU cores available.
|
||||
* Get the number of CPU cores available.
|
||||
*
|
||||
* \returns the total number of logical CPU cores. On CPUs that include
|
||||
* technologies such as hyperthreading, the number of logical cores
|
||||
* may be more than the number of physical cores.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||
|
||||
/**
|
||||
* This function returns the L1 cache line size of the CPU
|
||||
* Determine the L1 cache line size of the CPU.
|
||||
*
|
||||
* This is useful for determining multi-threaded structure padding
|
||||
* or SIMD prefetch sizes.
|
||||
* This is useful for determining multi-threaded structure padding or SIMD
|
||||
* prefetch sizes.
|
||||
*
|
||||
* \returns the L1 cache line size of the CPU, in bytes.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has the RDTSC instruction.
|
||||
* Determine whether the CPU has the RDTSC instruction.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AltiVec features.
|
||||
* Determine whether the CPU has AltiVec features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using PowerPC instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has MMX features.
|
||||
* Determine whether the CPU has MMX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has 3DNow! features.
|
||||
* Determine whether the CPU has 3DNow! features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using AMD instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE features.
|
||||
* Determine whether the CPU has SSE features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE2 features.
|
||||
* Determine whether the CPU has SSE2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE3 features.
|
||||
* Determine whether the CPU has SSE3 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE4.1 features.
|
||||
* Determine whether the CPU has SSE4.1 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has SSE4.2 features.
|
||||
* Determine whether the CPU has SSE4.2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX features.
|
||||
* Determine whether the CPU has AVX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX2 features.
|
||||
* Determine whether the CPU has AVX2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||
* Determine whether the CPU has AVX-512F (foundation) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
||||
*
|
||||
* This is different from ARM NEON, which is a different instruction set.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_HasNEON
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has NEON (ARM SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* This function returns the amount of RAM configured in the system, in MB.
|
||||
* Get the amount of RAM configured in the system.
|
||||
*
|
||||
* \returns the amount of RAM configured in the system in MB.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
/**
|
||||
* Report the alignment this system needs for SIMD allocations.
|
||||
*
|
||||
* This will return the minimum number of bytes to which a pointer must be
|
||||
* aligned to be compatible with SIMD instructions on the current machine. For
|
||||
* example, if the machine supports SSE only, it will return 16, but if it
|
||||
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
||||
* instruction sets SDL knows about, so if your SDL build doesn't have
|
||||
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
||||
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
||||
* Plan accordingly.
|
||||
*
|
||||
* \returns the alignment in bytes needed for available, known SIMD
|
||||
* instructions.
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||
|
||||
/**
|
||||
* Allocate memory in a SIMD-friendly way.
|
||||
*
|
||||
* This will allocate a block of memory that is suitable for use with SIMD
|
||||
* instructions. Specifically, it will be properly aligned and padded for the
|
||||
* system's supported vector instructions.
|
||||
*
|
||||
* The memory returned will be padded such that it is safe to read or write an
|
||||
* incomplete vector at the end of the memory block. This can be useful so you
|
||||
* don't have to drop back to a scalar fallback at the end of your SIMD
|
||||
* processing loop to deal with the final elements without overflowing the
|
||||
* allocated buffer.
|
||||
*
|
||||
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
||||
* delete[], etc.
|
||||
*
|
||||
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
||||
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
||||
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
||||
* 64. To be clear: if you can't decide to use an instruction set with an
|
||||
* SDL_Has*() function, don't use that instruction set with memory allocated
|
||||
* through here.
|
||||
*
|
||||
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
||||
* out of memory, but you are not allowed to dereference it (because you only
|
||||
* own zero bytes of that buffer).
|
||||
*
|
||||
* \param len The length, in bytes, of the block to allocate. The actual
|
||||
* allocated block might be larger due to padding, etc.
|
||||
* \returns a pointer to thenewly-allocated block, NULL if out of memory.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||
|
||||
/**
|
||||
* Reallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
||||
* SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||
* accepts NULL, at which point this function is the same as
|
||||
* calling SDL_SIMDAlloc with a NULL pointer.
|
||||
* \param len The length, in bytes, of the block to allocated. The actual
|
||||
* allocated block might be larger due to padding, etc. Passing 0
|
||||
* will return a non-NULL pointer, assuming the system isn't out of
|
||||
* memory.
|
||||
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||
*
|
||||
* \sa SDL_SIMDAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||
|
||||
/**
|
||||
* Deallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
||||
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||
*
|
||||
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
||||
* and may be returned to the system or reused by a future allocation. The
|
||||
* pointer passed to this function is no longer safe to dereference once this
|
||||
* function returns, and should be discarded.
|
||||
*
|
||||
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||
* deallocate. NULL is a legal no-op.
|
||||
*
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDRealloc
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -390,6 +390,9 @@ typedef enum {
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#ifndef NOMINMAX /* don't define min() and max(). */
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#if __WINRT__
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -30,6 +30,26 @@
|
|||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#ifdef __clang__
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name The two types of endianness
|
||||
*/
|
||||
|
@ -42,10 +62,16 @@
|
|||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else /* __linux__ */
|
||||
#elif defined(__OpenBSD__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
|
||||
defined(__sparc__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
|
@ -65,8 +91,11 @@ extern "C" {
|
|||
/**
|
||||
* \file SDL_endian.h
|
||||
*/
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
|
||||
#if (defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))
|
||||
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
|
@ -89,13 +118,23 @@ SDL_Swap16(Uint16 x)
|
|||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
|
@ -110,7 +149,11 @@ SDL_Swap16(Uint16 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if (defined(__clang__) && (__clang_major__ > 2 || (__clang_major__ == 2 && __clang_minor__ >= 6))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -130,12 +173,19 @@ SDL_Swap32(Uint32 x)
|
|||
{
|
||||
Uint32 result;
|
||||
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result):"0"(x >> 24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15": "=&r"(result):"0"(result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7": "=&r"(result):"0"(result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -144,19 +194,13 @@ SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint32 SDL_Swap32(Uint32);
|
||||
#ifndef __SW_3 /* 486+ */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#else /* 386-only */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"xchg al, ah" \
|
||||
"ror eax, 16" \
|
||||
"xchg al, ah" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
|
@ -166,22 +210,24 @@ SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if (defined(__clang__) && (__clang_major__ > 2 || (__clang_major__ == 2 && __clang_minor__ >= 6))) || \
|
||||
(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
|
||||
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||
#elif defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
Uint32 a, b;
|
||||
} s;
|
||||
Uint64 u;
|
||||
} v;
|
||||
v.u = x;
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
|
||||
"1"(v.s.
|
||||
b));
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||
: "=r"(v.s.a), "=r"(v.s.b)
|
||||
: "0" (v.s.a), "1"(v.s.b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||
|
@ -191,6 +237,17 @@ SDL_Swap64(Uint64 x)
|
|||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint64 SDL_Swap64(Uint64);
|
||||
#pragma aux SDL_Swap64 = \
|
||||
"bswap eax" \
|
||||
"bswap edx" \
|
||||
"xchg eax,edx" \
|
||||
parm [eax edx] \
|
||||
modify [eax edx];
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
|
@ -212,8 +269,7 @@ SDL_Swap64(Uint64 x)
|
|||
SDL_FORCE_INLINE float
|
||||
SDL_SwapFloat(float x)
|
||||
{
|
||||
union
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
Uint32 ui32;
|
||||
} swapper;
|
||||
|
@ -229,22 +285,22 @@ SDL_SwapFloat(float x)
|
|||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapFloatLE(X) (X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||
#else
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapFloatBE(X) (X)
|
||||
#endif
|
||||
/* @} *//* Swap to native */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -37,9 +37,45 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* Public functions */
|
||||
/* SDL_SetError() unconditionally returns -1. */
|
||||
|
||||
|
||||
/**
|
||||
* \brief Set the error message for the current thread
|
||||
*
|
||||
* \return -1, there is no error handling for this function
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* \brief Get the last error message that was set
|
||||
*
|
||||
* SDL API functions may set error messages and then succeed, so you should
|
||||
* only use the error value if a function fails.
|
||||
*
|
||||
* This returns a pointer to a static buffer for convenience and should not
|
||||
* be called by multiple threads simultaneously.
|
||||
*
|
||||
* \return a pointer to the last error message that was set
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
|
||||
/**
|
||||
* \brief Get the last error message that was set for the current thread
|
||||
*
|
||||
* SDL API functions may set error messages and then succeed, so you should
|
||||
* only use the error value if a function fails.
|
||||
*
|
||||
* \param errstr A buffer to fill with the last error message that was set
|
||||
* for the current thread
|
||||
* \param maxlen The size of the buffer pointed to by the errstr parameter
|
||||
*
|
||||
* \return errstr
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
||||
/**
|
||||
* \brief Clear the error message for the current thread
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -50,7 +50,7 @@ extern "C" {
|
|||
#define SDL_PRESSED 1
|
||||
|
||||
/**
|
||||
* \brief The types of events that can be delivered.
|
||||
* The types of events that can be delivered.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
@ -85,6 +85,11 @@ typedef enum
|
|||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
SDL_LOCALECHANGED, /**< The user's locale preferences have changed. */
|
||||
|
||||
/* Display events */
|
||||
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
|
||||
|
||||
/* Window events */
|
||||
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
||||
SDL_SYSWMEVENT, /**< System specific event */
|
||||
|
@ -120,6 +125,10 @@ typedef enum
|
|||
SDL_CONTROLLERDEVICEADDED, /**< A new Game controller has been inserted into the system */
|
||||
SDL_CONTROLLERDEVICEREMOVED, /**< An opened Game controller has been removed */
|
||||
SDL_CONTROLLERDEVICEREMAPPED, /**< The controller mapping was updated */
|
||||
SDL_CONTROLLERTOUCHPADDOWN, /**< Game controller touchpad was touched */
|
||||
SDL_CONTROLLERTOUCHPADMOTION, /**< Game controller touchpad finger was moved */
|
||||
SDL_CONTROLLERTOUCHPADUP, /**< Game controller touchpad finger was lifted */
|
||||
SDL_CONTROLLERSENSORUPDATE, /**< Game controller sensor was updated */
|
||||
|
||||
/* Touch events */
|
||||
SDL_FINGERDOWN = 0x700,
|
||||
|
@ -144,6 +153,9 @@ typedef enum
|
|||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||
|
||||
/* Sensor events */
|
||||
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
|
@ -168,6 +180,21 @@ typedef struct SDL_CommonEvent
|
|||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
* \brief Display state change event data (event.display.*)
|
||||
*/
|
||||
typedef struct SDL_DisplayEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DISPLAYEVENT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 display; /**< The associated display index */
|
||||
Uint8 event; /**< ::SDL_DisplayEventID */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint32 data1; /**< event dependent data */
|
||||
} SDL_DisplayEvent;
|
||||
|
||||
/**
|
||||
* \brief Window state change event data (event.window.*)
|
||||
*/
|
||||
|
@ -392,6 +419,33 @@ typedef struct SDL_ControllerDeviceEvent
|
|||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller touchpad event structure (event.ctouchpad.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerTouchpadEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 touchpad; /**< The index of the touchpad */
|
||||
Sint32 finger; /**< The index of the finger on the touchpad */
|
||||
float x; /**< Normalized in the range 0...1 with 0 being on the left */
|
||||
float y; /**< Normalized in the range 0...1 with 0 being at the top */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
} SDL_ControllerTouchpadEvent;
|
||||
|
||||
/**
|
||||
* \brief Game controller sensor event structure (event.csensor.*)
|
||||
*/
|
||||
typedef struct SDL_ControllerSensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERSENSORUPDATE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Sint32 sensor; /**< The type of the sensor, one of the values of ::SDL_SensorType */
|
||||
float data[3]; /**< Up to 3 values from the sensor, as defined in SDL_sensor.h */
|
||||
} SDL_ControllerSensorEvent;
|
||||
|
||||
/**
|
||||
* \brief Audio device event structure (event.adevice.*)
|
||||
*/
|
||||
|
@ -421,6 +475,7 @@ typedef struct SDL_TouchFingerEvent
|
|||
float dx; /**< Normalized in the range -1...1 */
|
||||
float dy; /**< Normalized in the range -1...1 */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
Uint32 windowID; /**< The window underneath the finger, if any */
|
||||
} SDL_TouchFingerEvent;
|
||||
|
||||
|
||||
|
@ -471,6 +526,17 @@ typedef struct SDL_DropEvent
|
|||
} SDL_DropEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Sensor event structure (event.sensor.*)
|
||||
*/
|
||||
typedef struct SDL_SensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SENSORUPDATE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The instance ID of the sensor */
|
||||
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
|
||||
} SDL_SensorEvent;
|
||||
|
||||
/**
|
||||
* \brief The "quit requested" event
|
||||
*/
|
||||
|
@ -524,51 +590,77 @@ typedef struct SDL_SysWMEvent
|
|||
*/
|
||||
typedef union SDL_Event
|
||||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
|
||||
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
|
||||
SDL_JoyBallEvent jball; /**< Joystick ball event data */
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
|
||||
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
|
||||
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
|
||||
SDL_DropEvent drop; /**< Drag and drop event data */
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Display event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
SDL_TextInputEvent text; /**< Text input event data */
|
||||
SDL_MouseMotionEvent motion; /**< Mouse motion event data */
|
||||
SDL_MouseButtonEvent button; /**< Mouse button event data */
|
||||
SDL_MouseWheelEvent wheel; /**< Mouse wheel event data */
|
||||
SDL_JoyAxisEvent jaxis; /**< Joystick axis event data */
|
||||
SDL_JoyBallEvent jball; /**< Joystick ball event data */
|
||||
SDL_JoyHatEvent jhat; /**< Joystick hat event data */
|
||||
SDL_JoyButtonEvent jbutton; /**< Joystick button event data */
|
||||
SDL_JoyDeviceEvent jdevice; /**< Joystick device change event data */
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_ControllerTouchpadEvent ctouchpad; /**< Game Controller touchpad event data */
|
||||
SDL_ControllerSensorEvent csensor; /**< Game Controller sensor event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_SensorEvent sensor; /**< Sensor event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
SDL_TouchFingerEvent tfinger; /**< Touch finger event data */
|
||||
SDL_MultiGestureEvent mgesture; /**< Gesture event data */
|
||||
SDL_DollarGestureEvent dgesture; /**< Gesture event data */
|
||||
SDL_DropEvent drop; /**< Drag and drop event data */
|
||||
|
||||
/* This is necessary for ABI compatibility between Visual C++ and GCC
|
||||
Visual C++ will respect the push pack pragma and use 52 bytes for
|
||||
this structure, and GCC will use the alignment of the largest datatype
|
||||
within the union, which is 8 bytes.
|
||||
/* This is necessary for ABI compatibility between Visual C++ and GCC.
|
||||
Visual C++ will respect the push pack pragma and use 52 bytes (size of
|
||||
SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit
|
||||
architectures) for this union, and GCC will use the alignment of the
|
||||
largest datatype within the union, which is 8 bytes on 64-bit
|
||||
architectures.
|
||||
|
||||
So... we'll add padding to force the size to be 56 bytes for both.
|
||||
|
||||
On architectures where pointers are 16 bytes, this needs rounding up to
|
||||
the next multiple of 16, 64, and on architectures where pointers are
|
||||
even larger the size of SDL_UserEvent will dominate as being 3 pointers.
|
||||
*/
|
||||
Uint8 padding[56];
|
||||
Uint8 padding[sizeof(void *) <= 8 ? 56 : sizeof(void *) == 16 ? 64 : 3 * sizeof(void *)];
|
||||
} SDL_Event;
|
||||
|
||||
/* Make sure we haven't broken binary compatibility */
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == sizeof(((SDL_Event *)NULL)->padding));
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Pumps the event loop, gathering events from the input devices.
|
||||
* Pump the event loop, gathering events from the input devices.
|
||||
*
|
||||
* This function updates the event queue and internal input device state.
|
||||
* This function updates the event queue and internal input device state.
|
||||
*
|
||||
* This should only be run in the thread that sets the video mode.
|
||||
* **WARNING**: This should only be run in the thread that initialized the
|
||||
* video subsystem, and for extra safety, you should consider only doing those
|
||||
* things on the main thread in any case.
|
||||
*
|
||||
* SDL_PumpEvents() gathers all the pending input information from devices and
|
||||
* places it in the event queue. Without calls to SDL_PumpEvents() no events
|
||||
* would ever be placed on the queue. Often the need for calls to
|
||||
* SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and
|
||||
* SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not
|
||||
* polling or waiting for events (e.g. you are filtering them), then you must
|
||||
* call SDL_PumpEvents() to force an event queue update.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_WaitEvent
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_PumpEvents(void);
|
||||
|
||||
|
@ -581,22 +673,40 @@ typedef enum
|
|||
} SDL_eventaction;
|
||||
|
||||
/**
|
||||
* Checks the event queue for messages and optionally returns them.
|
||||
* Check the event queue for messages and optionally return them.
|
||||
*
|
||||
* If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to
|
||||
* the back of the event queue.
|
||||
* `action` may be any of the following:
|
||||
*
|
||||
* If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front
|
||||
* of the event queue, within the specified minimum and maximum type,
|
||||
* will be returned and will not be removed from the queue.
|
||||
* - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the
|
||||
* event queue.
|
||||
* - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,
|
||||
* within the specified minimum and maximum type, will be returned to the
|
||||
* caller and will _not_ be removed from the queue.
|
||||
* - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,
|
||||
* within the specified minimum and maximum type, will be returned to the
|
||||
* caller and will be removed from the queue.
|
||||
*
|
||||
* If \c action is ::SDL_GETEVENT, up to \c numevents events at the front
|
||||
* of the event queue, within the specified minimum and maximum type,
|
||||
* will be returned and will be removed from the queue.
|
||||
* You may have to call SDL_PumpEvents() before calling this function.
|
||||
* Otherwise, the events may not be ready to be filtered when you call
|
||||
* SDL_PeepEvents().
|
||||
*
|
||||
* \return The number of events actually stored, or -1 if there was an error.
|
||||
* This function is thread-safe.
|
||||
*
|
||||
* This function is thread-safe.
|
||||
* \param events destination buffer for the retrieved events
|
||||
* \param numevents if action is SDL_ADDEVENT, the number of events to add
|
||||
* back to the event queue; if action is SDL_PEEKEVENT or
|
||||
* SDL_GETEVENT, the maximum number of events to retrieve
|
||||
* \param action action to take; see [[#action|Remarks]] for details
|
||||
* \param minType minimum value of the event type to be considered;
|
||||
* SDL_FIRSTEVENT is a safe choice
|
||||
* \param maxType maximum value of the event type to be considered;
|
||||
* SDL_LASTEVENT is a safe choice
|
||||
* \returns the number of events actually stored or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_PushEvent
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
|
||||
SDL_eventaction action,
|
||||
|
@ -604,113 +714,328 @@ extern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,
|
|||
/* @} */
|
||||
|
||||
/**
|
||||
* Checks to see if certain event types are in the event queue.
|
||||
* Check for the existence of a certain event type in the event queue.
|
||||
*
|
||||
* If you need to check for a range of event types, use SDL_HasEvents()
|
||||
* instead.
|
||||
*
|
||||
* \param type the type of event to be queried; see SDL_EventType for details
|
||||
* \returns SDL_TRUE if events matching `type` are present, or SDL_FALSE if
|
||||
* events matching `type` are not present.
|
||||
*
|
||||
* \sa SDL_HasEvents
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);
|
||||
|
||||
|
||||
/**
|
||||
* Check for the existence of certain event types in the event queue.
|
||||
*
|
||||
* If you need to check for a single event type, use SDL_HasEvent() instead.
|
||||
*
|
||||
* \param minType the low end of event type to be queried, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* \param maxType the high end of event type to be queried, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* \returns SDL_TRUE if events with type >= `minType` and <= `maxType` are
|
||||
* present, or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_HasEvents
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
||||
|
||||
/**
|
||||
* This function clears events from the event queue
|
||||
* This function only affects currently queued events. If you want to make
|
||||
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||
* on the main thread immediately before the flush call.
|
||||
* Clear events of a specific type from the event queue.
|
||||
*
|
||||
* This will unconditionally remove any events from the queue that match
|
||||
* `type`. If you need to remove a range of event types, use SDL_FlushEvents()
|
||||
* instead.
|
||||
*
|
||||
* It's also normal to just ignore events you don't care about in your event
|
||||
* loop without calling this function.
|
||||
*
|
||||
* This function only affects currently queued events. If you want to make
|
||||
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||
* on the main thread immediately before the flush call.
|
||||
*
|
||||
* \param type the type of event to be cleared; see SDL_EventType for details
|
||||
*
|
||||
* \sa SDL_FlushEvents
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
||||
|
||||
/**
|
||||
* Clear events of a range of types from the event queue.
|
||||
*
|
||||
* This will unconditionally remove any events from the queue that are in the
|
||||
* range of `minType` to `maxType`, inclusive. If you need to remove a single
|
||||
* event type, use SDL_FlushEvent() instead.
|
||||
*
|
||||
* It's also normal to just ignore events you don't care about in your event
|
||||
* loop without calling this function.
|
||||
*
|
||||
* This function only affects currently queued events. If you want to make
|
||||
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||
* on the main thread immediately before the flush call.
|
||||
*
|
||||
* \param minType the low end of event type to be cleared, inclusive; see
|
||||
* SDL_EventType for details
|
||||
* \param maxType the high end of event type to be cleared, inclusive; see
|
||||
* SDL_EventType for details
|
||||
*
|
||||
* \sa SDL_FlushEvent
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||
|
||||
/**
|
||||
* \brief Polls for currently pending events.
|
||||
* Poll for currently pending events.
|
||||
*
|
||||
* \return 1 if there are any pending events, or 0 if there are none available.
|
||||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
|
||||
* this event, immediately stored in the SDL Event structure -- not an event
|
||||
* to follow.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
|
||||
* but will not remove it from the queue.
|
||||
*
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that set the video mode.
|
||||
*
|
||||
* SDL_PollEvent() is the favored way of receiving system events since it can
|
||||
* be done from the main loop and does not suspend the main loop while waiting
|
||||
* on an event to be posted.
|
||||
*
|
||||
* The common practice is to fully process the event queue once every frame,
|
||||
* usually as a first step before updating the game's state:
|
||||
*
|
||||
* ```c
|
||||
* while (game_is_still_running) {
|
||||
* SDL_Event event;
|
||||
* while (SDL_PollEvent(&event)) { // poll until all events are handled!
|
||||
* // decide what to do with this event.
|
||||
* }
|
||||
*
|
||||
* // update game state, draw the current frame
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled with the next event from
|
||||
* the queue, or NULL
|
||||
* \returns 1 if there is a pending event or 0 if there are none available.
|
||||
*
|
||||
* \sa SDL_GetEventFilter
|
||||
* \sa SDL_PeepEvents
|
||||
* \sa SDL_PushEvent
|
||||
* \sa SDL_SetEventFilter
|
||||
* \sa SDL_WaitEvent
|
||||
* \sa SDL_WaitEventTimeout
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);
|
||||
|
||||
/**
|
||||
* \brief Waits indefinitely for the next available event.
|
||||
* Wait indefinitely for the next available event.
|
||||
*
|
||||
* \return 1, or 0 if there was an error while waiting for events.
|
||||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
* \returns 1 on success or 0 if there was an error while waiting for events;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_WaitEventTimeout
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
|
||||
|
||||
/**
|
||||
* \brief Waits until the specified timeout (in milliseconds) for the next
|
||||
* available event.
|
||||
* Wait until the specified timeout (in milliseconds) for the next available
|
||||
* event.
|
||||
*
|
||||
* \return 1, or 0 if there was an error while waiting for events.
|
||||
* If `event` is not NULL, the next event is removed from the queue and stored
|
||||
* in the SDL_Event structure pointed to by `event`.
|
||||
*
|
||||
* \param event If not NULL, the next event is removed from the queue and
|
||||
* stored in that area.
|
||||
* \param timeout The timeout (in milliseconds) to wait for next event.
|
||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||
* function in the thread that initialized the video subsystem.
|
||||
*
|
||||
* \param event the SDL_Event structure to be filled in with the next event
|
||||
* from the queue, or NULL
|
||||
* \param timeout the maximum number of milliseconds to wait for the next
|
||||
* available event
|
||||
* \returns 1 on success or 0 if there was an error while waiting for events;
|
||||
* call SDL_GetError() for more information. This also returns 0 if
|
||||
* the timeout elapsed without an event arriving.
|
||||
*
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_PumpEvents
|
||||
* \sa SDL_WaitEvent
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,
|
||||
int timeout);
|
||||
|
||||
/**
|
||||
* \brief Add an event to the event queue.
|
||||
* Add an event to the event queue.
|
||||
*
|
||||
* \return 1 on success, 0 if the event was filtered, or -1 if the event queue
|
||||
* was full or there was some other error.
|
||||
* The event queue can actually be used as a two way communication channel.
|
||||
* Not only can events be read from the queue, but the user can also push
|
||||
* their own events onto it. `event` is a pointer to the event structure you
|
||||
* wish to push onto the queue. The event is copied into the queue, and the
|
||||
* caller may dispose of the memory pointed to after SDL_PushEvent() returns.
|
||||
*
|
||||
* Note: Pushing device input events onto the queue doesn't modify the state
|
||||
* of the device within SDL.
|
||||
*
|
||||
* This function is thread-safe, and can be called from other threads safely.
|
||||
*
|
||||
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
|
||||
* the event filter but events added with SDL_PeepEvents() do not.
|
||||
*
|
||||
* For pushing application-specific events, please use SDL_RegisterEvents() to
|
||||
* get an event type that does not conflict with other code that also wants
|
||||
* its own custom event types.
|
||||
*
|
||||
* \param event the SDL_Event to be added to the queue
|
||||
* \returns 1 on success, 0 if the event was filtered, or a negative error
|
||||
* code on failure; call SDL_GetError() for more information. A
|
||||
* common reason for error is the event queue being full.
|
||||
*
|
||||
* \sa SDL_PeepEvents
|
||||
* \sa SDL_PollEvent
|
||||
* \sa SDL_RegisterEvents
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
|
||||
|
||||
/**
|
||||
* A function pointer used for callbacks that watch the event queue.
|
||||
*
|
||||
* \param userdata what was passed as `userdata` to SDL_SetEventFilter()
|
||||
* or SDL_AddEventWatch, etc
|
||||
* \param event the event that triggered the callback
|
||||
* \returns 1 to permit event to be added to the queue, and 0 to disallow
|
||||
* it. When used with SDL_AddEventWatch, the return value is ignored.
|
||||
*
|
||||
* \sa SDL_SetEventFilter
|
||||
* \sa SDL_AddEventWatch
|
||||
*/
|
||||
typedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);
|
||||
|
||||
/**
|
||||
* Sets up a filter to process all events before they change internal state and
|
||||
* are posted to the internal event queue.
|
||||
* Set up a filter to process all events before they change internal state and
|
||||
* are posted to the internal event queue.
|
||||
*
|
||||
* The filter is prototyped as:
|
||||
* \code
|
||||
* int SDL_EventFilter(void *userdata, SDL_Event * event);
|
||||
* \endcode
|
||||
* If the filter function returns 1 when called, then the event will be added
|
||||
* to the internal queue. If it returns 0, then the event will be dropped from
|
||||
* the queue, but the internal state will still be updated. This allows
|
||||
* selective filtering of dynamically arriving events.
|
||||
*
|
||||
* If the filter returns 1, then the event will be added to the internal queue.
|
||||
* If it returns 0, then the event will be dropped from the queue, but the
|
||||
* internal state will still be updated. This allows selective filtering of
|
||||
* dynamically arriving events.
|
||||
* **WARNING**: Be very careful of what you do in the event filter function,
|
||||
* as it may run in a different thread!
|
||||
*
|
||||
* \warning Be very careful of what you do in the event filter function, as
|
||||
* it may run in a different thread!
|
||||
* On platforms that support it, if the quit event is generated by an
|
||||
* interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
|
||||
* application at the next event poll.
|
||||
*
|
||||
* There is one caveat when dealing with the ::SDL_QuitEvent event type. The
|
||||
* event filter is only called when the window manager desires to close the
|
||||
* application window. If the event filter returns 1, then the window will
|
||||
* be closed, otherwise the window will remain open if possible.
|
||||
* There is one caveat when dealing with the ::SDL_QuitEvent event type. The
|
||||
* event filter is only called when the window manager desires to close the
|
||||
* application window. If the event filter returns 1, then the window will be
|
||||
* closed, otherwise the window will remain open if possible.
|
||||
*
|
||||
* If the quit event is generated by an interrupt signal, it will bypass the
|
||||
* internal queue and be delivered to the application at the next event poll.
|
||||
* Note: Disabled events never make it to the event filter function; see
|
||||
* SDL_EventState().
|
||||
*
|
||||
* Note: If you just want to inspect events without filtering, you should use
|
||||
* SDL_AddEventWatch() instead.
|
||||
*
|
||||
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
|
||||
* the event filter, but events pushed onto the queue with SDL_PeepEvents() do
|
||||
* not.
|
||||
*
|
||||
* \param filter An SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \sa SDL_AddEventWatch
|
||||
* \sa SDL_EventState
|
||||
* \sa SDL_GetEventFilter
|
||||
* \sa SDL_PeepEvents
|
||||
* \sa SDL_PushEvent
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Return the current event filter - can be used to "chain" filters.
|
||||
* If there is no event filter set, this function returns SDL_FALSE.
|
||||
* Query the current event filter.
|
||||
*
|
||||
* This function can be used to "chain" filters, by saving the existing filter
|
||||
* before replacing it with a function that will call that saved filter.
|
||||
*
|
||||
* \param filter the current callback function will be stored here
|
||||
* \param userdata the pointer that is passed to the current event filter will
|
||||
* be stored here
|
||||
* \returns SDL_TRUE on success or SDL_FALSE if there is no event filter set.
|
||||
*
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
||||
void **userdata);
|
||||
|
||||
/**
|
||||
* Add a function which is called when an event is added to the queue.
|
||||
* Add a callback to be triggered when an event is added to the event queue.
|
||||
*
|
||||
* `filter` will be called when an event happens, and its return value is
|
||||
* ignored.
|
||||
*
|
||||
* **WARNING**: Be very careful of what you do in the event filter function,
|
||||
* as it may run in a different thread!
|
||||
*
|
||||
* If the quit event is generated by a signal (e.g. SIGINT), it will bypass
|
||||
* the internal queue and be delivered to the watch callback immediately, and
|
||||
* arrive at the next event poll.
|
||||
*
|
||||
* Note: the callback is called for events posted by the user through
|
||||
* SDL_PushEvent(), but not for disabled events, nor for events by a filter
|
||||
* callback set with SDL_SetEventFilter(), nor for events posted by the user
|
||||
* through SDL_PeepEvents().
|
||||
*
|
||||
* \param filter an SDL_EventFilter function to call when an event happens.
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \sa SDL_DelEventWatch
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Remove an event watch function added with SDL_AddEventWatch()
|
||||
* Remove an event watch callback added with SDL_AddEventWatch().
|
||||
*
|
||||
* This function takes the same input as SDL_AddEventWatch() to identify and
|
||||
* delete the corresponding callback.
|
||||
*
|
||||
* \param filter the function originally passed to SDL_AddEventWatch()
|
||||
* \param userdata the pointer originally passed to SDL_AddEventWatch()
|
||||
*
|
||||
* \sa SDL_AddEventWatch
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Run the filter function on the current event queue, removing any
|
||||
* events for which the filter returns 0.
|
||||
* Run a specific filter function on the current event queue, removing any
|
||||
* events for which the filter returns 0.
|
||||
*
|
||||
* See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),
|
||||
* this function does not change the filter permanently, it only uses the
|
||||
* supplied filter until this function returns.
|
||||
*
|
||||
* \param filter the SDL_EventFilter function to call when an event happens
|
||||
* \param userdata a pointer that is passed to `filter`
|
||||
*
|
||||
* \sa SDL_GetEventFilter
|
||||
* \sa SDL_SetEventFilter
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
@ -722,24 +1047,43 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
|||
#define SDL_ENABLE 1
|
||||
|
||||
/**
|
||||
* This function allows you to set the state of processing certain events.
|
||||
* - If \c state is set to ::SDL_IGNORE, that event will be automatically
|
||||
* dropped from the event queue and will not be filtered.
|
||||
* - If \c state is set to ::SDL_ENABLE, that event will be processed
|
||||
* normally.
|
||||
* - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
|
||||
* current processing state of the specified event.
|
||||
* Set the state of processing events by type.
|
||||
*
|
||||
* `state` may be any of the following:
|
||||
*
|
||||
* - `SDL_QUERY`: returns the current processing state of the specified event
|
||||
* - `SDL_IGNORE` (aka `SDL_DISABLE`): the event will automatically be dropped
|
||||
* from the event queue and will not be filtered
|
||||
* - `SDL_ENABLE`: the event will be processed normally
|
||||
*
|
||||
* \param type the type of event; see SDL_EventType for details
|
||||
* \param state how to process the event
|
||||
* \returns `SDL_DISABLE` or `SDL_ENABLE`, representing the processing state
|
||||
* of the event before this function makes any changes to it.
|
||||
*
|
||||
* \sa SDL_GetEventState
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
|
||||
/* @} */
|
||||
#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)
|
||||
|
||||
/**
|
||||
* This function allocates a set of user-defined events, and returns
|
||||
* the beginning event number for that set of events.
|
||||
* Allocate a set of user-defined events, and return the beginning event
|
||||
* number for that set of events.
|
||||
*
|
||||
* If there aren't enough user-defined events left, this function
|
||||
* returns (Uint32)-1
|
||||
* Calling this function with `numevents` <= 0 is an error and will return
|
||||
* (Uint32)-1.
|
||||
*
|
||||
* Note, (Uint32)-1 means the maximum unsigned 32-bit integer value (or
|
||||
* 0xFFFFFFFF), but is clearer to write.
|
||||
*
|
||||
* \param numevents the number of events to be allocated
|
||||
* \returns the beginning event number, or (Uint32)-1 if there are not enough
|
||||
* user-defined events left.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_PushEvent
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -31,6 +31,7 @@
|
|||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_joystick.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
@ -57,6 +58,19 @@ extern "C" {
|
|||
struct _SDL_GameController;
|
||||
typedef struct _SDL_GameController SDL_GameController;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_CONTROLLER_TYPE_UNKNOWN = 0,
|
||||
SDL_CONTROLLER_TYPE_XBOX360,
|
||||
SDL_CONTROLLER_TYPE_XBOXONE,
|
||||
SDL_CONTROLLER_TYPE_PS3,
|
||||
SDL_CONTROLLER_TYPE_PS4,
|
||||
SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
|
||||
SDL_CONTROLLER_TYPE_VIRTUAL,
|
||||
SDL_CONTROLLER_TYPE_PS5,
|
||||
SDL_CONTROLLER_TYPE_AMAZON_LUNA,
|
||||
SDL_CONTROLLER_TYPE_GOOGLE_STADIA
|
||||
} SDL_GameControllerType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -87,6 +101,8 @@ typedef struct SDL_GameControllerButtonBind
|
|||
|
||||
/**
|
||||
* To count the number of game controllers in the system for the following:
|
||||
*
|
||||
* ```c
|
||||
* int nJoysticks = SDL_NumJoysticks();
|
||||
* int nGameControllers = 0;
|
||||
* for (int i = 0; i < nJoysticks; i++) {
|
||||
|
@ -94,6 +110,7 @@ typedef struct SDL_GameControllerButtonBind
|
|||
* nGameControllers++;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
|
||||
* guid,name,mappings
|
||||
|
@ -107,17 +124,39 @@ typedef struct SDL_GameControllerButtonBind
|
|||
* Buttons can be used as a controller axis and vice versa.
|
||||
*
|
||||
* This string shows an example of a valid mapping for a controller
|
||||
* "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
|
||||
*
|
||||
* ```c
|
||||
* "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
|
||||
* ```
|
||||
*/
|
||||
|
||||
/**
|
||||
* Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
|
||||
* A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||
* Load a set of Game Controller mappings from a seekable SDL data stream.
|
||||
*
|
||||
* If \c freerw is non-zero, the stream will be closed after being read.
|
||||
*
|
||||
* \return number of mappings added, -1 on error
|
||||
* You can call this function several times, if needed, to load different
|
||||
* database files.
|
||||
*
|
||||
* If a new mapping is loaded for an already known controller GUID, the later
|
||||
* version will overwrite the one currently loaded.
|
||||
*
|
||||
* Mappings not belonging to the current platform or with no platform field
|
||||
* specified will be ignored (i.e. mappings for Linux will be ignored in
|
||||
* Windows, etc).
|
||||
*
|
||||
* This function will load the text database entirely in memory before
|
||||
* processing it, so take this into consideration if you are in a memory
|
||||
* constrained environment.
|
||||
*
|
||||
* \param rw the data stream for the mappings to be added
|
||||
* \param freerw non-zero to close the stream after being read
|
||||
* \returns the number of mappings added or -1 on error; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_GameControllerAddMapping
|
||||
* \sa SDL_GameControllerAddMappingsFromFile
|
||||
* \sa SDL_GameControllerMappingForGUID
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
|
||||
|
||||
|
@ -129,118 +168,338 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
|
|||
#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
|
||||
|
||||
/**
|
||||
* Add or update an existing mapping configuration
|
||||
* Add support for controllers that SDL is unaware of or to cause an existing
|
||||
* controller to have a different binding.
|
||||
*
|
||||
* \return 1 if mapping is added, 0 if updated, -1 on error
|
||||
* The mapping string has the format "GUID,name,mapping", where GUID is the
|
||||
* string value from SDL_JoystickGetGUIDString(), name is the human readable
|
||||
* string for the device and mappings are controller mappings to joystick
|
||||
* ones. Under Windows there is a reserved GUID of "xinput" that covers all
|
||||
* XInput devices. The mapping format for joystick is: {| |bX |a joystick
|
||||
* button, index X |- |hX.Y |hat X with value Y |- |aX |axis X of the joystick
|
||||
* |} Buttons can be used as a controller axes and vice versa.
|
||||
*
|
||||
* This string shows an example of a valid mapping for a controller:
|
||||
*
|
||||
* ```c
|
||||
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
* ```
|
||||
*
|
||||
* \param mappingString the mapping string
|
||||
* \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
|
||||
* -1 on error; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_GameControllerMapping
|
||||
* \sa SDL_GameControllerMappingForGUID
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
|
||||
|
||||
/**
|
||||
* Get the number of mappings installed
|
||||
* Get the number of mappings installed.
|
||||
*
|
||||
* \return the number of mappings
|
||||
* \returns the number of mappings.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
|
||||
|
||||
/**
|
||||
* Get the mapping at a particular index.
|
||||
* Get the mapping at a particular index.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* the index is out of range.
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
|
||||
|
||||
/**
|
||||
* Get a mapping string for a GUID
|
||||
* Get the game controller mapping string for a given GUID.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
* The returned string must be freed with SDL_free().
|
||||
*
|
||||
* \param guid a structure containing the GUID for which a mapping is desired
|
||||
* \returns a mapping string or NULL on error; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
|
||||
|
||||
/**
|
||||
* Get a mapping string for an open GameController
|
||||
* Get the current mapping of a Game Controller.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
* The returned string must be freed with SDL_free().
|
||||
*
|
||||
* Details about mappings are discussed with SDL_GameControllerAddMapping().
|
||||
*
|
||||
* \param gamecontroller the game controller you want to get the current
|
||||
* mapping for
|
||||
* \returns a string that has the controller's mapping or NULL if no mapping
|
||||
* is available; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerAddMapping
|
||||
* \sa SDL_GameControllerMappingForGUID
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Is the joystick on this index supported by the game controller interface?
|
||||
* Check if the given joystick is supported by the game controller interface.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, up to
|
||||
* SDL_NumJoysticks()
|
||||
* \returns SDL_TRUE if the given joystick is supported by the game controller
|
||||
* interface, SDL_FALSE if it isn't or it's an invalid index.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerNameForIndex
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
* Get the implementation dependent name for the game controller.
|
||||
*
|
||||
* This function can be called before any controllers are opened.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the implementation-dependent name for the game controller, or NULL
|
||||
* if there is no name or the index is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerName
|
||||
* \sa SDL_GameControllerOpen
|
||||
* \sa SDL_IsGameController
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
* The index passed as an argument refers to the N'th game controller on the system.
|
||||
* This index is not the value which will identify this controller in future
|
||||
* controller events. The joystick's instance id (::SDL_JoystickID) will be
|
||||
* used there instead.
|
||||
* Get the type of a game controller.
|
||||
*
|
||||
* \return A controller identifier, or NULL if an error occurred.
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the controller type.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the mapping of a game controller.
|
||||
*
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, from zero to
|
||||
* SDL_NumJoysticks()-1
|
||||
* \returns the mapping string. Must be freed with SDL_free(). Returns NULL if
|
||||
* no mapping is available.
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
*
|
||||
* `joystick_index` is the same as the `device_index` passed to
|
||||
* SDL_JoystickOpen().
|
||||
*
|
||||
* The index passed as an argument refers to the N'th game controller on the
|
||||
* system. This index is not the value which will identify this controller in
|
||||
* future controller events. The joystick's instance id (SDL_JoystickID) will
|
||||
* be used there instead.
|
||||
*
|
||||
* \param joystick_index the device_index of a device, up to
|
||||
* SDL_NumJoysticks()
|
||||
* \returns a gamecontroller identifier or NULL if an error occurred; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerClose
|
||||
* \sa SDL_GameControllerNameForIndex
|
||||
* \sa SDL_IsGameController
|
||||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
|
||||
|
||||
/**
|
||||
* Return the SDL_GameController associated with an instance id.
|
||||
* Get the SDL_GameController associated with an instance id.
|
||||
*
|
||||
* \param joyid the instance id to get the SDL_GameController for
|
||||
* \returns an SDL_GameController on success or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened controller
|
||||
* Get the SDL_GameController associated with a player index.
|
||||
*
|
||||
* Please note that the player index is _not_ the device index, nor is it the
|
||||
* instance id!
|
||||
*
|
||||
* \param player_index the player index, which is not the device index or the
|
||||
* instance id!
|
||||
* \returns the SDL_GameController associated with a player index.
|
||||
*
|
||||
* \sa SDL_GameControllerGetPlayerIndex
|
||||
* \sa SDL_GameControllerSetPlayerIndex
|
||||
*/
|
||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent name for an opened game controller.
|
||||
*
|
||||
* This is the same name as returned by SDL_GameControllerNameForIndex(), but
|
||||
* it takes a controller identifier instead of the (unstable) device index.
|
||||
*
|
||||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
* \returns the implementation dependent name for the game controller, or NULL
|
||||
* if there is no name or the identifier passed is invalid.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerNameForIndex
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
* Get the type of this currently opened controller
|
||||
*
|
||||
* This is the same name as returned by SDL_GameControllerTypeForIndex(), but
|
||||
* it takes a controller identifier instead of the (unstable) device index.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \returns the controller type.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened controller, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
* Get the player index of an opened game controller.
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \returns the player index for controller, or -1 if it's not available.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened controller, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
* Set the player index of an opened game controller.
|
||||
*
|
||||
* \param gamecontroller the game controller object to adjust.
|
||||
* \param player_index Player index to assign to this controller.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the controller has been opened and currently connected,
|
||||
* or SDL_FALSE if it has not.
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
*
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB vendor ID, or zero if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened controller, if available.
|
||||
*
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB product ID, or zero if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened controller, if available.
|
||||
*
|
||||
* If the product version isn't available this function returns 0.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the USB product version, or zero if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened controller, if available.
|
||||
*
|
||||
* Returns the serial number of the controller, or NULL if it is not
|
||||
* available.
|
||||
*
|
||||
* \param gamecontroller the game controller object to query.
|
||||
* \return the serial number, or NULL if unavailable.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Check if a controller has been opened and is currently connected.
|
||||
*
|
||||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
* \returns SDL_TRUE if the controller has been opened and is currently
|
||||
* connected, or SDL_FALSE if not.
|
||||
*
|
||||
* \sa SDL_GameControllerClose
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the underlying joystick object used by a controller
|
||||
* Get the Joystick ID from a Game Controller.
|
||||
*
|
||||
* This function will give you a SDL_Joystick object, which allows you to use
|
||||
* the SDL_Joystick functions with a SDL_GameController object. This would be
|
||||
* useful for getting a joystick's position at any given time, even if it
|
||||
* hasn't moved (moving it would produce an event, which would have the axis'
|
||||
* value).
|
||||
*
|
||||
* The pointer returned is owned by the SDL_GameController. You should not
|
||||
* call SDL_JoystickClose() on it, for example, since doing so will likely
|
||||
* cause SDL to crash.
|
||||
*
|
||||
* \param gamecontroller the game controller object that you want to get a
|
||||
* joystick from
|
||||
* \returns a SDL_Joystick object; call SDL_GetError() for more information.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Enable/disable controller event polling.
|
||||
* Query or change current state of Game Controller events.
|
||||
*
|
||||
* If controller events are disabled, you must call SDL_GameControllerUpdate()
|
||||
* yourself and check the state of the controller when you want controller
|
||||
* information.
|
||||
* If controller events are disabled, you must call SDL_GameControllerUpdate()
|
||||
* yourself and check the state of the controller when you want controller
|
||||
* information.
|
||||
*
|
||||
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
|
||||
* Any number can be passed to SDL_GameControllerEventState(), but only -1, 0,
|
||||
* and 1 will have any effect. Other numbers will just be returned.
|
||||
*
|
||||
* \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
|
||||
* \returns the same value passed to the function, with exception to -1
|
||||
* (SDL_QUERY), which will return the current state.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickEventState
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
|
||||
|
||||
/**
|
||||
* Update the current state of the open game controllers.
|
||||
* Manually pump game controller updates if not using the loop.
|
||||
*
|
||||
* This is called automatically by the event loop if any game controller
|
||||
* events are enabled.
|
||||
* This function is called automatically by the event loop if events are
|
||||
* enabled. Under such circumstances, it will not be necessary to call this
|
||||
* function.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
|
||||
|
||||
|
@ -267,33 +526,88 @@ typedef enum
|
|||
} SDL_GameControllerAxis;
|
||||
|
||||
/**
|
||||
* turn this string into a axis mapping
|
||||
* Convert a string into SDL_GameControllerAxis enum.
|
||||
*
|
||||
* This function is called internally to translate SDL_GameController mapping
|
||||
* strings for the underlying joystick device into the consistent
|
||||
* SDL_GameController mapping. You do not normally need to call this function
|
||||
* unless you are parsing SDL_GameController mappings in your own code.
|
||||
*
|
||||
* Note specially that "righttrigger" and "lefttrigger" map to
|
||||
* `SDL_CONTROLLER_AXIS_TRIGGERRIGHT` and `SDL_CONTROLLER_AXIS_TRIGGERLEFT`,
|
||||
* respectively.
|
||||
*
|
||||
* \param str string representing a SDL_GameController axis
|
||||
* \returns the SDL_GameControllerAxis enum corresponding to the input string,
|
||||
* or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
|
||||
*
|
||||
* \sa SDL_GameControllerGetStringForAxis
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);
|
||||
extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *str);
|
||||
|
||||
/**
|
||||
* turn this axis enum into a string mapping
|
||||
* Convert from an SDL_GameControllerAxis enum to a string.
|
||||
*
|
||||
* The caller should not SDL_free() the returned string.
|
||||
*
|
||||
* \param axis an enum value for a given SDL_GameControllerAxis
|
||||
* \returns a string for the given axis, or NULL if an invalid axis is
|
||||
* specified. The string returned is of the format used by
|
||||
* SDL_GameController mapping strings.
|
||||
*
|
||||
* \sa SDL_GameControllerGetAxisFromString
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the SDL joystick layer binding for this controller button mapping
|
||||
* Get the SDL joystick layer binding for a controller axis mapping.
|
||||
*
|
||||
* \param gamecontroller a game controller
|
||||
* \param axis an axis enum value (one of the SDL_GameControllerAxis values)
|
||||
* \returns a SDL_GameControllerButtonBind describing the bind. On failure
|
||||
* (like the given Controller axis doesn't exist on the device), its
|
||||
* `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetBindForButton
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
||||
SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a game controller.
|
||||
* Query whether a game controller has a given axis.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767 (except for the triggers,
|
||||
* which range from 0 to 32767).
|
||||
* This merely reports whether the controller's mapping defined this axis, as
|
||||
* that is all the information SDL has about the physical device.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
* \param gamecontroller a game controller
|
||||
* \param axis an axis enum value (an SDL_GameControllerAxis value)
|
||||
* \returns SDL_TRUE if the controller has this axis, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL
|
||||
SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the current state of an axis control on a game controller.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767. Triggers, however, range
|
||||
* from 0 to 32767 (they never return a negative value).
|
||||
*
|
||||
* \param gamecontroller a game controller
|
||||
* \param axis an axis index (one of the SDL_GameControllerAxis values)
|
||||
* \returns axis state (including 0) on success or 0 (also) on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetButton
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL
|
||||
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* The list of buttons available from a controller
|
||||
|
@ -316,41 +630,235 @@ typedef enum
|
|||
SDL_CONTROLLER_BUTTON_DPAD_DOWN,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_LEFT,
|
||||
SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
|
||||
SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
|
||||
SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
|
||||
SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
|
||||
SDL_CONTROLLER_BUTTON_MAX
|
||||
} SDL_GameControllerButton;
|
||||
|
||||
/**
|
||||
* turn this string into a button mapping
|
||||
* Convert a string into an SDL_GameControllerButton enum.
|
||||
*
|
||||
* This function is called internally to translate SDL_GameController mapping
|
||||
* strings for the underlying joystick device into the consistent
|
||||
* SDL_GameController mapping. You do not normally need to call this function
|
||||
* unless you are parsing SDL_GameController mappings in your own code.
|
||||
*
|
||||
* \param str string representing a SDL_GameController axis
|
||||
* \returns the SDL_GameControllerButton enum corresponding to the input
|
||||
* string, or `SDL_CONTROLLER_AXIS_INVALID` if no match was found.
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);
|
||||
extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *str);
|
||||
|
||||
/**
|
||||
* turn this button enum into a string mapping
|
||||
* Convert from an SDL_GameControllerButton enum to a string.
|
||||
*
|
||||
* The caller should not SDL_free() the returned string.
|
||||
*
|
||||
* \param button an enum value for a given SDL_GameControllerButton
|
||||
* \returns a string for the given button, or NULL if an invalid axis is
|
||||
* specified. The string returned is of the format used by
|
||||
* SDL_GameController mapping strings.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetButtonFromString
|
||||
*/
|
||||
extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Get the SDL joystick layer binding for this controller button mapping
|
||||
* Get the SDL joystick layer binding for a controller button mapping.
|
||||
*
|
||||
* \param gamecontroller a game controller
|
||||
* \param button an button enum value (an SDL_GameControllerButton value)
|
||||
* \returns a SDL_GameControllerButtonBind describing the bind. On failure
|
||||
* (like the given Controller button doesn't exist on the device),
|
||||
* its `.bindType` will be `SDL_CONTROLLER_BINDTYPE_NONE`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetBindForAxis
|
||||
*/
|
||||
extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
|
||||
SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Query whether a game controller has a given button.
|
||||
*
|
||||
* This merely reports whether the controller's mapping defined this button,
|
||||
* as that is all the information SDL has about the physical device.
|
||||
*
|
||||
* \param gamecontroller a game controller
|
||||
* \param button a button enum value (an SDL_GameControllerButton value)
|
||||
* \returns SDL_TRUE if the controller has this button, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Get the current state of a button on a game controller.
|
||||
* Get the current state of a button on a game controller.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
* \param gamecontroller a game controller
|
||||
* \param button a button index (one of the SDL_GameControllerButton values)
|
||||
* \returns 1 for pressed state or 0 for not pressed state or error; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GameControllerGetAxis
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||
* Get the number of touchpads on a game controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the number of supported simultaneous fingers on a touchpad on a game
|
||||
* controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
|
||||
|
||||
/**
|
||||
* Get the current state of a finger on a touchpad on a game controller.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
|
||||
|
||||
/**
|
||||
* Return whether a game controller has a particular sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \returns SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
/**
|
||||
* Set whether data reporting for a game controller sensor is enabled.
|
||||
*
|
||||
* \param gamecontroller The controller to update
|
||||
* \param type The type of sensor to enable/disable
|
||||
* \param enabled Whether data reporting should be enabled
|
||||
* \returns 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
|
||||
|
||||
/**
|
||||
* Query whether sensor data reporting is enabled for a game controller.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \returns SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
/**
|
||||
* Get the data rate (number of events per second) of a game controller
|
||||
* sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \return the data rate, or 0.0f if the data rate is not available.
|
||||
*/
|
||||
extern DECLSPEC float SDLCALL SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type);
|
||||
|
||||
/**
|
||||
* Get the current state of a game controller sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
* See SDL_sensor.h for the details for each type of sensor.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \param type The type of sensor to query
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Start a rumble effect on a game controller.
|
||||
*
|
||||
* Each call to this function cancels any previous rumble effect, and calling
|
||||
* it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left)
|
||||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param high_frequency_rumble The intensity of the high frequency (right)
|
||||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if rumble isn't supported on this controller
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Start a rumble effect in the game controller's triggers.
|
||||
*
|
||||
* Each call to this function cancels any previous trigger rumble effect, and
|
||||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this is rumbling of the _triggers_ and not the game controller as
|
||||
* a whole. The first controller to offer this feature was the PlayStation 5's
|
||||
* DualShock 5.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0
|
||||
* to 0xFFFF
|
||||
* \param right_rumble The intensity of the right trigger rumble motor, from 0
|
||||
* to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if trigger rumble isn't supported on this controller
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Query whether a game controller has an LED.
|
||||
*
|
||||
* \param gamecontroller The controller to query
|
||||
* \returns SDL_TRUE, or SDL_FALSE if this controller does not have a
|
||||
* modifiable LED
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Update a game controller's LED color.
|
||||
*
|
||||
* \param gamecontroller The controller to update
|
||||
* \param red The intensity of the red LED
|
||||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
* \returns 0, or -1 if this controller does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/**
|
||||
* Send a controller specific effect packet
|
||||
*
|
||||
* \param gamecontroller The controller to affect
|
||||
* \param data The data to send to the controller
|
||||
* \param size The size of the data to send to the controller
|
||||
* \returns 0, or -1 if this controller or driver doesn't support effect
|
||||
* packets
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size);
|
||||
|
||||
/**
|
||||
* Close a game controller previously opened with SDL_GameControllerOpen().
|
||||
*
|
||||
* \param gamecontroller a game controller identifier previously returned by
|
||||
* SDL_GameControllerOpen()
|
||||
*
|
||||
* \sa SDL_GameControllerOpen
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -117,6 +117,17 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
|
||||
*
|
||||
* At the moment the magnitude variables are mixed between signed/unsigned, and
|
||||
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
|
||||
*
|
||||
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
|
||||
* so we should fix the inconsistency in favor of higher possible precision,
|
||||
* adjusting for platforms that use different scales.
|
||||
* -flibit
|
||||
*/
|
||||
|
||||
/**
|
||||
* \typedef SDL_Haptic
|
||||
*
|
||||
|
@ -325,6 +336,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
*/
|
||||
#define SDL_HAPTIC_SPHERICAL 2
|
||||
|
||||
/**
|
||||
* \brief Use this value to play an effect on the steering wheel axis. This
|
||||
* provides better compatibility across platforms and devices as SDL will guess
|
||||
* the correct axis.
|
||||
* \sa SDL_HapticDirection
|
||||
*/
|
||||
#define SDL_HAPTIC_STEERING_AXIS 3
|
||||
|
||||
/* @} *//* Direction encodings */
|
||||
|
||||
/* @} *//* Haptic features */
|
||||
|
@ -433,6 +452,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
|||
* \sa SDL_HAPTIC_POLAR
|
||||
* \sa SDL_HAPTIC_CARTESIAN
|
||||
* \sa SDL_HAPTIC_SPHERICAL
|
||||
* \sa SDL_HAPTIC_STEERING_AXIS
|
||||
* \sa SDL_HapticEffect
|
||||
* \sa SDL_HapticNumAxes
|
||||
*/
|
||||
|
@ -656,8 +676,8 @@ typedef struct SDL_HapticRamp
|
|||
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
|
||||
*
|
||||
* The Left/Right effect is used to explicitly control the large and small
|
||||
* motors, commonly found in modern game controllers. One motor is high
|
||||
* frequency, the other is low frequency.
|
||||
* motors, commonly found in modern game controllers. The small (right) motor
|
||||
* is high frequency, and the large (left) motor is low frequency.
|
||||
*
|
||||
* \sa SDL_HAPTIC_LEFTRIGHT
|
||||
* \sa SDL_HapticEffect
|
||||
|
@ -668,7 +688,7 @@ typedef struct SDL_HapticLeftRight
|
|||
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
|
||||
|
||||
/* Replay */
|
||||
Uint32 length; /**< Duration of the effect. */
|
||||
Uint32 length; /**< Duration of the effect in milliseconds. */
|
||||
|
||||
/* Rumble */
|
||||
Uint16 large_magnitude; /**< Control of the large controller motor. */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -30,10 +30,12 @@
|
|||
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
|
||||
* then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.
|
||||
*
|
||||
* The term "player_index" is the number assigned to a player on a specific
|
||||
* controller. For XInput controllers this returns the XInput user index.
|
||||
* Many joysticks will not be able to supply this information.
|
||||
*
|
||||
* The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of
|
||||
* the device (a X360 wired controller for example). This identifier is platform dependent.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SDL_joystick_h_
|
||||
|
@ -97,14 +99,20 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||
SDL_JOYSTICK_POWER_EMPTY,
|
||||
SDL_JOYSTICK_POWER_LOW,
|
||||
SDL_JOYSTICK_POWER_MEDIUM,
|
||||
SDL_JOYSTICK_POWER_FULL,
|
||||
SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
|
||||
SDL_JOYSTICK_POWER_LOW, /* <= 20% */
|
||||
SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
|
||||
SDL_JOYSTICK_POWER_FULL, /* <= 100% */
|
||||
SDL_JOYSTICK_POWER_WIRED,
|
||||
SDL_JOYSTICK_POWER_MAX
|
||||
} SDL_JoystickPowerLevel;
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
|
@ -118,195 +126,524 @@ typedef enum
|
|||
* and game controller events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockJoysticks(void);
|
||||
|
||||
|
||||
/**
|
||||
* Unlocking for multi-threaded access to the joystick API
|
||||
*
|
||||
* If you are using the joystick API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the joysticks.
|
||||
*
|
||||
* In particular, you are guaranteed that the joystick list won't change, so
|
||||
* the API functions that take a joystick index will be valid, and joystick
|
||||
* and game controller events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);
|
||||
|
||||
/**
|
||||
* Count the number of joysticks attached to the system right now
|
||||
* Count the number of joysticks attached to the system.
|
||||
*
|
||||
* \returns the number of attached joysticks on success or a negative error
|
||||
* code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
* Get the implementation dependent name of a joystick.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system)
|
||||
* \returns the name of the selected joystick. If no name can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickName
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
* This can be called before any joysticks are opened.
|
||||
* Get the player index of a joystick, or -1 if it's not available This can be
|
||||
* called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent GUID for the joystick at a given device
|
||||
* index.
|
||||
*
|
||||
* This function can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the GUID of the selected joystick. If called on an invalid index,
|
||||
* this function returns a zero GUID
|
||||
*
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
* Get the USB vendor ID of a joystick, if available.
|
||||
*
|
||||
* This can be called before any joysticks are opened. If the vendor ID isn't
|
||||
* available this function returns 0.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the USB vendor ID of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
* Get the USB product ID of a joystick, if available.
|
||||
*
|
||||
* This can be called before any joysticks are opened. If the product ID isn't
|
||||
* available this function returns 0.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the USB product ID of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);
|
||||
|
||||
/**
|
||||
* Get the product version of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the product version isn't available this function returns 0.
|
||||
* Get the product version of a joystick, if available.
|
||||
*
|
||||
* This can be called before any joysticks are opened. If the product version
|
||||
* isn't available this function returns 0.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the product version of the selected joystick. If called on an
|
||||
* invalid index, this function returns zero
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);
|
||||
|
||||
/**
|
||||
* Get the type of a joystick, if available.
|
||||
* This can be called before any joysticks are opened.
|
||||
* Get the type of a joystick, if available.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the SDL_JoystickType of the selected joystick. If called on an
|
||||
* invalid index, this function returns `SDL_JOYSTICK_TYPE_UNKNOWN`
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* Get the instance ID of a joystick.
|
||||
* This can be called before any joysticks are opened.
|
||||
* If the index is out of range, this function will return -1.
|
||||
* Get the instance ID of a joystick.
|
||||
*
|
||||
* This can be called before any joysticks are opened. If the index is out of
|
||||
* range, this function will return -1.
|
||||
*
|
||||
* \param device_index the index of the joystick to query (the N'th joystick
|
||||
* on the system
|
||||
* \returns the instance id of the selected joystick. If called on an invalid
|
||||
* index, this function returns zero
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* Open a joystick for use.
|
||||
* The index passed as an argument refers to the N'th joystick on the system.
|
||||
* This index is not the value which will identify this joystick in future
|
||||
* joystick events. The joystick's instance id (::SDL_JoystickID) will be used
|
||||
* there instead.
|
||||
* Open a joystick for use.
|
||||
*
|
||||
* \return A joystick identifier, or NULL if an error occurred.
|
||||
* The `device_index` argument refers to the N'th joystick presently
|
||||
* recognized by SDL on the system. It is **NOT** the same as the instance ID
|
||||
* used to identify the joystick in future events. See
|
||||
* SDL_JoystickInstanceID() for more details about instance IDs.
|
||||
*
|
||||
* The joystick subsystem must be initialized before a joystick can be opened
|
||||
* for use.
|
||||
*
|
||||
* \param device_index the index of the joystick to query
|
||||
* \returns a joystick identifier or NULL if an error occurred; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickInstanceID
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
||||
|
||||
/**
|
||||
* Return the SDL_Joystick associated with an instance id.
|
||||
* Get the SDL_Joystick associated with an instance id.
|
||||
*
|
||||
* \param instance_id the instance id to get the SDL_Joystick for
|
||||
* \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*/
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||
|
||||
/**
|
||||
* Return the name for this currently opened joystick.
|
||||
* If no name can be found, this function returns NULL.
|
||||
* Get the SDL_Joystick associated with a player index.
|
||||
*
|
||||
* \param player_index the player index to get the SDL_Joystick for
|
||||
* \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
* Attach a new virtual joystick.
|
||||
*
|
||||
* \returns the joystick's device index, or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type,
|
||||
int naxes,
|
||||
int nbuttons,
|
||||
int nhats);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened joystick, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
* Detach a virtual joystick.
|
||||
*
|
||||
* \param device_index a value previously returned from
|
||||
* SDL_JoystickAttachVirtual()
|
||||
* \returns 0 on success, or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened joystick, if available.
|
||||
* If the product ID isn't available this function returns 0.
|
||||
* Query whether or not the joystick at a given device index is virtual.
|
||||
*
|
||||
* \param device_index a joystick device index.
|
||||
* \returns SDL_TRUE if the joystick is virtual, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened joystick, if available.
|
||||
* If the product version isn't available this function returns 0.
|
||||
* Set values on an opened, virtual-joystick's axis.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
*
|
||||
* \param joystick the virtual joystick on which to set state.
|
||||
* \param axis the specific axis on the virtual joystick to set.
|
||||
* \param value the new value for the specified axis.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);
|
||||
|
||||
/**
|
||||
* Get the type of an opened joystick.
|
||||
* Set values on an opened, virtual-joystick's button.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
*
|
||||
* \param joystick the virtual joystick on which to set state.
|
||||
* \param button the specific button on the virtual joystick to set.
|
||||
* \param value the new value for the specified button.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value);
|
||||
|
||||
/**
|
||||
* Return a string representation for this guid. pszGUID must point to at least 33 bytes
|
||||
* (32 for the string plus a NULL terminator).
|
||||
* Set values on an opened, virtual-joystick's hat.
|
||||
*
|
||||
* Please note that values set here will not be applied until the next call to
|
||||
* SDL_JoystickUpdate, which can either be called directly, or can be called
|
||||
* indirectly through various other SDL APIs, including, but not limited to
|
||||
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
|
||||
* SDL_WaitEvent.
|
||||
*
|
||||
* \param joystick the virtual joystick on which to set state.
|
||||
* \param hat the specific hat on the virtual joystick to set.
|
||||
* \param value the new value for the specified hat.
|
||||
* \returns 0 on success, -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);
|
||||
|
||||
/**
|
||||
* Get the implementation dependent name of a joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the name of the selected joystick. If no name can be found, this
|
||||
* function returns NULL; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_JoystickNameForIndex
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick.
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index. Many joysticks
|
||||
* will not be able to supply this information.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the player index, or -1 if it's not available.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Set the player index of an opened joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \param player_index the player index to set.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index);
|
||||
|
||||
/**
|
||||
* Get the implementation-dependent GUID for the joystick.
|
||||
*
|
||||
* This function requires an open joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the GUID of the given joystick. If called on an invalid index,
|
||||
* this function returns a zero GUID; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened joystick, if available.
|
||||
*
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the USB vendor ID of the selected joystick, or 0 if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the USB product ID of an opened joystick, if available.
|
||||
*
|
||||
* If the product ID isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the USB product ID of the selected joystick, or 0 if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the product version of an opened joystick, if available.
|
||||
*
|
||||
* If the product version isn't available this function returns 0.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the product version of the selected joystick, or 0 if unavailable.
|
||||
*/
|
||||
extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the serial number of an opened joystick, if available.
|
||||
*
|
||||
* Returns the serial number of the joystick, or NULL if it is not available.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the serial number of the selected joystick, or NULL if
|
||||
* unavailable.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_JoystickGetSerial(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the type of an opened joystick.
|
||||
*
|
||||
* \param joystick the SDL_Joystick obtained from SDL_JoystickOpen()
|
||||
* \returns the SDL_JoystickType of the selected joystick.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given SDL_JoystickGUID.
|
||||
*
|
||||
* You should supply at least 33 bytes for pszGUID.
|
||||
*
|
||||
* \param guid the SDL_JoystickGUID you wish to convert to string
|
||||
* \param pszGUID buffer in which to write the ASCII string
|
||||
* \param cbGUID the size of pszGUID
|
||||
*
|
||||
* \sa SDL_JoystickGetDeviceGUID
|
||||
* \sa SDL_JoystickGetGUID
|
||||
* \sa SDL_JoystickGetGUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a string into a joystick guid
|
||||
* Convert a GUID string into a SDL_JoystickGUID structure.
|
||||
*
|
||||
* Performs no error checking. If this function is given a string containing
|
||||
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||
* will not be useful.
|
||||
*
|
||||
* \param pchGUID string containing an ASCII representation of a GUID
|
||||
* \returns a SDL_JoystickGUID structure.
|
||||
*
|
||||
* \sa SDL_JoystickGetGUIDString
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
||||
/**
|
||||
* Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the instance ID of an opened joystick or -1 if the joystick is invalid.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of general axis controls on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of trackballs on a joystick.
|
||||
* Get the status of a specified joystick.
|
||||
*
|
||||
* Joystick trackballs have only relative motion events associated
|
||||
* with them and their state cannot be polled.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of POV hats on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the number of buttons on a joystick.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Update the current state of the open joysticks.
|
||||
* \param joystick the joystick to query
|
||||
* \returns SDL_TRUE if the joystick has been opened, SDL_FALSE if it has not;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* This is called automatically by the event loop if any joystick
|
||||
* events are enabled.
|
||||
* \sa SDL_JoystickClose
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the instance ID of an opened joystick.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \returns the instance ID of the specified joystick on success or a negative
|
||||
* error code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of general axis controls on a joystick.
|
||||
*
|
||||
* Often, the directional pad on a game controller will either look like 4
|
||||
* separate buttons or a POV hat, and not axes, but all of this is up to the
|
||||
* device and platform.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \returns the number of axis controls/number of axes on success or a
|
||||
* negative error code on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_JoystickGetAxis
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of trackballs on a joystick.
|
||||
*
|
||||
* Joystick trackballs have only relative motion events associated with them
|
||||
* and their state cannot be polled.
|
||||
*
|
||||
* Most joysticks do not have trackballs.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \returns the number of trackballs on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickGetBall
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of POV hats on a joystick.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \returns the number of POV hats on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickGetHat
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the number of buttons on a joystick.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \returns the number of buttons on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickGetButton
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update the current state of the open joysticks.
|
||||
*
|
||||
* This is called automatically by the event loop if any joystick events are
|
||||
* enabled.
|
||||
*
|
||||
* \sa SDL_JoystickEventState
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
|
||||
/**
|
||||
* Enable/disable joystick event polling.
|
||||
* Enable/disable joystick event polling.
|
||||
*
|
||||
* If joystick events are disabled, you must call SDL_JoystickUpdate()
|
||||
* yourself and check the state of the joystick when you want joystick
|
||||
* information.
|
||||
* If joystick events are disabled, you must call SDL_JoystickUpdate()
|
||||
* yourself and manually check the state of the joystick when you want
|
||||
* joystick information.
|
||||
*
|
||||
* The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
|
||||
* It is recommended that you leave joystick event handling enabled.
|
||||
*
|
||||
* **WARNING**: Calling this function may delete all events currently in SDL's
|
||||
* event queue.
|
||||
*
|
||||
* \param state can be one of `SDL_QUERY`, `SDL_IGNORE`, or `SDL_ENABLE`
|
||||
* \returns 1 if enabled, 0 if disabled, or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* If `state` is `SDL_QUERY` then the current state is returned,
|
||||
* otherwise the new processing state is returned.
|
||||
*
|
||||
* \sa SDL_GameControllerEventState
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
|
||||
#define SDL_JOYSTICK_AXIS_MAX 32767
|
||||
#define SDL_JOYSTICK_AXIS_MIN -32768
|
||||
/**
|
||||
* Get the current state of an axis control on a joystick.
|
||||
* Get the current state of an axis control on a joystick.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
* SDL makes no promises about what part of the joystick any given axis refers
|
||||
* to. Your game should have some sort of configuration UI to let users
|
||||
* specify what each axis should be bound to. Alternately, SDL's higher-level
|
||||
* Game Controller API makes a great effort to apply order to this lower-level
|
||||
* interface, so you know that a specific axis is the "left thumb stick," etc.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
* The value returned by SDL_JoystickGetAxis() is a signed integer (-32768 to
|
||||
* 32767) representing the current position of the axis. It may be necessary
|
||||
* to impose certain tolerances on these values to account for jitter.
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \param axis the axis to query; the axis indices start at index 0
|
||||
* \returns a 16-bit signed integer representing the current position of the
|
||||
* axis or 0 on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickNumAxes
|
||||
*/
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick *joystick,
|
||||
int axis);
|
||||
|
||||
/**
|
||||
* Get the initial state of an axis control on a joystick.
|
||||
* Get the initial state of an axis control on a joystick.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
* The axis indices start at index 0.
|
||||
*
|
||||
* \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \param axis the axis to query; the axis indices start at index 0
|
||||
* \param state Upon return, the initial value is supplied here.
|
||||
* \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick,
|
||||
int axis, Sint16 *state);
|
||||
|
||||
/**
|
||||
|
@ -325,51 +662,153 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *
|
|||
/* @} */
|
||||
|
||||
/**
|
||||
* Get the current state of a POV hat on a joystick.
|
||||
* Get the current state of a POV hat on a joystick.
|
||||
*
|
||||
* The hat indices start at index 0.
|
||||
* The returned value will be one of the following positions:
|
||||
*
|
||||
* \return The return value is one of the following positions:
|
||||
* - ::SDL_HAT_CENTERED
|
||||
* - ::SDL_HAT_UP
|
||||
* - ::SDL_HAT_RIGHT
|
||||
* - ::SDL_HAT_DOWN
|
||||
* - ::SDL_HAT_LEFT
|
||||
* - ::SDL_HAT_RIGHTUP
|
||||
* - ::SDL_HAT_RIGHTDOWN
|
||||
* - ::SDL_HAT_LEFTUP
|
||||
* - ::SDL_HAT_LEFTDOWN
|
||||
* - `SDL_HAT_CENTERED`
|
||||
* - `SDL_HAT_UP`
|
||||
* - `SDL_HAT_RIGHT`
|
||||
* - `SDL_HAT_DOWN`
|
||||
* - `SDL_HAT_LEFT`
|
||||
* - `SDL_HAT_RIGHTUP`
|
||||
* - `SDL_HAT_RIGHTDOWN`
|
||||
* - `SDL_HAT_LEFTUP`
|
||||
* - `SDL_HAT_LEFTDOWN`
|
||||
*
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \param hat the hat index to get the state from; indices start at index 0
|
||||
* \returns the current hat position.
|
||||
*
|
||||
* \sa SDL_JoystickNumHats
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick,
|
||||
int hat);
|
||||
|
||||
/**
|
||||
* Get the ball axis change since the last poll.
|
||||
* Get the ball axis change since the last poll.
|
||||
*
|
||||
* \return 0, or -1 if you passed it invalid parameters.
|
||||
* Trackballs can only return relative motion since the last call to
|
||||
* SDL_JoystickGetBall(), these motion deltas are placed into `dx` and `dy`.
|
||||
*
|
||||
* The ball indices start at index 0.
|
||||
* Most joysticks do not have trackballs.
|
||||
*
|
||||
* \param joystick the SDL_Joystick to query
|
||||
* \param ball the ball index to query; ball indices start at index 0
|
||||
* \param dx stores the difference in the x axis position since the last poll
|
||||
* \param dy stores the difference in the y axis position since the last poll
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_JoystickNumBalls
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick *joystick,
|
||||
int ball, int *dx, int *dy);
|
||||
|
||||
/**
|
||||
* Get the current state of a button on a joystick.
|
||||
* Get the current state of a button on a joystick.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
* \param joystick an SDL_Joystick structure containing joystick information
|
||||
* \param button the button index to get the state from; indices start at
|
||||
* index 0
|
||||
* \returns 1 if the specified button is pressed, 0 otherwise.
|
||||
*
|
||||
* \sa SDL_JoystickNumButtons
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick *joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
* Start a rumble effect.
|
||||
*
|
||||
* Each call to this function cancels any previous rumble effect, and calling
|
||||
* it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left)
|
||||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param high_frequency_rumble The intensity of the high frequency (right)
|
||||
* rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Return the battery level of this joystick
|
||||
* Start a rumble effect in the joystick's triggers
|
||||
*
|
||||
* Each call to this function cancels any previous trigger rumble effect, and
|
||||
* calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* Note that this function is for _trigger_ rumble; the first joystick to
|
||||
* support this was the PlayStation 5's DualShock 5 controller. If you want
|
||||
* the (more common) whole-controller rumble, use SDL_JoystickRumble()
|
||||
* instead.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
* \param left_rumble The intensity of the left trigger rumble motor, from 0
|
||||
* to 0xFFFF
|
||||
* \param right_rumble The intensity of the right trigger rumble motor, from 0
|
||||
* to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
* \returns 0, or -1 if trigger rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Query whether a joystick has an LED.
|
||||
*
|
||||
* An example of a joystick LED is the light on the back of a PlayStation 4's
|
||||
* DualShock 4 controller.
|
||||
*
|
||||
* \param joystick The joystick to query
|
||||
* \return SDL_TRUE if the joystick has a modifiable LED, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickHasLED(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Update a joystick's LED color.
|
||||
*
|
||||
* An example of a joystick LED is the light on the back of a PlayStation 4's
|
||||
* DualShock 4 controller.
|
||||
*
|
||||
* \param joystick The joystick to update
|
||||
* \param red The intensity of the red LED
|
||||
* \param green The intensity of the green LED
|
||||
* \param blue The intensity of the blue LED
|
||||
* \returns 0 on success, -1 if this joystick does not have a modifiable LED
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/**
|
||||
* Send a joystick specific effect packet
|
||||
*
|
||||
* \param joystick The joystick to affect
|
||||
* \param data The data to send to the joystick
|
||||
* \param size The size of the data to send to the joystick
|
||||
* \returns 0, or -1 if this joystick or driver doesn't support effect packets
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
*
|
||||
* \param joystick The joystick device to close
|
||||
*
|
||||
* \sa SDL_JoystickOpen
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick *joystick);
|
||||
|
||||
/**
|
||||
* Get the battery level of a joystick as SDL_JoystickPowerLevel.
|
||||
*
|
||||
* \param joystick the SDL_Joystick to query
|
||||
* \returns the current battery level as SDL_JoystickPowerLevel on success or
|
||||
* `SDL_JOYSTICK_POWER_UNKNOWN` if it is unknown
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -47,12 +47,12 @@ typedef Sint32 SDL_Keycode;
|
|||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDLK_UNKNOWN = 0,
|
||||
|
||||
SDLK_RETURN = '\r',
|
||||
SDLK_ESCAPE = '\033',
|
||||
SDLK_ESCAPE = '\x1B',
|
||||
SDLK_BACKSPACE = '\b',
|
||||
SDLK_TAB = '\t',
|
||||
SDLK_SPACE = ' ',
|
||||
|
@ -88,9 +88,11 @@ enum
|
|||
SDLK_GREATER = '>',
|
||||
SDLK_QUESTION = '?',
|
||||
SDLK_AT = '@',
|
||||
|
||||
/*
|
||||
Skip uppercase letters
|
||||
*/
|
||||
|
||||
SDLK_LEFTBRACKET = '[',
|
||||
SDLK_BACKSLASH = '\\',
|
||||
SDLK_RIGHTBRACKET = ']',
|
||||
|
@ -145,7 +147,7 @@ enum
|
|||
SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),
|
||||
SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),
|
||||
SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),
|
||||
SDLK_DELETE = '\177',
|
||||
SDLK_DELETE = '\x7F',
|
||||
SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),
|
||||
SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),
|
||||
SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),
|
||||
|
@ -317,7 +319,7 @@ enum
|
|||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
};
|
||||
} SDL_KeyCode;
|
||||
|
||||
/**
|
||||
* \brief Enumeration of valid key mods (possibly OR'd together).
|
||||
|
@ -336,13 +338,13 @@ typedef enum
|
|||
KMOD_NUM = 0x1000,
|
||||
KMOD_CAPS = 0x2000,
|
||||
KMOD_MODE = 0x4000,
|
||||
KMOD_RESERVED = 0x8000
|
||||
} SDL_Keymod;
|
||||
KMOD_RESERVED = 0x8000,
|
||||
|
||||
#define KMOD_CTRL (KMOD_LCTRL|KMOD_RCTRL)
|
||||
#define KMOD_SHIFT (KMOD_LSHIFT|KMOD_RSHIFT)
|
||||
#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
|
||||
#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI)
|
||||
KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
|
||||
KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
|
||||
KMOD_ALT = KMOD_LALT | KMOD_RALT,
|
||||
KMOD_GUI = KMOD_LGUI | KMOD_RGUI
|
||||
} SDL_Keymod;
|
||||
|
||||
#endif /* SDL_keycode_h_ */
|
||||
|
||||
|
|
101
code/SDL2/include/SDL_locale.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_locale.h
|
||||
*
|
||||
* Include file for SDL locale services
|
||||
*/
|
||||
|
||||
#ifndef _SDL_locale_h
|
||||
#define _SDL_locale_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
extern "C" {
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct SDL_Locale
|
||||
{
|
||||
const char *language; /**< A language name, like "en" for English. */
|
||||
const char *country; /**< A country, like "US" for America. Can be NULL. */
|
||||
} SDL_Locale;
|
||||
|
||||
/**
|
||||
* \brief Report the user's preferred locale.
|
||||
*
|
||||
* This returns an array of SDL_Locale structs, the final item zeroed out.
|
||||
* When the caller is done with this array, it should call SDL_free() on
|
||||
* the returned value; all the memory involved is allocated in a single
|
||||
* block, so a single SDL_free() will suffice.
|
||||
*
|
||||
* Returned language strings are in the format xx, where 'xx' is an ISO-639
|
||||
* language specifier (such as "en" for English, "de" for German, etc).
|
||||
* Country strings are in the format YY, where "YY" is an ISO-3166 country
|
||||
* code (such as "US" for the United States, "CA" for Canada, etc). Country
|
||||
* might be NULL if there's no specific guidance on them (so you might get
|
||||
* { "en", "US" } for American English, but { "en", NULL } means "English
|
||||
* language, generically"). Language strings are never NULL, except to
|
||||
* terminate the array.
|
||||
*
|
||||
* Please note that not all of these strings are 2 characters; some are
|
||||
* three or more.
|
||||
*
|
||||
* The returned list of locales are in the order of the user's preference.
|
||||
* For example, a German citizen that is fluent in US English and knows
|
||||
* enough Japanese to navigate around Tokyo might have a list like:
|
||||
* { "de", "en_US", "jp", NULL }. Someone from England might prefer British
|
||||
* English (where "color" is spelled "colour", etc), but will settle for
|
||||
* anything like it: { "en_GB", "en", NULL }.
|
||||
*
|
||||
* This function returns NULL on error, including when the platform does not
|
||||
* supply this information at all.
|
||||
*
|
||||
* This might be a "slow" call that has to query the operating system. It's
|
||||
* best to ask for this once and save the results. However, this list can
|
||||
* change, usually because the user has changed a system preference outside
|
||||
* of your program; SDL will send an SDL_LOCALECHANGED event in this case,
|
||||
* if possible, and you can call this function again to get an updated copy
|
||||
* of preferred locales.
|
||||
*
|
||||
* \return array of locales, terminated with a locale with a NULL language
|
||||
* field. Will return NULL on error.
|
||||
*/
|
||||
extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_locale_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -61,7 +61,7 @@ extern "C" {
|
|||
* at the VERBOSE level and all other categories are enabled at the
|
||||
* CRITICAL level.
|
||||
*/
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_LOG_CATEGORY_APPLICATION,
|
||||
SDL_LOG_CATEGORY_ERROR,
|
||||
|
@ -94,7 +94,7 @@ enum
|
|||
};
|
||||
*/
|
||||
SDL_LOG_CATEGORY_CUSTOM
|
||||
};
|
||||
} SDL_LogCategory;
|
||||
|
||||
/**
|
||||
* \brief The predefined log priorities
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -55,6 +55,10 @@
|
|||
/* On iOS SDL provides a main function that creates an application delegate
|
||||
and starts the iOS application run loop.
|
||||
|
||||
If you link with SDL dynamically on iOS, the main function can't be in a
|
||||
shared library, so you need to link with libSDLmain.a, which includes a
|
||||
stub main function that calls into the shared library to start execution.
|
||||
|
||||
See src/video/uikit/SDL_uikitappdelegate.m for more details.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
@ -82,12 +86,6 @@
|
|||
#endif
|
||||
#endif /* SDL_MAIN_HANDLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define C_LINKAGE "C"
|
||||
#else
|
||||
#define C_LINKAGE
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef SDLMAIN_DECLSPEC
|
||||
#define SDLMAIN_DECLSPEC
|
||||
#endif
|
||||
|
@ -111,17 +109,18 @@
|
|||
#define main SDL_main
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
typedef int (*SDL_main_func)(int argc, char *argv[]);
|
||||
extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
/**
|
||||
* This is called by the real SDL main function to let the rest of the
|
||||
* library know that initialization was done properly.
|
||||
|
@ -136,8 +135,7 @@ extern DECLSPEC void SDLCALL SDL_SetMainReady(void);
|
|||
/**
|
||||
* This can be called to set the application class at startup
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
|
||||
void *hInst);
|
||||
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
|
||||
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
|
@ -153,10 +151,24 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
|||
* \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
||||
* information on the failure.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved);
|
||||
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
#if defined(__IPHONEOS__)
|
||||
|
||||
/**
|
||||
* \brief Initializes and launches an SDL application.
|
||||
*
|
||||
* \param argc The argc parameter from the application's main() function
|
||||
* \param argv The argv parameter from the application's main() function
|
||||
* \param mainFunction The SDL app's C-style main().
|
||||
* \return the return value from mainFunction
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
|
||||
|
||||
#endif /* __IPHONEOS__ */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -36,9 +36,11 @@ extern "C" {
|
|||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */
|
||||
SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
|
||||
SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
|
||||
SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
|
||||
SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
|
||||
SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
|
||||
} SDL_MessageBoxFlags;
|
||||
|
||||
/**
|
||||
|
|
117
code/SDL2/include/SDL_metal.h
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_metal.h
|
||||
*
|
||||
* Header file for functions to creating Metal layers and views on SDL windows.
|
||||
*/
|
||||
|
||||
#ifndef SDL_metal_h_
|
||||
#define SDL_metal_h_
|
||||
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
|
||||
*
|
||||
* \note This can be cast directly to an NSView or UIView.
|
||||
*/
|
||||
typedef void *SDL_MetalView;
|
||||
|
||||
/**
|
||||
* \name Metal support functions
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the
|
||||
* specified window.
|
||||
*
|
||||
* On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
|
||||
* own. It is up to user code to do that.
|
||||
*
|
||||
* The returned handle can be casted directly to a NSView or UIView.
|
||||
* To access the backing CAMetalLayer, call SDL_Metal_GetLayer().
|
||||
*
|
||||
* \note \a window must be created with the SDL_WINDOW_METAL flag.
|
||||
*
|
||||
* \sa SDL_Metal_DestroyView
|
||||
* \sa SDL_Metal_GetLayer
|
||||
*/
|
||||
extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Destroy an existing SDL_MetalView object.
|
||||
*
|
||||
* This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
|
||||
* called after SDL_CreateWindow.
|
||||
*
|
||||
* \sa SDL_Metal_CreateView
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
|
||||
|
||||
/**
|
||||
* \brief Get a pointer to the backing CAMetalLayer for the given view.
|
||||
*
|
||||
* \sa SDL_MetalCreateView
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
* with setting viewport, scissor & etc).
|
||||
*
|
||||
* \param window SDL_Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width in pixels,
|
||||
* may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels,
|
||||
* may be NULL
|
||||
*
|
||||
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||
* by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||
*
|
||||
* \note On macOS high-DPI support must be enabled for an application by
|
||||
* setting NSHighResolutionCapable to true in its Info.plist.
|
||||
*
|
||||
* \sa SDL_GetWindowSize()
|
||||
* \sa SDL_CreateWindow()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
|
||||
int *h);
|
||||
|
||||
/* @} *//* Metal support functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_metal_h_ */
|
75
code/SDL2/include/SDL_misc.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_misc.h
|
||||
*
|
||||
* \brief Include file for SDL API functions that don't fit elsewhere.
|
||||
*/
|
||||
|
||||
#ifndef SDL_misc_h_
|
||||
#define SDL_misc_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Open an URL / URI in the browser or other
|
||||
*
|
||||
* Open a URL in a separate, system-provided application. How this works will
|
||||
* vary wildly depending on the platform. This will likely launch what
|
||||
* makes sense to handle a specific URL's protocol (a web browser for http://,
|
||||
* etc), but it might also be able to launch file managers for directories
|
||||
* and other things.
|
||||
*
|
||||
* What happens when you open a URL varies wildly as well: your game window
|
||||
* may lose focus (and may or may not lose focus if your game was fullscreen
|
||||
* or grabbing input at the time). On mobile devices, your app will likely
|
||||
* move to the background or your process might be paused. Any given platform
|
||||
* may or may not handle a given URL.
|
||||
*
|
||||
* If this is unimplemented (or simply unavailable) for a platform, this will
|
||||
* fail with an error. A successful result does not mean the URL loaded, just
|
||||
* that we launched something to handle it (or at least believe we did).
|
||||
*
|
||||
* All this to say: this function can be useful, but you should definitely
|
||||
* test it on every platform you target.
|
||||
*
|
||||
* \param url A valid URL to open.
|
||||
* \return 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_misc_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -59,38 +59,95 @@ struct SDL_mutex;
|
|||
typedef struct SDL_mutex SDL_mutex;
|
||||
|
||||
/**
|
||||
* Create a mutex, initialized unlocked.
|
||||
* Create a new mutex.
|
||||
*
|
||||
* All newly-created mutexes begin in the _unlocked_ state.
|
||||
*
|
||||
* Calls to SDL_LockMutex() will not return while the mutex is locked by
|
||||
* another thread. See SDL_TryLockMutex() to attempt to lock without blocking.
|
||||
*
|
||||
* SDL mutexes are reentrant.
|
||||
*
|
||||
* \returns the initialized and unlocked mutex or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_DestroyMutex
|
||||
* \sa SDL_LockMutex
|
||||
* \sa SDL_TryLockMutex
|
||||
* \sa SDL_UnlockMutex
|
||||
*/
|
||||
extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
|
||||
|
||||
/**
|
||||
* Lock the mutex.
|
||||
* Lock the mutex.
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
* This will block until the mutex is available, which is to say it is in the
|
||||
* unlocked state and the OS has chosen the caller as the next thread to lock
|
||||
* it. Of all threads waiting to lock the mutex, only one may do so at a time.
|
||||
*
|
||||
* It is legal for the owning thread to lock an already-locked mutex. It must
|
||||
* unlock it the same number of times before it is actually made available for
|
||||
* other threads in the system (this is known as a "recursive mutex").
|
||||
*
|
||||
* \param mutex the mutex to lock
|
||||
* \return 0, or -1 on error.
|
||||
*/
|
||||
#define SDL_mutexP(m) SDL_LockMutex(m)
|
||||
extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);
|
||||
#define SDL_mutexP(m) SDL_LockMutex(m)
|
||||
|
||||
/**
|
||||
* Try to lock the mutex
|
||||
* Try to lock a mutex without blocking.
|
||||
*
|
||||
* \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error
|
||||
* This works just like SDL_LockMutex(), but if the mutex is not available,
|
||||
* this function returns `SDL_MUTEX_TIMEOUT` immediately.
|
||||
*
|
||||
* This technique is useful if you need exclusive access to a resource but
|
||||
* don't want to wait for it, and will return to it to try again later.
|
||||
*
|
||||
* \param mutex the mutex to try to lock
|
||||
* \returns 0, `SDL_MUTEX_TIMEDOUT`, or -1 on error; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
* \sa SDL_CreateMutex
|
||||
* \sa SDL_DestroyMutex
|
||||
* \sa SDL_LockMutex
|
||||
* \sa SDL_UnlockMutex
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Unlock the mutex.
|
||||
* Unlock the mutex.
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
* It is legal for the owning thread to lock an already-locked mutex. It must
|
||||
* unlock it the same number of times before it is actually made available for
|
||||
* other threads in the system (this is known as a "recursive mutex").
|
||||
*
|
||||
* \warning It is an error to unlock a mutex that has not been locked by
|
||||
* the current thread, and doing so results in undefined behavior.
|
||||
* It is an error to unlock a mutex that has not been locked by the current
|
||||
* thread, and doing so results in undefined behavior.
|
||||
*
|
||||
* It is also an error to unlock a mutex that isn't locked at all.
|
||||
*
|
||||
* \param mutex the mutex to unlock.
|
||||
* \returns 0, or -1 on error.
|
||||
*/
|
||||
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
||||
extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);
|
||||
#define SDL_mutexV(m) SDL_UnlockMutex(m)
|
||||
|
||||
/**
|
||||
* Destroy a mutex.
|
||||
* Destroy a mutex created with SDL_CreateMutex().
|
||||
*
|
||||
* This function must be called on any mutex that is no longer needed. Failure
|
||||
* to destroy a mutex will result in a system memory or resource leak. While
|
||||
* it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt
|
||||
* to destroy a locked mutex, and may result in undefined behavior depending
|
||||
* on the platform.
|
||||
*
|
||||
* \param mutex the mutex to destroy
|
||||
*
|
||||
* \sa SDL_CreateMutex
|
||||
* \sa SDL_LockMutex
|
||||
* \sa SDL_TryLockMutex
|
||||
* \sa SDL_UnlockMutex
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
|
||||
|
||||
|
@ -107,50 +164,137 @@ struct SDL_semaphore;
|
|||
typedef struct SDL_semaphore SDL_sem;
|
||||
|
||||
/**
|
||||
* Create a semaphore, initialized with value, returns NULL on failure.
|
||||
* Create a semaphore.
|
||||
*
|
||||
* This function creates a new semaphore and initializes it with the value
|
||||
* `initial_value`. Each wait operation on the semaphore will atomically
|
||||
* decrement the semaphore value and potentially block if the semaphore value
|
||||
* is 0. Each post operation will atomically increment the semaphore value and
|
||||
* wake waiting threads and allow them to retry the wait operation.
|
||||
*
|
||||
* \param initial_value the starting value of the semaphore
|
||||
* \returns a new semaphore or NULL on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_DestroySemaphore
|
||||
* \sa SDL_SemPost
|
||||
* \sa SDL_SemTryWait
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
* \sa SDL_SemWaitTimeout
|
||||
*/
|
||||
extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
|
||||
|
||||
/**
|
||||
* Destroy a semaphore.
|
||||
* Destroy a semaphore.
|
||||
*
|
||||
* It is not safe to destroy a semaphore if there are threads currently
|
||||
* waiting on it.
|
||||
*
|
||||
* \param sem the semaphore to destroy
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
* \sa SDL_SemPost
|
||||
* \sa SDL_SemTryWait
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
* \sa SDL_SemWaitTimeout
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* This function suspends the calling thread until the semaphore pointed
|
||||
* to by \c sem has a positive count. It then atomically decreases the
|
||||
* semaphore count.
|
||||
* Wait until a semaphore has a positive value and then decrements it.
|
||||
*
|
||||
* This function suspends the calling thread until either the semaphore
|
||||
* pointed to by `sem` has a positive value or the call is interrupted by a
|
||||
* signal or error. If the call is successful it will atomically decrement the
|
||||
* semaphore value.
|
||||
*
|
||||
* This function is the equivalent of calling SDL_SemWaitTimeout() with a time
|
||||
* length of `SDL_MUTEX_MAXWAIT`.
|
||||
*
|
||||
* \param sem the semaphore wait on
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
* \sa SDL_DestroySemaphore
|
||||
* \sa SDL_SemPost
|
||||
* \sa SDL_SemTryWait
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
* \sa SDL_SemWaitTimeout
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Non-blocking variant of SDL_SemWait().
|
||||
* See if a semaphore has a positive value and decrement it if it does.
|
||||
*
|
||||
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would
|
||||
* block, and -1 on error.
|
||||
* This function checks to see if the semaphore pointed to by `sem` has a
|
||||
* positive value and atomically decrements the semaphore value if it does. If
|
||||
* the semaphore doesn't have a positive value, the function immediately
|
||||
* returns SDL_MUTEX_TIMEDOUT.
|
||||
*
|
||||
* \param sem the semaphore to wait on
|
||||
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait would
|
||||
* block, or a negative error code on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
* \sa SDL_DestroySemaphore
|
||||
* \sa SDL_SemPost
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
* \sa SDL_SemWaitTimeout
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Variant of SDL_SemWait() with a timeout in milliseconds.
|
||||
* Wait until a semaphore has a positive value and then decrements it.
|
||||
*
|
||||
* \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not
|
||||
* succeed in the allotted time, and -1 on error.
|
||||
* This function suspends the calling thread until either the semaphore
|
||||
* pointed to by `sem` has a positive value, the call is interrupted by a
|
||||
* signal or error, or the specified time has elapsed. If the call is
|
||||
* successful it will atomically decrement the semaphore value.
|
||||
*
|
||||
* \warning On some platforms this function is implemented by looping with a
|
||||
* delay of 1 ms, and so should be avoided if possible.
|
||||
* \param sem the semaphore to wait on
|
||||
* \param ms the length of the timeout, in milliseconds
|
||||
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
|
||||
* succeed in the allotted time, or a negative error code on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
* \sa SDL_DestroySemaphore
|
||||
* \sa SDL_SemPost
|
||||
* \sa SDL_SemTryWait
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
|
||||
|
||||
/**
|
||||
* Atomically increases the semaphore's count (not blocking).
|
||||
* Atomically increment a semaphore's value and wake waiting threads.
|
||||
*
|
||||
* \return 0, or -1 on error.
|
||||
* \param sem the semaphore to increment
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
* \sa SDL_DestroySemaphore
|
||||
* \sa SDL_SemTryWait
|
||||
* \sa SDL_SemValue
|
||||
* \sa SDL_SemWait
|
||||
* \sa SDL_SemWaitTimeout
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Returns the current count of the semaphore.
|
||||
* Get the current value of a semaphore.
|
||||
*
|
||||
* \param sem the semaphore to query
|
||||
* \returns the current value of the semaphore.
|
||||
*
|
||||
* \sa SDL_CreateSemaphore
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
|
||||
|
||||
|
@ -167,72 +311,112 @@ struct SDL_cond;
|
|||
typedef struct SDL_cond SDL_cond;
|
||||
|
||||
/**
|
||||
* Create a condition variable.
|
||||
* Create a condition variable.
|
||||
*
|
||||
* Typical use of condition variables:
|
||||
* \returns a new condition variable or NULL on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* Thread A:
|
||||
* SDL_LockMutex(lock);
|
||||
* while ( ! condition ) {
|
||||
* SDL_CondWait(cond, lock);
|
||||
* }
|
||||
* SDL_UnlockMutex(lock);
|
||||
*
|
||||
* Thread B:
|
||||
* SDL_LockMutex(lock);
|
||||
* ...
|
||||
* condition = true;
|
||||
* ...
|
||||
* SDL_CondSignal(cond);
|
||||
* SDL_UnlockMutex(lock);
|
||||
*
|
||||
* There is some discussion whether to signal the condition variable
|
||||
* with the mutex locked or not. There is some potential performance
|
||||
* benefit to unlocking first on some platforms, but there are some
|
||||
* potential race conditions depending on how your code is structured.
|
||||
*
|
||||
* In general it's safer to signal the condition variable while the
|
||||
* mutex is locked.
|
||||
* \sa SDL_CondBroadcast
|
||||
* \sa SDL_CondSignal
|
||||
* \sa SDL_CondWait
|
||||
* \sa SDL_CondWaitTimeout
|
||||
* \sa SDL_DestroyCond
|
||||
*/
|
||||
extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
|
||||
|
||||
/**
|
||||
* Destroy a condition variable.
|
||||
* Destroy a condition variable.
|
||||
*
|
||||
* \param cond the condition variable to destroy
|
||||
*
|
||||
* \sa SDL_CondBroadcast
|
||||
* \sa SDL_CondSignal
|
||||
* \sa SDL_CondWait
|
||||
* \sa SDL_CondWaitTimeout
|
||||
* \sa SDL_CreateCond
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Restart one of the threads that are waiting on the condition variable.
|
||||
* Restart one of the threads that are waiting on the condition variable.
|
||||
*
|
||||
* \return 0 or -1 on error.
|
||||
* \param cond the condition variable to signal
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CondBroadcast
|
||||
* \sa SDL_CondWait
|
||||
* \sa SDL_CondWaitTimeout
|
||||
* \sa SDL_CreateCond
|
||||
* \sa SDL_DestroyCond
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Restart all threads that are waiting on the condition variable.
|
||||
* Restart all threads that are waiting on the condition variable.
|
||||
*
|
||||
* \return 0 or -1 on error.
|
||||
* \param cond the condition variable to signal
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CondSignal
|
||||
* \sa SDL_CondWait
|
||||
* \sa SDL_CondWaitTimeout
|
||||
* \sa SDL_CreateCond
|
||||
* \sa SDL_DestroyCond
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
|
||||
|
||||
/**
|
||||
* Wait on the condition variable, unlocking the provided mutex.
|
||||
* Wait until a condition variable is signaled.
|
||||
*
|
||||
* \warning The mutex must be locked before entering this function!
|
||||
* This function unlocks the specified `mutex` and waits for another thread to
|
||||
* call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
|
||||
* `cond`. Once the condition variable is signaled, the mutex is re-locked and
|
||||
* the function returns.
|
||||
*
|
||||
* The mutex is re-locked once the condition variable is signaled.
|
||||
* The mutex must be locked before calling this function.
|
||||
*
|
||||
* \return 0 when it is signaled, or -1 on error.
|
||||
* This function is the equivalent of calling SDL_CondWaitTimeout() with a
|
||||
* time length of `SDL_MUTEX_MAXWAIT`.
|
||||
*
|
||||
* \param cond the condition variable to wait on
|
||||
* \param mutex the mutex used to coordinate thread access
|
||||
* \returns 0 when it is signaled or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CondBroadcast
|
||||
* \sa SDL_CondSignal
|
||||
* \sa SDL_CondWaitTimeout
|
||||
* \sa SDL_CreateCond
|
||||
* \sa SDL_DestroyCond
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);
|
||||
|
||||
/**
|
||||
* Waits for at most \c ms milliseconds, and returns 0 if the condition
|
||||
* variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not
|
||||
* signaled in the allotted time, and -1 on error.
|
||||
* Wait until a condition variable is signaled or a certain time has passed.
|
||||
*
|
||||
* \warning On some platforms this function is implemented by looping with a
|
||||
* delay of 1 ms, and so should be avoided if possible.
|
||||
* This function unlocks the specified `mutex` and waits for another thread to
|
||||
* call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable
|
||||
* `cond`, or for the specified time to elapse. Once the condition variable is
|
||||
* signaled or the time elapsed, the mutex is re-locked and the function
|
||||
* returns.
|
||||
*
|
||||
* The mutex must be locked before calling this function.
|
||||
*
|
||||
* \param cond the condition variable to wait on
|
||||
* \param mutex the mutex used to coordinate thread access
|
||||
* \param ms the maximum time to wait, in milliseconds, or `SDL_MUTEX_MAXWAIT`
|
||||
* to wait indefinitely
|
||||
* \returns 0 if the condition variable is signaled, `SDL_MUTEX_TIMEDOUT` if
|
||||
* the condition is not signaled in the allotted time, or a negative
|
||||
* error code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CondBroadcast
|
||||
* \sa SDL_CondSignal
|
||||
* \sa SDL_CondWait
|
||||
* \sa SDL_CreateCond
|
||||
* \sa SDL_DestroyCond
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
|
||||
SDL_mutex * mutex, Uint32 ms);
|
||||
|
|
|
@ -40,6 +40,9 @@ extern "C" {
|
|||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#ifndef NOMINMAX /* don't define min() and max(). */
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -48,7 +48,7 @@ extern "C" {
|
|||
/* @} */
|
||||
|
||||
/** Pixel type. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PIXELTYPE_UNKNOWN,
|
||||
SDL_PIXELTYPE_INDEX1,
|
||||
|
@ -62,18 +62,18 @@ enum
|
|||
SDL_PIXELTYPE_ARRAYU32,
|
||||
SDL_PIXELTYPE_ARRAYF16,
|
||||
SDL_PIXELTYPE_ARRAYF32
|
||||
};
|
||||
} SDL_PixelType;
|
||||
|
||||
/** Bitmap pixel order, high bit -> low bit. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_BITMAPORDER_NONE,
|
||||
SDL_BITMAPORDER_4321,
|
||||
SDL_BITMAPORDER_1234
|
||||
};
|
||||
} SDL_BitmapOrder;
|
||||
|
||||
/** Packed component order, high bit -> low bit. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PACKEDORDER_NONE,
|
||||
SDL_PACKEDORDER_XRGB,
|
||||
|
@ -84,12 +84,12 @@ enum
|
|||
SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDORDER_ABGR,
|
||||
SDL_PACKEDORDER_BGRA
|
||||
};
|
||||
} SDL_PackedOrder;
|
||||
|
||||
/** Array component order, low byte -> high byte. */
|
||||
/* !!! FIXME: in 2.1, make these not overlap differently with
|
||||
!!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_ARRAYORDER_NONE,
|
||||
SDL_ARRAYORDER_RGB,
|
||||
|
@ -98,10 +98,10 @@ enum
|
|||
SDL_ARRAYORDER_BGR,
|
||||
SDL_ARRAYORDER_BGRA,
|
||||
SDL_ARRAYORDER_ABGR
|
||||
};
|
||||
} SDL_ArrayOrder;
|
||||
|
||||
/** Packed component layout. */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PACKEDLAYOUT_NONE,
|
||||
SDL_PACKEDLAYOUT_332,
|
||||
|
@ -112,7 +112,7 @@ enum
|
|||
SDL_PACKEDLAYOUT_8888,
|
||||
SDL_PACKEDLAYOUT_2101010,
|
||||
SDL_PACKEDLAYOUT_1010102
|
||||
};
|
||||
} SDL_PackedLayout;
|
||||
|
||||
#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
|
||||
|
||||
|
@ -168,7 +168,7 @@ enum
|
|||
((format) && (SDL_PIXELFLAG(format) != 1))
|
||||
|
||||
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
|
||||
enum
|
||||
typedef enum
|
||||
{
|
||||
SDL_PIXELFORMAT_UNKNOWN,
|
||||
SDL_PIXELFORMAT_INDEX1LSB =
|
||||
|
@ -188,15 +188,22 @@ enum
|
|||
SDL_PIXELFORMAT_RGB332 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_332, 8, 1),
|
||||
SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_PIXELFORMAT_XRGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
|
||||
SDL_PIXELFORMAT_XBGR4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
|
||||
SDL_PIXELFORMAT_XRGB1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_BGR555 =
|
||||
SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
|
||||
SDL_PIXELFORMAT_XBGR1555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
|
||||
SDL_PIXELFORMAT_ARGB4444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_4444, 16, 2),
|
||||
|
@ -233,15 +240,17 @@ enum
|
|||
SDL_PIXELFORMAT_BGR24 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
|
||||
24, 3),
|
||||
SDL_PIXELFORMAT_RGB888 =
|
||||
SDL_PIXELFORMAT_XRGB8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
|
||||
SDL_PIXELFORMAT_RGBX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGR888 =
|
||||
SDL_PIXELFORMAT_XBGR8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
|
||||
SDL_PIXELFORMAT_BGRX8888 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
|
||||
SDL_PACKEDLAYOUT_8888, 24, 4),
|
||||
|
@ -290,7 +299,7 @@ enum
|
|||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
|
||||
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
|
||||
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
|
||||
};
|
||||
} SDL_PixelFormatEnum;
|
||||
|
||||
typedef struct SDL_Color
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -70,6 +70,27 @@
|
|||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
#include "AvailabilityMacros.h"
|
||||
#include "TargetConditionals.h"
|
||||
|
||||
/* Fix building with older SDKs that don't define these
|
||||
See this for more information:
|
||||
https://stackoverflow.com/questions/12132933/preprocessor-macro-for-os-x-targets
|
||||
*/
|
||||
#ifndef TARGET_OS_MACCATALYST
|
||||
#define TARGET_OS_MACCATALYST 0
|
||||
#endif
|
||||
#ifndef TARGET_OS_IOS
|
||||
#define TARGET_OS_IOS 0
|
||||
#endif
|
||||
#ifndef TARGET_OS_IPHONE
|
||||
#define TARGET_OS_IPHONE 0
|
||||
#endif
|
||||
#ifndef TARGET_OS_TV
|
||||
#define TARGET_OS_TV 0
|
||||
#endif
|
||||
#ifndef TARGET_OS_SIMULATOR
|
||||
#define TARGET_OS_SIMULATOR 0
|
||||
#endif
|
||||
|
||||
#if TARGET_OS_TV
|
||||
#undef __TVOS__
|
||||
#define __TVOS__ 1
|
||||
|
@ -175,6 +196,9 @@
|
|||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
#if defined(__vita__)
|
||||
#define __VITA__ 1
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -183,7 +207,18 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \brief Gets the name of the platform.
|
||||
* Get the name of the platform.
|
||||
*
|
||||
* Here are the names returned for some (but not all) supported platforms:
|
||||
*
|
||||
* - "Windows"
|
||||
* - "Mac OS X"
|
||||
* - "Linux"
|
||||
* - "iOS"
|
||||
* - "Android"
|
||||
*
|
||||
* \returns the name of the platform. If the correct platform name is not
|
||||
* available, returns a string beginning with the text "Unknown".
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \brief The structure that defines a point
|
||||
* \brief The structure that defines a point (integer)
|
||||
*
|
||||
* \sa SDL_EnclosePoints
|
||||
* \sa SDL_PointInRect
|
||||
|
@ -52,7 +52,20 @@ typedef struct SDL_Point
|
|||
} SDL_Point;
|
||||
|
||||
/**
|
||||
* \brief A rectangle, with the origin at the upper left.
|
||||
* \brief The structure that defines a point (floating point)
|
||||
*
|
||||
* \sa SDL_EnclosePoints
|
||||
* \sa SDL_PointInRect
|
||||
*/
|
||||
typedef struct SDL_FPoint
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
} SDL_FPoint;
|
||||
|
||||
|
||||
/**
|
||||
* \brief A rectangle, with the origin at the upper left (integer).
|
||||
*
|
||||
* \sa SDL_RectEmpty
|
||||
* \sa SDL_RectEquals
|
||||
|
@ -67,6 +80,19 @@ typedef struct SDL_Rect
|
|||
int w, h;
|
||||
} SDL_Rect;
|
||||
|
||||
|
||||
/**
|
||||
* \brief A rectangle, with the origin at the upper left (floating point).
|
||||
*/
|
||||
typedef struct SDL_FRect
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float w;
|
||||
float h;
|
||||
} SDL_FRect;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns true if point resides inside a rectangle.
|
||||
*/
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-11914:f1084c419f33"
|
||||
#define SDL_REVISION_NUMBER 11914
|
||||
#define SDL_REVISION "https://github.com/libsdl-org/SDL.git@25f9ed87ff6947d9576fc9d79dee0784e638ac58"
|
||||
#define SDL_REVISION_NUMBER 0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -45,6 +45,9 @@ extern "C" {
|
|||
#define SDL_RWOPS_JNIFILE 3U /**< Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4U /**< Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
|
||||
#if defined(__VITA__)
|
||||
#define SDL_RWOPS_VITAFILE 6U /**< Vita file */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is the read/write operation structure -- very basic.
|
||||
|
@ -96,15 +99,7 @@ typedef struct SDL_RWops
|
|||
#if defined(__ANDROID__)
|
||||
struct
|
||||
{
|
||||
void *fileNameRef;
|
||||
void *inputStreamRef;
|
||||
void *readableByteChannelRef;
|
||||
void *readMethod;
|
||||
void *assetFileDescriptorRef;
|
||||
long position;
|
||||
long size;
|
||||
long offset;
|
||||
int fd;
|
||||
void *asset;
|
||||
} androidio;
|
||||
#elif defined(__WIN32__)
|
||||
struct
|
||||
|
@ -118,6 +113,17 @@ typedef struct SDL_RWops
|
|||
size_t left;
|
||||
} buffer;
|
||||
} windowsio;
|
||||
#elif defined(__VITA__)
|
||||
struct
|
||||
{
|
||||
int h;
|
||||
struct
|
||||
{
|
||||
void *data;
|
||||
size_t size;
|
||||
size_t left;
|
||||
} buffer;
|
||||
} vitaio;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDIO_H
|
||||
|
@ -176,42 +182,194 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
|
|||
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
|
||||
|
||||
/**
|
||||
* \name Read/write macros
|
||||
* Use this macro to get the size of the data stream in an SDL_RWops.
|
||||
*
|
||||
* Macros to easily read and write from an SDL_RWops structure.
|
||||
* \param context the SDL_RWops to get the size of the data stream from
|
||||
* \returns the size of the data stream in the SDL_RWops on success, -1 if
|
||||
* unknown or a negative error code on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_RWsize(ctx) (ctx)->size(ctx)
|
||||
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
|
||||
#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
|
||||
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
|
||||
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
|
||||
#define SDL_RWclose(ctx) (ctx)->close(ctx)
|
||||
/* @} *//* Read/write macros */
|
||||
|
||||
extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
|
||||
|
||||
/**
|
||||
* Load all the data from an SDL data stream.
|
||||
* Seek within an SDL_RWops data stream.
|
||||
*
|
||||
* The data is allocated with a zero byte at the end (null terminated)
|
||||
* This function seeks to byte `offset`, relative to `whence`.
|
||||
*
|
||||
* If \c datasize is not NULL, it is filled with the size of the data read.
|
||||
* `whence` may be any of the following values:
|
||||
*
|
||||
* If \c freesrc is non-zero, the stream will be closed after being read.
|
||||
* - `RW_SEEK_SET`: seek from the beginning of data
|
||||
* - `RW_SEEK_CUR`: seek relative to current read point
|
||||
* - `RW_SEEK_END`: seek relative to the end of data
|
||||
*
|
||||
* The data should be freed with SDL_free().
|
||||
* If this stream can not seek, it will return -1.
|
||||
*
|
||||
* \return the data, or NULL if there was an error.
|
||||
* SDL_RWseek() is actually a wrapper function that calls the SDL_RWops's
|
||||
* `seek` method appropriately, to simplify application development.
|
||||
*
|
||||
* \param context a pointer to an SDL_RWops structure
|
||||
* \param offset an offset in bytes, relative to **whence** location; can be
|
||||
* negative
|
||||
* \param whence any of `RW_SEEK_SET`, `RW_SEEK_CUR`, `RW_SEEK_END`
|
||||
* \returns the final offset in the data stream after the seek or -1 on error.
|
||||
*
|
||||
* \sa SDL_RWclose
|
||||
* \sa SDL_RWFromConstMem
|
||||
* \sa SDL_RWFromFile
|
||||
* \sa SDL_RWFromFP
|
||||
* \sa SDL_RWFromMem
|
||||
* \sa SDL_RWread
|
||||
* \sa SDL_RWtell
|
||||
* \sa SDL_RWwrite
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,
|
||||
int freesrc);
|
||||
extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
|
||||
Sint64 offset, int whence);
|
||||
|
||||
/**
|
||||
* Load an entire file.
|
||||
* Determine the current read/write offset in an SDL_RWops data stream.
|
||||
*
|
||||
* Convenience macro.
|
||||
* SDL_RWtell is actually a wrapper function that calls the SDL_RWops's `seek`
|
||||
* method, with an offset of 0 bytes from `RW_SEEK_CUR`, to simplify
|
||||
* application development.
|
||||
*
|
||||
* \param context a SDL_RWops data stream object from which to get the current
|
||||
* offset
|
||||
* \returns the current offset in the stream, or -1 if the information can not
|
||||
* be determined.
|
||||
*
|
||||
* \sa SDL_RWclose
|
||||
* \sa SDL_RWFromConstMem
|
||||
* \sa SDL_RWFromFile
|
||||
* \sa SDL_RWFromFP
|
||||
* \sa SDL_RWFromMem
|
||||
* \sa SDL_RWread
|
||||
* \sa SDL_RWseek
|
||||
* \sa SDL_RWwrite
|
||||
*/
|
||||
#define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1)
|
||||
extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
|
||||
|
||||
/**
|
||||
* Read from a data source.
|
||||
*
|
||||
* This function reads up to `maxnum` objects each of size `size` from the
|
||||
* data source to the area pointed at by `ptr`. This function may read less
|
||||
* objects than requested. It will return zero when there has been an error or
|
||||
* the data stream is completely read.
|
||||
*
|
||||
* SDL_RWread() is actually a function wrapper that calls the SDL_RWops's
|
||||
* `read` method appropriately, to simplify application development.
|
||||
*
|
||||
* \param context a pointer to an SDL_RWops structure
|
||||
* \param ptr a pointer to a buffer to read data into
|
||||
* \param size the size of each object to read, in bytes
|
||||
* \param maxnum the maximum number of objects to be read
|
||||
* \returns the number of objects read, or 0 at error or end of file; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_RWclose
|
||||
* \sa SDL_RWFromConstMem
|
||||
* \sa SDL_RWFromFile
|
||||
* \sa SDL_RWFromFP
|
||||
* \sa SDL_RWFromMem
|
||||
* \sa SDL_RWseek
|
||||
* \sa SDL_RWwrite
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
|
||||
void *ptr, size_t size,
|
||||
size_t maxnum);
|
||||
|
||||
/**
|
||||
* Write to an SDL_RWops data stream.
|
||||
*
|
||||
* This function writes exactly `num` objects each of size `size` from the
|
||||
* area pointed at by `ptr` to the stream. If this fails for any reason, it'll
|
||||
* return less than `num` to demonstrate how far the write progressed. On
|
||||
* success, it returns `num`.
|
||||
*
|
||||
* SDL_RWwrite is actually a function wrapper that calls the SDL_RWops's
|
||||
* `write` method appropriately, to simplify application development.
|
||||
*
|
||||
* \param context a pointer to an SDL_RWops structure
|
||||
* \param ptr a pointer to a buffer containing data to write
|
||||
* \param size the size of an object to write, in bytes
|
||||
* \param num the number of objects to write
|
||||
* \returns the number of objects written, which will be less than **num** on
|
||||
* error; call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_RWclose
|
||||
* \sa SDL_RWFromConstMem
|
||||
* \sa SDL_RWFromFile
|
||||
* \sa SDL_RWFromFP
|
||||
* \sa SDL_RWFromMem
|
||||
* \sa SDL_RWread
|
||||
* \sa SDL_RWseek
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
|
||||
const void *ptr, size_t size,
|
||||
size_t num);
|
||||
|
||||
/**
|
||||
* Close and free an allocated SDL_RWops structure.
|
||||
*
|
||||
* SDL_RWclose() closes and cleans up the SDL_RWops stream. It releases any
|
||||
* resources used by the stream and frees the SDL_RWops itself with
|
||||
* SDL_FreeRW(). This returns 0 on success, or -1 if the stream failed to
|
||||
* flush to its output (e.g. to disk).
|
||||
*
|
||||
* Note that if this fails to flush the stream to disk, this function reports
|
||||
* an error, but the SDL_RWops is still invalid once this function returns.
|
||||
*
|
||||
* SDL_RWclose() is actually a macro that calls the SDL_RWops's `close` method
|
||||
* appropriately, to simplify application development.
|
||||
*
|
||||
* \param context SDL_RWops structure to close
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_RWFromConstMem
|
||||
* \sa SDL_RWFromFile
|
||||
* \sa SDL_RWFromFP
|
||||
* \sa SDL_RWFromMem
|
||||
* \sa SDL_RWread
|
||||
* \sa SDL_RWseek
|
||||
* \sa SDL_RWwrite
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
|
||||
|
||||
/**
|
||||
* Load all the data from an SDL data stream.
|
||||
*
|
||||
* The data is allocated with a zero byte at the end (null terminated) for
|
||||
* convenience. This extra byte is not included in the value reported via
|
||||
* `datasize`.
|
||||
*
|
||||
* The data should be freed with SDL_free().
|
||||
*
|
||||
* \param src the SDL_RWops to read all available data from
|
||||
* \param datasize if not NULL, will store the number of bytes read
|
||||
* \param freesrc if non-zero, calls SDL_RWclose() on `src` before returning
|
||||
* \returns the data, or NULL if there was an error.
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops *src,
|
||||
size_t *datasize,
|
||||
int freesrc);
|
||||
|
||||
/**
|
||||
* Load all the data from a file path.
|
||||
*
|
||||
* The data is allocated with a zero byte at the end (null terminated) for
|
||||
* convenience. This extra byte is not included in the value reported via
|
||||
* `datasize`.
|
||||
*
|
||||
* The data should be freed with SDL_free().
|
||||
*
|
||||
* \param file the path to read all available data from
|
||||
* \param datasize if not NULL, will store the number of bytes read
|
||||
* \returns the data, or NULL if there was an error.
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
|
||||
|
||||
/**
|
||||
* \name Read endian functions
|
||||
|
|
267
code/SDL2/include/SDL_sensor.h
Normal file
|
@ -0,0 +1,267 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_sensor.h
|
||||
*
|
||||
* Include file for SDL sensor event handling
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SDL_sensor_h_
|
||||
#define SDL_sensor_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
extern "C" {
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief SDL_sensor.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
|
||||
* for sensors, and load appropriate drivers.
|
||||
*/
|
||||
|
||||
struct _SDL_Sensor;
|
||||
typedef struct _SDL_Sensor SDL_Sensor;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a sensor for the time it is connected to the system,
|
||||
* and is never reused for the lifetime of the application.
|
||||
*
|
||||
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
|
||||
*/
|
||||
typedef Sint32 SDL_SensorID;
|
||||
|
||||
/* The different sensors defined by SDL
|
||||
*
|
||||
* Additional sensors may be available, using platform dependent semantics.
|
||||
*
|
||||
* Hare are the additional Android sensors:
|
||||
* https://developer.android.com/reference/android/hardware/SensorEvent.html#values
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
|
||||
SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
|
||||
SDL_SENSOR_ACCEL, /**< Accelerometer */
|
||||
SDL_SENSOR_GYRO /**< Gyroscope */
|
||||
} SDL_SensorType;
|
||||
|
||||
/**
|
||||
* Accelerometer sensor
|
||||
*
|
||||
* The accelerometer returns the current acceleration in SI meters per
|
||||
* second squared. This measurement includes the force of gravity, so
|
||||
* a device at rest will have an value of SDL_STANDARD_GRAVITY away
|
||||
* from the center of the earth.
|
||||
*
|
||||
* values[0]: Acceleration on the x axis
|
||||
* values[1]: Acceleration on the y axis
|
||||
* values[2]: Acceleration on the z axis
|
||||
*
|
||||
* For phones held in portrait mode and game controllers held in front of you,
|
||||
* the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
#define SDL_STANDARD_GRAVITY 9.80665f
|
||||
|
||||
/**
|
||||
* Gyroscope sensor
|
||||
*
|
||||
* The gyroscope returns the current rate of rotation in radians per second.
|
||||
* The rotation is positive in the counter-clockwise direction. That is,
|
||||
* an observer looking from a positive location on one of the axes would
|
||||
* see positive rotation on that axis when it appeared to be rotating
|
||||
* counter-clockwise.
|
||||
*
|
||||
* values[0]: Angular speed around the x axis (pitch)
|
||||
* values[1]: Angular speed around the y axis (yaw)
|
||||
* values[2]: Angular speed around the z axis (roll)
|
||||
*
|
||||
* For phones held in portrait mode and game controllers held in front of you,
|
||||
* the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone or controller is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Locking for multi-threaded access to the sensor API
|
||||
*
|
||||
* If you are using the sensor API or handling events from multiple threads
|
||||
* you should use these locking functions to protect access to the sensors.
|
||||
*
|
||||
* In particular, you are guaranteed that the sensor list won't change, so
|
||||
* the API functions that take a sensor index will be valid, and sensor
|
||||
* events will not be delivered.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LockSensors(void);
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockSensors(void);
|
||||
|
||||
/**
|
||||
* \brief Count the number of sensors attached to the system right now
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor name, or NULL if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Open a sensor for use.
|
||||
*
|
||||
* The index passed as an argument refers to the N'th sensor on the system.
|
||||
*
|
||||
* \return A sensor identifier, or NULL if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
|
||||
|
||||
/**
|
||||
* Return the SDL_Sensor associated with an instance id.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* \return The sensor name, or NULL if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* Get the current state of an opened sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
*
|
||||
* \param sensor The sensor to query
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
*
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Close a sensor previously opened with SDL_SensorOpen()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
|
||||
|
||||
/**
|
||||
* Update the current state of the open sensors.
|
||||
*
|
||||
* This is called automatically by the event loop if sensor events are enabled.
|
||||
*
|
||||
* This needs to be called from the thread that initialized the sensor subsystem.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_sensor_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -30,6 +30,12 @@
|
|||
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
#define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
@ -86,6 +92,28 @@
|
|||
#ifdef HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#endif
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The number of elements in an array.
|
||||
|
@ -195,7 +223,7 @@ typedef uint64_t Uint64;
|
|||
|
||||
/* @} *//* Basic data types */
|
||||
|
||||
/* Make sure we have macros for printing 64 bit values.
|
||||
/* Make sure we have macros for printing width-based integers.
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
#ifndef SDL_PRIs64
|
||||
|
@ -242,6 +270,34 @@ typedef uint64_t Uint64;
|
|||
#define SDL_PRIX64 "llX"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIs32
|
||||
#ifdef PRId32
|
||||
#define SDL_PRIs32 PRId32
|
||||
#else
|
||||
#define SDL_PRIs32 "d"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIu32
|
||||
#ifdef PRIu32
|
||||
#define SDL_PRIu32 PRIu32
|
||||
#else
|
||||
#define SDL_PRIu32 "u"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIx32
|
||||
#ifdef PRIx32
|
||||
#define SDL_PRIx32 PRIx32
|
||||
#else
|
||||
#define SDL_PRIx32 "x"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIX32
|
||||
#ifdef PRIX32
|
||||
#define SDL_PRIX32 PRIX32
|
||||
#else
|
||||
#define SDL_PRIX32 "X"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Annotations to help code analysis tools */
|
||||
#ifdef SDL_DISABLE_ANALYZE_MACROS
|
||||
|
@ -310,7 +366,7 @@ SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
|||
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
#if !defined(__ANDROID__)
|
||||
#if !defined(__ANDROID__) && !defined(__VITA__)
|
||||
/* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */
|
||||
typedef enum
|
||||
{
|
||||
|
@ -328,28 +384,6 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_ALLOCA
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data)
|
||||
|
@ -369,7 +403,7 @@ typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
|||
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
|
||||
/**
|
||||
* \brief Get the current set of SDL memory functions
|
||||
* Get the current set of SDL memory functions
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
SDL_calloc_func *calloc_func,
|
||||
|
@ -377,12 +411,7 @@ extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func
|
|||
SDL_free_func *free_func);
|
||||
|
||||
/**
|
||||
* \brief Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \note If you are replacing SDL's memory functions, you should call
|
||||
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
||||
* That means that your free function will be called with memory
|
||||
* allocated by the previous memory allocation functions.
|
||||
* Replace SDL's memory allocation functions with a custom set
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
SDL_calloc_func calloc_func,
|
||||
|
@ -390,7 +419,7 @@ extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
|||
SDL_free_func free_func);
|
||||
|
||||
/**
|
||||
* \brief Get the number of outstanding (unfreed) allocations
|
||||
* Get the number of outstanding (unfreed) allocations
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
|
||||
|
@ -406,20 +435,35 @@ extern DECLSPEC int SDLCALL SDL_abs(int x);
|
|||
#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_isalpha(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isalnum(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isblank(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_iscntrl(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isdigit(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isxdigit(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_ispunct(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_islower(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isprint(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_isgraph(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_crc32(Uint32 crc, const void *data, size_t len);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
|
||||
|
||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||
#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
|
||||
|
||||
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
||||
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(i386)
|
||||
#ifdef __APPLE__
|
||||
memset_pattern4(dst, &val, dwords * 4);
|
||||
#elif defined(__GNUC__) && defined(__i386__)
|
||||
int u0, u1, u2;
|
||||
__asm__ __volatile__ (
|
||||
"cld \n\t"
|
||||
|
@ -432,20 +476,31 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|||
size_t _n = (dwords + 3) / 4;
|
||||
Uint32 *_p = SDL_static_cast(Uint32 *, dst);
|
||||
Uint32 _val = (val);
|
||||
if (dwords == 0)
|
||||
if (dwords == 0) {
|
||||
return;
|
||||
switch (dwords % 4)
|
||||
{
|
||||
}
|
||||
|
||||
/* !!! FIXME: there are better ways to do this, but this is just to clean this up for now. */
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#endif
|
||||
|
||||
switch (dwords % 4) {
|
||||
case 0: do { *_p++ = _val; /* fallthrough */
|
||||
case 3: *_p++ = _val; /* fallthrough */
|
||||
case 2: *_p++ = _val; /* fallthrough */
|
||||
case 1: *_p++ = _val; /* fallthrough */
|
||||
} while ( --_n );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
|
@ -454,7 +509,13 @@ extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t le
|
|||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
|
||||
extern DECLSPEC int SDLCALL SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t len);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||
|
@ -467,6 +528,7 @@ extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
|
|||
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
|
||||
extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
|
@ -514,10 +576,14 @@ extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
|||
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_exp(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_expf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_floorf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_trunc(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_truncf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||
|
@ -526,6 +592,10 @@ extern DECLSPEC double SDLCALL SDL_log10(double x);
|
|||
extern DECLSPEC float SDLCALL SDL_log10f(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_round(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_roundf(float x);
|
||||
extern DECLSPEC long SDLCALL SDL_lround(double x);
|
||||
extern DECLSPEC long SDLCALL SDL_lroundf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||
extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
|
||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||
|
@ -550,8 +620,8 @@ extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,
|
|||
size_t * inbytesleft, char **outbuf,
|
||||
size_t * outbytesleft);
|
||||
/**
|
||||
* This function converts a string between encodings in one pass, returning a
|
||||
* string that must be freed with SDL_free() or NULL on error.
|
||||
* This function converts a string between encodings in one pass, returning a
|
||||
* string that must be freed with SDL_free() or NULL on error.
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
||||
const char *fromcode,
|
||||
|
@ -564,6 +634,17 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
/* force builds using Clang's static analysis tools to use literal C runtime
|
||||
here, since there are possibly tests that are ineffective otherwise. */
|
||||
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
|
||||
|
||||
/* The analyzer knows about strlcpy even when the system doesn't provide it */
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char* dst, const char* src, size_t size);
|
||||
#endif
|
||||
|
||||
/* The analyzer knows about strlcat even when the system doesn't provide it */
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char* dst, const char* src, size_t size);
|
||||
#endif
|
||||
|
||||
#define SDL_malloc malloc
|
||||
#define SDL_calloc calloc
|
||||
#define SDL_realloc realloc
|
||||
|
@ -572,15 +653,23 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
|||
#define SDL_memcpy memcpy
|
||||
#define SDL_memmove memmove
|
||||
#define SDL_memcmp memcmp
|
||||
#define SDL_strlen strlen
|
||||
#define SDL_strlcpy strlcpy
|
||||
#define SDL_strlcat strlcat
|
||||
#define SDL_strlen strlen
|
||||
#define SDL_wcslen wcslen
|
||||
#define SDL_wcslcpy wcslcpy
|
||||
#define SDL_wcslcat wcslcat
|
||||
#define SDL_strdup strdup
|
||||
#define SDL_wcsdup wcsdup
|
||||
#define SDL_strchr strchr
|
||||
#define SDL_strrchr strrchr
|
||||
#define SDL_strstr strstr
|
||||
#define SDL_wcsstr wcsstr
|
||||
#define SDL_strtokr strtok_r
|
||||
#define SDL_strcmp strcmp
|
||||
#define SDL_wcscmp wcscmp
|
||||
#define SDL_strncmp strncmp
|
||||
#define SDL_wcsncmp wcsncmp
|
||||
#define SDL_strcasecmp strcasecmp
|
||||
#define SDL_strncasecmp strncasecmp
|
||||
#define SDL_sscanf sscanf
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -53,6 +53,7 @@ extern "C" {
|
|||
#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
|
||||
#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
|
||||
#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
|
||||
#define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
|
||||
/* @} *//* Surface flags */
|
||||
|
||||
/**
|
||||
|
@ -79,7 +80,9 @@ typedef struct SDL_Surface
|
|||
|
||||
/** information needed for surfaces requiring locks */
|
||||
int locked; /**< Read-only */
|
||||
void *lock_data; /**< Read-only */
|
||||
|
||||
/** list of BlitMap that hold a reference to this surface */
|
||||
void *list_blitmap; /**< Private */
|
||||
|
||||
/** clipping information */
|
||||
SDL_Rect clip_rect; /**< Read-only */
|
||||
|
@ -109,31 +112,101 @@ typedef enum
|
|||
} SDL_YUV_CONVERSION_MODE;
|
||||
|
||||
/**
|
||||
* Allocate and free an RGB surface.
|
||||
* Allocate a new RGB surface.
|
||||
*
|
||||
* If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
|
||||
* If the depth is greater than 8 bits, the pixel format is set using the
|
||||
* flags '[RGB]mask'.
|
||||
* If `depth` is 4 or 8 bits, an empty palette is allocated for the surface.
|
||||
* If `depth` is greater than 8 bits, the pixel format is set using the
|
||||
* [RGBA]mask parameters.
|
||||
*
|
||||
* If the function runs out of memory, it will return NULL.
|
||||
* The [RGBA]mask parameters are the bitmasks used to extract that color from
|
||||
* a pixel. For instance, `Rmask` being 0xFF000000 means the red data is
|
||||
* stored in the most significant byte. Using zeros for the RGB masks sets a
|
||||
* default value, based on the depth. For example:
|
||||
*
|
||||
* \param flags The \c flags are obsolete and should be set to 0.
|
||||
* \param width The width in pixels of the surface to create.
|
||||
* \param height The height in pixels of the surface to create.
|
||||
* \param depth The depth in bits of the surface to create.
|
||||
* \param Rmask The red mask of the surface to create.
|
||||
* \param Gmask The green mask of the surface to create.
|
||||
* \param Bmask The blue mask of the surface to create.
|
||||
* \param Amask The alpha mask of the surface to create.
|
||||
* ```c++
|
||||
* SDL_CreateRGBSurface(0,w,h,32,0,0,0,0);
|
||||
* ```
|
||||
*
|
||||
* However, using zero for the Amask results in an Amask of 0.
|
||||
*
|
||||
* By default surfaces with an alpha mask are set up for blending as with:
|
||||
*
|
||||
* ```c++
|
||||
* SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_BLEND)
|
||||
* ```
|
||||
*
|
||||
* You can change this by calling SDL_SetSurfaceBlendMode() and selecting a
|
||||
* different `blendMode`.
|
||||
*
|
||||
* \param flags the flags are unused and should be set to 0
|
||||
* \param width the width of the surface
|
||||
* \param height the height of the surface
|
||||
* \param depth the depth of the surface in bits
|
||||
* \param Rmask the red mask for the pixels
|
||||
* \param Gmask the green mask for the pixels
|
||||
* \param Bmask the blue mask for the pixels
|
||||
* \param Amask the alpha mask for the pixels
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateRGBSurfaceFrom
|
||||
* \sa SDL_CreateRGBSurfaceWithFormat
|
||||
* \sa SDL_FreeSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
|
||||
(Uint32 flags, int width, int height, int depth,
|
||||
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
|
||||
|
||||
|
||||
/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
|
||||
/**
|
||||
* Allocate a new RGB surface with a specific pixel format.
|
||||
*
|
||||
* This function operates mostly like SDL_CreateRGBSurface(), except instead
|
||||
* of providing pixel color masks, you provide it with a predefined format
|
||||
* from SDL_PixelFormatEnum.
|
||||
*
|
||||
* \param flags the flags are unused and should be set to 0
|
||||
* \param width the width of the surface
|
||||
* \param height the height of the surface
|
||||
* \param depth the depth of the surface in bits
|
||||
* \param format the SDL_PixelFormatEnum for the new surface's pixel format.
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateRGBSurface
|
||||
* \sa SDL_CreateRGBSurfaceFrom
|
||||
* \sa SDL_FreeSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
|
||||
(Uint32 flags, int width, int height, int depth, Uint32 format);
|
||||
|
||||
/**
|
||||
* Allocate a new RGB surface with existing pixel data.
|
||||
*
|
||||
* This function operates mostly like SDL_CreateRGBSurface(), except it does
|
||||
* not allocate memory for the pixel data, instead the caller provides an
|
||||
* existing buffer of data for the surface to use.
|
||||
*
|
||||
* No copy is made of the pixel data. Pixel data is not managed automatically;
|
||||
* you must free the surface before you free the pixel data.
|
||||
*
|
||||
* \param pixels a pointer to existing pixel data
|
||||
* \param width the width of the surface
|
||||
* \param height the height of the surface
|
||||
* \param depth the depth of the surface in bits
|
||||
* \param pitch the pitch of the surface in bytes
|
||||
* \param Rmask the red mask for the pixels
|
||||
* \param Gmask the green mask for the pixels
|
||||
* \param Bmask the blue mask for the pixels
|
||||
* \param Amask the alpha mask for the pixels
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateRGBSurface
|
||||
* \sa SDL_CreateRGBSurfaceWithFormat
|
||||
* \sa SDL_FreeSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
|
||||
int width,
|
||||
int height,
|
||||
|
@ -143,74 +216,133 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
|
|||
Uint32 Gmask,
|
||||
Uint32 Bmask,
|
||||
Uint32 Amask);
|
||||
|
||||
/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */
|
||||
/**
|
||||
* Allocate a new RGB surface with with a specific pixel format and existing
|
||||
* pixel data.
|
||||
*
|
||||
* This function operates mostly like SDL_CreateRGBSurfaceFrom(), except
|
||||
* instead of providing pixel color masks, you provide it with a predefined
|
||||
* format from SDL_PixelFormatEnum.
|
||||
*
|
||||
* No copy is made of the pixel data. Pixel data is not managed automatically;
|
||||
* you must free the surface before you free the pixel data.
|
||||
*
|
||||
* \param pixels a pointer to existing pixel data
|
||||
* \param width the width of the surface
|
||||
* \param height the height of the surface
|
||||
* \param depth the depth of the surface in bits
|
||||
* \param pitch the pitch of the surface in bytes
|
||||
* \param format the SDL_PixelFormatEnum for the new surface's pixel format.
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_CreateRGBSurfaceFrom
|
||||
* \sa SDL_CreateRGBSurfaceWithFormat
|
||||
* \sa SDL_FreeSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
|
||||
(void *pixels, int width, int height, int depth, int pitch, Uint32 format);
|
||||
|
||||
/**
|
||||
* Free an RGB surface.
|
||||
*
|
||||
* It is safe to pass NULL to this function.
|
||||
*
|
||||
* \param surface the SDL_Surface to free.
|
||||
*
|
||||
* \sa SDL_CreateRGBSurface
|
||||
* \sa SDL_CreateRGBSurfaceFrom
|
||||
* \sa SDL_LoadBMP
|
||||
* \sa SDL_LoadBMP_RW
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Set the palette used by a surface.
|
||||
* Set the palette used by a surface.
|
||||
*
|
||||
* \return 0, or -1 if the surface format doesn't use a palette.
|
||||
* A single palette can be shared with many surfaces.
|
||||
*
|
||||
* \note A single palette can be shared with many surfaces.
|
||||
* \param surface the SDL_Surface structure to update
|
||||
* \param palette the SDL_Palette structure to use
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
|
||||
SDL_Palette * palette);
|
||||
|
||||
/**
|
||||
* \brief Sets up a surface for directly accessing the pixels.
|
||||
* Set up a surface for directly accessing the pixels.
|
||||
*
|
||||
* Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write
|
||||
* to and read from \c surface->pixels, using the pixel format stored in
|
||||
* \c surface->format. Once you are done accessing the surface, you should
|
||||
* use SDL_UnlockSurface() to release it.
|
||||
* Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to
|
||||
* and read from `surface->pixels`, using the pixel format stored in
|
||||
* `surface->format`. Once you are done accessing the surface, you should use
|
||||
* SDL_UnlockSurface() to release it.
|
||||
*
|
||||
* Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates
|
||||
* to 0, then you can read and write to the surface at any time, and the
|
||||
* pixel format of the surface will not change.
|
||||
* Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to
|
||||
* 0, then you can read and write to the surface at any time, and the pixel
|
||||
* format of the surface will not change.
|
||||
*
|
||||
* No operating system or library calls should be made between lock/unlock
|
||||
* pairs, as critical system locks may be held during this time.
|
||||
* \param surface the SDL_Surface structure to be locked
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
|
||||
*
|
||||
* \sa SDL_UnlockSurface()
|
||||
* \sa SDL_MUSTLOCK
|
||||
* \sa SDL_UnlockSurface
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
|
||||
/** \sa SDL_LockSurface() */
|
||||
|
||||
/**
|
||||
* Release a surface after directly accessing the pixels.
|
||||
*
|
||||
* \param surface the SDL_Surface structure to be unlocked
|
||||
*
|
||||
* \sa SDL_LockSurface
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Load a surface from a seekable SDL data stream (memory or file).
|
||||
* Load a BMP image from a seekable SDL data stream.
|
||||
*
|
||||
* If \c freesrc is non-zero, the stream will be closed after being read.
|
||||
* The new surface should be freed with SDL_FreeSurface().
|
||||
*
|
||||
* The new surface should be freed with SDL_FreeSurface().
|
||||
* \param src the data stream for the surface
|
||||
* \param freesrc non-zero to close the stream after being read
|
||||
* \returns a pointer to a new SDL_Surface structure or NULL if there was an
|
||||
* error; call SDL_GetError() for more information.
|
||||
*
|
||||
* \return the new surface, or NULL if there was an error.
|
||||
* \sa SDL_FreeSurface
|
||||
* \sa SDL_LoadBMP
|
||||
* \sa SDL_SaveBMP_RW
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
|
||||
int freesrc);
|
||||
|
||||
/**
|
||||
* Load a surface from a file.
|
||||
* Load a surface from a file.
|
||||
*
|
||||
* Convenience macro.
|
||||
* Convenience macro.
|
||||
*/
|
||||
#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
|
||||
|
||||
/**
|
||||
* Save a surface to a seekable SDL data stream (memory or file).
|
||||
* Save a surface to a seekable SDL data stream in BMP format.
|
||||
*
|
||||
* Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
|
||||
* BMP directly. Other RGB formats with 8-bit or higher get converted to a
|
||||
* 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
|
||||
* surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
|
||||
* not supported.
|
||||
* Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
|
||||
* BMP directly. Other RGB formats with 8-bit or higher get converted to a
|
||||
* 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
|
||||
* surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
|
||||
* not supported.
|
||||
*
|
||||
* If \c freedst is non-zero, the stream will be closed after being written.
|
||||
* \param surface the SDL_Surface structure containing the image to be saved
|
||||
* \param dst a data stream to save to
|
||||
* \param freedst non-zero to close the stream after being written
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \return 0 if successful or -1 if there was an error.
|
||||
* \sa SDL_LoadBMP_RW
|
||||
* \sa SDL_SaveBMP
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
|
||||
(SDL_Surface * surface, SDL_RWops * dst, int freedst);
|
||||
|
@ -224,176 +356,303 @@ extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
|
|||
SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
|
||||
|
||||
/**
|
||||
* \brief Sets the RLE acceleration hint for a surface.
|
||||
* Set the RLE acceleration hint for a surface.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid
|
||||
* If RLE is enabled, color key and alpha blending blits are much faster, but
|
||||
* the surface must be locked before directly accessing the pixels.
|
||||
*
|
||||
* \note If RLE is enabled, colorkey and alpha blending blits are much faster,
|
||||
* but the surface must be locked before directly accessing the pixels.
|
||||
* \param surface the SDL_Surface structure to optimize
|
||||
* \param flag 0 to disable, non-zero to enable RLE acceleration
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
* \sa SDL_LockSurface
|
||||
* \sa SDL_UnlockSurface
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
||||
int flag);
|
||||
|
||||
/**
|
||||
* \brief Sets the color key (transparent pixel) in a blittable surface.
|
||||
* Returns whether the surface is RLE enabled
|
||||
*
|
||||
* \param surface The surface to update
|
||||
* \param flag Non-zero to enable colorkey and 0 to disable colorkey
|
||||
* \param key The transparent pixel in the native surface format
|
||||
* It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \returns SDL_TRUE if the surface is RLE enabled, SDL_FALSE otherwise.
|
||||
*
|
||||
* You can pass SDL_RLEACCEL to enable RLE accelerated blits.
|
||||
* \sa SDL_SetSurfaceRLE
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSurfaceRLE(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Set the color key (transparent pixel) in a surface.
|
||||
*
|
||||
* The color key defines a pixel value that will be treated as transparent in
|
||||
* a blit. For example, one can use this to specify that cyan pixels should be
|
||||
* considered transparent, and therefore not rendered.
|
||||
*
|
||||
* It is a pixel of the format used by the surface, as generated by
|
||||
* SDL_MapRGB().
|
||||
*
|
||||
* RLE acceleration can substantially speed up blitting of images with large
|
||||
* horizontal runs of transparent pixels. See SDL_SetSurfaceRLE() for details.
|
||||
*
|
||||
* \param surface the SDL_Surface structure to update
|
||||
* \param flag SDL_TRUE to enable color key, SDL_FALSE to disable color key
|
||||
* \param key the transparent pixel
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
* \sa SDL_GetColorKey
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||
int flag, Uint32 key);
|
||||
|
||||
/**
|
||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||
* Returns whether the surface has a color key
|
||||
*
|
||||
* \param surface The surface to update
|
||||
* \param key A pointer filled in with the transparent pixel in the native
|
||||
* surface format
|
||||
* It is safe to pass a NULL `surface` here; it will return SDL_FALSE.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid or colorkey is not
|
||||
* enabled.
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \return SDL_TRUE if the surface has a color key, SDL_FALSE otherwise.
|
||||
*
|
||||
* \sa SDL_SetColorKey
|
||||
* \sa SDL_GetColorKey
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Get the color key (transparent pixel) for a surface.
|
||||
*
|
||||
* The color key is a pixel of the format used by the surface, as generated by
|
||||
* SDL_MapRGB().
|
||||
*
|
||||
* If the surface doesn't have color key enabled this function returns -1.
|
||||
*
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \param key a pointer filled in with the transparent pixel
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
* \sa SDL_SetColorKey
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,
|
||||
Uint32 * key);
|
||||
|
||||
/**
|
||||
* \brief Set an additional color value used in blit operations.
|
||||
* Set an additional color value multiplied into blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param r The red color value multiplied into blit operations.
|
||||
* \param g The green color value multiplied into blit operations.
|
||||
* \param b The blue color value multiplied into blit operations.
|
||||
* When this surface is blitted, during the blit operation each source color
|
||||
* channel is modulated by the appropriate color value according to the
|
||||
* following formula:
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
* `srcC = srcC * (color / 255)`
|
||||
*
|
||||
* \sa SDL_GetSurfaceColorMod()
|
||||
* \param surface the SDL_Surface structure to update
|
||||
* \param r the red color value multiplied into blit operations
|
||||
* \param g the green color value multiplied into blit operations
|
||||
* \param b the blue color value multiplied into blit operations
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_GetSurfaceColorMod
|
||||
* \sa SDL_SetSurfaceAlphaMod
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
|
||||
Uint8 r, Uint8 g, Uint8 b);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the additional color value used in blit operations.
|
||||
* Get the additional color value multiplied into blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param r A pointer filled in with the current red color value.
|
||||
* \param g A pointer filled in with the current green color value.
|
||||
* \param b A pointer filled in with the current blue color value.
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \param r a pointer filled in with the current red color value
|
||||
* \param g a pointer filled in with the current green color value
|
||||
* \param b a pointer filled in with the current blue color value
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceColorMod()
|
||||
* \sa SDL_GetSurfaceAlphaMod
|
||||
* \sa SDL_SetSurfaceColorMod
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
|
||||
Uint8 * r, Uint8 * g,
|
||||
Uint8 * b);
|
||||
|
||||
/**
|
||||
* \brief Set an additional alpha value used in blit operations.
|
||||
* Set an additional alpha value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param alpha The alpha value multiplied into blit operations.
|
||||
* When this surface is blitted, during the blit operation the source alpha
|
||||
* value is modulated by this alpha value according to the following formula:
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
* `srcA = srcA * (alpha / 255)`
|
||||
*
|
||||
* \sa SDL_GetSurfaceAlphaMod()
|
||||
* \param surface the SDL_Surface structure to update
|
||||
* \param alpha the alpha value multiplied into blit operations
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_GetSurfaceAlphaMod
|
||||
* \sa SDL_SetSurfaceColorMod
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
|
||||
Uint8 alpha);
|
||||
|
||||
/**
|
||||
* \brief Get the additional alpha value used in blit operations.
|
||||
* Get the additional alpha value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param alpha A pointer filled in with the current alpha value.
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \param alpha a pointer filled in with the current alpha value
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceAlphaMod()
|
||||
* \sa SDL_GetSurfaceColorMod
|
||||
* \sa SDL_SetSurfaceAlphaMod
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
|
||||
Uint8 * alpha);
|
||||
|
||||
/**
|
||||
* \brief Set the blend mode used for blit operations.
|
||||
* Set the blend mode used for blit operations.
|
||||
*
|
||||
* \param surface The surface to update.
|
||||
* \param blendMode ::SDL_BlendMode to use for blit blending.
|
||||
* To copy a surface to another surface (or texture) without blending with the
|
||||
* existing data, the blendmode of the SOURCE surface should be set to
|
||||
* `SDL_BLENDMODE_NONE`.
|
||||
*
|
||||
* \return 0 on success, or -1 if the parameters are not valid.
|
||||
* \param surface the SDL_Surface structure to update
|
||||
* \param blendMode the SDL_BlendMode to use for blit blending
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_GetSurfaceBlendMode()
|
||||
* \sa SDL_GetSurfaceBlendMode
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
|
||||
SDL_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* \brief Get the blend mode used for blit operations.
|
||||
* Get the blend mode used for blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
* \param surface the SDL_Surface structure to query
|
||||
* \param blendMode a pointer filled in with the current SDL_BlendMode
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
* \sa SDL_SetSurfaceBlendMode()
|
||||
* \sa SDL_SetSurfaceBlendMode
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* Sets the clipping rectangle for the destination surface in a blit.
|
||||
* Set the clipping rectangle for a surface.
|
||||
*
|
||||
* If the clip rectangle is NULL, clipping will be disabled.
|
||||
* When `surface` is the destination of a blit, only the area within the clip
|
||||
* rectangle is drawn into.
|
||||
*
|
||||
* If the clip rectangle doesn't intersect the surface, the function will
|
||||
* return SDL_FALSE and blits will be completely clipped. Otherwise the
|
||||
* function returns SDL_TRUE and blits to the surface will be clipped to
|
||||
* the intersection of the surface area and the clipping rectangle.
|
||||
* Note that blits are automatically clipped to the edges of the source and
|
||||
* destination surfaces.
|
||||
*
|
||||
* Note that blits are automatically clipped to the edges of the source
|
||||
* and destination surfaces.
|
||||
* \param surface the SDL_Surface structure to be clipped
|
||||
* \param rect the SDL_Rect structure representing the clipping rectangle, or
|
||||
* NULL to disable clipping
|
||||
* \returns SDL_TRUE if the rectangle intersects the surface, otherwise
|
||||
* SDL_FALSE and blits will be completely clipped.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
* \sa SDL_GetClipRect
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* Gets the clipping rectangle for the destination surface in a blit.
|
||||
* Get the clipping rectangle for a surface.
|
||||
*
|
||||
* \c rect must be a pointer to a valid rectangle which will be filled
|
||||
* with the correct values.
|
||||
* When `surface` is the destination of a blit, only the area within the clip
|
||||
* rectangle is drawn into.
|
||||
*
|
||||
* \param surface the SDL_Surface structure representing the surface to be
|
||||
* clipped
|
||||
* \param rect an SDL_Rect structure filled in with the clipping rectangle for
|
||||
* the surface
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
* \sa SDL_SetClipRect
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/*
|
||||
* Creates a new surface identical to the existing surface
|
||||
* Creates a new surface identical to the existing surface.
|
||||
*
|
||||
* The returned surface should be freed with SDL_FreeSurface().
|
||||
*
|
||||
* \param surface the surface to duplicate.
|
||||
* \returns a copy of the surface, or NULL on failure; call SDL_GetError() for
|
||||
* more information.
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* Creates a new surface of the specified format, and then copies and maps
|
||||
* the given surface to it so the blit of the converted surface will be as
|
||||
* fast as possible. If this function fails, it returns NULL.
|
||||
* Copy an existing surface to a new surface of the specified format.
|
||||
*
|
||||
* The \c flags parameter is passed to SDL_CreateRGBSurface() and has those
|
||||
* semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and
|
||||
* SDL will try to RLE accelerate colorkey and alpha blits in the resulting
|
||||
* surface.
|
||||
* This function is used to optimize images for faster *repeat* blitting. This
|
||||
* is accomplished by converting the original and storing the result as a new
|
||||
* surface. The new, optimized surface can then be used as the source for
|
||||
* future blits, making them faster.
|
||||
*
|
||||
* \param src the existing SDL_Surface structure to convert
|
||||
* \param fmt the SDL_PixelFormat structure that the new surface is optimized
|
||||
* for
|
||||
* \param flags the flags are unused and should be set to 0; this is a
|
||||
* leftover from SDL 1.2's API
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_AllocFormat
|
||||
* \sa SDL_ConvertSurfaceFormat
|
||||
* \sa SDL_CreateRGBSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
|
||||
(SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);
|
||||
|
||||
/**
|
||||
* Copy an existing surface to a new surface of the specified format enum.
|
||||
*
|
||||
* This function operates just like SDL_ConvertSurface(), but accepts an
|
||||
* SDL_PixelFormatEnum value instead of an SDL_PixelFormat structure. As such,
|
||||
* it might be easier to call but it doesn't have access to palette
|
||||
* information for the destination surface, in case that would be important.
|
||||
*
|
||||
* \param src the existing SDL_Surface structure to convert
|
||||
* \param pixel_format the SDL_PixelFormatEnum that the new surface is
|
||||
* optimized for
|
||||
* \param flags the flags are unused and should be set to 0; this is a
|
||||
* leftover from SDL 1.2's API
|
||||
* \returns the new SDL_Surface structure that is created or NULL if it fails;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_AllocFormat
|
||||
* \sa SDL_ConvertSurfaceFormat
|
||||
* \sa SDL_CreateRGBSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
|
||||
(SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
|
||||
|
||||
/**
|
||||
* \brief Copy a block of pixels of one format to another format
|
||||
* Copy a block of pixels of one format to another format.
|
||||
*
|
||||
* \return 0 on success, or -1 if there was an error
|
||||
* \param width the width of the block to copy, in pixels
|
||||
* \param height the height of the block to copy, in pixels
|
||||
* \param src_format an SDL_PixelFormatEnum value of the `src` pixels format
|
||||
* \param src a pointer to the source pixels
|
||||
* \param src_pitch the pitch of the block to copy, in bytes
|
||||
* \param dst_format an SDL_PixelFormatEnum value of the `dst` pixels format
|
||||
* \param dst a pointer to be filled in with new pixel data
|
||||
* \param dst_pitch the pitch of the destination pixels, in bytes
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
|
||||
Uint32 src_format,
|
||||
|
@ -402,20 +661,54 @@ extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,
|
|||
void * dst, int dst_pitch);
|
||||
|
||||
/**
|
||||
* Performs a fast fill of the given rectangle with \c color.
|
||||
* Perform a fast fill of a rectangle with a specific color.
|
||||
*
|
||||
* If \c rect is NULL, the whole surface will be filled with \c color.
|
||||
* `color` should be a pixel of the format used by the surface, and can be
|
||||
* generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
|
||||
* alpha component then the destination is simply filled with that alpha
|
||||
* information, no blending takes place.
|
||||
*
|
||||
* The color should be a pixel of the format used by the surface, and
|
||||
* can be generated by the SDL_MapRGB() function.
|
||||
* If there is a clip rectangle set on the destination (set via
|
||||
* SDL_SetClipRect()), then this function will fill based on the intersection
|
||||
* of the clip rectangle and `rect`.
|
||||
*
|
||||
* \return 0 on success, or -1 on error.
|
||||
* \param dst the SDL_Surface structure that is the drawing target
|
||||
* \param rect the SDL_Rect structure representing the rectangle to fill, or
|
||||
* NULL to fill the entire surface
|
||||
* \param color the color to fill with
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_FillRects
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_FillRect
|
||||
(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
|
||||
|
||||
/**
|
||||
* Perform a fast fill of a set of rectangles with a specific color.
|
||||
*
|
||||
* `color` should be a pixel of the format used by the surface, and can be
|
||||
* generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an
|
||||
* alpha component then the destination is simply filled with that alpha
|
||||
* information, no blending takes place.
|
||||
*
|
||||
* If there is a clip rectangle set on the destination (set via
|
||||
* SDL_SetClipRect()), then this function will fill based on the intersection
|
||||
* of the clip rectangle and `rect`.
|
||||
*
|
||||
* \param dst the SDL_Surface structure that is the drawing target
|
||||
* \param rects an array of SDL_Rects representing the rectangles to fill.
|
||||
* \param count the number of rectangles in the array
|
||||
* \param color the color to fill with
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_FillRect
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_FillRects
|
||||
(SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
|
||||
|
||||
/* !!! FIXME: merge this documentation with the wiki */
|
||||
/**
|
||||
* Performs a fast blit from the source surface to the destination surface.
|
||||
*
|
||||
|
@ -424,7 +717,7 @@ extern DECLSPEC int SDLCALL SDL_FillRects
|
|||
* surface (\c src or \c dst) is copied. The final blit rectangles are saved
|
||||
* in \c srcrect and \c dstrect after all clipping is performed.
|
||||
*
|
||||
* \return If the blit is successful, it returns 0, otherwise it returns -1.
|
||||
* \returns 0 if the blit is successful, otherwise it returns -1.
|
||||
*
|
||||
* The blit function should not be called on a locked surface.
|
||||
*
|
||||
|
@ -476,62 +769,110 @@ extern DECLSPEC int SDLCALL SDL_FillRects
|
|||
#define SDL_BlitSurface SDL_UpperBlit
|
||||
|
||||
/**
|
||||
* This is the public blit function, SDL_BlitSurface(), and it performs
|
||||
* rectangle validation and clipping before passing it to SDL_LowerBlit()
|
||||
* Perform a fast blit from the source surface to the destination surface.
|
||||
*
|
||||
* SDL_UpperBlit() has been replaced by SDL_BlitSurface(), which is merely a
|
||||
* macro for this function with a less confusing name.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpperBlit
|
||||
(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* This is a semi-private blit function and it performs low-level surface
|
||||
* blitting only.
|
||||
* Perform low-level surface blitting only.
|
||||
*
|
||||
* This is a semi-private blit function and it performs low-level surface
|
||||
* blitting, assuming the input rectangles have already been clipped.
|
||||
*
|
||||
* Unless you know what you're doing, you should be using SDL_BlitSurface()
|
||||
* instead.
|
||||
*
|
||||
* \param src the SDL_Surface structure to be copied from
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
* copied, or NULL to copy the entire surface
|
||||
* \param dst the SDL_Surface structure that is the blit target
|
||||
* \param dstrect the SDL_Rect structure representing the rectangle that is
|
||||
* copied into
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_BlitSurface
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LowerBlit
|
||||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Perform a fast, low quality, stretch blit between two surfaces of the
|
||||
* same pixel format.
|
||||
*
|
||||
* \note This function uses a static buffer, and is not thread-safe.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Perform a fast, low quality, stretch blit between two surfaces of the
|
||||
* same format.
|
||||
*
|
||||
* Please use SDL_BlitScaled() instead.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
|
||||
const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst,
|
||||
const SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* Perform bilinear scaling between two surfaces of the same format, 32BPP.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface * src,
|
||||
const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst,
|
||||
const SDL_Rect * dstrect);
|
||||
|
||||
|
||||
#define SDL_BlitScaled SDL_UpperBlitScaled
|
||||
|
||||
/**
|
||||
* This is the public scaled blit function, SDL_BlitScaled(), and it performs
|
||||
* rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
|
||||
* Perform a scaled surface copy to a destination surface.
|
||||
*
|
||||
* SDL_UpperBlitScaled() has been replaced by SDL_BlitScaled(), which is
|
||||
* merely a macro for this function with a less confusing name.
|
||||
*
|
||||
* \sa SDL_BlitScaled
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
|
||||
(SDL_Surface * src, const SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* This is a semi-private blit function and it performs low-level surface
|
||||
* scaled blitting only.
|
||||
* Perform low-level surface scaled blitting only.
|
||||
*
|
||||
* This is a semi-private function and it performs low-level surface blitting,
|
||||
* assuming the input rectangles have already been clipped.
|
||||
*
|
||||
* \param src the SDL_Surface structure to be copied from
|
||||
* \param srcrect the SDL_Rect structure representing the rectangle to be
|
||||
* copied
|
||||
* \param dst the SDL_Surface structure that is the blit target
|
||||
* \param dstrect the SDL_Rect structure representing the rectangle that is
|
||||
* copied into
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \sa SDL_BlitScaled
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
||||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Set the YUV conversion mode
|
||||
* Set the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode
|
||||
* Get the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||
* Get the YUV conversion mode, returning the correct mode for the resolution
|
||||
* when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -43,41 +43,102 @@ extern "C" {
|
|||
/* Platform specific functions for Windows */
|
||||
#ifdef __WIN32__
|
||||
|
||||
/**
|
||||
\brief Set a function that is called for every windows message, before TranslateMessage()
|
||||
*/
|
||||
typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
|
||||
|
||||
/**
|
||||
* Set a callback for every Windows message, run before TranslateMessage().
|
||||
*
|
||||
* \param callback The SDL_WindowsMessageHook function to call.
|
||||
* \param userdata a pointer to pass to every iteration of `callback`
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
|
||||
|
||||
/**
|
||||
\brief Returns the D3D9 adapter index that matches the specified display index.
|
||||
|
||||
This adapter index can be passed to IDirect3D9::CreateDevice and controls
|
||||
on which monitor a full screen application will appear.
|
||||
*/
|
||||
* Get the D3D9 adapter index that matches the specified display index.
|
||||
*
|
||||
* The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
|
||||
* controls on which monitor a full screen application will appear.
|
||||
*
|
||||
* \param displayIndex the display index for which to get the D3D9 adapter
|
||||
* index
|
||||
* \returns the D3D9 adapter index on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
|
||||
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
/**
|
||||
\brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
||||
|
||||
Once you are done using the device, you should release it to avoid a resource leak.
|
||||
/**
|
||||
* Get the D3D9 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D device
|
||||
* \returns the D3D9 device associated with given renderer or NULL if it is
|
||||
* not a D3D9 renderer; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
\brief Returns the DXGI Adapter and Output indices for the specified display index.
|
||||
typedef struct ID3D11Device ID3D11Device;
|
||||
|
||||
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
||||
required to create a DX10 or DX11 device and swap chain.
|
||||
/**
|
||||
* Get the D3D11 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D11 device
|
||||
* \returns the D3D11 device associated with given renderer or NULL if it is
|
||||
* not a D3D11 renderer; call SDL_GetError() for more information.
|
||||
*/
|
||||
extern DECLSPEC ID3D11Device* SDLCALL SDL_RenderGetD3D11Device(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* Get the DXGI Adapter and Output indices for the specified display index.
|
||||
*
|
||||
* The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
|
||||
* `EnumOutputs` respectively to get the objects required to create a DX10 or
|
||||
* DX11 device and swap chain.
|
||||
*
|
||||
* Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it
|
||||
* returns an SDL_bool.
|
||||
*
|
||||
* \param displayIndex the display index for which to get both indices
|
||||
* \param adapterIndex a pointer to be filled in with the adapter index
|
||||
* \param outputIndex a pointer to be filled in with the output index
|
||||
* \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
|
||||
* for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
|
||||
/* Platform specific functions for Linux */
|
||||
#ifdef __LINUX__
|
||||
|
||||
/**
|
||||
* Sets the UNIX nice value for a thread.
|
||||
*
|
||||
* This uses setpriority() if possible, and RealtimeKit if available.
|
||||
*
|
||||
* \param threadID the Unix thread ID to change priority of.
|
||||
* \param priority The new, Unix-specific, priority value.
|
||||
* \returns 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
|
||||
|
||||
#endif /* __LINUX__ */
|
||||
|
||||
/* Platform specific functions for iOS */
|
||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||
#ifdef __IPHONEOS__
|
||||
|
||||
#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
|
||||
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
|
||||
|
@ -89,30 +150,104 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
|||
|
||||
|
||||
/* Platform specific functions for Android */
|
||||
#if defined(__ANDROID__) && __ANDROID__
|
||||
#ifdef __ANDROID__
|
||||
|
||||
/**
|
||||
\brief Get the JNI environment for the current thread
|
||||
|
||||
This returns JNIEnv*, but the prototype is void* so we don't need jni.h
|
||||
* Get the Android Java Native Interface Environment of the current thread.
|
||||
*
|
||||
* This is the JNIEnv one needs to access the Java virtual machine from native
|
||||
* code, and is needed for many Android APIs to be usable from C.
|
||||
*
|
||||
* The prototype of the function in SDL's code actually declare a void* return
|
||||
* type, even if the implementation returns a pointer to a JNIEnv. The
|
||||
* rationale being that the SDL headers can avoid including jni.h.
|
||||
*
|
||||
* \returns a pointer to Java native interface object (JNIEnv) to which the
|
||||
* current thread is attached, or 0 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AndroidGetActivity
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
|
||||
|
||||
/**
|
||||
\brief Get the SDL Activity object for the application
|
||||
|
||||
This returns jobject, but the prototype is void* so we don't need jni.h
|
||||
The jobject returned by SDL_AndroidGetActivity is a local reference.
|
||||
It is the caller's responsibility to properly release it
|
||||
(using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)
|
||||
* Retrieve the Java instance of the Android activity class.
|
||||
*
|
||||
* The prototype of the function in SDL's code actually declares a void*
|
||||
* return type, even if the implementation returns a jobject. The rationale
|
||||
* being that the SDL headers can avoid including jni.h.
|
||||
*
|
||||
* The jobject returned by the function is a local reference and must be
|
||||
* released by the caller. See the PushLocalFrame() and PopLocalFrame() or
|
||||
* DeleteLocalRef() functions of the Java native interface:
|
||||
*
|
||||
* https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
|
||||
*
|
||||
* \returns the jobject representing the instance of the Activity class of the
|
||||
* Android application, or NULL on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AndroidGetJNIEnv
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
||||
|
||||
/**
|
||||
\brief Return true if the application is running on Android TV
|
||||
* Query Android API level of the current device.
|
||||
*
|
||||
* - API level 30: Android 11
|
||||
* - API level 29: Android 10
|
||||
* - API level 28: Android 9
|
||||
* - API level 27: Android 8.1
|
||||
* - API level 26: Android 8.0
|
||||
* - API level 25: Android 7.1
|
||||
* - API level 24: Android 7.0
|
||||
* - API level 23: Android 6.0
|
||||
* - API level 22: Android 5.1
|
||||
* - API level 21: Android 5.0
|
||||
* - API level 20: Android 4.4W
|
||||
* - API level 19: Android 4.4
|
||||
* - API level 18: Android 4.3
|
||||
* - API level 17: Android 4.2
|
||||
* - API level 16: Android 4.1
|
||||
* - API level 15: Android 4.0.3
|
||||
* - API level 14: Android 4.0
|
||||
* - API level 13: Android 3.2
|
||||
* - API level 12: Android 3.1
|
||||
* - API level 11: Android 3.0
|
||||
* - API level 10: Android 2.3.3
|
||||
*
|
||||
* \returns the Android API level.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
|
||||
|
||||
/**
|
||||
* Query if the application is running on Android TV.
|
||||
*
|
||||
* \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
||||
|
||||
/**
|
||||
* Query if the application is running on a Chromebook.
|
||||
*
|
||||
* \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
|
||||
|
||||
/**
|
||||
* Query if the application is running on a Samsung DeX docking station.
|
||||
*
|
||||
* \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
|
||||
|
||||
/**
|
||||
* Trigger the Android system back button behavior.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
|
||||
|
||||
/**
|
||||
See the official Android developer guide for more information:
|
||||
http://developer.android.com/guide/topics/data/data-storage.html
|
||||
|
@ -121,34 +256,95 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
|||
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
||||
|
||||
/**
|
||||
\brief Get the path used for internal storage for this application.
|
||||
|
||||
This path is unique to your application and cannot be written to
|
||||
by other applications.
|
||||
* Get the path used for internal storage for this application.
|
||||
*
|
||||
* This path is unique to your application and cannot be written to by other
|
||||
* applications.
|
||||
*
|
||||
* Your internal storage path is typically:
|
||||
* `/data/data/your.app.package/files`.
|
||||
*
|
||||
* \returns the path used for internal storage or NULL on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AndroidGetExternalStorageState
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
|
||||
|
||||
/**
|
||||
\brief Get the current state of external storage, a bitmask of these values:
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_READ
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_WRITE
|
||||
|
||||
If external storage is currently unavailable, this will return 0.
|
||||
*/
|
||||
* Get the current state of external storage.
|
||||
*
|
||||
* The current state of external storage, a bitmask of these values:
|
||||
* `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
|
||||
*
|
||||
* If external storage is currently unavailable, this will return 0.
|
||||
*
|
||||
* \returns the current state of external storage on success or 0 on failure;
|
||||
* call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AndroidGetExternalStoragePath
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
|
||||
|
||||
/**
|
||||
\brief Get the path used for external storage for this application.
|
||||
|
||||
This path is unique to your application, but is public and can be
|
||||
written to by other applications.
|
||||
* Get the path used for external storage for this application.
|
||||
*
|
||||
* This path is unique to your application, but is public and can be written
|
||||
* to by other applications.
|
||||
*
|
||||
* Your external storage path is typically:
|
||||
* `/storage/sdcard0/Android/data/your.app.package/files`.
|
||||
*
|
||||
* \returns the path used for external storage for this application on success
|
||||
* or NULL on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AndroidGetExternalStorageState
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
|
||||
|
||||
/**
|
||||
* Request permissions at runtime.
|
||||
*
|
||||
* This blocks the calling thread until the permission is granted or denied.
|
||||
*
|
||||
* \param permission The permission to request.
|
||||
* \returns SDL_TRUE if the permission was granted, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AndroidRequestPermission(const char *permission);
|
||||
|
||||
/**
|
||||
* Shows an Android toast notification.
|
||||
*
|
||||
* Toasts are a sort of lightweight notification that are unique to Android.
|
||||
*
|
||||
* https://developer.android.com/guide/topics/ui/notifiers/toasts
|
||||
*
|
||||
* Shows toast in UI thread.
|
||||
*
|
||||
* For the `gravity` parameter, choose a value from here, or -1 if you don't
|
||||
* have a preference:
|
||||
*
|
||||
* https://developer.android.com/reference/android/view/Gravity
|
||||
*
|
||||
* \param message text message to be shown
|
||||
* \param duration 0=short, 1=long
|
||||
* \param gravity where the notification should appear on the screen.
|
||||
* \param xoffset set this parameter only when gravity >=0
|
||||
* \param yoffset set this parameter only when gravity >=0
|
||||
* \returns 0 if success, -1 if any error occurs.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
/* Platform specific functions for WinRT */
|
||||
#if defined(__WINRT__) && __WINRT__
|
||||
#ifdef __WINRT__
|
||||
|
||||
/**
|
||||
* \brief WinRT / Windows Phone path types
|
||||
|
@ -194,48 +390,80 @@ typedef enum
|
|||
|
||||
|
||||
/**
|
||||
* \brief Retrieves a WinRT defined path on the local file system
|
||||
* Retrieve a WinRT defined path on the local file system.
|
||||
*
|
||||
* \note Documentation on most app-specific path types on WinRT
|
||||
* can be found on MSDN, at the URL:
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
* Not all paths are available on all versions of Windows. This is especially
|
||||
* true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
|
||||
* for more information on which path types are supported where.
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \return A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
* SDL_WinRT_Path for more information on which path types are
|
||||
* supported where.
|
||||
* Documentation on most app-specific path types on WinRT can be found on
|
||||
* MSDN, at the URL:
|
||||
*
|
||||
* https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType the type of path to retrieve, one of SDL_WinRT_Path
|
||||
* \returns a UCS-2 string (16-bit, wide-char) containing the path, or NULL if
|
||||
* the path is not available for any reason; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.3.
|
||||
*
|
||||
* \sa SDL_WinRTGetFSPathUTF8
|
||||
*/
|
||||
extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);
|
||||
|
||||
/**
|
||||
* \brief Retrieves a WinRT defined path on the local file system
|
||||
* Retrieve a WinRT defined path on the local file system.
|
||||
*
|
||||
* \note Documentation on most app-specific path types on WinRT
|
||||
* can be found on MSDN, at the URL:
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
* Not all paths are available on all versions of Windows. This is especially
|
||||
* true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
|
||||
* for more information on which path types are supported where.
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
* SDL_WinRT_Path for more information on which path types are
|
||||
* supported where.
|
||||
* Documentation on most app-specific path types on WinRT can be found on
|
||||
* MSDN, at the URL:
|
||||
*
|
||||
* https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType the type of path to retrieve, one of SDL_WinRT_Path
|
||||
* \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
|
||||
* the path is not available for any reason; call SDL_GetError() for
|
||||
* more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.3.
|
||||
*
|
||||
* \sa SDL_WinRTGetFSPathUNICODE
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||
|
||||
/**
|
||||
* \brief Detects the device family of WinRT plattform on runtime
|
||||
* Detects the device family of WinRT plattform at runtime.
|
||||
*
|
||||
* \return Device family
|
||||
* \returns a value from the SDL_WinRT_DeviceFamily enum.
|
||||
*/
|
||||
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
/**
|
||||
* Query if the current device is a tablet.
|
||||
*
|
||||
* If SDL can't determine this, it will return SDL_FALSE.
|
||||
*
|
||||
* \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
|
||||
|
||||
/* Functions used by iOS application delegates to notify SDL about state changes */
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
|
||||
#ifdef __IPHONEOS__
|
||||
extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
|
||||
#endif
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -33,28 +33,25 @@
|
|||
#include "SDL_video.h"
|
||||
#include "SDL_version.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_syswm.h
|
||||
* \brief SDL_syswm.h
|
||||
*
|
||||
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
|
||||
* which contains window-manager specific information and arrives whenever
|
||||
* an unhandled window event occurs. This event is ignored by default, but
|
||||
* you can enable it with SDL_EventState().
|
||||
*/
|
||||
#ifdef SDL_PROTOTYPES_ONLY
|
||||
struct SDL_SysWMinfo;
|
||||
#else
|
||||
|
||||
#if !defined(SDL_PROTOTYPES_ONLY)
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#ifndef NOMINMAX /* don't define min() and max(). */
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -110,6 +107,24 @@ typedef void *EGLSurface;
|
|||
#include "SDL_egl.h"
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
#define INCL_WIN
|
||||
#include <os2.h>
|
||||
#endif
|
||||
#endif /* SDL_PROTOTYPES_ONLY */
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_KMSDRM)
|
||||
struct gbm_device;
|
||||
#endif
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(SDL_PROTOTYPES_ONLY)
|
||||
/**
|
||||
* These are the various supported windowing subsystems
|
||||
*/
|
||||
|
@ -122,11 +137,13 @@ typedef enum
|
|||
SDL_SYSWM_COCOA,
|
||||
SDL_SYSWM_UIKIT,
|
||||
SDL_SYSWM_WAYLAND,
|
||||
SDL_SYSWM_MIR,
|
||||
SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
|
||||
SDL_SYSWM_WINRT,
|
||||
SDL_SYSWM_ANDROID,
|
||||
SDL_SYSWM_VIVANTE,
|
||||
SDL_SYSWM_OS2
|
||||
SDL_SYSWM_OS2,
|
||||
SDL_SYSWM_HAIKU,
|
||||
SDL_SYSWM_KMSDRM
|
||||
} SDL_SYSWM_TYPE;
|
||||
|
||||
/**
|
||||
|
@ -179,6 +196,16 @@ struct SDL_SysWMmsg
|
|||
int dummy;
|
||||
/* No Vivante window events yet */
|
||||
} vivante;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
struct
|
||||
{
|
||||
BOOL fFrame; /**< TRUE if hwnd is a frame window */
|
||||
HWND hwnd; /**< The window receiving the message */
|
||||
ULONG msg; /**< The message identifier */
|
||||
MPARAM mp1; /**< The first first message parameter */
|
||||
MPARAM mp2; /**< The second first message parameter */
|
||||
} os2;
|
||||
#endif
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
|
@ -229,8 +256,12 @@ struct SDL_SysWMinfo
|
|||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
struct
|
||||
{
|
||||
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||
#if defined(__OBJC__) && defined(__has_feature)
|
||||
#if __has_feature(objc_arc)
|
||||
NSWindow __unsafe_unretained *window; /**< The Cocoa window */
|
||||
#else
|
||||
NSWindow *window; /**< The Cocoa window */
|
||||
#endif
|
||||
#else
|
||||
NSWindow *window; /**< The Cocoa window */
|
||||
#endif
|
||||
|
@ -239,8 +270,12 @@ struct SDL_SysWMinfo
|
|||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
struct
|
||||
{
|
||||
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||
#if defined(__OBJC__) && defined(__has_feature)
|
||||
#if __has_feature(objc_arc)
|
||||
UIWindow __unsafe_unretained *window; /**< The UIKit window */
|
||||
#else
|
||||
UIWindow *window; /**< The UIKit window */
|
||||
#endif
|
||||
#else
|
||||
UIWindow *window; /**< The UIKit window */
|
||||
#endif
|
||||
|
@ -252,16 +287,18 @@ struct SDL_SysWMinfo
|
|||
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||
struct
|
||||
{
|
||||
struct wl_display *display; /**< Wayland display */
|
||||
struct wl_surface *surface; /**< Wayland surface */
|
||||
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
|
||||
struct wl_display *display; /**< Wayland display */
|
||||
struct wl_surface *surface; /**< Wayland surface */
|
||||
void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */
|
||||
struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
|
||||
struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
|
||||
} wl;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
|
||||
struct
|
||||
{
|
||||
struct MirConnection *connection; /**< Mir display server connection */
|
||||
struct MirSurface *surface; /**< Mir surface */
|
||||
void *connection; /**< Mir display server connection */
|
||||
void *surface; /**< Mir surface */
|
||||
} mir;
|
||||
#endif
|
||||
|
||||
|
@ -273,6 +310,14 @@ struct SDL_SysWMinfo
|
|||
} android;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_OS2)
|
||||
struct
|
||||
{
|
||||
HWND hwnd; /**< The window handle */
|
||||
HWND hwndFrame; /**< The frame window handle */
|
||||
} os2;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
struct
|
||||
{
|
||||
|
@ -281,6 +326,15 @@ struct SDL_SysWMinfo
|
|||
} vivante;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_KMSDRM)
|
||||
struct
|
||||
{
|
||||
int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */
|
||||
int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */
|
||||
struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */
|
||||
} kmsdrm;
|
||||
#endif
|
||||
|
||||
/* Make sure this union is always 64 bytes (8 64-bit pointers). */
|
||||
/* Be careful not to overflow this if you add a new target! */
|
||||
Uint8 dummy[64];
|
||||
|
@ -291,23 +345,23 @@ struct SDL_SysWMinfo
|
|||
|
||||
typedef struct SDL_SysWMinfo SDL_SysWMinfo;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief This function allows access to driver-dependent window information.
|
||||
* Get driver-specific information about a window.
|
||||
*
|
||||
* \param window The window about which information is being requested
|
||||
* \param info This structure must be initialized with the SDL version, and is
|
||||
* then filled in with information about the given window.
|
||||
* You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.
|
||||
*
|
||||
* \return SDL_TRUE if the function is implemented and the version member of
|
||||
* the \c info struct is valid, SDL_FALSE otherwise.
|
||||
* The caller must initialize the `info` structure's version by using
|
||||
* `SDL_VERSION(&info.version)`, and then this function will fill in the rest
|
||||
* of the structure with information about the given window.
|
||||
*
|
||||
* You typically use this function like this:
|
||||
* \code
|
||||
* SDL_SysWMinfo info;
|
||||
* SDL_VERSION(&info.version);
|
||||
* if ( SDL_GetWindowWMInfo(window, &info) ) { ... }
|
||||
* \endcode
|
||||
* \param window the window about which information is being requested
|
||||
* \param info an SDL_SysWMinfo structure filled in with window information
|
||||
* \returns SDL_TRUE if the function is implemented and the `version` member
|
||||
* of the `info` struct is valid, or SDL_FALSE if the information
|
||||
* could not be retrieved; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
|
||||
SDL_SysWMinfo * info);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -37,6 +37,9 @@
|
|||
#if defined(__PSP__)
|
||||
#define DEFAULT_WINDOW_WIDTH 480
|
||||
#define DEFAULT_WINDOW_HEIGHT 272
|
||||
#elif defined(__VITA__)
|
||||
#define DEFAULT_WINDOW_WIDTH 960
|
||||
#define DEFAULT_WINDOW_HEIGHT 544
|
||||
#else
|
||||
#define DEFAULT_WINDOW_WIDTH 640
|
||||
#define DEFAULT_WINDOW_HEIGHT 480
|
||||
|
@ -61,6 +64,7 @@ typedef struct
|
|||
const char *window_title;
|
||||
const char *window_icon;
|
||||
Uint32 window_flags;
|
||||
SDL_bool flash_on_focus_loss;
|
||||
int window_x;
|
||||
int window_y;
|
||||
int window_w;
|
||||
|
@ -126,7 +130,7 @@ extern "C" {
|
|||
* \param argv Array of command line parameters
|
||||
* \param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)
|
||||
*
|
||||
* \returns Returns a newly allocated common state object.
|
||||
* \returns a newly allocated common state object.
|
||||
*/
|
||||
SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
|
||||
|
||||
|
@ -136,16 +140,35 @@ SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
|
|||
* \param state The common state describing the test window to create.
|
||||
* \param index The index of the argument to process in argv[].
|
||||
*
|
||||
* \returns The number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.
|
||||
* \returns the number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.
|
||||
*/
|
||||
int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Logs command line usage info.
|
||||
*
|
||||
* This logs the appropriate command line options for the subsystems in use
|
||||
* plus other common options, and then any application-specific options.
|
||||
* This uses the SDL_Log() function and splits up output to be friendly to
|
||||
* 80-character-wide terminals.
|
||||
*
|
||||
* \param state The common state describing the test window for the app.
|
||||
* \param argv0 argv[0], as passed to main/SDL_main.
|
||||
* \param options an array of strings for application specific options. The last element of the array should be NULL.
|
||||
*/
|
||||
void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
|
||||
|
||||
/**
|
||||
* \brief Returns common usage information
|
||||
*
|
||||
* \param state The common state describing the test window to create.
|
||||
* You should (probably) be using SDLTest_CommonLogUsage() instead, but this
|
||||
* function remains for binary compatibility. Strings returned from this
|
||||
* function are valid until SDLTest_CommonQuit() is called, in which case
|
||||
* those strings' memory is freed and can no longer be used.
|
||||
*
|
||||
* \returns String with usage information
|
||||
* \param state The common state describing the test window to create.
|
||||
* \returns a string with usage information
|
||||
*/
|
||||
const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
|
||||
|
||||
|
@ -154,10 +177,21 @@ const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
|
|||
*
|
||||
* \param state The common state describing the test window to create.
|
||||
*
|
||||
* \returns True if initialization succeeded, false otherwise
|
||||
* \returns SDL_TRUE if initialization succeeded, false otherwise
|
||||
*/
|
||||
SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
|
||||
|
||||
/**
|
||||
* \brief Easy argument handling when test app doesn't need any custom args.
|
||||
*
|
||||
* \param state The common state describing the test window to create.
|
||||
* \param argc argc, as supplied to SDL_main
|
||||
* \param argv argv, as supplied to SDL_main
|
||||
*
|
||||
* \returns SDL_FALSE if app should quit, true otherwise.
|
||||
*/
|
||||
SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
|
||||
|
||||
/**
|
||||
* \brief Common event handler for test windows.
|
||||
*
|
||||
|
@ -176,6 +210,14 @@ void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *do
|
|||
*/
|
||||
void SDLTest_CommonQuit(SDLTest_CommonState * state);
|
||||
|
||||
/**
|
||||
* \brief Draws various window information (position, size, etc.) to the renderer.
|
||||
*
|
||||
* \param renderer The renderer to draw to.
|
||||
* \param window The window whose information should be displayed.
|
||||
*
|
||||
*/
|
||||
void SDLTest_CommonDrawWindowInfo(SDL_Renderer * renderer, SDL_Window * window);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -42,14 +42,14 @@ extern "C" {
|
|||
*
|
||||
* \note This should be called before any other SDL functions for complete tracking coverage
|
||||
*/
|
||||
int SDLTest_TrackAllocations();
|
||||
int SDLTest_TrackAllocations(void);
|
||||
|
||||
/**
|
||||
* \brief Print a log of any outstanding allocations
|
||||
*
|
||||
* \note This can be called after SDL_Quit()
|
||||
*/
|
||||
void SDLTest_LogAllocations();
|
||||
void SDLTest_LogAllocations(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -35,6 +35,17 @@
|
|||
#include "SDL_atomic.h"
|
||||
#include "SDL_mutex.h"
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include <process.h> /* _beginthreadex() and _endthreadex() */
|
||||
#endif
|
||||
#if defined(__OS2__) /* for _beginthread() and _endthread() */
|
||||
#ifndef __EMX__
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
@ -54,21 +65,30 @@ typedef unsigned int SDL_TLSID;
|
|||
/**
|
||||
* The SDL thread priority.
|
||||
*
|
||||
* \note On many systems you require special privileges to set high priority.
|
||||
* SDL will make system changes as necessary in order to apply the thread priority.
|
||||
* Code which attempts to control thread state related to priority should be aware
|
||||
* that calling SDL_SetThreadPriority may alter such state.
|
||||
* SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of this behavior.
|
||||
*
|
||||
* \note On many systems you require special privileges to set high or time critical priority.
|
||||
*/
|
||||
typedef enum {
|
||||
SDL_THREAD_PRIORITY_LOW,
|
||||
SDL_THREAD_PRIORITY_NORMAL,
|
||||
SDL_THREAD_PRIORITY_HIGH
|
||||
SDL_THREAD_PRIORITY_HIGH,
|
||||
SDL_THREAD_PRIORITY_TIME_CRITICAL
|
||||
} SDL_ThreadPriority;
|
||||
|
||||
/**
|
||||
* The function passed to SDL_CreateThread().
|
||||
* It is passed a void* user context parameter and returns an int.
|
||||
* The function passed to SDL_CreateThread().
|
||||
*
|
||||
* \param data what was passed as `data` to SDL_CreateThread()
|
||||
* \returns a value that can be reported through SDL_WaitThread().
|
||||
*/
|
||||
typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
||||
|
||||
#if defined(__WIN32__) && !defined(HAVE_LIBC)
|
||||
|
||||
#if defined(__WIN32__)
|
||||
/**
|
||||
* \file SDL_thread.h
|
||||
*
|
||||
|
@ -90,13 +110,19 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
|||
* library!
|
||||
*/
|
||||
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
#include <process.h> /* _beginthreadex() and _endthreadex() */
|
||||
|
||||
typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)
|
||||
typedef uintptr_t (__cdecl * pfnSDL_CurrentBeginThread)
|
||||
(void *, unsigned, unsigned (__stdcall *func)(void *),
|
||||
void * /*arg*/, unsigned, unsigned * /* threadID */);
|
||||
typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
|
||||
|
||||
#ifndef SDL_beginthread
|
||||
#define SDL_beginthread _beginthreadex
|
||||
#endif
|
||||
#ifndef SDL_endthread
|
||||
#define SDL_endthread _endthreadex
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Create a thread.
|
||||
*/
|
||||
|
@ -105,14 +131,24 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
|||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
|
||||
const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
|
||||
|
||||
/**
|
||||
* Create a thread.
|
||||
*/
|
||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||
#undef SDL_CreateThread
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#undef SDL_CreateThreadWithStackSize
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#else
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#endif
|
||||
|
||||
#elif defined(__OS2__)
|
||||
|
@ -121,181 +157,291 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
|||
* into a dll with Watcom's runtime statically linked.
|
||||
*/
|
||||
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
#ifndef __EMX__
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
|
||||
typedef void (*pfnSDL_CurrentEndThread)(void);
|
||||
|
||||
#ifndef SDL_beginthread
|
||||
#define SDL_beginthread _beginthread
|
||||
#endif
|
||||
#ifndef SDL_endthread
|
||||
#define SDL_endthread _endthread
|
||||
#endif
|
||||
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
|
||||
pfnSDL_CurrentBeginThread pfnBeginThread,
|
||||
pfnSDL_CurrentEndThread pfnEndThread);
|
||||
|
||||
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
|
||||
#undef SDL_CreateThread
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#undef SDL_CreateThreadWithStackSize
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#else
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
|
||||
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* Create a thread.
|
||||
* Create a new thread with a default stack size.
|
||||
*
|
||||
* Thread naming is a little complicated: Most systems have very small
|
||||
* limits for the string length (Haiku has 32 bytes, Linux currently has 16,
|
||||
* Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll
|
||||
* have to see what happens with your system's debugger. The name should be
|
||||
* UTF-8 (but using the naming limits of C identifiers is a better bet).
|
||||
* There are no requirements for thread naming conventions, so long as the
|
||||
* string is null-terminated UTF-8, but these guidelines are helpful in
|
||||
* choosing a name:
|
||||
* This is equivalent to calling:
|
||||
*
|
||||
* http://stackoverflow.com/questions/149932/naming-conventions-for-threads
|
||||
* ```c
|
||||
* SDL_CreateThreadWithStackSize(fn, name, 0, data);
|
||||
* ```
|
||||
*
|
||||
* If a system imposes requirements, SDL will try to munge the string for
|
||||
* it (truncate, etc), but the original string contents will be available
|
||||
* from SDL_GetThreadName().
|
||||
* \param fn the SDL_ThreadFunction function to call in the new thread
|
||||
* \param name the name of the thread
|
||||
* \param data a pointer that is passed to `fn`
|
||||
* \returns an opaque pointer to the new thread object on success, NULL if the
|
||||
* new thread could not be created; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_CreateThreadWithStackSize
|
||||
* \sa SDL_WaitThread
|
||||
*/
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
||||
|
||||
/**
|
||||
* Create a new thread with a specific stack size.
|
||||
*
|
||||
* SDL makes an attempt to report `name` to the system, so that debuggers can
|
||||
* display it. Not all platforms support this.
|
||||
*
|
||||
* Thread naming is a little complicated: Most systems have very small limits
|
||||
* for the string length (Haiku has 32 bytes, Linux currently has 16, Visual
|
||||
* C++ 6.0 has _nine_!), and possibly other arbitrary rules. You'll have to
|
||||
* see what happens with your system's debugger. The name should be UTF-8 (but
|
||||
* using the naming limits of C identifiers is a better bet). There are no
|
||||
* requirements for thread naming conventions, so long as the string is
|
||||
* null-terminated UTF-8, but these guidelines are helpful in choosing a name:
|
||||
*
|
||||
* https://stackoverflow.com/questions/149932/naming-conventions-for-threads
|
||||
*
|
||||
* If a system imposes requirements, SDL will try to munge the string for it
|
||||
* (truncate, etc), but the original string contents will be available from
|
||||
* SDL_GetThreadName().
|
||||
*
|
||||
* The size (in bytes) of the new stack can be specified. Zero means "use the
|
||||
* system default" which might be wildly different between platforms. x86
|
||||
* Linux generally defaults to eight megabytes, an embedded device might be a
|
||||
* few kilobytes instead. You generally need to specify a stack that is a
|
||||
* multiple of the system's page size (in many cases, this is 4 kilobytes, but
|
||||
* check your system documentation).
|
||||
*
|
||||
* In SDL 2.1, stack size will be folded into the original SDL_CreateThread
|
||||
* function, but for backwards compatibility, this is currently a separate
|
||||
* function.
|
||||
*
|
||||
* \param fn the SDL_ThreadFunction function to call in the new thread
|
||||
* \param name the name of the thread
|
||||
* \param stacksize the size, in bytes, to allocate for the new thread stack.
|
||||
* \param data a pointer that is passed to `fn`
|
||||
* \returns an opaque pointer to the new thread object on success, NULL if the
|
||||
* new thread could not be created; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \sa SDL_WaitThread
|
||||
*/
|
||||
extern DECLSPEC SDL_Thread *SDLCALL
|
||||
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the thread name, as it was specified in SDL_CreateThread().
|
||||
* This function returns a pointer to a UTF-8 string that names the
|
||||
* specified thread, or NULL if it doesn't have a name. This is internal
|
||||
* memory, not to be free()'d by the caller, and remains valid until the
|
||||
* specified thread is cleaned up by SDL_WaitThread().
|
||||
* Get the thread name as it was specified in SDL_CreateThread().
|
||||
*
|
||||
* This is internal memory, not to be freed by the caller, and remains valid
|
||||
* until the specified thread is cleaned up by SDL_WaitThread().
|
||||
*
|
||||
* \param thread the thread to query
|
||||
* \returns a pointer to a UTF-8 string that names the specified thread, or
|
||||
* NULL if it doesn't have a name.
|
||||
*
|
||||
* \sa SDL_CreateThread
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
|
||||
|
||||
/**
|
||||
* Get the thread identifier for the current thread.
|
||||
* Get the thread identifier for the current thread.
|
||||
*
|
||||
* This thread identifier is as reported by the underlying operating system.
|
||||
* If SDL is running on a platform that does not support threads the return
|
||||
* value will always be zero.
|
||||
*
|
||||
* This function also returns a valid thread ID when called from the main
|
||||
* thread.
|
||||
*
|
||||
* \returns the ID of the current thread.
|
||||
*
|
||||
* \sa SDL_GetThreadID
|
||||
*/
|
||||
extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
|
||||
|
||||
/**
|
||||
* Get the thread identifier for the specified thread.
|
||||
* Get the thread identifier for the specified thread.
|
||||
*
|
||||
* Equivalent to SDL_ThreadID() if the specified thread is NULL.
|
||||
* This thread identifier is as reported by the underlying operating system.
|
||||
* If SDL is running on a platform that does not support threads the return
|
||||
* value will always be zero.
|
||||
*
|
||||
* \param thread the thread to query
|
||||
* \returns the ID of the specified thread, or the ID of the current thread if
|
||||
* `thread` is NULL.
|
||||
*
|
||||
* \sa SDL_ThreadID
|
||||
*/
|
||||
extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
|
||||
|
||||
/**
|
||||
* Set the priority for the current thread
|
||||
* Set the priority for the current thread.
|
||||
*
|
||||
* Note that some platforms will not let you alter the priority (or at least,
|
||||
* promote the thread to a higher priority) at all, and some require you to be
|
||||
* an administrator account. Be prepared for this to fail.
|
||||
*
|
||||
* \param priority the SDL_ThreadPriority to set
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||
|
||||
/**
|
||||
* Wait for a thread to finish. Threads that haven't been detached will
|
||||
* remain (as a "zombie") until this function cleans them up. Not doing so
|
||||
* is a resource leak.
|
||||
* Wait for a thread to finish.
|
||||
*
|
||||
* Once a thread has been cleaned up through this function, the SDL_Thread
|
||||
* that references it becomes invalid and should not be referenced again.
|
||||
* As such, only one thread may call SDL_WaitThread() on another.
|
||||
* Threads that haven't been detached will remain (as a "zombie") until this
|
||||
* function cleans them up. Not doing so is a resource leak.
|
||||
*
|
||||
* The return code for the thread function is placed in the area
|
||||
* pointed to by \c status, if \c status is not NULL.
|
||||
* Once a thread has been cleaned up through this function, the SDL_Thread
|
||||
* that references it becomes invalid and should not be referenced again. As
|
||||
* such, only one thread may call SDL_WaitThread() on another.
|
||||
*
|
||||
* You may not wait on a thread that has been used in a call to
|
||||
* SDL_DetachThread(). Use either that function or this one, but not
|
||||
* both, or behavior is undefined.
|
||||
* The return code for the thread function is placed in the area pointed to by
|
||||
* `status`, if `status` is not NULL.
|
||||
*
|
||||
* It is safe to pass NULL to this function; it is a no-op.
|
||||
* You may not wait on a thread that has been used in a call to
|
||||
* SDL_DetachThread(). Use either that function or this one, but not both, or
|
||||
* behavior is undefined.
|
||||
*
|
||||
* It is safe to pass a NULL thread to this function; it is a no-op.
|
||||
*
|
||||
* Note that the thread pointer is freed by this function and is not valid
|
||||
* afterward.
|
||||
*
|
||||
* \param thread the SDL_Thread pointer that was returned from the
|
||||
* SDL_CreateThread() call that started this thread
|
||||
* \param status pointer to an integer that will receive the value returned
|
||||
* from the thread function by its 'return', or NULL to not
|
||||
* receive such value back.
|
||||
*
|
||||
* \sa SDL_CreateThread
|
||||
* \sa SDL_DetachThread
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);
|
||||
|
||||
/**
|
||||
* A thread may be "detached" to signify that it should not remain until
|
||||
* another thread has called SDL_WaitThread() on it. Detaching a thread
|
||||
* is useful for long-running threads that nothing needs to synchronize
|
||||
* with or further manage. When a detached thread is done, it simply
|
||||
* goes away.
|
||||
* Let a thread clean up on exit without intervention.
|
||||
*
|
||||
* There is no way to recover the return code of a detached thread. If you
|
||||
* need this, don't detach the thread and instead use SDL_WaitThread().
|
||||
* A thread may be "detached" to signify that it should not remain until
|
||||
* another thread has called SDL_WaitThread() on it. Detaching a thread is
|
||||
* useful for long-running threads that nothing needs to synchronize with or
|
||||
* further manage. When a detached thread is done, it simply goes away.
|
||||
*
|
||||
* Once a thread is detached, you should usually assume the SDL_Thread isn't
|
||||
* safe to reference again, as it will become invalid immediately upon
|
||||
* the detached thread's exit, instead of remaining until someone has called
|
||||
* SDL_WaitThread() to finally clean it up. As such, don't detach the same
|
||||
* thread more than once.
|
||||
* There is no way to recover the return code of a detached thread. If you
|
||||
* need this, don't detach the thread and instead use SDL_WaitThread().
|
||||
*
|
||||
* If a thread has already exited when passed to SDL_DetachThread(), it will
|
||||
* stop waiting for a call to SDL_WaitThread() and clean up immediately.
|
||||
* It is not safe to detach a thread that might be used with SDL_WaitThread().
|
||||
* Once a thread is detached, you should usually assume the SDL_Thread isn't
|
||||
* safe to reference again, as it will become invalid immediately upon the
|
||||
* detached thread's exit, instead of remaining until someone has called
|
||||
* SDL_WaitThread() to finally clean it up. As such, don't detach the same
|
||||
* thread more than once.
|
||||
*
|
||||
* You may not call SDL_WaitThread() on a thread that has been detached.
|
||||
* Use either that function or this one, but not both, or behavior is
|
||||
* undefined.
|
||||
* If a thread has already exited when passed to SDL_DetachThread(), it will
|
||||
* stop waiting for a call to SDL_WaitThread() and clean up immediately. It is
|
||||
* not safe to detach a thread that might be used with SDL_WaitThread().
|
||||
*
|
||||
* It is safe to pass NULL to this function; it is a no-op.
|
||||
* You may not call SDL_WaitThread() on a thread that has been detached. Use
|
||||
* either that function or this one, but not both, or behavior is undefined.
|
||||
*
|
||||
* It is safe to pass NULL to this function; it is a no-op.
|
||||
*
|
||||
* \param thread the SDL_Thread pointer that was returned from the
|
||||
* SDL_CreateThread() call that started this thread
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_CreateThread
|
||||
* \sa SDL_WaitThread
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
|
||||
|
||||
/**
|
||||
* \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
|
||||
* Create a piece of thread-local storage.
|
||||
*
|
||||
* \return The newly created thread local storage identifier, or 0 on error
|
||||
* This creates an identifier that is globally visible to all threads but
|
||||
* refers to data that is thread-specific.
|
||||
*
|
||||
* \code
|
||||
* static SDL_SpinLock tls_lock;
|
||||
* static SDL_TLSID thread_local_storage;
|
||||
*
|
||||
* void SetMyThreadData(void *value)
|
||||
* {
|
||||
* if (!thread_local_storage) {
|
||||
* SDL_AtomicLock(&tls_lock);
|
||||
* if (!thread_local_storage) {
|
||||
* thread_local_storage = SDL_TLSCreate();
|
||||
* }
|
||||
* SDL_AtomicUnlock(&tls_lock);
|
||||
* }
|
||||
* SDL_TLSSet(thread_local_storage, value, 0);
|
||||
* }
|
||||
*
|
||||
* void *GetMyThreadData(void)
|
||||
* {
|
||||
* return SDL_TLSGet(thread_local_storage);
|
||||
* }
|
||||
* \endcode
|
||||
* \returns the newly created thread local storage identifier or 0 on error.
|
||||
*
|
||||
* \sa SDL_TLSGet()
|
||||
* \sa SDL_TLSSet()
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_TLSGet
|
||||
* \sa SDL_TLSSet
|
||||
*/
|
||||
extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
|
||||
|
||||
/**
|
||||
* \brief Get the value associated with a thread local storage ID for the current thread.
|
||||
* Get the current thread's value associated with a thread local storage ID.
|
||||
*
|
||||
* \param id The thread local storage ID
|
||||
* \param id the thread local storage ID
|
||||
* \returns the value associated with the ID for the current thread or NULL if
|
||||
* no value has been set; call SDL_GetError() for more information.
|
||||
*
|
||||
* \return The value associated with the ID for the current thread, or NULL if no value has been set.
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_TLSCreate()
|
||||
* \sa SDL_TLSSet()
|
||||
* \sa SDL_TLSCreate
|
||||
* \sa SDL_TLSSet
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
|
||||
|
||||
/**
|
||||
* \brief Set the value associated with a thread local storage ID for the current thread.
|
||||
* Set the current thread's value associated with a thread local storage ID.
|
||||
*
|
||||
* \param id The thread local storage ID
|
||||
* \param value The value to associate with the ID for the current thread
|
||||
* \param destructor A function called when the thread exits, to free the value.
|
||||
* The function prototype for `destructor` is:
|
||||
*
|
||||
* \return 0 on success, -1 on error
|
||||
* ```c
|
||||
* void destructor(void *value)
|
||||
* ```
|
||||
*
|
||||
* \sa SDL_TLSCreate()
|
||||
* \sa SDL_TLSGet()
|
||||
* where its parameter `value` is what was passed as `value` to SDL_TLSSet().
|
||||
*
|
||||
* \param id the thread local storage ID
|
||||
* \param value the value to associate with the ID for the current thread
|
||||
* \param destructor a function called when the thread exits, to free the
|
||||
* value
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_TLSCreate
|
||||
* \sa SDL_TLSGet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
|
||||
|
||||
/**
|
||||
* Cleanup all TLS data for this thread.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_TLSCleanup(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -41,6 +41,14 @@ extern "C" {
|
|||
typedef Sint64 SDL_TouchID;
|
||||
typedef Sint64 SDL_FingerID;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_TOUCH_DEVICE_INVALID = -1,
|
||||
SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
|
||||
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
|
||||
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
|
||||
} SDL_TouchDeviceType;
|
||||
|
||||
typedef struct SDL_Finger
|
||||
{
|
||||
SDL_FingerID id;
|
||||
|
@ -52,6 +60,9 @@ typedef struct SDL_Finger
|
|||
/* Used as the device ID for mouse events simulated with touch input */
|
||||
#define SDL_TOUCH_MOUSEID ((Uint32)-1)
|
||||
|
||||
/* Used as the SDL_TouchID for touch events simulated with mouse input */
|
||||
#define SDL_MOUSE_TOUCHID ((Sint64)-1)
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
|
@ -65,6 +76,11 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
|
||||
|
||||
/**
|
||||
* \brief Get the type of the given touch device.
|
||||
*/
|
||||
extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
|
||||
|
||||
/**
|
||||
* \brief Get the number of active fingers for a given touch device.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -37,16 +37,16 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/**
|
||||
* \brief Information the version of SDL in use.
|
||||
* Information about the version of SDL in use.
|
||||
*
|
||||
* Represents the library's version as three levels: major revision
|
||||
* (increments with massive changes, additions, and enhancements),
|
||||
* minor revision (increments with backwards-compatible changes to the
|
||||
* major revision), and patchlevel (increments with fixes to the minor
|
||||
* revision).
|
||||
* Represents the library's version as three levels: major revision
|
||||
* (increments with massive changes, additions, and enhancements),
|
||||
* minor revision (increments with backwards-compatible changes to the
|
||||
* major revision), and patchlevel (increments with fixes to the minor
|
||||
* revision).
|
||||
*
|
||||
* \sa SDL_VERSION
|
||||
* \sa SDL_GetVersion
|
||||
* \sa SDL_VERSION
|
||||
* \sa SDL_GetVersion
|
||||
*/
|
||||
typedef struct SDL_version
|
||||
{
|
||||
|
@ -59,22 +59,22 @@ typedef struct SDL_version
|
|||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 8
|
||||
#define SDL_PATCHLEVEL 16
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
* Macro to determine SDL version program was compiled against.
|
||||
*
|
||||
* This macro fills in a SDL_version structure with the version of the
|
||||
* library you compiled against. This is determined by what header the
|
||||
* compiler uses. Note that if you dynamically linked the library, you might
|
||||
* have a slightly newer or older version at runtime. That version can be
|
||||
* determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
|
||||
* is not a macro.
|
||||
* This macro fills in a SDL_version structure with the version of the
|
||||
* library you compiled against. This is determined by what header the
|
||||
* compiler uses. Note that if you dynamically linked the library, you might
|
||||
* have a slightly newer or older version at runtime. That version can be
|
||||
* determined with SDL_GetVersion(), which, unlike SDL_VERSION(),
|
||||
* is not a macro.
|
||||
*
|
||||
* \param x A pointer to a SDL_version struct to initialize.
|
||||
* \param x A pointer to a SDL_version struct to initialize.
|
||||
*
|
||||
* \sa SDL_version
|
||||
* \sa SDL_GetVersion
|
||||
* \sa SDL_version
|
||||
* \sa SDL_GetVersion
|
||||
*/
|
||||
#define SDL_VERSION(x) \
|
||||
{ \
|
||||
|
@ -107,48 +107,58 @@ typedef struct SDL_version
|
|||
(SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
|
||||
|
||||
/**
|
||||
* \brief Get the version of SDL that is linked against your program.
|
||||
* Get the version of SDL that is linked against your program.
|
||||
*
|
||||
* If you are linking to SDL dynamically, then it is possible that the
|
||||
* current version will be different than the version you compiled against.
|
||||
* This function returns the current version, while SDL_VERSION() is a
|
||||
* macro that tells you what version you compiled with.
|
||||
* If you are linking to SDL dynamically, then it is possible that the current
|
||||
* version will be different than the version you compiled against. This
|
||||
* function returns the current version, while SDL_VERSION() is a macro that
|
||||
* tells you what version you compiled with.
|
||||
*
|
||||
* \code
|
||||
* SDL_version compiled;
|
||||
* SDL_version linked;
|
||||
* This function may be called safely at any time, even before SDL_Init().
|
||||
*
|
||||
* SDL_VERSION(&compiled);
|
||||
* SDL_GetVersion(&linked);
|
||||
* printf("We compiled against SDL version %d.%d.%d ...\n",
|
||||
* compiled.major, compiled.minor, compiled.patch);
|
||||
* printf("But we linked against SDL version %d.%d.%d.\n",
|
||||
* linked.major, linked.minor, linked.patch);
|
||||
* \endcode
|
||||
* \param ver the SDL_version structure that contains the version information
|
||||
*
|
||||
* This function may be called safely at any time, even before SDL_Init().
|
||||
*
|
||||
* \sa SDL_VERSION
|
||||
* \sa SDL_GetRevision
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
|
||||
|
||||
/**
|
||||
* \brief Get the code revision of SDL that is linked against your program.
|
||||
* Get the code revision of SDL that is linked against your program.
|
||||
*
|
||||
* Returns an arbitrary string (a hash value) uniquely identifying the
|
||||
* exact revision of the SDL library in use, and is only useful in comparing
|
||||
* against other revisions. It is NOT an incrementing number.
|
||||
* This value is the revision of the code you are linked with and may be
|
||||
* different from the code you are compiling with, which is found in the
|
||||
* constant SDL_REVISION.
|
||||
*
|
||||
* The revision is arbitrary string (a hash value) uniquely identifying the
|
||||
* exact revision of the SDL library in use, and is only useful in comparing
|
||||
* against other revisions. It is NOT an incrementing number.
|
||||
*
|
||||
* If SDL wasn't built from a git repository with the appropriate tools, this
|
||||
* will return an empty string.
|
||||
*
|
||||
* Prior to SDL 2.0.16, before development moved to GitHub, this returned a
|
||||
* hash for a Mercurial repository.
|
||||
*
|
||||
* You shouldn't use this function for anything but logging it for debugging
|
||||
* purposes. The string is not intended to be reliable in any way.
|
||||
*
|
||||
* \returns an arbitrary string, uniquely identifying the exact revision of
|
||||
* the SDL library in use.
|
||||
*
|
||||
* \sa SDL_GetVersion
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetRevision(void);
|
||||
|
||||
/**
|
||||
* \brief Get the revision number of SDL that is linked against your program.
|
||||
* Obsolete function, do not use.
|
||||
*
|
||||
* Returns a number uniquely identifying the exact revision of the SDL
|
||||
* library in use. It is an incrementing number based on commits to
|
||||
* hg.libsdl.org.
|
||||
* When SDL was hosted in a Mercurial repository, and was built carefully,
|
||||
* this would return the revision number that the build was created from.
|
||||
* This number was not reliable for several reasons, but more importantly,
|
||||
* SDL is now hosted in a git repository, which does not offer numbers at
|
||||
* all, only hashes. This function only ever returns zero now. Don't use it.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
|
||||
extern SDL_DEPRECATED DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
|
|
@ -98,8 +98,8 @@ typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
|
|||
* applications to link with libvulkan (and historically MoltenVK was
|
||||
* provided as a static library). If it is not found then, on macOS, SDL
|
||||
* will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib,
|
||||
* \c MoltenVK.framework/MoltenVK and \c libMoltenVK.dylib in that order.
|
||||
* On iOS SDL will attempt to load \c libMoltenVK.dylib. Applications
|
||||
* followed by \c libvulkan.dylib, in that order.
|
||||
* On iOS SDL will attempt to load \c libvulkan.dylib only. Applications
|
||||
* using a dynamic framework or .dylib must ensure it is included in its
|
||||
* application bundle.
|
||||
*
|
||||
|
@ -135,11 +135,11 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
* \brief Get the names of the Vulkan instance extensions needed to create
|
||||
* a surface with \c SDL_Vulkan_CreateSurface().
|
||||
*
|
||||
* \param [in] window Window for which the required Vulkan instance
|
||||
* \param [in] \c NULL or window Window for which the required Vulkan instance
|
||||
* extensions should be retrieved
|
||||
* \param [in,out] count pointer to an \c unsigned related to the number of
|
||||
* \param [in,out] pCount pointer to an \c unsigned related to the number of
|
||||
* required Vulkan instance extensions
|
||||
* \param [out] names \c NULL or a pointer to an array to be filled with the
|
||||
* \param [out] pNames \c NULL or a pointer to an array to be filled with the
|
||||
* required Vulkan instance extensions
|
||||
*
|
||||
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
||||
|
@ -154,18 +154,23 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
* returned instead of \c SDL_TRUE, to indicate that not all the required
|
||||
* extensions were returned.
|
||||
*
|
||||
* \note If \c window is not NULL, it will be checked against its creation
|
||||
* flags to ensure that the Vulkan flag is present. This parameter
|
||||
* will be removed in a future major release.
|
||||
*
|
||||
* \note The returned list of extensions will contain \c VK_KHR_surface
|
||||
* and zero or more platform specific extensions
|
||||
*
|
||||
* \note The extension names queried here must be enabled when calling
|
||||
* VkCreateInstance, otherwise surface creation will fail.
|
||||
*
|
||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag.
|
||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag
|
||||
* or be \c NULL
|
||||
*
|
||||
* \code
|
||||
* unsigned int count;
|
||||
* // get count of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL))
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))
|
||||
* handle_error();
|
||||
*
|
||||
* static const char *const additionalExtensions[] =
|
||||
|
@ -179,7 +184,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
* handle_error();
|
||||
*
|
||||
* // get names of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names))
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))
|
||||
* handle_error();
|
||||
*
|
||||
* // copy additional extensions after required extensions
|
||||
|
@ -199,10 +204,9 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
*
|
||||
* \sa SDL_Vulkan_CreateSurface()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
|
||||
SDL_Window *window,
|
||||
unsigned int *pCount,
|
||||
const char **pNames);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window,
|
||||
unsigned int *pCount,
|
||||
const char **pNames);
|
||||
|
||||
/**
|
||||
* \brief Create a Vulkan rendering surface for a window.
|
||||
|
@ -233,10 +237,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
|
|||
*
|
||||
* \sa SDL_Vulkan_GetInstanceExtensions()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR* surface);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR* surface);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -51,15 +51,11 @@
|
|||
|
||||
/* Some compilers use a special export keyword */
|
||||
#ifndef DECLSPEC
|
||||
# if defined(__WIN32__) || defined(__WINRT__)
|
||||
# ifdef __BORLANDC__
|
||||
# ifdef BUILD_SDL
|
||||
# define DECLSPEC
|
||||
# else
|
||||
# define DECLSPEC __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# if defined(__WIN32__) || defined(__WINRT__) || defined(__CYGWIN__)
|
||||
# ifdef DLL_EXPORT
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
# define DECLSPEC
|
||||
# endif
|
||||
# elif defined(__OS2__)
|
||||
# ifdef BUILD_SDL
|
||||
|
@ -105,6 +101,9 @@
|
|||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4103)
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wpragma-pack"
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma nopackwarning
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -26,6 +26,9 @@
|
|||
* after you finish any function and structure declarations in your headers
|
||||
*/
|
||||
|
||||
#ifndef _begin_code_h
|
||||
#error close_code.h included without matching begin_code.h
|
||||
#endif
|
||||
#undef _begin_code_h
|
||||
|
||||
/* Reset structure packing at previous byte alignment */
|
||||
|
|
|
@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "qasm-inline.h"
|
||||
|
||||
#if defined (__i386__) || defined(__x86_64__)
|
||||
static const unsigned short fpucw = 0x0C7F;
|
||||
|
||||
/*
|
||||
|
@ -97,3 +98,4 @@ int qvmftolx87(void)
|
|||
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "qasm-inline.h"
|
||||
#include "../qcommon/q_shared.h"
|
||||
|
||||
#if defined (__i386__) || defined(__x86_64__)
|
||||
|
||||
/*
|
||||
* GNU inline asm version of qsnapvector
|
||||
* See MASM snapvector.asm for commentary
|
||||
|
@ -71,3 +73,5 @@ void qsnapvectorx87(vec3_t vec)
|
|||
: "memory"
|
||||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -156,6 +156,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define idx64 1
|
||||
#define ARCH_STRING "x86_64"
|
||||
#define Q3_LITTLE_ENDIAN
|
||||
#elif defined __aarch64__
|
||||
#define ARCH_STRING "arm64"
|
||||
#define Q3_LITTLE_ENDIAN
|
||||
#ifndef NO_VM_COMPILED
|
||||
#define NO_VM_COMPILED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define DLL_EXT ".dylib"
|
||||
|
|
|
@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__i386__) || defined(__x86_64__)
|
||||
static void VM_Destroy_Compiled(vm_t* self);
|
||||
|
||||
/*
|
||||
|
@ -1807,3 +1808,4 @@ int VM_CallCompiled(vm_t *vm, int *args)
|
|||
|
||||
return opStack[opStackOfs];
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@ if [ $# == 0 ] || [ $# -gt 2 ]; then
|
|||
echo " x86"
|
||||
echo " x86_64"
|
||||
echo " ppc"
|
||||
echo " arm64"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -41,12 +42,15 @@ if [ "$2" != "" ]; then
|
|||
CURRENT_ARCH="x86_64"
|
||||
elif [ "$2" == "ppc" ]; then
|
||||
CURRENT_ARCH="ppc"
|
||||
elif [ "$2" == "arm64" ]; then
|
||||
CURRENT_ARCH="arm64"
|
||||
else
|
||||
echo "Invalid architecture: $2"
|
||||
echo "Valid architectures are:"
|
||||
echo " x86"
|
||||
echo " x86_64"
|
||||
echo " ppc"
|
||||
echo " arm64"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
@ -78,6 +82,7 @@ function symlinkArch()
|
|||
IS32=`file "${SRCFILE}.${EXT}" | grep "i386"`
|
||||
IS64=`file "${SRCFILE}.${EXT}" | grep "x86_64"`
|
||||
ISPPC=`file "${SRCFILE}.${EXT}" | grep "ppc"`
|
||||
ISARM=`file "${SRCFILE}.${EXT}" | grep "arm64"`
|
||||
|
||||
if [ "${IS32}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}x86.${EXT}" ]; then
|
||||
|
@ -103,6 +108,14 @@ function symlinkArch()
|
|||
rm "${DSTFILE}ppc.${EXT}"
|
||||
fi
|
||||
|
||||
if [ "${ISARM}" != "" ]; then
|
||||
if [ ! -L "${DSTFILE}arm64.${EXT}" ]; then
|
||||
ln -s "${SRCFILE}.${EXT}" "${DSTFILE}arm64.${EXT}"
|
||||
fi
|
||||
elif [ -L "${DSTFILE}arm64.${EXT}" ]; then
|
||||
rm "${DSTFILE}arm64.${EXT}"
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
|
@ -110,6 +123,7 @@ SEARCH_ARCHS=" \
|
|||
x86 \
|
||||
x86_64 \
|
||||
ppc \
|
||||
arm64 \
|
||||
"
|
||||
|
||||
HAS_LIPO=`command -v lipo`
|
||||
|
@ -249,7 +263,11 @@ fi
|
|||
|
||||
# set the final application bundle output directory
|
||||
if [ "${2}" == "" ]; then
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-universal"
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-universal2"
|
||||
else
|
||||
BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-universal"
|
||||
fi
|
||||
if [ ! -d ${BUILT_PRODUCTS_DIR} ]; then
|
||||
mkdir -p ${BUILT_PRODUCTS_DIR} || exit 1;
|
||||
fi
|
||||
|
@ -314,7 +332,7 @@ PLIST="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
|||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>"
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ]; then
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>"
|
||||
|
@ -336,6 +354,12 @@ if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_
|
|||
<key>x86_64</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_X86_64}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_ARM64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>arm64</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_ARM64}</string>"
|
||||
fi
|
||||
|
||||
PLIST="${PLIST}
|
||||
</dict>"
|
||||
|
@ -348,6 +372,8 @@ PLIST="${PLIST}
|
|||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<false/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
"
|
||||
|
|
153
make-macosx-ub2.sh
Executable file
|
@ -0,0 +1,153 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd `dirname $0`
|
||||
if [ ! -f Makefile ]; then
|
||||
echo "This script must be run from the ioquake3 build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# This script is to build a Universal 2 binary
|
||||
# (Apple's term for an x86_64 and arm64 binary)
|
||||
|
||||
unset X86_64_SDK
|
||||
unset X86_64_CFLAGS
|
||||
unset X86_64_MACOSX_VERSION_MIN
|
||||
unset ARM64_SDK
|
||||
unset ARM64_CFLAGS
|
||||
unset ARM64_MACOSX_VERSION_MIN
|
||||
|
||||
X86_64_MACOSX_VERSION_MIN="10.7"
|
||||
ARM64_MACOSX_VERSION_MIN="11.0"
|
||||
|
||||
echo "Building X86_64 Client/Dedicated Server"
|
||||
echo "Building ARM64 Client/Dedicated Server"
|
||||
echo
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "Run script with a 'notarize' flag to perform signing and notarization."
|
||||
fi
|
||||
|
||||
# For parallel make on multicore boxes...
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
|
||||
# x86_64 client and server
|
||||
#if [ -d build/release-release-x86_64 ]; then
|
||||
# rm -r build/release-darwin-x86_64
|
||||
#fi
|
||||
(ARCH=x86_64 CFLAGS=$X86_64_CFLAGS MACOSX_VERSION_MIN=$X86_64_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo;echo
|
||||
|
||||
# arm64 client and server
|
||||
#if [ -d build/release-release-arm64 ]; then
|
||||
# rm -r build/release-darwin-arm64
|
||||
#fi
|
||||
(ARCH=arm64 CFLAGS=$ARM64_CFLAGS MACOSX_VERSION_MIN=$ARM64_MACOSX_VERSION_MIN make -j$NCPU) || exit 1;
|
||||
|
||||
echo
|
||||
|
||||
# use the following shell script to build a universal 2 application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="10.7"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64="$X86_64_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_ARM64="$ARM64_MACOSX_VERSION_MIN"
|
||||
|
||||
if [ -d build/release-darwin-universal2 ]; then
|
||||
rm -r build/release-darwin-universal2
|
||||
fi
|
||||
"./make-macosx-app.sh" release
|
||||
|
||||
if [ "$1" == "notarize" ]; then
|
||||
# user-specific values
|
||||
# specify the actual values in a separate file called make-macosx-values.local
|
||||
|
||||
# ****************************************************************************************
|
||||
# identity as specified in Keychain
|
||||
SIGNING_IDENTITY="Developer ID Application: Your Name (XXXXXXXXX)"
|
||||
|
||||
ASC_USERNAME="your@apple.id"
|
||||
|
||||
# signing password is app-specific (https://appleid.apple.com/account/manage) and stored in Keychain (as "notarize-app" in this case)
|
||||
ASC_PASSWORD="@keychain:notarize-app"
|
||||
|
||||
# ProviderShortname can be found with
|
||||
# xcrun altool --list-providers -u your@apple.id -p "@keychain:notarize-app"
|
||||
ASC_PROVIDER="XXXXXXXXX"
|
||||
# ****************************************************************************************
|
||||
|
||||
source make-macosx-values.local
|
||||
|
||||
# release build location
|
||||
RELEASE_LOCATION="build/release-darwin-universal2"
|
||||
|
||||
# release build name
|
||||
RELEASE_BUILD="ioquake3.app"
|
||||
|
||||
# Pre-notarized zip file (not what is shipped)
|
||||
PRE_NOTARIZED_ZIP="ioquake3_prenotarized.zip"
|
||||
|
||||
# Post-notarized zip file (shipped)
|
||||
POST_NOTARIZED_ZIP="ioquake3_notarized.zip"
|
||||
|
||||
BUNDLE_ID="org.ioquake3.ioquake3"
|
||||
|
||||
# allows for unsigned executable memory in hardened runtime
|
||||
# see: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-unsigned-executable-memory
|
||||
ENTITLEMENTS_FILE="misc/xcode/ioquake3/ioquake3.entitlements"
|
||||
|
||||
# sign the resulting app bundle
|
||||
echo "signing..."
|
||||
codesign --force --options runtime --deep --entitlements "${ENTITLEMENTS_FILE}" --sign "${SIGNING_IDENTITY}" ${RELEASE_LOCATION}/${RELEASE_BUILD}
|
||||
|
||||
cd ${RELEASE_LOCATION}
|
||||
|
||||
# notarize app
|
||||
# script taken from https://github.com/rednoah/notarize-app
|
||||
|
||||
# create the zip to send to the notarization service
|
||||
echo "zipping..."
|
||||
ditto -c -k --sequesterRsrc --keepParent ${RELEASE_BUILD} ${PRE_NOTARIZED_ZIP}
|
||||
|
||||
# create temporary files
|
||||
NOTARIZE_APP_LOG=$(mktemp -t notarize-app)
|
||||
NOTARIZE_INFO_LOG=$(mktemp -t notarize-info)
|
||||
|
||||
# delete temporary files on exit
|
||||
function finish {
|
||||
rm "$NOTARIZE_APP_LOG" "$NOTARIZE_INFO_LOG"
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
echo "submitting..."
|
||||
# submit app for notarization
|
||||
if xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" -f "$PRE_NOTARIZED_ZIP" > "$NOTARIZE_APP_LOG" 2>&1; then
|
||||
cat "$NOTARIZE_APP_LOG"
|
||||
RequestUUID=$(awk -F ' = ' '/RequestUUID/ {print $2}' "$NOTARIZE_APP_LOG")
|
||||
|
||||
# check status periodically
|
||||
while sleep 60 && date; do
|
||||
# check notarization status
|
||||
if xcrun altool --notarization-info "$RequestUUID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USERNAME" --password "$ASC_PASSWORD" > "$NOTARIZE_INFO_LOG" 2>&1; then
|
||||
cat "$NOTARIZE_INFO_LOG"
|
||||
|
||||
# once notarization is complete, run stapler and exit
|
||||
if ! grep -q "Status: in progress" "$NOTARIZE_INFO_LOG"; then
|
||||
xcrun stapler staple "$RELEASE_BUILD"
|
||||
break
|
||||
fi
|
||||
else
|
||||
cat "$NOTARIZE_INFO_LOG" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
cat "$NOTARIZE_APP_LOG" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "notarized"
|
||||
echo "zipping notarized..."
|
||||
|
||||
ditto -c -k --sequesterRsrc --keepParent ${RELEASE_BUILD} ${POST_NOTARIZED_ZIP}
|
||||
|
||||
echo "done. ${POST_NOTARIZED_ZIP} contains notarized ${RELEASE_BUILD} build."
|
||||
fi
|
|
@ -6,7 +6,7 @@
|
|||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 target_architecture"
|
||||
echo "Example: $0 x86"
|
||||
echo "other valid options are x86_64 or ppc"
|
||||
echo "other valid options are arm64, x86_64 or ppc"
|
||||
echo
|
||||
echo "If you don't know or care about architectures please consider using make-macosx-ub.sh instead of this script."
|
||||
exit 1
|
||||
|
@ -18,9 +18,11 @@ elif [ "$1" == "x86_64" ]; then
|
|||
BUILDARCH=x86_64
|
||||
elif [ "$1" == "ppc" ]; then
|
||||
BUILDARCH=ppc
|
||||
elif [ "$1" == "arm64" ]; then
|
||||
BUILDARCH=arm64
|
||||
else
|
||||
echo "Invalid architecture: $1"
|
||||
echo "Valid architectures are x86, x86_64 or ppc"
|
||||
echo "Valid architectures are arm64, x86_64, x86, or ppc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -55,6 +57,8 @@ elif [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
|||
ARCH_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
ARCH_MACOSX_VERSION_MIN="10.6"
|
||||
elif [ $BUILDARCH = "arm64" ]; then
|
||||
ARCH_MACOSX_VERSION_MIN="11.0"
|
||||
else
|
||||
ARCH_MACOSX_VERSION_MIN="10.7"
|
||||
fi
|
||||
|
@ -82,4 +86,5 @@ export MACOSX_DEPLOYMENT_TARGET="${ARCH_MACOSX_VERSION_MIN}"
|
|||
export MACOSX_DEPLOYMENT_TARGET_PPC=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64=
|
||||
export MACOSX_DEPLOYMENT_TARGET_ARM64=
|
||||
"./make-macosx-app.sh" release ${BUILDARCH}
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 2735306014D11F8B00EB7BD6 /* Build configuration list for PBXProject "botlib" */;
|
||||
|
@ -333,6 +333,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -360,7 +361,7 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -383,6 +384,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -403,7 +405,7 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
@ -34,6 +34,34 @@
|
|||
2711BD2F14D12F01005EB142 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD2414D12F01005EB142 /* q_shared.c */; };
|
||||
27AACFF7178DFDDE0093DFC0 /* ui_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AACFF6178DFDDE0093DFC0 /* ui_shared.c */; };
|
||||
27AACFFA178DFE9A0093DFC0 /* cg_particles.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF314D12E99005EB142 /* cg_particles.c */; };
|
||||
A137C9C8258DCEE8009AC639 /* cg_consolecmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCE714D12E99005EB142 /* cg_consolecmds.c */; };
|
||||
A137C9C9258DCEE8009AC639 /* cg_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCE814D12E99005EB142 /* cg_draw.c */; };
|
||||
A137C9CA258DCEE8009AC639 /* cg_drawtools.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCE914D12E99005EB142 /* cg_drawtools.c */; };
|
||||
A137C9CB258DCEE8009AC639 /* cg_effects.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCEA14D12E99005EB142 /* cg_effects.c */; };
|
||||
A137C9CC258DCEE8009AC639 /* cg_ents.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCEB14D12E99005EB142 /* cg_ents.c */; };
|
||||
A137C9CD258DCEE8009AC639 /* cg_event.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCEC14D12E99005EB142 /* cg_event.c */; };
|
||||
A137C9CE258DCEE8009AC639 /* cg_info.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCED14D12E99005EB142 /* cg_info.c */; };
|
||||
A137C9CF258DCEE8009AC639 /* cg_localents.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCEF14D12E99005EB142 /* cg_localents.c */; };
|
||||
A137C9D0258DCEE8009AC639 /* cg_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF014D12E99005EB142 /* cg_main.c */; };
|
||||
A137C9D1258DCEE8009AC639 /* cg_marks.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF114D12E99005EB142 /* cg_marks.c */; };
|
||||
A137C9D2258DCEE8009AC639 /* cg_players.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF414D12E99005EB142 /* cg_players.c */; };
|
||||
A137C9D3258DCEE8009AC639 /* cg_playerstate.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF514D12E99005EB142 /* cg_playerstate.c */; };
|
||||
A137C9D4258DCEE8009AC639 /* cg_predict.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF614D12E99005EB142 /* cg_predict.c */; };
|
||||
A137C9D5258DCEE8009AC639 /* cg_scoreboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF814D12E99005EB142 /* cg_scoreboard.c */; };
|
||||
A137C9D6258DCEE8009AC639 /* cg_servercmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF914D12E99005EB142 /* cg_servercmds.c */; };
|
||||
A137C9D7258DCEE8009AC639 /* cg_snapshot.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCFA14D12E99005EB142 /* cg_snapshot.c */; };
|
||||
A137C9D8258DCEE8009AC639 /* cg_syscalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCFB14D12E99005EB142 /* cg_syscalls.c */; };
|
||||
A137C9D9258DCEE8009AC639 /* cg_view.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCFC14D12E99005EB142 /* cg_view.c */; };
|
||||
A137C9DA258DCEE8009AC639 /* cg_weapons.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCFD14D12E99005EB142 /* cg_weapons.c */; };
|
||||
A137C9DB258DCEE8009AC639 /* bg_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD1C14D12F01005EB142 /* bg_lib.c */; };
|
||||
A137C9DC258DCEE8009AC639 /* bg_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD1F14D12F01005EB142 /* bg_misc.c */; };
|
||||
A137C9DD258DCEE8009AC639 /* bg_pmove.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD2014D12F01005EB142 /* bg_pmove.c */; };
|
||||
A137C9DE258DCEE8009AC639 /* bg_slidemove.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD2214D12F01005EB142 /* bg_slidemove.c */; };
|
||||
A137C9DF258DCEE8009AC639 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD2314D12F01005EB142 /* q_math.c */; };
|
||||
A137C9E0258DCEE8009AC639 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD2414D12F01005EB142 /* q_shared.c */; };
|
||||
A137C9E1258DCEE8009AC639 /* ui_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AACFF6178DFDDE0093DFC0 /* ui_shared.c */; };
|
||||
A137C9E2258DCEE8009AC639 /* cg_particles.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF314D12E99005EB142 /* cg_particles.c */; };
|
||||
A137C9EE258DCFED009AC639 /* cg_newdraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BCF214D12E99005EB142 /* cg_newdraw.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
|
@ -72,8 +100,9 @@
|
|||
2711BD2414D12F01005EB142 /* q_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = q_shared.c; sourceTree = "<group>"; };
|
||||
2711BD2514D12F01005EB142 /* q_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = q_shared.h; sourceTree = "<group>"; };
|
||||
2711BD2614D12F01005EB142 /* surfaceflags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surfaceflags.h; sourceTree = "<group>"; };
|
||||
2735319514D125FD00EB7BD6 /* cgame.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = cgame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2735319514D125FD00EB7BD6 /* baseq3/cgame.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = baseq3/cgame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
27AACFF6178DFDDE0093DFC0 /* ui_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ui_shared.c; path = ui/ui_shared.c; sourceTree = "<group>"; };
|
||||
A137C9E7258DCEE8009AC639 /* missionpack/cgame.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = missionpack/cgame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -84,6 +113,13 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C9E3258DCEE8009AC639 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
@ -121,7 +157,8 @@
|
|||
2735319614D125FD00EB7BD6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2735319514D125FD00EB7BD6 /* cgame.dylib */,
|
||||
2735319514D125FD00EB7BD6 /* baseq3/cgame.dylib */,
|
||||
A137C9E7258DCEE8009AC639 /* missionpack/cgame.dylib */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -182,9 +219,9 @@
|
|||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
2735319414D125FD00EB7BD6 /* cgame */ = {
|
||||
2735319414D125FD00EB7BD6 /* cgame - baseq3 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 2735319914D125FD00EB7BD6 /* Build configuration list for PBXNativeTarget "cgame" */;
|
||||
buildConfigurationList = 2735319914D125FD00EB7BD6 /* Build configuration list for PBXNativeTarget "cgame - baseq3" */;
|
||||
buildPhases = (
|
||||
2735319114D125FD00EB7BD6 /* Sources */,
|
||||
2735319214D125FD00EB7BD6 /* Frameworks */,
|
||||
|
@ -193,9 +230,25 @@
|
|||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = cgame;
|
||||
name = "cgame - baseq3";
|
||||
productName = cgame;
|
||||
productReference = 2735319514D125FD00EB7BD6 /* cgame.dylib */;
|
||||
productReference = 2735319514D125FD00EB7BD6 /* baseq3/cgame.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
A137C9C6258DCEE8009AC639 /* cgame - missionpack */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = A137C9E4258DCEE8009AC639 /* Build configuration list for PBXNativeTarget "cgame - missionpack" */;
|
||||
buildPhases = (
|
||||
A137C9C7258DCEE8009AC639 /* Sources */,
|
||||
A137C9E3258DCEE8009AC639 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "cgame - missionpack";
|
||||
productName = cgame;
|
||||
productReference = A137C9E7258DCEE8009AC639 /* missionpack/cgame.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
@ -205,7 +258,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 2735318F14D125FD00EB7BD6 /* Build configuration list for PBXProject "cgame" */;
|
||||
|
@ -221,7 +274,8 @@
|
|||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
2735319414D125FD00EB7BD6 /* cgame */,
|
||||
2735319414D125FD00EB7BD6 /* cgame - baseq3 */,
|
||||
A137C9C6258DCEE8009AC639 /* cgame - missionpack */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -261,6 +315,41 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C9C7258DCEE8009AC639 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A137C9C8258DCEE8009AC639 /* cg_consolecmds.c in Sources */,
|
||||
A137C9C9258DCEE8009AC639 /* cg_draw.c in Sources */,
|
||||
A137C9EE258DCFED009AC639 /* cg_newdraw.c in Sources */,
|
||||
A137C9CA258DCEE8009AC639 /* cg_drawtools.c in Sources */,
|
||||
A137C9CB258DCEE8009AC639 /* cg_effects.c in Sources */,
|
||||
A137C9CC258DCEE8009AC639 /* cg_ents.c in Sources */,
|
||||
A137C9CD258DCEE8009AC639 /* cg_event.c in Sources */,
|
||||
A137C9CE258DCEE8009AC639 /* cg_info.c in Sources */,
|
||||
A137C9CF258DCEE8009AC639 /* cg_localents.c in Sources */,
|
||||
A137C9D0258DCEE8009AC639 /* cg_main.c in Sources */,
|
||||
A137C9D1258DCEE8009AC639 /* cg_marks.c in Sources */,
|
||||
A137C9D2258DCEE8009AC639 /* cg_players.c in Sources */,
|
||||
A137C9D3258DCEE8009AC639 /* cg_playerstate.c in Sources */,
|
||||
A137C9D4258DCEE8009AC639 /* cg_predict.c in Sources */,
|
||||
A137C9D5258DCEE8009AC639 /* cg_scoreboard.c in Sources */,
|
||||
A137C9D6258DCEE8009AC639 /* cg_servercmds.c in Sources */,
|
||||
A137C9D7258DCEE8009AC639 /* cg_snapshot.c in Sources */,
|
||||
A137C9D8258DCEE8009AC639 /* cg_syscalls.c in Sources */,
|
||||
A137C9D9258DCEE8009AC639 /* cg_view.c in Sources */,
|
||||
A137C9DA258DCEE8009AC639 /* cg_weapons.c in Sources */,
|
||||
A137C9DB258DCEE8009AC639 /* bg_lib.c in Sources */,
|
||||
A137C9DC258DCEE8009AC639 /* bg_misc.c in Sources */,
|
||||
A137C9DD258DCEE8009AC639 /* bg_pmove.c in Sources */,
|
||||
A137C9DE258DCEE8009AC639 /* bg_slidemove.c in Sources */,
|
||||
A137C9DF258DCEE8009AC639 /* q_math.c in Sources */,
|
||||
A137C9E0258DCEE8009AC639 /* q_shared.c in Sources */,
|
||||
A137C9E1258DCEE8009AC639 /* ui_shared.c in Sources */,
|
||||
A137C9E2258DCEE8009AC639 /* cg_particles.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
@ -281,6 +370,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -306,7 +396,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -329,6 +419,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -347,7 +438,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
@ -359,7 +450,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = baseq3/cgame;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -370,7 +461,35 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = baseq3/cgame;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A137C9E5258DCEE8009AC639 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
MISSIONPACK,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = missionpack/cgame;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A137C9E6258DCEE8009AC639 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = MISSIONPACK;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = missionpack/cgame;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -386,7 +505,7 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2735319914D125FD00EB7BD6 /* Build configuration list for PBXNativeTarget "cgame" */ = {
|
||||
2735319914D125FD00EB7BD6 /* Build configuration list for PBXNativeTarget "cgame - baseq3" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2735319A14D125FD00EB7BD6 /* Debug */,
|
||||
|
@ -395,6 +514,15 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
A137C9E4258DCEE8009AC639 /* Build configuration list for PBXNativeTarget "cgame - missionpack" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A137C9E5258DCEE8009AC639 /* Debug */,
|
||||
A137C9E6258DCEE8009AC639 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 2735318C14D125FD00EB7BD6 /* Project object */;
|
||||
|
|
|
@ -40,6 +40,39 @@
|
|||
2711BDAE14D12F4E005EB142 /* g_weapon.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6D14D12F4E005EB142 /* g_weapon.c */; };
|
||||
2711BDB114D12F4E005EB142 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD7014D12F4E005EB142 /* q_math.c */; };
|
||||
2711BDB214D12F4E005EB142 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD7114D12F4E005EB142 /* q_shared.c */; };
|
||||
A137C98F258DCD55009AC639 /* ai_chat.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3414D12F4E005EB142 /* ai_chat.c */; };
|
||||
A137C990258DCD55009AC639 /* ai_cmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3614D12F4E005EB142 /* ai_cmd.c */; };
|
||||
A137C991258DCD55009AC639 /* ai_dmnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3814D12F4E005EB142 /* ai_dmnet.c */; };
|
||||
A137C992258DCD55009AC639 /* ai_dmq3.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3A14D12F4E005EB142 /* ai_dmq3.c */; };
|
||||
A137C993258DCD55009AC639 /* ai_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3C14D12F4E005EB142 /* ai_main.c */; };
|
||||
A137C994258DCD55009AC639 /* ai_team.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD3E14D12F4E005EB142 /* ai_team.c */; };
|
||||
A137C995258DCD55009AC639 /* ai_vcmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD4014D12F4E005EB142 /* ai_vcmd.c */; };
|
||||
A137C996258DCD55009AC639 /* bg_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD4D14D12F4E005EB142 /* bg_misc.c */; };
|
||||
A137C997258DCD55009AC639 /* bg_pmove.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD4E14D12F4E005EB142 /* bg_pmove.c */; };
|
||||
A137C998258DCD55009AC639 /* bg_slidemove.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5014D12F4E005EB142 /* bg_slidemove.c */; };
|
||||
A137C999258DCD55009AC639 /* g_active.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5314D12F4E005EB142 /* g_active.c */; };
|
||||
A137C99A258DCD55009AC639 /* g_arenas.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5414D12F4E005EB142 /* g_arenas.c */; };
|
||||
A137C99B258DCD55009AC639 /* g_bot.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5514D12F4E005EB142 /* g_bot.c */; };
|
||||
A137C99C258DCD55009AC639 /* g_client.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5614D12F4E005EB142 /* g_client.c */; };
|
||||
A137C99D258DCD55009AC639 /* g_cmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5714D12F4E005EB142 /* g_cmds.c */; };
|
||||
A137C99E258DCD55009AC639 /* g_combat.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5814D12F4E005EB142 /* g_combat.c */; };
|
||||
A137C99F258DCD55009AC639 /* g_items.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5914D12F4E005EB142 /* g_items.c */; };
|
||||
A137C9A0258DCD55009AC639 /* g_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5B14D12F4E005EB142 /* g_main.c */; };
|
||||
A137C9A1258DCD55009AC639 /* g_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5C14D12F4E005EB142 /* g_mem.c */; };
|
||||
A137C9A2258DCD55009AC639 /* g_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5D14D12F4E005EB142 /* g_misc.c */; };
|
||||
A137C9A3258DCD55009AC639 /* g_missile.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5E14D12F4E005EB142 /* g_missile.c */; };
|
||||
A137C9A4258DCD55009AC639 /* g_mover.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD5F14D12F4E005EB142 /* g_mover.c */; };
|
||||
A137C9A5258DCD55009AC639 /* g_session.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6314D12F4E005EB142 /* g_session.c */; };
|
||||
A137C9A6258DCD55009AC639 /* g_spawn.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6414D12F4E005EB142 /* g_spawn.c */; };
|
||||
A137C9A7258DCD55009AC639 /* g_svcmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6514D12F4E005EB142 /* g_svcmds.c */; };
|
||||
A137C9A8258DCD55009AC639 /* g_syscalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6714D12F4E005EB142 /* g_syscalls.c */; };
|
||||
A137C9A9258DCD55009AC639 /* g_target.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6814D12F4E005EB142 /* g_target.c */; };
|
||||
A137C9AA258DCD55009AC639 /* g_team.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6914D12F4E005EB142 /* g_team.c */; };
|
||||
A137C9AB258DCD55009AC639 /* g_trigger.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6B14D12F4E005EB142 /* g_trigger.c */; };
|
||||
A137C9AC258DCD55009AC639 /* g_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6C14D12F4E005EB142 /* g_utils.c */; };
|
||||
A137C9AD258DCD55009AC639 /* g_weapon.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD6D14D12F4E005EB142 /* g_weapon.c */; };
|
||||
A137C9AE258DCD55009AC639 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD7014D12F4E005EB142 /* q_math.c */; };
|
||||
A137C9AF258DCD55009AC639 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BD7114D12F4E005EB142 /* q_shared.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
|
@ -99,7 +132,8 @@
|
|||
2711BD7214D12F4E005EB142 /* q_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = q_shared.h; sourceTree = "<group>"; };
|
||||
2711BD7314D12F4E005EB142 /* surfaceflags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = surfaceflags.h; sourceTree = "<group>"; };
|
||||
2711BD7414D12F4E005EB142 /* syn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = syn.h; sourceTree = "<group>"; };
|
||||
273531B414D126C300EB7BD6 /* game.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = game.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
273531B414D126C300EB7BD6 /* baseq3/qagame.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = baseq3/qagame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A137C9B4258DCD55009AC639 /* missionpack/qagame.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = missionpack/qagame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -110,6 +144,13 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C9B0258DCD55009AC639 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
@ -183,7 +224,8 @@
|
|||
273531B514D126C300EB7BD6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
273531B414D126C300EB7BD6 /* game.dylib */,
|
||||
273531B414D126C300EB7BD6 /* baseq3/qagame.dylib */,
|
||||
A137C9B4258DCD55009AC639 /* missionpack/qagame.dylib */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -212,9 +254,9 @@
|
|||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
273531B314D126C300EB7BD6 /* game */ = {
|
||||
273531B314D126C300EB7BD6 /* game - baseq3 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 273531B814D126C300EB7BD6 /* Build configuration list for PBXNativeTarget "game" */;
|
||||
buildConfigurationList = 273531B814D126C300EB7BD6 /* Build configuration list for PBXNativeTarget "game - baseq3" */;
|
||||
buildPhases = (
|
||||
273531B014D126C300EB7BD6 /* Sources */,
|
||||
273531B114D126C300EB7BD6 /* Frameworks */,
|
||||
|
@ -223,9 +265,25 @@
|
|||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = game;
|
||||
name = "game - baseq3";
|
||||
productName = game;
|
||||
productReference = 273531B414D126C300EB7BD6 /* game.dylib */;
|
||||
productReference = 273531B414D126C300EB7BD6 /* baseq3/qagame.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
A137C98D258DCD55009AC639 /* game - missionpack */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = A137C9B1258DCD55009AC639 /* Build configuration list for PBXNativeTarget "game - missionpack" */;
|
||||
buildPhases = (
|
||||
A137C98E258DCD55009AC639 /* Sources */,
|
||||
A137C9B0258DCD55009AC639 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "game - missionpack";
|
||||
productName = game;
|
||||
productReference = A137C9B4258DCD55009AC639 /* missionpack/qagame.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
@ -235,7 +293,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 273531AE14D126C300EB7BD6 /* Build configuration list for PBXProject "game" */;
|
||||
|
@ -251,7 +309,8 @@
|
|||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
273531B314D126C300EB7BD6 /* game */,
|
||||
273531B314D126C300EB7BD6 /* game - baseq3 */,
|
||||
A137C98D258DCD55009AC639 /* game - missionpack */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -297,6 +356,46 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C98E258DCD55009AC639 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A137C98F258DCD55009AC639 /* ai_chat.c in Sources */,
|
||||
A137C990258DCD55009AC639 /* ai_cmd.c in Sources */,
|
||||
A137C991258DCD55009AC639 /* ai_dmnet.c in Sources */,
|
||||
A137C992258DCD55009AC639 /* ai_dmq3.c in Sources */,
|
||||
A137C993258DCD55009AC639 /* ai_main.c in Sources */,
|
||||
A137C994258DCD55009AC639 /* ai_team.c in Sources */,
|
||||
A137C995258DCD55009AC639 /* ai_vcmd.c in Sources */,
|
||||
A137C996258DCD55009AC639 /* bg_misc.c in Sources */,
|
||||
A137C997258DCD55009AC639 /* bg_pmove.c in Sources */,
|
||||
A137C998258DCD55009AC639 /* bg_slidemove.c in Sources */,
|
||||
A137C999258DCD55009AC639 /* g_active.c in Sources */,
|
||||
A137C99A258DCD55009AC639 /* g_arenas.c in Sources */,
|
||||
A137C99B258DCD55009AC639 /* g_bot.c in Sources */,
|
||||
A137C99C258DCD55009AC639 /* g_client.c in Sources */,
|
||||
A137C99D258DCD55009AC639 /* g_cmds.c in Sources */,
|
||||
A137C99E258DCD55009AC639 /* g_combat.c in Sources */,
|
||||
A137C99F258DCD55009AC639 /* g_items.c in Sources */,
|
||||
A137C9A0258DCD55009AC639 /* g_main.c in Sources */,
|
||||
A137C9A1258DCD55009AC639 /* g_mem.c in Sources */,
|
||||
A137C9A2258DCD55009AC639 /* g_misc.c in Sources */,
|
||||
A137C9A3258DCD55009AC639 /* g_missile.c in Sources */,
|
||||
A137C9A4258DCD55009AC639 /* g_mover.c in Sources */,
|
||||
A137C9A5258DCD55009AC639 /* g_session.c in Sources */,
|
||||
A137C9A6258DCD55009AC639 /* g_spawn.c in Sources */,
|
||||
A137C9A7258DCD55009AC639 /* g_svcmds.c in Sources */,
|
||||
A137C9A8258DCD55009AC639 /* g_syscalls.c in Sources */,
|
||||
A137C9A9258DCD55009AC639 /* g_target.c in Sources */,
|
||||
A137C9AA258DCD55009AC639 /* g_team.c in Sources */,
|
||||
A137C9AB258DCD55009AC639 /* g_trigger.c in Sources */,
|
||||
A137C9AC258DCD55009AC639 /* g_utils.c in Sources */,
|
||||
A137C9AD258DCD55009AC639 /* g_weapon.c in Sources */,
|
||||
A137C9AE258DCD55009AC639 /* q_math.c in Sources */,
|
||||
A137C9AF258DCD55009AC639 /* q_shared.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
@ -317,6 +416,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -342,7 +442,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -365,6 +465,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -383,7 +484,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
@ -395,7 +496,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = baseq3/qagame;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -406,7 +507,35 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = baseq3/qagame;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A137C9B2258DCD55009AC639 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
MISSIONPACK,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = missionpack/qagame;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A137C9B3258DCD55009AC639 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = MISSIONPACK;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = missionpack/qagame;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -422,7 +551,7 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
273531B814D126C300EB7BD6 /* Build configuration list for PBXNativeTarget "game" */ = {
|
||||
273531B814D126C300EB7BD6 /* Build configuration list for PBXNativeTarget "game - baseq3" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
273531B914D126C300EB7BD6 /* Debug */,
|
||||
|
@ -431,6 +560,15 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
A137C9B1258DCD55009AC639 /* Build configuration list for PBXNativeTarget "game - missionpack" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A137C9B2258DCD55009AC639 /* Debug */,
|
||||
A137C9B3258DCD55009AC639 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 273531AB14D126C300EB7BD6 /* Project object */;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>quake3_flat</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
|
@ -21,7 +19,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>c2025d94-2019-10-26</string>
|
||||
<string>451f21cb-2020-12-19</string>
|
||||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
|
@ -6,30 +6,6 @@
|
|||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
2772B8021790EBE0004CCF57 /* all ioquake3 */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 2772B8031790EBE0004CCF57 /* Build configuration list for PBXAggregateTarget "all ioquake3" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
2772B80D1790ECAB004CCF57 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "all ioquake3";
|
||||
productName = "all ioquake3";
|
||||
};
|
||||
2772B8081790EC7F004CCF57 /* all game */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 2772B8091790EC7F004CCF57 /* Build configuration list for PBXAggregateTarget "all game" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "all game";
|
||||
productName = "all game";
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2711BE7A14D13696005EB142 /* sv_bot.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BE7014D13696005EB142 /* sv_bot.c */; };
|
||||
2711BE7B14D13696005EB142 /* sv_ccmds.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BE7114D13696005EB142 /* sv_ccmds.c */; };
|
||||
|
@ -75,14 +51,11 @@
|
|||
2735379E14D8F13E000D6E73 /* botlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2735379B14D8F13E000D6E73 /* botlib.a */; };
|
||||
274FAB79178FA81800B17C7A /* snd_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB78178FA81700B17C7A /* snd_main.c */; };
|
||||
274FAB7B178FA86E00B17C7A /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7A178FA86E00B17C7A /* md5.c */; };
|
||||
274FAB86178FA97400B17C7A /* ftola.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7D178FA97100B17C7A /* ftola.c */; };
|
||||
274FAB87178FA98500B17C7A /* snapvector.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB81178FA97100B17C7A /* snapvector.c */; };
|
||||
274FAB88178FA98E00B17C7A /* snd_mixa.s in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB82178FA97100B17C7A /* snd_mixa.s */; };
|
||||
274FAB8A178FA9AA00B17C7A /* matha.s in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7E178FA97100B17C7A /* matha.s */; };
|
||||
274FABFD178FAC4900B17C7A /* vm_x86.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BE9E14D136DF005EB142 /* vm_x86.c */; };
|
||||
274FABFE178FAC6E00B17C7A /* tr_noise.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AAD064178E03620093DFC0 /* tr_noise.c */; };
|
||||
2758BB3317905B8F007F6582 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2758BB3217905B8F007F6582 /* IOKit.framework */; };
|
||||
2758BB42179070C3007F6582 /* quake3_flat.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 2758BB41179070C3007F6582 /* quake3_flat.iconset */; };
|
||||
278714D917911C1300094CA3 /* libmumblelink.c in Sources */ = {isa = PBXBuildFile; fileRef = 278714D717911C1300094CA3 /* libmumblelink.c */; };
|
||||
27AACFEA178DF8760093DFC0 /* con_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AACFDE178DF8760093DFC0 /* con_log.c */; };
|
||||
27AACFEC178DF8760093DFC0 /* con_tty.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AACFE0178DF8760093DFC0 /* con_tty.c */; };
|
||||
|
@ -107,35 +80,27 @@
|
|||
27AAD06F178E04FF0093DFC0 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27AAD06E178E04FF0093DFC0 /* OpenAL.framework */; };
|
||||
27AAD071178E05290093DFC0 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 27AAD070178E05290093DFC0 /* libcurl.dylib */; };
|
||||
27AAD073178E052F0093DFC0 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 27AAD072178E052F0093DFC0 /* libz.dylib */; };
|
||||
A115085925B9CD0A000CF482 /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1665967219105430086B74B /* libSDL2-2.0.0.dylib */; };
|
||||
A115085A25B9CD0A000CF482 /* libSDL2main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A16659652191052E0086B74B /* libSDL2main.a */; };
|
||||
A115087425BA520A000CF482 /* libSDL2-2.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A115087325BA520A000CF482 /* libSDL2-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
A1203449257C937600CA384C /* renderer_opengl2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1203448257C937600CA384C /* renderer_opengl2.dylib */; };
|
||||
A1403E58256F15E700DFAD74 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A1403E57256F15E700DFAD74 /* Images.xcassets */; };
|
||||
A163B25A2193AEA100C48278 /* libopus.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1665973219341DF0086B74B /* libopus.dylib */; };
|
||||
A163B25C2193AF1E00C48278 /* renderer_opengl1.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B25B2193AF1E00C48278 /* renderer_opengl1.dylib */; };
|
||||
A163B2602193D67700C48278 /* renderer_opengl2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B25F2193D67700C48278 /* renderer_opengl2.dylib */; };
|
||||
A16659662191052E0086B74B /* libSDL2main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A16659652191052E0086B74B /* libSDL2main.a */; };
|
||||
A1665968219105430086B74B /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1665967219105430086B74B /* libSDL2-2.0.0.dylib */; };
|
||||
A1665971219107490086B74B /* sys_autoupdater.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665970219107490086B74B /* sys_autoupdater.c */; };
|
||||
A16659722192A3DD0086B74B /* libSDL2-2.0.0.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = A1665967219105430086B74B /* libSDL2-2.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
A1F3185E2603127800A11B0E /* ftola.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB7D178FA97100B17C7A /* ftola.c */; };
|
||||
A1F318612603128500A11B0E /* snapvector.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAB81178FA97100B17C7A /* snapvector.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
2772B80C1790ECAB004CCF57 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 273531E214D1275D00EB7BD6 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 273531EA14D1275D00EB7BD6;
|
||||
remoteInfo = ioquake3;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
A166596F219105E00086B74B /* Embed Libraries */ = {
|
||||
A115087225BA51E4000CF482 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
dstSubfolderSpec = 6;
|
||||
files = (
|
||||
A16659722192A3DD0086B74B /* libSDL2-2.0.0.dylib in Embed Libraries */,
|
||||
A115087425BA520A000CF482 /* libSDL2-2.0.0.dylib in CopyFiles */,
|
||||
);
|
||||
name = "Embed Libraries";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
@ -221,11 +186,9 @@
|
|||
2758B912178FB696007F6582 /* libSDLmain.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSDLmain.a; path = ../../code/libs/macosx/libSDLmain.a; sourceTree = SOURCE_ROOT; };
|
||||
2758BA49178FD062007F6582 /* renderer_opengl2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = renderer_opengl2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2758BB3217905B8F007F6582 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
|
||||
2758BB41179070C3007F6582 /* quake3_flat.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; name = quake3_flat.iconset; path = ../quake3_flat.iconset; sourceTree = "<group>"; };
|
||||
2772B8001790EABF004CCF57 /* libspeex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libspeex.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B8401790F05B004CCF57 /* cgame.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = cgame.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B8411790F05B004CCF57 /* game.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = game.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B8421790F05B004CCF57 /* q3_ui.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = q3_ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B8431790F05B004CCF57 /* ui.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
278714D717911C1300094CA3 /* libmumblelink.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = libmumblelink.c; sourceTree = "<group>"; };
|
||||
278714D817911C1300094CA3 /* libmumblelink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libmumblelink.h; sourceTree = "<group>"; };
|
||||
|
@ -295,8 +258,11 @@
|
|||
27B0E9F21743E0A800DB1F32 /* null_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = null_main.c; sourceTree = "<group>"; };
|
||||
27B0E9F31743E0A800DB1F32 /* null_net.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = null_net.c; sourceTree = "<group>"; };
|
||||
27B0E9F41743E0A800DB1F32 /* null_snddma.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = null_snddma.c; sourceTree = "<group>"; };
|
||||
A115087325BA520A000CF482 /* libSDL2-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL2-2.0.0.dylib"; path = "../../code/libs/macosx/libSDL2-2.0.0.dylib"; sourceTree = "<group>"; };
|
||||
A1203448257C937600CA384C /* renderer_opengl2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; path = renderer_opengl2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A13ED16726EDA78B00D6A6AC /* ioquake3.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ioquake3.entitlements; path = ioquake3/ioquake3.entitlements; sourceTree = "<group>"; };
|
||||
A1403E57256F15E700DFAD74 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ioquake3/Images.xcassets; sourceTree = "<group>"; };
|
||||
A163B25B2193AF1E00C48278 /* renderer_opengl1.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; path = renderer_opengl1.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A163B25F2193D67700C48278 /* renderer_opengl2.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; path = renderer_opengl2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A1665037218BF45D0086B74B /* SDL_opengles2_gl2ext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_opengles2_gl2ext.h; sourceTree = "<group>"; };
|
||||
A1665038218BF45D0086B74B /* SDL_test_random.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_test_random.h; sourceTree = "<group>"; };
|
||||
A1665039218BF45D0086B74B /* SDL_power.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_power.h; sourceTree = "<group>"; };
|
||||
|
@ -392,11 +358,11 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A163B2602193D67700C48278 /* renderer_opengl2.dylib in Frameworks */,
|
||||
A115085925B9CD0A000CF482 /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
A115085A25B9CD0A000CF482 /* libSDL2main.a in Frameworks */,
|
||||
A163B25C2193AF1E00C48278 /* renderer_opengl1.dylib in Frameworks */,
|
||||
A163B25A2193AEA100C48278 /* libopus.dylib in Frameworks */,
|
||||
A1665968219105430086B74B /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
A16659662191052E0086B74B /* libSDL2main.a in Frameworks */,
|
||||
A1203449257C937600CA384C /* renderer_opengl2.dylib in Frameworks */,
|
||||
273531F014D1275D00EB7BD6 /* Cocoa.framework in Frameworks */,
|
||||
2758BB3317905B8F007F6582 /* IOKit.framework in Frameworks */,
|
||||
27AAD06F178E04FF0093DFC0 /* OpenAL.framework in Frameworks */,
|
||||
|
@ -414,7 +380,6 @@
|
|||
children = (
|
||||
2772B8401790F05B004CCF57 /* cgame.dylib */,
|
||||
2772B8411790F05B004CCF57 /* game.dylib */,
|
||||
2772B8421790F05B004CCF57 /* q3_ui.dylib */,
|
||||
2772B8431790F05B004CCF57 /* ui.dylib */,
|
||||
274FAC89178FB20C00B17C7A /* renderer_opengl1.dylib */,
|
||||
2758BA49178FD062007F6582 /* renderer_opengl2.dylib */,
|
||||
|
@ -585,6 +550,7 @@
|
|||
273531E014D1275D00EB7BD6 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A13ED16726EDA78B00D6A6AC /* ioquake3.entitlements */,
|
||||
2711BE6A14D1364A005EB142 /* code */,
|
||||
273531EE14D1275D00EB7BD6 /* Frameworks */,
|
||||
2711BCC414D12CC6005EB142 /* Libraries */,
|
||||
|
@ -604,7 +570,8 @@
|
|||
273531EE14D1275D00EB7BD6 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A163B25F2193D67700C48278 /* renderer_opengl2.dylib */,
|
||||
A115087325BA520A000CF482 /* libSDL2-2.0.0.dylib */,
|
||||
A1203448257C937600CA384C /* renderer_opengl2.dylib */,
|
||||
A163B25B2193AF1E00C48278 /* renderer_opengl1.dylib */,
|
||||
A1665973219341DF0086B74B /* libopus.dylib */,
|
||||
A1665967219105430086B74B /* libSDL2-2.0.0.dylib */,
|
||||
|
@ -619,7 +586,7 @@
|
|||
273531F614D1275D00EB7BD6 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2758BB41179070C3007F6582 /* quake3_flat.iconset */,
|
||||
A1403E57256F15E700DFAD74 /* Images.xcassets */,
|
||||
273531F714D1275D00EB7BD6 /* ioquake3-Info.plist */,
|
||||
273531FD14D1275D00EB7BD6 /* ioquake3-Prefix.pch */,
|
||||
);
|
||||
|
@ -814,10 +781,9 @@
|
|||
buildPhases = (
|
||||
273531E714D1275D00EB7BD6 /* Sources */,
|
||||
273531E814D1275D00EB7BD6 /* Frameworks */,
|
||||
274FAC8C178FB4C500B17C7A /* Run Script - Bump Version Number */,
|
||||
2758BB35179061C1007F6582 /* Run Script - Copy Renderer & Game Dynamic Libraries, Symlink Architecture */,
|
||||
273531E914D1275D00EB7BD6 /* Resources */,
|
||||
A166596F219105E00086B74B /* Embed Libraries */,
|
||||
A115087225BA51E4000CF482 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -835,8 +801,13 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
TargetAttributes = {
|
||||
273531EA14D1275D00EB7BD6 = {
|
||||
DevelopmentTeam = 9UY8SFDNQ8;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 273531E514D1275D00EB7BD6 /* Build configuration list for PBXProject "ioquake3" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
|
@ -852,8 +823,6 @@
|
|||
projectRoot = "";
|
||||
targets = (
|
||||
273531EA14D1275D00EB7BD6 /* ioquake3 */,
|
||||
2772B8021790EBE0004CCF57 /* all ioquake3 */,
|
||||
2772B8081790EC7F004CCF57 /* all game */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -863,27 +832,13 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2758BB42179070C3007F6582 /* quake3_flat.iconset in Resources */,
|
||||
A1403E58256F15E700DFAD74 /* Images.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
274FAC8C178FB4C500B17C7A /* Run Script - Bump Version Number */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script - Bump Version Number";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#\n# update the version from q_shared.h\n#\nPRODUCT_VERSION_FILE=\"${SRCROOT}/../../code/qcommon/q_shared.h\"\nPRODUCT_VERSION=`cat \"${PRODUCT_VERSION_FILE}\" | grep \"#define PRODUCT_VERSION\" | awk '{print $3}' | sed 's/\\\"//;s/\\\"$//'`\nGIT_VERSION=\"\"\n\nif [ \"${PRODUCT_VERSION}\" != \"\" ]; then\n /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $PRODUCT_VERSION\" \"${INFOPLIST_FILE}\"\nfi\n\n#\n# update the git version\n#\nif [ -e \"${SRCROOT}/../../.git\" ]; then\n GIT_VERSION=`git show -s --pretty=format:%h-%ad --date=short`\n\n if [ \"${GIT_VERSION}\" != \"\" ]; then\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $GIT_VERSION\" \"${INFOPLIST_FILE}\"\n fi\nfi\n";
|
||||
};
|
||||
2758BB35179061C1007F6582 /* Run Script - Copy Renderer & Game Dynamic Libraries, Symlink Architecture */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -896,7 +851,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "#\n# copy the renderer & game dynamic libraries to their appropriate locations within the application bundle\n# symlink appropriate architecture names for universal (fat) binary support\n# TODO: missionpack support\n#\nBUILD=\"${BUILT_PRODUCTS_DIR}\"\nMACOS=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\nCGAME=\"cgame\"\nGAME=\"game\"\nQ3UI=\"q3_ui\"\nUI=\"ui\"\nBASEQ3=\"baseq3\"\nMISSIONPACK=\"missionpack\"\nRENDERER_OPENGL1=\"renderer_opengl1\"\nRENDERER_OPENGL2=\"renderer_opengl2\"\n\nfunction symlinkArch()\n{\n EXT=\"dylib\"\n SEP=\"${3}\"\n SRCFILE=\"${1}\"\n DSTFILE=\"${2}${SEP}\"\n DSTPATH=\"${4}\"\n\n if [ ! -e \"${DSTPATH}/${SRCFILE}.${EXT}\" ]; then\n echo \"**** ERROR: missing ${SRCFILE}.${EXT} from ${MACOS}\"\n exit 1\n fi\n\n if [ ! -d \"${DSTPATH}\" ]; then\n echo \"**** ERROR: path not found ${DSTPATH}\"\n exit 1\n fi\n\n pushd \"${DSTPATH}\" > /dev/null\n\n IS32=`file \"${SRCFILE}.${EXT}\" | grep \"i386\" | awk '{print $NF}'`\n IS64=`file \"${SRCFILE}.${EXT}\" | grep \"x86_64\" | awk '{print $NF}'`\n\n if [ \"${IS32}\" == \"i386\" ]; then\n if [ ! -L \"${DSTFILE}x86.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86.${EXT}\" ]; then\n rm \"${DSTFILE}x86.${EXT}\"\n fi\n\n if [ \"${IS64}\" == \"x86_64\" ]; then\n if [ ! -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86_64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n rm \"${DSTFILE}x86_64.${EXT}\"\n fi\n\n popd > /dev/null\n}\n\nfunction checkBuildFile()\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${BUILD}/${1}'\"\n exit 1\n fi\n}\n\nfunction checkMacOS()\n{\n if [ ! -d \"${MACOS}\" ]; then\n echo \"**** ERROR: missing executable folder path '${EXECUTABLE_FOLDER_PATH}'\"\n exit 1\n fi\n}\n\nfunction safeCopyBuildFileToFolder\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${1}' in build folder '${BUILD}'\"\n exit 1\n fi\n\n if [ ! -d \"${2}\" ]; then\n echo \"**** ERROR: destination folder not found '${2}'\"\n exit 1\n fi\n\n cp -pr \"${BUILD}/${1}\" \"${2}\"\n}\n\nfunction copyToMacOS()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}\"\n}\n\nfunction copyToBaseQ3()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${BASEQ3}\" ]; then\n mkdir \"${MACOS}/${BASEQ3}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${BASEQ3}\"\n}\n\nfunction copyToMissionPack()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${MISSIONPACK}\" ]; then\n mkdir \"${MACOS}/${MISSIONPACK}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${MISSIONPACK}\"\n}\n\ncopyToMacOS \"${RENDERER_OPENGL1}.dylib\"\ncopyToMacOS \"${RENDERER_OPENGL2}.dylib\"\n\nsymlinkArch \"${RENDERER_OPENGL1}\" \"${RENDERER_OPENGL1}\" \"_\" \"${MACOS}\"\nsymlinkArch \"${RENDERER_OPENGL2}\" \"${RENDERER_OPENGL2}\" \"_\" \"${MACOS}\" \n\ncopyToBaseQ3 \"${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${GAME}.dylib\"\nsymlinkArch \"${GAME}\" \"${GAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${Q3UI}.dylib\"\nsymlinkArch \"${Q3UI}\" \"${UI}\" \"\" \"${MACOS}/${BASEQ3}\"\n";
|
||||
shellScript = "#\n# copy the renderer & game dynamic libraries to their appropriate locations within the application bundle\n# symlink appropriate architecture names for universal (fat) binary support\n #\nBUILD=\"${BUILT_PRODUCTS_DIR}\"\nMACOS=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\nCGAME=\"cgame\"\nGAME=\"game\"\nQAGAME=\"qagame\"\nQ3UI=\"q3_ui\"\nUI=\"ui\"\nBASEQ3=\"baseq3\"\nMISSIONPACK=\"missionpack\"\nRENDERER_OPENGL1=\"renderer_opengl1\"\nRENDERER_OPENGL2=\"renderer_opengl2\"\n\nfunction symlinkArch()\n{\n EXT=\"dylib\"\n SEP=\"${3}\"\n SRCFILE=\"${1}\"\n DSTFILE=\"${2}${SEP}\"\n DSTPATH=\"${4}\"\n\n if [ ! -e \"${DSTPATH}/${SRCFILE}.${EXT}\" ]; then\n echo \"**** ERROR: missing ${SRCFILE}.${EXT} from ${MACOS}\"\n exit 1\n fi\n\n if [ ! -d \"${DSTPATH}\" ]; then\n echo \"**** ERROR: path not found ${DSTPATH}\"\n exit 1\n fi\n\n pushd \"${DSTPATH}\" > /dev/null\n\n IS32=`file \"${SRCFILE}.${EXT}\" | grep \"i386\" | awk '{print $NF}'`\n IS64=`file \"${SRCFILE}.${EXT}\" | grep \"x86_64\" | awk '{print $NF}'`\n ISARM=`file \"${SRCFILE}.${EXT}\" | grep \"arm64\" | awk '{print $NF}'`\n \n if [ \"${IS32}\" == \"i386\" ]; then\n if [ ! -L \"${DSTFILE}x86.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86.${EXT}\" ]; then\n rm \"${DSTFILE}x86.${EXT}\"\n fi\n\n if [ \"${IS64}\" == \"x86_64\" ]; then\n if [ ! -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}x86_64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}x86_64.${EXT}\" ]; then\n rm \"${DSTFILE}x86_64.${EXT}\"\n fi\n\n if [ \"${ISARM}\" == \"arm64\" ]; then\n if [ ! -L \"${DSTFILE}arm64.${EXT}\" ]; then\n ln -s \"${SRCFILE}.${EXT}\" \"${DSTFILE}arm64.${EXT}\"\n fi\n elif [ -L \"${DSTFILE}arm64.${EXT}\" ]; then\n rm \"${DSTFILE}arm64.${EXT}\"\n fi\n\n popd > /dev/null\n}\n\nfunction checkBuildFile()\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${BUILD}/${1}'\"\n exit 1\n fi\n}\n\nfunction checkMacOS()\n{\n if [ ! -d \"${MACOS}\" ]; then\n echo \"**** ERROR: missing executable folder path '${EXECUTABLE_FOLDER_PATH}'\"\n exit 1\n fi\n}\n\nfunction safeCopyBuildFileToFolder\n{\n if [ ! -e \"${BUILD}/${1}\" ]; then\n echo \"**** ERROR: file not found '${1}' in build folder '${BUILD}'\"\n exit 1\n fi\n\n if [ ! -d \"${2}\" ]; then\n echo \"**** ERROR: destination folder not found '${2}'\"\n exit 1\n fi\n\n cp -pr \"${BUILD}/${1}\" \"${2}\"\n}\n\nfunction copyToMacOS()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}\"\n}\n\nfunction copyToBaseQ3()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${BASEQ3}\" ]; then\n mkdir \"${MACOS}/${BASEQ3}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${BASEQ3}\"\n}\n\nfunction copyToMissionPack()\n{\n checkBuildFile \"${1}\"\n checkMacOS\n\n if [ ! -d \"${MACOS}/${MISSIONPACK}\" ]; then\n mkdir \"${MACOS}/${MISSIONPACK}\"\n fi\n\n safeCopyBuildFileToFolder \"${1}\" \"${MACOS}/${MISSIONPACK}\"\n}\n\ncopyToMacOS \"${RENDERER_OPENGL1}.dylib\"\ncopyToMacOS \"${RENDERER_OPENGL2}.dylib\"\n\nsymlinkArch \"${RENDERER_OPENGL1}\" \"${RENDERER_OPENGL1}\" \"_\" \"${MACOS}\"\nsymlinkArch \"${RENDERER_OPENGL2}\" \"${RENDERER_OPENGL2}\" \"_\" \"${MACOS}\" \n\ncopyToBaseQ3 \"${BASEQ3}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToBaseQ3 \"${BASEQ3}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${BASEQ3}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${CGAME}.dylib\"\nsymlinkArch \"${CGAME}\" \"${CGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${QAGAME}.dylib\"\nsymlinkArch \"${QAGAME}\" \"${QAGAME}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n\ncopyToMissionPack \"${MISSIONPACK}/${UI}.dylib\"\nsymlinkArch \"${UI}\" \"${UI}\" \"\" \"${MACOS}/${MISSIONPACK}\"\n \n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
@ -961,6 +916,7 @@
|
|||
27AAD00E178E007B0093DFC0 /* snd_openal.c in Sources */,
|
||||
27AAD011178E00AB0093DFC0 /* ioapi.c in Sources */,
|
||||
27AAD013178E00C30093DFC0 /* net_ip.c in Sources */,
|
||||
A1F3185E2603127800A11B0E /* ftola.c in Sources */,
|
||||
27AAD016178E00CE0093DFC0 /* puff.c in Sources */,
|
||||
27AAD01B178E00E80093DFC0 /* q_math.c in Sources */,
|
||||
27AAD01C178E00E80093DFC0 /* q_shared.c in Sources */,
|
||||
|
@ -968,26 +924,17 @@
|
|||
27AAD02D178E013E0093DFC0 /* sdl_snd.c in Sources */,
|
||||
274FAB79178FA81800B17C7A /* snd_main.c in Sources */,
|
||||
274FAB7B178FA86E00B17C7A /* md5.c in Sources */,
|
||||
274FAB86178FA97400B17C7A /* ftola.c in Sources */,
|
||||
274FAB87178FA98500B17C7A /* snapvector.c in Sources */,
|
||||
274FAB88178FA98E00B17C7A /* snd_mixa.s in Sources */,
|
||||
274FAB8A178FA9AA00B17C7A /* matha.s in Sources */,
|
||||
274FABFD178FAC4900B17C7A /* vm_x86.c in Sources */,
|
||||
274FABFE178FAC6E00B17C7A /* tr_noise.c in Sources */,
|
||||
A1F318612603128500A11B0E /* snapvector.c in Sources */,
|
||||
278714D917911C1300094CA3 /* libmumblelink.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
2772B80D1790ECAB004CCF57 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 273531EA14D1275D00EB7BD6 /* ioquake3 */;
|
||||
targetProxy = 2772B80C1790ECAB004CCF57 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
2735320714D1275D00EB7BD6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
|
@ -1006,6 +953,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -1050,7 +998,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -1073,6 +1021,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -1103,7 +1052,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
@ -1111,9 +1060,13 @@
|
|||
2735320A14D1275D00EB7BD6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = ioquake3/ioquake3.entitlements;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = 9UY8SFDNQ8;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "ioquake3-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
|
@ -1128,7 +1081,7 @@
|
|||
"\"$(BUILT_PRODUCTS_DIR)\"",
|
||||
"\"$(SRCROOT)/../../code/libs/macosx\"",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.ioquake3.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = ioquake3;
|
||||
WRAPPER_EXTENSION = app;
|
||||
|
@ -1138,9 +1091,13 @@
|
|||
2735320B14D1275D00EB7BD6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = ioquake3/ioquake3.entitlements;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = 9UY8SFDNQ8;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "ioquake3-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
|
@ -1155,45 +1112,13 @@
|
|||
"\"$(BUILT_PRODUCTS_DIR)\"",
|
||||
"\"$(SRCROOT)/../../code/libs/macosx\"",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.ioquake3.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = ioquake3;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2772B8041790EBE0004CCF57 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2772B8051790EBE0004CCF57 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
2772B80A1790EC7F004CCF57 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
2772B80B1790EC7F004CCF57 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
|
@ -1215,24 +1140,6 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2772B8031790EBE0004CCF57 /* Build configuration list for PBXAggregateTarget "all ioquake3" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2772B8041790EBE0004CCF57 /* Debug */,
|
||||
2772B8051790EBE0004CCF57 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2772B8091790EC7F004CCF57 /* Build configuration list for PBXAggregateTarget "all game" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
2772B80A1790EC7F004CCF57 /* Debug */,
|
||||
2772B80B1790EC7F004CCF57 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 273531E214D1275D00EB7BD6 /* Project object */;
|
||||
|
|
|
@ -1,34 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:cgame.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:game.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:q3_ui.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:ui.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:renderer_opengl1.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:renderer_opengl2.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:botlib.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:jpeg8.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "container:ioquake3.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:opus.xcodeproj">
|
||||
</FileRef>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Game libraries">
|
||||
<FileRef
|
||||
location = "group:botlib.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:cgame.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:game.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:ui.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Renderers">
|
||||
<FileRef
|
||||
location = "group:renderer_opengl1.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:renderer_opengl2.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
<Group
|
||||
location = "container:"
|
||||
name = "Third Party Libraries">
|
||||
<FileRef
|
||||
location = "group:jpeg8.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:opus.xcodeproj">
|
||||
</FileRef>
|
||||
</Group>
|
||||
</Workspace>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1110"
|
||||
LastUpgradeVersion = "1230"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -16,7 +16,21 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A137C9C6258DCEE8009AC639"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame - missionpack"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -29,8 +43,8 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531B314D126C300EB7BD6"
|
||||
BuildableName = "game.dylib"
|
||||
BlueprintName = "game"
|
||||
BuildableName = "qagame.dylib"
|
||||
BlueprintName = "game - baseq3"
|
||||
ReferencedContainer = "container:game.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -42,10 +56,10 @@
|
|||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531C614D1270700EB7BD6"
|
||||
BuildableName = "q3_ui.dylib"
|
||||
BlueprintName = "q3_ui"
|
||||
ReferencedContainer = "container:q3_ui.xcodeproj">
|
||||
BlueprintIdentifier = "A137C98D258DCD55009AC639"
|
||||
BuildableName = "qagame.dylib"
|
||||
BlueprintName = "game - missionpack"
|
||||
ReferencedContainer = "container:game.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
|
@ -58,7 +72,21 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531D814D1272300EB7BD6"
|
||||
BuildableName = "ui.dylib"
|
||||
BlueprintName = "ui"
|
||||
BlueprintName = "ui - missionpack"
|
||||
ReferencedContainer = "container:ui.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A137C91B258DC8DF009AC639"
|
||||
BuildableName = "ui.dylib"
|
||||
BlueprintName = "ui - baseq3"
|
||||
ReferencedContainer = "container:ui.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -87,7 +115,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
|
@ -98,6 +126,15 @@
|
|||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1110"
|
||||
LastUpgradeVersion = "1230"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -16,7 +16,21 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A137C9C6258DCEE8009AC639"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame - missionpack"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -29,8 +43,8 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531B314D126C300EB7BD6"
|
||||
BuildableName = "game.dylib"
|
||||
BlueprintName = "game"
|
||||
BuildableName = "qagame.dylib"
|
||||
BlueprintName = "game - baseq3"
|
||||
ReferencedContainer = "container:game.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -42,10 +56,24 @@
|
|||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531C614D1270700EB7BD6"
|
||||
BuildableName = "q3_ui.dylib"
|
||||
BlueprintName = "q3_ui"
|
||||
ReferencedContainer = "container:q3_ui.xcodeproj">
|
||||
BlueprintIdentifier = "A137C98D258DCD55009AC639"
|
||||
BuildableName = "qagame.dylib"
|
||||
BlueprintName = "game - missionpack"
|
||||
ReferencedContainer = "container:game.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "A137C91B258DC8DF009AC639"
|
||||
BuildableName = "ui.dylib"
|
||||
BlueprintName = "ui - baseq3"
|
||||
ReferencedContainer = "container:ui.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
|
@ -58,7 +86,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "273531D814D1272300EB7BD6"
|
||||
BuildableName = "ui.dylib"
|
||||
BlueprintName = "ui"
|
||||
BlueprintName = "ui - missionpack"
|
||||
ReferencedContainer = "container:ui.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
|
@ -126,10 +154,10 @@
|
|||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2758BA56179059C1007F6582"
|
||||
BuildableName = "libspeex.a"
|
||||
BlueprintName = "speex"
|
||||
ReferencedContainer = "container:speex.xcodeproj">
|
||||
BlueprintIdentifier = "A1665093218BF75B0086B74B"
|
||||
BuildableName = "libopus.dylib"
|
||||
BlueprintName = "opus"
|
||||
ReferencedContainer = "container:opus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
|
@ -171,7 +199,7 @@
|
|||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
|
@ -182,6 +210,15 @@
|
|||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2735319414D125FD00EB7BD6"
|
||||
BuildableName = "cgame.dylib"
|
||||
BlueprintName = "cgame - baseq3"
|
||||
ReferencedContainer = "container:cgame.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon_16x16.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_16x16@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_32x32.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_32x32@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_128x128.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_128x128@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_256x256.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_256x256@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_512x512.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"filename" : "icon_512x512@2x.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 76 KiB |
8
misc/xcode/ioquake3/ioquake3.entitlements
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -238,7 +238,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 2737EBDC14D13F2300675E9F /* Build configuration list for PBXProject "jpeg8" */;
|
||||
|
@ -333,6 +333,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -360,7 +361,7 @@
|
|||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = $SRCROOT/../macosx;
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -383,6 +384,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -403,7 +405,7 @@
|
|||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = $SRCROOT/../macosx;
|
||||
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
@ -56,12 +56,8 @@
|
|||
A1665F3C2193AAEC0086B74B /* celt_lpc.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665ACD2193AAEB0086B74B /* celt_lpc.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F3D2193AAEC0086B74B /* celt_encoder.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665ACE2193AAEB0086B74B /* celt_encoder.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F3E2193AAEC0086B74B /* rate.h in Headers */ = {isa = PBXBuildFile; fileRef = A1665ACF2193AAEB0086B74B /* rate.h */; };
|
||||
A1665F3F2193AAEC0086B74B /* vq_sse2.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD12193AAEB0086B74B /* vq_sse2.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F402193AAEC0086B74B /* pitch_sse4_1.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD22193AAEB0086B74B /* pitch_sse4_1.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F412193AAEC0086B74B /* pitch_sse2.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD32193AAEB0086B74B /* pitch_sse2.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F422193AAEC0086B74B /* x86cpu.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD42193AAEB0086B74B /* x86cpu.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F432193AAEC0086B74B /* x86_celt_map.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD52193AAEB0086B74B /* x86_celt_map.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F442193AAEC0086B74B /* celt_lpc_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD62193AAEB0086B74B /* celt_lpc_sse.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F452193AAEC0086B74B /* pitch_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665AD72193AAEB0086B74B /* pitch_sse.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665F462193AAEC0086B74B /* x86cpu.h in Headers */ = {isa = PBXBuildFile; fileRef = A1665AD82193AAEB0086B74B /* x86cpu.h */; };
|
||||
A1665F472193AAEC0086B74B /* celt_lpc_sse.h in Headers */ = {isa = PBXBuildFile; fileRef = A1665AD92193AAEB0086B74B /* celt_lpc_sse.h */; };
|
||||
|
@ -186,7 +182,6 @@
|
|||
A1665FCE2193AAEC0086B74B /* main_sse.h in Headers */ = {isa = PBXBuildFile; fileRef = A1665B682193AAEB0086B74B /* main_sse.h */; };
|
||||
A1665FCF2193AAEC0086B74B /* SigProc_FIX_sse.h in Headers */ = {isa = PBXBuildFile; fileRef = A1665B692193AAEB0086B74B /* SigProc_FIX_sse.h */; };
|
||||
A1665FD02193AAEC0086B74B /* x86_silk_map.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665B6A2193AAEB0086B74B /* x86_silk_map.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665FD12193AAEC0086B74B /* VAD_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665B6B2193AAEB0086B74B /* VAD_sse.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665FD52193AAEC0086B74B /* biquad_alt.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665B6F2193AAEB0086B74B /* biquad_alt.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665FD62193AAEC0086B74B /* tables_LTP.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665B702193AAEB0086B74B /* tables_LTP.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
A1665FD72193AAEC0086B74B /* LPC_analysis_filter_FLP.c in Sources */ = {isa = PBXBuildFile; fileRef = A1665B722193AAEB0086B74B /* LPC_analysis_filter_FLP.c */; settings = {COMPILER_FLAGS = "-w"; }; };
|
||||
|
@ -1134,7 +1129,7 @@
|
|||
A166508C218BF75B0086B74B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = "Tom Kidd";
|
||||
TargetAttributes = {
|
||||
A1665093218BF75B0086B74B = {
|
||||
|
@ -1197,8 +1192,6 @@
|
|||
A1665FC52193AAEC0086B74B /* warped_autocorrelation_FIX.c in Sources */,
|
||||
A1665FEC2193AAEC0086B74B /* pitch_analysis_core_FLP.c in Sources */,
|
||||
A1665FB02193AAEC0086B74B /* schur64_FIX.c in Sources */,
|
||||
A1665F442193AAEC0086B74B /* celt_lpc_sse.c in Sources */,
|
||||
A1665F3F2193AAEC0086B74B /* vq_sse2.c in Sources */,
|
||||
A16660102193AAEC0086B74B /* NLSF_VQ_weights_laroia.c in Sources */,
|
||||
A1665FF42193AAEC0086B74B /* residual_energy_FLP.c in Sources */,
|
||||
A1665FEF2193AAEC0086B74B /* corrMatrix_FLP.c in Sources */,
|
||||
|
@ -1247,10 +1240,8 @@
|
|||
A1665FD92193AAEC0086B74B /* regularize_correlations_FLP.c in Sources */,
|
||||
A1665E7F2193AAEC0086B74B /* stream.c in Sources */,
|
||||
A1665F4A2193AAEC0086B74B /* pitch.c in Sources */,
|
||||
A1665F402193AAEC0086B74B /* pitch_sse4_1.c in Sources */,
|
||||
A1665FB12193AAEC0086B74B /* LTP_scale_ctrl_FIX.c in Sources */,
|
||||
A1665FE52193AAEC0086B74B /* find_LTP_FLP.c in Sources */,
|
||||
A1665FD12193AAEC0086B74B /* VAD_sse.c in Sources */,
|
||||
A1665FD02193AAEC0086B74B /* x86_silk_map.c in Sources */,
|
||||
A1665F732193AAEC0086B74B /* init_encoder.c in Sources */,
|
||||
A1665F342193AAEC0086B74B /* mathops.c in Sources */,
|
||||
|
@ -1262,7 +1253,6 @@
|
|||
A1665F262193AAEC0086B74B /* mdct.c in Sources */,
|
||||
A1665F4F2193AAEC0086B74B /* entcode.c in Sources */,
|
||||
A166602B2193AAED0086B74B /* mlp_data.c in Sources */,
|
||||
A1665F412193AAEC0086B74B /* pitch_sse2.c in Sources */,
|
||||
A1665F872193AAEC0086B74B /* table_LSF_cos.c in Sources */,
|
||||
A16660112193AAEC0086B74B /* resampler_down2_3.c in Sources */,
|
||||
A1665F802193AAEC0086B74B /* stereo_LR_to_MS.c in Sources */,
|
||||
|
@ -1369,6 +1359,7 @@
|
|||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -1395,7 +1386,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
@ -1429,6 +1420,7 @@
|
|||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -1449,7 +1441,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
|
|
|
@ -1,493 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2711BDBC14D13007005EB142 /* ui_syscalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 2711BDBB14D13007005EB142 /* ui_syscalls.c */; };
|
||||
2772B7BB1790E7C6004CCF57 /* ui_addbots.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B78D1790E7C6004CCF57 /* ui_addbots.c */; };
|
||||
2772B7BC1790E7C6004CCF57 /* ui_atoms.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B78E1790E7C6004CCF57 /* ui_atoms.c */; };
|
||||
2772B7BD1790E7C6004CCF57 /* ui_cdkey.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B78F1790E7C6004CCF57 /* ui_cdkey.c */; };
|
||||
2772B7BE1790E7C6004CCF57 /* ui_cinematics.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7901790E7C6004CCF57 /* ui_cinematics.c */; };
|
||||
2772B7BF1790E7C6004CCF57 /* ui_confirm.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7911790E7C6004CCF57 /* ui_confirm.c */; };
|
||||
2772B7C01790E7C6004CCF57 /* ui_connect.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7921790E7C6004CCF57 /* ui_connect.c */; };
|
||||
2772B7C11790E7C6004CCF57 /* ui_controls2.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7931790E7C6004CCF57 /* ui_controls2.c */; };
|
||||
2772B7C21790E7C6004CCF57 /* ui_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7941790E7C6004CCF57 /* ui_credits.c */; };
|
||||
2772B7C31790E7C6004CCF57 /* ui_demo2.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7951790E7C6004CCF57 /* ui_demo2.c */; };
|
||||
2772B7C41790E7C6004CCF57 /* ui_display.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7961790E7C6004CCF57 /* ui_display.c */; };
|
||||
2772B7C51790E7C6004CCF57 /* ui_gameinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7971790E7C6004CCF57 /* ui_gameinfo.c */; };
|
||||
2772B7C61790E7C6004CCF57 /* ui_ingame.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7981790E7C6004CCF57 /* ui_ingame.c */; };
|
||||
2772B7C71790E7C6004CCF57 /* ui_loadconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7991790E7C6004CCF57 /* ui_loadconfig.c */; };
|
||||
2772B7CA1790E7C6004CCF57 /* ui_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B79C1790E7C6004CCF57 /* ui_main.c */; };
|
||||
2772B7CB1790E7C6004CCF57 /* ui_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B79D1790E7C6004CCF57 /* ui_menu.c */; };
|
||||
2772B7CC1790E7C6004CCF57 /* ui_mfield.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B79E1790E7C6004CCF57 /* ui_mfield.c */; };
|
||||
2772B7CD1790E7C6004CCF57 /* ui_mods.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B79F1790E7C6004CCF57 /* ui_mods.c */; };
|
||||
2772B7CE1790E7C6004CCF57 /* ui_network.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A01790E7C6004CCF57 /* ui_network.c */; };
|
||||
2772B7CF1790E7C6004CCF57 /* ui_options.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A11790E7C6004CCF57 /* ui_options.c */; };
|
||||
2772B7D01790E7C6004CCF57 /* ui_playermodel.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A21790E7C6004CCF57 /* ui_playermodel.c */; };
|
||||
2772B7D11790E7C6004CCF57 /* ui_players.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A31790E7C6004CCF57 /* ui_players.c */; };
|
||||
2772B7D21790E7C6004CCF57 /* ui_playersettings.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A41790E7C6004CCF57 /* ui_playersettings.c */; };
|
||||
2772B7D31790E7C6004CCF57 /* ui_preferences.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A51790E7C6004CCF57 /* ui_preferences.c */; };
|
||||
2772B7D41790E7C6004CCF57 /* ui_qmenu.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A61790E7C6004CCF57 /* ui_qmenu.c */; };
|
||||
2772B7D71790E7C6004CCF57 /* ui_removebots.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7A91790E7C6004CCF57 /* ui_removebots.c */; };
|
||||
2772B7D81790E7C6004CCF57 /* ui_saveconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7AA1790E7C6004CCF57 /* ui_saveconfig.c */; };
|
||||
2772B7D91790E7C6004CCF57 /* ui_serverinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7AB1790E7C6004CCF57 /* ui_serverinfo.c */; };
|
||||
2772B7DA1790E7C6004CCF57 /* ui_servers2.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7AC1790E7C6004CCF57 /* ui_servers2.c */; };
|
||||
2772B7DB1790E7C6004CCF57 /* ui_setup.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7AD1790E7C6004CCF57 /* ui_setup.c */; };
|
||||
2772B7DD1790E7C6004CCF57 /* ui_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7AF1790E7C6004CCF57 /* ui_sound.c */; };
|
||||
2772B7DE1790E7C6004CCF57 /* ui_sparena.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B01790E7C6004CCF57 /* ui_sparena.c */; };
|
||||
2772B7E01790E7C6004CCF57 /* ui_specifyserver.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B21790E7C6004CCF57 /* ui_specifyserver.c */; };
|
||||
2772B7E11790E7C6004CCF57 /* ui_splevel.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B31790E7C6004CCF57 /* ui_splevel.c */; };
|
||||
2772B7E21790E7C6004CCF57 /* ui_sppostgame.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B41790E7C6004CCF57 /* ui_sppostgame.c */; };
|
||||
2772B7E31790E7C6004CCF57 /* ui_spreset.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B51790E7C6004CCF57 /* ui_spreset.c */; };
|
||||
2772B7E41790E7C6004CCF57 /* ui_spskill.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B61790E7C6004CCF57 /* ui_spskill.c */; };
|
||||
2772B7E51790E7C6004CCF57 /* ui_startserver.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B71790E7C6004CCF57 /* ui_startserver.c */; };
|
||||
2772B7E61790E7C6004CCF57 /* ui_team.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B81790E7C6004CCF57 /* ui_team.c */; };
|
||||
2772B7E71790E7C6004CCF57 /* ui_teamorders.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7B91790E7C6004CCF57 /* ui_teamorders.c */; };
|
||||
2772B7E81790E7C6004CCF57 /* ui_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7BA1790E7C6004CCF57 /* ui_video.c */; };
|
||||
2772B7EC1790E800004CCF57 /* bg_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7E91790E800004CCF57 /* bg_lib.c */; };
|
||||
2772B7EE1790E800004CCF57 /* bg_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7EB1790E800004CCF57 /* bg_misc.c */; };
|
||||
2772B7F31790E835004CCF57 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7F01790E835004CCF57 /* q_math.c */; };
|
||||
2772B7F41790E835004CCF57 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B7F11790E835004CCF57 /* q_shared.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
2711BDBB14D13007005EB142 /* ui_syscalls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_syscalls.c; sourceTree = "<group>"; };
|
||||
273531C714D1270700EB7BD6 /* q3_ui.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = q3_ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B78D1790E7C6004CCF57 /* ui_addbots.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_addbots.c; sourceTree = "<group>"; };
|
||||
2772B78E1790E7C6004CCF57 /* ui_atoms.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_atoms.c; sourceTree = "<group>"; };
|
||||
2772B78F1790E7C6004CCF57 /* ui_cdkey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_cdkey.c; sourceTree = "<group>"; };
|
||||
2772B7901790E7C6004CCF57 /* ui_cinematics.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_cinematics.c; sourceTree = "<group>"; };
|
||||
2772B7911790E7C6004CCF57 /* ui_confirm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_confirm.c; sourceTree = "<group>"; };
|
||||
2772B7921790E7C6004CCF57 /* ui_connect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_connect.c; sourceTree = "<group>"; };
|
||||
2772B7931790E7C6004CCF57 /* ui_controls2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_controls2.c; sourceTree = "<group>"; };
|
||||
2772B7941790E7C6004CCF57 /* ui_credits.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_credits.c; sourceTree = "<group>"; };
|
||||
2772B7951790E7C6004CCF57 /* ui_demo2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_demo2.c; sourceTree = "<group>"; };
|
||||
2772B7961790E7C6004CCF57 /* ui_display.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_display.c; sourceTree = "<group>"; };
|
||||
2772B7971790E7C6004CCF57 /* ui_gameinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_gameinfo.c; sourceTree = "<group>"; };
|
||||
2772B7981790E7C6004CCF57 /* ui_ingame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_ingame.c; sourceTree = "<group>"; };
|
||||
2772B7991790E7C6004CCF57 /* ui_loadconfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_loadconfig.c; sourceTree = "<group>"; };
|
||||
2772B79A1790E7C6004CCF57 /* ui_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_local.h; sourceTree = "<group>"; };
|
||||
2772B79B1790E7C6004CCF57 /* ui_login.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_login.c; sourceTree = "<group>"; };
|
||||
2772B79C1790E7C6004CCF57 /* ui_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_main.c; sourceTree = "<group>"; };
|
||||
2772B79D1790E7C6004CCF57 /* ui_menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_menu.c; sourceTree = "<group>"; };
|
||||
2772B79E1790E7C6004CCF57 /* ui_mfield.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_mfield.c; sourceTree = "<group>"; };
|
||||
2772B79F1790E7C6004CCF57 /* ui_mods.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_mods.c; sourceTree = "<group>"; };
|
||||
2772B7A01790E7C6004CCF57 /* ui_network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_network.c; sourceTree = "<group>"; };
|
||||
2772B7A11790E7C6004CCF57 /* ui_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_options.c; sourceTree = "<group>"; };
|
||||
2772B7A21790E7C6004CCF57 /* ui_playermodel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_playermodel.c; sourceTree = "<group>"; };
|
||||
2772B7A31790E7C6004CCF57 /* ui_players.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_players.c; sourceTree = "<group>"; };
|
||||
2772B7A41790E7C6004CCF57 /* ui_playersettings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_playersettings.c; sourceTree = "<group>"; };
|
||||
2772B7A51790E7C6004CCF57 /* ui_preferences.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_preferences.c; sourceTree = "<group>"; };
|
||||
2772B7A61790E7C6004CCF57 /* ui_qmenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_qmenu.c; sourceTree = "<group>"; };
|
||||
2772B7A71790E7C6004CCF57 /* ui_rankings.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_rankings.c; sourceTree = "<group>"; };
|
||||
2772B7A81790E7C6004CCF57 /* ui_rankstatus.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_rankstatus.c; sourceTree = "<group>"; };
|
||||
2772B7A91790E7C6004CCF57 /* ui_removebots.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_removebots.c; sourceTree = "<group>"; };
|
||||
2772B7AA1790E7C6004CCF57 /* ui_saveconfig.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_saveconfig.c; sourceTree = "<group>"; };
|
||||
2772B7AB1790E7C6004CCF57 /* ui_serverinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_serverinfo.c; sourceTree = "<group>"; };
|
||||
2772B7AC1790E7C6004CCF57 /* ui_servers2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_servers2.c; sourceTree = "<group>"; };
|
||||
2772B7AD1790E7C6004CCF57 /* ui_setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_setup.c; sourceTree = "<group>"; };
|
||||
2772B7AE1790E7C6004CCF57 /* ui_signup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_signup.c; sourceTree = "<group>"; };
|
||||
2772B7AF1790E7C6004CCF57 /* ui_sound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_sound.c; sourceTree = "<group>"; };
|
||||
2772B7B01790E7C6004CCF57 /* ui_sparena.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_sparena.c; sourceTree = "<group>"; };
|
||||
2772B7B11790E7C6004CCF57 /* ui_specifyleague.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_specifyleague.c; sourceTree = "<group>"; };
|
||||
2772B7B21790E7C6004CCF57 /* ui_specifyserver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_specifyserver.c; sourceTree = "<group>"; };
|
||||
2772B7B31790E7C6004CCF57 /* ui_splevel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_splevel.c; sourceTree = "<group>"; };
|
||||
2772B7B41790E7C6004CCF57 /* ui_sppostgame.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_sppostgame.c; sourceTree = "<group>"; };
|
||||
2772B7B51790E7C6004CCF57 /* ui_spreset.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_spreset.c; sourceTree = "<group>"; };
|
||||
2772B7B61790E7C6004CCF57 /* ui_spskill.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_spskill.c; sourceTree = "<group>"; };
|
||||
2772B7B71790E7C6004CCF57 /* ui_startserver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_startserver.c; sourceTree = "<group>"; };
|
||||
2772B7B81790E7C6004CCF57 /* ui_team.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_team.c; sourceTree = "<group>"; };
|
||||
2772B7B91790E7C6004CCF57 /* ui_teamorders.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_teamorders.c; sourceTree = "<group>"; };
|
||||
2772B7BA1790E7C6004CCF57 /* ui_video.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_video.c; sourceTree = "<group>"; };
|
||||
2772B7E91790E800004CCF57 /* bg_lib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bg_lib.c; sourceTree = "<group>"; };
|
||||
2772B7EA1790E800004CCF57 /* bg_lib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bg_lib.h; sourceTree = "<group>"; };
|
||||
2772B7EB1790E800004CCF57 /* bg_misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bg_misc.c; sourceTree = "<group>"; };
|
||||
2772B7F01790E835004CCF57 /* q_math.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = q_math.c; sourceTree = "<group>"; };
|
||||
2772B7F11790E835004CCF57 /* q_shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = q_shared.c; sourceTree = "<group>"; };
|
||||
2772B7F21790E835004CCF57 /* q_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = q_shared.h; sourceTree = "<group>"; };
|
||||
2772B7F71790E865004CCF57 /* keycodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keycodes.h; sourceTree = "<group>"; };
|
||||
2772B7F91790E904004CCF57 /* bg_public.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bg_public.h; sourceTree = "<group>"; };
|
||||
2772B7FC1790E9B6004CCF57 /* tr_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tr_types.h; sourceTree = "<group>"; };
|
||||
2772B7FE1790E9C5004CCF57 /* ui_public.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_public.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
273531C414D1270700EB7BD6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2711BDB614D12FCF005EB142 /* code */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7F61790E851004CCF57 /* client */,
|
||||
2711BDB914D12FE9005EB142 /* game */,
|
||||
2711BDB814D12FE3005EB142 /* q3_ui */,
|
||||
2772B7EF1790E819004CCF57 /* qcommon */,
|
||||
2772B7FB1790E994004CCF57 /* renderercommon */,
|
||||
2711BDB714D12FDD005EB142 /* ui */,
|
||||
);
|
||||
name = code;
|
||||
path = ../../code;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
2711BDB714D12FDD005EB142 /* ui */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7FE1790E9C5004CCF57 /* ui_public.h */,
|
||||
2711BDBB14D13007005EB142 /* ui_syscalls.c */,
|
||||
);
|
||||
path = ui;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2711BDB814D12FE3005EB142 /* q3_ui */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B78D1790E7C6004CCF57 /* ui_addbots.c */,
|
||||
2772B78E1790E7C6004CCF57 /* ui_atoms.c */,
|
||||
2772B78F1790E7C6004CCF57 /* ui_cdkey.c */,
|
||||
2772B7901790E7C6004CCF57 /* ui_cinematics.c */,
|
||||
2772B7911790E7C6004CCF57 /* ui_confirm.c */,
|
||||
2772B7921790E7C6004CCF57 /* ui_connect.c */,
|
||||
2772B7931790E7C6004CCF57 /* ui_controls2.c */,
|
||||
2772B7941790E7C6004CCF57 /* ui_credits.c */,
|
||||
2772B7951790E7C6004CCF57 /* ui_demo2.c */,
|
||||
2772B7961790E7C6004CCF57 /* ui_display.c */,
|
||||
2772B7971790E7C6004CCF57 /* ui_gameinfo.c */,
|
||||
2772B7981790E7C6004CCF57 /* ui_ingame.c */,
|
||||
2772B7991790E7C6004CCF57 /* ui_loadconfig.c */,
|
||||
2772B79A1790E7C6004CCF57 /* ui_local.h */,
|
||||
2772B79B1790E7C6004CCF57 /* ui_login.c */,
|
||||
2772B79C1790E7C6004CCF57 /* ui_main.c */,
|
||||
2772B79D1790E7C6004CCF57 /* ui_menu.c */,
|
||||
2772B79E1790E7C6004CCF57 /* ui_mfield.c */,
|
||||
2772B79F1790E7C6004CCF57 /* ui_mods.c */,
|
||||
2772B7A01790E7C6004CCF57 /* ui_network.c */,
|
||||
2772B7A11790E7C6004CCF57 /* ui_options.c */,
|
||||
2772B7A21790E7C6004CCF57 /* ui_playermodel.c */,
|
||||
2772B7A31790E7C6004CCF57 /* ui_players.c */,
|
||||
2772B7A41790E7C6004CCF57 /* ui_playersettings.c */,
|
||||
2772B7A51790E7C6004CCF57 /* ui_preferences.c */,
|
||||
2772B7A61790E7C6004CCF57 /* ui_qmenu.c */,
|
||||
2772B7A71790E7C6004CCF57 /* ui_rankings.c */,
|
||||
2772B7A81790E7C6004CCF57 /* ui_rankstatus.c */,
|
||||
2772B7A91790E7C6004CCF57 /* ui_removebots.c */,
|
||||
2772B7AA1790E7C6004CCF57 /* ui_saveconfig.c */,
|
||||
2772B7AB1790E7C6004CCF57 /* ui_serverinfo.c */,
|
||||
2772B7AC1790E7C6004CCF57 /* ui_servers2.c */,
|
||||
2772B7AD1790E7C6004CCF57 /* ui_setup.c */,
|
||||
2772B7AE1790E7C6004CCF57 /* ui_signup.c */,
|
||||
2772B7AF1790E7C6004CCF57 /* ui_sound.c */,
|
||||
2772B7B01790E7C6004CCF57 /* ui_sparena.c */,
|
||||
2772B7B11790E7C6004CCF57 /* ui_specifyleague.c */,
|
||||
2772B7B21790E7C6004CCF57 /* ui_specifyserver.c */,
|
||||
2772B7B31790E7C6004CCF57 /* ui_splevel.c */,
|
||||
2772B7B41790E7C6004CCF57 /* ui_sppostgame.c */,
|
||||
2772B7B51790E7C6004CCF57 /* ui_spreset.c */,
|
||||
2772B7B61790E7C6004CCF57 /* ui_spskill.c */,
|
||||
2772B7B71790E7C6004CCF57 /* ui_startserver.c */,
|
||||
2772B7B81790E7C6004CCF57 /* ui_team.c */,
|
||||
2772B7B91790E7C6004CCF57 /* ui_teamorders.c */,
|
||||
2772B7BA1790E7C6004CCF57 /* ui_video.c */,
|
||||
);
|
||||
path = q3_ui;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2711BDB914D12FE9005EB142 /* game */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7E91790E800004CCF57 /* bg_lib.c */,
|
||||
2772B7EA1790E800004CCF57 /* bg_lib.h */,
|
||||
2772B7EB1790E800004CCF57 /* bg_misc.c */,
|
||||
2772B7F91790E904004CCF57 /* bg_public.h */,
|
||||
);
|
||||
path = game;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
273531BC14D1270700EB7BD6 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2711BDB614D12FCF005EB142 /* code */,
|
||||
273531C814D1270700EB7BD6 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
273531C814D1270700EB7BD6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
273531C714D1270700EB7BD6 /* q3_ui.dylib */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2772B7EF1790E819004CCF57 /* qcommon */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7F01790E835004CCF57 /* q_math.c */,
|
||||
2772B7F11790E835004CCF57 /* q_shared.c */,
|
||||
2772B7F21790E835004CCF57 /* q_shared.h */,
|
||||
);
|
||||
path = qcommon;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2772B7F61790E851004CCF57 /* client */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7F71790E865004CCF57 /* keycodes.h */,
|
||||
);
|
||||
path = client;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2772B7FB1790E994004CCF57 /* renderercommon */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2772B7FC1790E9B6004CCF57 /* tr_types.h */,
|
||||
);
|
||||
path = renderercommon;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
273531C614D1270700EB7BD6 /* q3_ui */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 273531CB14D1270700EB7BD6 /* Build configuration list for PBXNativeTarget "q3_ui" */;
|
||||
buildPhases = (
|
||||
273531C314D1270700EB7BD6 /* Sources */,
|
||||
273531C414D1270700EB7BD6 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = q3_ui;
|
||||
productName = q3_ui;
|
||||
productReference = 273531C714D1270700EB7BD6 /* q3_ui.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
273531BE14D1270700EB7BD6 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1110;
|
||||
};
|
||||
buildConfigurationList = 273531C114D1270700EB7BD6 /* Build configuration list for PBXProject "q3_ui" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 273531BC14D1270700EB7BD6;
|
||||
productRefGroup = 273531C814D1270700EB7BD6 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
273531C614D1270700EB7BD6 /* q3_ui */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
273531C314D1270700EB7BD6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2711BDBC14D13007005EB142 /* ui_syscalls.c in Sources */,
|
||||
2772B7BB1790E7C6004CCF57 /* ui_addbots.c in Sources */,
|
||||
2772B7BC1790E7C6004CCF57 /* ui_atoms.c in Sources */,
|
||||
2772B7BD1790E7C6004CCF57 /* ui_cdkey.c in Sources */,
|
||||
2772B7BE1790E7C6004CCF57 /* ui_cinematics.c in Sources */,
|
||||
2772B7BF1790E7C6004CCF57 /* ui_confirm.c in Sources */,
|
||||
2772B7C01790E7C6004CCF57 /* ui_connect.c in Sources */,
|
||||
2772B7C11790E7C6004CCF57 /* ui_controls2.c in Sources */,
|
||||
2772B7C21790E7C6004CCF57 /* ui_credits.c in Sources */,
|
||||
2772B7C31790E7C6004CCF57 /* ui_demo2.c in Sources */,
|
||||
2772B7C41790E7C6004CCF57 /* ui_display.c in Sources */,
|
||||
2772B7C51790E7C6004CCF57 /* ui_gameinfo.c in Sources */,
|
||||
2772B7C61790E7C6004CCF57 /* ui_ingame.c in Sources */,
|
||||
2772B7C71790E7C6004CCF57 /* ui_loadconfig.c in Sources */,
|
||||
2772B7CA1790E7C6004CCF57 /* ui_main.c in Sources */,
|
||||
2772B7CB1790E7C6004CCF57 /* ui_menu.c in Sources */,
|
||||
2772B7CC1790E7C6004CCF57 /* ui_mfield.c in Sources */,
|
||||
2772B7CD1790E7C6004CCF57 /* ui_mods.c in Sources */,
|
||||
2772B7CE1790E7C6004CCF57 /* ui_network.c in Sources */,
|
||||
2772B7CF1790E7C6004CCF57 /* ui_options.c in Sources */,
|
||||
2772B7D01790E7C6004CCF57 /* ui_playermodel.c in Sources */,
|
||||
2772B7D11790E7C6004CCF57 /* ui_players.c in Sources */,
|
||||
2772B7D21790E7C6004CCF57 /* ui_playersettings.c in Sources */,
|
||||
2772B7D31790E7C6004CCF57 /* ui_preferences.c in Sources */,
|
||||
2772B7D41790E7C6004CCF57 /* ui_qmenu.c in Sources */,
|
||||
2772B7D71790E7C6004CCF57 /* ui_removebots.c in Sources */,
|
||||
2772B7D81790E7C6004CCF57 /* ui_saveconfig.c in Sources */,
|
||||
2772B7D91790E7C6004CCF57 /* ui_serverinfo.c in Sources */,
|
||||
2772B7DA1790E7C6004CCF57 /* ui_servers2.c in Sources */,
|
||||
2772B7DB1790E7C6004CCF57 /* ui_setup.c in Sources */,
|
||||
2772B7DD1790E7C6004CCF57 /* ui_sound.c in Sources */,
|
||||
2772B7DE1790E7C6004CCF57 /* ui_sparena.c in Sources */,
|
||||
2772B7E01790E7C6004CCF57 /* ui_specifyserver.c in Sources */,
|
||||
2772B7E11790E7C6004CCF57 /* ui_splevel.c in Sources */,
|
||||
2772B7E21790E7C6004CCF57 /* ui_sppostgame.c in Sources */,
|
||||
2772B7E31790E7C6004CCF57 /* ui_spreset.c in Sources */,
|
||||
2772B7E41790E7C6004CCF57 /* ui_spskill.c in Sources */,
|
||||
2772B7E51790E7C6004CCF57 /* ui_startserver.c in Sources */,
|
||||
2772B7E61790E7C6004CCF57 /* ui_team.c in Sources */,
|
||||
2772B7E71790E7C6004CCF57 /* ui_teamorders.c in Sources */,
|
||||
2772B7E81790E7C6004CCF57 /* ui_video.c in Sources */,
|
||||
2772B7EC1790E800004CCF57 /* bg_lib.c in Sources */,
|
||||
2772B7EE1790E800004CCF57 /* bg_misc.c in Sources */,
|
||||
2772B7F31790E835004CCF57 /* q_math.c in Sources */,
|
||||
2772B7F41790E835004CCF57 /* q_shared.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
273531C914D1270700EB7BD6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
273531CA14D1270700EB7BD6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
273531CC14D1270700EB7BD6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
273531CD14D1270700EB7BD6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
273531C114D1270700EB7BD6 /* Build configuration list for PBXProject "q3_ui" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
273531C914D1270700EB7BD6 /* Debug */,
|
||||
273531CA14D1270700EB7BD6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
273531CB14D1270700EB7BD6 /* Build configuration list for PBXNativeTarget "q3_ui" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
273531CC14D1270700EB7BD6 /* Debug */,
|
||||
273531CD14D1270700EB7BD6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 273531BE14D1270700EB7BD6 /* Project object */;
|
||||
}
|
|
@ -44,7 +44,7 @@
|
|||
274FAC83178FB1C800B17C7A /* tr_image_tga.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAC77178FB1C800B17C7A /* tr_image_tga.c */; };
|
||||
274FAC84178FB1C800B17C7A /* tr_noise.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FAC78178FB1C800B17C7A /* tr_noise.c */; };
|
||||
274FAC88178FB1D600B17C7A /* libjpeg8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 274FAC87178FB1D600B17C7A /* libjpeg8.a */; };
|
||||
A163B25E2193D5F800C48278 /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B25D2193D5F800C48278 /* libSDL2-2.0.0.dylib */; };
|
||||
A115085B25B9CD34000CF482 /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B25D2193D5F800C48278 /* libSDL2-2.0.0.dylib */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
|
@ -96,6 +96,8 @@
|
|||
274FAC79178FB1C800B17C7A /* tr_public.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tr_public.h; sourceTree = "<group>"; };
|
||||
274FAC7A178FB1C800B17C7A /* tr_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tr_types.h; sourceTree = "<group>"; };
|
||||
274FAC87178FB1D600B17C7A /* libjpeg8.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libjpeg8.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A11507F825B52132000CF482 /* libSDL2-2.0.14.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL2-2.0.14.dylib"; path = "../../code/libs/macosx/libSDL2-2.0.14.dylib"; sourceTree = "<group>"; };
|
||||
A115082725B533E3000CF482 /* libSDL2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libSDL2.dylib; path = ../../code/libs/macosx/libSDL2.dylib; sourceTree = "<group>"; };
|
||||
A163B25D2193D5F800C48278 /* libSDL2-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL2-2.0.0.dylib"; path = "../../code/libs/macosx/libSDL2-2.0.0.dylib"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -104,7 +106,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A163B25E2193D5F800C48278 /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
A115085B25B9CD34000CF482 /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
274FAC88178FB1D600B17C7A /* libjpeg8.a in Frameworks */,
|
||||
274FAC6B178FB17E00B17C7A /* OpenGL.framework in Frameworks */,
|
||||
);
|
||||
|
@ -199,6 +201,8 @@
|
|||
274FAC68178FB15500B17C7A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A115082725B533E3000CF482 /* libSDL2.dylib */,
|
||||
A11507F825B52132000CF482 /* libSDL2-2.0.14.dylib */,
|
||||
A163B25D2193D5F800C48278 /* libSDL2-2.0.0.dylib */,
|
||||
274FAC6A178FB17E00B17C7A /* OpenGL.framework */,
|
||||
);
|
||||
|
@ -259,7 +263,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1230;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 274FAC08178FAEFC00B17C7A /* Build configuration list for PBXProject "renderer_opengl1" */;
|
||||
|
@ -345,6 +349,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -372,9 +377,10 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -397,6 +403,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -417,8 +424,9 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -426,12 +434,19 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"USE_LOCAL_HEADERS=1",
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
"GL_SILENCE_DEPRECATION=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/jpeg-8c\"",
|
||||
"\"$(SRCROOT)/../../code/SDL2/include\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../code/libs/macosx\"";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -439,12 +454,17 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"USE_LOCAL_HEADERS=1",
|
||||
"GL_SILENCE_DEPRECATION=1",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/jpeg-8c\"",
|
||||
"\"$(SRCROOT)/../../code/SDL2/include\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../code/libs/macosx\"";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
2758B9C6178FBBAC007F6582 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2758B9C0178FBBAC007F6582 /* q_shared.c */; };
|
||||
2758B9CC178FBC8B007F6582 /* libjpeg8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2758B9CB178FBC8B007F6582 /* libjpeg8.a */; };
|
||||
2758B9CE178FBCBC007F6582 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2758B9CD178FBCBC007F6582 /* OpenGL.framework */; };
|
||||
A163B2622193D8FC00C48278 /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B2612193D8FC00C48278 /* libSDL2-2.0.0.dylib */; };
|
||||
A115085E25B9CD6F000CF482 /* libSDL2-2.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A163B2612193D8FC00C48278 /* libSDL2-2.0.0.dylib */; };
|
||||
A163B2662193DF8300C48278 /* tr_image_dds.c in Sources */ = {isa = PBXBuildFile; fileRef = A163B2642193DF8200C48278 /* tr_image_dds.c */; };
|
||||
A163B2672193DF8300C48278 /* tr_dsa.c in Sources */ = {isa = PBXBuildFile; fileRef = A163B2652193DF8300C48278 /* tr_dsa.c */; };
|
||||
A1F1105D23F21AF10030D586 /* shadowfill_fp.c in Sources */ = {isa = PBXBuildFile; fileRef = A1F1104123F21AF00030D586 /* shadowfill_fp.c */; };
|
||||
|
@ -171,6 +171,8 @@
|
|||
2758BA27178FCFC0007F6582 /* texturecolor_vp.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = texturecolor_vp.glsl; sourceTree = "<group>"; };
|
||||
2758BA29178FCFC0007F6582 /* tonemap_fp.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tonemap_fp.glsl; sourceTree = "<group>"; };
|
||||
2758BA2B178FCFC0007F6582 /* tonemap_vp.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tonemap_vp.glsl; sourceTree = "<group>"; };
|
||||
A11507FA25B52155000CF482 /* libSDL2-2.0.14.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL2-2.0.14.dylib"; path = "../../code/libs/macosx/libSDL2-2.0.14.dylib"; sourceTree = "<group>"; };
|
||||
A115082B25B533FB000CF482 /* libSDL2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libSDL2.dylib; path = ../../code/libs/macosx/libSDL2.dylib; sourceTree = "<group>"; };
|
||||
A163B2612193D8FC00C48278 /* libSDL2-2.0.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libSDL2-2.0.0.dylib"; path = "../../code/libs/macosx/libSDL2-2.0.0.dylib"; sourceTree = "<group>"; };
|
||||
A163B2632193DF8200C48278 /* tr_dsa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tr_dsa.h; sourceTree = "<group>"; };
|
||||
A163B2642193DF8200C48278 /* tr_image_dds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tr_image_dds.c; sourceTree = "<group>"; };
|
||||
|
@ -210,7 +212,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A163B2622193D8FC00C48278 /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
A115085E25B9CD6F000CF482 /* libSDL2-2.0.0.dylib in Frameworks */,
|
||||
2758B9CC178FBC8B007F6582 /* libjpeg8.a in Frameworks */,
|
||||
2758B9CE178FBCBC007F6582 /* OpenGL.framework in Frameworks */,
|
||||
);
|
||||
|
@ -338,6 +340,8 @@
|
|||
2758B9C9178FBC6F007F6582 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A115082B25B533FB000CF482 /* libSDL2.dylib */,
|
||||
A11507FA25B52155000CF482 /* libSDL2-2.0.14.dylib */,
|
||||
A163B2612193D8FC00C48278 /* libSDL2-2.0.0.dylib */,
|
||||
2758B9CD178FBCBC007F6582 /* OpenGL.framework */,
|
||||
);
|
||||
|
@ -444,7 +448,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = io;
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
ORGANIZATIONNAME = ioquake;
|
||||
};
|
||||
buildConfigurationList = 274FAC18178FAF0C00B17C7A /* Build configuration list for PBXProject "renderer_opengl2" */;
|
||||
|
@ -583,6 +587,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -609,9 +614,10 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -634,6 +640,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -653,8 +660,9 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS = OpenGL;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -662,15 +670,18 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"USE_LOCAL_HEADERS=1",
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
"GL_SILENCE_DEPRECATION=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/jpeg-8c\"",
|
||||
"\"$(SRCROOT)/../../code/SDL2/include\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/libs/macosx\"",
|
||||
"\"$(SRCROOT)/../../../../../../Library/Developer/Xcode/DerivedData/ioquake3-dqrqeayrbnbwitdwenoviousqwyc/Build/Products/Debug\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../code/libs/macosx\"";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -679,15 +690,16 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"USE_LOCAL_HEADERS=1",
|
||||
"GL_SILENCE_DEPRECATION=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/jpeg-8c\"",
|
||||
"\"$(SRCROOT)/../../code/SDL2/include\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"\"$(SRCROOT)/../../code/libs/macosx\"",
|
||||
"\"$(SRCROOT)/../../../../../../Library/Developer/Xcode/DerivedData/ioquake3-dqrqeayrbnbwitdwenoviousqwyc/Build/Products/Debug\"",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../code/libs/macosx\"";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
|
|
|
@ -17,10 +17,55 @@
|
|||
2772B8331790EE22004CCF57 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8301790EE22004CCF57 /* q_math.c */; };
|
||||
2772B8341790EE22004CCF57 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8311790EE22004CCF57 /* q_shared.c */; };
|
||||
2772B8391790EE51004CCF57 /* ui_syscalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8381790EE51004CCF57 /* ui_syscalls.c */; };
|
||||
A137C922258DC8DF009AC639 /* bg_lib.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8281790EE01004CCF57 /* bg_lib.c */; };
|
||||
A137C923258DC8DF009AC639 /* bg_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B82A1790EE01004CCF57 /* bg_misc.c */; };
|
||||
A137C924258DC8DF009AC639 /* q_math.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8301790EE22004CCF57 /* q_math.c */; };
|
||||
A137C925258DC8DF009AC639 /* q_shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8311790EE22004CCF57 /* q_shared.c */; };
|
||||
A137C93A258DC988009AC639 /* ui_ingame.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F6258DC8D1009AC639 /* ui_ingame.c */; };
|
||||
A137C93C258DC988009AC639 /* ui_spreset.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90D258DC8D1009AC639 /* ui_spreset.c */; };
|
||||
A137C93D258DC988009AC639 /* ui_video.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C903258DC8D1009AC639 /* ui_video.c */; };
|
||||
A137C93E258DC988009AC639 /* ui_addbots.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C908258DC8D1009AC639 /* ui_addbots.c */; };
|
||||
A137C93F258DC988009AC639 /* ui_playersettings.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90E258DC8D1009AC639 /* ui_playersettings.c */; };
|
||||
A137C940258DC988009AC639 /* ui_saveconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F0258DC8D1009AC639 /* ui_saveconfig.c */; };
|
||||
A137C941258DC988009AC639 /* ui_cinematics.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8FA258DC8D1009AC639 /* ui_cinematics.c */; };
|
||||
A137C942258DC988009AC639 /* ui_qmenu.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8FC258DC8D1009AC639 /* ui_qmenu.c */; };
|
||||
A137C943258DC988009AC639 /* ui_playermodel.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90F258DC8D1009AC639 /* ui_playermodel.c */; };
|
||||
A137C944258DC988009AC639 /* ui_mfield.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C914258DC8D1009AC639 /* ui_mfield.c */; };
|
||||
A137C945258DC988009AC639 /* ui_sppostgame.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C916258DC8D1009AC639 /* ui_sppostgame.c */; };
|
||||
A137C947258DC988009AC639 /* ui_removebots.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C907258DC8D1009AC639 /* ui_removebots.c */; };
|
||||
A137C948258DC988009AC639 /* ui_team.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C911258DC8D1009AC639 /* ui_team.c */; };
|
||||
A137C949258DC988009AC639 /* ui_preferences.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C919258DC8D1009AC639 /* ui_preferences.c */; };
|
||||
A137C94A258DC988009AC639 /* ui_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F1258DC8D1009AC639 /* ui_sound.c */; };
|
||||
A137C94B258DC988009AC639 /* ui_splevel.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C906258DC8D1009AC639 /* ui_splevel.c */; };
|
||||
A137C94C258DC988009AC639 /* ui_mods.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8FE258DC8D1009AC639 /* ui_mods.c */; };
|
||||
A137C94D258DC988009AC639 /* ui_setup.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8EE258DC8D1009AC639 /* ui_setup.c */; };
|
||||
A137C94E258DC988009AC639 /* ui_credits.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C909258DC8D1009AC639 /* ui_credits.c */; };
|
||||
A137C94F258DC988009AC639 /* ui_sparena.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90C258DC8D1009AC639 /* ui_sparena.c */; };
|
||||
A137C950258DC988009AC639 /* ui_cdkey.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C901258DC8D1009AC639 /* ui_cdkey.c */; };
|
||||
A137C951258DC988009AC639 /* ui_options.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8EF258DC8D1009AC639 /* ui_options.c */; };
|
||||
A137C953258DC988009AC639 /* ui_specifyserver.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F9258DC8D1009AC639 /* ui_specifyserver.c */; };
|
||||
A137C954258DC988009AC639 /* ui_gameinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90A258DC8D1009AC639 /* ui_gameinfo.c */; };
|
||||
A137C955258DC988009AC639 /* ui_controls2.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C917258DC8D1009AC639 /* ui_controls2.c */; };
|
||||
A137C957258DC988009AC639 /* ui_network.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C918258DC8D1009AC639 /* ui_network.c */; };
|
||||
A137C958258DC988009AC639 /* ui_display.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C913258DC8D1009AC639 /* ui_display.c */; };
|
||||
A137C959258DC988009AC639 /* ui_atoms.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C902258DC8D1009AC639 /* ui_atoms.c */; };
|
||||
A137C95A258DC988009AC639 /* ui_connect.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F5258DC8D1009AC639 /* ui_connect.c */; };
|
||||
A137C95B258DC988009AC639 /* ui_players.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C904258DC8D1009AC639 /* ui_players.c */; };
|
||||
A137C95C258DC988009AC639 /* ui_startserver.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C915258DC8D1009AC639 /* ui_startserver.c */; };
|
||||
A137C95D258DC988009AC639 /* ui_spskill.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F4258DC8D1009AC639 /* ui_spskill.c */; };
|
||||
A137C95E258DC988009AC639 /* ui_serverinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C91A258DC8D1009AC639 /* ui_serverinfo.c */; };
|
||||
A137C95F258DC988009AC639 /* ui_loadconfig.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C90B258DC8D1009AC639 /* ui_loadconfig.c */; };
|
||||
A137C960258DC988009AC639 /* ui_servers2.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F3258DC8D1009AC639 /* ui_servers2.c */; };
|
||||
A137C961258DC988009AC639 /* ui_demo2.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C910258DC8D1009AC639 /* ui_demo2.c */; };
|
||||
A137C962258DC988009AC639 /* ui_main.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F2258DC8D1009AC639 /* ui_main.c */; };
|
||||
A137C963258DC988009AC639 /* ui_teamorders.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8F7258DC8D1009AC639 /* ui_teamorders.c */; };
|
||||
A137C964258DC988009AC639 /* ui_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8FD258DC8D1009AC639 /* ui_menu.c */; };
|
||||
A137C965258DC988009AC639 /* ui_confirm.c in Sources */ = {isa = PBXBuildFile; fileRef = A137C8ED258DC8D1009AC639 /* ui_confirm.c */; };
|
||||
A137C980258DCBF4009AC639 /* ui_syscalls.c in Sources */ = {isa = PBXBuildFile; fileRef = 2772B8381790EE51004CCF57 /* ui_syscalls.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
273531D914D1272300EB7BD6 /* ui.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
273531D914D1272300EB7BD6 /* missionpack/ui.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = missionpack/ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2772B8121790EDA0004CCF57 /* ui_atoms.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_atoms.c; sourceTree = "<group>"; };
|
||||
2772B8131790EDA0004CCF57 /* ui_gameinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_gameinfo.c; sourceTree = "<group>"; };
|
||||
2772B8141790EDA0004CCF57 /* ui_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_local.h; sourceTree = "<group>"; };
|
||||
|
@ -39,6 +84,53 @@
|
|||
2772B8321790EE22004CCF57 /* q_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = q_shared.h; sourceTree = "<group>"; };
|
||||
2772B8361790EE2F004CCF57 /* tr_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tr_types.h; sourceTree = "<group>"; };
|
||||
2772B8381790EE51004CCF57 /* ui_syscalls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ui_syscalls.c; sourceTree = "<group>"; };
|
||||
A137C8ED258DC8D1009AC639 /* ui_confirm.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_confirm.c; sourceTree = "<group>"; };
|
||||
A137C8EE258DC8D1009AC639 /* ui_setup.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_setup.c; sourceTree = "<group>"; };
|
||||
A137C8EF258DC8D1009AC639 /* ui_options.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_options.c; sourceTree = "<group>"; };
|
||||
A137C8F0258DC8D1009AC639 /* ui_saveconfig.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_saveconfig.c; sourceTree = "<group>"; };
|
||||
A137C8F1258DC8D1009AC639 /* ui_sound.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_sound.c; sourceTree = "<group>"; };
|
||||
A137C8F2258DC8D1009AC639 /* ui_main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_main.c; sourceTree = "<group>"; };
|
||||
A137C8F3258DC8D1009AC639 /* ui_servers2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_servers2.c; sourceTree = "<group>"; };
|
||||
A137C8F4258DC8D1009AC639 /* ui_spskill.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_spskill.c; sourceTree = "<group>"; };
|
||||
A137C8F5258DC8D1009AC639 /* ui_connect.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_connect.c; sourceTree = "<group>"; };
|
||||
A137C8F6258DC8D1009AC639 /* ui_ingame.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_ingame.c; sourceTree = "<group>"; };
|
||||
A137C8F7258DC8D1009AC639 /* ui_teamorders.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_teamorders.c; sourceTree = "<group>"; };
|
||||
A137C8F8258DC8D1009AC639 /* ui_local.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ui_local.h; sourceTree = "<group>"; };
|
||||
A137C8F9258DC8D1009AC639 /* ui_specifyserver.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_specifyserver.c; sourceTree = "<group>"; };
|
||||
A137C8FA258DC8D1009AC639 /* ui_cinematics.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_cinematics.c; sourceTree = "<group>"; };
|
||||
A137C8FB258DC8D1009AC639 /* ui_rankstatus.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_rankstatus.c; sourceTree = "<group>"; };
|
||||
A137C8FC258DC8D1009AC639 /* ui_qmenu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_qmenu.c; sourceTree = "<group>"; };
|
||||
A137C8FD258DC8D1009AC639 /* ui_menu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_menu.c; sourceTree = "<group>"; };
|
||||
A137C8FE258DC8D1009AC639 /* ui_mods.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_mods.c; sourceTree = "<group>"; };
|
||||
A137C8FF258DC8D1009AC639 /* ui_signup.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_signup.c; sourceTree = "<group>"; };
|
||||
A137C900258DC8D1009AC639 /* ui_rankings.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_rankings.c; sourceTree = "<group>"; };
|
||||
A137C901258DC8D1009AC639 /* ui_cdkey.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_cdkey.c; sourceTree = "<group>"; };
|
||||
A137C902258DC8D1009AC639 /* ui_atoms.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_atoms.c; sourceTree = "<group>"; };
|
||||
A137C903258DC8D1009AC639 /* ui_video.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_video.c; sourceTree = "<group>"; };
|
||||
A137C904258DC8D1009AC639 /* ui_players.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_players.c; sourceTree = "<group>"; };
|
||||
A137C905258DC8D1009AC639 /* ui_specifyleague.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_specifyleague.c; sourceTree = "<group>"; };
|
||||
A137C906258DC8D1009AC639 /* ui_splevel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_splevel.c; sourceTree = "<group>"; };
|
||||
A137C907258DC8D1009AC639 /* ui_removebots.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_removebots.c; sourceTree = "<group>"; };
|
||||
A137C908258DC8D1009AC639 /* ui_addbots.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_addbots.c; sourceTree = "<group>"; };
|
||||
A137C909258DC8D1009AC639 /* ui_credits.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_credits.c; sourceTree = "<group>"; };
|
||||
A137C90A258DC8D1009AC639 /* ui_gameinfo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_gameinfo.c; sourceTree = "<group>"; };
|
||||
A137C90B258DC8D1009AC639 /* ui_loadconfig.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_loadconfig.c; sourceTree = "<group>"; };
|
||||
A137C90C258DC8D1009AC639 /* ui_sparena.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_sparena.c; sourceTree = "<group>"; };
|
||||
A137C90D258DC8D1009AC639 /* ui_spreset.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_spreset.c; sourceTree = "<group>"; };
|
||||
A137C90E258DC8D1009AC639 /* ui_playersettings.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_playersettings.c; sourceTree = "<group>"; };
|
||||
A137C90F258DC8D1009AC639 /* ui_playermodel.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_playermodel.c; sourceTree = "<group>"; };
|
||||
A137C910258DC8D1009AC639 /* ui_demo2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_demo2.c; sourceTree = "<group>"; };
|
||||
A137C911258DC8D1009AC639 /* ui_team.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_team.c; sourceTree = "<group>"; };
|
||||
A137C912258DC8D1009AC639 /* ui_login.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_login.c; sourceTree = "<group>"; };
|
||||
A137C913258DC8D1009AC639 /* ui_display.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_display.c; sourceTree = "<group>"; };
|
||||
A137C914258DC8D1009AC639 /* ui_mfield.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_mfield.c; sourceTree = "<group>"; };
|
||||
A137C915258DC8D1009AC639 /* ui_startserver.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_startserver.c; sourceTree = "<group>"; };
|
||||
A137C916258DC8D1009AC639 /* ui_sppostgame.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_sppostgame.c; sourceTree = "<group>"; };
|
||||
A137C917258DC8D1009AC639 /* ui_controls2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_controls2.c; sourceTree = "<group>"; };
|
||||
A137C918258DC8D1009AC639 /* ui_network.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_network.c; sourceTree = "<group>"; };
|
||||
A137C919258DC8D1009AC639 /* ui_preferences.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_preferences.c; sourceTree = "<group>"; };
|
||||
A137C91A258DC8D1009AC639 /* ui_serverinfo.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = ui_serverinfo.c; sourceTree = "<group>"; };
|
||||
A137C92B258DC8DF009AC639 /* baseq3/ui.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = baseq3/ui.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -49,6 +141,13 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C927258DC8DF009AC639 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
@ -63,7 +162,8 @@
|
|||
273531DA14D1272300EB7BD6 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
273531D914D1272300EB7BD6 /* ui.dylib */,
|
||||
273531D914D1272300EB7BD6 /* missionpack/ui.dylib */,
|
||||
A137C92B258DC8DF009AC639 /* baseq3/ui.dylib */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -73,6 +173,7 @@
|
|||
children = (
|
||||
2772B8251790EDCC004CCF57 /* client */,
|
||||
2772B8241790EDC6004CCF57 /* game */,
|
||||
A137C8EC258DC8D1009AC639 /* q3_ui */,
|
||||
2772B8231790EDC1004CCF57 /* qcommon */,
|
||||
2772B8221790EDA7004CCF57 /* renderercommon */,
|
||||
2772B8111790ED78004CCF57 /* ui */,
|
||||
|
@ -134,12 +235,65 @@
|
|||
path = client;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A137C8EC258DC8D1009AC639 /* q3_ui */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A137C908258DC8D1009AC639 /* ui_addbots.c */,
|
||||
A137C902258DC8D1009AC639 /* ui_atoms.c */,
|
||||
A137C901258DC8D1009AC639 /* ui_cdkey.c */,
|
||||
A137C8FA258DC8D1009AC639 /* ui_cinematics.c */,
|
||||
A137C8ED258DC8D1009AC639 /* ui_confirm.c */,
|
||||
A137C8F5258DC8D1009AC639 /* ui_connect.c */,
|
||||
A137C917258DC8D1009AC639 /* ui_controls2.c */,
|
||||
A137C909258DC8D1009AC639 /* ui_credits.c */,
|
||||
A137C910258DC8D1009AC639 /* ui_demo2.c */,
|
||||
A137C913258DC8D1009AC639 /* ui_display.c */,
|
||||
A137C90A258DC8D1009AC639 /* ui_gameinfo.c */,
|
||||
A137C8F6258DC8D1009AC639 /* ui_ingame.c */,
|
||||
A137C90B258DC8D1009AC639 /* ui_loadconfig.c */,
|
||||
A137C8F8258DC8D1009AC639 /* ui_local.h */,
|
||||
A137C912258DC8D1009AC639 /* ui_login.c */,
|
||||
A137C8F2258DC8D1009AC639 /* ui_main.c */,
|
||||
A137C8FD258DC8D1009AC639 /* ui_menu.c */,
|
||||
A137C914258DC8D1009AC639 /* ui_mfield.c */,
|
||||
A137C8FE258DC8D1009AC639 /* ui_mods.c */,
|
||||
A137C918258DC8D1009AC639 /* ui_network.c */,
|
||||
A137C8EF258DC8D1009AC639 /* ui_options.c */,
|
||||
A137C90F258DC8D1009AC639 /* ui_playermodel.c */,
|
||||
A137C904258DC8D1009AC639 /* ui_players.c */,
|
||||
A137C90E258DC8D1009AC639 /* ui_playersettings.c */,
|
||||
A137C919258DC8D1009AC639 /* ui_preferences.c */,
|
||||
A137C8FC258DC8D1009AC639 /* ui_qmenu.c */,
|
||||
A137C900258DC8D1009AC639 /* ui_rankings.c */,
|
||||
A137C8FB258DC8D1009AC639 /* ui_rankstatus.c */,
|
||||
A137C907258DC8D1009AC639 /* ui_removebots.c */,
|
||||
A137C8F0258DC8D1009AC639 /* ui_saveconfig.c */,
|
||||
A137C91A258DC8D1009AC639 /* ui_serverinfo.c */,
|
||||
A137C8F3258DC8D1009AC639 /* ui_servers2.c */,
|
||||
A137C8EE258DC8D1009AC639 /* ui_setup.c */,
|
||||
A137C8FF258DC8D1009AC639 /* ui_signup.c */,
|
||||
A137C8F1258DC8D1009AC639 /* ui_sound.c */,
|
||||
A137C90C258DC8D1009AC639 /* ui_sparena.c */,
|
||||
A137C905258DC8D1009AC639 /* ui_specifyleague.c */,
|
||||
A137C8F9258DC8D1009AC639 /* ui_specifyserver.c */,
|
||||
A137C906258DC8D1009AC639 /* ui_splevel.c */,
|
||||
A137C916258DC8D1009AC639 /* ui_sppostgame.c */,
|
||||
A137C90D258DC8D1009AC639 /* ui_spreset.c */,
|
||||
A137C8F4258DC8D1009AC639 /* ui_spskill.c */,
|
||||
A137C915258DC8D1009AC639 /* ui_startserver.c */,
|
||||
A137C911258DC8D1009AC639 /* ui_team.c */,
|
||||
A137C8F7258DC8D1009AC639 /* ui_teamorders.c */,
|
||||
A137C903258DC8D1009AC639 /* ui_video.c */,
|
||||
);
|
||||
path = q3_ui;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
273531D814D1272300EB7BD6 /* ui */ = {
|
||||
273531D814D1272300EB7BD6 /* ui - missionpack */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 273531DD14D1272300EB7BD6 /* Build configuration list for PBXNativeTarget "ui" */;
|
||||
buildConfigurationList = 273531DD14D1272300EB7BD6 /* Build configuration list for PBXNativeTarget "ui - missionpack" */;
|
||||
buildPhases = (
|
||||
273531D514D1272300EB7BD6 /* Sources */,
|
||||
273531D614D1272300EB7BD6 /* Frameworks */,
|
||||
|
@ -148,9 +302,25 @@
|
|||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ui;
|
||||
name = "ui - missionpack";
|
||||
productName = ui;
|
||||
productReference = 273531D914D1272300EB7BD6 /* ui.dylib */;
|
||||
productReference = 273531D914D1272300EB7BD6 /* missionpack/ui.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
A137C91B258DC8DF009AC639 /* ui - baseq3 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = A137C928258DC8DF009AC639 /* Build configuration list for PBXNativeTarget "ui - baseq3" */;
|
||||
buildPhases = (
|
||||
A137C91C258DC8DF009AC639 /* Sources */,
|
||||
A137C927258DC8DF009AC639 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "ui - baseq3";
|
||||
productName = ui;
|
||||
productReference = A137C92B258DC8DF009AC639 /* baseq3/ui.dylib */;
|
||||
productType = "com.apple.product-type.library.dynamic";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
@ -159,7 +329,7 @@
|
|||
273531D014D1272300EB7BD6 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1110;
|
||||
LastUpgradeCheck = 1220;
|
||||
};
|
||||
buildConfigurationList = 273531D314D1272300EB7BD6 /* Build configuration list for PBXProject "ui" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
|
@ -174,7 +344,8 @@
|
|||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
273531D814D1272300EB7BD6 /* ui */,
|
||||
A137C91B258DC8DF009AC639 /* ui - baseq3 */,
|
||||
273531D814D1272300EB7BD6 /* ui - missionpack */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -197,6 +368,58 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
A137C91C258DC8DF009AC639 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A137C95A258DC988009AC639 /* ui_connect.c in Sources */,
|
||||
A137C94F258DC988009AC639 /* ui_sparena.c in Sources */,
|
||||
A137C943258DC988009AC639 /* ui_playermodel.c in Sources */,
|
||||
A137C94D258DC988009AC639 /* ui_setup.c in Sources */,
|
||||
A137C93A258DC988009AC639 /* ui_ingame.c in Sources */,
|
||||
A137C949258DC988009AC639 /* ui_preferences.c in Sources */,
|
||||
A137C94B258DC988009AC639 /* ui_splevel.c in Sources */,
|
||||
A137C94E258DC988009AC639 /* ui_credits.c in Sources */,
|
||||
A137C953258DC988009AC639 /* ui_specifyserver.c in Sources */,
|
||||
A137C950258DC988009AC639 /* ui_cdkey.c in Sources */,
|
||||
A137C95E258DC988009AC639 /* ui_serverinfo.c in Sources */,
|
||||
A137C959258DC988009AC639 /* ui_atoms.c in Sources */,
|
||||
A137C94A258DC988009AC639 /* ui_sound.c in Sources */,
|
||||
A137C948258DC988009AC639 /* ui_team.c in Sources */,
|
||||
A137C95C258DC988009AC639 /* ui_startserver.c in Sources */,
|
||||
A137C94C258DC988009AC639 /* ui_mods.c in Sources */,
|
||||
A137C964258DC988009AC639 /* ui_menu.c in Sources */,
|
||||
A137C93C258DC988009AC639 /* ui_spreset.c in Sources */,
|
||||
A137C95F258DC988009AC639 /* ui_loadconfig.c in Sources */,
|
||||
A137C941258DC988009AC639 /* ui_cinematics.c in Sources */,
|
||||
A137C947258DC988009AC639 /* ui_removebots.c in Sources */,
|
||||
A137C95D258DC988009AC639 /* ui_spskill.c in Sources */,
|
||||
A137C922258DC8DF009AC639 /* bg_lib.c in Sources */,
|
||||
A137C93D258DC988009AC639 /* ui_video.c in Sources */,
|
||||
A137C940258DC988009AC639 /* ui_saveconfig.c in Sources */,
|
||||
A137C923258DC8DF009AC639 /* bg_misc.c in Sources */,
|
||||
A137C93E258DC988009AC639 /* ui_addbots.c in Sources */,
|
||||
A137C960258DC988009AC639 /* ui_servers2.c in Sources */,
|
||||
A137C963258DC988009AC639 /* ui_teamorders.c in Sources */,
|
||||
A137C955258DC988009AC639 /* ui_controls2.c in Sources */,
|
||||
A137C961258DC988009AC639 /* ui_demo2.c in Sources */,
|
||||
A137C95B258DC988009AC639 /* ui_players.c in Sources */,
|
||||
A137C942258DC988009AC639 /* ui_qmenu.c in Sources */,
|
||||
A137C954258DC988009AC639 /* ui_gameinfo.c in Sources */,
|
||||
A137C951258DC988009AC639 /* ui_options.c in Sources */,
|
||||
A137C924258DC8DF009AC639 /* q_math.c in Sources */,
|
||||
A137C965258DC988009AC639 /* ui_confirm.c in Sources */,
|
||||
A137C962258DC988009AC639 /* ui_main.c in Sources */,
|
||||
A137C980258DCBF4009AC639 /* ui_syscalls.c in Sources */,
|
||||
A137C944258DC988009AC639 /* ui_mfield.c in Sources */,
|
||||
A137C925258DC8DF009AC639 /* q_shared.c in Sources */,
|
||||
A137C957258DC988009AC639 /* ui_network.c in Sources */,
|
||||
A137C945258DC988009AC639 /* ui_sppostgame.c in Sources */,
|
||||
A137C958258DC988009AC639 /* ui_display.c in Sources */,
|
||||
A137C93F258DC988009AC639 /* ui_playersettings.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
@ -217,6 +440,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -231,7 +455,6 @@
|
|||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
MISSIONPACK,
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
|
@ -243,7 +466,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
|
@ -266,6 +489,7 @@
|
|||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
@ -277,7 +501,7 @@
|
|||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = MISSIONPACK;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
GCC_VERSION = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
|
@ -285,7 +509,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
|
@ -297,7 +521,7 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = missionpack/ui;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -308,7 +532,34 @@
|
|||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PRODUCT_NAME = missionpack/ui;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A137C929258DC8DF009AC639 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = baseq3/ui;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A137C92A258DC8DF009AC639 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
EXECUTABLE_PREFIX = "";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
PRODUCT_NAME = baseq3/ui;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -324,7 +575,7 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
273531DD14D1272300EB7BD6 /* Build configuration list for PBXNativeTarget "ui" */ = {
|
||||
273531DD14D1272300EB7BD6 /* Build configuration list for PBXNativeTarget "ui - missionpack" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
273531DE14D1272300EB7BD6 /* Debug */,
|
||||
|
@ -333,6 +584,15 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
A137C928258DC8DF009AC639 /* Build configuration list for PBXNativeTarget "ui - baseq3" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A137C929258DC8DF009AC639 /* Debug */,
|
||||
A137C92A258DC8DF009AC639 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 273531D014D1272300EB7BD6 /* Project object */;
|
||||
|
|
|
@ -26,7 +26,6 @@ LIBRARIES:
|
|||
|
||||
TODO:
|
||||
- dedicated support
|
||||
- missionpack support
|
||||
- curl.xcodeproj
|
||||
- ogg.xcodeproj (ogg vorbis support)
|
||||
- zlib.xcodeproj
|
||||
|
|