mac sound and launcher fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3378 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
+2
-3
@@ -7,12 +7,11 @@
|
||||
<key>IBLastKnownRelativeProjectPath</key>
|
||||
<string>../actioncube.xcodeproj</string>
|
||||
<key>IBOldestOS</key>
|
||||
<integer>5</integer>
|
||||
<integer>4</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>264</integer>
|
||||
<integer>336</integer>
|
||||
<integer>240</integer>
|
||||
<integer>208</integer>
|
||||
<integer>21</integer>
|
||||
<integer>213</integer>
|
||||
</array>
|
||||
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 <<EOT\ntell application \"Finder\"\nset macSrcPath to POSIX file \"$HELPDIR/README.html\" as text\nset macDestPath to POSIX file \"$ACPKG\" as text\nmake new alias file to file macSrcPath at folder macDestPath\nend tell\nEOT\n\n#finally make a disk image out of the stuff\nhdiutil create -srcfolder $ACPKG -volname assaultcube assaultcube.dmg\nhdiutil internet-enable -yes assaultcube.dmg\n\n#cleanup\nrm -rf $ACPKG";
|
||||
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/\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 <<EOT\ntell application \"Finder\"\nset macSrcPath to POSIX file \"$HELPDIR/README.html\" as text\nset macDestPath to POSIX file \"$ACPKG\" as text\nmake new alias file to file macSrcPath at folder macDestPath\nend tell\nEOT\n\n#finally make a disk image out of the stuff\nhdiutil create -srcfolder $ACPKG -volname assaultcube assaultcube.dmg\nhdiutil internet-enable -yes assaultcube.dmg\n\n#cleanup\nrm -rf $ACPKG";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -780,10 +780,8 @@
|
||||
B960CF37085F3CC7004FB142 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
);
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
|
||||
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(USER_LIBRARY_DIR)/Frameworks",
|
||||
|
||||
Reference in New Issue
Block a user