Last.fm radio!
Since I’m using it so much (and to have music available also where my files aren’t :)) I’ve subscribed to last.fm.
This gives me the radio feature… you can listen to my radio, on the right sidebar.
A little better MeasureString…
System.Drawing.MeasureString is a shit.
You are better work it out with API calls and so on, but if you are on Mono that is out of choice.
Apart from the known problems (not working correctly without Antialiasing enabled, requiring specific StringFormats), it also skips trailing spaces.
At least this should fix that issue up:
int CountTrailingSpaces(string str)
{
int spaces = 0;
int i = 0;
for (i = 0; i < str.Length; i++)
{
if (str[i] == ' ') ++spaces;
else break;
}
for (int j = str.Length - 1; j > i; j--)
{
if (str[j] == ' ') ++spaces;
else break;
}
return spaces;
}
SizeF MeasureString(Graphics gfx, string str, Font font)
{
// these are the times you hate MS..
SizeF size = gfx.MeasureString(str, font,
new PointF(0.0f, 0.0f),
StringFormat.GenericTypographic);
if ((str.EndsWith(" ")||(str.StartsWith(" "))))
{
SizeF spacesize = gfx.MeasureString("! !", font,
new PointF(0.0f, 0.0f),
StringFormat.GenericTypographic);
SizeF spacesizemin = gfx.MeasureString("!!", font,
new PointF(0.0f, 0.0f),
StringFormat.GenericTypographic);
float spacewidth = spacesize.Width - spacesizemin.Width;
int spaces = CountTrailingSpaces(str);
size.Width += (spacewidth*(float)spaces);
}
return size;
}
![]()
Patch for ScummVM on NDS
I always loved playing old adventures (specially Day of the Tentacle). And playing them on the Nintendo DS is just fantastic.
But, the current version of ScummVM has a scaling scheme (to adapt 320×200 adventures to the 256×192 screens) which is quite odd - you can choose a dynamic scaled version or a 200% scaled version. I find a 100% scaled to be the best however. So I removed the “force 200% zoom on zoomed screen” option and implemented three radio buttons for “Dynamic Zoom”, “Zoom 100%” and “Zoom 200%” : Zoom 100% is the new one I recommend (although it’s not the default).
I’ve tested only builds A and F (with Day of the Tentacle and Legend of Kyrandia 1); also I had to remove Mp3 support because I was missing libmad for nds. Patches has been submitted to Sourceforge.
You can download either .NDS builds or .DS.GBA builds . USE AT YOUR OWN RISK!
EDIT : It seems the patch will probably be included in future official builds of ScummVM DS. As soon as official release is available, I will remove the binaries and re-edit this text once again.
And now some screenshots (taken with the phone camera…) :
Spam from Carlcarlo
Sorry, only italian readers will remotely understand this.
I’ve received some spam from some TAIPINGYANG company. I thought the owner was Carlcarlo, not Pietro, anyway :).




