Funky Visual Studio 2005 bug

I ran into this today with VS2005 SP1: if you define the body of a specialization of a template class’ member function in a separate cpp file, the linker will barf:


template<class T> struct A { void f() {} };
template<> void A<int>::f(); // body in a separate cpp

void main()
{
  A<int> a;
  a.f(); // Linker complains that this function is undefined.
}


You have to define the body in all source files (or at least one) that actually use the specialization of that function, normally in the header file:


template<class T> struct A { void f() {} };
template<> void A<int>::f() { }

void main()
{
  A<int> a;
  a.f();
}


Not sure if I have explained correctly, but I hope you get the idea.

Posted in Uncategorized

Region locks

My european copies of Gears of War, Lego Star Wars 2, King Kong and Tomb Raider Legend work on an american 360. Burnout and PGR3 don’t. I hope the PS3 marks the end of region-locked games forever; I hate them. Actually, I’m not sure if Wii games are also region coded. Anyway, that’s the mini-rant before going to sleep.

Posted in Uncategorized

State of the Next Gen

No more Vista posts for a while. 🙂

It seems that my bold predictions for the Nintendo Wii were only half right. The Wii is a runaway success (it is still impossible to find one on the shelves here in Vancouver), but in terms of software sales, Nintendo games are the only real sellers for that system. Add to that the impressive numbers for the Nintendo DS.

Meanwhile, the XBox 360 and the especially the PS3 are having a hard time penetrating the market. Both Sony and Microsoft are playing bait and switch with the idea of a price drop, but at some point they will have to stop the wordplay and just do it. My personal feel is that there are simply not enough great games to make people want to pay for a next gen system. Gears of War was fantastic, and Halo 3 will sell lots (and hopefully be very good too), but the rest, in general, are little more than PC ports and bumpmapped, hi-res versions of last-gen games. I will pay for that, but the average gamer is not in a hurry.

In other news, XBox Live Arcade has received a few really cool additions to its lineup: surprisingly good remakes of Prince of Persia and Pac-Man Championship Edition; and a little gem, in the form of an oldschool action game, called Heavy Weapon.

Posted in Uncategorized

Firefox and Vista

Another annoyance gone now: with Firefox installed and set as the default browser, clicking on links in applications would result in an annoying error message from Vista despite Firefox opening the link correctly. Same happens if you type a URL in an Explorer window. This popup only happens if Firefox was not already running. The fix is to remove or rename the registry key:

HKEY_CLASSES_ROOT\FirefoxURL\shell\open\ddeexec

This key will reappear when Firefox is updated, so you may want to prepare a .reg file like:


Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\FirefoxURL\shell\open\ddeexec]


(Remember to leave an empty line at the end)

The Firefox people are aware of the problem, so hopefully this hack will soon be unnecessary.

In other news, I finished the Supreme Commander campaign yesterday. In a weird parallel, it left me with a similar feeling as the book I am reading (Blue Mars): fascinating but boring. The main problem in SupCom’s campaign is the lack of variety; every mission feels the same. The main problem in Blue mars is that there is very little story and an awful lot of description; Red Mars was already heavy on this, Green Mars went even further, and Blue Mars goes too far in my opinion.

Posted in Uncategorized

Blizzard does it again

I know a few people got the Starcraft urge after the SC2 announcement; a couple of them even went and bought it again. I might have done likewise if I didn’t have Supreme Commander. But this?

Starcraft Battlechest and Warcraft 3 Battlechest up in the top 10 PC sales. The former is 9 years old, the later 5. And of course WoW and its expansion taking the top 2 spots. It’s just insane. How do they do it? Quality, polish, attention to detail, support, marketing, and of course making an active effort to create and maintain a rabid community of fans.

Posted in Uncategorized

Tower Defense

If you have never played a Tower Defense game, now is the time to check them out by downloading the demo for Immortal Defense (via Indygamer). I believe this game concept originated as a mod for Starcraft and later Warcraft 3, but it has become a subgenre of strategy games in itself. The idea is simple: place and upgrade static defenses and destroy the incoming enemy waves. Different towers have different abilities, and the amount of enemies can be overwhelming at times, so make the most out of your limited resources!

Posted in Uncategorized

Vista fun and the missing PowerToys.

I am getting used to Vista by now. Some annoyances are inevitable, but after turning off the dreaded UAC (User Access Control or something like that) it feels quite comfortable. Aero is nothing groundbreaking, but pretty and elegant.

If you are a Vista power-user wanabee, you may want to check out the tips collection in TweakVista. In the past, many users learned to love the TweakUI powertoy, but alas it is not yet available for Vista.

Speaking of PowerToys, most of the classic ones are also not available in Vista. What’s more, even though they are simple applications (like the Power Calculator), they refuse to install in Vista. Funnily enough, people who have upgraded their XP installations to Vista can’t uninstall them either. 🙂

I miss my Power Calculator with graph capabilities and whatnot. I even tried changing the msiexec.exe compatibility options to Windows XP SP2, but the installer still refuses. I will probably try to copy the installed exe from my XP-powered laptop.

Some PowerToys have become standard in Vista, most notably the "Open Command Window Here" Explorer add-on. Microsoft in their infinite wisdom decided to hide it by default, but if you hold the shift key while you right-click on a folder in Explorer, it will show up. This works only in the right pane, not in the folder tree pane. 99% of the time I open a Command Prompt like this, I do it in the folder tree pane, so along with the annoyance of having to press Shift, the "feature" is nearly useless to me.

Or not?

Open RegEdit, go to "HKEY_CLASSES_ROOT\Directory\shell\cmd", and you will see a little empty string key named "Extended". Remove it and Open Command Window here becomes available without the Shift key, AND in both panes. There is another hidden utility called "Copy as Path" which I haven’t yet uncovered. If you need this desperately, you can use ClipText (Change the .reg file to the correct exe path).

Edit: you may also want to remove the "Extended" key from "HKEY_CLASSES_ROOT\Directory\Background\shell\cmd" (for the context menu with no file selected) and "HKEY_CLASSES_ROOT\Drive\shell\cmd" (for drive letters). Nothing is ever simple.

There are a million little details like this that may or may not affect you as a user. In a year or two, Vista will hopefully be polished, and tweaking tools will be plentiful so you can make the system as comfortable for you as possible. In the meantime, share what you can, and have fun exploring and Googling!

Posted in Uncategorized