diff --git a/source/src/sound.cpp b/source/src/sound.cpp index 28b97cb6..26f8c716 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -98,7 +98,6 @@ struct source void reset() { ASSERT(alIsSource(id)); - owner = NULL; locked = false; priority = SP_NORMAL; @@ -120,6 +119,7 @@ struct source alSourcef(id, AL_REFERENCE_DISTANCE, al_referencedistance/100.0f); alSourcef(id, AL_ROLLOFF_FACTOR, al_rollofffactor/100.0f); } + void init(sourceowner *o) { @@ -156,7 +156,11 @@ struct source bool buffer(ALuint buf_id) { alclearerr(); - alSourcei(id, AL_BUFFER, buf_id); +#ifdef __APPLE__ // weird bug + if (buf_id) +#endif + alSourcei(id, AL_BUFFER, buf_id); + return !ALERR; } @@ -885,7 +889,7 @@ struct sbuffer do { char buffer[BUFSIZE]; - bytes = ov_read(&oggfile, buffer, BUFSIZE, 0, 2, 1, &bitstream); // fix endian + bytes = ov_read(&oggfile, buffer, BUFSIZE, isbigendian(), 2, 1, &bitstream); loopi(bytes) buf.add(buffer[i]); } while(bytes > 0); diff --git a/source/xcode/English.lproj/MainMenu.nib/info.nib b/source/xcode/English.lproj/MainMenu.nib/info.nib index f729718a..e54d6bfc 100644 --- a/source/xcode/English.lproj/MainMenu.nib/info.nib +++ b/source/xcode/English.lproj/MainMenu.nib/info.nib @@ -7,12 +7,11 @@ IBLastKnownRelativeProjectPath ../actioncube.xcodeproj IBOldestOS - 5 + 4 IBOpenObjects 264 - 336 - 240 + 208 21 213 diff --git a/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib b/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib index 0b3fa84d..56ec57a0 100644 Binary files a/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib and b/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/source/xcode/Launcher.h b/source/xcode/Launcher.h index b43bdd17..6cd3aa9b 100644 --- a/source/xcode/Launcher.h +++ b/source/xcode/Launcher.h @@ -7,7 +7,6 @@ //able to leave these disconnected IBOutlet NSView *view1; //Main - IBOutlet NSView *view2; //Maps IBOutlet NSView *view3; //Keys IBOutlet NSView *view4; //Server diff --git a/source/xcode/Launcher.m b/source/xcode/Launcher.m index 13c9265b..31d90272 100644 --- a/source/xcode/Launcher.m +++ b/source/xcode/Launcher.m @@ -23,7 +23,6 @@ //tab names, i.e. image names (text is localised) #define tkMAIN @"Main" -#define tkMAPS @"Maps" #define tkKEYS @"Keys" #define tkSERVER @"Server" @@ -125,7 +124,7 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key) - (void)switchViews:(NSToolbarItem *)item { - NSView *views[] = {view1, view2, view3, view4}; + NSView *views[] = {view1, view3, view4}; NSView *prefsView = views[[item tag]-1]; //to stop flicker, we make a temp blank view. @@ -159,7 +158,7 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key) SEL action = @selector(displayHelp:); id target = self; if(tag) { - NSString *names[] = {tkMAIN, tkMAPS, tkKEYS, tkSERVER}; + NSString *names[] = {tkMAIN, tkKEYS, tkSERVER}; name = names[tag-1]; action = @selector(switchViews:); target = self; @@ -209,7 +208,7 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key) - (NSArray *)toolbarSelectableItemIdentifiers: (NSToolbar *)toolbar { NSMutableArray *array = [NSMutableArray array]; - NSView *views[] = {view1, view2, view3, view4}; + NSView *views[] = {view1, view3, view4}; int i; for(i = 0; i < sizeof(views)/sizeof(NSView*); i++) if(views[i]) [array addObject:[NSString stringWithFormat:@"%d", i+1]]; return array; diff --git a/source/xcode/actioncube.xcodeproj/project.pbxproj b/source/xcode/actioncube.xcodeproj/project.pbxproj index 176d88bc..27c9db2e 100644 --- a/source/xcode/actioncube.xcodeproj/project.pbxproj +++ b/source/xcode/actioncube.xcodeproj/project.pbxproj @@ -583,7 +583,7 @@ ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "echo $TARGET_BUILD_DIR\ncd $TARGET_BUILD_DIR\n\n#ensure old package is gone\nrm -f assaultcube.dmg\n\n#make the directory which our disk image will be made of\n#use /tmp as a destination because copying ourself (xcode folder) whilst compling causes the dog to chase its tail\nACPKG=`mktemp -d /tmp/acpkg.XXXXXX` || exit 1\n\n#leave indicator of where temp directory is in case things break\nln -sf $ACPKG $TARGET_BUILD_DIR/acpkg\n\n#copy launcher\n/Developer/Tools/CpMac -r $TARGET_BUILD_DIR/launcher.app $ACPKG/AssaultCube.app\n\nHELPDIR=$ACPKG/AssaultCube.app/Contents/Resources/help/\nGAMEDIR=$ACPKG/AssaultCube.app/Contents/gamedata\nmkdir $GAMEDIR\nmkdir $HELPDIR\n\n#copy assaultcube\n/Developer/Tools/CpMac -r $TARGET_BUILD_DIR/assaultcube.app $GAMEDIR/\nstrip -u -r $GAMEDIR/assaultcube.app/Contents/MacOS/assaultcube\n\n#install all frameworks into app bundle\nmkdir $GAMEDIR/assaultcube.app/Contents/Frameworks\nfor framework in SDL.framework SDL_image.framework Ogg.framework Vorbis.framework\ndo\n\tif [ -d $LOCAL_LIBRARY_DIR/Frameworks/$framework/ ] \n\tthen\t\n\t\t/Developer/Tools/CpMac -r $LOCAL_LIBRARY_DIR/Frameworks/$framework/ $GAMEDIR/assaultcube.app/Contents/Frameworks\n\t\trm -rf $GAMEDIR/assaultcube.app/Contents/Frameworks/$framework/Versions/A/Headers\n\telse\n\t\texit 1\n\tfi\ndone\n\n\n#copy readme and data and remove unneccesary stuff\n/Developer/Tools/CpMac -r $SRCROOT/../../README.html $HELPDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../docs $HELPDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../bot $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../config $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../screenshots $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../mods $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../packages $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../source $ACPKG/sourcecode\nfind -d $ACPKG -name \"CVS\" -exec rm -rf {} \\;\nfind $ACPKG -name \".DS_Store\" -exec rm -f {} \\;\nrm -rf $ACPKG/sourcecode/xcode/build\n\n#add alias to readme\n/usr/bin/osascript <