diff --git a/docs/wiki/about-townengine.html b/docs/wiki/about-townengine.html index bd6a922..fed389b 100644 --- a/docs/wiki/about-townengine.html +++ b/docs/wiki/about-townengine.html @@ -73,6 +73,7 @@
  • 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. +
  • Returns must be restricted/closed on being constant over frame, parameters or asset frame. diff --git a/share/twn_api.json b/share/twn_api.json index cf543df..31a9986 100644 --- a/share/twn_api.json +++ b/share/twn_api.json @@ -19,7 +19,8 @@ "params": [ { "name": "name", "type": "char *" } ], - "return": "bool" + "return": "bool", + "restriction": "frame" }, "input_action_just_pressed": { @@ -29,7 +30,8 @@ "params": [ { "name": "name", "type": "char *" } ], - "return": "bool" + "return": "bool", + "restriction": "frame" }, "input_action_just_released": { @@ -39,7 +41,8 @@ "params": [ { "name": "name", "type": "char *" } ], - "return": "bool" + "return": "bool", + "restriction": "frame" }, "input_action_position": { @@ -49,7 +52,8 @@ "params": [ { "name": "name", "type": "char *" } ], - "return": "Vec2" + "return": "Vec2", + "restriction": "frame" }, "draw_sprite": { @@ -111,7 +115,8 @@ { "name": "height", "type": "float", "default": 22 }, { "name": "font", "type": "char *", "default": {} } ], - "return": "float" + "return": "float", + "restriction": "asset" }, "draw_nine_slice": { @@ -228,7 +233,8 @@ { "name": "up", "type": "Vec3" } ], "c_type": "DrawCameraFromPrincipalAxesResult" - } + }, + "restriction": "parameters" }, "draw_skybox": { @@ -271,7 +277,8 @@ "params": [ { "name": "file", "type": "char *" } ], - "return": "char *" + "return": "char *", + "restriction": "asset" }, "timer_tick_seconds": { @@ -281,7 +288,8 @@ "params": [ { "name": "seconds_left", "type": "float" } ], - "return": "float" + "return": "float", + "restriction": "parameters" }, "timer_elapse_seconds": { @@ -299,7 +307,8 @@ { "name": "elapsed", "type": "bool" } ], "c_type": "TimerElapseSecondsResult" - } + }, + "restriction": "parameters" }, "log_vec2": {