Skip to content

Commit

Permalink
Link all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven-Hendrik Haase committed Apr 1, 2012
1 parent 194ea7b commit 32bd540
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BIN=bin/
COMPILER=dmd -od$(BIN)
INCLUDES=-I. -Iexternals/LuaD/
LFLAGS=-L-Lexternals/LuaD/lib/ -L-lluad -L-lluajit-5.1
DFLAGS=-w
INCLUDES=-I. -Iexternals/LuaD/ -Iexternals/orange/ -Iexternals/Derelict3/import/
LFLAGS=-L-Lexternals/LuaD/lib/ -L-lluad -L-lluajit-5.1 -L-Lexternals/orange/lib/64/ -L-Lexternals/orange/lib/32/ -L-lorange -L-Lexternals/Derelict3/lib/ -L-lDerelictAL -L-lDerelictFT -L-lDerelictGL3 -L-lDerelictGLFW3 -L-lDerelictIL -L-lDerelictUtil -L-ldl
#DFLAGS=-w

# Aliases
default: bake
Expand All @@ -15,7 +15,13 @@ editor: HerpDerp
luad:
cd externals/LuaD; make

Derp: luad
orange:
cd externals/orange; make

derelict:
cd externals/Derelict3/build; rdmd derelict.d

Derp: luad orange derelict
$(COMPILER) derp/*.d $(DFLAGS) $(INCLUDES) $(LFLAGS) -oflibderp.a -lib

Derper:
Expand Down
23 changes: 23 additions & 0 deletions derp/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ import std.stdio;

import luad.all;

import orange.core._;
import orange.serialization._;
import orange.serialization.archives._;

import derelict.opengl3.gl3;
import derelict.glfw3.glfw3;

class Foo {
int wut;
}

class Derp {
/// Is being set to false when the main loop should end.
bool running = false;
Expand All @@ -26,6 +37,8 @@ class Derp {
/// Constructor
this() {
writeln("Derpy is coming!");

DerelictGL3.load();
}

/// Starts the game.
Expand Down Expand Up @@ -74,6 +87,16 @@ private:
lua.openLibs();

lua.doString(`print("derplua")`);

auto foo = new Foo;
foo.wut = 3;

auto archive = new XmlArchive!(char);
auto serializer = new Serializer(archive);

serializer.serialize(foo);
auto foo2 = serializer.deserialize!(Foo)(archive.untypedData);
assert(foo.wut == foo2.wut);
}
}
}

0 comments on commit 32bd540

Please sign in to comment.