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
typedef unsigned char byte; | |
byte memory[byte(-1)+1]; // global 8-bit memory pool | |
struct { char name[32]; void(*fn)(byte&); } | |
const instructions[byte(-1)+1] = | |
{ | |
{ "NOP", [](byte&) {} }, |
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 "imgui_internal.h" | |
int rotation_start_index; | |
void ImRotateStart() | |
{ | |
rotation_start_index = ImGui::GetWindowDrawList()->VtxBuffer.Size; | |
} | |
ImVec2 ImRotationCenter() | |
{ |
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 <vector> | |
#include <future> | |
#include <atomic> | |
static const size_t | |
buffer_size = 1024*1024, | |
backlog_bits = 4, | |
backlog = 2<<backlog_bits; // backlog powers of 2 support overflow |
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 "stdafx.h" | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <array> | |
#include <vector> | |
#include <iostream> | |
#include <sstream> | |
#include <time.h> | |
std::ostringstream oss; |
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> | |
#include <array> | |
#include <fstream> | |
#include <algorithm> | |
using namespace std; | |
typedef array<char, 32> buf_t; | |
typedef map<buf_t, buf_t> cmap_t; |
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
// to publish supported plugin strings | |
// use a single dllexport | |
// then just LoadLibrary and GetProcAddress in your framework | |
// defined in the framework.h | |
#define PLUGIN_PARAMS(...) PLUGIN_API const wchar_t* const * plugin_params(size_t& count) \ | |
{ \ | |
static const wchar_t* const params[] = \ | |
{ __VA_ARGS__}; \ | |
count = sizeof(params)/sizeof(wchar_t*); \ |
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 "stdafx.h" | |
#include <string> | |
#include <vector> | |
#include <map> | |
#include <sstream> | |
#include <iostream> | |
#include <memory> | |
using namespace std; |
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
from frames import script | |
@script | |
def A(a=3, b=5): | |
''' A returns bollox. ''' | |
print 'Hello, framework.' | |
try: | |
args = {'a': 5} |