[Scummvm-devel] Calling all Beta Testers and Port Maintainers.

Marcus Comstedt marcus at mc.pp.se
Tue Apr 16 13:03:35 CEST 2002


Lionel Ulmer <lionel.ulmer at free.fr> writes:

> Well, modified as long as there are no 'configure' script or way to properly
> give build parameters to the Makefile :-)

I have a special Makefile for Dreamcast in the dc/ directory.  So
cd:ing to dc/ and running make should be enough.  At least it used to be.
:-)


> > The best solution would probably be to factor out the different
> > functionality from gameDetector.cpp into separate files (classes?) so
> > that platform specific GameDetectors can be created.
> 
> Well, whatever.... Please code it if you feel so badly about 3 #ifdefs in
> the gameDetetector.cpp file.

Well, most of the stuff in gameDetector doesn't make sense for
Dreamcast anyway, since I don't have a command line to parse.  So I
think it would be cleaner if I made a new GameDetector and just reused
the detectGame() code (as it would be bad to duplicate the
version_settings[] array).



> My point was just that you will ALWAYS have an #ifdef somewhere in the code
> to choose the default driver, not discussing the soundness of the current
> design (did not really look at it yet).

Yes, or use a different sourcefile.  Yeah, I've looked at it.  The
thing is that previously stuff was mainly cleanly divided into
platform-independent files (which was really platform independent and
did not contain many #ifdefs at all), and platform-specific files
(like sdl.cpp) that contained only things that would need to be
reimplemented for each port anyway.

gameDetector.cpp now seems to fall somewhere in between, as it
contains both platform-independent code (detectGame()) and
platform-dependent code (createSystem() etc, which would require a lot
of #ifdef to work on every system).  I'd like to see some refactoring
here so that we get back to the clean split.

But if the others feel that having a lot of #ifdef __DC__ (and #ifdef
other stuff as well) in gameDetector.cpp is better, I'm not going to
push the matter.  Both variants work.  And it's only one file that
gets #ifdef-bombed, so no biggie.


   // Marcus






More information about the Scummvm-devel mailing list