Put internal types in their modules
This commit is contained in:
parent
728e3012c6
commit
be02bdfd9c
13 changed files with 27 additions and 29 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
import hashes
|
||||
import internal.godotinternaltypes, internal.godotarrays
|
||||
import internal.godotarrays
|
||||
|
||||
type
|
||||
Array* = ref object
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
import hashes
|
||||
import internal.godotinternaltypes, internal.godotstrings,
|
||||
internal.godotdictionaries, internal.godotvariants
|
||||
import internal / [godotstrings, godotdictionaries, godotvariants]
|
||||
|
||||
type
|
||||
Dictionary* = ref object
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import internal.godotinternaltypes
|
||||
import internal.godotobjects
|
||||
|
||||
type
|
||||
RID* {.byref.} = object
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import tables
|
||||
|
||||
import internal.godotinternaltypes
|
||||
import internal.godotvariants
|
||||
import internal.godotpoolarrays, internal.godotstrings,
|
||||
internal.godotnodepaths
|
||||
import internal / [godotobjects, godotvariants, godotpoolarrays, godotstrings,
|
||||
godotnodepaths]
|
||||
|
||||
type
|
||||
Variant* = ref object
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
import internal / [
|
||||
godotinternaltypes, godotarrays, godotnodepaths, godotpoolarrays,
|
||||
godotobjects, godotarrays, godotnodepaths, godotpoolarrays,
|
||||
godotstrings, godotvariants, godotdictionaries]
|
||||
|
||||
export godotinternaltypes, godotarrays, godotnodepaths, godotpoolarrays,
|
||||
export godotobjects, godotarrays, godotnodepaths, godotpoolarrays,
|
||||
godotstrings, godotvariants, godotdictionaries
|
||||
|
||||
const MAX_ARG_COUNT* = 128
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
# Copyright (c) 2017 Xored Software, Inc.
|
||||
|
||||
type
|
||||
GodotArray* {.byref.} = object
|
||||
p: pointer
|
||||
|
||||
import hashes
|
||||
import godotinternaltypes, godotpoolarrays, godotvariants, godotstrings
|
||||
import godotobjects, godotpoolarrays, godotvariants, godotstrings
|
||||
|
||||
proc initGodotArray*(dest: var GodotArray) {.
|
||||
importc: "godot_array_new".}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ type
|
|||
GodotDictionary* {.byref.} = object
|
||||
p: pointer
|
||||
|
||||
import godotinternaltypes, godotarrays, godotvariants, godotstrings
|
||||
import godotarrays, godotvariants, godotstrings
|
||||
|
||||
proc initGodotDictionary*(dest: var GodotDictionary; src: GodotDictionary) {.
|
||||
importc: "godot_dictionary_new_copy".}
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
type
|
||||
GodotObject* = object
|
||||
GodotArray* {.byref.} = object
|
||||
p: pointer
|
||||
GodotVariant* {.byref.} = object
|
||||
data: array[24, byte]
|
||||
4
godot/internal/godotobjects.nim
Normal file
4
godot/internal/godotobjects.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
type
|
||||
GodotObject* = object
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
# Copyright (c) 2017 Xored Software, Inc.
|
||||
|
||||
|
||||
import godotinternaltypes, godotstrings
|
||||
import core.godotbase, core.colors,
|
||||
core.vector2, core.vector3
|
||||
|
||||
type
|
||||
GodotPoolByteArray* {.byref.} = object
|
||||
p: pointer
|
||||
|
|
@ -21,6 +16,9 @@ type
|
|||
GodotPoolColorArray* {.byref.} = object
|
||||
p: pointer
|
||||
|
||||
import godotstrings, godotarrays
|
||||
import core / [godotbase, colors, vector2, vector3]
|
||||
|
||||
# byte
|
||||
|
||||
proc initGodotPoolByteArray*(dest: var GodotPoolByteArray) {.
|
||||
|
|
|
|||
|
|
@ -45,8 +45,11 @@ type
|
|||
argument*: cint
|
||||
expected*: VariantType
|
||||
|
||||
import godotinternaltypes, godotpoolarrays, godotstrings, godotnodepaths,
|
||||
godotdictionaries
|
||||
GodotVariant* {.byref.} = object
|
||||
data: array[24, byte]
|
||||
|
||||
import godotobjects, godotarrays, godotpoolarrays,
|
||||
godotstrings, godotnodepaths, godotdictionaries
|
||||
|
||||
import core.vector2, core.rect2,
|
||||
core.vector3, core.transform2d, core.planes,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright 2017 Xored Software, Inc.
|
||||
|
||||
import macros, tables, typetraits
|
||||
import "../godotinternal.nim", internal.godotvariants
|
||||
import godotinternal, internal.godotvariants
|
||||
import godotnim, core.variants
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import core.vector2, core.rect2,
|
|||
core.basis, core.transforms, core.colors,
|
||||
core.nodepaths, core.rids, core.dictionaries,
|
||||
core.arrays, core.poolarrays, core.variants
|
||||
import "../godotinternal.nim"
|
||||
import godotinternal
|
||||
|
||||
## Definition of NimGodotObject and converters for built-in types.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue