icon.c

00001 /***************************************************************************
00002                           icon.c  -  description
00003                              -------------------
00004     begin                : Sun Feb 8 2004
00005     copyright            : (C) 2004 by Dynacube Team
00006     email                : 
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018  #include "gui/components/icon.h"
00019 
00020 
00021   COLOR folder[ICON_HEIGHT][ICON_WIDTH] = {
00022 
00023   {0,0,0,0,0,0,0,0,0,0,0,0},
00024   {0,0,0,0,0,0,0,0,0,0,0,0},
00025   {0,0,0,0,0,0,0,0,0,0,0,0},
00026   {0,0,0,0,0,0xFF,0xFF,0,0,0,0,0},
00027   {0,0,0,0,0,0xFF,0xFF,0xFF,0xFF,0,0,0},
00028   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
00029   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
00030   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
00031   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
00032   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
00033   {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, 
00034   {0,0,0,0,0,0,0,0,0,0,0,0}
00035 
00036   };
00037 
00038 
00039   COLOR file[ICON_HEIGHT][ICON_WIDTH];
00040 
00041   void drawIcon(DW x, DW y, COLOR *icon_ptr)
00042   {
00043     DW i, j;
00044     for(i = 0; i < ICON_WIDTH ; i++)
00045     {
00046       for(j = 0 ; j < ICON_HEIGHT ; j++)
00047       {
00048         if(*(COLOR*)((COLOR*)icon_ptr+j*ICON_WIDTH+i))
00049           setPixel(x+i,y+j,*(COLOR*)((COLOR*)icon_ptr+j*ICON_WIDTH+i));
00050       }
00051     }
00052   }   

Generated on Thu Jul 27 23:52:26 2006 for Dynacube by  doxygen 1.4.7