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
string.format = function(text, values) | |
if values isa map then | |
for kv in values | |
text = text.replace("${" + kv.key + "}", kv.value) | |
end for | |
else if values isa list then | |
if values.len > 0 then | |
for n in range(0, values.len - 1) | |
text = text.replace("${" + n + "}", values[n]) | |
end for |
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
builtinColor = globals.color | |
Color = {} | |
Color.r = 0 | |
Color.g = 0 | |
Color.b = 0 | |
Color.a = 0 | |
Color.init = function(r, g, b, a = 255) | |
self.r = r |
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
using roguecore.Math; | |
using System; | |
using System.Linq; | |
using System.Reflection; | |
namespace roguecore.Rendering | |
{ | |
[Serializable] | |
public struct Color | |
{ |
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 "tc" | |
tau=pi*2 | |
r=gfx.height/2.1 | |
cx=gfx.width/2 | |
cy=gfx.height/2 | |
n=180 | |
s=tau/n | |
t=1 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <SDL2/SDL.h> | |
const double ChromaticRatio = 1.059463094359295264562; | |
const double Tao = 6.283185307179586476925; | |
Uint32 sampleRate = 48000; | |
Uint32 frameRate = 60; |
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
[org 0x0100] | |
jmp start | |
PIT_CHANNEL0 equ 0x40 | |
PIT_CHANNEL1 equ 0x41 | |
PIT_CHANNEL2 equ 0x42 | |
PIT_COMMAND equ 0x43 | |
PIT_HZ equ 1193180 |
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
[org 0x0100] | |
jmp start | |
videoRAMSeg equ 0xb800 | |
textAttr db 0x07 | |
text: | |
db 'Hello, world!', 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
[org 0x0100] | |
jmp start | |
ms_per_cycle equ 55 | |
hrs: dw 0 | |
min: dw 0 | |
s: dw 0 | |
ms: dw 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
curl -s -L "$(curl -s -L "https://api.weather.gov/points/$(curl -s -L "https://nominatim.openstreetmap.org/search.php?q=$(curl -s -L ipinfo.io | jq -r '"\(.city),\(.region)"')&polygon_geojson=1&format=jsonv2" | jq -r '"\(.[0].lat),\(.[0].lon)"')" | jq -r '.properties.forecastHourly')" | jq -r '.properties.periods[0].temperature' |
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
' M(,) CONTAINS THE MAP DATA | |
' V(,) ARRAY CONTAINS THE VISIBILITY DATA | |
' MAP DATA: 1=FLOOR, 2=WALL | |
''' | |
' Feature toggles. | |
''' | |
' Set this to 1 to cause the entire playfield to be visible. | |
Const SHOW_PLAYFIELD = 0 |