Просмотр исходного кода

binds updated for changes in ScriptSystem

mikymod 12 лет назад
Родитель
Сommit
4f557500ac
3 измененных файлов с 6 добавлено и 11 удалено
  1. 2 5
      src/binds/Mat4Binds.cpp
  2. 2 4
      src/binds/QuatBinds.cpp
  3. 2 2
      src/binds/Vec3Binds.cpp

+ 2 - 5
src/binds/Mat4Binds.cpp

@@ -1,5 +1,4 @@
-#include "Mat4.h"
-#include "Vec3.h"
+#include "ScriptSystem.h"
 #include "OS.h"
 
 namespace crown
@@ -61,14 +60,12 @@ extern "C"
 
 	void				mat4_set_scale(Mat4* self, const Vec3* scale);
 
-	// Quat				mat4_to_quat();
-
 	void 				mat4_print(Mat4* self);
 }
 
 Mat4* mat4(float r1c1, float r2c1, float r3c1, float r1c2, float r2c2, float r3c2, float r1c3, float r2c3, float r3c3)
 {
-	return new Mat4(r1c1, r2c1, r3c1, 0, r1c2, r2c2, r3c2, 0, r1c3, r2c3, r3c3, 0, 0, 0, 0, 1);
+	scripter()->get_next_mat4(r1c1, r2c1, r3c1, r1c2, r2c2, r3c2, r1c3, r2c3, r3c3);
 }
 					
 Mat4* mat4_add(Mat4* self, Mat4* m)

+ 2 - 4
src/binds/QuatBinds.cpp

@@ -1,4 +1,4 @@
-#include "Quat.h"
+#include "ScriptSystem.h"
 
 namespace crown
 {
@@ -24,13 +24,11 @@ extern "C"
 	Quat*		quat_multiply(Quat* self, const float& k);
 
 	Quat*		quat_power(Quat* self, float exp);
-
-	// Mat4		quat_to_mat4(Quat* self);
 }
 
 Quat* quat(float angle, const Vec3* v)
 {
-	return new Quat(angle, *v);
+	scripter()->get_next_quat(angle, v);
 }
 
 void quat_negate(Quat* self)

+ 2 - 2
src/binds/Vec3Binds.cpp

@@ -1,4 +1,4 @@
-#include "Vec3.h"
+#include "ScriptSystem.h"
 
 namespace crown
 {
@@ -48,7 +48,7 @@ extern "C"
 //------------------------------------------------------------
 Vec3* vec3(float nx, float ny, float nz)
 {
-	return new Vec3(nx, ny, nz);
+	scripter()->get_next_vec3(nx, ny, nz);
 }
 
 //------------------------------------------------------------