TheAssemblyArmada / Thyme

An open source re-implementation of Generals : Zero Hour written in C++.
GNU General Public License v2.0
584 stars 59 forks source link

Implement some SkirmishBattleHonors #1126

Closed psykana closed 7 months ago

xezon commented 7 months ago

Oh nice. I will get to review today.

xezon commented 7 months ago

Code wise looks good to me. I will take a look at it ingame later today.

xezon commented 7 months ago

Like breaks in tool tips are wrong.

Original and Before this change

shot_20240325_183112_1

This change

shot_20240325_183309_1

psykana commented 7 months ago

I tested before/after at different resolutions so that went over my head, fixed.

psykana commented 7 months ago

Can I run format check locally so we don't have to drag this any more?

xezon commented 7 months ago
/home/runner/work/Thyme/Thyme/src/game/common/skirmishbattlehonors.cpp:379:9: error: no matching member function for call to 'Format'
    str.Format(L"%10d", wins);
    ~~~~^~~~~~
/home/runner/work/Thyme/Thyme/src/game/common/system/unicodestring.h:140:10: note: candidate function not viable: no known conversion from 'const wchar_t [5]' to 'const unichar_t *' (aka 'const char16_t *') for 1st argument
    void Format(const unichar_t *format, ...);
         ^
/home/runner/work/Thyme/Thyme/src/game/common/system/unicodestring.h:141:10: note: candidate function not viable: no known conversion from 'const wchar_t [5]' to 'Utf16String' for 1st argument
    void Format(Utf16String format, ...);
         ^
/home/runner/work/Thyme/Thyme/src/game/common/skirmishbattlehonors.cpp:430:17: error: cast from pointer to smaller type 'int' loses information
        honor = (int)Gadget_List_Box_Get_Item_Data(listbox, row, column);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/Thyme/Thyme/src/game/common/skirmishbattlehonors.cpp:431:17: error: cast from pointer to smaller type 'int' loses information
        score = (int)Gadget_List_Box_Get_Item_Data(listbox, row - 1, column);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings and 3 errors generated.