Skip to content

Instantly share code, notes, and snippets.

View Wunkolo's full-sized avatar
💻

Wunk Wunkolo

💻
View GitHub Profile
@Wunkolo
Wunkolo / Field.hpp
Created September 14, 2015 18:48
Implementation of the Drunken Biship
#pragma once
#include <stdint.h>
#include <algorithm>
template<size_t Width, size_t Height, typename T>
class Field
{
public:
Field(size_t StartX = Width / 2, size_t StartY = Height / 2)
{
@Wunkolo
Wunkolo / Sai2.md
Last active December 30, 2015 03:24
Sai2 notes

Binary arithmetic mask: (0x00010001) Decrypt constant:

80 00 << Size (128 bytes)
83B0BCBC D161AEAE 3A646868 416DB3B3
4887BBBB D72BCACA 89CFC2C2 5C2EBBBB
45223A3A 9C86A7A7 A9058484 C0FA0D0D
03E7BABA 96329696 50A5BDBD EFFFA2A2
EC1FF9F9 39A23D3D 16D76161 DD966565
77B4FEFE 28632F2F 742C1D1D C083BDBD
@Wunkolo
Wunkolo / compact.cpp
Last active May 5, 2024 20:21
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@Wunkolo
Wunkolo / MinBlit.hpp
Last active May 5, 2016 05:00
MinBlit
#pragma once
#include <stdint.h>
#include <initializer_list>
#include <memory>
#include <float.h>
/*
A Minimal 256 color index blitter
All images are 8-bit grayscale images
@Wunkolo
Wunkolo / SimpWind.cpp
Created June 4, 2016 19:28
Simple Painting Window
#include "SimpWind.hpp"
#include <mutex>
bool SimpWind::WindowImplementation::PopEvent(Event & event)
{
if( Events.empty() )
{
// Populate Queue
ProcessEvents();
}
#pragma once
#include <cstdint>
#include <string>
#include <array>
#include <vector>
class BoyerMoore
{
public:
BoyerMoore(const std::string &Pattern)
#include "Console.hpp"
#include <Windows.h>
#include <conio.h> // _getch()
#pragma warning(disable:4996)
#include <io.h>
#include <cctype> //isgraph
@Wunkolo
Wunkolo / DAT.md
Last active October 12, 2022 22:19
Platinum games "DAT" file dumper

DAT/DTT files are general containers found within the compressed .cpk files

struct Header
{
	std::uint32_t Magic; // 'DAT\x00'
	std::uint32_t FileCount;
	std::uint32_t FileTableOffset;
	std::uint32_t ExtensionTableOffset;
	std::uint32_t NameTableOffset;
<html>
<head>
<title>{Title}{block:PostTitle} | {PostTitle}{/block:PostTitle}{block:PostSummary} | {PostSummary}{/block:PostSummary}</title>
<meta charset="utf-8">
<meta name="color:Text" content="#a2a2a2" />
<meta name="color:Trim" content="#313032" />
<meta name="color:Background" content="#0e0e0f" />
<meta name="color:BackLight" content="#1f1e21" />
<meta name="color:Posts" content="#19181a" />
<link rel="shortcut icon" href="{Favicon}">
@Wunkolo
Wunkolo / Mystery.js
Last active July 14, 2022 02:07
Spiderman home-coming mystery code solved
targetPos = thisComp.layer("target").toComp([0,0]); // Compensating for the missing "targetPos" variable
box = thisComp.layer("box");
boxTopLeft = box.toComp([0,0]);
boxBottomRight = box.toComp([box.width,box.height]);
// this is erroneous on their part. "deltaX" and "xDistanceToEdge" does not exist yet, commented out.
boxAnchor = box.toComp(box.anchorPoint);// xRatio = deltaX/xDistanceToEdge;
deltaVec = sub(targetPos, boxAnchor)
deltaX = deltaVec[0];