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. # Copyright 2017 Xored Software, Inc.
import hashes import hashes
import internal.godotinternaltypes, internal.godotarrays import internal.godotarrays
type type
Array* = ref object Array* = ref object

View file

@ -1,8 +1,7 @@
# Copyright 2017 Xored Software, Inc. # Copyright 2017 Xored Software, Inc.
import hashes import hashes
import internal.godotinternaltypes, internal.godotstrings, import internal / [godotstrings, godotdictionaries, godotvariants]
internal.godotdictionaries, internal.godotvariants
type type
Dictionary* = ref object Dictionary* = ref object

View file

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

View file

@ -1,9 +1,7 @@
import tables import tables
import internal.godotinternaltypes import internal / [godotobjects, godotvariants, godotpoolarrays, godotstrings,
import internal.godotvariants godotnodepaths]
import internal.godotpoolarrays, internal.godotstrings,
internal.godotnodepaths
type type
Variant* = ref object Variant* = ref object

View file

@ -1,10 +1,10 @@
# Copyright 2017 Xored Software, Inc. # Copyright 2017 Xored Software, Inc.
import internal / [ import internal / [
godotinternaltypes, godotarrays, godotnodepaths, godotpoolarrays, godotobjects, godotarrays, godotnodepaths, godotpoolarrays,
godotstrings, godotvariants, godotdictionaries] godotstrings, godotvariants, godotdictionaries]
export godotinternaltypes, godotarrays, godotnodepaths, godotpoolarrays, export godotobjects, godotarrays, godotnodepaths, godotpoolarrays,
godotstrings, godotvariants, godotdictionaries godotstrings, godotvariants, godotdictionaries
const MAX_ARG_COUNT* = 128 const MAX_ARG_COUNT* = 128

View file

@ -1,7 +1,11 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
type
GodotArray* {.byref.} = object
p: pointer
import hashes import hashes
import godotinternaltypes, godotpoolarrays, godotvariants, godotstrings import godotobjects, godotpoolarrays, godotvariants, godotstrings
proc initGodotArray*(dest: var GodotArray) {. proc initGodotArray*(dest: var GodotArray) {.
importc: "godot_array_new".} importc: "godot_array_new".}

View file

@ -4,7 +4,7 @@ type
GodotDictionary* {.byref.} = object GodotDictionary* {.byref.} = object
p: pointer p: pointer
import godotinternaltypes, godotarrays, godotvariants, godotstrings import godotarrays, godotvariants, godotstrings
proc initGodotDictionary*(dest: var GodotDictionary; src: GodotDictionary) {. proc initGodotDictionary*(dest: var GodotDictionary; src: GodotDictionary) {.
importc: "godot_dictionary_new_copy".} 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. # Copyright (c) 2017 Xored Software, Inc.
import godotinternaltypes, godotstrings
import core.godotbase, core.colors,
core.vector2, core.vector3
type type
GodotPoolByteArray* {.byref.} = object GodotPoolByteArray* {.byref.} = object
p: pointer p: pointer
@ -21,6 +16,9 @@ type
GodotPoolColorArray* {.byref.} = object GodotPoolColorArray* {.byref.} = object
p: pointer p: pointer
import godotstrings, godotarrays
import core / [godotbase, colors, vector2, vector3]
# byte # byte
proc initGodotPoolByteArray*(dest: var GodotPoolByteArray) {. proc initGodotPoolByteArray*(dest: var GodotPoolByteArray) {.

View file

@ -45,8 +45,11 @@ type
argument*: cint argument*: cint
expected*: VariantType expected*: VariantType
import godotinternaltypes, godotpoolarrays, godotstrings, godotnodepaths, GodotVariant* {.byref.} = object
godotdictionaries data: array[24, byte]
import godotobjects, godotarrays, godotpoolarrays,
godotstrings, godotnodepaths, godotdictionaries
import core.vector2, core.rect2, import core.vector2, core.rect2,
core.vector3, core.transform2d, core.planes, core.vector3, core.transform2d, core.planes,

View file

@ -1,7 +1,7 @@
# Copyright 2017 Xored Software, Inc. # Copyright 2017 Xored Software, Inc.
import macros, tables, typetraits import macros, tables, typetraits
import "../godotinternal.nim", internal.godotvariants import godotinternal, internal.godotvariants
import godotnim, core.variants import godotnim, core.variants
type type

View file

@ -8,7 +8,7 @@ import core.vector2, core.rect2,
core.basis, core.transforms, core.colors, core.basis, core.transforms, core.colors,
core.nodepaths, core.rids, core.dictionaries, core.nodepaths, core.rids, core.dictionaries,
core.arrays, core.poolarrays, core.variants core.arrays, core.poolarrays, core.variants
import "../godotinternal.nim" import godotinternal
## Definition of NimGodotObject and converters for built-in types. ## Definition of NimGodotObject and converters for built-in types.