Update for latest Godot

This commit is contained in:
Ruslan Mustakov 2017-11-21 02:44:32 +07:00
commit a1c378301a
6 changed files with 31 additions and 26 deletions

View file

@ -82,16 +82,23 @@ type
type GodotMethodBind* = object
type
GodotNativeInitOptions* = object
GDNativeAPIVersion* = object
major*: cuint
minor*: cuint
GDNativeInitOptions* = object
inEditor*: bool
coreApiHash*: uint64
editorApiHash*: uint64
noApiHash*: uint64
reportVersionMismatch*: proc (library: ptr GodotObject, extension: cstring,
want: GDNativeAPIVersion, have: GDNativeAPIVersion) {.noconv.}
reportLoadingError*: proc (library: ptr GodotObject, what: cstring) {.noconv.}
gdNativeLibrary*: ptr GodotObject
gdNativeAPIStruct*: pointer
activeLibraryPath*: ptr GodotString
GodotNativeTerminateOptions* = object
GDNativeTerminateOptions* = object
inEditor*: bool
GodotMethodRPCMode* {.size: sizeof(cint), pure.} = enum

View file

@ -19,9 +19,6 @@ proc len*(self: GodotString): cint {.inline.} =
## Returns the length of string in bytes if it is represented as UTF-8.
getData(self, nil, result)
proc cstring*(self: GodotString): cstring {.inline.} =
getGDNativeAPI().stringCStr(self)
proc `==`*(self, b: GodotString): bool {.inline.} =
getGDNativeAPI().stringOperatorEqual(self, b)