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)updateCorrectKeysPressed { | |
correctKeysPressed_++; | |
correctKeysPressedThisGame_++; | |
// update the current score, 10 points for a correct key and 3 points for each consecutive correct key | |
score_ += 10 + (correctKeysPressedThisGame_ - 1) * 3; | |
if (correctKeysPressed_ && correctKeysPressed_ % 10 == 0) { | |
// compute the bonus based on consecutive correct keys | |
NSInteger bonus = score_ * ((float)correctKeysPressed_/200); |
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)updateCorrectKeysPressed { | |
correctKeysPressed_++; | |
correctKeysPressedThisGame_++; | |
// update the current score, 10 points for a correct key and 3 points for each consecutive correct key | |
score_ += 10 + (correctKeysPressedThisGame_ - 1) * 3; | |
if (correctKeysPressed_ && correctKeysPressed_ % 10 == 0) { | |
// compute the bonus based on consecutive correct keys | |
NSInteger bonus = score_ * ((float)correctKeysPressed_/200); |
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)updateGamesWon { | |
gamesWonInARow_++; | |
if (gamesWonInARow_ && (gamesWonInARow_ % 10 == 0 || gamesWonInARow_ == 5)) { | |
NSInteger bonus = score_* ((float)gamesWonInARow_ / 100); | |
score_ += bonus; | |
NSString *achievement = [NSString stringWithFormat:@"%d games in a row! (+%d)", gamesWonInARow_, bonus]; | |
[self achievementUnlocked:achievement]; | |
} |
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)achievementUnlocked:(NSString *)achievement { | |
[achievements_ addObject:achievement]; | |
// lazy load the achievements layer | |
if (!achievementLayer_) { | |
CGSize winSize = [[CCDirector sharedDirector] winSize]; | |
// instantiate the layer | |
achievementLayer_ = [[CCLayer alloc] init]; | |
achievementLayer_.anchorPoint = ccp(0,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
#define CGRectSetPos( r, x, y ) CGRectMake( x, y, r.size.width, r.size.height ) | |
#define CGRectSetX( r, x ) CGRectMake( x, r.origin.y, r.size.width, r.size.height ) | |
#define CGRectSetY( r, y ) CGRectMake( r.origin.x, y, r.size.width, r.size.height ) | |
#define CGRectSetSize( r, w, h ) CGRectMake( r.origin.x, r.origin.y, w, h ) | |
#define CGRectSetWidth( r, w ) CGRectMake( r.origin.x, r.origin.y, w, r.size.height ) | |
#define CGRectSetHeight( r, h ) CGRectMake( r.origin.x, r.origin.y, r.size.width, h ) |
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
- (NSString *)superviewPath:(UIView *)view | |
{ | |
NSMutableArray *path = [NSMutableArray array]; | |
while (view != nil) | |
{ | |
[path insertObject:[NSString stringWithFormat:@"(%p) %@",view,NSStringFromClass([view class])] atIndex:0]; | |
view = [view superview]; | |
} |
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
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
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
# | |
# License: Public domain | |
# | |
function bump_version() { | |
touch "$PROJECT_DIR/LASTVERSION" | |
typeset -i BUILD_VERSION=$(cat "$PROJECT_DIR/LASTVERSION") | |
BUILD_VERSION=$((BUILD_VERSION+1)) | |
echo $BUILD_VERSION > "$PROJECT_DIR/LASTVERSION" | |
echo "Bumped up build version to $BUILD_VERSION" |
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
diff --git a/BUILD.gn b/BUILD.gn | |
index 4e6816fd8..d54fef764 100644 | |
--- a/BUILD.gn | |
+++ b/BUILD.gn | |
@@ -12,7 +12,7 @@ group("default") { | |
testonly = true | |
deps = [ | |
"//webrtc", | |
- "//webrtc/examples", | |
+# "//webrtc/examples", |
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
#!/bin/bash | |
# rotoscope - auto rotoscope a video file with openSource Software on Linux | |
# needs ffmpeg, autotrace and ImageMagick | |
# usage: rotoscope videofile //will create videofile.rotoscoped.avi | |
# created by Honza Svasek : HonzaSvasek.nl | |
# edited by Joseph Riopelle finitelife[at]hotmail.com | |
set -x | |
export TMPDIR=/tmp/rotoscope$$ | |
export FILM=$1 |
OlderNewer