All pastes #136952 Raw Edit

Something

public c v1 · immutable
#136952 ·published 2006-08-18 01:20 UTC
rendered paste body
//iZilla ported to SDL for the windows desktop./* Website: www.ipodlinux.org/izilla *//*Numerous bug fixes by magician13134 (Thanks!)*//* * Copyright (C) 2006 Mike Sweeney (ichaelmay8) * * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include <stdio.h>#include <dirent.h>#include "ttk.h"#define OPEN 1#define CLOSED 2entern void text_input_demo(void);extern void toolbar_stuff(void);extern void izilla_events();extern void izilla_graphics(void);extern void eek_physics(void);extern void helpintro(void);extern void filebrowser(void);extern void screensaver(void);//Featuring...The starfield screensaver, and... the flying toaster screensaver(Not in yet :-( )!/*Screensaver stuff*/static int chosen_screensaver=2;int exit_screensaver=0;/*FLAGS*/int dropdownbar=0;//0=collapsed, 1=expandedint help_window=CLOSED;int backgrounds_window=CLOSED;int mouse_window=CLOSED;int reload_theme;int quit=0;int window=0;int loading=1;int podpoolopen=CLOSED;int click;int newuser=1;int move_backgrounds_window=0;int theme_wanted=1;int usingpreassigned=0;/*END FLAGS*/int selected_background=2;int sel_ppat=1;/*COORDINATES*/int battery_x=270;int battery_y=160;int cursor_x=187;int cursor_y=50;/*END COORDINATES*//*MOUSE STUFF*/int curs_up_change;int curs_down_change;int curs_left_change;int curs_right_change;int curs_up_pushed;int curs_down_pushed;int curs_left_pushed;int curs_right_pushed;int curs_speed=1;//-----------------------------------//TTK StuffTWindow *win;ttk_surface srf, startup_image;int *w, *h, *bpp;int main(int argc, char *argv[]){    FILE *settings;	win = ttk_init();	ttk_window_hide_header(win);	ttk_window_title(win, "iZilla");	ttk_get_screensize(w, h, bpp);	srf = ttk_new_surface(w, h, bpp);        settings = fopen("settings.inx", "r");        fscanf(settings, "%i", &newuser);    fscanf(settings, "%i", &sel_ppat);    fscanf(settings, "%i", &theme_wanted);    fscanf(settings, "%i", &chosen_screensaver);    fscanf(settings, "%i", &usingpreassigned);    fclose(settings);    	sleep(1000);    while(quit!=1)    {                                    exit_screensaver=0;                  if(newuser==1)                  {                                //helpintro();                                newuser=0;                  }                                    if(reload_theme==1)                  {                                     loading=1;                  }                                    izilla_graphics();                  //toolbar_stuff();                  //izilla_events();	}	return 0;}void izilla_graphics(void){	if(loading==1)	{		startup_image=ttk_load_image("startup_screen.bmp");		ttk_blit_image(win->srf, startup_image, 0,0);		ttk_draw_window(win);	}	sleep(1000);}