Motorola C370 Series Technical Manual page 50

J2me developer guide
Hide thumbs Also See for C370 Series:
Table of Contents

Advertisement

multiple of the tile width. The height of the source image must be an integer multiple
of the tile height.
The tiles in the source image will have indices as follows:
The static tiles are indexed like words are read on a page; left-to-right, then top-to-
bottom. The top-left tile is assigned index 1. If there is a tile to its right, this tile is
assigned index 2, and so on, across the first row of tiles. If there is a second row of
tiles, the index of the left-most tile in this row is one greater than the right-most tile in
the preceding row. The table below is a diagrammatic depiction:
1
N+1
2N+1
. . .
[(M – 1) *
[(M-1) * N )] + 2
N]+1
So the total number of tiles is M * N, where:
N = (image width) / (tile width);
M = (image height) / (tile height).
The indices for the static tile set will be non-negative (>=0) and the indices for
animated tiles will be negative (<0). The index sets do not overlap and therefore
indices for static and animated tiles can be used interchangeably in the methods that
set or move the contents of the
if the image used in creation were cached. If a mutable image is used to create the
tiles, the tiles' appearances should not reflect changes to the mutable source image.
The appearance of individual static tiles can be changed with
setStaticTileImage(). The entire static tile set can be changed using
setStaticTileSet(). These methods should be used sparingly since they
are both memory and time consuming.
PlayField (
int columns, int rows, int cellWidth,
throws IllegalArgumentException
int cellHeight)
without a tile set. The parameter are the following:
PlayField
- width of the PlayField in number of cells;
columns
- height of the PlayField in number of cells;
rows
- Pixel width of each cell;
cellWidth
- Pixel height of each cell.
cellHeight
It creates a new
PlayField
PlayField created with this constructor will not have any tiles (animated or static)
associated with it. The primary use of a
as a container for managing sprites. The on-screen pixel dimensions of cells is
defined by the parameters
2
N + 2
2N + 2
. . .
cells. The static Tile set shall behave as
PlayField
,
cells high and
rows
PlayField
and
cellWidth
cellHeight
. . .
N
. . .
2N
. . .
. . .
. . .
. . .
(M * N )
Creates a new
-
cells wide. A
columns
without tiles is expected to be
. The cells in the

Advertisement

Table of Contents
loading

This manual is also suitable for:

C450 seriesC550 series

Table of Contents