Notes |
|
(0000390)
|
Ivan
|
2009-12-11 20:40
|
|
I think I 've fixed this one myself - now VCMI works with lower-case names as well.
I've uploaded .diff file. Everything works fine for me but check it before usage |
|
|
(0000394)
|
Tow
|
2009-12-19 01:41
|
|
Is this a complete patch?
You introduce a filename variable which is twice assigned but never used.
You also cut code trying different (PCX/BMP) extensions. It is for a reason - files with .bmp extension in Data/ can overwrite .pcx from .lod archive (and vice-verse).
Standard H3 bitmaps in h3bitmap.lod use .pcx extension and VCMI normalises names of all found bitmaps by changing their extension to PCX to make name comparing possible (so that AAA.bmp and AAA.pcx are the same name). But after that we can't tell what original extension was and we must try them both.
The solution for case-sensitivity problem would be probably to keep original filenames in lodhandler Entry (along with normalised name for comparing). |
|
|
(0000395)
|
Ivan
|
2009-12-19 12:08
(edited on: 2009-12-19 12:09) |
|
that string variable used to backup filename before normalizing - so we still can restore it (otherwise we need to check presence of .bmp .BMP .pcx .PCX ... )
VCMI still can load bitmaps and pcx - as long as we received correct name.
>> You introduce a filename variable which is twice assigned but never used.
strange - there are two lines where it was one time assigned and one time used:
std::string filename=fname;//backuping original filename
(3 lines here)
fname=filename;//restoring it
And to make sure that I didn't messed up with .diff:
http://pastebin.com/m4ebd3dea [^]
|
|
|
(0000477)
|
Tow
|
2009-12-23 02:51
|
|
>>strange - there are two lines where it was one time assigned and one time used
You're right, I've misread. Sorry.
>>VCMI still can load bitmaps and pcx - as long as we received correct name.
We can't assume that function has received exact name. Given name may be sth.pcx and we may want to replace that file by putting sth.bmp to the Data folder.
In such scenario your patch brokes expected behaviour.
The only solution that fully fixes the issue and keeps original H3 behaviour is adding a new field "string originalName" to the Entry class and set it during the Data folder scanning. |
|
|
(0000478)
|
Ivan
|
2009-12-23 17:51
|
|
>>The only solution that fully fixes the issue and keeps original H3 behaviour is adding a new field "string originalName" to the Entry class and set it during the Data folder scanning.
Ok. I've made patch in this way. Will apply when I'll have some more fixes as well. |
|
|
(0000523)
|
Ivan
|
2009-12-29 15:56
|
|
|
|
|
Closing. Pls reopen if it reoccurs. |
|