Skip to content

Instantly share code, notes, and snippets.

Avatar

PkR PiKeyAr

View GitHub Profile
View gist:65bdf8741f2af4a8ed91c457ceaa96ca
public static NJS_MOTION Load(string filename, int nummodels = -1)
{
bool be = ByteConverter.BigEndian;
ByteConverter.BigEndian = false;
byte[] file = File.ReadAllBytes(filename);
ulong magic = ByteConverter.ToUInt64(file, 0) & FormatMask;
if (magic == SAANIM)
{
byte version = file[7];
if (version > CurrentVersion)
View gist:34dccc11ddedc6c04769eecc4b6d6101
public void Save(string filename)
{
bool be = ByteConverter.BigEndian;
ByteConverter.BigEndian = false;
List<byte> file = new List<byte>();
file.AddRange(ByteConverter.GetBytes(SAANIMVer));
Dictionary<string, uint> labels = new Dictionary<string, uint>();
byte[] anim = GetBytes(0x14, labels, out uint addr);
file.AddRange(ByteConverter.GetBytes(addr + 0x14));
file.Align(0x10);
View gist:ee16d755b78f87317c77e7ae7488133b
void __cdecl actBubble(ObjectMaster* a1)
{
BUBBLE* v1; // esi
short bubble_id; // edi
int spline_id;
float ampl; // ST1C_4
float spiral_sine; // ST1C_4
float spiral_cosine; // st7
float scale_change; // st6
float scale_swing; // [esp+1Ch] [ebp+4h]
View gist:b5dcb3dbdbaef6c1042977f229d09bf1
void __cdecl actBubble(ObjectMaster *a1)
{
BUBBLE *v1; // esi
int v2; // edi
int random; // eax
int id; // ecx
BUBBLE_LIST *bubblelist; // edx
int spline; // eax
int somechange; // ecx
float finchange; // ST1C_4
@PiKeyAr
PiKeyAr / gist:448a48f63264a2ca48ffbf377cb0e670
Created Mar 19, 2020
what in the unholy name of ass is this fuckness
View gist:448a48f63264a2ca48ffbf377cb0e670
int SetVolume_WTF(void)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint in_r0;
uint in_r1;
uint uVar4;
View SADXX360_SoundEnum
enum $DCD718C62BCDDB1E742AE1744FFBD526
{
SE_DAMAGE = 0x0,
SE_CURSOR = 0x1,
SE_DECIDE = 0x2,
SE_PAUSE = 0x3,
SE_COUNT = 0x4,
SE_COUNTUP = 0x5,
SE_NORMBARRIER = 0x6,
SE_RING = 0x7,
You can’t perform that action at this time.