Skip to content

Commit

Permalink
Fix Tutorial-Touch example
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnr committed Mar 7, 2015
1 parent 82fa6b3 commit 6aae8ae
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 27 deletions.
8 changes: 6 additions & 2 deletions examples/Tutorial-Touch/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
platform :ios, '4.3'
platform :ios, '5.1.1'

pod 'Gosu', :path => '../..'

# In a real project, you would use:
# pod 'Gosu', :git => 'https://github.com/jlnr/gosu.git'

pod 'Gosu', :path => '~/Projekte/Gosu'
16 changes: 8 additions & 8 deletions examples/Tutorial-Touch/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
PODS:
- Gosu (0.0.1):
- Gosu/Gosu
- Gosu/GosuTouch
- Gosu/libogg
- Gosu/libvorbis
- Gosu/Gosu (= 0.0.1)
- Gosu/GosuTouch (= 0.0.1)
- Gosu/libogg (= 0.0.1)
- Gosu/libvorbis (= 0.0.1)
- Gosu/GosuTouch (0.0.1):
- Gosu/libvorbis
- Gosu/libogg (0.0.1)
- Gosu/libvorbis (0.0.1):
- Gosu/libogg

DEPENDENCIES:
- Gosu (from `~/Projekte/Gosu`)
- Gosu (from `../..`)

EXTERNAL SOURCES:
Gosu:
:path: ~/Projekte/Gosu
:path: ../..

SPEC CHECKSUMS:
Gosu: 90b9c2d0b14123305b19de20bb42adb6051e9285
Gosu: 9fc44fac7ad0e683f390f03bdd72a76752a3ce75

COCOAPODS: 0.21.0
COCOAPODS: 0.35.0
File renamed without changes.
37 changes: 23 additions & 14 deletions examples/Tutorial-Touch/Tutorial-Touch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
D401FB79178A37F600AE9A52 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D401FB77178A37F600AE9A52 /* InfoPlist.strings */; };
D401FB81178A37F600AE9A52 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D401FB80178A37F600AE9A52 /* Default.png */; };
D401FB83178A37F600AE9A52 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D401FB82178A37F600AE9A52 /* [email protected] */; };
D401FB8C178A39FE00AE9A52 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D401FB8B178A39FE00AE9A52 /* main.cpp */; };
D401FB97178A435600AE9A52 /* media in Resources */ = {isa = PBXBuildFile; fileRef = D401FB96178A435600AE9A52 /* media */; };
D467DF8D1AAB02470036E5B0 /* Tutorial-Touch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D467DF8C1AAB02470036E5B0 /* Tutorial-Touch.cpp */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1909FDF2AF92458D81D439D7 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = SOURCE_ROOT; };
03BC130504D0C6CFC30D51FB /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
8533CB918A4E4092BE7C59C7 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
BD7F796DA11C371DCBDF4C61 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
D401FB6B178A37F600AE9A52 /* Tutorial-Touch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tutorial-Touch.app"; sourceTree = BUILT_PRODUCTS_DIR; };
D401FB6E178A37F600AE9A52 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
D401FB70178A37F600AE9A52 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand All @@ -30,8 +31,8 @@
D401FB7C178A37F600AE9A52 /* Tutorial-Touch-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tutorial-Touch-Prefix.pch"; sourceTree = "<group>"; };
D401FB80178A37F600AE9A52 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
D401FB82178A37F600AE9A52 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D401FB8B178A39FE00AE9A52 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = SOURCE_ROOT; };
D401FB96178A435600AE9A52 /* media */ = {isa = PBXFileReference; lastKnownFileType = folder; name = media; path = ../../media; sourceTree = "<group>"; };
D467DF8C1AAB02470036E5B0 /* Tutorial-Touch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "Tutorial-Touch.cpp"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -49,13 +50,22 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
CF8435788DA5AD5A523D9533 /* Pods */ = {
isa = PBXGroup;
children = (
03BC130504D0C6CFC30D51FB /* Pods.debug.xcconfig */,
BD7F796DA11C371DCBDF4C61 /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
D401FB62178A37F600AE9A52 = {
isa = PBXGroup;
children = (
D401FB74178A37F600AE9A52 /* Tutorial-Touch */,
D401FB6D178A37F600AE9A52 /* Frameworks */,
D401FB6C178A37F600AE9A52 /* Products */,
1909FDF2AF92458D81D439D7 /* Pods.xcconfig */,
CF8435788DA5AD5A523D9533 /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -81,7 +91,7 @@
D401FB74178A37F600AE9A52 /* Tutorial-Touch */ = {
isa = PBXGroup;
children = (
D401FB8B178A39FE00AE9A52 /* main.cpp */,
D467DF8C1AAB02470036E5B0 /* Tutorial-Touch.cpp */,
D401FB96178A435600AE9A52 /* media */,
D401FB75178A37F600AE9A52 /* Supporting Files */,
);
Expand Down Expand Up @@ -189,7 +199,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand All @@ -198,7 +208,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D401FB8C178A39FE00AE9A52 /* main.cpp in Sources */,
D467DF8D1AAB02470036E5B0 /* Tutorial-Touch.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -227,10 +237,8 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -240,7 +248,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
Expand All @@ -258,13 +265,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
Expand All @@ -274,23 +279,27 @@
};
D401FB89178A37F600AE9A52 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1909FDF2AF92458D81D439D7 /* Pods.xcconfig */;
baseConfigurationReference = 03BC130504D0C6CFC30D51FB /* Pods.debug.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tutorial-Touch/Tutorial-Touch-Prefix.pch";
INFOPLIST_FILE = "Tutorial-Touch/Tutorial-Touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
D401FB8A178A37F600AE9A52 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1909FDF2AF92458D81D439D7 /* Pods.xcconfig */;
baseConfigurationReference = BD7F796DA11C371DCBDF4C61 /* Pods.release.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Distribution";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Tutorial-Touch/Tutorial-Touch-Prefix.pch";
INFOPLIST_FILE = "Tutorial-Touch/Tutorial-Touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions src/WindowTouch.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
static CGRect &screenRect()
{
static CGRect screenRect = [[UIScreen mainScreen] bounds];
static CGRect screenRect = [[UIScreen mainScreen] nativeBounds];
return screenRect;
}

Expand Down Expand Up @@ -167,7 +167,7 @@ - (void)doTick:(id)sender
pimpl->window.obj().rootViewController = pimpl->controller.obj();

pimpl->graphics.reset(new Graphics(screenHeight(), screenWidth(), false));
pimpl->graphics->setResolution(screenHeight(), screenWidth());
pimpl->graphics->setResolution(width, height);
pimpl->input.reset(new Input(gosuView, updateInterval));
pimpl->input->onTouchBegan = std::tr1::bind(&Window::touchBegan, this, _1);
pimpl->input->onTouchMoved = std::tr1::bind(&Window::touchMoved, this, _1);
Expand Down

0 comments on commit 6aae8ae

Please sign in to comment.