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 / build_cd.json
Created January 1, 2024 13:50
Create Amiga CD32/CTDV ISO image (Python/JSON)
{
"iso": {
"volume": "SUPERGAME",
"application": "Super Game",
"publisher": "Supersoft",
"preparer": "Supersoft",
"copyright": "(C) 2023 Supersoft"
},
"files": [
{
@johngirvin
johngirvin / debug-print-bfa0c752.diff
Created November 9, 2022 08:36
Patch to add 0xbfff00 debug output from WinUAE to FS-UAE at commit [bfa0c752]
From adfa4ea9cfbca3d1a024803613fa72ac438af9e6 Mon Sep 17 00:00:00 2001
From: John Girvin <john@sixecho.com>
Date: Wed, 9 Nov 2022 08:32:31 +0000
Subject: [PATCH] port 0xbfff00 debug output from winuae
---
src/cia.cpp | 20 ++++
src/debug.cpp | 272 ++++++++++++++++++++++++++++++++++++++++++++
src/include/debug.h | 3 +
3 files changed, 295 insertions(+)
; 68000 2xCMP AABB check between box A and B
;
; d0=ax1,ay1 coordinates of top-left of A
; d3=bx2,by2 coordinates of bottom-right of B
; d5=-(aw+bw) -(A width + B width)
; d6=-(ah+bh) -(A height + B height)
sub.w d3,d0 ;d0=ay1-by2
cmp.w d6,d0 ;cmp #-(ah+bh)
bls .cd_done1 ;Skip if Y out of range
@johngirvin
johngirvin / ptplayer.s
Last active November 28, 2022 11:15
Amiga ptplayer replay routine v5.4 (beta) adapted to allocate audio channels and CIA timer interrupts from AmigaOS
;**************************************************
;* ----- Protracker V2.3B Playroutine ----- *
;**************************************************
;
; Version 5.4
; Written by Frank Wille in 2013, 2016, 2017, 2018, 2019, 2020.
;
; I, the copyright holder of this work, hereby release it into the
; public domain. This applies worldwide.
;
@johngirvin
johngirvin / draw_poly.s
Created September 1, 2020 10:31
Render an n-sided convex polygon into an 8-bit chunky buffer (Amiga, 68000)
;
; Part of StarCrusaderPatch
; StarCrusaderPatch is (c) 1999 John Girvin, All Rights Reserved
; http://aminet.net/package/game/patch/StarCrusaderPa
;
;--------------------------------------------------------------------------------
_draw_poly:
; Render an n-sided convex polygon into an 8-bit chunky buffer
#!/bin/bash
PROJ="/path/to/your/project/"
NAME="MyAwesomeGame"
SVER="1.0.0"
GODOT="/Applications/Godot.app/Contents/MacOS/Godot --path ${PROJ}/src"
###
# Mac OSX (RELEASE)
044a2d2fb387203e7282964ade36369a05ec6345adc4b99bdf92229f136069c448f44a957218aadef8ec7c472a32b0525ec71408de6436560814bf56abdb910f31
@johngirvin
johngirvin / LowResScene.cpp
Created January 8, 2018 00:25
Cocos2D-X 2D Camera Test
#include "LowResScene.h"
NewCamera* NewCamera::createOrthographic(float zoomX, float zoomY, float nearPlane, float farPlane)
{
auto ret = new (std::nothrow) NewCamera();
if (ret)
{
ret->initOrthographic(zoomX, zoomY, nearPlane, farPlane);
ret->autorelease();
return ret;
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);
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
{