Game Development Reference
In-Depth Information
The next section is labeled files , and this is where we list all the source code files
for our project. It is possible to split your source files up into different directories.
To make it easy, you simply put the directory name in brackets ( (source) in our
example) and then list all the source files in the directory below.
It is also possible to group the related files together into subsections, which we do
using square brackets ( [SourceCode] in our example). Any source files below this
will be added to that section and will then appear in a separate folder in the Visual
C++ Solution Explorer. There is no need for the directory and group names to match,
and indeed you can have more than one directory in a group if you so wish.
Finally we have the deployments section, which is where various settings are made
that control the process of deploying our application to different device types.
In our example we are making two settings. The name setting provides the filename
of our final executable and is also used in file and directory names created for us by
Marmalade, while caption sets the name that will appear under the application's
icon when installed on a device.
Both the aforementioned settings are examples of general settings that apply across
all device types, but there are also a great many other settings available, which are
specific to particular platforms, such as iOS or Android. A full list of these can be
found in the Marmalade Documentation help file that is installed as part of the
Marmalade SDK, and we'll also be looking at this in Chapter 8 , Supporting a Wide
Range of Devices , of this topic along with the additional sections of the MKB ile that
have not yet been shown for this example.
The use of whitespace in the MKB file is pretty much up to your own personal
preference. Though most of the Marmalade examples tend to indent entries within
blocks, tabs or spaces can also be used.
Comments can also be added using the hash ( # ) character. Everything after the
hash character till the end of the current line is then considered a comment.
The source file for the "Hello World" project
We may now use the MKB file for our project but we still can't do anything with
it yet, as we've told Marmalade that there is a source file called Main.cpp , which
doesn't exist yet. If we were to try and use the MKB file to build the project, we
would get an error reported about this missing file, so let's create it.
 
Search WWH ::




Custom Search