Fwd: Re: [airstrike] CVS accounts

Eero Tamminen oak at welho.com
Mon May 31 13:30:26 EDT 2004


----------  Forwarded Message  ----------

Subject: Re: [airstrike] CVS accounts
Date: Monday 31 May 2004 12:19
From: Ulf Ekström <ulfek at ifm.liu.se>
To: Eero Tamminen <oak at welho.com>

Hi all. I think we need to discuss some style rules at this point.

Rule: Think before you commit, do large changes on a branch.

Rule: We talk about large changes before we make them, ok! Specially
if you are "fixing" someone elses code.

Rule: The game is written in C, not C++. We never cast from or to
 void *.

Rule: We do not write for old and broken compilers. There may be some
small exceptions.

Rule: For inlining we use the INLINE macro.

Rule: We definitely don't want any CR's in our code. Live with it.

> > I will wait until a have CVS access to airstrike.
>
> I looked at your CVS commits.  A couple of comments:

Good comments. A agree with them all.

> I would prefer if you would go though all your changes to make sure
> there are no other subtle changes to how the code works and that all rest
> of

I completely agree. We cannot have people who just changes the code because
they don't understand it.

> your casts are right (e.g. pointers are really cast to pointers). A
> warning is much preferable to wrong cast hiding a problem.

Here I just repeat that we don't cast from or to void *.

> I think it's preferable to use in casts the typedef'ed version of the
> type, that would be a bit more consistent as e.g. "sprite_t *" is
> currently used throughout the code instead of "struct sprite *" you've
> used in the casts. This is matter of taste though, not so important :-).

Most of these casts are not needed anyway. They are just another source
of errors.

Maybe we should standardize on typename_t everywhere? I know I used struct
 blah somtimes, I will start to change it in places.

> Btw. can you select C99 option for MS-VC?  We'd like to use structure
> initializers and inlines that were added in C99 standard, but AFAIK
> earlier Ulf had needed to to add kludges for those because the newer
> C-standard wasn't supported by Windows.

I believe VC6 has some problems, but maybe not with the latest service
pack. Besides VC7 has been out for quite a long time now, so
supporting VC6 is not a priority. Isn't the compiler even free
nowadays?

Machiel, please fix the problems you introduced and remove the casts.

Regards,
Ulf

-------------------------------------------------------



More information about the airstrike mailing list