pingus-devel
[Top][All Lists]
Advanced

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

Re: [Pingus-CVS] CVS: Games/Pingus BUGS,1.12,1.13


From: David Philippi
Subject: Re: [Pingus-CVS] CVS: Games/Pingus BUGS,1.12,1.13
Date: Thu, 15 Aug 2002 17:46:59 +0200
User-agent: KMail/1.4.1

On Thursday 15 August 2002 12:59, Ingo Ruhnke wrote:
> One solution might be to have an AngledAxis which inherit from Axis
> and adds a get_angle().

I'd say that this is the wrong direction. Right now there are tho places 
AxisPointer / AxisScroller where the angle of an axis is required and one 
ActionAxis which doesn't need it.
I don't know what further uses will appear, but I consider it unlikely that 
there will be much more places where the angle isn't required.
An AngledAxis class would work but I don't see it right to split a class 
having *TWO* public functions only because one of them isn't used 
everywhere.

> We currently duplicate the angle code for every axis.

Not true, there are InvertedAxis, MultipeAxis and DummyAxis right now which  
have a different angle code from the rest.

> Anyway, we can leave it as it is for now, even so I have this feeling
> that it is not right.

I consider a class explosion with Inverted[Angled]Axis, Multiple[Angled]Axis 
etc. worse. It's not like the angle would eat up time in every update cycle. 
The only cost is the storage of one float.

Bye David





reply via email to

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