Skip to content

Instantly share code, notes, and snippets.

View Fortyseven's full-sized avatar
🥃
🟥🟧🟨⬜

Toby D Fortyseven

🥃
🟥🟧🟨⬜
View GitHub Profile
@Fortyseven
Fortyseven / GRAVITY.TXT
Created September 27, 2014 14:26
Gravity FAQ
Gravity Faq
The information contained in document will allow you to realistically
simulate jumping and interstellar maneuvers.
The purpose of this document is to understand the physics of the
world we live in, and apply realistic physics to your game. It
will not give you optimized routines for your program, that is your
job! But if you understand how things work, it will be a heck of
a lot easier.
@Fortyseven
Fortyseven / UTILS.PAS
Created September 27, 2014 14:31
Old kitchen sink 'utilities' unit for Turbo Pascal (DOS)
{$G+,A+,S-,R-,I-,D+,L-,N-,E-,X+}
Unit UTILS;
{ Utilities Unit
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Û Û ÜßßÜ Üßß ÜÛßßßÛßßÜ ÛßßßÛß ßß ß ~ ³
³ _ Ü ÜÜ ÜÛß Û Ûß Û ßÜÜÜÜÜß ßÜÜß Ûß Û ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄ[SOURCE CODE LIBRARY]ÄÄÄÄÄÄÄÄÄÄÄÄÄ´
ÔÍÍÍÍÍÍÍÍÍÍÍÍ[Misc. Useful Routines]ÍÍÍÍÍÍÍÍÍÍÍ; v1.3
}
Interface
@Fortyseven
Fortyseven / gist:cd273d441b6d9cd141fc
Created September 27, 2014 14:38
Move386 assembler code for Turbo Pascal
Procedure _Move386(VAR SRC,DST;CNT:Word); Assembler;
{ SRC = Source Buffer, DST = Destination Buffer, }
{ CNT = Number of BYTEs to move. Requires 386+. }
{ Revision History: }
{ 05-06-95 (SJM) Created by Steven J Morales! }
{ 06-18-95 (SJM) Removed PUSH and POP for speed.} ASM
{ Instructions: Clocks: Comments: }
MOV AX, DS; { 08: Save DS in AX. }
LDS SI, SRC; { 16: Load Source Buffer. }
LES DI, DST; { 16: Load Destination Buffer. }
@Fortyseven
Fortyseven / QSORT.PAS
Created September 27, 2014 14:53
An implementation of QuickSort provided by Borland with Turbo Pascal.
{ Turbo Sort }
{ Copyright (c) 1985,90 by Borland International, Inc. }
program qsort;
{$R-,S-}
uses Crt;
{ This program demonstrates the quicksort algorithm, which }
{ provides an extremely efficient method of sorting arrays in }
{ memory. The program generates a list of 1000 random numbers }
@Fortyseven
Fortyseven / README.md
Last active August 29, 2015 14:07 — forked from nikcub/README.md
using UnityEngine;
using System.Collections;
public class Camera_Follow_Offest_Flip_Lerpable2DScript : MonoBehaviour
{
//Set the amount of horizontal offset in the inspector
public Vector2 offset;
//Allow us to click and drag an object (that we want to follow) in the inspector
public Transform myObjectToFollow;
@Fortyseven
Fortyseven / Easing.cs
Last active August 29, 2015 14:12 — forked from Fonserbc/Easing.cs
using UnityEngine;
public class Easing
{
public static float Linear (float k) {
return k;
}
public class Quadratic
@Fortyseven
Fortyseven / nes-input.c
Last active August 29, 2015 14:15
Arduino NES Controller Input Class
/*
Arduino NES Controller Input Class
v1.0
Toby Deshane <fortyseven@bytestemplar.com>
http://hacsoft.org/files/arduino/nes.txt
2009-09-25, 2:46am
------------------------
PIN FUNCTION COLOR*
------------------------
@Fortyseven
Fortyseven / UVScroller.cs
Last active August 29, 2015 14:19
Port of UVScroller.js to C# - Unity3D
/************************************************************************
** UVScrollerEx.cs
**
** Ported from UVScroller.js
*************************************************************************/
using UnityEngine;
[ExecuteInEditMode]
public class UVScroller : MonoBehaviour
@Fortyseven
Fortyseven / index.html
Last active August 29, 2015 14:19
Unity Web Player template (with Chrome 42 warning)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity Web Player | %UNITY_WEB_NAME%</title>
%UNITY_UNITYOBJECT_DEPENDENCIES%
<script type="text/javascript">
<!--
var unityObjectUrl = "%UNITY_UNITYOBJECT_URL%";
if (document.location.protocol == 'https:')