This file contains hidden or 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
// ______ ________ __________,_ ___________ | |
// ___ ___/ __ \/ _____/ \_ _____/ | _____ ____ ______\_ _____/_____ __ __ | |
// \ \/ /> / __ \ | __)| | \__ \ / ___\/ ___/ | __)_/ \| | \ | |
// > </ -- \ |__\ \ | | | |__/ __ \_/ /_/ >___ \ | \ Y Y \ | / | |
// / /\ \_______/\_______/ \____/ |____(______/\___ /_____/ /_________/_|_|__/____/ | |
// \_/ \_/ ..:: x86 flags emulator ::.. /_____/ | |
// '' Aidan Dodds 2017 '' | |
#include <assert.h> | |
#include <stdint.h> |
This file contains hidden or 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
// Auto Generated From ANSI C BNF using grammar adapted from Section A13 of The | |
// C programming language, 2nd edition, by Brian W. Kernighan and Dennis M. | |
// Ritchie, Prentice Hall, 1988. | |
#include <cassert> | |
#include <array> | |
#include <vector> | |
struct ast_node_t {}; | |
bool match(int index, int token); |
This file contains hidden or 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
// Auto Generated From ANSI C BNF using grammar adapted from Section A13 of The | |
// C programming language, 2nd edition, by Brian W. Kernighan and Dennis M. | |
// Ritchie, Prentice Hall, 1988. | |
struct state_t {}; | |
bool lexer_found(const char *); | |
state_t state_save(); | |
void state_restore(state_t&); | |
bool parse_integer_constant(); | |
bool parse_character_constant(); |
This file contains hidden or 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
struct Framework { | |
Framework() | |
: _screen(NULL) | |
{ | |
} | |
bool init(uint32_t w, uint32_t h) | |
{ | |
if (SDL_Init(SDL_INIT_VIDEO) != 0) { |
This file contains hidden or 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
#ifndef TAGVAL_H__ | |
#define TAGVAL_T__ | |
#include <typeinfo> | |
struct tagval_t { | |
tagval_t(int v): type_(typeid(int)), int_(v) {} | |
tagval_t(float v): type_(typeid(float)), float_(v) {} | |
tagval_t(const char *v): type_(typeid(const char *)), cstr_(v) {} |
This file contains hidden or 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 <array> | |
#include <cassert> | |
#include <cmath> | |
#include <cstdint> | |
#include <Windows.h> | |
#define MMOK(EXP) ((EXP) == MMSYSERR_NOERROR) | |
struct WaveInfo { |
This file contains hidden or 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 <array> | |
#include <cassert> | |
#include <cmath> | |
#include <cstdint> | |
#include <Windows.h> | |
#define WAVE_RATE 44100 | |
#define WAVE_SAMPLES 1024 | |
#define WAVE_CHANNELS 2 |
This file contains hidden or 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 <cassert> | |
#include <string> | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
typedef unsigned int uint; | |
struct GDIDetail { |
This file contains hidden or 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
project(residualvm) | |
# ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- | |
# recursively glob files | |
# | |
file(GLOB_RECURSE _FILES "*.cpp" "*.h") | |
# ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- | |
# file exclusion step | |
# |
This file contains hidden or 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
#pragma once | |
#include <memory> | |
#include <cstddef> | |
template <typename type_t> | |
struct dynarray_t { | |
dynarray_t(size_t elements) | |
: _elements(elements) | |
, _array(std::move(std::make_unique<type_t[]>(elements))) | |
{ |