Skip to content

Instantly share code, notes, and snippets.

template<typename T> class AABBImpl
{
public:
using VecT = Vec2<T>;
private:
VecT position, halfSize;
public:
struct TagFromPosition { };
#include <list>
#include <SSVUtils/SSVUtils.hpp>
volatile bool state {false};
struct TestClass
{
volatile int k{0};
volatile int y{0};
volatile bool todel{false};
@vittorioromeo
vittorioromeo / veeAsmFibonacci
Created December 20, 2013 14:50
Fibonacci in veeAsm
//!ssvasm
$require_registers(4);
$define(R0, 0);
$define(R1, 1);
$define(R2, 2);
$define(ROutput, 3);
@vittorioromeo
vittorioromeo / veeAsmTest1
Last active December 31, 2015 22:39
veeasm test
//!ssvasm
$require_registers(3);
$define(R0, 0);
$define(R1, 1);
$define(ROutput, 2);
@vittorioromeo
vittorioromeo / VirtualMachine.cpp
Last active December 31, 2015 20:29
Simple virtual machine created for fun (now with WIP function magic)
namespace ssvvm
{
class Value
{
public:
enum class Type{Null, Int, Float};
private:
Type type{Type::Null};
union { int implInt; float implFloat; };
namespace Internal
{
template<typename T> struct IsContainerHelper
{
template<typename U,
typename Require1 = decltype(std::begin(std::declval<const U&>())),
typename Require2 = decltype(std::end(std::declval<const U&>()))>
static std::true_type test(const U*);
template<typename U> static std::false_type test(...);
#include <thread>
#include <string>
#include <iostream>
#include <SSVUtils/SSVUtils.hpp>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
namespace ssvgl
{
class ShaderSource;
// This will save your sanity.
#include <cfenv>
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
@vittorioromeo
vittorioromeo / imageOutliner.cpp
Created November 28, 2013 15:22
Takes an image as an input, returns the same image, outlined by 1px, as output.
// Copyright (c) 2013 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#define SSVS_N_USE_JSON
#include <vector>
#include <string>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#!/bin/bash
(
cd /home/vittorioromeo/WEBVittorioRomeo2/
git pull
git submodule foreach git pull origin master
cd ./_RELEASE/
cmake ..
make -j2
sudo make install