Mercurial > projects > ldc
diff demos/ray.d @ 100:5071469303d4 trunk
[svn r104] TONS OF FIXES.
Split up declaration, constant initializer gen and definition for globals, structs, classes and functions.
Improved ClassInfo support (not complete), not in vtable yet.
Fixed a bunch of forward reference problems.
Much more. Major commit! :)
author | lindquist |
---|---|
date | Fri, 16 Nov 2007 08:21:47 +0100 |
parents | ce7ed8f59b99 |
children | 9922b9982552 |
line wrap: on
line diff
--- a/demos/ray.d Thu Nov 15 00:24:44 2007 +0100 +++ b/demos/ray.d Fri Nov 16 08:21:47 2007 +0100 @@ -1,5 +1,4 @@ -//import std.stdio, std.math, std.string; -//import tools.base; +import std.stdio; int atoi(char[] s) { int i, fac=1; @@ -105,7 +104,7 @@ n = (args.length==3 ? args[2].atoi() : 512), ss = 4; auto light = Vec(-1, -3, 2).unitise(); auto s=create(level, Vec(0, -1, 0), 1); - printf("P5\n%d %d\n255", n, n); + writefln("P5\n", n, " ", n, "\n255"); for (int y=n-1; y>=0; --y) for (int x=0; x<n; ++x) { double g=0;