Trunk discussion / complains

I’m getting quite unexpected compile error after r3336:

Error	28	error C2665: '`anonymous-namespace'::<lambda4>::<lambda4>' : none of the 2 overloads could convert all the argument typesCGameHandler.cpp	1705

Output log:

5>CGameHandler.cpp(1705): error C2665: '`anonymous-namespace'::<lambda4>::<lambda4>' : none of the 2 overloads could convert all the argument types
5>          CGameHandler.cpp(1705): could be '`anonymous-namespace'::<lambda4>::(const CGHeroInstance *&,TryMoveHero &,CGameHandler *const ,CGameHandler::moveHero::ELEaveTile &,`anonymous-namespace'::<lambda3> &,CGameHandler::moveHero::EGuardLook &,const int3 &,CGameHandler::moveHero::EVisitDest &,const TerrainTile &)'
5>          while trying to match the argument list '(const CGHeroInstance *, TryMoveHero, CGameHandler *const , CGameHandler::moveHero::ELEaveTile, `anonymous-namespace'::<lambda3>, CGameHandler::moveHero::EGuardLook, const int3, CGameHandler::moveHero::EVisitDest, const TerrainTile)'
5>CGameHandler.cpp(1705): fatal error C1903: unable to recover from previous error(s); stopping compilation

However, couldn’t see anything wrong with that lambda expression.

error: 'to_string' is not a member of 'std'

known bug with gcc under mingw, probably fixed in mingw-gcc 4.8.0

I already replaced that with lexical_cast, but don’t want to commit version which does not fully compile.

OK, will wait.

It is unexpected indeed. I have no idea what’s wrong with that lambda. It compiles fine for me (VS2012 Update 2), so it can be likely a compiler issue that I’m unable to help with.
Try moving things around (eg. make argument enums named or move their deifnitions outside the function), that often helps for such problems.

So no to_string till MinGW 4.8? :frowning:

Yes, developers decided not to backport to 47X
bug report

Fixed in r3338. It involved some trick which is very not intuitive and illogical, but nonetheless it works :slight_smile:

CVCMIServer.cpp|511|error: 'stoi' is not a member of 'std'|

Same as std::to_string
2)client:

\libmingw32.a(main.o):main.c:(.text.startup+0xa7)||undefined reference to `WinMain@16' 

0_o (vcmi_client somehow become gui application?)

It’s been a long time since I compiled the trunk successfully at the moment it’s synced :stuck_out_tongue: Now it looks like that:

Error	8	error LNK2001: unresolved external symbol "public: __thiscall CFaction::CFaction(void)" (??0CFaction@@QAE@XZ)	F:\Programowanie\VCMI\vcmi\server\CVCMIServer.obj
Error	9	error LNK1120: 1 unresolved externals	F:\Programowanie\VCMI\VCMI_server.exe	1
Error	10	error LNK2001: unresolved external symbol "public: __thiscall CFaction::CFaction(void)" (??0CFaction@@QAE@XZ)	F:\Programowanie\VCMI\vcmi\client\Client.obj
Error	11	error LNK1120: 1 unresolved externals	F:\Programowanie\VCMI\VCMI_client.exe	1

The thing is, nothing but TownHandler (part of lib) ever references these constructors.

Missing DLL_LINKAGE in CFaction definition?

That’s it, thanks.

The main function in CMT.cpp has been set to “wmain” — main version for applications built in unicode model. Previously it was “_tmain” that was either expanded to main or to wmain, depending on project settings. For VC it was “wmain”, if for you it was “main”, that may be the cause of the issue. (At least I don’t think anything else could have caused that.)

I’ve changed std:stoi to boost::lexical_cast.

After r3351 game crashes as soon as I open new scenario menu.

EDIT: nevermind, forgot to move portratisSmall.json file.

Also, all mods that add new artifacts complain about missing graphics. And icons in game are actually missing.

I thought that I added check for missing icons to avoid crash. Will recheck.

Paths to icons must be relative to sprites directory:

Wrong: “image”: “soulprison44.bmp”,
Correct: “image”: “witchking/iconsSmall/soulprison44.bmp”,

Some way to automatically generate path is an interesting idea but not easy to add right now.

Two mods with multiple artifacts updated to new format:

dropbox.com/s/7z3ps1jjb3lojp8/H4arts.rar
dropbox.com/s/r7uwzfinydw8q … g-arts.rar

Warning: will NOT work with 0.92

It looks like they don’t show icon on hero screen after r-click.

r3359 crashes at start.

Debugger points at this line:

dest[townID]"name"].String() = typeParser.readString();

The issue is that dest vector is empty at this point.

Sorry, should be OK now.
Oh, and in case if you haven’t noticed:

Now they do :slight_smile:

Finally after many hours of instensive work and trial-and-error I’ve found a solution to generate the terrain view in a stable, flexible and halfway clearly way. All in all it required small, but important changes to the latest revision of the CMapEditManager. There are no failures or assert faults in the unit tests anymore:) There are many many combinations and a lot of exceptional cases, so even with unit tests I cannot say with 100% certainty that everything works correctly. It would involve a lot of effort to reach the 100%, which isn’t profitable. So I’ll move on and we’ll see if there are any further bugs.

Two patterns aren’t recognized yet, but they appear very rarely. So I’ll add it to my todo list, it’s ok for now. You can see that pattern/terrain view in the image below. BTW, do you know any maps where you’ve seen it?

http://forum.vcmi.eu/files/heroes_finalextmixedtile_860.jpghttp://

I’ve scanned all maps and this image seems to be unused in H3 maps. But I’ve managed to get it in map editor.
Pattern (G = grass, D = dirt, S = sand), image you’re looking for is in center

GGGSS
GGGSS
GGGDD
SSDDD
SSDDD

Or check attachment for example.
patterExample.h3m (1.35 KB)