File: README.themes

package info (click to toggle)
bomber 4:18.04.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 2,664 kB
  • sloc: cpp: 1,220; xml: 191; makefile: 5; sh: 4
file content (90 lines) | stat: -rw-r--r-- 4,093 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
THEMES IN BOMBER
----------------

This file explains the format of the themes used by bomber.

For each theme in Bomber their is a "*.desktop" file in the area
kdegames/Bomber/themes in the KDE SVN source-code repository, or in the
area $HOME/.kde/share/apps/Bomber/themes, the user's local data area. If 
two *.desktop files have the same name, the one in the local area takes
precedence.

Files in the SVN area are released and installed with Bomber.  Files in
the local area can be used for development and testing of themes or for holding
downloaded and copied themes, whatever the method of transfer or copying.  One
of the theme files is called "default.desktop".  That theme is used whenever
the game runs for the first time for a particular user.  On subsequent
occasions the last-used theme is loaded.

Each *.desktop file must start with the "group" line, which says
[KGameTheme].  There must also be a line which gives the name of the theme
(e.g. Name=Foo Bar).  That line gets picked up and translated into various
languages.  Some other standard (but optional) lines are: 
Description=...,
FileName=...,
Author=..., 
AuthorEmail=...  and 
VersionFormat=...
A line can also be added to display a preview of the theme in the GUI, such as
Preview=foobar.png. This will display the foobar.png found next to the *.desktop
file in the GUI when selecting the theme.

SVG THEMES
----------

SVG themes are the standard for Bomber. All the in game objects in Bomber are 
themeable though the SVG themes. The *.desktop file must contain a FileName=xxxx 
line, that contains the filename   in witch the SVG graphics for the game 
objects are stored. The filenames must end in .svg or .svgz and the file must 
be in or relative to the same folder as the *.desktop file.

Example, theme-file "default.desktop":
[KGameTheme]
VersionFormat=1
Name=Default
Name[gl]=Predeterminado
Name[it]=Predefinito
Name[wa]=Prémetou
FileName=default_theme.svg
Author=John-Paul Stanford
AuthorEmail=jp@stanwood.org.uk
Preview=default_preview.png

Note that Name and Description have been translated. 

SVG ELEMENTS
------------

The elements in the SVG file must have standard names, corresponding to their
role in the Bomber game.  Each element should be set in a rectangle space.  
The size of the element will change depending on the size of game window. The 
tiles are resized so that game area is 12 tiles wide and 20 tiles high.
The elements are:
	background		The game area background
	building_s_v	A tile used to make up the body of a building. (s = style
					of building (0...x), v=variant of the tile (0..x))
	bomb_n			A set of frames bomb's dropped from the plane 
	                (n = frame number (0...x))
	bomb_explode_n	The explosion when a bomb hits a building
	plane_n			A set of frames for the plane
	                (n = frame number (0...x))
	plane_explode_n	A set of frames for the explosion when a plane crashes into 
	                a building. (n = frame number (0...x))
	roof_s_v		A tile used for the roof of buildings. (s = style of 
	                building (0...x), v=variant of the tile (0..x))

The background element is not tiled like the others.  It will be displayed
behind the other elements and scaled fill the game area.  It could be stretched
further in either direction, at the user's whim, and will always fill the 
central widget.  The actual play-area will always be 12 x 20 tiles.

The tiles (bomb_n, plane_n,bomb_explode_n and plane_explode_n) all can be 
animated. The n in the objects id should be replaced with the number of the
frames. A frame set can have as many frames as the theme creator wishes, but
they should be numbered sequentially starting from 0. For example "bomb_0, bomb_1, bomb_2"
would greate a set of frames for the bomb with 3 frames. 

The building tiles (building_s_v and roof_s_v) do not have frames, but instead
thet have styles (s) and variant's (v). A building is made up from multiple tiles 
all having the same style. However the building can also have variant's of it's
tile to make each tile in a single building slight different.