X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Ftinyptc%2Ftest.c;fp=bigscreen%2Ftinyptc%2Ftest.c;h=0000000000000000000000000000000000000000;hp=2b28c70b1885774c0e28897d5c211ec180a2140d;hb=478ab340150034e545e3ed551ff068607d49d35b;hpb=8596d4aa3654710fb225c08c4d7235b74362561e diff --git a/bigscreen/tinyptc/test.c b/bigscreen/tinyptc/test.c deleted file mode 100644 index 2b28c70..0000000 --- a/bigscreen/tinyptc/test.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * TinyPTC x11 v0.7.3 Example file - * Copyright (C) 2001-2002 Alessandro Gatti - * Copyright (C) 2000-2001 Glenn Fiedler - * - * http://www.sourceforge.net/projects/tinyptc/ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "tinyptc.h" - -#include - -#define WIDTH 800 -#define HEIGHT 600 -#define SIZE WIDTH*HEIGHT - -static int noise; -static int carry; -static int counter; -static int seed = 0x12345; -static int pixel[SIZE]; - -void -ptc_cleanup_callback (void) -{ - fprintf (stderr, "Callback!\n"); -} - -int -main () -{ - if (!ptc_open ("test", WIDTH, HEIGHT)) - return 1; - for (;;) - { - for (counter = 0; counter < SIZE; counter++) - { - noise = seed; - noise >>= 3; - noise ^= seed; - carry = noise & 1; - noise >>= 1; - seed >>= 1; - seed |= (carry << 30); - noise &= 0xFF; - pixel[counter] = (noise << 16) | (noise << 8) | noise; - } - ptc_update (pixel); - } - ptc_close (); - return 0; -}