freesci-develop
[Top][All Lists]
Advanced

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

Re: [freesci-develop] Making FreeSCI code C++ friendly


From: Christoph Reichenbach
Subject: Re: [freesci-develop] Making FreeSCI code C++ friendly
Date: Sat, 3 Mar 2007 20:40:51 -0700
User-agent: Mutt/1.5.9i

Jordi,

On Fri, Mar 02, 2007 at 12:40:21AM +0100, Jordi Vilalta wrote:
> I wrote a few months ago asking about the possibility of merging
> FreeSCI into ScummVM. Last week I finally begun working on it, and the
> first step has been making the FreeSCI code almost compile with a C++
> compiler.

  Which parts are missing?

  By the way, while any attempt to clean up the source code is appreciated,
I'm not sure how much of this is strictly neccessary-- most languages,
including C++, can link against C object files without too much trouble.
Since the bulk of FreeSCI (specifically the VM, the kernel calls, and the SCI
resource management) won't be able to take advantage of any ScummVM facilities
anyway, you may be able to (temporarily) save yourself the trouble of porting
that.

> The attached patch includes the modifications needed to make the code
> C++ friendly without breaking C compatibility (I had to remove a few
> modifications). Most of the changes are explicit type casts, function
> declarations and substitution of C++ keyword used as variable names.

  I'm afraid that I couldn't see the patch; it was probably stripped by our
mailing list management software.  Could you put it somewhere where people can
review it or send it to Lars and me in a separate e-mail, please?

> Let me know if you prefer another way to solve some of the patched
> issues (creating new include files for missing function headers
> instead of inline declaration, different spacing for type casts,
> etc.).

  I'll see what I can do for feedback.

> Also let me know if you're not interested at all in merging this kind
> of stuff in mainline FreeSCI. I think it's interesting to maintain
> FreeSCI as near to this merge as possible in order not to create a
> complete fork.

  I haven't seen your patch, but it should be possible to make FreeSCI ``play
nice with'' ScummVM in all the interesting respects (sound subsystem reuse,
gfx subsystem reuse) without too many changes to its guts.

  While you are, of course, free to do whatever you find appropriate, I'd
recommend that you try to focus on getting FreeSCI to use ScummVM's sound
and/or gfx subsystems:  Since both FreeSCI and ScummVM already have plenty of
abstraction in place to make those things pluggable, this part should be
easier (and more rewarding to yourself) than adapting SCI-specific parts of
FreeSCI whose semantics you are less likely to be familiar with to a different
programming language.


-- Christoph




reply via email to

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