Skip to content

Instantly share code, notes, and snippets.

View johngirvin's full-sized avatar

John Girvin johngirvin

  • Northern Ireland
View GitHub Profile
@johngirvin
johngirvin / KryoFluxDisk.java
Created October 24, 2011 20:57
Convert KryoFlux "i4" format dump files to DSK format images.
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

Keybase proof

I hereby claim:

  • I am johngirvin on github.
  • I am johngirvin (https://keybase.io/johngirvin) on keybase.
  • I have a public key whose fingerprint is 48FE 6702 45C3 D8AB 149F 4981 ADF5 6C88 DC54 3F5A

To claim this, I am signing this object:

@johngirvin
johngirvin / gist:ab9a69dd835a4864130b
Last active August 29, 2015 14:21
Mobile-App-Performance - RoboVM 1.2.0 and Unity 5
#ifndef __BUNNYMARK_SCENE_H__
#define __BUNNYMARK_SCENE_H__
#include "cocos2d.h"
USING_NS_CC;
typedef struct {
float x,xv,y,yv,r,rv;
Sprite *sprite;
#include "BunnyMarkScene.h"
USING_NS_CC;
bool
BunnyMarkScene::init()
{
if (!Scene::init()) { return false; }
Size visibleSize = Director::getInstance()->getVisibleSize();
#include "SDL.h"
#include "windows.h"
#include <ctime>
#include <cstdarg>
#include <vector>
SDL_DisplayMode mode;
SDL_Window *window;
SDL_Renderer *renderer;
@johngirvin
johngirvin / main.lua
Created September 21, 2016 22:51
Gideros Mobile Bunnymark
local bunnies = 0
local frames = 0
local frameTime = 0
local min_x = 13
local min_y = 19
local max_x = application:getLogicalWidth()-13
local max_y = application:getLogicalHeight()-19
@johngirvin
johngirvin / XmlReader.cs
Created April 10, 2017 10:33
Run libGDX XmlReader.rl through Ragel to produce a partial C# conversion.
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Entities;
using Niv.ECS.Components;
using static Niv.Debug.Log;
namespace Niv.ECS.Systems
{
diff --git a/Source/MonoGame.Extended.Entities/Entities/TransformComponent2D.cs b/Source/MonoGame.Extended.Entities/Entities/TransformComponent2D.cs
index 9f025a1..9a25f7f 100644
--- a/Source/MonoGame.Extended.Entities/Entities/TransformComponent2D.cs
+++ b/Source/MonoGame.Extended.Entities/Entities/TransformComponent2D.cs
@@ -167,7 +168,7 @@ namespace MonoGame.Extended.Entities
if (Parent != null)
{
Parent.GetWorldMatrix(out matrix);
- Matrix2D.Multiply(ref matrix, ref localMatrix, out matrix);
+ Matrix2D.Multiply(ref localMatrix, ref matrix, out matrix);