Skip to content

Instantly share code, notes, and snippets.

/* bfs512: B File System 512
A simple file system for m35fd compatible discs.
- Track free sectors
- Link sectors to form larger files.
*/
#ifndef DCPUB_LIB_BFS512
#define DCPUB_LIB_BFS512
// Functions for reading files from a disc formatted with the bfs512 file system.
#ifndef DCPUB_LIB_BFS512_FILES
#define DCPUB_LIB_BFS512_FILES
#include bfs512.dc
#include m35fd.dc
#define BFS512_MODE_READ 0
#define BFS512_MODE_WRITE 1
// Functions for reading directories on a bsf512 formatted disc
#ifndef DCPUB_LIB_BFS512_DIRECTORIES
#define DCPUB_LIB_BFS512_DIRECTORIES
#include m35fd.dc
#include bfs512.dc
#include bfs512_files.dc
#include vec.dc
// Testing Bleos File System 512
#include m35fd.dc
#include bfs512.dc
#include bfs512_files.dc
#include bfs512_directories.dc
#include default_environment.dc
#define CERROR(msg) if (err != 0) { printf(msg); printf(": EC %\n", err); goto ERROR; }
SET J, SP
; Entering blocknode emit
; bypassed
; static M35FD_HARDWARE_ID[2] = { 0x4FD5, 0x24C5 };
; static M35FD_MANUFACTURER_ID[2] = { 0x1eb3, 0x7e91 };
; static LEM_HARDWARE_ID[2] = { 0x7349, 0xf615 };
; constant LEM_VRAM_SIZE = 384;
; constant CONSOLE_SIZE = 384;
; constant CONSOLE_WIDTH = 32;
; constant CONSOLE_HEIGHT = 12;
(if (! server)
(nop
/* Runs on client */
(print "Binding keys.\n")
(bind-key "W" "HELD" (camera.Pitch (* 1.0 delta)))
(bind-key "S" "HELD" (camera.Pitch (* -1.0 delta)))
(bind-key "A" "HELD" (camera.Yaw (* 1.0 delta)))
(bind-key "D" "HELD" (camera.Yaw (* -1.0 delta)))
(print "Creating interactive cube.")
public static Vector3 ProjectAOntoB(Vector3 A, Vector3 B)
{
return Vector3.Dot(A, B) * B;
}
public override void HandleMouse(Ray mouseRay, Action<VertexPositionColor, VertexPositionColor> debug)
{
//Transform triangle into world space
var verts = new Vector3[3];
verts[0] = new Vector3(-0.5f, -0.5f, 0);
@Blecki
Blecki / cipher.msp
Created May 5, 2013 01:23
Some ciphered text for a piece of interactive fiction.. and the MISP code to create it.
(set @globals encoding-table
(record
(mape "abcdefghijklmno")
(base "─│┌┐└┘├┤┬┴┼▲►▼◄")
(a "aad")
(b "aaf")
(c "aah")
(d "aid")
(e "aif")
(f "aih")
(set @globals encoding-table
(record
(mape "abcdefghijklmno")
(base "─│┌┐└┘├┤┬┴┼▲►▼◄")
(a "──┐")
(b "──┘")
(c "──┤")
(d "─┬┐")
(e "─┬┘")
(f "─┬┤")
Version 1 of Generated Hyperlinks (for Glulx only) by Anthony Casteel begins here.
"based on Basic Hyperlinks by Emily Short"
Include Glulx Entry Points by Emily Short.
Section - Glulx Interaction
When play begins:
start looking for hyperlinks.