Page 1 of 1

MiniMap Bug & Fix

Posted: 13 Apr 2008, 21:40
by leeor_net
I noticed a bug in the Minimap while testing the SVN Client (0.1.0 trunk). I haven't noticed this being addressed in any of the SVN updates and the change to the code is so small I didn't think a patch would be necessary:

File: gui/minimap.cpp -- Line: 108 -- Function: void Minimap::draw(gcn::Graphics *graphics)

Code: Select all

            case Being::NPC:
                graphics->setColor( gcn::Color(255, 255, 0) );
                break;

            default:
                // If we're here we missed something
                assert( (being->getType() == Being::PLAYER) || (being->getType() == Being::MONSTER) || (being->getType() == Being::NPC) );
                break;
Hope that helps.

Re: MiniMap Bug & Fix

Posted: 14 Apr 2008, 07:06
by Crush
Thanks for reporting and fixing. Unfortunately I can't take care of this right now. So I'll put it on the bugtracker nevertheless because otherwise it will most likely be forgotten.

Just curious: What exactly is the bug?

Re: MiniMap Bug & Fix

Posted: 14 Apr 2008, 07:17
by Bjørn
I don't see any reason to add an assertion, since that would just cause the program to terminate for no good reason (supposing we had missed something). Other than that I understand you're having NPCs drawn in yellow, while before their color was defined by the last thing drawn before the NPC.

Re: MiniMap Bug & Fix

Posted: 20 Apr 2008, 00:40
by leeor_net
Bjørn wrote:I don't see any reason to add an assertion, since that would just cause the program to terminate for no good reason (supposing we had missed something). Other than that I understand you're having NPCs drawn in yellow, while before their color was defined by the last thing drawn before the NPC.
Assertions on Win32 still allows a program to keep moving -- I forgot it doesn't work like that on *nix systems. Actually, I'm not sure why I found it necessary to put it there.

As for the NPC's being drawn as the last being drawn, that would be the 'bug'. Why would you want NPC dots to be drawn in Red while near monsters or Blue while near players? As for the color itself, I just thought anything contrasting would work.