This file contains hidden or 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
| function split(s, v) | |
| local pos = s:find(v) | |
| local ret = {} | |
| local idx = 1 | |
| for i=1,string.len(s) do | |
| local c = s:sub(i,i) | |
| local token = s:sub(i, i+v:len()-1) | |
| if token:find(v) then | |
| idx = idx + 1 | |
| else |
This file contains hidden or 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
| all: | |
| cp foo.o bar.o | |
| @echo "or if you're the silent type..." | |
| @cp bar.o baz.o | |
| @echo "copied bar.o to baz.o" |
This file contains hidden or 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
| -- size 3 | |
| -- going up 1 3 5 | |
| -- going down 5 3 4 4 1 2 2 3 3 | |
| -- size 5 | |
| -- going up 1 3 5 7 9 | |
| -- going down 9 7 8 8 5 6 6 7 7 3 4 4 5 5 1 2 2 3 3 4 4 | |
| -- string.format is quite a bit of typing | |
| _ = string.format; |
This file contains hidden or 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
| void pretty_print_extensions(std::vector<std::string> &extensions) | |
| { | |
| // derived from the extension pretty printing from StepMania. | |
| using namespace std; | |
| sort( extensions.begin(), extensions.end() ); | |
| size_t next = 0; | |
| while( next < extensions.size() ) | |
| { | |
| size_t last = next; |
This file contains hidden or 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
| /* | |
| * OpenHMD - Free and Open Source API and drivers for immersive technology. | |
| * Copyright (C) 2013 Fredrik Hultin. | |
| * Copyright (C) 2013 Jakob Bornecrantz. | |
| * Distributed under the Boost 1.0 licence, see LICENSE for full text. | |
| */ | |
| #ifndef OPENHMD_H | |
| #define OPENHMD_H |
This file contains hidden or 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
| function findVar(attr) { | |
| var url = location.href.split("#")[0]; | |
| var search = new RegExp(attr + "=.*?(?=[#&]|$)"); | |
| var result = search.exec(url); | |
| if (result !== null) { | |
| result = result[0].split("=")[1]; | |
| if (/^-?\d+(\.\d+)?$/.test(result)) | |
| return Number(result); | |
| else | |
| return result; |
This file contains hidden or 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 <GL/glfw3.h> | |
| #include <png.h> | |
| #include "managers/FileManager.h" | |
| #include "PNGFile.h" | |
| #include "utils/Logger.h" | |
| Texture PNGFile::Load(std::string _path) | |
| { | |
| Texture tex; | |
This file contains hidden or 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
| /* | |
| * Copyright 2001-2004 Unicode, Inc. | |
| * | |
| * Disclaimer | |
| * | |
| * This source code is provided as is by Unicode, Inc. No claims are | |
| * made as to fitness for any particular purpose. No warranties of any | |
| * kind are expressed or implied. The recipient agrees to determine | |
| * applicability of information provided. If this file has been | |
| * purchased on magnetic or optical media from Unicode, Inc., the |
This file contains hidden or 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
| [ScreenSelectMusic] | |
| MusicWheelX=SCREEN_CENTER_X | |
| MusicWheelY=SCREEN_CENTER_Y | |
| MusicWheelOnCommand=draworder,DrawOrder.Overlay;SetDrawByZPosition,true;fov,90 | |
| [MusicWheel] | |
| ItemWidth=math.max(math.ceil(SCREEN_WIDTH/3), 220) | |
| ItemHeight=55 | |
| ItemOffset=0 | |
| ItemTransformFunction=function(self,offsetFromCenter,itemIndex,_numItems) \ |
This file contains hidden or 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
| CC=mipsel-gcw0-linux-uclibc-gcc | |
| CXX=mipsel-gcw0-linux-uclibc-g++ | |
| LIBS=-lGLESv2 -lEGL -Iglm | |
| FLAGS=-Wall -Wextra -fno-strict-aliasing -Og -ggdb -std=c++11 -Wno-missing-field-initializers | |
| OUT=bin/game.bin | |
| FILES=src/*.cpp src/stb_image.c | |
| PACKAGE=gcw-test.opk | |
| all: | |
| @if ! test -d bin; then mkdir bin; fi; |