Skip to content

Instantly share code, notes, and snippets.

View ArnCarveris's full-sized avatar
🎯
R&D

Arn ArnCarveris

🎯
R&D
View GitHub Profile
local ecs = require("flecs"):init()
local ID = ecs.ID
local SYSTEM = ecs.SYSTEM
ecs:import("flecs_components_input")
ecs:import("flecs_components_graphics")
ecs:import("flecs_components_geometry")
ecs:import("flecs_components_transform")
ecs:new_component{"setup"}
@ArnCarveris
ArnCarveris / flecs_backup.c
Last active September 30, 2019 09:13
flecs sandbox draft
#include "flecs_backup.h"
typedef uint32_t ecs_type_index_t;
bool ecs_type_next_index(ecs_type_t type, ecs_entity_t mask, ecs_type_index_t* index)
{
ecs_entity_t *array = (ecs_entity_t *)ecs_vector_first(type);
ecs_type_index_t count = ecs_vector_count(type);
@ArnCarveris
ArnCarveris / NodeGraph.cpp
Created November 18, 2018 01:33 — forked from spacechase0/NodeGraph.cpp
ImGui node graph
#include <any>
#include <cmath>
#include <imgui.h>
#include <imgui_internal.h>
#include "NodeGraph.hpp"
namespace
{
@ArnCarveris
ArnCarveris / exporter.hpp
Created November 14, 2018 22:20
EnTT Entity Exporter/Importer
#ifndef ENTT_ENTITY_EXPORTER_HPP
#define ENTT_ENTITY_EXPORTER_HPP
#include <array>
#include <cstddef>
#include <utility>
#include <cassert>
#include <iterator>
#include <type_traits>
@ArnCarveris
ArnCarveris / registry.hpp
Created November 14, 2018 22:15
EnTT Resource Registry
#ifndef ENTT_RESOURCE_REGISTRY_HPP
#define ENTT_RESOURCE_REGISTRY_HPP
#include <entt/resource/cache.hpp>
#include <entt/core/family.hpp>
#include <string>
#include <vector>
namespace entt
@ArnCarveris
ArnCarveris / property.hpp
Created November 14, 2018 22:13
EnTT Core Property
#ifndef ENTT_CORE_PROPERTY_HPP
#define ENTT_CORE_PROPERTY_HPP
namespace entt {
template<typename, typename, char...>
class Property;
template<typename Registry>
@ArnCarveris
ArnCarveris / group.hpp
Last active November 13, 2018 22:12
EnTT Core Group
#ifndef ENTT_CORE_GROUP_HPP
#define ENTT_CORE_GROUP_HPP
#include "family.hpp"
#include <vector>
namespace entt {
/*! @brief TODO */
@ArnCarveris
ArnCarveris / encoded.hpp
Last active March 5, 2020 12:46
EnTT VM
#pragma once
#include "vm.hpp"
namespace entt
{
template<typename Code>
struct vm_encoded
{
memory_buffer opcode;
@ArnCarveris
ArnCarveris / Saints Row Darkside.xccolortheme
Last active October 5, 2018 11:54
xcode 10 dark theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 0.501961 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>XcodeDigits - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@ArnCarveris
ArnCarveris / hierarchy.hpp
Last active September 30, 2024 07:53
EnTT Hierarchy
#pragma once
#include <entt/entity/registry.hpp>
namespace entt
{
/*! @brief TODO */
template<typename Entity>
class Hierarchy final {
using traits_type = entt_traits<Entity>;