Skip to content

Instantly share code, notes, and snippets.

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;
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"
@interface SXCompiledTileMap : SXTilemap {
int quadrantsX;
int quadrantsY;
pixelrevision / Example usage
Created Apr 1, 2011
Will check the time of method execution
View Example usage
- (void)someMethod{
// do some stuff
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;
pixelrevision / PixelPerfectCam.cs
Last active Apr 20, 2021
Script for unity to create a pixel locked orthogonal camera
View PixelPerfectCam.cs
using UnityEngine;
* A camera to help with Orthagonal mode when you need it to lock to pixels. Desiged to be used on android and retina devices.
public class PixelPerfectCam : MonoBehaviour {
* The target size of the view port.
public Vector2 targetViewportSizeInPixels = new Vector2(480.0f, 320.0f);