jsettlers / settlers-remake

A Remake of "The Settlers III" for Windows, Linux, Mac and Android
http://www.settlers-android-clone.com
MIT License
356 stars 101 forks source link

Implement detection of original Settlers installation type and choose image indexes accordingly #573

Open andreas-eberle opened 7 years ago

andreas-eberle commented 7 years ago

Situation

JSettlers relys on the original The Settlers III resource files. However, the content of these files is organized differently for each version of The Settlers III. This results in wrong images beeing shown depending on the original Settlers version you are using.

Proposed fix

We need a system to detect the type of settlers installation that is available and choose a list of image indexes appropriately. This way, we can configure this index list for all versions correctly and can show the correct images for all versions.

rpolzer commented 7 years ago

There could be another solution: as can be seen in the panel when selecting soldiers on the map, the panel shows the soldiers as they appear on the map, and not the "stone reliefs" which make trouble because of different indexes for different versions of the resource files.

Suggestion: for all statistics panels and for the tower population panel, we could use the images used on the map instead of the "stone reliefs".

michaelzangl commented 7 years ago

Suggested fix: (1) Use the gold edition indexes for all images (2) Write a translation function that maps gold editon indexes -> standard edition / demo indexes.

mz8i commented 5 years ago

@andreas-eberle what is left to do on this one? I noticed that #565 I reported some two years ago still persists and was thinking whether I could do some work on this issue

mz8i commented 5 years ago

Upon some investigation, I understand that I basically need to use the DatFileMappingComparator to compare the Gold Edition GFX folder to my edition (I have a GOG Ultimate Collection edition) GFX folder and add the mapping to the source code. It is not yet entirely clear to me, though, what order I should run the comparison in. Any hints welcome!