2
0
Nicolas Cannasse 8 жил өмнө
parent
commit
510b0430f7

+ 1 - 1
libs/sdl/sdl/Cursor.hx

@@ -1,6 +1,6 @@
 package sdl;
 
-private typedef CursorPtr = hl.types.NativeAbstract<"sdl_cursor">;
+private typedef CursorPtr = hl.Abstract<"sdl_cursor">;
 
 @:enum abstract CursorKind(Int) {
 	var Arrow = 0;

+ 8 - 8
libs/sdl/sdl/GL.hx

@@ -112,7 +112,7 @@ class GL {
 		return @:privateAccess String.fromUTF8(getProgramInfoBytes(p));
 	}
 
-	static function getProgramInfoBytes( p : Program ) : hl.types.Bytes {
+	static function getProgramInfoBytes( p : Program ) : hl.Bytes {
 		return null;
 	}
 
@@ -144,7 +144,7 @@ class GL {
 		return @:privateAccess String.fromUTF8(getShaderInfoBytes(s));
 	}
 
-	static function getShaderInfoBytes( s : Shader ) : hl.types.Bytes {
+	static function getShaderInfoBytes( s : Shader ) : hl.Bytes {
 		return null;
 	}
 
@@ -171,7 +171,7 @@ class GL {
 	}
 
 	@:hlNative("sdl","gl_tex_image2d")
-	public static function texImage2D( target : Int, level : Int, internalFormat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, image : hl.types.Bytes ) {
+	public static function texImage2D( target : Int, level : Int, internalFormat : Int, width : Int, height : Int, border : Int, format : Int, type : Int, image : hl.Bytes ) {
 	}
 
 	public static function generateMipmap( t : Int ) {
@@ -196,10 +196,10 @@ class GL {
 	public static function deleteFramebuffer( f : Framebuffer ) {
 	}
 
-	public static function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, data : hl.types.Bytes ) {
+	public static function readPixels( x : Int, y : Int, width : Int, height : Int, format : Int, type : Int, data : hl.Bytes ) {
 	}
 
-	public static function drawBuffers( n : Int, buffers : hl.types.Bytes ) {
+	public static function drawBuffers( n : Int, buffers : hl.Bytes ) {
 	}
 
 	// renderbuffer
@@ -232,10 +232,10 @@ class GL {
 	public static function bufferDataSize( target : Int, size : Int, param : Int ) {
 	}
 
-	public static function bufferData( target : Int, size : Int, data : hl.types.Bytes, param : Int ) {
+	public static function bufferData( target : Int, size : Int, data : hl.Bytes, param : Int ) {
 	}
 
-	public static function bufferSubData( target : Int, offset : Int, data : hl.types.Bytes, srcOffset : Int, srcLength : Int ) {
+	public static function bufferSubData( target : Int, offset : Int, data : hl.Bytes, srcOffset : Int, srcLength : Int ) {
 	}
 
 	public static function enableVertexAttribArray( attrib : Int ) {
@@ -255,7 +255,7 @@ class GL {
 	public static function uniform1i( u : Uniform, i : Int ) {
 	}
 
-	public static function uniform4fv( u : Uniform, buffer : hl.types.Bytes, bufPos : Int, count : Int ) {
+	public static function uniform4fv( u : Uniform, buffer : hl.Bytes, bufPos : Int, count : Int ) {
 	}
 
 	// draw

+ 17 - 17
libs/sdl/sdl/GameController.hx

@@ -1,64 +1,64 @@
 package sdl;
 
-private typedef GameControllerPtr = hl.types.NativeAbstract<"sdl_gamecontroller">;
+private typedef GameControllerPtr = hl.Abstract<"sdl_gamecontroller">;
 
 @:hlNative("sdl")
 class GameController {
-	
+
 	var ptr : GameControllerPtr;
-	
+
 	public var id(get,never) : Int;
 	public var name(get,never) : String;
-	
+
 	public function new( index : Int ){
 		ptr = gctrlOpen( index );
 	}
-	
+
 	public inline function getAxis( axisId : Int ){
 		return gctrlGetAxis(ptr,axisId);
 	}
-	
+
 	public inline function getButton( btnId : Int ){
 		return gctrlGetButton(ptr,btnId);
 	}
-	
+
 	public inline function get_id() : Int {
 		return gctrlGetId(ptr);
 	}
-	
+
 	public inline function get_name() : String {
 		return @:privateAccess String.fromUTF8( gctrlGetName(ptr) );
 	}
-	
+
 	public function close(){
 		gctrlClose( ptr );
 		ptr = null;
 	}
-	
+
 	static function gctrlCount() : Int {
 		return 0;
 	}
-	
+
 	static function gctrlOpen( idx : Int ) : GameControllerPtr {
 		return null;
 	}
-	
+
 	static function gctrlClose( controller : GameControllerPtr ){
 	}
-	
+
 	static function gctrlGetAxis( controller : GameControllerPtr, axisId : Int ) : Int {
 		return 0;
 	}
-	
+
 	static function gctrlGetButton( controller : GameControllerPtr, btnId : Int ) : Bool {
 		return false;
 	}
-	
+
 	static function gctrlGetId( controller : GameControllerPtr ) : Int {
 		return -1;
 	}
-	
-	static function gctrlGetName( controller : GameControllerPtr ) : hl.types.Bytes {
+
+	static function gctrlGetName( controller : GameControllerPtr ) : hl.Bytes {
 		return null;
 	}
 

+ 2 - 2
libs/sdl/sdl/Sdl.hx

@@ -18,7 +18,7 @@ class Sdl {
 	}
 
 	static function __init__() {
-		hl.types.Api.setErrorHandler(function(e) reportError(e));
+		hl.Api.setErrorHandler(function(e) reportError(e));
 		sentinel = new hl.UI.Sentinel(30,onTimeout);
 	}
 
@@ -114,7 +114,7 @@ class Sdl {
 		@:privateAccess messageBox(title.toUtf8(), text.toUtf8(), error);
 	}
 
-	static function messageBox( title : hl.types.Bytes, text : hl.types.Bytes, error : Bool ) {
+	static function messageBox( title : hl.Bytes, text : hl.Bytes, error : Bool ) {
 	}
 
 	static function detectWin32() {

+ 2 - 2
libs/sdl/sdl/Surface.hx

@@ -1,6 +1,6 @@
 package sdl;
 
-private typedef SurfacePtr = hl.types.NativeAbstract<"sdl_surface">;
+private typedef SurfacePtr = hl.Abstract<"sdl_surface">;
 
 @:hlNative("sdl")
 abstract Surface(SurfacePtr) {
@@ -18,7 +18,7 @@ abstract Surface(SurfacePtr) {
 	}
 
 	@:hlNative("sdl","surface_from")
-	public static function from( pixels : hl.types.Bytes,  width : Int, height : Int, depth : Int, pitch : Int, rmask : Int, gmask : Int, bmask : Int, amask : Int ) : Surface {
+	public static function from( pixels : hl.Bytes,  width : Int, height : Int, depth : Int, pitch : Int, rmask : Int, gmask : Int, bmask : Int, amask : Int ) : Surface {
 		return null;
 	}
 

+ 4 - 4
libs/sdl/sdl/Window.hx

@@ -1,7 +1,7 @@
 package sdl;
 
-private typedef WinPtr = hl.types.NativeAbstract<"sdl_window">;
-private typedef GLContext = hl.types.NativeAbstract<"sdl_gl">;
+private typedef WinPtr = hl.Abstract<"sdl_window">;
+private typedef GLContext = hl.Abstract<"sdl_gl">;
 
 @:hlNative("sdl")
 class Window {
@@ -93,7 +93,7 @@ class Window {
 		winResize(win, 2);
 	}
 
-	static function winCreate( title : hl.types.Bytes, width : Int, height : Int ) : WinPtr {
+	static function winCreate( title : hl.Bytes, width : Int, height : Int ) : WinPtr {
 		return null;
 	}
 
@@ -114,7 +114,7 @@ class Window {
 	static function winResize( win : WinPtr, mode : Int ) {
 	}
 
-	static function winGetSize( win : WinPtr, width : hl.types.Ref<Int>, height : hl.types.Ref<Int> ) {
+	static function winGetSize( win : WinPtr, width : hl.Ref<Int>, height : hl.Ref<Int> ) {
 	}
 
 	static function winRenderTo( win : WinPtr, gl : GLContext ) {