Skip to content

Commit

Permalink
Rename getConstructor to invokeConstructor and fix invoke of construc…
Browse files Browse the repository at this point in the history
…tor (#235)
  • Loading branch information
piiertho committed Aug 12, 2020
1 parent 675811f commit f1dcbba
Show file tree
Hide file tree
Showing 561 changed files with 1,863 additions and 6,053 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/godot/codegen/Class.kt
Expand Up @@ -248,7 +248,7 @@ class Class @JsonCreator constructor(
|}
|""".trimMargin(),
MemberName(ClassName("godot.core", "Godot"), "shouldInitPtr"),
MemberName("godot.internal.utils", "getConstructor")
MemberName("godot.internal.utils", "invokeConstructor")
)
}

Expand Down
Expand Up @@ -13,8 +13,8 @@ import godot.icalls._icall_Plane
import godot.icalls._icall_String
import godot.icalls._icall_Unit_Long
import godot.icalls._icall_Vector3
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Long
Expand All @@ -37,7 +37,7 @@ open class ARVRAnchor internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVRAnchor", "ARVRAnchor")
this.ptr = invokeConstructor("ARVRAnchor", "ARVRAnchor")
}

}
Expand Down
Expand Up @@ -2,15 +2,15 @@
package godot

import godot.core.Godot.shouldInitPtr
import godot.internal.utils.getConstructor
import godot.internal.utils.invokeConstructor
import kotlin.Any

open class ARVRCamera internal constructor(
_ignore: Any?
) : Camera(_ignore) {
constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVRCamera", "ARVRCamera")
this.ptr = invokeConstructor("ARVRCamera", "ARVRCamera")
}

}
Expand Down
Expand Up @@ -14,8 +14,8 @@ import godot.icalls._icall_Mesh
import godot.icalls._icall_String
import godot.icalls._icall_Unit_Double
import godot.icalls._icall_Unit_Long
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Double
Expand Down Expand Up @@ -53,7 +53,7 @@ open class ARVRController internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVRController", "ARVRController")
this.ptr = invokeConstructor("ARVRController", "ARVRController")
}

}
Expand Down
Expand Up @@ -185,31 +185,5 @@ open class ARVRInterface internal constructor(
}
}

companion object {
final const val ARVR_AR: Long = 4

final const val ARVR_EXCESSIVE_MOTION: Long = 1

final const val ARVR_EXTERNAL: Long = 8

final const val ARVR_INSUFFICIENT_FEATURES: Long = 2

final const val ARVR_MONO: Long = 1

final const val ARVR_NONE: Long = 0

final const val ARVR_NORMAL_TRACKING: Long = 0

final const val ARVR_NOT_TRACKING: Long = 4

final const val ARVR_STEREO: Long = 2

final const val ARVR_UNKNOWN_TRACKING: Long = 3

final const val EYE_LEFT: Long = 1

final const val EYE_MONO: Long = 0

final const val EYE_RIGHT: Long = 2
}
companion object
}
Expand Up @@ -2,15 +2,15 @@
package godot

import godot.core.Godot.shouldInitPtr
import godot.internal.utils.getConstructor
import godot.internal.utils.invokeConstructor
import kotlin.Any

open class ARVRInterfaceGDNative internal constructor(
_ignore: Any?
) : ARVRInterface(_ignore) {
constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVRInterfaceGDNative", "ARVRInterfaceGDNative")
this.ptr = invokeConstructor("ARVRInterfaceGDNative", "ARVRInterfaceGDNative")
}

}
Expand Down
Expand Up @@ -4,8 +4,8 @@ package godot
import godot.core.Godot.shouldInitPtr
import godot.icalls._icall_Double
import godot.icalls._icall_Unit_Double
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Double

Expand All @@ -24,7 +24,7 @@ open class ARVROrigin internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVROrigin", "ARVROrigin")
this.ptr = invokeConstructor("ARVROrigin", "ARVROrigin")
}

}
Expand Down
Expand Up @@ -16,8 +16,8 @@ import godot.icalls._icall_String
import godot.icalls._icall_Transform_Boolean
import godot.icalls._icall_Unit_Double
import godot.icalls._icall_Vector3
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Double
Expand All @@ -39,27 +39,27 @@ open class ARVRPositionalTracker internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("ARVRPositionalTracker", "ARVRPositionalTracker")
this.ptr = invokeConstructor("ARVRPositionalTracker", "ARVRPositionalTracker")
}

}

open fun _set_joy_id(joyId: Long) {
open fun _setJoyId(joyId: Long) {
}

open fun _set_mesh(mesh: Mesh) {
open fun _setMesh(mesh: Mesh) {
}

open fun _set_name(name: String) {
open fun _setName(name: String) {
}

open fun _set_orientation(orientation: Basis) {
open fun _setOrientation(orientation: Basis) {
}

open fun _set_rw_position(rwPosition: Vector3) {
open fun _setRwPosition(rwPosition: Vector3) {
}

open fun _set_type(type: Long) {
open fun _setType(type: Long) {
}

open fun getHand(): ARVRPositionalTracker.TrackerHand {
Expand Down Expand Up @@ -146,11 +146,5 @@ open class ARVRPositionalTracker internal constructor(
}
}

companion object {
final const val TRACKER_HAND_UNKNOWN: Long = 0

final const val TRACKER_LEFT_HAND: Long = 1

final const val TRACKER_RIGHT_HAND: Long = 2
}
companion object
}
Expand Up @@ -38,24 +38,6 @@ object ARVRServer : Object() {
}
}

final const val DONT_RESET_ROTATION: Long = 2

final const val RESET_BUT_KEEP_TILT: Long = 1

final const val RESET_FULL_ROTATION: Long = 0

final const val TRACKER_ANCHOR: Long = 4

final const val TRACKER_ANY: Long = 255

final const val TRACKER_ANY_KNOWN: Long = 127

final const val TRACKER_BASESTATION: Long = 2

final const val TRACKER_CONTROLLER: Long = 1

final const val TRACKER_UNKNOWN: Long = 128

val interfaceAdded: Signal1<String> by signal("interface_name")

val interfaceRemoved: Signal1<String> by signal("interface_name")
Expand Down
Expand Up @@ -24,8 +24,8 @@ import godot.icalls._icall_Unit_Long_Vector3_Double
import godot.icalls._icall_VariantArray
import godot.icalls._icall_Vector3_Long
import godot.icalls._icall_Vector3_Vector3
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Double
Expand All @@ -37,16 +37,16 @@ open class AStar internal constructor(
) : Reference(_ignore) {
constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("AStar", "AStar")
this.ptr = invokeConstructor("AStar", "AStar")
}

}

open fun _compute_cost(fromId: Long, toId: Long): Double {
open fun _computeCost(fromId: Long, toId: Long): Double {
throw NotImplementedError("_compute_cost is not implemented for AStar")
}

open fun _estimate_cost(fromId: Long, toId: Long): Double {
open fun _estimateCost(fromId: Long, toId: Long): Double {
throw NotImplementedError("_estimate_cost is not implemented for AStar")
}

Expand Down
Expand Up @@ -25,8 +25,8 @@ import godot.icalls._icall_Unit_Long_Vector2_Double
import godot.icalls._icall_VariantArray
import godot.icalls._icall_Vector2_Long
import godot.icalls._icall_Vector2_Vector2
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Double
Expand All @@ -38,16 +38,16 @@ open class AStar2D internal constructor(
) : Reference(_ignore) {
constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("AStar2D", "AStar2D")
this.ptr = invokeConstructor("AStar2D", "AStar2D")
}

}

open fun _compute_cost(fromId: Long, toId: Long): Double {
open fun _computeCost(fromId: Long, toId: Long): Double {
throw NotImplementedError("_compute_cost is not implemented for AStar2D")
}

open fun _estimate_cost(fromId: Long, toId: Long): Double {
open fun _estimateCost(fromId: Long, toId: Long): Double {
throw NotImplementedError("_estimate_cost is not implemented for AStar2D")
}

Expand Down
Expand Up @@ -14,8 +14,8 @@ import godot.icalls._icall_String
import godot.icalls._icall_Unit_Boolean
import godot.icalls._icall_Unit_Object
import godot.icalls._icall_Unit_String
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.String
Expand Down Expand Up @@ -59,15 +59,15 @@ open class AcceptDialog internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("AcceptDialog", "AcceptDialog")
this.ptr = invokeConstructor("AcceptDialog", "AcceptDialog")
}

}

open fun _builtin_text_entered(arg0: String) {
open fun _builtinTextEntered(arg0: String) {
}

open fun _custom_action(arg0: String) {
open fun _customAction(arg0: String) {
}

open fun _ok() {
Expand Down
Expand Up @@ -19,8 +19,8 @@ import godot.icalls._icall_Unit_String
import godot.icalls._icall_Unit_String_Boolean
import godot.icalls._icall_Unit_Vector2
import godot.icalls._icall_Vector2
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Double
Expand Down Expand Up @@ -118,7 +118,7 @@ open class AnimatedSprite internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("AnimatedSprite", "AnimatedSprite")
this.ptr = invokeConstructor("AnimatedSprite", "AnimatedSprite")
}

}
Expand All @@ -129,14 +129,14 @@ open class AnimatedSprite internal constructor(
}


open fun _is_playing(): Boolean {
open fun _isPlaying(): Boolean {
throw NotImplementedError("_is_playing is not implemented for AnimatedSprite")
}

open fun _res_changed() {
open fun _resChanged() {
}

open fun _set_playing(playing: Boolean) {
open fun _setPlaying(playing: Boolean) {
}

open fun getAnimation(): String {
Expand Down
Expand Up @@ -12,8 +12,8 @@ import godot.icalls._icall_Unit
import godot.icalls._icall_Unit_Long
import godot.icalls._icall_Unit_Object
import godot.icalls._icall_Unit_String
import godot.internal.utils.getConstructor
import godot.internal.utils.getMethodBind
import godot.internal.utils.invokeConstructor
import kotlin.Any
import kotlin.Boolean
import kotlin.Long
Expand Down Expand Up @@ -57,19 +57,19 @@ open class AnimatedSprite3D internal constructor(

constructor() : this(null) {
if (shouldInitPtr()) {
this.ptr = getConstructor("AnimatedSprite3D", "AnimatedSprite3D")
this.ptr = invokeConstructor("AnimatedSprite3D", "AnimatedSprite3D")
}

}

open fun _is_playing(): Boolean {
open fun _isPlaying(): Boolean {
throw NotImplementedError("_is_playing is not implemented for AnimatedSprite3D")
}

open fun _res_changed() {
open fun _resChanged() {
}

open fun _set_playing(playing: Boolean) {
open fun _setPlaying(playing: Boolean) {
}

open fun getAnimation(): String {
Expand Down

0 comments on commit f1dcbba

Please sign in to comment.