View wl_texture_atlas_format
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
<?xml version="1.0" encoding="UTF-8"?> | |
<TextureAtlas> | |
<meta> | |
<textureName>{{ metadata.target.textureFileName }}</textureName> | |
<textureExtension>{{ metadata.target.textureFileExtension }}</textureExtension> | |
<textureSize>{{ metadata.size }}</textureSize> | |
</meta> | |
<SubTextures> | |
{% for sprite in spritesAndAliases %} | |
<SubTexture> |
View generic
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
#include <iostream> | |
struct Vector2 { | |
float x; | |
float y; | |
Vector2(float x = 0, float y = 0) { | |
this->x = x; |
View generic
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 UIKit | |
func clamp<T:Comparable>(value:T, lowerBound:T, upperBound:T) -> T { | |
return min(max(lowerBound, value), upperBound) | |
} | |
func clamp(value:Vector2, lowerBound:Vector2, upperBound:Vector2) -> Vector2 { | |
return min(max(lowerBound, value), upperBound) | |
} |
View QuadTree.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
// | |
// QuadTree.h | |
// | |
// Created by Sid on 24/01/14. | |
// Copyright (c) 2014 whackylabs. All rights reserved. | |
// | |
#ifndef QuadTree_h | |
#define QuadTree_h |
View KingdomRush.c
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
#include <iostream.h> | |
#define N_MAX 2048 | |
typedef struct{ | |
int num; | |
int easyDone; | |
int easyStar; | |
int hardDone; | |
int hardStar; |
View createimp.c
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
/* | |
Input: | |
- (void)viewWillDisappear:(BOOL)animated; | |
Output: | |
- (void)viewWillDisappear:(BOOL)animated{ | |
[handler_ viewWillDisappear:animated]; | |
} | |
*/ |
View DebugAlert.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
#define POP_ALERT(title, msg) [[[[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]autorelease] show] | |
/* | |
Usage: | |
POP_ALERT(@"Title Here", @"Message Here"); | |
*/ |
View twoChecWins.m
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
/** Logic 1 */ | |
-(BOOL)funcOfBase:(int)b multiple:(int)n{ | |
return ((_slots[b]==_aType) && (_slots[b+n*1]==_aType) && (_slots[b+n*2])==_aType); | |
} | |
-(BOOL)checkWin{ | |
int bases[5] = {0, 1, 2, 3, 6}; | |
int multiples[5][4] = { | |
{1, 3, 4, 0}, | |
{3, 0, 0, 0}, |
View gist:3241901
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
if(troop_position == 4){ | |
for(int possible_position = 0; possible_position < 9; possible_position++){ | |
if(_slots[possible_position] == -1){ | |
availPos[troop_number][available_position[troop_number]++] = possible_position; | |
} | |
} | |
}else{ | |
for(int possible_position = 0; possible_position < 3; possible_position++){ | |
if(_slots[_nextPossiblePositions[troop_position][possible_position]] == -1){ | |
availPos[troop_number][available_position[troop_number]++] = _nextPossiblePositions[troop_position][possible_position]; |
View iOS_OpenGL_template.c
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
/* | |
At create setup stage | |
*/ | |
glEnableVertexAttribArray(GLKVertexAttribPosition); | |
glVertexAttribPointer(GLKVertexAttribPosition, 3, GL_FLOAT, GL_FALSE, 24, BUFFER_OFFSET(0)); | |
glEnableVertexAttribArray(GLKVertexAttribNormal); | |
glVertexAttribPointer(GLKVertexAttribNormal, 3, GL_FLOAT, GL_FALSE, 24, BUFFER_OFFSET(12)); | |
/* | |
At binding stage |
OlderNewer