Skip to content

Instantly share code, notes, and snippets.

View Waelwindows's full-sized avatar

Waelwindows Waelwindows

  • Mod Development Labs
View GitHub Profile
#include <iostream>
#include <math.h>
const int HEART_SIZE = 20;
const int HALF_SIZE = HEART_SIZE / 2;
bool is_in_love(int x,int y);
int main(void)
{
std::string message = " SYSTEMATIC LOVE ";
@Waelwindows
Waelwindows / fmt_pdf2nd_spr.py
Created May 17, 2017 18:25
PDF2nd SPR Noesis script
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Project Diva F 2nd SPR Format
# Script by waelwindows
# Made possible by Brolijah, Skyth, Stewie 1.0
from inc_noesis import *
import noesis
@Waelwindows
Waelwindows / gist:53350e96f42fd5323dcd2babfa23c5af
Created May 17, 2017 18:32
How to use the PDF2nd SPR script
1. Install the plugin into your Noesis python plugin location usually Noesis\plugins\python
2. Open Noesis and grap your spr file to view,
(The script is automatically setup to be used for thumbnail previewing)
3. (Optional: for sprs other than thmbs) Look for the Last PXT before the first mip starts and set the SPRTex-Mip classe's pxt_offset to that offset
4. (Optional: If you did 3) Reload the plugin or restart noesis
5. Double click on a .spr to view it
6. Right-click and press the export option on the .spr file to export the images to your desginated file format
@Waelwindows
Waelwindows / conv.glsl
Created July 10, 2018 20:20
GLSL code for converting between RGB and YCbCr (DIVA Edition)
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord/iResolution.xy;
vec4 col = texture(iChannel2, uv);
vec2 mip1 = texture(iChannel0, uv).xy;
vec2 mip2 = texture(iChannel1, uv).xy;
mat3 yMat = mat3(1., 0., 1.5748,