Re: [AD] Linux joysytick and force feedback

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 29 Jun 2013 09:06:31 +0200, Beoran <beoran@xxxxxxxxxx> wrote:
> Op 29-06-13 06:55, Peter Wang schreef:
> > Thanks. I've pushed the first patch after some reworking. I did have 
> > to map the Linux button codes to Allegro button numbers. Subtracting 
> > BTN_JOYSTICK does not work in general. Can you rebase the second 
> > patch, and fix the formatting? Be careful about your indentation and 
> > where the whitespace goes. I'll end up adjusting it anyway but save 
> > me some effort :) Peter 
> 
> 
> OK, I'll do that, but do you have a code layout standard somewhere for 
> Allegro? I'd like to contribute a settings cript for indent or another 
> source code formatter so we don't have to do this manually from now on.

We have an indent.pro script in the root directory.
You can use it on your new files.

Our coding style is still Shawn's style
https://www.allegro.cc/manual/4/miscellaneous/the-allegro-hackers-guide/
although now we use spaces instead of hard tabs.  The three blank lines
between functions is often not followed (I think it's a bit much and
loses context in diffs), nor the comment block before functions.  I like
spaces around binary operators and wrapping at 80 chars, usually.

The code in SPEED, which was written in three days, is probably better
looking than any of our new code in A5.  So, strive to be like Shawn :)

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/