reyandme / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.
http://www.kamremake.com
GNU Affero General Public License v3.0
122 stars 29 forks source link

fix compilation with FPC + Lazarus of campaigns sorting algorithm #198

Open dpronin opened 8 months ago

dpronin commented 8 months ago

FPC and Lazarus on Linux do not have List.List[] property, but List fortunately has Sort() method at Linux platform with a comparator to give from a call site

Please, consider these changes to merge them in. The previous business logic of Windows's implementation has been preserved

dpronin commented 8 months ago

I think these changes are easy to verify. We need to get list of current campaigns in the game and see that they are sorted according to the rules. Then we could create a dummy campaign, if it is possible, with the smallest efforts undertaken and name them with TSK, TPR and different other names and see that they are again sorted. Or, if it is possible and there is a list of such campaigns in resources, we might create dummy files and see that their names are sorted according to the rules

reyandme commented 8 months ago

Yes, this or similar test should be done. Could you do such a test please ? I would be able to do it, but some time later.

dpronin commented 8 months ago

Actually, I don't have Windows, neither installed nor an installer to install

sado1 commented 8 months ago

as in the other MR, I could test those changes eventually it seems like a low risk change

dpronin commented 8 months ago

as in the other MR, I could test those changes eventually it seems like a low risk change

I would appreciate if you did