The K Desktop Environment

Chapter 4. Technical reference

4.1. For graphists

KTuberling allows many changes in the graphical appearance: the gamebard's size and shape, the number of objects that can be moved onto it, their size and the category they belong to can be redefined. But the labels of the various groups of objects (noses, eyes, goodies...) can't be changed. Neither can the sounds associated to objects be changed.

The pictures are located in the 'pics' directory. There are two pictures, named 'gameboard.xpm' and the other one 'masks.xpm'. The first one holds the gameboard and the grid where the user can pick objects. The second one contains the masks of those pictures, used to delimitate their borders and, sometimes, to give them some transparency (spectacles). There is also a text file in this directory, named 'layout.txt'. One can find there - and change - all information related to the positions of the pictures and masks of objects, define new objects, and assign sounds to objects. The program needs not beeing recompiled when changing the number and position of objects.

Here comes the structure of layout.txt. It only contains integer numbers in decimal form, separated by whitespace, and followed by comments. The comments are ignored.

The first line describes the area (gameboard) where objects can be dropped to. The first four numbers indicate the position of the 'landing area' (left, top, right, bottom), whereas the fifth number indicates the sound associated with it (defined in source file 'categories.h').

The second line indicates the number of texts that follow on the next lines. Those texts cannot be modified, but they can be drawn somewhere else on the gameboard.

The next lines describe the position of the texts describing the categories of objects, one text per line. The first four numbers indicate the position of the text (left, top, right, bottom), whereas the fifth number indicates the number of the text to draw (defined in source file 'categories.h').

Then comes the number of objects described in the next lines. Change this number if you want to add or remove objects.

The last lines describe the position of the pictures (in 'gameboard.xpm') and masks (in 'masks.xpm') of the objects, and the sound associated with them. The first four numbers are the coordinates of the rectangle (left, top, bottom, right) of the picture, the next four one are the coordinates of the rectangle (same order) of the mask, and the last one is the sound number (defined in source file 'categories.h'). Several objects can be associated with the same sound.