Tehniline kokkuvõte

KTuberlingi Käsiraamat
Eelmine |  | Järgmine

# Peatükk 4. Tehniline kokkuvõte

# 4.1. Graafikutele

KTuberling lubab graafilises välimuses mitmeid muudatusi: mänguvälja suurus ja kuju, sellel liigutatavate objektide arv, nende suurus ja nende kuuluvuse kategooria on võimalik ümber defineerida. Vaid erinevate gruppide nimetusi (ninad,silmad,...) pole võimalik muuta. Samuti pole võimalik muuta objektidega seotud helisid.

Pildid asuvad 'pics' kataloogis. On kaks pilti, mis on nimetatud 'gameboard.xpm' ja 'masks.xpm'. Esimeses sisaldub mänguväli ja sõrestik , kust kasutaja saab objekte valida. 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.

Eelmine | Koju | Järgmine
Klaviatuurikasutus |  | For translators