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
struct card { short suit, short value } | |
struct player { card first, card second } | |
struct middle { card flop1, card flop2, card flop3, card turn, card river } | |
player players[ ] | |
int my_position | |
card cards[52] |
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
static bool hasGeneratedLookup = false; | |
#define DOT_LOOKUP_SIZE 1024 | |
#define DOT_LOOKUP_BITMASK 1023 | |
static uint8 colorDotLookup[DOT_LOOKUP_SIZE]; | |
/* | |
* Below code - waste of time; too slow. | |
*/ | |
inline uint8 hdColorDot(float color, float normal) | |
{ | |
unsigned i; |
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
GLvoid ftglBegin(GLenum prim) | |
{ | |
if (!ftglesQuadIndicesInitted) | |
{ | |
for (int i = 0; i < FTGLES_GLUE_MAX_VERTICES * 3 / 2; i += 6) | |
{ | |
int q = i / 6 * 4; | |
ftglesGlueArrays.quadIndices[i + 0] = q + 0; | |
ftglesGlueArrays.quadIndices[i + 1] = q + 1; | |
ftglesGlueArrays.quadIndices[i + 2] = q + 2; |
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 "SDL2/SDL.h" | |
#include "SDL2/SDL_mixer.h" | |
static const char *MY_COOL_MP3 = "cool_tunes.mp3"; | |
int main(int argc, char **argv) { | |
int result = 0; | |
int flags = MIX_INIT_MP3; | |
if (SDL_Init(SDL_INIT_AUDIO) < 0) { |
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
// circles by @davidppp | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; |
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
// total number of samples at each fragment | |
#define NUM_SAMPLES {{ numSamples }} | |
#define NUM_SPIRAL_TURNS {{ numSpiralTurns }} | |
#define USE_ACTUAL_NORMALS {{ useActualNormals }} | |
#define VARIATION {{ variation }} | |
uniform sampler2D sGBuffer; |
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
#!/bin/bash | |
rm -rf build | |
mkdir -p build/boot | |
echo "[INFO] Creating u-boot-bananapi" | |
if [ ! -d u-boot-bananapi ]; then | |
git clone https://github.com/LeMaker/u-boot-bananapi.git | |
elif [ -d u-boot-bananapi ]; then | |
( cd u-boot-bananapi && git pull ) |
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
#!/bin/bash | |
rm -rf build | |
mkdir -p build | |
echo "[INFO] Creating u-boot for bananapi" | |
if [ ! -d u-boot-bananapi ]; then | |
git clone https://github.com/LeMaker/u-boot-bananapi.git | |
elif [ -d u-boot-bananapi ]; then | |
( cd u-boot-bananapi && git pull ) |
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
bootargs=console=ttyS0,115200 console=tty0 disp.screen0_output_mode=EDID:1280x720p50 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait | |
aload_script=fatload mmc 0 0x43000000 script.bin; | |
aload_kernel=fatload mmc 0 0x48000000 uImage; bootm 0x48000000; | |
uenvcmd=run aload_script aload_kernel |
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
ext2load mmc 0 0x48000000 uImage | |
ext2load mmc 0 0x43000000 sun7i-a20-bananapi.dtb | |
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait panic=10 ${extra} | |
bootm 0x48000000 |
OlderNewer