update to docs
This commit is contained in:
parent
0b89c90ad7
commit
991196f7c8
@ -54,14 +54,15 @@
|
||||
<li><b>G</b> for gamedev; guides and FAQs on game making.
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p><a name="abi"></a><strong>T1.3 </strong><strong>ABI</strong>
|
||||
<p><a name="abi"></a><strong>T1.3 </strong><strong>Procedure Interface</strong>
|
||||
<blockquote>
|
||||
<p>For native code ABI defines convention to ease tooling integration.
|
||||
<p>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.
|
||||
<ul>
|
||||
<li>32 bit floating point is the only numeric type.
|
||||
<li>Procedure parameters can only use basic types, with no aggregates. Exceptions are Vec, Rect and Color types.
|
||||
(see /include/twn_types.h)
|
||||
<li>Enum types are not allowed, as they decay to integer type, identity strings are used instead.
|
||||
<li>Enum types are allowed, but must be converted to floats. Identity strings are preferred.
|
||||
<li>No opaque nor pointer types allowed, use string keys if needed. Think of it as data base relations.
|
||||
<li>Only null terminated string is allowed as a sequential type in both parameters and returns.
|
||||
<li>Return value could be a simple aggregate that is translatable to a dictionary of primitives, without nesting.
|
||||
@ -70,6 +71,8 @@
|
||||
<li>Parameter names should not collide with keywords of any language that is targeted; if so happens, parameter alias could be added.
|
||||
Currently forbidden: <b>repeat</b>.
|
||||
<li>Procedure can't have more than 8 parameters.
|
||||
<li>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.
|
||||
</ul>
|
||||
</blockquote>
|
||||
</body>
|
||||
|
@ -20,6 +20,7 @@
|
||||
<blockquote style="margin-top:0">
|
||||
<p style="margin:0">T1.1 <a href="about-townengine.html#introduction">Introduction</a></p>
|
||||
<p style="margin:0">T1.2 <a href="about-townengine.html#wiki">Wiki</a></p>
|
||||
<p style="margin:0">T1.3 <a href="about-townengine.html#abi">Procedure Interface</a></p>
|
||||
</blockquote>
|
||||
<p style="margin-bottom:0"><a name="input-system"></a>T2. </strong><a href="input-system.html">Input System</strong></a></p>
|
||||
<blockquote style="margin-top:0">
|
||||
|
Loading…
Reference in New Issue
Block a user