Skip to content

Commit 3f19b20

Browse files
Merge branch 'stable' into modern-iteration
2 parents 7dd6ae5 + 26b57c9 commit 3f19b20

Some content is hidden

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

78 files changed

+551
-554
lines changed

client/sdl/SDLMain.m

+26-26
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ - (void)setAppleMenu:(NSMenu *)menu;
5050

5151
static int gArgc;
5252
static char **gArgv;
53-
static BOOL gFinderLaunch;
54-
static BOOL gCalledAppMainline = FALSE;
53+
static bool gFinderLaunch;
54+
static bool gCalledAppMainline = false;
5555

5656
static NSString *getApplicationName(void)
5757
{
@@ -62,7 +62,7 @@ - (void)setAppleMenu:(NSMenu *)menu;
6262
dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
6363
if (dict)
6464
appName = [dict objectForKey: @"CFBundleName"];
65-
65+
6666
if (![appName length])
6767
appName = [[NSProcessInfo processInfo] processName];
6868

@@ -94,7 +94,7 @@ - (void)terminate:(id)sender
9494
@implementation SDLMain
9595

9696
/* Set the working directory to the .app's parent directory */
97-
- (void) setupWorkingDirectory:(BOOL)shouldChdir
97+
- (void) setupWorkingDirectory:(bool)shouldChdir
9898
{
9999
if (shouldChdir)
100100
{
@@ -144,10 +144,10 @@ static void setApplicationMenu(void)
144144
NSMenuItem *menuItem;
145145
NSString *title;
146146
NSString *appName;
147-
147+
148148
appName = getApplicationName();
149149
appleMenu = [[NSMenu alloc] initWithTitle:@""];
150-
150+
151151
/* Add menu items */
152152
title = [@"About " stringByAppendingString:appName];
153153
[appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
@@ -167,7 +167,7 @@ static void setApplicationMenu(void)
167167
title = [@"Quit " stringByAppendingString:appName];
168168
[appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
169169

170-
170+
171171
/* Put menu into the menubar */
172172
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
173173
[menuItem setSubmenu:appleMenu];
@@ -189,17 +189,17 @@ static void setupWindowMenu(void)
189189
NSMenuItem *menuItem;
190190

191191
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
192-
192+
193193
/* "Minimize" item */
194194
menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
195195
[windowMenu addItem:menuItem];
196196
[menuItem release];
197-
197+
198198
/* Put menu into the menubar */
199199
windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
200200
[windowMenuItem setSubmenu:windowMenu];
201201
[[NSApp mainMenu] addItem:windowMenuItem];
202-
202+
203203
/* Tell the application object that this is now the window menu */
204204
[NSApp setWindowsMenu:windowMenu];
205205

@@ -216,7 +216,7 @@ static void CustomApplicationMain (int argc, char **argv)
216216

217217
/* Ensure the application object is initialised */
218218
[SDLApplication sharedApplication];
219-
219+
220220
#ifdef SDL_USE_CPS
221221
{
222222
CPSProcessSerNum PSN;
@@ -236,10 +236,10 @@ static void CustomApplicationMain (int argc, char **argv)
236236
/* Create SDLMain and make it the app delegate */
237237
sdlMain = [[SDLMain alloc] init];
238238
[NSApp setDelegate:sdlMain];
239-
239+
240240
/* Start the main event loop */
241241
[NSApp run];
242-
242+
243243
[sdlMain release];
244244
[pool release];
245245
}
@@ -262,37 +262,37 @@ static void CustomApplicationMain (int argc, char **argv)
262262
*
263263
* This message is ignored once the app's mainline has been called.
264264
*/
265-
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
265+
- (bool)application:(NSApplication *)theApplication openFile:(NSString *)filename
266266
{
267267
const char *temparg;
268268
size_t arglen;
269269
char *arg;
270270
char **newargv;
271271

272272
if (!gFinderLaunch) /* MacOS is passing command line args. */
273-
return FALSE;
273+
return false;
274274

275275
if (gCalledAppMainline) /* app has started, ignore this document. */
276-
return FALSE;
276+
return false;
277277

278278
temparg = [filename UTF8String];
279279
arglen = SDL_strlen(temparg) + 1;
280280
arg = (char *) SDL_malloc(arglen);
281281
if (arg == NULL)
282-
return FALSE;
282+
return false;
283283

284284
newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
285285
if (newargv == NULL)
286286
{
287287
SDL_free(arg);
288-
return FALSE;
288+
return false;
289289
}
290290
gArgv = newargv;
291291

292292
SDL_strlcpy(arg, temparg, arglen);
293293
gArgv[gArgc++] = arg;
294294
gArgv[gArgc] = NULL;
295-
return TRUE;
295+
return true;
296296
}
297297

298298

@@ -310,7 +310,7 @@ - (void) applicationDidFinishLaunching: (NSNotification *) note
310310
#endif
311311

312312
/* Hand off to main application code */
313-
gCalledAppMainline = TRUE;
313+
gCalledAppMainline = true;
314314
status = SDL_main (gArgc, gArgv);
315315

316316
/* We're done, thank you for playing */
@@ -332,27 +332,27 @@ - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
332332

333333
bufferSize = selfLen + aStringLen - aRange.length;
334334
buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar));
335-
335+
336336
/* Get first part into buffer */
337337
localRange.location = 0;
338338
localRange.length = aRange.location;
339339
[self getCharacters:buffer range:localRange];
340-
340+
341341
/* Get middle part into buffer */
342342
localRange.location = 0;
343343
localRange.length = aStringLen;
344344
[aString getCharacters:(buffer+aRange.location) range:localRange];
345-
345+
346346
/* Get last part into buffer */
347347
localRange.location = aRange.location + aRange.length;
348348
localRange.length = selfLen - localRange.location;
349349
[self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
350-
350+
351351
/* Build output string */
352352
result = [NSString stringWithCharacters:buffer length:bufferSize];
353-
353+
354354
NSDeallocateMemoryPages(buffer, bufferSize);
355-
355+
356356
return result;
357357
}
358358

client/sdl/i_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#ifdef _WIN32
3131
#ifndef _XBOX
3232
#undef GetMessage
33-
typedef BOOL (WINAPI *SetAffinityFunc)(HANDLE hProcess, DWORD mask);
33+
typedef bool (WINAPI *SetAffinityFunc)(HANDLE hProcess, DWORD mask);
3434
#endif // !_XBOX
3535
#else
3636
#include <sched.h>

client/sdl/i_music.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MusicSystem* musicsystem = NULL;
4545
MusicSystemType current_musicsystem_type = MS_NONE;
4646

4747
void S_StopMusic();
48-
void S_ChangeMusic (std::string musicname, int looping);
48+
void S_ChangeMusic (std::string musicname, bool looping);
4949

5050
EXTERN_CVAR (snd_musicvolume)
5151
EXTERN_CVAR (snd_musicsystem)

client/sdl/i_system.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ void STACK_ARGS I_Quit (void)
514514
//
515515
// I_Error
516516
//
517-
BOOL gameisdead;
517+
bool gameisdead;
518518

519519
#define MAX_ERRORTEXT 1024
520520

@@ -556,7 +556,7 @@ void I_BaseError(const std::string& errortext)
556556
{
557557
std::string messagetext;
558558

559-
static BOOL alreadyThrown = false;
559+
static bool alreadyThrown = false;
560560
gameisdead = true;
561561

562562
if (!alreadyThrown) // ignore all but the first message -- killough
@@ -813,7 +813,7 @@ std::string I_GetClipboardText()
813813
return "";
814814
}
815815

816-
void I_PrintStr (int xp, const char *cp, int count, BOOL scroll)
816+
void I_PrintStr (int xp, const char *cp, int count, bool scroll)
817817
{
818818
// used in the DOS version
819819
}

client/sdl/i_system.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void addterm (void (STACK_ARGS *func)(void), const char *name);
119119
void I_PaintConsole (void);
120120

121121
// Print a console string
122-
void I_PrintStr (int x, const char *str, int count, BOOL scroll);
122+
void I_PrintStr (int x, const char *str, int count, bool scroll);
123123

124124
// Set the title string of the startup window
125125
void I_SetTitleString (const char *title);

0 commit comments

Comments
 (0)