I'm having fun with Allegro and 'D' (thanks SiegeLord!) but have a question about pixel plotting.
Dumping a 2D array to the screen pixel-by-pixel works as expected but only if the window is square, eg 640 x 640 rather than say 800x600.
Having read the wiki about primitive pixel plotting I imagine this is something to do with drawing being related to the pixel centres being offset 0.5 'pixel units' (sorry I'm struggling to put this into words clearly!), although it could be that integers are being supplied to the function (although the pattern of missing pixels in the output doesn't seem to indicate so).
I can fix the problem by adding 0.5 to the co-ords supplied to al_draw_pixel() so it will render correctly regardless of window proportions - see below - but I'd like to know if this fix will work in all cases (proportions/resolution/hardware) or whether there's a better way to ensure that when I need pixel 100, 100 plotted that is what happens.
al_draw_pixel(x+0.5, y+0.5, c);
Speed isn't a major concern as the plotting only happens during map generation.
This is on Linux/Allegro 5/DMD with a Radeon HD6400
Any help or advice welcome