Skip to content

Instantly share code, notes, and snippets.

View cuckydev's full-sized avatar

Regan Green cuckydev

View GitHub Profile
#include "stb_image.h"
#include "stb_image_write.h"
#include <iostream>
#include <fstream>
#include <filesystem>
#include <memory>
#include <stdexcept>
#include <cassert>
#include <array>
#include <Windows.h>
#include <ShlObj.h>
#include <Strsafe.h>
#include <Pathcch.h>
#pragma comment(lib, "Pathcch.lib")
#include <iostream>
#include <fstream>
#include <vector>
@cuckydev
cuckydev / modplayer.cpp
Created March 30, 2023 22:19
bad mod player
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"
#include <string>
#include <iostream>
#include <fstream>
#include <cstdint>
// Mod data
struct ModHeader
{
const hack_url = "https://upload.wikimedia.org/wikipedia/en/8/81/Wario.png"; // change this url to any image of your choice
const hack_canvas = document.querySelector("#canvas");
const hack_ctx = canvas.getContext("2d");
var hack_image=new Image();
hack_image.onload=function(){
hack_ctx.drawImage(hack_image,0,0,hack_canvas.width,hack_canvas.height);
};
hack_image.crossOrigin = "Anonymous";
/*
* ADX2OGG by Regan "CKDEV" Green
*
* Resources
* https://en.wikipedia.org/wiki/ADX_(file_format)
* https://github.com/xiph/vorbis/blob/master/examples/encoder_example.c
*/
#include <iostream>
#include <fstream>
@cuckydev
cuckydev / org2seq.c
Created January 27, 2022 20:38
org2seq
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static short Read16(FILE *fp)
{
return (fgetc(fp) << 0) | (fgetc(fp) << 8);
}
static long Read32(FILE *fp)
@cuckydev
cuckydev / gifenc.c
Created October 19, 2021 16:40
SonicEnc
#include "gifenc.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef _WIN32
#include <io.h>
@cuckydev
cuckydev / ram.c
Created October 15, 2021 13:18
Will Cause Issues
#include <stdlib.h>
#include <stddef.h>
int main(int argc, char *argv[])
{
size_t lol = 1;
while (1)
{
if (malloc(lol))
{
//parawp2
//Quickly written C file that converts .wp2 files to a pcm format that can be read by something like Audacity
//signed 16-bit stereo 48khz
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc, char *argv[])