Home arrow News arrow Latest arrow First steps to moddability are working...
Newsflash

First steps to moddability are working... PDF Print E-mail
Written by Stefan Hendriks   
Monday, 04 June 2007
I've accomplished the following in the engine:
- define your own surfaces
- define your own color keys (ie for transparency)
- load them, link them , draw them.

In short:
- i have loaded up my mouse, with a purple key i do not want to draw as background
- i define a colorkey , with the proper RGB values and name it CC_DEFAULT
- i have set the colorkey in my mouse surface as CC_DEFAULT so it points to my just defined colorkey

The engine does the rest. Read more if you want to know the XML structure.
I've accomplished the following in the engine:
- define your own surfaces
- define your own color keys (ie for transparency)
- load them, link them , draw them.

In short:
- i have loaded up my mouse, with a purple key i do not want to draw as background
- i define a colorkey , with the proper RGB values and name it CC_DEFAULT
- i have set the colorkey in my mouse surface as CC_DEFAULT so it points to my just defined colorkey

The engine does the rest.

The XML looks like this:
<?xml version="1.0" standalone="no"?>
<resources>
    <!-- MME -->
    <surfaces>
        <!-- mouse -->
        <surface path="data/mouse.bmp" id="BMP_MOUSE" ckey="CC_DEFAULT"/>
            </surfaces>
    <!-- GDB -->
    <!-- color keys are needed for transparant surfaces -->
    <colorkeys>
        <!-- default colorkey is PURPLE -->
        <colorkey id="CC_DEFAULT">
            <red>255</red>
            <green>0</green>
            <blue>255</blue>
        </colorkey>
    </colorkeys>
    <!-- MME -->
    <sounds>
        <sound path="" id=""/>
    </sounds>
    <music>
        <music path="" id="" type=""/>
    </music>
</resources>

Interesting huh? This opens doors to add your own graphics to the engine more easily, without any programming knowledge.
< Prev   Next >
Copyright 2000 - 2005 Miro International Pty Ltd. All rights reserved.
Mambo is Free Software released under the GNU/GPL License.