X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Ftest2.c;h=8fa3a4e2b80997c019cdc186a3762e6fe16795be;hb=d71e4ebbd3770b48eee2b2cc18288b97aad4e1e4;hp=5fae4d5071887823233dfc7771855a2887a850ec;hpb=e0335fc72d6856ec3df7a081281ebd8f36e3981d;p=16.git diff --git a/src/test2.c b/src/test2.c old mode 100644 new mode 100755 index 5fae4d50..8fa3a4e2 --- a/src/test2.c +++ b/src/test2.c @@ -1,34 +1,32 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include -#include +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include #include "src/lib/modex16.h" #include "src/lib/planar.h" //#include "src/lib/bitmap.h" -word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ - -void main() { +void main() { FILE *file; bitmap_t bmp; planar_buf_t *p; @@ -52,30 +50,30 @@ void main() { for(i=0; iheight; y++) { - for(x=0; x < p->pwidth; x++) { - printf("%02X ", (int) p->plane[plane][i++]); - } - printf("\n"); + /* print out the contents of each plane */ + for(plane=0; plane < 4; plane++) { + i=0; + printf("Plane %d\n", plane); + for(y=0; y < p->height; y++) { + for(x=0; x < p->pwidth; x++) { + printf("%02X ", (int) p->plane[plane][i++]); + } + printf("\n"); + } } - } - /*__asm - { - mov ah,31h - int 21h - }*/ - -// file = fopen("ptmp0.pcx", "wb"); + /*__asm + { + mov ah,31h + int 21h + }*/ + +// file = fopen("ptmp0.pcx", "wb"); /* write the data to the file */ //fwrite(p, 1, p->width*p->height, file);