# Copyright (C) 2007  Peter De Wachter <pdewacht@gmail.com>
# Distributed under the same license as the game. See debian/copyright.

Sat Aug 25 23:55:45 CEST 2007  pdewacht@gmail.com
  * 04_sdl_import_d_language_updates
diff -rN -u old-a7xpg/import/SDL_active.d new-a7xpg/import/SDL_active.d
--- old-a7xpg/import/SDL_active.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_active.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* Include file for SDL application focus event handling */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_audio.d new-a7xpg/import/SDL_audio.d
--- old-a7xpg/import/SDL_audio.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_audio.d	2007-08-26 00:03:04.000000000 +0200
@@ -20,10 +20,10 @@
     slouken@devolution.com
 */
 
-import SDL_types;
-import SDL_error;
-import SDL_rwops;
-import SDL_byteorder;
+public import SDL_types;
+public import SDL_error;
+public import SDL_rwops;
+public import SDL_byteorder;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_cdrom.d new-a7xpg/import/SDL_cdrom.d
--- old-a7xpg/import/SDL_cdrom.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_cdrom.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* This is the CD-audio control API for Simple DirectMedia Layer */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL.d new-a7xpg/import/SDL.d
--- old-a7xpg/import/SDL.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL.d	2007-08-26 00:03:04.000000000 +0200
@@ -20,18 +20,18 @@
     slouken@devolution.com
 */
 
-import SDL_types;
-import SDL_getenv;
-import SDL_error;
-import SDL_rwops;
-import SDL_timer;
-import SDL_audio;
-import SDL_cdrom;
-import SDL_joystick;
-import SDL_events;
-import SDL_video;
-import SDL_byteorder;
-import SDL_version;
+public import SDL_types;
+public import SDL_getenv;
+public import SDL_error;
+public import SDL_rwops;
+public import SDL_timer;
+public import SDL_audio;
+public import SDL_cdrom;
+public import SDL_joystick;
+public import SDL_events;
+public import SDL_video;
+public import SDL_byteorder;
+public import SDL_version;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_endian.d new-a7xpg/import/SDL_endian.d
--- old-a7xpg/import/SDL_endian.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_endian.d	2007-08-26 00:03:04.000000000 +0200
@@ -34,9 +34,9 @@
          and other data sources.
 */
 
-import SDL_types;
-import SDL_rwops;
-import SDL_byteorder;
+public import SDL_types;
+public import SDL_rwops;
+public import SDL_byteorder;
 
 extern(C):
 
@@ -57,9 +57,9 @@
 Uint64 SDL_Swap64(Uint64 val) {
 	Uint32 hi, lo;
 	/* Separate into high and low 32-bit values and swap them */
-	lo = (Uint32)(val&0xFFFFFFFF);
+	lo = cast(Uint32)(val&0xFFFFFFFF);
 	val >>= 32;
-	hi = (Uint32)(val&0xFFFFFFFF);
+	hi = cast(Uint32)(val&0xFFFFFFFF);
 	val = SDL_Swap32(lo);
 	val <<= 32;
 	val |= SDL_Swap32(hi);
diff -rN -u old-a7xpg/import/SDL_events.d new-a7xpg/import/SDL_events.d
--- old-a7xpg/import/SDL_events.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_events.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,12 +22,12 @@
 
 /* Include file for SDL event handling */
 
-import SDL_types;
-import SDL_active;
-import SDL_keyboard;
-import SDL_mouse;
-import SDL_joystick;
-import SDL_syswm;
+public import SDL_types;
+public import SDL_active;
+public import SDL_keyboard;
+public import SDL_mouse;
+public import SDL_joystick;
+public import SDL_syswm;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_joystick.d new-a7xpg/import/SDL_joystick.d
--- old-a7xpg/import/SDL_joystick.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_joystick.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* Include file for SDL joystick event handling */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_keyboard.d new-a7xpg/import/SDL_keyboard.d
--- old-a7xpg/import/SDL_keyboard.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_keyboard.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* Include file for SDL keyboard event handling */
 
-import SDL_types;
+public import SDL_types;
 // !!! A hack! struct SDL_keysym is defined in this module,
 // !!! so we need to resolve the nameclash...
 // !!! Definitely won't work on *NIX but for now will do.
diff -rN -u old-a7xpg/import/SDL_mixer.d new-a7xpg/import/SDL_mixer.d
--- old-a7xpg/import/SDL_mixer.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_mixer.d	2007-08-26 00:03:04.000000000 +0200
@@ -24,7 +24,7 @@
 
 /* $Id: SDL_mixer.d,v 1.1.1.1 2003/09/19 14:55:49 kenta Exp $ */
 
-import SDL;
+public import SDL;
 
 extern (C) {
 
diff -rN -u old-a7xpg/import/SDL_mouse.d new-a7xpg/import/SDL_mouse.d
--- old-a7xpg/import/SDL_mouse.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_mouse.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,8 +22,8 @@
 
 /* Include file for SDL mouse event handling */
 
-import SDL_types;
-import SDL_video;
+public import SDL_types;
+public import SDL_video;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_mutex.d new-a7xpg/import/SDL_mutex.d
--- old-a7xpg/import/SDL_mutex.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_mutex.d	2007-08-26 00:03:04.000000000 +0200
@@ -25,7 +25,7 @@
 	These are independent of the other SDL routines.
 */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_quit.d new-a7xpg/import/SDL_quit.d
--- old-a7xpg/import/SDL_quit.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_quit.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* Include file for SDL quit event handling */
 
-import SDL_events;
+public import SDL_events;
 
 /* 
   An SDL_QUITEVENT is generated when the user tries to close the application
@@ -43,5 +43,5 @@
 bit SDL_QuitRequested()
 {
 	SDL_PumpEvents();
-	return SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK);
+	return SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK) != 0;
 }
diff -rN -u old-a7xpg/import/SDL_rwops.d new-a7xpg/import/SDL_rwops.d
--- old-a7xpg/import/SDL_rwops.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_rwops.d	2007-08-26 00:03:04.000000000 +0200
@@ -24,7 +24,7 @@
    data sources.  It can easily be extended to files, memory, etc.
 */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
@@ -84,35 +84,25 @@
 /* Macros to easily read and write from an SDL_RWops structure */
 int SDL_RWseek(SDL_RWops *ctx, int offset, int whence)
 {
-	int (*seek)(SDL_RWops *context, int offset, int whence);
-	seek = ctx.seek;
-	return (*seek)(ctx, offset, whence);
+	return ctx.seek(ctx, offset, whence);
 }
 
 int SDL_RWtell(SDL_RWops *ctx)
 {
-	int (*seek)(SDL_RWops *context, int offset, int whence);
-	seek = ctx.seek;
-	return (*seek)(ctx, 0, 1);
+	return ctx.seek(ctx, 0, 1);
 }
 
 int SDL_RWread(SDL_RWops *ctx, void* ptr, int size, int n)
 {
-	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
-	read = ctx.read;
-	return (*read)(ctx, ptr, size, n);
+	return ctx.read(ctx, ptr, size, n);
 }
 
 int SDL_RWwrite(SDL_RWops *ctx, void* ptr, int size, int n)
 {
-	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
-	write = ctx.write;
-	return (*write)(ctx, ptr, size, n);
+	return ctx.write(ctx, ptr, size, n);
 }
 
 int SDL_RWclose(SDL_RWops *ctx)
 {
-	int (*close)(SDL_RWops *context);
-	close = ctx.close;
-	return (*close)(ctx);
+	return ctx.close(ctx);
 }
diff -rN -u old-a7xpg/import/SDL_syswm.d new-a7xpg/import/SDL_syswm.d
--- old-a7xpg/import/SDL_syswm.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_syswm.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* Include file for SDL custom system window manager hooks */
 
-import SDL_version;
+public import SDL_version;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_thread.d new-a7xpg/import/SDL_thread.d
--- old-a7xpg/import/SDL_thread.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_thread.d	2007-08-26 00:03:04.000000000 +0200
@@ -25,8 +25,8 @@
 	These are independent of the other SDL routines.
 */
 
-import SDL_types;
-import SDL_mutex;
+public import SDL_types;
+public import SDL_mutex;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_timer.d new-a7xpg/import/SDL_timer.d
--- old-a7xpg/import/SDL_timer.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_timer.d	2007-08-26 00:03:04.000000000 +0200
@@ -20,7 +20,7 @@
     slouken@devolution.com
 */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_version.d new-a7xpg/import/SDL_version.d
--- old-a7xpg/import/SDL_version.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_version.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* This header defines the current SDL version */
 
-import SDL_types;
+public import SDL_types;
 
 extern(C):
 
diff -rN -u old-a7xpg/import/SDL_video.d new-a7xpg/import/SDL_video.d
--- old-a7xpg/import/SDL_video.d	2007-08-26 00:03:04.000000000 +0200
+++ new-a7xpg/import/SDL_video.d	2007-08-26 00:03:04.000000000 +0200
@@ -22,9 +22,9 @@
 
 /* Header file for access to the SDL raw framebuffer window */
 
-import SDL_types;
-import SDL_mutex;
-import SDL_rwops;
+public import SDL_types;
+public import SDL_mutex;
+public import SDL_rwops;
 
 extern(C):
 

