System call sys_getchar () was improved; stdin is correspond with 0. fd and stdout...
[ZeXOS.git] / apps / zde / bg.c
blob907969abdbf6ae72a972fcf500e076197a2669f6
1 /*
2 * ZeX/OS
3 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include <fcntl.h>
21 #include <stdio.h>
22 #include <string.h>
23 #include <stdlib.h>
24 #include <pthread.h>
25 #include <libx/base.h>
26 #include <libx/object.h>
27 #include <libx/image.h>
28 #include <libx/cursor.h>
29 #include <libx/text.h>
31 #include "bg.h"
33 int draw_background ()
35 unsigned p = 0;
36 unsigned x = 0;
37 unsigned y = 0;
39 for (p = 0; p < 800*600; p ++) {
40 xpixel ((unsigned) x, (unsigned) y, p/32768);
42 x ++;
44 if (x >= 800) {
45 x = 0;
46 y ++;
50 return 1;
53 int init_background ()
56 return 0;