Skip to content

Commit 7a41213

Browse files
committed
update to 1.2.181
1 parent 3c69504 commit 7a41213

7 files changed

Lines changed: 278 additions & 34 deletions

File tree

DefoldDocs/api/gui.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---GUI API documentation
2-
---GUI API documentation
2+
---GUI core hooks, functions, messages, properties and constants for
3+
---creation and manipulation of GUI nodes. The "gui" namespace is
4+
---accessible only from gui scripts.
35
---@class gui
46
gui = {}
57
---This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can

DefoldDocs/doc/dmBuffer_doc.json

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@
390390
]
391391
},
392392
{
393-
"doc": "Where to store the stride. The stride can be added to the value pointer. May be null.\nE.g. for a float array, the stride is (sizeof(Struct) / sizeof(float))",
393+
"doc": "Where to store the (struct) stride. The stride can be added to the value pointer. May be null.\nE.g. for a float array, the stride is (sizeof(Struct) / sizeof(float))",
394394
"name": "stride",
395395
"types": [
396396
"uint32_t*"
@@ -636,6 +636,73 @@
636636
"tparams": [],
637637
"type": "FUNCTION",
638638
"name": "dmBuffer::GetValueTypeString"
639+
},
640+
{
641+
"replaces": "",
642+
"description": "Gets the current update number",
643+
"parameters": [
644+
{
645+
"doc": "The value type",
646+
"name": "type",
647+
"types": [
648+
"dmBuffer::HBuffer"
649+
]
650+
},
651+
{
652+
"doc": "The current version number",
653+
"name": "version",
654+
"types": [
655+
"uint32_t*"
656+
]
657+
}
658+
],
659+
"returnvalues": [
660+
{
661+
"doc": "Returns BUFFER_OK if all went ok",
662+
"name": "result",
663+
"types": [
664+
"dmBuffer::Result"
665+
]
666+
}
667+
],
668+
"notes": [],
669+
"brief": "Gets the current update number",
670+
"examples": "",
671+
"members": [],
672+
"error": "",
673+
"tparams": [],
674+
"type": "FUNCTION",
675+
"name": "dmBuffer::GetContentVersion"
676+
},
677+
{
678+
"replaces": "",
679+
"description": "Used to know if a buffer has been updated.",
680+
"parameters": [
681+
{
682+
"doc": "The value type",
683+
"name": "type",
684+
"types": [
685+
"dmBuffer::HBuffer"
686+
]
687+
}
688+
],
689+
"returnvalues": [
690+
{
691+
"doc": "Returns BUFFER_OK if all went ok",
692+
"name": "result",
693+
"types": [
694+
"dmBuffer::Result"
695+
]
696+
}
697+
],
698+
"notes": [],
699+
"brief": "Update the internal frame counter.",
700+
"examples": "",
701+
"members": [],
702+
"error": "",
703+
"tparams": [],
704+
"type": "FUNCTION",
705+
"name": "dmBuffer::UpdateContentVersion"
639706
}
640707
]
641708
}

DefoldDocs/doc/dmGameObject_doc.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,56 @@
288288
"type": "ENUM",
289289
"name": "PropertyResult"
290290
},
291+
{
292+
"replaces": "",
293+
"description": "Create result enum.",
294+
"parameters": [],
295+
"returnvalues": [],
296+
"notes": [],
297+
"brief": "Create result enum",
298+
"examples": "",
299+
"members": [
300+
{
301+
"doc": "",
302+
"type": "",
303+
"name": "dmGameObject::CREATE_RESULT_OK"
304+
},
305+
{
306+
"doc": "",
307+
"type": "",
308+
"name": "dmGameObject::CREATE_RESULT_UNKNOWN_ERROR"
309+
}
310+
],
311+
"error": "",
312+
"tparams": [],
313+
"type": "ENUM",
314+
"name": "Result"
315+
},
316+
{
317+
"replaces": "",
318+
"description": "Update result enum.",
319+
"parameters": [],
320+
"returnvalues": [],
321+
"notes": [],
322+
"brief": "Update result enum",
323+
"examples": "",
324+
"members": [
325+
{
326+
"doc": "",
327+
"type": "",
328+
"name": "dmGameObject::UPDATE_RESULT_OK"
329+
},
330+
{
331+
"doc": "",
332+
"type": "",
333+
"name": "dmGameObject::UPDATE_RESULT_UNKNOWN_ERROR"
334+
}
335+
],
336+
"error": "",
337+
"tparams": [],
338+
"type": "ENUM",
339+
"name": "Result"
340+
},
291341
{
292342
"replaces": "",
293343
"description": "Property variant that holds the data for a variable",
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"info": {
3+
"group": "DEFOLD SDK",
4+
"description": "Hash table",
5+
"namespace": "dmHashTable",
6+
"brief": "Hash table",
7+
"file": "dmsdk/dlib/hashtable.h",
8+
"path": "engine/dlib/src/dmsdk/dlib/hashtable.h",
9+
"name": "Hashtable"
10+
},
11+
"elements": [
12+
{
13+
"replaces": "",
14+
"description": "Hashtable with chaining for collision resolution, memcpy-copy semantics (POD types) and 32-bit indicies instead of pointers. (NUMA-friendly)",
15+
"parameters": [],
16+
"returnvalues": [],
17+
"notes": [],
18+
"brief": "hashtable",
19+
"examples": "",
20+
"members": [],
21+
"error": "",
22+
"tparams": [],
23+
"type": "FUNCTION",
24+
"name": "dmHashTable"
25+
},
26+
{
27+
"replaces": "",
28+
"description": "Specialized hash table with <span class=\"type\">uint16_t</span> as keys",
29+
"parameters": [],
30+
"returnvalues": [],
31+
"notes": [],
32+
"brief": "Specialized hash table with <span class=\"type\">uint16_t</span> as key...",
33+
"examples": "",
34+
"members": [],
35+
"error": "",
36+
"tparams": [],
37+
"type": "FUNCTION",
38+
"name": "dmHashTable16"
39+
},
40+
{
41+
"replaces": "",
42+
"description": "Specialized hash table with <span class=\"type\">uint32_t</span> as keys",
43+
"parameters": [],
44+
"returnvalues": [],
45+
"notes": [],
46+
"brief": "Specialized hash table with <span class=\"type\">uint32_t</span> as key...",
47+
"examples": "",
48+
"members": [],
49+
"error": "",
50+
"tparams": [],
51+
"type": "FUNCTION",
52+
"name": "dmHashTable32"
53+
},
54+
{
55+
"replaces": "",
56+
"description": "Specialized hash table with <span class=\"type\">uint64_t</span> as keys",
57+
"parameters": [],
58+
"returnvalues": [],
59+
"notes": [],
60+
"brief": "Specialized hash table with <span class=\"type\">uint64_t</span> as key...",
61+
"examples": "",
62+
"members": [],
63+
"error": "",
64+
"tparams": [],
65+
"type": "FUNCTION",
66+
"name": "dmHashTable64"
67+
}
68+
]
69+
}

DefoldDocs/doc/dmResource_doc.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"info": {
3+
"group": "DEFOLD SDK",
4+
"description": "Functions for managing resource types.",
5+
"namespace": "dmResource",
6+
"brief": "Resource",
7+
"file": "dmsdk/resource/resource.h",
8+
"path": "engine/resource/src/dmsdk/resource/resource.h",
9+
"name": "Resource"
10+
},
11+
"elements": [
12+
{
13+
"replaces": "",
14+
"description": "Declare and register new extension to the engine.\nThis macro is used to declare the extension callback functions used by the engine to communicate with the extension.",
15+
"parameters": [
16+
{
17+
"doc": "external extension symbol description (no quotes).",
18+
"name": "symbol",
19+
"types": [
20+
"symbol"
21+
]
22+
},
23+
{
24+
"doc": "The file resource suffix, without a \".\".",
25+
"name": "suffix",
26+
"types": [
27+
"const char*"
28+
]
29+
},
30+
{
31+
"doc": "type register function\n<dl>\n<dt><code>ctx</code></dt>\n<dd><span class=\"type\">dmResource::ResourceTypeRegisterContext&amp;</span> Reference to an <code>ResourceTypeRegisterContext</code> structure.</dd>\n</dl>",
32+
"name": "register_fn",
33+
"types": [
34+
"function(dmResource::ResourceTypeRegisterContext& ctx)"
35+
]
36+
},
37+
{
38+
"doc": "type deregister function. May be null.\n<dl>\n<dt><code>ctx</code></dt>\n<dd><span class=\"type\">dmResource::ResourceTypeRegisterContext&amp;</span> Reference to an <code>ResourceTypeRegisterContext</code> structure.</dd>\n</dl>",
39+
"name": "deregister_fn",
40+
"types": [
41+
"function(dmResource::ResourceTypeRegisterContext& ctx)"
42+
]
43+
}
44+
],
45+
"returnvalues": [],
46+
"notes": [],
47+
"brief": "declare a new extension",
48+
"examples": "Register a new type:\n<div class=\"codehilite\"><pre><span></span><span class=\"k\">static</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">Result</span> <span class=\"n\">ResourceTypeScriptCreate</span><span class=\"p\">(...)</span> <span class=\"p\">{}</span>\n<span class=\"k\">static</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">Result</span> <span class=\"n\">ResourceTypeScriptDestroy</span><span class=\"p\">(...)</span> <span class=\"p\">{}</span>\n<span class=\"k\">static</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">Result</span> <span class=\"n\">ResourceTypeScriptRecreate</span><span class=\"p\">(...)</span> <span class=\"p\">{}</span>\n\n<span class=\"k\">struct</span> <span class=\"n\">BlobContext</span>\n<span class=\"p\">{</span>\n <span class=\"p\">...</span>\n<span class=\"p\">};</span>\n\n<span class=\"k\">static</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">Result</span> <span class=\"n\">RegisterResourceTypeBlob</span><span class=\"p\">(</span><span class=\"n\">ResourceTypeRegisterContext</span><span class=\"o\">&amp;</span> <span class=\"n\">ctx</span><span class=\"p\">)</span>\n<span class=\"p\">{</span>\n <span class=\"c1\">// The engine.cpp creates the contexts for our built in types.</span>\n <span class=\"c1\">// Here we register a custom type</span>\n <span class=\"n\">BlobContext</span><span class=\"o\">*</span> <span class=\"n\">context</span> <span class=\"o\">=</span> <span class=\"k\">new</span> <span class=\"n\">BlobContext</span><span class=\"p\">;</span>\n <span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_Contexts</span><span class=\"p\">.</span><span class=\"n\">Put</span><span class=\"p\">(</span><span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_NameHash</span><span class=\"p\">,</span> <span class=\"p\">(</span><span class=\"kt\">void</span><span class=\"o\">*</span><span class=\"p\">)</span><span class=\"n\">context</span><span class=\"p\">);</span>\n\n <span class=\"k\">return</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">RegisterType</span><span class=\"p\">(</span><span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_Factory</span><span class=\"p\">,</span>\n <span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_Name</span><span class=\"p\">,</span>\n <span class=\"n\">context</span><span class=\"p\">,</span>\n <span class=\"mi\">0</span><span class=\"p\">,</span>\n <span class=\"n\">ResourceTypeScriptCreate</span><span class=\"p\">,</span>\n <span class=\"mi\">0</span><span class=\"p\">,</span>\n <span class=\"n\">ResourceTypeScriptDestroy</span><span class=\"p\">,</span>\n <span class=\"n\">ResourceTypeScriptRecreate</span><span class=\"p\">);</span>\n<span class=\"p\">}</span>\n\n<span class=\"k\">static</span> <span class=\"n\">dmResource</span><span class=\"o\">::</span><span class=\"n\">Result</span> <span class=\"n\">DeregisterResourceTypeScript</span><span class=\"p\">(</span><span class=\"n\">ResourceTypeRegisterContext</span><span class=\"o\">&amp;</span> <span class=\"n\">ctx</span><span class=\"p\">)</span>\n<span class=\"p\">{</span>\n <span class=\"n\">BlobContext</span><span class=\"o\">**</span> <span class=\"n\">context</span> <span class=\"o\">=</span> <span class=\"p\">(</span><span class=\"n\">BlobContext</span><span class=\"o\">**</span><span class=\"p\">)</span><span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_Contexts</span><span class=\"p\">.</span><span class=\"n\">Get</span><span class=\"p\">(</span><span class=\"n\">ctx</span><span class=\"p\">.</span><span class=\"n\">m_NameHash</span><span class=\"p\">);</span>\n <span class=\"k\">delete</span> <span class=\"o\">*</span><span class=\"n\">context</span><span class=\"p\">;</span>\n<span class=\"p\">}</span>\n\n\n<span class=\"n\">DM_DECLARE_RESOURCE_TYPE</span><span class=\"p\">(</span><span class=\"n\">ResourceTypeBlob</span><span class=\"p\">,</span> <span class=\"s\">&quot;blobc&quot;</span><span class=\"p\">,</span> <span class=\"n\">RegisterResourceTypeBlob</span><span class=\"p\">,</span> <span class=\"n\">DeregisterResourceTypeScript</span><span class=\"p\">);</span>\n</pre></div>",
49+
"members": [],
50+
"error": "",
51+
"tparams": [],
52+
"type": "MACRO",
53+
"name": "DM_DECLARE_RESOURCE_TYPE"
54+
}
55+
]
56+
}

0 commit comments

Comments
 (0)