Here I'm trying to understand what happens when I run
./hello
#include
Here I'm trying to understand what happens when I run
./hello
#include
/* | |
2D Angle Interpolation (shortest distance) | |
Parameters: | |
a0 = start angle | |
a1 = end angle | |
t = interpolation factor (0.0=start, 1.0=end) | |
Benefits: | |
1. Angles do NOT need to be normalized. |
struct Textures { | |
static GLuint LoadPNG(const std::string& filename) { | |
if( ! FileExists(filename)) { | |
Exit("Cannot open png: %s.", filename.c_str()); | |
} | |
FILE* fp = ::fopen(filename.c_str(), "r"); | |
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); |
/*-----------------------------------------------------------. | |
/ ColorBlind correction / | |
'-----------------------------------------------------------*/ | |
// Daltonize (source http://www.daltonize.org/search/label/Daltonize) | |
// Modified to simulate color blindness. | |
float4 Daltonize( float4 input, float2 tex ) | |
{ | |
// RGB to LMS matrix conversion | |
float3 L = (17.8824f * input.r) + (43.5161f * input.g) + (4.11935f * input.b); | |
float3 M = (3.45565f * input.r) + (27.1554f * input.g) + (3.86714f * input.b); |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.function.BinaryOperator; | |
public class Duplication { | |
public static void main(String[] args) { | |
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); | |
Integer product = Math2.sum(numbers); | |
System.out.println(product); | |
} |
--[[ json.lua | |
A compact pure-Lua JSON library. | |
The main functions are: json.stringify, json.parse. | |
## json.stringify: | |
This expects the following to be true of any tables being encoded: | |
* They only have string or number keys. Number keys must be represented as | |
strings in json; this is part of the json spec. |
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
Screen resolutions | |
------------------ | |
PICO-8 supports different undocumented videomodes that can be activated at runtime, | |
using poke(0x5F2C, X) where X is one of the following mode numbers: | |
0: 128x128, 0 pages | |
1: 64x128, 1 page | |
2: 128x64, 1 page | |
3: 64x64, 3 pages |
TileTable = { | |
{ 1, 1, 1, 1, 1, 1, 1 }, | |
{ 1, 1, 1, 1, 1, 1, 1 }, | |
{ 1, 1, 1, 1, 1, 1, 1 }, | |
{ 2, 2, 2, 2, 2, 2, 2 }, | |
{ 3, 3, 3, 3, 3, 3, 3 }, | |
{ 4, 4, 4, 4, 4, 4, 4 }, | |
{ 5, 5, 5, 5, 5, 5, 5 }, | |
{ 5, 5, 5, 5, 5, 5, 5 }, | |
{ 5, 5, 5, 5, 5, 5, 5 }, |
This information applies to the PICO-8 0.1.6
release.
This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.
You can always view the manual or yellowafterlife's extended 0.1.1
manual.
print(function() end)
outputs the string function
instead of the string function: 0x0000000
.