diff --git a/godot.nimble b/godot.nimble index fc2f0b3..3e778fd 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.6.6" +version = "0.6.7" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/core/nodepaths.nim b/godot/core/nodepaths.nim index 62e30f8..537d93e 100644 --- a/godot/core/nodepaths.nim +++ b/godot/core/nodepaths.nim @@ -51,8 +51,8 @@ proc getSubname*(self: NodePath; idx: int): string {.inline.} = result = $s s.deinit() -proc property*(self: NodePath): string {.inline.} = - var s = self.path.property() +proc getConcatenatedSubnames*(self: NodePath): string {.inline.} = + var s = self.path.getConcatenatedSubnames() result = $s s.deinit() diff --git a/godot/gdnativeapi.nim b/godot/gdnativeapi.nim index 7283ed7..2d6d98b 100644 --- a/godot/gdnativeapi.nim +++ b/godot/gdnativeapi.nim @@ -750,6 +750,13 @@ type arraySortCustom: proc (self: var GodotArray, obj: ptr GodotObject, f: GodotString) {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + arrayBSearch: proc (self: var GodotArray, val: ptr GodotVariant, + before: bool) + {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + arrayBSearchCustom: proc (self: var GodotArray, val: ptr GodotVariant, + obj: ptr GodotObject, f: GodotString, + before: bool) + {.noconv, raises: [], gcsafe, tags: [], locks: 0.} arrayDestroy: proc (self: var GodotArray) {.noconv, raises: [], gcsafe, tags: [], locks: 0.} @@ -816,8 +823,9 @@ type locks: 0.} nodePathGetSubname: proc (self: GodotNodePath, idx: cint): GodotString {.noconv, raises: [], gcsafe, tags: [], locks: 0.} - nodePathGetProperty: proc (self: GodotNodePath): GodotString - {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + nodePathGetConcatenatedSubnames: proc (self: GodotNodePath): GodotString + {.noconv, raises: [], gcsafe, + tags: [], locks: 0.} nodePathIsEmpty: proc (self: GodotNodePath): bool {.noconv, raises: [], gcsafe, tags: [], locks: 0.} nodePathOperatorEqual: proc (self, other: GodotNodePath): bool @@ -2018,6 +2026,13 @@ type arraySortCustom*: proc (self: var GodotArray, obj: ptr GodotObject, f: GodotString) {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + arrayBSearch*: proc (self: var GodotArray, val: ptr GodotVariant, + before: bool) + {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + arrayBSearchCustom*: proc (self: var GodotArray, val: ptr GodotVariant, + obj: ptr GodotObject, f: GodotString, + before: bool) + {.noconv, raises: [], gcsafe, tags: [], locks: 0.} arrayDestroy*: proc (self: var GodotArray) {.noconv, raises: [], gcsafe, tags: [], locks: 0.} @@ -2083,8 +2098,9 @@ type locks: 0.} nodePathGetSubname*: proc (self: GodotNodePath, idx: cint): GodotString {.noconv, raises: [], gcsafe, tags: [], locks: 0.} - nodePathGetProperty*: proc (self: GodotNodePath): GodotString - {.noconv, raises: [], gcsafe, tags: [], locks: 0.} + nodePathGetConcatenatedSubnames*: proc (self: GodotNodePath): GodotString + {.noconv, raises: [], gcsafe, + tags: [], locks: 0.} nodePathIsEmpty*: proc (self: GodotNodePath): bool {.noconv, raises: [], gcsafe, tags: [], locks: 0.} nodePathOperatorEqual*: proc (self, other: GodotNodePath): bool @@ -2871,6 +2887,8 @@ proc setGDNativeAPI*(apiStruct: pointer, initOptions: ptr GDNativeInitOptions) = arraySize arraySort arraySortCustom + arrayBSearch + arrayBSearchCustom arrayDestroy # Dictionary API @@ -2903,7 +2921,7 @@ proc setGDNativeAPI*(apiStruct: pointer, initOptions: ptr GDNativeInitOptions) = nodePathGetName nodePathGetSubnameCount nodePathGetSubname - nodePathGetProperty + nodePathGetConcatenatedSubnames nodePathIsEmpty nodePathOperatorEqual diff --git a/godot/internal/godotarrays.nim b/godot/internal/godotarrays.nim index 676e6cd..607474f 100644 --- a/godot/internal/godotarrays.nim +++ b/godot/internal/godotarrays.nim @@ -126,6 +126,15 @@ proc sortCustom*(self: var GodotArray; obj: ptr GodotObject; funcName: GodotString) {.inline.} = getGDNativeAPI().arraySortCustom(self, obj, funcName) +proc binarySearch*(self: var GodotArray, val: ptr GodotVariant, + before: bool) {.inline.} = + getGDNativeAPI().arrayBSearch(self, val, before) + +proc binarySearchCustom*(self: var GodotArray, val: ptr GodotVariant, + obj: ptr GodotObject, funcName: GodotString, + before: bool) {.inline.} = + getGDNativeAPI().arrayBSearchCustom(self, val, obj, funcName, before) + iterator items*(self: GodotArray): GodotVariant = for i in 0..