Skip to content

Commit 1ba9c8a

Browse files
committed
Updated SDL2 to 2.0.10 and SDL2_ttf to 2.0.18, and fixed last trophy text
1 parent 645e7e9 commit 1ba9c8a

File tree

170 files changed

+26329
-9349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+26329
-9349
lines changed

data/en.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ level, and stay alive.
144144
Ammo collector
145145
Finish a level [1P, really hard]
146146
with more than 100 ammo.
147-
Over the world
148-
Finish a level in
149-
network mode.
147+
Simple game
148+
Finish a level
149+
(yeah, that's all.)
150150
GAME CREATED BY DAVID "GAZI" GHIASSI
151151
PROGRAMMED IN C LANGUAGE
152152
LIBRARIES USED:

dep/win64-mingw/SDL2/x64/include/SDL2/SDL.h

Lines changed: 108 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -42,6 +42,7 @@
4242
#include "SDL_filesystem.h"
4343
#include "SDL_gamecontroller.h"
4444
#include "SDL_haptic.h"
45+
#include "SDL_hidapi.h"
4546
#include "SDL_hints.h"
4647
#include "SDL_joystick.h"
4748
#include "SDL_loadso.h"
@@ -93,37 +94,130 @@ extern "C" {
9394
/* @} */
9495

9596
/**
96-
* This function initializes the subsystems specified by \c flags
97+
* Initialize the SDL library.
98+
*
99+
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
100+
* two may be used interchangeably. Though for readability of your code
101+
* SDL_InitSubSystem() might be preferred.
102+
*
103+
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
104+
* subsystems are initialized by default. Message boxes
105+
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
106+
* video subsystem, in hopes of being useful in showing an error dialog when
107+
* SDL_Init fails. You must specifically initialize other subsystems if you
108+
* use them in your application.
109+
*
110+
* Logging (such as SDL_Log) works without initialization, too.
111+
*
112+
* `flags` may be any of the following OR'd together:
113+
*
114+
* - `SDL_INIT_TIMER`: timer subsystem
115+
* - `SDL_INIT_AUDIO`: audio subsystem
116+
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
117+
* subsystem
118+
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
119+
* events subsystem
120+
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
121+
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
122+
* initializes the joystick subsystem
123+
* - `SDL_INIT_EVENTS`: events subsystem
124+
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
125+
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
126+
*
127+
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
128+
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
129+
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
130+
* this call will increase the ref-count and return.
131+
*
132+
* \param flags subsystem initialization flags
133+
* \returns 0 on success or a negative error code on failure; call
134+
* SDL_GetError() for more information.
135+
*
136+
* \since This function is available since SDL 2.0.0.
137+
*
138+
* \sa SDL_InitSubSystem
139+
* \sa SDL_Quit
140+
* \sa SDL_SetMainReady
141+
* \sa SDL_WasInit
97142
*/
98143
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
99144

100145
/**
101-
* This function initializes specific SDL subsystems
146+
* Compatibility function to initialize the SDL library.
147+
*
148+
* In SDL2, this function and SDL_Init() are interchangeable.
102149
*
103-
* Subsystem initialization is ref-counted, you must call
104-
* SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
105-
* shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
106-
* If a subsystem is already loaded then this call will
107-
* increase the ref-count and return.
150+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
151+
* \returns 0 on success or a negative error code on failure; call
152+
* SDL_GetError() for more information.
153+
*
154+
* \since This function is available since SDL 2.0.0.
155+
*
156+
* \sa SDL_Init
157+
* \sa SDL_Quit
158+
* \sa SDL_QuitSubSystem
108159
*/
109160
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
110161

111162
/**
112-
* This function cleans up specific SDL subsystems
163+
* Shut down specific SDL subsystems.
164+
*
165+
* If you start a subsystem using a call to that subsystem's init function
166+
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
167+
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
168+
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
169+
* generally, you should not be using those functions directly anyhow; use
170+
* SDL_Init() instead.
171+
*
172+
* You still need to call SDL_Quit() even if you close all open subsystems
173+
* with SDL_QuitSubSystem().
174+
*
175+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
176+
*
177+
* \since This function is available since SDL 2.0.0.
178+
*
179+
* \sa SDL_InitSubSystem
180+
* \sa SDL_Quit
113181
*/
114182
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
115183

116184
/**
117-
* This function returns a mask of the specified subsystems which have
118-
* previously been initialized.
185+
* Get a mask of the specified subsystems which are currently initialized.
186+
*
187+
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
188+
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
189+
* returns the initialization status of the specified subsystems.
190+
*
191+
* The return value does not include SDL_INIT_NOPARACHUTE.
119192
*
120-
* If \c flags is 0, it returns a mask of all initialized subsystems.
193+
* \since This function is available since SDL 2.0.0.
194+
*
195+
* \sa SDL_Init
196+
* \sa SDL_InitSubSystem
121197
*/
122198
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
123199

124200
/**
125-
* This function cleans up all initialized subsystems. You should
126-
* call it upon all exit conditions.
201+
* Clean up all initialized subsystems.
202+
*
203+
* You should call this function even if you have already shutdown each
204+
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
205+
* function even in the case of errors in initialization.
206+
*
207+
* If you start a subsystem using a call to that subsystem's init function
208+
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
209+
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
210+
* it down before calling SDL_Quit(). But generally, you should not be using
211+
* those functions directly anyhow; use SDL_Init() instead.
212+
*
213+
* You can use this function with atexit() to ensure that it is run when your
214+
* application is shutdown, but it is not wise to do this from a library or
215+
* other dynamically loaded code.
216+
*
217+
* \since This function is available since SDL 2.0.0.
218+
*
219+
* \sa SDL_Init
220+
* \sa SDL_QuitSubSystem
127221
*/
128222
extern DECLSPEC void SDLCALL SDL_Quit(void);
129223

dep/win64-mingw/SDL2/x64/include/SDL2/SDL_assert.h

Lines changed: 81 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Simple DirectMedia Layer
3-
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
3+
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
44
55
This software is provided 'as-is', without any express or implied
66
warranty. In no event will the authors be held liable for any damages
@@ -53,8 +53,10 @@ assert can have unique static variables associated with it.
5353
#define SDL_TriggerBreakpoint() __debugbreak()
5454
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
5555
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
56-
#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
56+
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
5757
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
58+
#elif defined(__APPLE__) && defined(__arm__)
59+
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
5860
#elif defined(__386__) && defined(__WATCOMC__)
5961
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
6062
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
@@ -187,92 +189,121 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
187189
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
188190

189191

192+
/**
193+
* A callback that fires when an SDL assertion fails.
194+
*
195+
* \param data a pointer to the SDL_AssertData structure corresponding to the
196+
* current assertion
197+
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
198+
* \returns an SDL_AssertState value indicating how to handle the failure.
199+
*/
190200
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
191201
const SDL_AssertData* data, void* userdata);
192202

193203
/**
194-
* \brief Set an application-defined assertion handler.
204+
* Set an application-defined assertion handler.
195205
*
196-
* This allows an app to show its own assertion UI and/or force the
197-
* response to an assertion failure. If the app doesn't provide this, SDL
198-
* will try to do the right thing, popping up a system-specific GUI dialog,
199-
* and probably minimizing any fullscreen windows.
206+
* This function allows an application to show its own assertion UI and/or
207+
* force the response to an assertion failure. If the application doesn't
208+
* provide this, SDL will try to do the right thing, popping up a
209+
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
200210
*
201-
* This callback may fire from any thread, but it runs wrapped in a mutex, so
202-
* it will only fire from one thread at a time.
211+
* This callback may fire from any thread, but it runs wrapped in a mutex, so
212+
* it will only fire from one thread at a time.
203213
*
204-
* Setting the callback to NULL restores SDL's original internal handler.
214+
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
205215
*
206-
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
216+
* \param handler the SDL_AssertionHandler function to call when an assertion
217+
* fails or NULL for the default handler
218+
* \param userdata a pointer that is passed to `handler`
207219
*
208-
* Return SDL_AssertState value of how to handle the assertion failure.
220+
* \since This function is available since SDL 2.0.0.
209221
*
210-
* \param handler Callback function, called when an assertion fails.
211-
* \param userdata A pointer passed to the callback as-is.
222+
* \sa SDL_GetAssertionHandler
212223
*/
213224
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
214225
SDL_AssertionHandler handler,
215226
void *userdata);
216227

217228
/**
218-
* \brief Get the default assertion handler.
229+
* Get the default assertion handler.
219230
*
220-
* This returns the function pointer that is called by default when an
221-
* assertion is triggered. This is an internal function provided by SDL,
222-
* that is used for assertions when SDL_SetAssertionHandler() hasn't been
223-
* used to provide a different function.
231+
* This returns the function pointer that is called by default when an
232+
* assertion is triggered. This is an internal function provided by SDL, that
233+
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
234+
* provide a different function.
224235
*
225-
* \return The default SDL_AssertionHandler that is called when an assert triggers.
236+
* \returns the default SDL_AssertionHandler that is called when an assert
237+
* triggers.
238+
*
239+
* \since This function is available since SDL 2.0.2.
240+
*
241+
* \sa SDL_GetAssertionHandler
226242
*/
227243
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
228244

229245
/**
230-
* \brief Get the current assertion handler.
246+
* Get the current assertion handler.
247+
*
248+
* This returns the function pointer that is called when an assertion is
249+
* triggered. This is either the value last passed to
250+
* SDL_SetAssertionHandler(), or if no application-specified function is set,
251+
* is equivalent to calling SDL_GetDefaultAssertionHandler().
231252
*
232-
* This returns the function pointer that is called when an assertion is
233-
* triggered. This is either the value last passed to
234-
* SDL_SetAssertionHandler(), or if no application-specified function is
235-
* set, is equivalent to calling SDL_GetDefaultAssertionHandler().
253+
* The parameter `puserdata` is a pointer to a void*, which will store the
254+
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
255+
* will always be NULL for the default handler. If you don't care about this
256+
* data, it is safe to pass a NULL pointer to this function to ignore it.
236257
*
237-
* \param puserdata Pointer to a void*, which will store the "userdata"
238-
* pointer that was passed to SDL_SetAssertionHandler().
239-
* This value will always be NULL for the default handler.
240-
* If you don't care about this data, it is safe to pass
241-
* a NULL pointer to this function to ignore it.
242-
* \return The SDL_AssertionHandler that is called when an assert triggers.
258+
* \param puserdata pointer which is filled with the "userdata" pointer that
259+
* was passed to SDL_SetAssertionHandler()
260+
* \returns the SDL_AssertionHandler that is called when an assert triggers.
261+
*
262+
* \since This function is available since SDL 2.0.2.
263+
*
264+
* \sa SDL_SetAssertionHandler
243265
*/
244266
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
245267

246268
/**
247-
* \brief Get a list of all assertion failures.
269+
* Get a list of all assertion failures.
270+
*
271+
* This function gets all assertions triggered since the last call to
272+
* SDL_ResetAssertionReport(), or the start of the program.
248273
*
249-
* Get all assertions triggered since last call to SDL_ResetAssertionReport(),
250-
* or the start of the program.
274+
* The proper way to examine this data looks something like this:
251275
*
252-
* The proper way to examine this data looks something like this:
276+
* ```c
277+
* const SDL_AssertData *item = SDL_GetAssertionReport();
278+
* while (item) {
279+
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
280+
* item->condition, item->function, item->filename,
281+
* item->linenum, item->trigger_count,
282+
* item->always_ignore ? "yes" : "no");
283+
* item = item->next;
284+
* }
285+
* ```
253286
*
254-
* <code>
255-
* const SDL_AssertData *item = SDL_GetAssertionReport();
256-
* while (item) {
257-
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
258-
* item->condition, item->function, item->filename,
259-
* item->linenum, item->trigger_count,
260-
* item->always_ignore ? "yes" : "no");
261-
* item = item->next;
262-
* }
263-
* </code>
287+
* \returns a list of all failed assertions or NULL if the list is empty. This
288+
* memory should not be modified or freed by the application.
264289
*
265-
* \return List of all assertions.
266-
* \sa SDL_ResetAssertionReport
290+
* \since This function is available since SDL 2.0.0.
291+
*
292+
* \sa SDL_ResetAssertionReport
267293
*/
268294
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
269295

270296
/**
271-
* \brief Reset the list of all assertion failures.
297+
* Clear the list of all assertion failures.
298+
*
299+
* This function will clear the list of all assertions triggered up to that
300+
* point. Immediately following this call, SDL_GetAssertionReport will return
301+
* no items. In addition, any previously-triggered assertions will be reset to
302+
* a trigger_count of zero, and their always_ignore state will be false.
272303
*
273-
* Reset list of all assertions triggered.
304+
* \since This function is available since SDL 2.0.0.
274305
*
275-
* \sa SDL_GetAssertionReport
306+
* \sa SDL_GetAssertionReport
276307
*/
277308
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
278309

0 commit comments

Comments
 (0)