PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

DrawVGAText error

While testing out the new DrawVGAText function, I noticed that the x location was being ignore even with DVT_NONE formatter selected.

Shouldn't the code in rasterizer.cpp on line 840 be
taken out?
The current code sets it to 0 no matter what you use.

i.e.
// Handles DVT_NONE as well as any bogus values
locX = 0;
Good catch. Sorry about that folks, bit of a logic error there. My intention was to handle any unknown value passed in by treating it the same essentially as a left-justify, but as this anonymous poster correctly points out, I done f'd it up! :( I guess my score on tonight's IQ test on Fox should be lowered a few points.

I'll try and get a fixed version out ASAP. For now, if anyone wants to correct this themselves, my suggestion is to leave the default, but just add a case to handle DVT_NONE. Either do nothing in it or just do a locX=locX; if you want something a bit more deliberate.