This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdexcept> | |
#include <Windows.h> | |
#include <Psapi.h> | |
#include <detours.h> | |
#include <d3d9.h> | |
#include <d3dx9.h> | |
#define PI 3.14159F | |
char **game_ptr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <TlHelp32.h> | |
#include <Psapi.h> | |
int main() | |
{ | |
const auto *exe = "GuiltyGearXrd.exe"; | |
const auto *dll = "ggxrd_hitbox_overlay.dll"; | |
const auto snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-enablereplays : Enable replays in the retail version of Skullgirls | |
-c config_file : Use the specified configuration file instead of the default | |
-defaultkeys : Reset all keybinds | |
-log : Enable logging | |
-fs : Run in fullscreen | |
-fw : Run in fullscreen windowed | |
-res blahxblah : Set the screen resolution, where blah is a a number | |
-sc : Set the screen rendering scale; useless? | |
-ignorefocus : Let's the game take input despite not being focused | |
-vjoyfix : always poll joystick pov hats? I don't know the context of this. irc says ps3 controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC := clang | |
TARGET := game | |
AL_CFLAGS := -Ilib/allegro/include | |
AL_LDFLAGS := -Llib/allegro/lib | |
GLIB_CFLAGS := -Ilib/glib -Ilib/glib/glib | |
GLIB_LDFLAGS := -Llib/glib/glib/.libs | |
CFLAGS := -g -Wall $(AL_CFLAGS) $(GLIB_CFLAGS) | |
LDFLAGS := $(AL_LDFLAGS) $(GLIB_LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MAX_CONTROLLERS 4 | |
class JoypadController { | |
public: | |
JoypadController() : m_is_connected(false), m_gamepad(0), m_instance_id(-1), m_haptic(0) {} | |
int JoypadController::processEvent(const SDL_Event& event); | |
private: | |
SDL_GameController *m_gamepad; | |
SDL_Haptic *m_haptic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graph = {} | |
Graph.__index = Graph | |
function Graph.new() | |
return setmetatable({adjacency_list = {}, nodes = {}, edges = {}, floyd_dists = {}}, Graph) | |
end | |
function Graph:__tostring() | |
local str = "----\nAdjacency List: \n" | |
for node, list in pairs(self.adjacency_list) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library ld28; | |
import 'dart:html'; | |
import 'dart:math' as Math; | |
import 'dart:web_gl' as WebGL; | |
import 'dart:typed_data'; | |
import 'package:vector_math/vector_math.dart'; | |
part 'shader.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPSO(filename) | |
local templates = loadstring("return " .. love.filesystem.read(filename))() | |
local pss = {} | |
local degToRad = function(d) return d*math.pi/180 end | |
local getPS = function(template) | |
local sprite = love.graphics.newImage('your_default_sprite_here.png') | |
local ps = love.graphics.newParticleSystem(sprite, template.buffer_size) | |
ps:setBufferSize(template.buffer_size) | |
local colors = {} | |
for i = 1, 8 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html,<div class="wrap"> <h1>Todo<span>, no fuss lists</span></h1> <input placeholder="Add a todo" type="text" id="item" /> <button id="go">Save</button> <span class="help">* tap to delete</span> <ul id="tudu_list"> </ul> </div><script type="text/javascript">var tudu_list = document.getElementById('tudu_list'); var item = document.getElementById('item'); var new_li; var new_obj = {}; function prependElement(parentID,child) { parent=parentID; parent.insertBefore(child,parent.childNodes[0]); } function remove(element){ element.parentNode.removeChild(element); } function deleteItem(){ var answer = confirm('Sure you want to remove this?'); if(answer){ var deleteId = this.getAttribute('rel'); remove(this); } } function addItem(){ if(item.value !== ''){ new_li = document.createElement('li'); new_li.innerHTML = item.value; prependElement(tudu_list, new_li); new_li.onclick = deleteItem; item.value = ''; } } function callAdd(e){ if(event.keyCode == 13){ addItem(); } } item.onkeyup = function(e){ callAdd(e) }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <map> // Component-entity system in 24 lines of C++11. 2013 rlyeh, MIT licensed. | |
#include <set> // Code fragment from kult engine - https://github.com/r-lyeh/kult | |
enum SUBSYSTEM_MODE { JOIN = 0, MERGE = 1, EXCLUDE = 2 }; | |
template<typename T> std::set<unsigned> &system() | |
{ static std::set<unsigned> entities; return entities; } | |
template<typename T, int MODE> std::set<unsigned> subsystem( const std::set<unsigned> &B ) | |
{ std::set<unsigned> newset; const std::set<unsigned> &A = system<T>(); // union first, | |
/**/ if (MODE == MERGE) { newset = B; for( auto &id : A ) newset.insert(id); } // then difference, | |
else if (MODE == EXCLUDE) { newset = B; for( auto &id : A ) newset.erase (id); } // then intersection | |
else if(A.size() < B.size()) { for( auto &id : A ) if(B.find(id) != B.end()) newset.insert( id ); } |
NewerOlder