[AD] Patch fixing many things

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


Those of you on the allegro list heard about my conversion problems.  I've 
managed to fix that.  Okay I've made a LOT of changes in the last 3 hours. 
I'll give a summary:

The fixup_datafile function had a bug that did NOT properly initalize 
datafiles nested inside of datafiles.  _construct_datafile handles this 
properly.  I fixed this bug, and my game then worked.

_construct_datafile function is not nessacary for loaded datafiles, but 
under Windows it didn't break the code either.  Either ways it wasn't meant 
to be called on loaded datafiles.  So I did the following:

Created a new function convert_datafile that works just like fixup_datafile 
but on loaded datafiles, to be called when one wishes to load the datafile 
before setting the video mode, or if the video mode is changed later and 
the user wants to convert the datafile to the new format.

To do this I created a helper function called _do_datafile_fixup.  
fixup_datafile calls this + _construct_datafile and convert_datafile calls 
just _do_datafile_fixup.  I also changed alintern.h to reflect this change. 
 I also changed allegro.h to add the convert_datafile function.  I also 
changed allegro._tx to properly document the new function.

There have also been some warnings in Allegro for quite sometime in the 
functions setup.c, modesel.c, and datgrid.c and since I was on a roll I 
decided to fix them.  (They were because a function needed to be casted to 
a void* in a dialog array).  These fixes are also included in this patch, 
and now Allegro compiles on my system with no warnings or errors.

Since this is my first time working on the internal Allegro let me know if 
I need to do something different.  There are some indenting problems in 
fixup_datafile and _construct_datafile that were already there and I just 
left those.  I followed the same style standards for all of the other code 
I saw for the code that I wrote in both the C files and in the ._tx file.

Gillius
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  gillius.diff
     Date:  31 Mar 2001, 16:52
     Size:  8944 bytes.
     Type:  Unknown

Attachment: gillius.diff
Description: Binary data



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