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
// just wanted to put this somewhere | |
// it's not tested or debugged! probably don't use it. | |
enum { heap_buffer_size = 1024 }; | |
static int heap_size; | |
// element 0 unused for simpler math | |
static message_s heap[heap_buffer_size]; | |
static bool heap_full(void) |
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
// uses love2d 'effect' entry point | |
uniform float time = 0.0f; | |
float pi = 3.14159; | |
float intersect(float value1, float value2) | |
{ | |
return value1 * value2; | |
} |
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 <android/log.h> | |
#include "android_native_app_glue.h" | |
#include "lua.h" | |
#include "lualib.h" | |
#include "lauxlib.h" | |
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "beamer", __VA_ARGS__)) | |
#define LOGF(...) ((void)__android_log_print(ANDROID_LOG_FATAL, "beamer", __VA_ARGS__)) |
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 UnityEngine; | |
using System.Collections.Generic; | |
// Data that expires on scene close. | |
// Pretty much a hack, there must be a better way! | |
class SceneData<T> where T : class | |
{ | |
GameObject go; | |
T data; |
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
local ffi = require 'ffi' | |
local pa = ffi.load('portaudio') | |
ffi.cdef [[ | |
int Pa_GetVersion( void ); | |
const char* Pa_GetVersionText( void ); | |
typedef int PaError; | |
typedef enum PaErrorCode | |
{ |
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
-- state migration prototype inspired by circa's demo video and circa's | |
-- notes/stateful_code | |
---- handles state migration -------------------------------------------------- | |
local saved_states = {} | |
local index = 1 | |
function prepare_for_reload() | |
index = 1 |