File: SCREEN.C | Size: 3,336 bytes | Download file | Back to directory listing | BWPOW's homepage
#include <allegro.h>
#include <tdgui.h>
#include "pp.h"
 
BITMAP *bmpa;
extern char vis_on;
 
void tdbox1(BITMAP *tdbmp,int x,int y,int w,int h,int t)
{
  int x1,y1;
  if(vis_on==0){
     tdbox(tdbmp,x,y,w,h,t);
     return;
  }
 
  if(t==6){
    for(x1=0;x1<w;x1+=128)
    for(y1=0;y1<w;y1+=128)
      blit(data_box,tdbmp,0,0,x1+x,y1+y,w-x1,h-y1);
  }
 
//  rect(tdbmp,x,y,x+w,y+h,0);
  if((t==1)||(t==5)) tdbox(tdbmp,x,y,w,h,t);
  if((t==2)||(t==6)) tdbox(tdbmp,x,y,w,h,2);
}
 
 
int ideazproc1(int msg,DIALOG *d,int c)
{
  if(msg==MSG_DRAW){
    show_mouse(0);
    tdbox1(screen,d->x,d->y,207,156,1);
    blit(data_ideaz,screen,0,0,d->x+2,d->y+2,205,154);
    show_mouse(screen);
  }
  return D_O_K;
}
int pplogoproc1(int msg,DIALOG *d,int c)
{
  if(msg==MSG_DRAW){
    show_mouse(0);
    tdbox1(screen,d->x,d->y,207,57,1);
    blit(data_pp,screen,0,0,d->x+2,d->y+2,205,55);
    show_mouse(screen);
  }
  return D_O_K;
}
 
static char *ctext[]={
"Programmer",
"SAMUEL KUPKA",
"of IdeaZ",
"",
"Library programmers",
"SHAWN HARGREAVES",
"ERIC VANNIER",
"JEAN-PAUL MIKKERS",
"DAN HUIZENGA",
"JEREMY PENNER",
"JOSHUA HEYER",
"TOMISLAV UZELAC",
"OVE KAAVEN",
"PETER WANG",
"",
"Special thanx to",
"MARIAN DVORSKY",
"JAROSLAV LIBAK",
"MARTIN PALKO",
"DANIEL REITZNER",
"and many others",
"",
"DJGPP author",
"DJ DELORIE",
"",
"RHIDE author",
"ROBERT HOHNE",
"",
"This is freeware.",
"If you like it, just",
"send me e-mail on:",
"kupkova@imrnov.saske.sk",
"or IdeaZ address",
"ideaz_soft@hotmail.com",
"",
"Snail-mail address:",
"Samuel Kupka",
"Csl. armady 31",
"04001 Kosice",
"Slovakia Europe",
"Tel: + 6233785",
"",
"IdeaZ 1999",
NULL
};//43
int c;
 
int ptim=0,potim=-1;
 
void atim()
{
  ptim++;
}
END_OF_FUNCTION(atim);
 
 
int aboutproc1(int msg,DIALOG *d,int cd)
{
  if((msg==MSG_DRAW)||(ptim!=potim)){
    if(ptim!=potim){
      potim=ptim;
      c++;
      if(c>430) c=-180;
    }
 
    show_mouse(0);
    blit(bmpa,screen,0,c,d->x,d->y,d->w,d->h);
    show_mouse(screen);
  }
  return D_O_K;
}
 
 
 
static DIALOG the_about[] =
{
   /* (dialog proc)     (x)   (y)   (w)   (h)   (fg)  (bg)  (key) (flags)  (d1)  (d2)  (dp) */
   { d_billwin_proc,   110,  120,   420, 240,     0,  0,    0,     0,       0,    0,    "About PacePlayer"},
 
   { ideazproc1,       115,  135,     0,   0,     0,  0,    0,     0,       0,    0,    0},
   { pplogoproc1,      115,  295,     0,   0,     0,  0,    0,     0,       0,    0,    0},
   { d_billbutton_proc,375,  330,   100,  15,     0,  0,    0,D_EXIT,       0,    0,    "OK"},
   { d_billctext_proc, 425,  135,     0,   0,     0,  0,    0,     0,       0,    0,    "PacePlayer 2.0.09beta"},
 
   { aboutproc1,       325,  145,   200, 180,     0,  0,    0,     0,       0,    0,    0},
   { NULL }  //14       //325
};
 
 
void about_it()
{
  int i;
  LOCK_FUNCTION(atim);
 
  bmpa=create_bitmap(200,610);
  clear_to_color(bmpa,makecol(bill_face.r,bill_face.g,bill_face.b));
  text_mode(-1);
  for(i=0;ctext[i];i++)
    textout_centre(bmpa,font,ctext[i],100,i*10,0);
  c=-180;
 
  install_int_ex(atim,BPS_TO_TIMER(5));
  moveable_do_dialog(the_about,-1);
  remove_int(atim);
 
  destroy_bitmap(bmpa);
 
  while(keypressed()==TRUE);
  clear_keybuf();
}