D:/Zythum/DinoKod/Bitmap/Bitmap.cpp

00001 //---------------------------------------------------------------------------------------------
00002 //      This file is a part of "DinoKod".
00003 //      Copyright © 2003 Dino Productions. All Rights Reserved.
00004 //      
00005 //      File                    : Bitmap.cpp
00006 //      Author                  : Sebastien LEIX        sebastien.leix@wanadoo.fr
00007 //      Date                    : 07/09/2002
00008 //      Modification    :
00009 //
00010 //---------------------------------------------------------------------------------------------
00011 #include "Common/Assert.h"
00012 #include "Bitmap/Bitmap.h"
00013 
00014 //---------------------------------------------------------------------------------------------------------------------
00015 KBitmap::KBitmap()
00016 : KFile()
00017 {
00018         m_Width         = 0;
00019         m_Height        = 0;
00020         m_Bpp           = 0;
00021         m_pBitmap       = NULL;
00022         m_bAlpha        = false;
00023 }
00024 
00025 //---------------------------------------------------------------------------------------------------------------------
00026 KBitmap::~KBitmap()
00027 {
00028         if( m_pBitmap )
00029                 Deletev( m_pBitmap );
00030 }
00031 
00032 //---------------------------------------------------------------------------------------------------------------------
00033 KRgba KBitmap::GetPixel( u32 x, u32 y )
00034 {
00035         KASSERT( m_Bpp == 32 ); // TODO : autres BPP
00036         KASSERT( ( x < m_Width ) && ( y < m_Height ) );
00037 
00038         return m_pBitmap[ y * m_Width + x ];
00039 }
00040 
00041 //---------------------------------------------------------------------------------------------------------------------
00042 KBitmapBank::KBitmapBank()
00043 {
00044 }
00045 

Generated on Sun Mar 25 20:02:10 2007 for Zythum Project by  doxygen 1.5.1-p1