Reminder this is UNSUPPORTED. Reproduce bugs on a stock install with xudev
/eudev
before reporting them.
Do not reboot until you've done them all.
-- Written by Rabia Alhaffar in June 14, 2021 | |
-- Simple script to detect some operating systems and CPU architecture via Lua! ;) | |
-- Updated: June 14, 2021 | |
-- Also, I would thank NickWilde263 and Nameless on GitHub for their suggestions! <3 | |
-- https://github.com/NickWilde263 | |
-- https://github.com/truemedian | |
local sys = { | |
arch = "UNKNOWN", |
package pancake; | |
import haxe.Constraints.Function; | |
/** | |
* ... | |
* @author Rabia Haffar | |
*/ | |
@:native("window.navigator.app") | |
extern class NavigatorApp { |
function arr2obj(array) { | |
var result = {}; | |
for (var i = 0; i < array.length; i++) { | |
result[(i).toString()] = array[i]; | |
} | |
return result; | |
} |
function sizeof(o) { | |
if (typeof(o) == "object") { | |
if (o.length !== void 0) { | |
return o.length; | |
} else { | |
var i = 0; | |
for (var k in o) i++; | |
return i; | |
} | |
} else if (typeof(o) == "string") { |
function copy_array(a, t) { | |
var result = []; | |
if (t == 0 || t == 1) { | |
result = a; | |
} else { | |
for (var i = 0; i <= t - 1; i++) { | |
for (var j = 0; j < a.length; j++) result.push(a[j]); | |
} | |
} | |
return result; |
# Written by Rabia Alhaffar in 27/November/2020 | |
# OpenLumines 1st test: Block rotation | |
# This demonstrates a Lumines block and it's rotatable with up arrow key. | |
=begin | |
Supporters: | |
@kniknoo | |
@LeviDuncanPixel | |
@Hiro_r_b | |
=end | |
def tick args |
// Draws a texture in 3D space with pro parameters... | |
void DrawTexturePro3D(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector3 origin, float rotation, float posZ, Color tint) | |
{ | |
// Check if texture is valid | |
if (texture.id > 0) | |
{ | |
float width = (float)texture.width; | |
float height = (float)texture.height; | |
bool flipX = false; |
-- Written by Rabia Alhaffar in August/2020 | |
local function pyramid(n) | |
local result = nil | |
if (n > 0) then | |
result = {} | |
for i = 1, n, 1 do | |
result[i] = {} | |
for j = 1, i, 1 do | |
result[i][j] = 1 | |
end |
-- Written by Rabia Alhaffar in 27/September/2020 | |
-- Even or Odd example | |
local function even(a) | |
if ((a % 2) == 0) then | |
return true | |
else | |
return false | |
end | |
end |