Skip to content

Instantly share code, notes, and snippets.

@TheRouletteBoi
TheRouletteBoi / DetourHook.cpp
Last active July 8, 2025 15:09
Hooking any function including imports and exports. PowerPC, PPC, PS3, Playstation 3
#include "DetourHook.hpp"
#define POWERPC_REGISTERINDEX_R0 0
#define POWERPC_REGISTERINDEX_R1 1
#define POWERPC_REGISTERINDEX_R2 2
#define POWERPC_REGISTERINDEX_R3 3
#define POWERPC_REGISTERINDEX_R4 4
#define POWERPC_REGISTERINDEX_R5 5
#define POWERPC_REGISTERINDEX_R6 6
#define POWERPC_REGISTERINDEX_R7 7
@PrimaryFeather
PrimaryFeather / ZipLoader.as
Last active June 13, 2025 08:58
Makes Starling's AssetManager recognize and unzip zipped assets. Depends on FZip: http://codeazur.com.br/lab/fzip/
package starling.extensions
{
import deng.fzip.FZip;
import deng.fzip.FZipEvent;
import deng.fzip.FZipFile;
import flash.events.Event;
import flash.utils.ByteArray;
import starling.assets.DataLoader;
@PrimaryFeather
PrimaryFeather / PixelMaskDisplayObject.as
Last active June 13, 2025 09:09
New Version of "PixelMaskDisplayObject" that works with Starling 2.
package starling.extensions.pixelmask
{
import flash.display3D.Context3DBlendFactor;
import starling.core.Starling;
import starling.display.BlendMode;
import starling.display.DisplayObject;
import starling.display.DisplayObjectContainer;
import starling.display.Image;
import starling.events.Event;
@esidegallery
esidegallery / Timer.as
Last active June 13, 2025 09:07
Starling Timer
package starling.extensions
{
import starling.animation.DelayedCall;
import starling.animation.Juggler;
import starling.core.Starling;
import starling.events.EventDispatcher;
[Event(name="timer", type="starling.events.Event")]
[Event(name="timerComplete", type="starling.events.Event")]
public class Timer extends EventDispatcher
@PrimaryFeather
PrimaryFeather / MultiTextureStyle.as
Last active December 9, 2025 21:20
A "MeshStyle" for Starling that allows batching of multiple textures in one draw call.
// =================================================================================================
//
// Starling Framework
// Copyright Gamua GmbH. All Rights Reserved.
//
// This program is free software. You can redistribute and/or modify it
// in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================
@PrimaryFeather
PrimaryFeather / TextureMaskStyle.as
Last active June 13, 2025 09:07
A MeshStyle for Starling 2 that discards texels with an alpha value below a certain threshold. This makes it perfect for arbitrarily shaped stencil masks.
// =================================================================================================
//
// Starling Framework
// Copyright 2011-2016 Gamua. All Rights Reserved.
//
// This program is free software. You can redistribute and/or modify it
// in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================