Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DOOM.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>1D6058900D05DD3D006BFB54</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
12 changes: 6 additions & 6 deletions common/SDL_shim/ios/SDL_Mixer.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ AudioStreamBasicDescription getStreamFormat( void ) {

AudioStreamBasicDescription streamFormat = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };

// The AudioUnitSampleType data type is the recommended type for sample data in audio
// The SInt32 data type is the recommended type for sample data in audio
// units. This obtains the byte size of the type for use in filling in the ASBD.
size_t bytesPerSample = sizeof (AudioUnitSampleType);
size_t bytesPerSample = sizeof (SInt32);

// Fill the application audio format struct's fields to define a linear PCM,
// stereo, noninterleaved stream at the hardware sample rate.
streamFormat.mFormatID = kAudioFormatLinearPCM;
streamFormat.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical;
streamFormat.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;
streamFormat.mBytesPerPacket = bytesPerSample;
streamFormat.mFramesPerPacket = 1;
streamFormat.mBytesPerFrame = bytesPerSample;
Expand Down Expand Up @@ -473,13 +473,13 @@ static OSStatus inputRenderCallback (
inNumberFrames, ioData->mNumberBuffers,
audioBuffer->mDataByteSize, audioBuffer->mNumberChannels );
*/
AudioUnitSampleType * hardwareBufferLeft = (AudioUnitSampleType *) audioBufferLeft->mData;
AudioUnitSampleType * hardwareBufferRight = (AudioUnitSampleType *) audioBufferRight->mData;
SInt32 * hardwareBufferLeft = (SInt32 *) audioBufferLeft->mData;
SInt32 * hardwareBufferRight = (SInt32 *) audioBufferRight->mData;


// EAS_Render always produces BUFFER_SIZE_IN_MONO_SAMPLES frames per call. Currently, this
// is defined to 128. Let's fill up a 128 frame buffer, then do a conversion from EAS_PCM
// (which is signed 16-bit integer) to AudioUnitSampleType (which is 8.24 fixed-point with
// (which is signed 16-bit integer) to AudioUnitSampleType (which is 8.24 fixed-point with
// a range of -1 to +1).
//
// Note that EAS renders interleaved stereo, so we actually a buffer size of
Expand Down
2 changes: 1 addition & 1 deletion common/idmobilelib/ios/Carousel.mm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ - (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {

} else { // Going the left.

percentage = fabsf( percentage );
percentage = (CGFloat) fabs( percentage );

CGRect newMainRect = LerpRect( mainRect, prevRect , percentage );
CGRect newNextRect = LerpRect( nextRect, mainRect , percentage );
Expand Down
1 change: 1 addition & 0 deletions common/idmobilelib/ios/GameCenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ - (void)match:(GKMatch *)match player:(NSString *)playerID didChangeState:(GKPla

break;
case GKPlayerStateDisconnected:
case GKPlayerStateUnknown:
matchHandler->playerDisconnected( NSStringToStdString( playerID ) );
break;
}
Expand Down
6 changes: 4 additions & 2 deletions common/idmobilelib/ios/InAppStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ the application can get the price information and actually initiate purchases of
#include <string>
#include <tr1/functional>

@class SKProduct;

namespace idInAppStore {

void Initialize( const std::vector<std::string> & productIdentifiers );
Expand All @@ -70,8 +72,8 @@ namespace idInAppStore {

std::string GetLocalizedPrice( const char * const productIdentifier );

void StartPurchase( const char * const productIdentifier );
void StartPurchase( SKProduct * product );
/*
========================
The application can register callbacks to be notified of events that occur relating to
Expand Down
13 changes: 6 additions & 7 deletions common/idmobilelib/ios/InAppStore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -301,21 +301,20 @@ bool IsEnabled() {
purchase.
========================
*/
void StartPurchase( const char * const productIdentifier ) {
void StartPurchase( SKProduct * product ) {
if ( ![SKPaymentQueue canMakePayments] ) {
return;
}

const char * productIdentifier = [product.productIdentifier UTF8String];

if ( !CanPurchase( productIdentifier ) ) {
return;
}

SetProductState( productIdentifier, PRODUCT_WAIT_FOR_PURCHASE );

NSString * nsProductIdentifier = [NSString stringWithCString:productIdentifier
encoding:NSUTF8StringEncoding];

SKPayment * payment = [SKPayment paymentWithProductIdentifier:nsProductIdentifier];
SetProductState( product.productIdentifier, PRODUCT_WAIT_FOR_PURCHASE );

SKPayment * payment = [SKPayment paymentWithProduct:product];
[[SKPaymentQueue defaultQueue] addPayment:payment];
}

Expand Down
16 changes: 14 additions & 2 deletions common/idmobilelib/ios/idmobilelib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 3.2;
IPHONEOS_DEPLOYMENT_TARGET = 5;
ONLY_ACTIVE_ARCH = NO;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-std=c++0x\n",
"-stdlib=libc++\n",
);
SDKROOT = iphoneos;
USER_HEADER_SEARCH_PATHS = ../;
WARNING_CFLAGS = (
Expand Down Expand Up @@ -369,7 +374,12 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 3.2;
IPHONEOS_DEPLOYMENT_TARGET = 5;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-std=c++0x\n",
"-stdlib=libc++\n",
);
SDKROOT = iphoneos;
USER_HEADER_SEARCH_PATHS = ../;
VALIDATE_PRODUCT = YES;
Expand All @@ -386,6 +396,7 @@
buildSettings = {
DSTROOT = /tmp/idmobilelib.dst;
GCC_VERSION = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -398,6 +409,7 @@
buildSettings = {
DSTROOT = /tmp/idmobilelib.dst;
GCC_VERSION = "";
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>idmobilelib.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>3D80884614928766002D6CC3</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C5D514B624ED00680D02"
BuildableName = "libEmbeddedAudioSynthesis.a"
BlueprintName = "EmbeddedAudioSynthesis"
ReferencedContainer = "container:EmbeddedAudioSynthesis.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C5D514B624ED00680D02"
BuildableName = "libEmbeddedAudioSynthesis.a"
BlueprintName = "EmbeddedAudioSynthesis"
ReferencedContainer = "container:EmbeddedAudioSynthesis.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C5D514B624ED00680D02"
BuildableName = "libEmbeddedAudioSynthesis.a"
BlueprintName = "EmbeddedAudioSynthesis"
ReferencedContainer = "container:EmbeddedAudioSynthesis.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>EmbeddedAudioSynthesis.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>3DC1C5D514B624ED00680D02</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>doomengine.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>3DE694381489AFDE0049CAA4</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C85414B63E1B00680D02"
BuildableName = "libprboom.a"
BlueprintName = "prboom"
ReferencedContainer = "container:prboom.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C85414B63E1B00680D02"
BuildableName = "libprboom.a"
BlueprintName = "prboom"
ReferencedContainer = "container:prboom.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3DC1C85414B63E1B00680D02"
BuildableName = "libprboom.a"
BlueprintName = "prboom"
ReferencedContainer = "container:prboom.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading