D1x D2x Mission menu order SYMBOL/NUMBER/LETTER
#1
Information 
From DXX v.58.1 letter order in mission menu has changed,compared to previous versions, now symbols are after letters, it was an error to do that beacause to have a quick'n'easy to read list Its necessary to change titles with parenthesis or other symbols or numbers...
(for example I rename maps to have a clearer list like this :

[CPGN]D2: Vertigo
[CPGN]Krillidian Krusade
[CPGN]Obsidian
[x27]Ascent 
[x27]Fight for your life!
...
|CTF|Avenger CCTF
|CTF|Chaos theory |x6
|CTF-S|Cordelia shaker
|MP|Dfactor
|MP|Dedi-serv. pack1 |x24
|MP-R|Unauthorized wpn museum
...
Standalone missions etc...)
...and now standalone missions without nomenclature are at the begin of the list rather than at the end...it is wise to have the symbols and numbers at the beginning of the list and not the opposite in order to have a clear and logical sorting of the missions menu.

  Can you roll back this change plz?
or make it possible to change menu sorting? -> for exemple with a line in the .ini file alike menusort=0 for have symbols in first or =1 to have letters in first...it would be really appreciated ^^

ANYWAY THANKS ONE BILLION TIMES FOR YOUR WORK WITH DXX ENGINE YOU HAVE RESURRECTED AND WIDELY IMPROVED  MY TWO FIRST GAMES!! Heart Good necromancy skills Devil lol


Attached Files
.jpg   scD2x57sort.jpg (Size: 469.01 KB / Downloads: 24)
.jpg   scD2x58BADSORTING.jpg (Size: 224.29 KB / Downloads: 19)
.jpg   scD2x57sort2.jpg (Size: 430.8 KB / Downloads: 8)
.jpg   scD2x57sort3.jpg (Size: 417.81 KB / Downloads: 16)
Reply
#2
I do not recall any changes that would cause this. Testing indicates this does not happen for me. Sorting appears to be done according to locale.
Reply
#3
....owww... sure?.... (explain me if im wrong) just because I got a non english OS?
anyway D2X must be modified in this way.. no?
Reply
#4
I am sure. I tested it immediately before posting. I don't know why your sort order is different. What is the output of locale ; locale -a? For the good and bad screenshots, were those collected on the same system at the same time, with matching versions of all supporting libraries (in particular, glibc and physfs)? If not, what were the versions of glibc and physfs in each case?

I don't understand your last question. Please rephrase.
Reply
#5
ok, but sorry.. I don't understand what you talk about,I have a hard time with English..
and I don't want make you waste your time. and too I dont know how to find information you wish.
"locale -a"?
library "libphysfs.dll" I immagine? no version in file properties and I dont know why I would have moved this file from DXX folders
library glibc I dont have anything like that.
8s
Reply
#6
Oh, Windows. Sorry, I have no information on how Rebirth on Windows determines sort order for something like this. It should be determined by how PhysFS handles it, which I thought was standard on all platforms. Perhaps someone else can help you.

To any other users reading (and using Windows): can you confirm/refute hengyn45's assertion that 0.58.1 sorts differently than 0.57.3?
Reply
#7
I don't see a difference? things with ! [] or any special symbols show up on the top of the list for both versions here on windows 10.
Reply
#8
Hello everyone.

Personally, after re-editing maps names, it seems be caused by an 'stricmp' (ascii order - case insensitive)
Perhaps, try to sort maps names.

All maps was this format:  [MAP_TYPE] MAP_NAME
I changed those to: CHAR[MAP_TYPE] MAP_NAME.

1) 1[MP]... Digit
2) A[MP]... Upper
3) a[MP]... Lower
...
n) ~[MP] ... Last printable in ascii table
(See picture into attachements)

After restart dxx, I obtain the listing in ASCII order with case insensitive .... because stricmp !!!

I think you can change comparison function to this one:


Code:
#undef stricmp

/*
**    CHANGE CHAR VALUE
*/

static int        stricmp_encode_char(char c)
{
    if (c >= 0x09 && c <= 0x0D)    //Special Spaces
        return (c + 17);
    else if (c == ' ') //Space
        return (0x20);
    else if (c <= 0x1F) //Unprintable
        return (c - 5);
    else if (c >= '0' && c <= '9') //Digits
        return (c - 15);
    else if (c >= 'A' && c <= 'Z') //Upper
        return (c + 32 - 54);
    else if (c >= 'a' && c <= 'z') //Lower
        return (c - 54);
    else //Special Chars
        return (c + 69);
}

/*
**    MYSTRICMP
*/

int    mystricmp(const char *s1, const char *s2)
{
    char    tmp1;
    char    tmp2;

    while (*s1 && *s2)
    {
        tmp1 = stricmp_encode_char(*s1);
        tmp2 = stricmp_encode_char(*s2);

        if (tmp1 != tmp2)
            return (tmp1 - tmp2);
        s1++;
        s2++;
    }
    return (0);
}

# define stricmp(a,b) mystrcmp(a,b)


Please take a look on file (main/menu.c, function int list_directory(browser *b), line 1388 in d2x srcs).



On windows 10


Attached Files
.png   order1.PNG (Size: 295.36 KB / Downloads: 3)
Reply
#9
Blarget: thanks for the confirmation.

OP: what sort order does your Windows system use for files with those names?

fxst1: you can, of course, define any custom sort you want in builds you create locally. However, this thread is about unexpected sorting of special characters, not alphabetic characters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)