[Top][All Lists]

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

[Nel] SDL enabled NeL and snowballs (patch)

From: Loic Dachary
Subject: [Nel] SDL enabled NeL and snowballs (patch)
Date: Wed, 28 Aug 2002 12:59:55 +0200


        As per your resquest I exploded the patches so that you can parse
and dispatch them easily. Shortly, the following patches do this:

        - Implement SDL support (
        - Fix a few minor bugs
        - Fix warnings (-Wall with gcc-2.95.4)
        - Fix errors reported by valgrind at run-time (running snowballs)

        These patches introduces enough material to require a license
and copyright notice. I hereby declare the following patches to be
under the GNU GPL, as found at The
copyright and license notice that applies to all of them is as follows:

 Copyright (C) 2002 Loic Dachary <address@hidden>

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

        I guess it would be more convenient for everyone if we could
sort out the copyright assignement proposal, as submitted last
were supposed to be settled around April / May but I did not push for
it.  By that time I was ready to assign copyright of my past, current
and future work on NeL to Nevrax.  I'm still inclined to do it.

        Here is the detail of the patches by category:

Attachment: patch-misc.26
Description: Binary data

              . Fixed warnings

(A)           . Add data member initializers to some classes. In
                circumstances that are too many to mention, valgrind
                reported that an uninitialized variable was being used
                in a comparison.  In case people have preformance
                concerns, initialization does not cost any cpu (when the
                compiler added code to do it for you this is a no-op)
                and if it does cost cpu (because the compiler did not)
                they you'd better spend this cpu time or be prepared to
                face extremely subtle bugs.

              . Included fd between LOG_IN_FILE because it's only used
                if this macro is defined.

(B)           . Re-ordered a few class data member initializers to match
                the definition order.

Attachment: patch-3d.26
Description: Binary data

              . Fixed warnings

              . Added support for SDL, all included in #ifdef
                HAVE_SDL.  It obsoletes all X11 related code (replaces
                hundreds of lines with a few lines of code), is
                portable on Unices flavors, all windows and mac
                flavors and probably some other exotic OS. When SDL is
                in use the NeL 3d event handling system is commented
                out since SDL provides its own event handling system
                including support for all desirable devices. In debian
                packages and autotools files, SDL is a requirement and
                installed on demand. I understand this is an
                architectural decision but I hope you'll agree with it
                because 1) it is completly separate from the windows
                support you wrote (it's an alternative), 2) noone will
                ever want to invest the time you invested to implement
                the di_* related classes for Unices when SDL does the
                job, 3) marking SDL as an alternative of the NeL 3d
                event handling system in a prominent way is essential
                to prevent confusion by contributors who might it's a
                good idea to make them cooperate, for instance. I'm
                ready to discuss this in depth if you'd like. Again, I
                hope you'll agree with this since it has literaly 0
                impact on your development strategy and can be singled
                out quite easily if needed.

              . (A) and (B) see above

              . Added NL_OS_WINDOWS wrappers around MMX assembly code

              . Fixed an "always false" comparison in 3d/zone_symmetrisation.cpp
                because usigned value tested to be < 0. I removed the useless
                comparison but maybe the bug is really that a signed value
                should be used. 

Attachment: patch-ai.26
Description: Binary data

              . Fixed warnings

              . group_type.cpp uses obsolete push_back, inserted o instead
                but could be NULL instead (was unsure what would be best)


Attachment: patch-snowballs.26
Description: Binary data


              . Fixed warnings

              . Added config.h inclusion to all sources regardless of 
                their actual need. I ran into a subtle bug because
                the config.h file was not included (class size mismatch).
                Always including config.h is good practice anyway.

              . Adapted all event handling to use SDL and tested it.
                Did not make any improvement, did not deteriorate
                functionalities either. To be true I did a small
                change : ESC now gets you out of the game, you don't
                need to SHIF-ESC although you could ;-) Made a single
                event handling loop (bound to prevent hanging
                snowballs if events flood) instead of multiple
                competing listener.  SDL event handling is less
                powerful than NeL 3d and does not provide this
                facility. Compensating this feature was
                straight-forward, though.

              . (A) and (B) see above

Attachment: patch-nelns.26
Description: Binary data


              . (A) and (B) see above

              . Fixed warnings

Loic   Dachary  address@hidden
12 bd  Magenta      address@hidden
75010    Paris         T: 33 1 42 45 07 97          address@hidden
        GPG Public Key:

reply via email to

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