I am aware of that. I went ahead and added an additional section to my table
in the process. A "type" section. This way I can categorize all the commands
for various reasons, that being one of them.
Directions (n,s,w,e,u,d) all got a category of CMD_COMMON, while normal
commands got a category of CMD_GENERAL. Imm commands got CMD_IMM, builder
Imm commands got CMD_BLD and RP Imm commands got CMD_RP. While CMD_IMM,
CMD_BLD, and CMD_RP aren't being used for sorting, it does allow me to sort
them for my WizPower list and who has rights to use them. As for the
CMD_COMMON. Well, any command that is in that category get's put at the
beginning of the sort list, reguardless of their alphabetical category.
Did I miss anything?
- Valnir
----- Original Message -----
From: "David Wilson" <[EMAIL PROTECTED]>
To: "Valnir" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, February 27, 2006 4:34 PM
Subject: Re: Const vs Non-Const.
One thing that may be a problem is that if you do strict alphabetic
substitution, you'll run in to things like if the player types 's' to
go south, it will map to 'say' instead.
I think.
I'm too lazy to look it up right now, though.
On 2/27/06, Valnir <[EMAIL PROTECTED]> wrote:
Richard,
That was my impression as well, but I just wanted to check with all of you
guru's out there. I'll wait and see if everyone else confirms your
thought,
but I'm pretty sure I'm safe on this one.
- Valnir
----- Original Message -----
From: "Richard Lindsey" <[EMAIL PROTECTED]>
To: "Valnir" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, February 27, 2006 3:23 PM
Subject: RE: Const vs Non-Const.
I may be wrong here, but I believe the const portion of it just makes it
protected during runtime so that the structure itself can't be
altered... so yeah, if you wanted to qsort it, you'd have to take that
portion of it out... not quite sure of any disadvantages of it
personally, as nothing should modify that structure in-game anyway,
unless you explicitly code it to do that... But like I said at the
beginning, I may be wrong here :D
Richard Lindsey.
-----Original Message-----
From: Valnir [mailto:[EMAIL PROTECTED]
Sent: Monday, February 27, 2006 2:25 PM
To: [email protected]
Subject: Const vs Non-Const.
I have a question, should be a quick answer for you guys. What, if any,
would be the disadvantage of changing my cmd_table from:
const struct cmd_type cmd_table [] =
to be just:
struct cmd_type cmd_table [] =
I need to take the "const" out of it so I can use qsort to sort the
command
table in memory. I just need to know from you guys what kind of headache
I
might be creating for myself.
Thanks!
- Valnir
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom