View previous topic :: View next topic |
Author |
Message |
Nthalk
Joined: 15 Jun 2008 Posts: 8
|
Posted: Mon Mar 16, 2009 2:20 am Post subject: Compiling arclib |
|
|
As of March 16th, 2009:
Trunk arclib would not compile with the latest DerelictSDL due to a missing 'derelict/sdl/keysym.d' file.
Arclib Version:
URL: http://svn.dsource.org/projects/arclib/trunk
Revision: 1505
Derelict Version:
URL: http://svn.dsource.org/projects/derelict/trunk/DerelictSDL/derelict/sdl
Revision: 346
It looks like derelict has recently gotten rid of all of the nice sub files and just has a types and a funcs file that holds all of the... uh... Types and funcs of the sdl library now.
Additionally, there were some tango issues as well. I fixed the source enough to dsss build the arclib core to the point where some of the examples run. However, I have no idea if this is stable or good. But it compiles, and that's a start, right?
Code: |
Index: arclib/arc/arc/internals/input/joystick.d
===================================================================
--- arclib/arc/arc/internals/input/joystick.d (revision 1505)
+++ arclib/arc/arc/internals/input/joystick.d (working copy)
@@ -7,7 +7,7 @@
arc.types;
import
- derelict.sdl.events,
+ derelict.sdl.sdlfuncs,
derelict.sdl.sdl;
import
Index: arclib/arc/arc/internals/input/keyboard.d
===================================================================
--- arclib/arc/arc/internals/input/keyboard.d (revision 1505)
+++ arclib/arc/arc/internals/input/keyboard.d (working copy)
@@ -26,7 +26,10 @@
arc.input,
arc.types;
-import derelict.sdl.events;
+import
+ derelict.sdl.sdlfuncs,
+ derelict.sdl.sdltypes
+;
/*******************************************************************************
Index: arclib/arc/arc/internals/input/mouse.d
===================================================================
--- arclib/arc/arc/internals/input/mouse.d (revision 1505)
+++ arclib/arc/arc/internals/input/mouse.d (working copy)
@@ -28,7 +28,7 @@
arc.types;
import
- derelict.sdl.events,
+ derelict.sdl.sdlfuncs,
derelict.sdl.sdl;
/*******************************************************************************
Index: arclib/arc/arc/input.d
===================================================================
--- arclib/arc/arc/input.d (revision 1505)
+++ arclib/arc/arc/input.d (working copy)
@@ -84,8 +84,8 @@
// import input key identifiers
import
derelict.sdl.sdl,
- derelict.sdl.keysym,
- derelict.sdl.events;
+ derelict.sdl.sdltypes,
+ derelict.sdl.sdlfuncs;
// Input uses window when user resizes the window
import
Index: arclib/arc/arc/math/routines.d
===================================================================
--- arclib/arc/arc/math/routines.d (revision 1505)
+++ arclib/arc/arc/math/routines.d (working copy)
@@ -98,7 +98,7 @@
}
body
{
- return cast(int)(a + (Kiss.shared.toInt() % (b+1-a) ));
+ return cast(int)(a + (Kiss.instance.toInt() % (b+1-a) ));
}
/// Finds the roots
@@ -218,7 +218,7 @@
/// Random number in range [-1,1]
arcfl random()
{
- arcfl r = cast(arcfl)Kiss.shared.toInt();
+ arcfl r = cast(arcfl)Kiss.instance.toInt();
r /= uint.max;
r = 2.0f * r - 1.0f;
return r;
@@ -227,7 +227,7 @@
/// random number with given range between high and low
arcfl random(arcfl lo, arcfl hi)
{
- arcfl r = cast(arcfl)Kiss.shared.toInt();
+ arcfl r = cast(arcfl)Kiss.instance.toInt();
r /= uint.max;
r = (hi - lo) * r + lo;
return r;
Index: arclib/arc/arc/sound.d
===================================================================
--- arclib/arc/arc/sound.d (revision 1505)
+++ arclib/arc/arc/sound.d (working copy)
@@ -597,13 +597,10 @@
{
// Get first four bytes of sound file to determine type
// And then load the file. sound_file will have all of our important info
- auto fc = new FileConduit(filename, FileConduit.ReadExisting);
- auto fdata = new MappedBuffer(fc);
+ auto fdata = new MappedBuffer(filename,FileConduit.ReadExisting);
char[] data = cast(char[])fdata.slice();
- fc.close();
- delete fc;
delete fdata;
if (data[0..4]=="RIFF")
@@ -794,8 +791,8 @@
{
logger.info("Loading WAV file " ~ filename);
super(filename);
- fileconduit = new FileConduit(filename, FileConduit.ReadExisting);
- mmbuffer = new MappedBuffer(fileconduit);
+
+ mmbuffer = new MappedBuffer(filename, FileConduit.ReadExisting);
file = cast(char[])mmbuffer.slice();
// First 4 bytes of Wave file should be "RIFF"
|
|
|
Back to top |
|
|
Nthalk
Joined: 15 Jun 2008 Posts: 8
|
Posted: Mon Mar 16, 2009 2:26 am Post subject: |
|
|
Additionally, where are the testbin resources located?
I cannot seem to find them.
Thanks!
-Nthalk |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Mon Mar 16, 2009 9:40 am Post subject: |
|
|
I made the changes to compile with the latest derelict, however you might save yourself a lot of trouble if you decide to use the latest stable Tango version. I only do Tango changes after stable Tango releases. |
|
Back to top |
|
|
Nthalk
Joined: 15 Jun 2008 Posts: 8
|
Posted: Mon Mar 16, 2009 10:28 am Post subject: |
|
|
Well, since tango 99.8 should be coming out in a few days... I suppose it might be time to get ready for it =) |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Fri Mar 27, 2009 1:30 pm Post subject: |
|
|
Everything except GUI should work with Tango, except it all has warnings now. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|