Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1117 → Rev 1448

/demos/trunk/bca/bca_lib.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: bca_lib.c,v 1.3 2002-11-11 08:15:13 pj Exp $ */
/* CVS : $Id: bca_lib.c,v 1.4 2004-05-23 08:59:27 giacomo Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
53,8 → 53,9
 
// *** Librerie S.Ha.R.K ***
#include<kernel/kern.h>
#include<drivers/glib.h>
#include<drivers/gd.h>
 
#include<drivers/shark_fb26.h>
 
// *** Librerie Standard C ***
// *** Librerie FAB ***
#include"fab_lib/fab_msg.h"
92,25 → 93,6
void kern_free_task_tables(); // richiede DISABLED_INTERUPTS
void kern_set_task_tables(); // consigliato in __kernel_register-levels__()
 
// *** Corpo delle funzioni in CA.h *** //
void kern_init_bca()
{
FAB_clr();
FAB_show_sched_modules();
 
kern_alloc_task_tables();
kern_set_task_tables();
 
kern_alloc_borders();
kern_set_borders();
kern_alloc_images();
kern_load_images();
kern_alloc_frames();
kern_set_frames();
kern_alloc_ballframes();
kern_set_ballframes();
}
 
void kern_alloc_task_tables()
{
int test=0,j;
120,7 → 102,7
aereo_table[j].image=FAB_image_alloc(AEREO_LX,AEREO_LY);
if(aereo_table[j].image==NULL) test=1;
}
FAB_msg(test,NULL,"fatto","almeno un elemento della tabella non allocato");
FAB_msg(test,"fatto","almeno un elemento della tabella non allocato");
}
void kern_free_task_tables()
{ int j;
155,7 → 137,7
ballframe_lucerossa[j] = FAB_ballframe_alloc();
if (ballframe_lucerossa[j]==NULL) test=1;
}
FAB_msg(test,NULL,"fatto","almeno un ballframe non allocato");
FAB_msg(test,"fatto","almeno un ballframe non allocato");
}
void kern_free_ballframes()
{ int j;
197,7 → 179,7
frame_control = FAB_frame_alloc();
if (frame_control==NULL) test=1;
 
FAB_msg(test,NULL,"fatto","almeno un frame non allocato");
FAB_msg(test,"fatto","almeno un frame non allocato");
}
void kern_free_frames()
{
245,7 → 227,7
border_giallo7 = FAB_border_alloc(7);
if (border_giallo7==NULL) test=1;
 
FAB_msg(test,NULL,"fatto","almeno un bordo non allocato");
FAB_msg(test,"fatto","almeno un bordo non allocato");
}
void kern_free_borders()
{
334,7 → 316,7
image_bca = FAB_image_alloc(500,500);
if (image_bca==NULL) test=1;
 
FAB_msg(test,NULL,"fatto","almeno un'immagine non allocata");
FAB_msg(test,"fatto","almeno un'immagine non allocata");
}
void kern_free_images()
{
405,9 → 387,26
if(FAB_image_load(image_bca,"BCA_raw/bca.raw")==-1) test=1;
FAB_image_no_trasparent_set(image_bca);
 
FAB_msg(test,NULL,"fatto","almeno un file non esiste oppure ha un formato incompatibile");
FAB_msg(test,"fatto","almeno un file non esiste oppure ha un formato incompatibile");
}
 
// *** Corpo delle funzioni in CA.h *** //
void kern_init_bca()
{
FAB_clr();
kern_alloc_task_tables();
kern_set_task_tables();
kern_alloc_borders();
kern_set_borders();
kern_alloc_images();
kern_load_images();
kern_alloc_frames();
kern_set_frames();
kern_alloc_ballframes();
kern_set_ballframes();
}
 
//----------------------END--------------------------
#endif