Re: [AD] dat2c ready for testing

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


> Also, a quick request for help: what the hell are trigraphs, and why is
> gcc complaining about finding them in the middle of string constants?

IIRC trigraphs are special sequences of characters beginning with "??" that
were introduced by the ANSI C standard to represent... <don't remember>.

> or are these changes related to your recent bugfix for dat2s?

Yes, exactly. We can't include any symbol from the library in compiled
datafiles in order for them to work under Windows. See the diff between the
latest revisions of src/datafile.c on the trunk.

> So I always made my programs handle Unix line endings. This is just a
> logical extension of that, although if you think it is too much then I can
> remove it.

Yes, I tend to think it's an overkill here. Let's keep the code as simple as
possible.

> OK, the issue here was that the demo crashed when drawing a BITMAP with
> blit (although not with scaled_blit) if I didn't call fixup_datafile().
> The bitmap was 8-bit. This could have been a coding mistake on my part.

Not directly. It's the constructor problem: even with the 4.0 codebase,
calling fixup_datafile() is mandatory for *every* BITMAP if constructors
aren't enabled (Allegro must set the correct selector for its BITMAPs).

> Also: should we support constructors? I almost went ahead and did this,
> but given that portable code will have to call fixup_datafile() anyway,
> to handle non-constructor platforms, I decided not to. This way, nobody
> can 'forget' the call. What does everybody think?

I think we should support them because of backward compatibility at the
source level between 4.0.x and 4.1.x

> > - getting rid of the '-d' option,
> > - changing the '-c' option into '-o',
> I think the letters are more logical and easy to remember the way they
> are, but if you feel strongly then I will change this.

'-o' is very meaningfull for all gcc users. Moreover, as datafiles are the
default input for the program, I think they shouldn't need an option to be
processed.

> > - using 'data' as the default suffix,
>
> Sorry, what do you mean? Do you mean the actual object names? (If dat2c
> currently outputs 'RLE_SPRITE obj_name' then should it output
> 'RLE_SPRITE obj_name_data' instead?).

It's related to the '-n' option. The default name should be PREFIX_data
instead of PREFIX_dat.

> Great, thanks for testing. I'll work on it a little bit, tidying a few
> things up, and then hopefully it will be ready for merging with
> Allegro.

The 4.1.1 WIP release will wait for it anyways.

-Eric




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