From fd1aaad5903fb3060611caba5afebdf818eed668 Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 28 Aug 2023 15:17:20 -0700 Subject: [PATCH] add some details about godin preprocessor --- readme.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index b8e11fb..3cceb8b 100644 --- a/readme.md +++ b/readme.md @@ -57,6 +57,24 @@ odin build . -build-mode:shared Then, follow the instructions for [using the extension module](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html#using-the-gdextension-module). -## Using Generated Bindings +## Godin -WIP +Godin is a preprocessor which generates most of the boilerplate for Extension Classes, Methods, Enums, Properties, Signals, Groups, and Subgroups. + +For example, the following Odin code will produce all of the boilerplate for an extension class "Player" that extends "Node2D". +```odin +package test + +//+class Player extends Node2D +Player :: struct { + health: i64, +} +``` + +To build Godin: +```sh +# while in the odin-godot directory +./build_godin.sh +``` + +Run `godin help` for usage details, including documentation about the Godin preprocessor syntax.