Skip to content

Instantly share code, notes, and snippets.

@hcarty
hcarty / example.ini
Created March 31, 2024 05:51
Very basic, data driven game events in ore - based on triggers proposal
[Object]
; All the actual object definition
; ...
OnCreate = > @, Input.EnableSet < true
OnDelete = > @, Input.EnableSet < false
; Game event handlers
EventHandlerList= DropperEvents
; Inputs
@hcarty
hcarty / main.yml
Created December 29, 2021 02:15
Github action to build orx
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
@hcarty
hcarty / knight.ini
Created November 26, 2021 16:31
Knight animation set
[Knight]
Position = (0, 0, 0)
AnimationSet = KnightAnimationSet
Scale = 12
; Animation
[KnightAnimationSet]
Texture = data/texture/characters/knight_.png
FrameSize = (24, 24)
@hcarty
hcarty / README.md
Last active October 22, 2021 04:11
VS Code tasks.json for a C or C++ orx project built with (g)make

Basic task definitions for building orx games with gmake for C or C++

Take either of these files and save as .vscode/tasks.json in your orx project.

Based on the vscode reference material here: https://code.visualstudio.com/docs/editor/tasks

@hcarty
hcarty / untar_in_memory_partial_example.ml
Created April 21, 2021 20:41
Partial example for extracting a tar in memory using ocaml-tar
let max_ocaml_int = Int64.of_int max_int
let read_file input_channel (header : Tar_cstruct.Header.t) =
let file_size = header.file_size in
assert (file_size <= max_ocaml_int);
let buf = Cstruct.create (Int64.to_int file_size) in
Tar_cstruct.really_read input_channel buf;
buf
let rec read_files input_channel accu =
@hcarty
hcarty / gadt_matching.ml
Last active August 29, 2020 16:48
GADT typing
module One = struct
type t
end
module Two = struct
type t
end
module Tag_incomplete_match = struct
type one = One.t
@hcarty
hcarty / out.txt
Created August 26, 2020 03:59
orx build output
==== Building orxLIB (debug64) ====
orxParam.c
In file included from ../../../include/memory/orxMemory.h:50,
from ../../../src/main/orxParam.c:34:
../../../src/main/orxParam.c: In function ‘orxParam_SetArgs’:
../../../include/debug/orxDebug.h:300:9: error: null argument where non-null required (argument 2) [-Werror=nonnull]
300 | strncpy(zBuffer, FILE, 256); \
| ^~~~~~~
../../../src/main/orxParam.c:794:5: note: in expansion of macro ‘orxDEBUG_SETBASEFILENAME’
794 | orxDEBUG_SETBASEFILENAME(orxNULL);
@hcarty
hcarty / smoke.ini
Last active June 28, 2020 20:29
Orx smoke trail example
; Add SmokeTrail as a child object, adjusting the position of the spawner as needed, to get a smoke trail
; or exhaust effect.
[SmokeTrail]
Spawner = SmokeSpawner
[SmokeSpawner]
Object = SmokeParticle
Position = (-17, 0, -1)
UseRelativeSpeed = true
@hcarty
hcarty / profiles.json
Last active June 13, 2020 16:51
Windows Terminal configuration snippet for fdopen's opam + OCaml on Windows
{
// Make changes here to the bash.exe profile
"guid": "{a515ab70-2da7-4310-930d-b98cb83a16a2}",
"name": "OCaml Cygwin bash",
"commandline": "C:/OCaml64/bin/bash.exe --login -i",
"icon": "https://ocaml.org/img/favicon32x32.ico",
"hidden": false
}
@hcarty
hcarty / .vimrc
Created March 2, 2020 16:54
.vimrc
set nocompatible
filetype off
" Vundle and its packages
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'