Put internal types in their modules

This commit is contained in:
Ruslan Mustakov 2017-07-31 19:00:15 +07:00
commit be02bdfd9c
13 changed files with 27 additions and 29 deletions

View file

@ -1,7 +1,7 @@
# Copyright 2017 Xored Software, Inc.
import hashes
import internal.godotinternaltypes, internal.godotarrays
import internal.godotarrays
type
Array* = ref object

View file

@ -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

View file

@ -1,4 +1,4 @@
import internal.godotinternaltypes
import internal.godotobjects
type
RID* {.byref.} = object

View file

@ -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

View file

@ -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

View file

@ -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".}

View file

@ -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".}

View file

@ -1,8 +0,0 @@
# Copyright 2017 Xored Software, Inc.
type
GodotObject* = object
GodotArray* {.byref.} = object
p: pointer
GodotVariant* {.byref.} = object
data: array[24, byte]

View file

@ -0,0 +1,4 @@
# Copyright 2017 Xored Software, Inc.
type
GodotObject* = object

View file

@ -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) {.

View file

@ -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,

View file

@ -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

View file

@ -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.