race choosing (tty mode)

View: New views
3 Messages — Rating Filter:   Alert me  

race choosing (tty mode)

by Fred Blau-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It's been bugging me that the letter to choose human is sometimes h and sometimes H (if hobbit is also an option).

Here's a diff for making dwarf and human always 'd' and 'h', as in nethack.

Actually, it makes doppelganger and hobbit always 'D' and 'H'.   Human gets the lowercase h, and dwarf and drow both get the lowercase d (fortunately no classes allow both).  It also preserves the "uppercase the second option" if the first letter is not 'd' or 'h', to guard against future races being added without this code being changed.

I'm not sure if a similar mod is needed in mswproc.c, or what the "correct" solution would be if some class was to allow more than two races with the same first letter.

Fred

Index: win/tty/wintty.c
===================================================================
RCS file: /cvsroot/slashem/slashem/win/tty/wintty.c,v
retrieving revision 1.18
diff -u -r1.18 wintty.c
--- win/tty/wintty.c    8 Jan 2005 23:32:24 -0000       1.18
+++ win/tty/wintty.c    9 Jan 2007 07:25:08 -0000
@@ -669,7 +669,17 @@
                                                flags.initalign)) {
                    any.a_int = i+1;    /* must be non-zero */
                    thisch = lowc(races[i].noun[0]);
-                   if (thisch == lastch) thisch = highc(thisch);
+                   if (thisch == 'd') {
+                     if (races[i].noun[1] == 'o') {
+                       thisch = highc(thisch);
+                     }
+                   } else if (thisch == 'h') {
+                     if (races[i].noun[1] == 'o') {
+                       thisch = highc(thisch);
+                     }
+                   } else if (thisch == lastch) {
+                     thisch = highc(thisch);
+                   }
                    add_menu(win, NO_GLYPH, &any, thisch,
                        0, ATR_NONE, races[i].noun, MENU_UNSELECTED);
                    lastch = thisch;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Slashem-devel mailing list
Slashem-devel@...
https://lists.sourceforge.net/lists/listinfo/slashem-devel

Re: race choosing (tty mode)

by J. Ali Harlow-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2007-01-09 07:28:32 AM, Fred Blau wrote:

> It's been bugging me that the letter to choose human is sometimes h  
> and sometimes H (if hobbit is also an option).
>
> Here's a diff for making dwarf and human always 'd' and 'h', as in  
> nethack.
>
> Actually, it makes doppelganger and hobbit always 'D' and 'H'.    
> Human gets the lowercase h, and dwarf and drow both get the lowercase  
> d (fortunately no classes allow both). It also preserves the  
> "uppercase the second option" if the first letter is not 'd' or 'h',  
> to guard against future races being added without this code being  
> changed.
>
> I'm not sure if a similar mod is needed in mswproc.c, or what the  
> "correct" solution would be if some class was to allow more than two  
> races with the same first letter.

Wouldn't it be easier to just re-order the table of races in role.c?  
This would be different for healers (in that doppelgangers would be 'd'  
rather than 'D' with your patch), but I would argue that this would be  
an improvement.

Cheers,

Ali

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Slashem-devel mailing list
Slashem-devel@...
https://lists.sourceforge.net/lists/listinfo/slashem-devel

Parent Message unknown Re: race choosing (tty mode)

by Fred Blau-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I assumed that it was in alphabetical order for some arcane reason :)

Also, then hobbit would sometimes be 'h' and sometimes be 'H' depending on if the role allowed humans as well.

Personally, I like doppelgangers being lowercase (as I play them more often), but I feel like leaving all the Vanilla races as their Vanilla letters is somehow nice.

Fred

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Slashem-devel mailing list
Slashem-devel@...
https://lists.sourceforge.net/lists/listinfo/slashem-devel