Skip to content

Instantly share code, notes, and snippets.

View Mtgxyz's full-sized avatar

Morten Delenk Mtgxyz

View GitHub Profile
#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
using namespace std;
vector<string> nameTable;
int getVarID(string name) {
auto it=nameTable.end();
for(auto it=nameTable.begin(); it!=nameTable.end(); it++) {
@Mtgxyz
Mtgxyz / qdnec
Created December 18, 2014 19:00
Quick, dirty and non-efficient wdc 65816 compiler
<?php
/**qdnec help
Function declaration:
%f <name>; <Function body> %F;
Expression:
0=<main expression>;
Association:
<address (without $ or 0x)>=<main expression>;
Arithmetic Operations:
+ Addition
@Mtgxyz
Mtgxyz / Int2.java
Created January 11, 2014 17:35
Simple 2-Integer-Class for use with 2D-Game (Map Coords...), drawing quads (Position of the Pixels), and much more.
package de.bplaced.mtgxyz.cavegame;
public class Int2 {
public int x;
public int y;
public Int2(int x, int y) {
this.x = x;
this.y = y;
}
public Int2() {