Skip to content

Instantly share code, notes, and snippets.

View DylanLukes's full-sized avatar

Dylan Lukes DylanLukes

  • University of California San Diego
  • San Diego, CA
View GitHub Profile
:version 7
# Blocks
# ID NAME FILE CORDS
1 Rock terrain.png 1,0
2 Grass terrain.png 3,0
3 Dirt terrain.png 2,0
4 Cobblestone terrain.png 0,1
5 Wood terrain.png 4,0
6 Sapling terrain.png 15,0
require "Redstone.rb"
class RedstonePlugin
@callback
@wrapper
def initialize(redstone)
@wrapper = redstone
@callback = method(:pluginMagic)
end
-(NBTag*)parseTag:(BOOL)named type:(int)type{
// If this tag is named, read a byte, otherwise, use the provided value.
int tagType = named?[self readByte]:type;
// If this is a TAG_End, go no further.
if (tagType == TAG_End) return [NBTEnd newTag];
// Read the name (if the tag is named)
// Assigning a nil value to the tag as its name will mark it as unnamed
// (see NBTag.m)
switch (tagType) {
case TAG_Byte:
parsedTag = [NBTByte newTagWithName:tagName];
[(NBTByte*)parsedTag setTagValue:[self readByte]];
break;
case TAG_Short:
parsedTag = [NBTShort newTagWithName:tagName];
[(NBTShort*)parsedTag setTagValue:[self readShort]];
break;
case TAG_Int:
parsedTag = [NBTag tagByParsing:data];
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
for (UITouch* touch in touches){
NSLog(@"Touch in View: %@", [self hitTest:[touch locationInView:self] withEvent:event]);
}
}
@implementation ConcordeAppDelegate
@synthesize window, overlay;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Make the overlay window transparent and borderless
[overlay setStyleMask:NSBorderlessWindowMask];
[overlay setBackgroundColor:[NSColor colorWithDeviceRed:0.0 green:0.0 blue:0.0 alpha:0.0]];
[overlay setOpaque:NO];
//
// CNWorldView+Drawing.m
// Concorde
//
// Created by Dylan Lukes on 9/22/10.
// Copyright 2010 Dylan Lukes. All rights reserved.
//
#import "CNWorldView+Drawing.h"
#import "Common.h"
//
// CNWorldView+Drawing.m
// Concorde
//
// Created by Dylan Lukes on 9/22/10.
// Copyright 2010 Dylan Lukes. All rights reserved.
//
#import "CNWorldView+Drawing.h"
#import "Common.h"
/*
** FBO.c
**
** Copyright (c) 2008 Max Rupp (feelgood@cs.pdx.edu) All rights reserved.
**
** cc FBO.c -o FBO -Wall -std=c99 -DDEBUG -DW=640 -DH=480 -framework OpenGL -framework GLUT
*/
#include <OpenGL/OpenGL.h>
#include <GLUT/glut.h>