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
var d = File.new() | |
if d.file_exists(DIALOG_FILE): | |
encode_dialog() | |
d.open(ENC_DIALOG_FILE, File.READ) | |
dialog = flip_bytes(d.get_buffer(d.get_len())).get_string_from_utf8().split("###") | |
d.close() | |
func encode_dialog(): | |
var file = File.new() | |
file.open(DIALOG_FILE, File.READ) |
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
extends Node2D | |
func _ready(): | |
var test_bytes = generate_test_bytes() | |
var processed_bytes = flip_bytes(flip_bytes(test_bytes)) | |
print(compare_bytes(test_bytes, processed_bytes)) | |
func generate_test_bytes() -> PoolByteArray: | |
var bytes = [] as PoolByteArray | |
for i in range(256): |
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
/* PrismJS 1.15.0 | |
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+c+csharp+cpp+python+typescript */ | |
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,t){var a=n.util.type(e);switch(t=t||{},a){case"Object":if(t[n.util.objId(e)])return t[n.util.objId(e)];var r={};t[n.util.objId(e)]=r;for(var l in e)e.hasOwnProperty(l)&&(r[l]=n.ut |
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
<?php | |
$txt = "if See if/else/elif. | |
elif See if/else/elif. | |
else See if/else/elif. | |
for See for. | |
while See while. | |
match See match. | |
break Exits the execution of the current for or while loop. | |
continue Immediately skips to the next iteration of the for or while loop. |
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
<?php | |
class Code | |
{ | |
private static $langs = array( | |
"gd" => "gdscript", | |
"cpp" => "C++" | |
); | |
public static function insert($content) | |
{ |
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
/* Track */ | |
module track(num_sleepers = 10) | |
{ | |
SPACING = 8; | |
RAIL_PITCH = 16.5; | |
RAIL_LENGTH = num_sleepers * SPACING; | |
RAIL_SIZE = [RAIL_LENGTH, 0.5, 0.8]; | |
SLEEPER_SIZE = [2, RAIL_PITCH * 1.2, 0.4]; | |
CURVE_ANGLE = 160; |
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
shader_type canvas_item; | |
uniform float cell_size = 16; | |
uniform float cell_spacing = 2; | |
uniform vec4 line_color : hint_color; //Now called source_color in Godot 4 | |
varying vec2 v; | |
void vertex() { | |
v = VERTEX; |
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
extends CenterContainer | |
const words = "ALFA, BRAVO, CHARLIE, DELTA, ECHO, FOXTROT, GOLF, HOTEL, INDIA, JULIETT, KILO, LIMA, MIKE, NOVEMBER, OSCAR, PAPA, QUEBEC, ROMEO, SIERRA, TANGO, UNIFORM, VICTOR, WHISKEY, X-RAY, YANKEE, ZULU" | |
const words2 = "Amsterdam, Baltimore, Casablanca, Denmark, Edison, Florida, Gallipoli, Havana, Italia, Jerusalem, Kilogramme, Liverpool, Madagascar, New York, Oslo, Paris, Quebec, Roma, Santiago, Tripoli, Uppsala, Valencia, Washington, Xanthippe, Yokohama, Zurich" | |
const words3 = "Able, Baker, Charlie, Dog, Easy, Fox, George, How, Item, Jig, King, Love, Mike, Nan, Oboe, Peter, Queen, Roger, Sugar, Tare, Uncle, Victor, William, X-ray, Yoke, Zebra" | |
const words4 = "Alfa, Bravo, Coca, Delta, Echo, Foxtrot, Gold, Hotel, India, Juliett, Kilo, Lima, Metro, Nectar, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Union, Victor, Whiskey, eXtra, Yankee, Zulu" | |
var list | |
var show_letter = true | |
var i = 0 |
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
shader_type canvas_item; | |
void vertex() { | |
VERTEX.x -= VERTEX.y * 0.3; | |
} |
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
shader_type canvas_item; | |
uniform float value: hint_range(0, 100); // % | |
uniform float thickness: hint_range(0, 100) = 30.; // % thickness | |
uniform sampler2D fg: hint_albedo; | |
uniform sampler2D bg: hint_black_albedo; | |
uniform float offset: hint_range(0, 100); // % | |
uniform float smoothing: hint_range(0, 100) = 5.; | |
void fragment() { |
OlderNewer