MantisBT - VCMI
View Issue Details
0002053VCMIGUI - Adventure Mappublic2015-02-01 18:312016-11-11 08:22
0002053: Missing def for heroes on adventure map
As in the screenshot, happens for all the heroes.
Noticed after, [^] but could come from some earlier commits.
No tags attached.
png Bug2053.png (268,773) 2015-02-01 18:31
Issue History
2015-02-01 18:31WarmongerNew Issue
2015-02-01 18:31WarmongerFile Added: Bug2053.png
2015-02-01 21:39FayNote Added: 0005404
2015-02-01 21:41FayStatusnew => feedback
2015-02-02 00:49SXXNote Added: 0005406
2015-02-02 05:27WarmongerNote Added: 0005407
2015-02-02 05:27WarmongerStatusfeedback => new
2015-02-02 17:01FayNote Added: 0005408
2015-02-09 07:49WarmongerNote Added: 0005426
2015-02-09 08:01WarmongerNote Edited: 0005426bug_revision_view_page.php?bugnote_id=5426#r2806
2015-02-09 11:29FayNote Added: 0005427
2015-02-09 15:03WarmongerNote Added: 0005430
2015-02-09 15:04WarmongerNote Edited: 0005430bug_revision_view_page.php?bugnote_id=5430#r2811
2015-02-09 15:18FayNote Added: 0005431
2015-02-09 16:31FayNote Added: 0005432
2015-02-09 19:45FayNote Added: 0005437
2015-02-09 21:17WarmongerNote Added: 0005438
2015-02-09 21:17WarmongerStatusnew => resolved
2015-02-09 21:17WarmongerFixed in Version => 0.97c
2015-02-09 21:17WarmongerResolutionopen => fixed
2015-02-09 21:17WarmongerAssigned To => Fay
2016-11-11 08:22SXXStatusresolved => closed

2015-02-01 21:39   
Hmm, could it depend on OS/compiler? On my win7/mingw it works correctly.

Does it look the same during the hero movement?
Does it happen in world view mode as well?
2015-02-02 00:49   
When I tested Fay branch there was no such issue on Linux.
2015-02-02 05:27   
It also happens during movement and in world view.

I can see console message "Call loadBitmap with void name".
2015-02-02 17:01   
Well, that's strange. From what I've checked, hero images are .defs and they don't use CBitmapHandler::loadBitmap (the one that prints this message) at all. Maybe it's not related (also I don't have any of these messages).

I can cause this issue (cyan bg) by changing this call [^] to pass false as the last param (but only in world view mode, normal map still works correctly for me).
2015-02-09 07:49   
(edited on: 2015-02-09 08:01)
Okay, that message was related just to "world view" option:

Call to loadBitmap with void fname!
Call to loadBitmap with void fname!
Error: Failed to find file
bgWorldView not defined in resolution config; fallback to VWorld.bmp

2015-02-09 11:29   
Yeah, this one is expected & correct as long as you don't have this value defined in resolutions.json.

Are you able to check what happens for you after changing this this call [^] to pass false instead of true as the last param? I think this might have changed from the previous implementation (it looks like it was drawn without alpha for some reason, maybe it was the correct behavior).
2015-02-09 15:03   
(edited on: 2015-02-09 15:04)
Hey it works now. Was there a reason to change this line before?

However, def in world view is still incorrect.

2015-02-09 15:18   
Well, THAT was the reason. :)
For me, flags in normal view work both with and without alpha blitting. In world view only alpha blitting worked (because wv works slightly differently, since it needs to copy the surfaces when resizing).

I'll look into it.
2015-02-09 16:31   
I think I found the problem in world view when alpha blitting is off. Apparently SDL loses information about color keying when copying (or scaling?) the surface.
Seems that adding SDL_SetColorKey(...cyan...) on the scaled surface solves the problem. I'll test it some more and push the fix later today.
2015-02-09 19:45   
Should be fixed in [^]
2015-02-09 21:17   
It works, thanks!