Fix $ for core types

This commit is contained in:
Ruslan Mustakov 2017-10-12 21:26:36 +07:00
commit 7f73a89878
7 changed files with 14 additions and 7 deletions

View file

@ -2,7 +2,8 @@
import vector3 import vector3
import internal.godotinternaltypes, godotcoretypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc initPlane*(a, b, c, d: float32): Plane {.inline.} = proc initPlane*(a, b, c, d: float32): Plane {.inline.} =
getGDNativeAPI().planeNewWithReals(result, a, b, c, d) getGDNativeAPI().planeNewWithReals(result, a, b, c, d)

View file

@ -1,6 +1,7 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import internal.godotinternaltypes, godotcoretypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc initQuat*(x, y, z, w: float32): Quat {.inline.} = proc initQuat*(x, y, z, w: float32): Quat {.inline.} =
result = Quat( result = Quat(

View file

@ -1,7 +1,8 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import vector2 import vector2
import godotcoretypes, internal.godotinternaltypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc initRect2*(pos, size: Vector2): Rect2 {.inline.} = proc initRect2*(pos, size: Vector2): Rect2 {.inline.} =
Rect2(position: pos, size: size) Rect2(position: pos, size: size)

View file

@ -1,6 +1,7 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import godotcoretypes, internal.godotinternaltypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc initRect3*(pos, size: Vector3): Rect3 {.inline.} = proc initRect3*(pos, size: Vector3): Rect3 {.inline.} =
Rect3(position: pos, size: size) Rect3(position: pos, size: size)

View file

@ -1,6 +1,7 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import godotcoretypes, internal.godotinternaltypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc initTransform2D*(): Transform2D {.inline.} = proc initTransform2D*(): Transform2D {.inline.} =
getGDNativeAPI().transform2DNewIdentity(result) getGDNativeAPI().transform2DNewIdentity(result)

View file

@ -1,6 +1,7 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import godotcoretypes, internal.godotinternaltypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
import basis import basis
proc initTransform*(): Transform {.inline.} = proc initTransform*(): Transform {.inline.} =

View file

@ -1,6 +1,7 @@
# Copyright (c) 2017 Xored Software, Inc. # Copyright (c) 2017 Xored Software, Inc.
import internal.godotinternaltypes, godotcoretypes, gdnativeapi import internal.godotinternaltypes, internal.godotstrings
import godotcoretypes, gdnativeapi
proc vec2*(x, y: float32): Vector2 {.inline.} = proc vec2*(x, y: float32): Vector2 {.inline.} =
Vector2(x: x, y: y) Vector2(x: x, y: y)