| version 1.2, 2002/11/10 16:58:30 |
version 1.3, 2002/11/30 19:38:09 |
|
|
| #include <stdio.h> |
#include <stdio.h> |
| #include <stdlib.h> |
#include <stdlib.h> |
| #include <string.h> |
#include <string.h> |
| |
#include <unistd.h> |
| #include <vga.h> |
#include <vga.h> |
| #include <vgagl.h> |
#include <vgagl.h> |
| |
|
|
|
| |
|
| void render(void) |
void render(void) |
| { |
{ |
| char *content,*txt; |
char *content,*txtstart,*txtend; |
| struct page *page; |
struct page *page; |
| fill_page(page_tree[current_page]); |
int x = 10,y = 10; |
| page = object[page_tree[current_page]]->parsed; |
/* fill_page(page_tree[current_page]);*/ |
| content = (char *) calloc(page->contents->length << 2,1); |
/* page = object[page_tree[current_page]]->parsed;*/ |
| |
page = (struct page *) get_object(page_tree[current_page],NULL); |
| |
content = (char *) calloc(100000,1); |
| gl_setfont(8, 8, gl_font8x8); |
gl_setfont(8, 8, gl_font8x8); |
| gl_setwritemode(FONT_COMPRESSED + WRITEMODE_OVERWRITE); |
gl_setwritemode(FONT_COMPRESSED + WRITEMODE_OVERWRITE); |
| gl_setfontcolors(0, vga_white()); |
gl_setfontcolors(0xFFFFFFFF, 0); |
| filter(page->contents->filter,page->contents->stream, |
filter(page->contents->filter,page->contents->stream, |
| page->contents->length,content,page->contents->length << 2); |
page->contents->length,content,100000); |
| txt = content = strstr(content,"("); |
txtend = content + 1500; |
| /* while(content) { |
for(txtstart = content;txtstart < txtend;txtstart++) { |
| while(*txt != ')') txt++;*/ |
if(*txtstart == '\0') |
| gl_write(300,400,"Test test test ToTo je t3st\0"); |
continue; |
| txt = content = strstr(content + 1,"("); |
while(*txtstart != '(') txtstart++; |
| |
txtstart++; |
| |
while(*txtstart != ')') { |
| |
gl_writen(x,y,sizeof(char),txtstart); |
| |
x += 10; |
| |
if(x % 790 == 0) { |
| |
y += 10; |
| |
x = 10; |
| |
} |
| |
if(y % 590 == 0) |
| |
y = 10; |
| |
txtstart++; |
| gl_copyscreen(physicalscreen); |
gl_copyscreen(physicalscreen); |
| /* }*/ |
usleep(1000); |
| pause(); |
} |
| |
} |
| |
/* } |
| |
}*/ |
| |
sleep(30); |
| exit(0); |
exit(0); |
| } |
} |