Krice
Arcane
- Joined
- May 29, 2010
- Messages
- 1,325
This is an abandoned roguelike project which I made a working SDL port in 2009... I found the only copy from my homepage so it's sometimes nice to keep that old stuff there. However I'm having some troubles getting this to run. I have found two bugs that crash. The second one is harder, because I actually don't understand what the piece of code is trying to do. It happens in RawTarget::Force. There is no description what Force does, but what I can tell it's making two strings uppercased in a while loop, while calling aPolymorph, which does nothing, since there is no action for that. Well, take a look at this yourself:
It stops in that assert (NUM_ABORT is 100 so it takes 1000 times to try something). upcase makes the string uppercased, but I don't get what this is trying to do. What was the idea of polymorph which leads to an empty case label.
Code:
Target RawTarget::Force(String force_str)
{
int index = 0;
do
{
doPerform(aPolymorph);
} while (Grammar::plural(THIS).upcase() != force_str.upcase()
&& ++index < NUM_ABORT*10);
assert (index < NUM_ABORT*10);
return Target(THIS);
}
It stops in that assert (NUM_ABORT is 100 so it takes 1000 times to try something). upcase makes the string uppercased, but I don't get what this is trying to do. What was the idea of polymorph which leads to an empty case label.