This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <QuartzCore/QuartzCore.h> // for CACurrentMediaTime() | |
- (void)runPoolBenchmark | |
{ | |
double startTime, endTime; | |
const int NumObjects = 1000000; | |
typedef SPMatrix SPObject; | |
[SPObject purgePool]; | |
NSMutableArray *array = [NSMutableArray arrayWithCapacity:NumObjects]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)addDistortionTo:(SPDisplayObject *)target | |
{ | |
float scale = Sparrow.contentScaleFactor; | |
NSURL *url = scale == 1.0f ? | |
[NSURL URLWithString:@"http://i.imgur.com/n95LSGb.jpg"] : | |
[NSURL URLWithString:@"http://i.imgur.com/QRXLvws.jpg"]; | |
[SPTexture loadFromURL:url generateMipmaps:NO scale:scale | |
onComplete:^(SPTexture *texture, NSError *outError) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = "Sparrow" | |
s.version = "2.1" | |
s.summary = "The Open Source Game Engine for iOS" | |
s.description = | |
<<-DESC | |
Sparrow is a pure Objective-C library for game developers, built from ground up | |
for iOS. If you have already worked with Adobe™ Flash or Starling, you will feel | |
right at home: Sparrow uses the same concepts and naming schemes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
if ARGV.count < 1 | |
puts "Usage: #{script_name} source_path" | |
puts " (e.g. ../src/starling/)" | |
exit | |
end | |
search_path = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================= | |
// | |
// Starling Framework | |
// Copyright 2011-2016 Gamua. All Rights Reserved. | |
// | |
// This program is free software. You can redistribute and/or modify it | |
// in accordance with the terms of the accompanying license agreement. | |
// | |
// ================================================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================= | |
// | |
// Starling Framework | |
// Copyright Gamua. All Rights Reserved. | |
// | |
// This program is free software. You can redistribute and/or modify it | |
// in accordance with the terms of the accompanying license agreement. | |
// | |
// ================================================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================= | |
// | |
// Starling Framework | |
// Copyright Gamua GmbH. All Rights Reserved. | |
// | |
// This program is free software. You can redistribute and/or modify it | |
// in accordance with the terms of the accompanying license agreement. | |
// | |
// ================================================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================= | |
// | |
// Starling Framework | |
// Copyright Gamua GmbH. All Rights Reserved. | |
// | |
// This program is free software. You can redistribute and/or modify it | |
// in accordance with the terms of the accompanying license agreement. | |
// | |
// ================================================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ================================================================================================= | |
// | |
// Starling Framework | |
// Copyright Gamua GmbH. All Rights Reserved. | |
// | |
// This program is free software. You can redistribute and/or modify it | |
// in accordance with the terms of the accompanying license agreement. | |
// | |
// ================================================================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
public class TestDeviceScaleFactors extends Sprite | |
{ | |
public function TestDeviceScaleFactors() | |
{ | |
var testSettings:Array = [ | |
{ name: "iPhone 3GS", dpi: 163, resX: 320, resY: 480 }, |