-
Notifications
You must be signed in to change notification settings - Fork 3
Getting started
- Install the development packages for SDL, libmodplug, zlib, libbz2 and libmxml v.2.7 (most distro's carry an outdated version. Get new one here )
- make && sudo make install
It should now be installed! Link your programs with -ldarnit
I recommend compiling with sebt3's yactfeau cross compiler. After setting up the project with setprj, libdarnit should compile and install fine into the toolchain with just "make && make install". You'll need to install libmxml into your cross compiler.
Not supported yet. Will be worked on when the gcw0 gets a working OpenGL|ES driver.
You don't need to compile libDarnit yourself. Mostly up-to-date builds are available at http://f.rdw.se/libdarnit
First of all, you need MinGW. Microsoft Visual C is retarded and will not work.
- Download and install the development libraries for
- libbz2 (should be availble from mingw's packaging system)
- zlib (same as above)
- libmxml
- Build and install libmodplug from source (http://sourceforge.net/projects/modplug-xmms/)
- Build and install libdarnit from source (make && make install)
When shipping your game you need to include the following dll files:
- libdarnit.dll
- libbz2.dll
- libmodplug-1.dll
- libgcc_s_dw2-1.dll
- libstdc++-6.dll
There's also a static library for windows now, meaning you won't have any DLL's to ship with your binary. To link your game to it, you also need to link with
- winmm.lib
- opengl32.lib
- ws2_32.lib
- libbz2.lib
- libmodplug.lib
- stdc++
- gdi32.lib
- shlwapi.lib
Not supported atm, check back later.
#include <darnit/darnit.h>
...
int main(int argc, char **argv) {
if (!d_init("WindowTitle", "appname", "path/to/icon")) {
/* Handle this, libdarnit failed to init */
return -1;
}
...
for (;;) { /* Rendering loop */
d_render_begin(); /* Must be called before you render anything */
/* Render stuff */
d_render_end(); /* Should be called before you run d_loop(). */
d_loop(); /* You must call this once a frame. Flips buffers, caps FPS etc. */
}
d_quit(); /* Will do platform-specific deinitialization and exit your program */
return 0;
}