Skip to content

Instantly share code, notes, and snippets.

@fccm
fccm / SDL_events.h.diff
Created April 2, 2019 00:54
diff -Naur SDL2-2.0.6/include/SDL_events.h SDL2-2.0.9/include/SDL_events.h
--- SDL2-2.0.6/include/SDL_events.h 2017-09-22 20:50:35.000000000 +0200
+++ SDL2-2.0.9/include/SDL_events.h 2018-10-31 16:06:56.000000000 +0100
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2017 Sam Lantinga <[email protected]>
+ Copyright (C) 1997-2018 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@fccm
fccm / tsdl_display_event.patch
Created April 30, 2019 13:23
[blue_prawn@localhost tsdl (master)]$ git diff
diff --git a/src/tsdl.ml b/src/tsdl.ml
index 51112ff..2ee1c0a 100644
--- a/src/tsdl.ml
+++ b/src/tsdl.ml
@@ -3934,6 +3934,20 @@ module Event = struct
let () = seal t
end
+ module Display_event = struct
+ type t
@fccm
fccm / shmup_av6.ml
Last active June 1, 2019 07:24
A Simple Abstract Shmup Game
(* A Simple Abstract Shmup Game
Copyright (C) 2019 Florent Monnier
This software is provided "AS-IS", without any express or implied warranty.
In no event will the authors be held liable for any damages arising from
the use of this software.
Permission is granted to anyone to use this software and associated elements
for any purpose, including commercial applications, and to alter it and
redistribute it freely.
@fccm
fccm / SDL2-2.0.9_include--SDL2-2.0.10_include.diff
Created August 4, 2020 00:30
diff -Naur SDL2-2.0.9/include/ SDL2-2.0.10/include/
diff -Naur SDL2-2.0.9/include/begin_code.h SDL2-2.0.10/include/begin_code.h
--- SDL2-2.0.9/include/begin_code.h 2018-10-31 16:07:22.000000000 +0100
+++ SDL2-2.0.10/include/begin_code.h 2019-07-25 06:32:36.000000000 +0200
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <[email protected]>
+ Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
@fccm
fccm / SDL2-2.0.10_include--SDL2-2.0.12_include.diff
Created August 4, 2020 02:04
diff -Naur SDL2-2.0.10/include/ SDL2-2.0.12/include/
diff -Naur SDL2-2.0.10/include/begin_code.h SDL2-2.0.12/include/begin_code.h
--- SDL2-2.0.10/include/begin_code.h 2019-07-25 06:32:36.000000000 +0200
+++ SDL2-2.0.12/include/begin_code.h 2020-03-11 02:36:18.000000000 +0100
@@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+ Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
@fccm
fccm / ocaml-sfml.nonakedptr.diff
Created October 8, 2020 14:42
ocaml-sfml without naked pointers
diff --git a/examples/ex_rect.sh b/examples/ex_rect.sh
index a5a1492..2d8b14e 100755
--- a/examples/ex_rect.sh
+++ b/examples/ex_rect.sh
@@ -1,4 +1,5 @@
ocaml bigarray.cma \
+ -I ../src \
sfml_system.cma \
sfml_window.cma \
sfml_graphics.cma \
@fccm
fccm / ex_cairo.ml
Created November 7, 2020 04:18
Mini-demo of using Cairo2 and SDL2 together in OCaml
(* Mini-demo of using Cairo2 and SDL2 together in OCaml
Copyright (C) 2020 Florent Monnier
This software is provided "AS-IS", without any express or implied warranty.
In no event will the authors be held liable for any damages arising from
the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely.
*)
@fccm
fccm / batDynArray.diff
Created November 13, 2020 05:41
Stdlib.invalid_arg for batDynArray.ml
diff --git a/src/batDynArray.ml b/src/batDynArray.ml
index c1d92834..5caa4840 100644
--- a/src/batDynArray.ml
+++ b/src/batDynArray.ml
@@ -574,7 +574,7 @@ let split a =
let combine a1 a2 =
if a1.len <> a2.len then
- invalid_arg "DynArray.iter2i";
+ Stdlib.invalid_arg "DynArray.iter2i";
@fccm
fccm / hello.cs.md
Last active November 22, 2020 14:57
compile .cs file from command line
$ cat hello.cs
using System;

public class HelloWorld
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello Mono World");
    }