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
private void initialize() { | |
Coord.expandPoolTo(WIDTH+3, HEIGHT+3); | |
// Initialize the heightmap generator | |
ModuleFractal heightFractal = new ModuleFractal (ModuleFractal.FractalType.FBM, | |
ModuleBasisFunction.BasisType.GRADIENT, | |
ModuleBasisFunction.InterpolationType.QUINTIC); | |
heightFractal.setNumOctaves(terrainOctaves); | |
heightFractal.setFrequency(terrainFrequency); | |
heightFractal.setSeed(CommonRNG.getRng().between(0, Integer.MAX_VALUE)); | |
ModuleFractal ridgedHeightFractal = new ModuleFractal (ModuleFractal.FractalType.RIDGEMULTI, |
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
ref=(function(obj,key) | |
return (function(...) | |
local p={...} | |
if select('#',...)==0 then | |
return obj[key] | |
else | |
obj[key]=p[1] | |
end | |
end) | |
end) |
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
param ($name) | |
Set-PSDebug -Trace 2 | |
git clone --mirror https://github.com/BenMcLean/$name.git | |
java -jar bfg.jar --delete-folders dist "$name.git" | |
cd ./$name.git | |
git push | |
cd.. | |
Remove-Item -Path "$name.git" -Recurse -Force |
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 com.badlogic.gdx.ApplicationAdapter; | |
import com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; | |
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; | |
import com.badlogic.gdx.graphics.Color; | |
import com.badlogic.gdx.graphics.GL20; | |
import com.badlogic.gdx.graphics.Texture; | |
import com.badlogic.gdx.graphics.g2d.BitmapFont; | |
import com.badlogic.gdx.graphics.g2d.SpriteBatch; | |
import com.badlogic.gdx.utils.viewport.FitViewport; |
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
[Unit] | |
Description=This service spawns a Darkplaces Quake dedicated server. | |
# Place this file in /lib/systemd/system | |
# To enable this service to launch at boot time, enter in a terminal: systemctl enable darkplaces.service | |
# To disable this service from launching at boot time, enter in a terminal: systemctl disable darkplaces.service | |
# To check the state of all existing unit files, enter in a terminal: systemctl list-unit-files | |
# I followed these instructions to install Darkplaces, except for the parts about starting the dedicated server on boot because those parts don't work anymore: https://ubuntuforums.org/showthread.php?t=2095900 | |
# I based this service on https://github.com/cdev-tux/q3lite/blob/ba3f578b0dc93f2af645724fad283e7484b8d77e/misc/q3lite/pi/q3lite_ded.service | |
[Service] |
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
<# | |
.SYNOPSIS | |
Downloads VirtualBoyGo source code | |
.DESCRIPTION | |
Gathers all dependencies and places them in the correct folders! | |
.NOTES | |
Author : Benjamin McLean mclean.ben@gmail.com | |
.LINK | |
https://github.com/CidVonHighwind/VirtualBoyGo | |
#> |
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
[alias] | |
apply-gitignore = !git ls-files -ci --exclude-standard -z | xargs -0r git rm --cached |
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
@ECHO OFF | |
c: | |
cd %APPDATA% | |
cd ..\Local\Android\Sdk\platform-tools | |
adb get-state |
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
// Pixelated font shader by lox9973 | |
// It is a cutout shader, using alpha blending for 1 pixel antialiasing on the edges. | |
// Intended use is "3D Text" on an opaque object like a sign. | |
Shader "UI/PixelFont" { | |
Properties { | |
_MainTex ("Font Texture", 2D) = "white" {} | |
_Color ("Text Color", Color) = (1,1,1,1) | |
} | |
SubShader { | |
// Below Transparent queue. Renders after the skybox, but writes to depth. |
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> | |
using namespace std; | |
template <class T> | |
class lolwut // a lolwut is a simple encapsulated array | |
{ | |
public: | |
lolwut() : data(NULL), size(0) | |
{ |
OlderNewer