CVSROOT:        /home/cvs
Module name:    freesci
Changes by:     cvsuser 00/10/25 09:31:17

Modified files:
        .              : TODO aclocal.m4 config.h configure configure.in 
        doc            : sci.sgml 
        src            : Makefile.am config.c config.l main.c 
        src/engine     : game.c kevent.c kgraphics.c kmenu.c kscripts.c 
                         savegame.c scriptdebug.c 
        src/include    : Makefile.am engine.h menubar.h resource.h 
                         sci_conf.h uinput.h 
        src/scicore    : Makefile.am console.c tools.c 
        src/sound      : Makefile.am 
        src/tools      : Makefile.am 
Added files:
        src/gfx        : Makefile.am font.c gfx_crossblit.c 
                         gfx_pixmap_scale.c gfx_resource.c gfx_support.c 
                         gfx_test.c gfx_tools.c menubar.c operations.c 
                         resmgr.c sbtree.c sci_widgets.c widgets.c 
                         wrapper.c 
        src/gfx/drivers: Makefile.am ggi_driver.c 
        src/gfx/resource: Makefile.am sci_cursor_0.c sci_font.c 
                          sci_pal_1.c sci_pic_0.c sci_resmgr.c 
                          sci_view_0.c sci_view_1.c 
        src/include    : gfx_driver.h gfx_drivers_list.h 
                         gfx_operations.h gfx_options.h gfx_resmgr.h 
                         gfx_resource.h gfx_state.h gfx_state_internal.h 
                         gfx_system.h gfx_tools.h sci_widgets.h 

Log message:
* Added new GFX subsystem

WARNING: This stuff is far from having been merged in completely. ATM,
only the GGI driver is supported (and I'm not sure whether it works
correctly in color index mode, nor have I tested it on any other
platforms/compilers). At last count, there were 48 'fixme!' warnings in
the code, plus a few new TODO items. Also, some slight architectural
changes still need to happen to the widget subsystem, and some of the
more recent bugs (missing updates, new pics being visible too early)
need to be taken care of, too.

Stuff that has been completely disabled:
- Savegames
- Tools

A quick overview of the new system:

The new graphics subsystem resides in the src/gfx/ subdir. The old
src/graphics subsystem has been removed (mostly to avoid collisions in
Makefiles, CVS, etc.).
All relevant header files (in src/include/) are prefixed with gfx_,
except for sci_widgets.h, which adds new factory functions for widgets
(implementation is in gfx/sci_widgets.c).
gfx_drivers.h documents the interface driver implementations need to
provide (note that I've removed the font stuff from earlier versions
and added several new flags, plus a 'version' variable).

All of the graphical operations invoked by kgraphics etc. will be
provided either by the widget set (gfx_state.h, gfx_state_internal.h-
I guess I should rename them), or by the operational layer
(gfx_operations.h, implementation in gfx/operations.c). These operations
invoke the driver, some utility functions from other files, and the
resource manager (gfx_resmgr.h, implementation in gfx/resmgr.c and
gfx/sci_resmgr.c (SCI-specific stuff)). Except for sci_resmgr.c,
no part of the operational layer and the driver layer underneath uses
anything specific to SCI or FreeSCI. (Please complain loudly if this
is wrong...). The widget subsystem architecture was designed with SCI in
mind, but, except for sci_widgets.[hc], it should be useable for other
stuff as well. (OK, actually, sci_widgets.c might be useful e.g. in an
AGI interpreter).

I probably should write some decent documentation for all this eventually.

Since it's now in CVS, I'll start writing changelog entries again.

Current problems I probably won't fix this week (for those who want to
help):
- on_control() needs to be implemented. gfx_state contains all relevant
information (this should be a function in the operational layer).
- main.c is a complete mess. Splitting it up in the various atomic
initialization parts is called for. Also, the GGI driver and its
default initialization are currently hardcoded, requiring code changes
if anything other than the default scale factors/color depth should be
used.
- pic loading needs to be fixed so that the new pic isn't displayed
as early as it is. Probably splitting things into a pic loading and
pic setting part (with the pic loader returning the pixmap so that
it can be used for transition animations) would be the best way to do
that.
- drivers. Right now, we only have a GGI driver.
Port maintainers: Please have a look at gfx_driver.h. If implementing this
seems to be too much work to you ATM, say so- it shouldn't be too hard to
implement a wrapper driver for the old GFX driver system.
(Note that there are some utility functions that might help you, have a look
at the GGI driver for examples). Please try to implement pixmap grabbing,
as it might become non-optional.
Use 'make check' to build src/gfx/gfx_test, a driver test program, which
tries to use most of the operational layer's functions (including the
resource manager stuff).

-- Christoph


Reply via email to