diff --git a/polymer/eduke32/Apple/GameListSource.game.h b/polymer/eduke32/Apple/GameListSource.game.h new file mode 100644 index 000000000..0818cd8a6 --- /dev/null +++ b/polymer/eduke32/Apple/GameListSource.game.h @@ -0,0 +1,23 @@ +/* + * GameListSource.game.h + * duke3d + * + * Created by Jonathon Fowler on 24/07/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + +@interface GameListSource : NSObject +{ + NSMutableArray *list; +} +- (id)init; +- (void)dealloc; +- (GrpFile*)grpAtIndex:(int)index; +- (int)findIndexForGrpname:(NSString*)grpname; +- (id)tableView:(NSTableView *)aTableView +objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex; +- (int)numberOfRowsInTableView:(NSTableView *)aTableView; +@end + diff --git a/polymer/eduke32/Apple/GameListSource.game.m b/polymer/eduke32/Apple/GameListSource.game.m new file mode 100644 index 000000000..4743c9655 --- /dev/null +++ b/polymer/eduke32/Apple/GameListSource.game.m @@ -0,0 +1,74 @@ +/* + * GameListSource.game.m + * duke3d + * + * Created by Jonathon Fowler on 24/07/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + +#import + +#import "GrpFile.game.h" +#import "GameListSource.game.h" + +@implementation GameListSource +- (id)init +{ + self = [super init]; + if (self) { + struct grpfile *p; + int i; + + list = [[NSMutableArray alloc] init]; + + for (p = foundgrps; p; p=p->next) { + for (i=0; icrcval == grpfiles[i].crcval) break; + if (i == numgrpfiles) continue; + [list addObject:[[GrpFile alloc] initWithGrpfile:p andName:[NSString stringWithCString:grpfiles[i].name]]]; + } + } + + return self; +} + +- (void)dealloc +{ + [list release]; + [super dealloc]; +} + +- (GrpFile*)grpAtIndex:(int)index +{ + return [list objectAtIndex:index]; +} + +- (int)findIndexForGrpname:(NSString*)grpname +{ + int i; + for (i=0; i<[list count]; i++) { + if ([[[list objectAtIndex:i] grpname] isEqual:grpname]) return i; + } + return -1; +} + +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn + row:(int)rowIndex +{ + NSParameterAssert(rowIndex >= 0 && rowIndex < [list count]); + switch ([[aTableColumn identifier] intValue]) { + case 0: // name column + return [[list objectAtIndex:rowIndex] name]; + case 1: // grp column + return [[list objectAtIndex:rowIndex] grpname]; + default: return nil; + } +} + +- (int)numberOfRowsInTableView:(NSTableView *)aTableView +{ + return [list count]; +} +@end + diff --git a/polymer/eduke32/Apple/GrpFile.game.h b/polymer/eduke32/Apple/GrpFile.game.h new file mode 100644 index 000000000..321fa468c --- /dev/null +++ b/polymer/eduke32/Apple/GrpFile.game.h @@ -0,0 +1,25 @@ +/* + * GrpFile.game.h + * duke3d + * + * Created by Jonathon Fowler on 24/07/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + +#import + +#include "grpscan.h" + +@interface GrpFile : NSObject +{ + NSString *name; + struct grpfile *fg; +} +- (id)initWithGrpfile:(struct grpfile *)grpfile andName:(NSString*)aName; +- (void)dealloc; +- (NSString *)name; +- (NSString *)grpname; +- (struct grpfile *)entryptr; +@end + diff --git a/polymer/eduke32/Apple/GrpFile.game.m b/polymer/eduke32/Apple/GrpFile.game.m new file mode 100644 index 000000000..d72b2fa12 --- /dev/null +++ b/polymer/eduke32/Apple/GrpFile.game.m @@ -0,0 +1,40 @@ +/* + * GrpFile.game.m + * duke3d + * + * Created by Jonathon Fowler on 24/07/09. + * Copyright 2009 __MyCompanyName__. All rights reserved. + * + */ + +#include "GrpFile.game.h" + +@implementation GrpFile +- (id)initWithGrpfile:(struct grpfile *)grpfile andName:(NSString*)aName +{ + self = [super init]; + if (self) { + fg = grpfile; + name = aName; + [aName retain]; + } + return self; +} +- (void)dealloc +{ + [name release]; + [super dealloc]; +} +- (NSString *)name +{ + return name; +} +- (NSString *)grpname +{ + return [NSString stringWithCString:(fg->name)]; +} +- (struct grpfile *)entryptr +{ + return fg; +} +@end diff --git a/polymer/eduke32/Apple/StartupWinController.game.m b/polymer/eduke32/Apple/StartupWinController.game.m new file mode 100644 index 000000000..01db59e53 --- /dev/null +++ b/polymer/eduke32/Apple/StartupWinController.game.m @@ -0,0 +1,437 @@ +// Objective-C programmers shall recoil in fear at this mess + +#import + +#define GetTime xGetTime +#include "duke3d.h" +#undef GetTime +#include "build.h" +#include "compat.h" +#include "baselayer.h" +#include "grpscan.h" + +#import "GrpFile.game.h" +#import "GameListSource.game.h" + +static struct { + int fullscreen; + int xdim3d, ydim3d, bpp3d; + int forcesetup; + char selectedgrp[BMAX_PATH+1]; + int game; + int samplerate, bitspersample, channels; +} settings; + +static struct soundQuality_t { + int frequency; + int samplesize; + int channels; +} * soundQualities = 0; + + +@interface StartupWinController : NSWindowController +{ + NSMutableArray *modeslist3d; + GameListSource *gamelistsrc; + + IBOutlet NSButton *alwaysShowButton; + IBOutlet NSButton *fullscreenButton; + IBOutlet NSTextView *messagesView; + IBOutlet NSTabView *tabView; + IBOutlet NSPopUpButton *videoMode3DPUButton; + IBOutlet NSPopUpButton *soundQualityPUButton; + IBOutlet NSScrollView *gameList; + + IBOutlet NSButton *cancelButton; + IBOutlet NSButton *startButton; +} + +- (void)dealloc; +- (void)populateVideoModes:(BOOL)firstTime; +- (void)populateSoundQuality:(BOOL)firstTime; + +- (IBAction)alwaysShowClicked:(id)sender; +- (IBAction)fullscreenClicked:(id)sender; + +- (IBAction)cancel:(id)sender; +- (IBAction)start:(id)sender; + +- (void)setupRunMode; +- (void)setupMessagesMode; +- (void)putsMessage:(NSString *)str; +- (void)setTitle:(NSString *)str; + +@end + +@implementation StartupWinController + +- (void)dealloc +{ + [gamelistsrc release]; + [modeslist3d release]; + [super dealloc]; +} + +- (void)populateVideoModes:(BOOL)firstTime +{ + int i, mode3d, fullscreen = ([fullscreenButton state] == NSOnState); + int idx3d = -1; + int xdim, ydim, bpp; + + if (firstTime) { + xdim = settings.xdim3d; + ydim = settings.ydim3d; + bpp = settings.bpp3d; + } else { + mode3d = [[modeslist3d objectAtIndex:[videoMode3DPUButton indexOfSelectedItem]] intValue]; + if (mode3d >= 0) { + xdim = validmode[mode3d].xdim; + ydim = validmode[mode3d].ydim; + bpp = validmode[mode3d].bpp; + } + + } + mode3d = checkvideomode(&xdim, &ydim, bpp, fullscreen, 1); + if (mode3d < 0) { + int i, cd[] = { 32, 24, 16, 15, 8, 0 }; + for (i=0; cd[i]; ) { if (cd[i] >= bpp) i++; else break; } + for ( ; cd[i]; i++) { + mode3d = checkvideomode(&xdim, &ydim, cd[i], fullscreen, 1); + if (mode3d < 0) continue; + break; + } + } + + [modeslist3d release]; + [videoMode3DPUButton removeAllItems]; + + modeslist3d = [[NSMutableArray alloc] init]; + + for (i = 0; i < validmodecnt; i++) { + if (fullscreen == validmode[i].fs) { + if (i == mode3d) idx3d = [modeslist3d count]; + [modeslist3d addObject:[NSNumber numberWithInt:i]]; + [videoMode3DPUButton addItemWithTitle:[NSString stringWithFormat:@"%d %C %d %d-bpp", + validmode[i].xdim, 0xd7, validmode[i].ydim, validmode[i].bpp]]; + } + } + + if (idx3d >= 0) [videoMode3DPUButton selectItemAtIndex:idx3d]; +} + +- (void)populateSoundQuality:(BOOL)firstTime +{ + int i, curidx = -1; + + [soundQualityPUButton removeAllItems]; + + for (i = 0; soundQualities[i].frequency > 0; i++) { + const char *ch; + switch (soundQualities[i].channels) { + case 1: ch = "Mono"; break; + case 2: ch = "Stereo"; break; + default: ch = "?"; break; + } + + NSString *s = [NSString stringWithFormat:@"%dkHz, %d-bit, %s", + soundQualities[i].frequency / 1000, + soundQualities[i].samplesize, + ch + ]; + [soundQualityPUButton addItemWithTitle:s]; + + if (firstTime && + soundQualities[i].frequency == settings.samplerate && + soundQualities[i].samplesize == settings.bitspersample && + soundQualities[i].channels == settings.channels) { + curidx = i; + } + } + + if (firstTime && curidx < 0) { + soundQualities[i].frequency = settings.samplerate; + soundQualities[i].samplesize = settings.bitspersample; + soundQualities[i].channels = settings.channels; + + const char *ch; + switch (soundQualities[i].channels) { + case 1: ch = "Mono"; break; + case 2: ch = "Stereo"; break; + default: ch = "?"; break; + } + NSString *s = [NSString stringWithFormat:@"%dkHz, %d-bit, %s", + soundQualities[i].frequency / 1000, + soundQualities[i].samplesize, + ch + ]; + [soundQualityPUButton addItemWithTitle:s]; + + curidx = i++; + soundQualities[i].frequency = -1; + } + + if (curidx >= 0) { + [soundQualityPUButton selectItemAtIndex:curidx]; + } +} + +- (IBAction)alwaysShowClicked:(id)sender +{ +} + +- (IBAction)fullscreenClicked:(id)sender +{ + [self populateVideoModes:NO]; +} + +- (IBAction)cancel:(id)sender +{ + [NSApp abortModal]; +} + +- (IBAction)start:(id)sender +{ + int mode = [[modeslist3d objectAtIndex:[videoMode3DPUButton indexOfSelectedItem]] intValue]; + if (mode >= 0) { + settings.xdim3d = validmode[mode].xdim; + settings.ydim3d = validmode[mode].ydim; + settings.bpp3d = validmode[mode].bpp; + settings.fullscreen = validmode[mode].fs; + } + + int quality = [soundQualityPUButton indexOfSelectedItem]; + if (quality >= 0) { + settings.samplerate = soundQualities[quality].frequency; + settings.bitspersample = soundQualities[quality].samplesize; + settings.channels = soundQualities[quality].channels; + } + + int row = [[gameList documentView] selectedRow]; + if (row >= 0) { + struct grpfile *p = [[gamelistsrc grpAtIndex:row] entryptr]; + if (p) { + strcpy(settings.selectedgrp, p->name); + settings.game = p->game; + } + } + + settings.forcesetup = [alwaysShowButton state] == NSOnState; + + [NSApp stopModal]; +} + +- (void)setupRunMode +{ + getvalidmodes(); + + [fullscreenButton setState: (settings.fullscreen ? NSOnState : NSOffState)]; + [alwaysShowButton setState: (settings.forcesetup ? NSOnState : NSOffState)]; + [self populateVideoModes:YES]; + [self populateSoundQuality:YES]; + + // enable all the controls on the Configuration page + NSEnumerator *enumerator = [[[[tabView tabViewItemAtIndex:0] view] subviews] objectEnumerator]; + NSControl *control; + while (control = [enumerator nextObject]) [control setEnabled:true]; + + gamelistsrc = [[GameListSource alloc] init]; + [[gameList documentView] setDataSource:gamelistsrc]; + [[gameList documentView] deselectAll:nil]; + + int row = [gamelistsrc findIndexForGrpname:[NSString stringWithCString:settings.selectedgrp]]; + if (row >= 0) { + [[gameList documentView] scrollRowToVisible:row]; +#if defined(MAC_OS_X_VERSION_10_3) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3) + [[gameList documentView] selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; +#else + [[gameList documentView] selectRow:row byExtendingSelection:NO]; +#endif + } + + [cancelButton setEnabled:true]; + [startButton setEnabled:true]; + + [tabView selectTabViewItemAtIndex:0]; + [NSCursor unhide]; // Why should I need to do this? +} + +- (void)setupMessagesMode +{ + [tabView selectTabViewItemAtIndex:2]; + + // disable all the controls on the Configuration page except "always show", so the + // user can enable it if they want to while waiting for something else to happen + NSEnumerator *enumerator = [[[[tabView tabViewItemAtIndex:0] view] subviews] objectEnumerator]; + NSControl *control; + while (control = [enumerator nextObject]) { + if (control == alwaysShowButton) continue; + [control setEnabled:false]; + } + + [cancelButton setEnabled:false]; + [startButton setEnabled:false]; +} + +- (void)putsMessage:(NSString *)str +{ + NSRange end; + NSTextStorage *text = [messagesView textStorage]; + BOOL shouldAutoScroll; + + shouldAutoScroll = ((int)NSMaxY([messagesView bounds]) == (int)NSMaxY([messagesView visibleRect])); + + end.location = [text length]; + end.length = 0; + + [text beginEditing]; + [messagesView replaceCharactersInRange:end withString:str]; + [text endEditing]; + + if (shouldAutoScroll) { + end.location = [text length]; + end.length = 0; + [messagesView scrollRangeToVisible:end]; + } +} + +- (void)setTitle:(NSString *)str +{ + [[self window] setTitle:str]; +} + +@end + +static StartupWinController *startwin = nil; + +int startwin_open(void) +{ + if (startwin != nil) return 1; + + startwin = [[StartupWinController alloc] initWithWindowNibName:@"startwin.game"]; + if (startwin == nil) return -1; + + { + static int soundQualityFrequencies[] = { 48000, 44100, 32000, 24000, 22050 }; + static int soundQualitySampleSizes[] = { 16, 8 }; + static int soundQualityChannels[] = { 2, 1 }; + int f, b, c, i; + + i = sizeof(soundQualityFrequencies) * + sizeof(soundQualitySampleSizes) * + sizeof(soundQualityChannels) / + sizeof(int) + 2; // one for the terminator, one for a custom setting + soundQualities = (struct soundQuality_t *) malloc(i * sizeof(struct soundQuality_t)); + + i = 0; + for (c = 0; c < sizeof(soundQualityChannels) / sizeof(int); c++) { + for (b = 0; b < sizeof(soundQualitySampleSizes) / sizeof(int); b++) { + for (f = 0; f < sizeof(soundQualityFrequencies) / sizeof(int); f++) { + soundQualities[i].frequency = soundQualityFrequencies[f]; + soundQualities[i].samplesize = soundQualitySampleSizes[b]; + soundQualities[i].channels = soundQualityChannels[c]; + + i++; + } + } + } + + soundQualities[i].frequency = -1; + } + + [startwin setupMessagesMode]; + [startwin showWindow:nil]; + + return 0; +} + +int startwin_close(void) +{ + if (startwin == nil) return 1; + + [startwin close]; + [startwin release]; + startwin = nil; + + free(soundQualities); + + return 0; +} + +int startwin_puts(const char *s) +{ + NSString *ns; + + if (!s) return -1; + if (startwin == nil) return 1; + + ns = [[NSString alloc] initWithCString:s]; + [startwin putsMessage:ns]; + [ns release]; + + return 0; +} + +int startwin_settitle(const char *s) +{ + NSString *ns; + + if (!s) return -1; + if (startwin == nil) return 1; + + ns = [[NSString alloc] initWithCString:s]; + [startwin setTitle:ns]; + [ns release]; + + return 0; +} + +int startwin_idle(void *v) +{ + if (startwin) [[startwin window] displayIfNeeded]; + return 0; +} + +extern char *duke3dgrp; + +int startwin_run(void) +{ + int retval; + + if (startwin == nil) return 0; + + settings.fullscreen = ScreenMode; + settings.xdim3d = ScreenWidth; + settings.ydim3d = ScreenHeight; + settings.bpp3d = ScreenBPP; + settings.samplerate = MixRate; + settings.bitspersample = NumBits; + settings.channels = NumChannels; + settings.forcesetup = ForceSetup; + settings.game = gametype; + strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH); + + [startwin setupRunMode]; + + switch ([NSApp runModalForWindow:[startwin window]]) { + case NSRunStoppedResponse: retval = 1; break; + case NSRunAbortedResponse: retval = 0; break; + default: retval = -1; + } + + [startwin setupMessagesMode]; + + if (retval) { + ScreenMode = settings.fullscreen; + ScreenWidth = settings.xdim3d; + ScreenHeight = settings.ydim3d; + ScreenBPP = settings.bpp3d; + MixRate = settings.samplerate; + NumBits = settings.bitspersample; + NumChannels = settings.channels; + ForceSetup = settings.forcesetup; + duke3dgrp = settings.selectedgrp; + gametype = settings.game; + } + + return retval; +} diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Info.plist b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Info.plist index b85d00b2b..29fd3cb61 100644 --- a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Info.plist +++ b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Info.plist @@ -28,6 +28,8 @@ 2.0 CSResourcesFileMapped + NSMainNibFile + game.osxmain NSHumanReadableCopyright Copyright EDuke32 Team NSPrincipalClass diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/classes.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/classes.nib new file mode 100644 index 000000000..02cb79e15 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/classes.nib @@ -0,0 +1,7 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = SDLMain; LANGUAGE = ObjC; SUPERCLASS = NSObject; } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/info.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/info.nib new file mode 100644 index 000000000..2b2f2d5e1 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/info.nib @@ -0,0 +1,21 @@ + + + + + IBDocumentLocation + 563 86 356 240 0 0 1280 938 + IBEditorPositions + + 29 + 581 456 159 44 0 0 1280 938 + + IBFramework Version + 364.0 + IBOpenObjects + + 29 + + IBSystem Version + 7W98 + + diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/keyedobjects.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/keyedobjects.nib new file mode 100644 index 000000000..e4a7b0251 Binary files /dev/null and b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/game.osxmain.nib/keyedobjects.nib differ diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/designable.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/designable.nib deleted file mode 100644 index 9b82df9c2..000000000 --- a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/designable.nib +++ /dev/null @@ -1,922 +0,0 @@ - - - - 1060 - 10B504 - 732 - 1038.2 - 437.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 732 - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - StartupWinController - - - FirstResponder - - - NSApplication - - - 5 - 2 - {{402, 296}, {483, 280}} - 813170688 - Startup - NSWindow - - View - - {1.79769e+308, 1.79769e+308} - {213, 107} - - - 256 - - - - 256 - {{8, 26}, {462, 248}} - - - - - - 256 - - - - 256 - {{155, -2}, {210, 18}} - - YES - - 67239424 - 131072 - Always show configuration on start - - LucidaGrande - 11 - 3100 - - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 256 - {{279, 173}, {76, 16}} - - YES - - 67239424 - 131072 - Fullscreen - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{2, 149}, {92, 14}} - - YES - - 67239424 - 4194304 - 3D Video mode: - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - - - - 256 - {{96, 144}, {181, 22}} - - YES - - -2076049856 - 133120 - - - 109199615 - 1 - - LucidaGrande - 11 - 16 - - - - - - 400 - 75 - - - XXX x YYY Z-bpp - - 1048576 - 2147483647 - 1 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - - OtherViews - - - - - - 3 - YES - YES - 1 - - - - - 256 - {{2, 174}, {92, 14}} - - YES - - 67239424 - 4194304 - 2D Video mode: - - - - - - - - - 256 - {{96, 169}, {181, 22}} - - YES - - -2076049856 - 133120 - - - 109199615 - 1 - - - - - - 400 - 75 - - - XXX x YYY - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - - - YES - - - OtherViews - - - - - - 3 - YES - YES - 1 - - - - {{10, 25}, {442, 210}} - - - Configuration - - - - - - - 256 - - - - 256 - - - - 2304 - - - - 2322 - {439, 208} - - - - - - - - - - - - - 6 - - - - 439 - 1 - - - 2912 - 0 - - - 3 - MQA - - - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - 1 - MCAwIDEAA - - - - - - 6 - {439, 1e+07} - {357, 208} - - - - {{1, 1}, {439, 208}} - - - - - - {4, 4} - 0 - - 4 - - - - 256 - {{440, 1}, {11, 208}} - - 256 - - _doScroller: - 1 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - 257 - - _doScroller: - 1 - 0.94565218687057495 - - - {{-7, 0}, {452, 210}} - - - 18 - - - - - - {{10, 25}, {442, 210}} - - Messages - - - - - - - 134217728 - YES - YES - - - - - - - 256 - {{396, 1}, {85, 32}} - - YES - - 67239424 - 134217728 - Start - - LucidaGrande - 13 - 1044 - - - -2038284033 - 1 - - LucidaGrande - 13 - 16 - - - DQ - 200 - 25 - - - - - 256 - {{311, 1}, {85, 32}} - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 1 - - - Gw - 200 - 25 - - - - {483, 280} - - - {{0, 0}, {1280, 938}} - {213, 129} - {1.79769e+308, 1.79769e+308} - - - - - - - window - - - - 43 - - - - cancel: - - - - 50 - - - - start: - - - - 51 - - - - initialFirstResponder - - - - 55 - - - - tabView - - - - 57 - - - - alwaysShowButton - - - - 59 - - - - alwaysShowClicked: - - - - 61 - - - - messagesView - - - - 64 - - - - cancelButton - - - - 65 - - - - startButton - - - - 66 - - - - videoMode2DPUButton - - - - 76 - - - - videoMode3DPUButton - - - - 77 - - - - fullscreenButton - - - - 78 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 23 - - - - - - StartupWin - - - 10 - - - - - - - - - - 8 - - - - - - - - - 13 - - - - - - - - 35 - - - - - - - - - - - - - 37 - - - - - - - - 67 - - - - - - - - 68 - - - - - - - - 69 - - - - - - - - 72 - - - - - - - - 73 - - - - - - - - 15 - - - - - - - - 22 - - - - - - - - 80 - - - - - 81 - - - - - 82 - - - - - 83 - - - - - - - - 84 - - - - - 85 - - - - - - - - 87 - - - - - 88 - - - - - 70 - - - - - - - - 71 - - - - - 74 - - - - - - - - 75 - - - - - -3 - - - Application - - - 32 - - - - - - - - 6 - - - - - - - - 62 - - - - - - - - - - 90 - - - - - 89 - - - - - 63 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{242, 347}, {483, 280}} - com.apple.InterfaceBuilder.CocoaPlugin - {{242, 347}, {483, 280}} - - - {213, 107} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - 90 - - - - - FirstResponder - - IBUserSource - - - - - StartupWinController - NSWindowController - - id - id - id - id - - - NSButton - NSButton - NSButton - NSTextView - NSButton - NSTabView - NSPopUpButton - NSPopUpButton - - - IBUserSource - - - - - - 0 - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - - 3 - - diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni deleted file mode 100644 index 6050d79be..000000000 Binary files a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni and /dev/null differ diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/classes.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/classes.nib new file mode 100644 index 000000000..022577ba8 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/classes.nib @@ -0,0 +1,59 @@ + + + + + IBClasses + + + CLASS + FirstResponder + LANGUAGE + ObjC + SUPERCLASS + NSObject + + + ACTIONS + + alwaysShowClicked + id + cancel + id + fullscreenClicked + id + start + id + + CLASS + StartupWinController + LANGUAGE + ObjC + OUTLETS + + alwaysShowButton + NSButton + cancelButton + NSButton + fullscreenButton + NSButton + gameList + NSScrollView + messagesView + NSTextView + soundQualityPUButton + NSPopUpButton + startButton + NSButton + tabView + NSTabView + videoMode3DPUButton + NSPopUpButton + + SUPERCLASS + NSWindowController + + + IBVersion + 1 + + diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/info.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/info.nib new file mode 100644 index 000000000..ff7834c05 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 677 + IBLastKnownRelativeProjectPath + duke3d.xcodeproj + IBOldestOS + 3 + IBOpenObjects + + 35 + + IBSystem Version + 9J61 + targetFramework + IBCocoaFramework + + diff --git a/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/keyedobjects.nib b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/keyedobjects.nib new file mode 100644 index 000000000..e8250fdea Binary files /dev/null and b/polymer/eduke32/Apple/bundles/EDuke32.app/Contents/Resources/startwin.game.nib/keyedobjects.nib differ diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Info.plist b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Info.plist index d602c19e1..f607a45e0 100644 --- a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Info.plist +++ b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Info.plist @@ -13,7 +13,7 @@ CFBundleIconFile mapster32.icns CFBundleIdentifier - com.mapster32 + com.eduke32.mapster32 CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,6 +28,8 @@ 2.0 CSResourcesFileMapped + NSMainNibFile + build.osxmain NSHumanReadableCopyright Copyright EDuke32 Team NSPrincipalClass diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/classes.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/classes.nib new file mode 100644 index 000000000..02cb79e15 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/classes.nib @@ -0,0 +1,7 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + {CLASS = SDLMain; LANGUAGE = ObjC; SUPERCLASS = NSObject; } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/info.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/info.nib new file mode 100644 index 000000000..24bb936e9 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/info.nib @@ -0,0 +1,21 @@ + + + + + IBDocumentLocation + 567 77 356 240 0 0 1280 938 + IBEditorPositions + + 29 + 562 525 257 44 0 0 1280 938 + + IBFramework Version + 364.0 + IBOpenObjects + + 29 + + IBSystem Version + 7W98 + + diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/keyedobjects.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/keyedobjects.nib new file mode 100644 index 000000000..0be7b27e5 Binary files /dev/null and b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/build.osxmain.nib/keyedobjects.nib differ diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/classes.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/classes.nib new file mode 100644 index 000000000..69de3d147 --- /dev/null +++ b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/classes.nib @@ -0,0 +1,22 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = {alwaysShowClicked = id; cancel = id; fullscreenClicked = id; start = id; }; + CLASS = StartupWinController; + LANGUAGE = ObjC; + OUTLETS = { + alwaysShowButton = NSButton; + cancelButton = NSButton; + fullscreenButton = NSButton; + messagesView = NSTextView; + startButton = NSButton; + tabView = NSTabView; + videoMode2DPUButton = NSPopUpButton; + videoMode3DPUButton = NSPopUpButton; + }; + SUPERCLASS = NSWindowController; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/designable.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/designable.nib deleted file mode 100644 index 9b82df9c2..000000000 --- a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/designable.nib +++ /dev/null @@ -1,922 +0,0 @@ - - - - 1060 - 10B504 - 732 - 1038.2 - 437.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 732 - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - StartupWinController - - - FirstResponder - - - NSApplication - - - 5 - 2 - {{402, 296}, {483, 280}} - 813170688 - Startup - NSWindow - - View - - {1.79769e+308, 1.79769e+308} - {213, 107} - - - 256 - - - - 256 - {{8, 26}, {462, 248}} - - - - - - 256 - - - - 256 - {{155, -2}, {210, 18}} - - YES - - 67239424 - 131072 - Always show configuration on start - - LucidaGrande - 11 - 3100 - - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 256 - {{279, 173}, {76, 16}} - - YES - - 67239424 - 131072 - Fullscreen - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{2, 149}, {92, 14}} - - YES - - 67239424 - 4194304 - 3D Video mode: - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - - - - 256 - {{96, 144}, {181, 22}} - - YES - - -2076049856 - 133120 - - - 109199615 - 1 - - LucidaGrande - 11 - 16 - - - - - - 400 - 75 - - - XXX x YYY Z-bpp - - 1048576 - 2147483647 - 1 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - - OtherViews - - - - - - 3 - YES - YES - 1 - - - - - 256 - {{2, 174}, {92, 14}} - - YES - - 67239424 - 4194304 - 2D Video mode: - - - - - - - - - 256 - {{96, 169}, {181, 22}} - - YES - - -2076049856 - 133120 - - - 109199615 - 1 - - - - - - 400 - 75 - - - XXX x YYY - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - - - YES - - - OtherViews - - - - - - 3 - YES - YES - 1 - - - - {{10, 25}, {442, 210}} - - - Configuration - - - - - - - 256 - - - - 256 - - - - 2304 - - - - 2322 - {439, 208} - - - - - - - - - - - - - 6 - - - - 439 - 1 - - - 2912 - 0 - - - 3 - MQA - - - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - 1 - MCAwIDEAA - - - - - - 6 - {439, 1e+07} - {357, 208} - - - - {{1, 1}, {439, 208}} - - - - - - {4, 4} - 0 - - 4 - - - - 256 - {{440, 1}, {11, 208}} - - 256 - - _doScroller: - 1 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - 257 - - _doScroller: - 1 - 0.94565218687057495 - - - {{-7, 0}, {452, 210}} - - - 18 - - - - - - {{10, 25}, {442, 210}} - - Messages - - - - - - - 134217728 - YES - YES - - - - - - - 256 - {{396, 1}, {85, 32}} - - YES - - 67239424 - 134217728 - Start - - LucidaGrande - 13 - 1044 - - - -2038284033 - 1 - - LucidaGrande - 13 - 16 - - - DQ - 200 - 25 - - - - - 256 - {{311, 1}, {85, 32}} - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 1 - - - Gw - 200 - 25 - - - - {483, 280} - - - {{0, 0}, {1280, 938}} - {213, 129} - {1.79769e+308, 1.79769e+308} - - - - - - - window - - - - 43 - - - - cancel: - - - - 50 - - - - start: - - - - 51 - - - - initialFirstResponder - - - - 55 - - - - tabView - - - - 57 - - - - alwaysShowButton - - - - 59 - - - - alwaysShowClicked: - - - - 61 - - - - messagesView - - - - 64 - - - - cancelButton - - - - 65 - - - - startButton - - - - 66 - - - - videoMode2DPUButton - - - - 76 - - - - videoMode3DPUButton - - - - 77 - - - - fullscreenButton - - - - 78 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 23 - - - - - - StartupWin - - - 10 - - - - - - - - - - 8 - - - - - - - - - 13 - - - - - - - - 35 - - - - - - - - - - - - - 37 - - - - - - - - 67 - - - - - - - - 68 - - - - - - - - 69 - - - - - - - - 72 - - - - - - - - 73 - - - - - - - - 15 - - - - - - - - 22 - - - - - - - - 80 - - - - - 81 - - - - - 82 - - - - - 83 - - - - - - - - 84 - - - - - 85 - - - - - - - - 87 - - - - - 88 - - - - - 70 - - - - - - - - 71 - - - - - 74 - - - - - - - - 75 - - - - - -3 - - - Application - - - 32 - - - - - - - - 6 - - - - - - - - 62 - - - - - - - - - - 90 - - - - - 89 - - - - - 63 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{242, 347}, {483, 280}} - com.apple.InterfaceBuilder.CocoaPlugin - {{242, 347}, {483, 280}} - - - {213, 107} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - 90 - - - - - FirstResponder - - IBUserSource - - - - - StartupWinController - NSWindowController - - id - id - id - id - - - NSButton - NSButton - NSButton - NSTextView - NSButton - NSTabView - NSPopUpButton - NSPopUpButton - - - IBUserSource - - - - - - 0 - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - - 3 - - diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/info.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/info.nib new file mode 100644 index 000000000..c2f5e6bda --- /dev/null +++ b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 111 188 356 240 0 0 1280 938 + IBFramework Version + 446.1 + IBOpenObjects + + 23 + + IBSystem Version + 8R218 + + diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni deleted file mode 100644 index 6050d79be..000000000 Binary files a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.ni and /dev/null differ diff --git a/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.nib b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.nib new file mode 100644 index 000000000..5b3cfe34a Binary files /dev/null and b/polymer/eduke32/Apple/bundles/Mapster32.app/Contents/Resources/startwin.editor.nib/keyedobjects.nib differ diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index 14edd21ce..6dc1d14dd 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -190,9 +190,9 @@ ifeq ($(PLATFORM),LINUX) endif ifeq ($(PLATFORM),DARWIN) + OURCFLAGS += -fno-pic -I$(abspath Apple) -I$(abspath Apple/include) ifeq (1,$(SDL_FRAMEWORK)) - APPLE_INCLUDE_DIR=$(abspath Apple/include) - OURCFLAGS += -fno-pic -I$(APPLE_INCLUDE_DIR) -I/Library/Frameworks/SDL.framework/Headers \ + OURCFLAGS += -I/Library/Frameworks/SDL.framework/Headers \ -I/Library/Frameworks/SDL_mixer.framework/Headers LIBS += -read_only_relocs suppress -LApple/lib -lvorbisfile -lvorbis -logg -lm \ -Wl,-framework,SDL -Wl,-framework,SDL_mixer Apple/lib/libSDLmain.a \ @@ -204,13 +204,15 @@ ifeq ($(PLATFORM),DARWIN) EDITOROBJS+=$(OBJ)/SDLMain.$o GAMEOBJS+=$(OBJ)/SDLMain.$o else - OURCFLAGS += -fno-pic -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL + OURCFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL LIBS += -read_only_relocs suppress -lvorbisfile -lvorbis -logg -lm -lSDL_mixer \ -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \ -Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \ -Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL \ -Wl,-framework,QuickTime -lm endif + EDITOROBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o + GAMEOBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o NASMFLAGS += -f macho endif diff --git a/polymer/eduke32/build/Makefile b/polymer/eduke32/build/Makefile index fa8c5f233..ffa56c12d 100644 --- a/polymer/eduke32/build/Makefile +++ b/polymer/eduke32/build/Makefile @@ -118,10 +118,7 @@ ifeq ($(PLATFORM),LINUX) ASFLAGS+= -f elf endif ifeq ($(PLATFORM),DARWIN) - ifneq ($(findstring ppc,$(ARCH)),ppc) -# ENGINEOBJS += $(OBJ)/StartupWinController.editor.$o - endif - ENGINEOBJS += $(OBJ)/osxbits.$o + ENGINEOBJS += $(OBJ)/osxbits.$o $(OBJ)/StartupWinController.editor.$o ASFLAGS += -f macho -DUNDERSCORES OURCFLAGS += -fno-pic -DUNDERSCORES endif diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 9832b14d0..d71766ca5 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -479,7 +479,7 @@ void M32_DrawRoomsAndMasks(void) } #undef STARTUP_SETUP_WINDOW -#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2) +#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && (defined __APPLE__ || defined HAVE_GTK2)) # define STARTUP_SETUP_WINDOW #endif diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 08774661a..3c097076f 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -8409,7 +8409,7 @@ static void G_ShowParameterHelp(void) "-check\t\tEnables map pointer checking when saving\n" "-namesfile FILE\tUses FILE instead of NAMES.H for tile names\n" "-nocheck\t\tDisables map pointer checking when saving (default)\n" // kept for script compat -#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2) +#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && (defined __APPLE__ || defined HAVE_GTK2)) "-setup\t\tDisplays the configuration dialog\n" #endif #if !defined(_WIN32) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4ab7540a9..fd9644df2 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7957,7 +7957,7 @@ static void G_ShowParameterHelp(void) "-r\t\tRecord demo\n" "-s#\t\tSet skill level (1-4)\n" "-server\t\tStart a multiplayer game for other players to join\n" -#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2) +#if defined RENDERTYPEWIN || (defined RENDERTYPESDL && (defined __APPLE__ || defined HAVE_GTK2)) "-setup/nosetup\tEnables/disables startup window\n" #endif "-t#\t\tSet respawn mode: 1 = Monsters, 2 = Items, 3 = Inventory, x = All\n" @@ -9988,7 +9988,7 @@ int32_t app_main(int32_t argc,const char **argv) else if (!fg) g_gameNamePtr = "Unknown GRP"; } -#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)) +#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && (defined __APPLE__ || defined HAVE_GTK2))) if (i < 0 || (!g_noSetup && (ud.configversion != BYTEVERSION_JF || ud.config.ForceSetup)) || g_commandSetup) { if (quitevent || !startwin_run()) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 67e559a97..46b733f0e 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5866,7 +5866,7 @@ void C_Compile(const char *filenam) } else { -#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2)) +#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && (defined __APPLE__ || defined HAVE_GTK2))) while (!quitevent) // keep the window open so people can copy CON errors out of it handleevents(); #endif