On Sunday, 17 September 2006 at 20:51, Dennis Schridde wrote:
> Am Sonntag, 17. September 2006 20:39 schrieb Christian Ohm:
> > On Sunday, 17 September 2006 at 12:29, Dennis Schridde wrote:
> > > And as you are changing types anyway: We don't want to use MS types,
> > > neither do we want to use stdint types. I think it is best if we only use
> > > SDL types whereever we need a fixed size or have API calls. Is it
> > > possible to take that into account in those patches or would that break
> > > yet again?
> >
> > Well, I have now used the type from lib/framework/types.h, for
> > consistency. We could change the typedefs in lib/framework/types.h to
> > use the SDL types, so the size of the integers is the same on all
> > platforms, but I wouldn't use them in the code (unless we change _all_
> > variables).
> Why not use SDL types where we write code and constantly change the other 
> types till we have only SDL types one day?

> Because if we define the MS types to SDL types and the SDL types are not 
> exactly what the MS types were, then ... b00m ...

(Question: Are the "MS types" you speak of the SDWORD etc.?)

If we redefine the types in .../types.h to the wrong size I am sure the
game will crash immediately, so we just need to fix the typedef to the
right size.

If we introduce different types gradually, the chance of a size mismatch
that remains undetected is significantly larger.

So I'd just redefine the .../types.h typedefs and keep those types in
the code. The only other alternative would be to remove those typedefs
altogether (ideally one by one to avoid mistakes) and change the code to
use SDL types everywhere. (I can do that, if you want.)

-- 
Extremism in the defense of liberty is no vice... moderation in the pursuit
of justice is no virtue.
                -- Barry Goldwater

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to