Updated to work with nim 0.20

- Attempt to fix deprecated this:self pragma by injecting self to methods and properties (needs more testing)
- Changed import headers to use / (slash) instead of . (period)
- Fixed object branch in godotapigen.nim
- Fixed deprecated nimNode.ident with nimNode.strVal

Fix toGodotName function

Consider procCall calls as special cases, otherwise it gives problems in _init function

Fix infinite recursive call in Godot 3.2
This commit is contained in:
Dwana Games 2019-06-21 20:11:29 -05:00 • committed by Ruslan Mustakov
commit 0fecfdb3b8
23 changed files with 294 additions and 211 deletions

View file

@ -1,6 +1,6 @@
# Copyright (c) 2018 Xored Software, Inc.
import godotinternaltypes, gdnativeapi, core.godotcoretypes
import godotinternaltypes, gdnativeapi, core/godotcoretypes
proc len*(self: GodotArray): cint {.inline.} =
getGDNativeAPI().arraySize(self)

View file

@ -1,7 +1,7 @@
# Copyright (c) 2018 Xored Software, Inc.
import godotinternaltypes, gdnativeapi
import core.godotcoretypes
import core/godotcoretypes
template genPoolArrayAPI(ArrayT, initIdent, DataT,
newProc, newCopyProc, newWithArrayProc, appendProc,

View file

@ -1,6 +1,6 @@
# Copyright 2018 Xored Software, Inc.
import core.godotcoretypes, godotinternaltypes, gdnativeapi
import core/godotcoretypes, godotinternaltypes, gdnativeapi
proc getType*(p: GodotVariant): VariantType {.inline.} =
getGDNativeAPI().variantGetType(p)