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
class Slactuate | |
{ | |
/* how to use: build your own abstraction on m() and p() to ease the setting of properties. call u() each frame you update, then call c() to cleanup. */ | |
public var td /*tween datas*/ = new Array<SlacTween>(); | |
public function new(){} | |
public function u/*update to the given time*/(t : Float) { for (n in td) n.u(t); } | |
public function c/*clear tweens updated to past their end time, and return the removed ones*/() { | |
var i = td.length - 1; var r = new Array<SlacTween>(); if (td.length < 1) return r; | |
while (i >= 0) { var n = td[i]; if (n.ci > 1.) {r.push(td.splice(i, 1)[0]); } i -= 1; } | |
return 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
In file included from C:\zig\romlua\lua-5.3.5\src\lapi.c:16: | |
In file included from C:\zig\romlua\lua-5.3.5\src/lua.h:13: | |
C:\zig\zig-windows-x86_64-0.4.0+6b36b756\lib\zig\include\stddef.h:62:23: error: typedef redefinition with different | |
types ('unsigned long' vs 'unsigned int') | |
typedef __SIZE_TYPE__ size_t; | |
^ | |
C:\zig\zig-windows-x86_64-0.4.0+6b36b756\lib\zig\libc\include\generic-musl\bits/alltypes.h:88:24: note: previous | |
definition is here | |
typedef unsigned _Addr size_t; | |
^ |
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
const Builder = @import("std").build.Builder; | |
const builtin = @import("builtin"); | |
pub fn build(b: *Builder) void { | |
const exe = b.addExecutable("romlua", "romlua.zig"); | |
exe.addCSourceFile("lua-5.3.5/src/lapi.c",[][]const u8{"-std=c99"}); | |
exe.addCSourceFile("lua-5.3.5/src/lauxlib.c",[][]const u8{"-std=c99"}); | |
exe.addCSourceFile("lua-5.3.5/src/lbaselib.c",[][]const u8{"-std=c99"}); | |
exe.addCSourceFile("lua-5.3.5/src/lbitlib.c",[][]const u8{"-std=c99"}); | |
exe.addCSourceFile("lua-5.3.5/src/lcode.c",[][]const u8{"-std=c99"}); |
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
// allocation_death.go | |
package main | |
import ( | |
_ "image" | |
"github.com/go-gl/gl/v4.1-core/gl" | |
"github.com/go-gl/glfw/v3.2/glfw" | |
) |
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> | |
int collide(int data[25], int collision_mapping[3]) { | |
int collision = 0; | |
int i0 = 0; | |
for (i0 = 0; i0 < 25; i0++ ) | |
{ | |
collision += collision_mapping[data[i0]]; | |
} |
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
# initialize a new allegro-pascal project | |
my $projectname = "newproject"; | |
my $allegropas-src = "allegro.pas-5.2.a3-src-pas/lib"; | |
if $projectname.IO.e { | |
say "project $projectname already exists"; | |
} else { | |
mkdir $projectname or die "$!"; | |
try { |
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 Xml; | |
/* Flattens all the nuances of Haxe's Xml implementation | |
into an enum, where it's much easier to capture data. */ | |
enum FlatXMLNode { | |
Element( | |
name : String, | |
attribute : Map<String,String>, | |
children : Array<FlatXMLNode>); |
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
package ludamix.bmfont; | |
import haxe.ds.Vector; | |
import ludamix.bmfont.BMFont; | |
using ludamix.MapPair; | |
class BMFontRenderPage<T> { | |
public var data : BMFontPage; | |
public var image : T; | |
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
package ludamix; | |
import haxe.ds.Vector; | |
class T /*toolbox*/ | |
{ | |
public static inline var TAU = 6.28318530718; | |
public static inline var EPSILON = 0.0000001; | |
public static inline function lerpF(r0 : Float, r1 : Float, z : Float) : Float { return (r0 + (r1 - r0) * z); } |
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
{ | |
"haxe.haxeDiagnosticDelay": 2000, | |
"editor.quickSuggestionsDelay": 1000, | |
"editor.suggestOnTriggerCharacters": false, | |
"git.enabled": false, | |
"files.autoSaveDelay": 1000000000 | |
} |
NewerOlder