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
float lightDistance = 100.0; | |
void main(void) | |
{ | |
vec2 uv = gl_FragCoord.xy / iResolution.xy; | |
uv.y = iResolution.y - uv.y; | |
vec4 tex = texture2D(iChannel0, uv); | |
// How far are we from the mouse? | |
float mouseDist = distance(gl_FragCoord.xy, iMouse.xy); |
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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
varying vec4 v_color; | |
varying vec2 v_texCoords; | |
uniform sampler2D u_texture; | |
uniform vec3 u_playerPosition; | |
uniform float u_playerLightRangeScaled; |
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
setlocal EnableDelayedExpansion | |
@echo off | |
set sizes[m]=24 | |
set sizes[h]=36 | |
set sizes[xh]=48 | |
set sizes[xxh]=72 | |
set sizes[xxxh]=96 | |
for %%f in (.\svg\*.svg) do ( |
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
Every time a block changes (through physics or user action): | |
Add the 6 adjacent block coordinates to physicsQueue | |
In a physics thread, or whatever: | |
Check physics on each block of physicsQueue | |
That's it. :P |
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
Bytes 0 to 7 are 'SUPREME!' -> Or, probably, other game name abbreviations | |
Bytes 8 to 39 are the builder name | |
Bytes 40 to 71 are the world name | |
Byte 72 is the number of levels in the world | |
===== Level Segment ===== | |
2 bytes, for level dimensions? | |
32 bytes for name | |
Null-teminated string for song |
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
#!/usr/bin/env python | |
# import the pygame module, so you can use it | |
import pygame | |
from pygame.locals import * | |
#Main class | |
class Main: | |
scale = 1 | |
basewidth = 320 |
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
<?php | |
/*********************************************************************** | |
* Emailer class | |
* ------------- | |
* Copyright Samuel Atkins 2011 | |
* ------------- | |
* Simplifies sending of HTML and plain-text emails. | |
* | |
* Usage: | |
* send( $to : Email address to send to |
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
/** | |
* Generates the css for a grid system and returns it as a string. | |
*/ | |
function getGridSystemCSS(columns, columnWidth, gutterWidth) { | |
var totalWidth = columns * (columnWidth + gutterWidth), | |
fluidGutterWidth = percentageRoundedTo3DP(gutterWidth / totalWidth); // Get a number with up to 3 decimal places | |
var css =[".grid-wrapper {" | |
, " max-width: " + totalWidth + "px;" | |
, " margin-left: -" + fluidGutterWidth + "%;" |
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
var months = []; $('.walloftext').children().each(function(index, el){ if ($(this).hasClass('center')) {months.push(0);} else if ($(this).hasClass('miniga')) { months[months.length-1]++; } }); console.log(months); |
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
package uk.co.samatkins.racing; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import com.badlogic.gdx.files.FileHandle; | |
import com.badlogic.gdx.utils.Array; | |
import com.badlogic.gdx.utils.XmlReader; | |
import com.badlogic.gdx.utils.XmlReader.Element; |
OlderNewer