Skip to content

Instantly share code, notes, and snippets.

View PXRPropSerializer.h
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
typedef enum {
PXRPropSerializerTypeUnknown,
PXRPropSerializerTypeFloat,
PXRPropSerializerTypeDouble,
PXRPropSerializerTypeInt,
PXRPropSerializerTypeClass,
PXRPropSerializerTypeBool
@pixelrevision
pixelrevision / SXFPSMeter
Created Mar 30, 2011
Quick and dirty frames per second meter for sparrow
View SXFPSMeter
#import <Foundation/Foundation.h>
#import "Sparrow.h"
@interface SXFPSMeter : SPTextField{
}
- (void)update:(SPEnterFrameEvent*)event;
@end
@pixelrevision
pixelrevision / SXCompiledTileMap.h
Created Mar 31, 2011
A tilemap setup for the sparrow framework
View SXCompiledTileMap.h
#import <Foundation/Foundation.h>
#import "Sparrow.h"
#import "SPCompiledSprite.h"
#import "SXTilemap.h"
#define SX_COMPILED_TILEMAP_RENDER_COMPLETE_EVENT @"renderComplete"
@interface SXCompiledTileMap : SXTilemap {
int quadrantsX;
int quadrantsY;
@pixelrevision
pixelrevision / Example usage
Created Apr 1, 2011
Will check the time of method execution
View Example usage
- (void)someMethod{
StartTimeLog
// do some stuff
EndTimeLog
}
View SXPointSpriteGroup.m
#import "SXPointSpriteGroup.h"
@implementation SXPointSpriteGroup
@synthesize texture;
- (id)initWithTexture:(SPTexture*)t andNumSprites:(int)amount{
self = [super init];
numPointSprites = amount;
self.texture = t;
[self reset];
View SXJoypad.m
#import "SXJoypad.h"
@implementation SXJoypad
@synthesize centerPoint;
@synthesize verticalDirection;
@synthesize horizontalDirection;
@synthesize projection;
@synthesize angle;
@synthesize projectionModifier;
View SXSlider.m
#import "SXSlider.h"
@implementation SXSlider
@synthesize handle;
@synthesize track;
@synthesize value;
@synthesize min;
@synthesize max;
@synthesize percentage;
View SXSwitch.m
#import "SXSwitch.h"
@implementation SXSwitch
@synthesize on;
@synthesize onGraphic;
@synthesize offGraphic;
- (id)init{
self = [super init];
on = YES;
View PXRCamView.h
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <CoreVideo/CoreVideo.h>
#import <CoreMedia/CoreMedia.h>
@class PXRCamView;
@protocol PXRCamViewDelegate
- (void)camView:(PXRCamView*)cv didCaptureImage:(UIImage*)img;
View WritableDirectory.h
#import <Foundation/Foundation.h>
@interface WritableDirectory : NSObject
+ (NSString*)getDir;
@end