Subversion Repositories Kolibri OS

Rev

Rev 7154 | Rev 7156 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7154 Rev 7155
Line 1... Line 1...
1
struct _colors
1
struct _image
2
{
2
{
Line 3... Line 3...
3
 
3
 
4
	unsigned rows, columns;
4
	unsigned rows, columns;
5
	dword mas[32*32];
5
	dword mas[32*32];
-
 
6
	dword img;
6
	dword img;
7
	void create();
7
	void set_pixel();
8
	void set_pixel();
8
	dword get_pixel();
9
	dword get_pixel();
9
	dword get_image();
10
	dword get_image();
10
	void move();
11
	void move();
Line -... Line 12...
-
 
12
};
-
 
13
 
-
 
14
void _image::create(int _rows, _columns)
-
 
15
{
-
 
16
	int i;
-
 
17
	rows = _rows;
-
 
18
	columns = _columns;
-
 
19
	for (i = 0; i < columns*rows; i++) mas[i]=0xBFCAD2;
11
};
20
}
12
 
21
 
13
void _colors::set_pixel(int _r, _c, _color)
22
void _image::set_pixel(int _r, _c, _color)
14
{
23
{
Line 15... Line 24...
15
	mas[columns*_r + _c] = _color;
24
	mas[columns*_r + _c] = _color;
16
}
25
}
17
 
26
 
18
dword _colors::get_pixel(int _r, _c)
27
dword _image::get_pixel(int _r, _c)
Line 19... Line 28...
19
{
28
{
20
	return mas[columns*_r + _c];
29
	return mas[columns*_r + _c];
21
}
30
}
22
 
31
 
Line 23... Line 32...
23
dword _colors::get_image()
32
dword _image::get_image()
Line 49... Line 58...
49
	MOVE_DOWN,
58
	MOVE_DOWN,
50
	FLIP_VER,
59
	FLIP_VER,
51
	FLIP_HOR,
60
	FLIP_HOR,
52
	ROTE
61
	ROTE
53
};
62
};
54
void _colors::move(int _direction)
63
void _image::move(int _direction)
55
{
64
{
56
	int r, c;
65
	int r, c;
57
	dword first_element_data;
66
	dword first_element_data;
Line 58... Line 67...
58
 
67