glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] MapEdit scroll bug fixed


From: Bradley Arsenault
Subject: Re: [glob2-devel] MapEdit scroll bug fixed
Date: Wed, 17 Jan 2007 14:31:09 -0500

On 12/29/06, Stéphane Magnenat <address@hidden> wrote:
Hi,

I've fixed the map edit scroll bug.

Bradley, I noticed that you passed actions as string in the map editor. Why ?
An enum would be as expressive, typesafe, and faster.

Steph

--
http://nct.ysagoon.com


_______________________________________________
glob2-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/glob2-devel


I chose strings mainly because there more friendly. I agree with you,
an enum would be faster and can be as expressive when used properly. I
chose strings simply because speed isn't an issue(I *tried* to make my
map editor slow down my causing events near the bottom to go as
quickly as I can make them, and there was no noticable slowdown), and
strings where easier to decipher.

String events are simpler and much more flexible, which I've used to
my advantage a couple of times. String events allow the compounding of
actions, which I use for map editor keyboard shortcuts, and the
passing of data within the string. This simplifies the use of generic
"actions" (for example, select building type n), and eliminates the
need for second or third extra data variables that would be needed for
enums.

--
Whats long and hard and filled with seamen? My submarine!  -  Bradley Arsenault




reply via email to

[Prev in Thread] Current Thread [Next in Thread]