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
# Is this worth the time it took to write? I doubt it. | |
# | |
# Usage: | |
# | |
# include(autoglob) | |
# | |
# autoglob(MY_GLOB [RECURSE] | |
# *.cpp | |
# *.h) | |
# |
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
## | |
## Pick C++ version and features for compiler | |
## | |
## Why: Compilers require different flags for C++ standard conformance, as well | |
## as some requiring libraries linked for various functionality (and some later | |
## versions *lack* these libraries). This is an easy/extensible solution for | |
## such, since CMake's builtin picking is undependable. | |
## | |
## Usage: | |
## |
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
(defparameter *handlers* (make-hash-table)) | |
(defun register (ev fun) | |
(vector-push-extend fun (alexandria:ensure-gethash | |
ev *handlers* | |
(make-array 1 :fill-pointer 0 | |
:adjustable t)))) | |
(defun send (type msg from) | |
(let ((handler-list (gethash type *handlers*))) |
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
# This goes in AppData\Roaming\Blender Foundation\Blender\2.78\scripts\presets\operator\export_scene.fbx\ue4.py | |
# I've used these settings to export to UE4, but no guarantees. ;) | |
# Also you might need: op.bake_anim_force_startend_keying = True | |
op = bpy.context.active_operator | |
op.filepath = '...' | |
op.axis_forward = '-Z' | |
op.axis_up = 'Y' | |
op.version = 'BIN7400' | |
op.ui_tab = 'MAIN' |
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 <stdint.h> | |
#include "cpk++/log.hpp" | |
typedef int8_t i8; | |
typedef uint8_t u8; | |
typedef int16_t i16; | |
typedef uint16_t u16; | |
typedef int32_t i32; | |
typedef uint32_t u32; | |
typedef int64_t i64; |
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 <stdlib.h> | |
#include <stdint.h> | |
#include <cpk++/log.hpp> | |
typedef int8_t i8; | |
typedef uint8_t u8; | |
typedef int16_t i16; | |
typedef uint16_t u16; | |
typedef int32_t i32; |
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
;; This assumes conspack, salza2, and chipz are loaded | |
(defun compress (thing) | |
(cpk:encode | |
(salza2:compress-data (cpk:encode thing) | |
'salza2:gzip-compressor))) | |
(defun decompress (thing) | |
(cpk:decode (chipz:decompress nil 'chipz:gzip thing))) |
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
(defparameter *tileset-cache* (make-hash-table :test 'equal)) | |
;; TILE, TILESET | |
(defclass tile () | |
((props :initform nil :accessor props) | |
(image :initform nil :initarg :image :reader tile-image))) | |
(defclass tileset () | |
((props :initform nil :accessor props) |
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
;; (:say foo bar) | |
;; => FOO = <VALUE>, BAR = <VALUE> | |
;; (:say (:val foo)) | |
;; => <VALUE> | |
;; (:say (:val foo) (:val bar)) | |
;; => <VALUE><VALUE> | |
;; (:say (:val foo) " " (:val bar)) |
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
(defparameter *input-string* | |
"(tiles 2 2 | |
(tile 0 0 TTERMLTERM EMPTY16X2 0) | |
(tile 1 1 TL UL 7 | |
(primitive_site RLL_X0Y25 RESERVED_LL internal 8) | |
(primitive_site DCI7 DCI internal 13) | |
(primitive_site DCI0 DCI internal 13) | |
(primitive_site PMV PMV internal 8) | |
(primitive_site DCIRESET7 DCIRESET internal 1) | |
(primitive_site DCIRESET0 DCIRESET internal 1) |
NewerOlder