From 991196f7c83c8e8dddf1ea82c28b4296c27df4c3 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Thu, 20 Feb 2025 16:03:50 +0300 Subject: [PATCH] update to docs --- docs/wiki/about-townengine.html | 9 ++++++--- docs/wiki/index.html | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/wiki/about-townengine.html b/docs/wiki/about-townengine.html index 3c9f76e..bd6a922 100644 --- a/docs/wiki/about-townengine.html +++ b/docs/wiki/about-townengine.html @@ -54,14 +54,15 @@
  • G for gamedev; guides and FAQs on game making. -

    T1.3 ABI +

    T1.3 Procedure Interface

    -

    For native code ABI defines convention to ease tooling integration. +

    For native code ABI defines convention to ease tooling integration. Platform/compiler C ABI is assumed, + but it should be trivially expressible in JSON-RPC as well.

    • 32 bit floating point is the only numeric type.
    • Procedure parameters can only use basic types, with no aggregates. Exceptions are Vec, Rect and Color types. (see /include/twn_types.h) -
    • Enum types are not allowed, as they decay to integer type, identity strings are used instead. +
    • Enum types are allowed, but must be converted to floats. Identity strings are preferred.
    • No opaque nor pointer types allowed, use string keys if needed. Think of it as data base relations.
    • Only null terminated string is allowed as a sequential type in both parameters and returns.
    • Return value could be a simple aggregate that is translatable to a dictionary of primitives, without nesting. @@ -70,6 +71,8 @@
    • Parameter names should not collide with keywords of any language that is targeted; if so happens, parameter alias could be added. Currently forbidden: repeat.
    • Procedure can't have more than 8 parameters. +
    • Decimal portions of floating points are lossy both due to rounding errors and text representation, + thus they cannot be relied to hold for equality. Integer parts of floats are good up to 2^24.
    diff --git a/docs/wiki/index.html b/docs/wiki/index.html index 0d8bc04..06ce346 100644 --- a/docs/wiki/index.html +++ b/docs/wiki/index.html @@ -20,6 +20,7 @@

    T1.1 Introduction

    T1.2 Wiki

    +

    T1.3 Procedure Interface

    T2. Input System