Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Bitmaps.cpp File Reference

Implements Bitmap (PBM/PGB) related functions and classes. More...

#include "../Include/Globals.h"
#include "../Include/FlyLegacy.h"
#include <vector>

Go to the source code of this file.

Classes

class  CBitmapPBM
class  CBitmapPBG
struct  SPBGHeader

Functions

SSurfaceCreateSurface (int width, int height)
void FreeSurface (SSurface *surface)
void EraseSurface (SSurface *surface)
void EraseSurfaceRGB (SSurface *surface, unsigned int rgb)
void EraseSurfaceRGBA (SSurface *surface, unsigned int rgba)
GLuint TextureFromSurface (SSurface *s, bool mipmap)
void DrawDot (SSurface *surface, int x, int y, unsigned int rgba)
void DrawLine (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgba)
void DrawRect (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgba)
void FillRect (SSurface *surface, int x1, int y1, int x2, int y2, unsigned int rgba)
void DrawCircle (SSurface *surface, int xCenter, int yCenter, int radius, unsigned int rgba)
unsigned int MakeRGB (unsigned int r, unsigned int g, unsigned int b)
unsigned int MakeRGBA (unsigned int r, unsigned int g, unsigned int b, unsigned int a)
void UnmakeRGB (unsigned int rgb, unsigned int *r, unsigned int *g, unsigned int *b)
void Blit (SSurface *surface)
void BlitTransparent (SSurface *surface, unsigned int rgbTransparentColor)
int LoadBitmap (SBitmap *bm)
void DrawBitmap (SSurface *surface, SBitmap *bm, int x, int y, int frame)
void DrawBitmapPartial (SSurface *surf, SBitmap *bm, int x, int y, int x1, int y1, int x2, int y2, int frame)
void GetBitmapSize (SBitmap *bm, int *xSize, int *ySize)
int NumBitmapFrames (SBitmap *bm)
void FreeBitmap (SBitmap *bm)


Detailed Description

Definition in file Bitmaps.cpp.


Function Documentation

void Blit SSurface surface  ) 
 

Definition at line 320 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by CGaugeKnob::Draw(), and Draw2D().

void BlitTransparent SSurface surface,
unsigned int  rgbTransparentColor
 

Definition at line 337 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by BlitSurface(), and CPanel::Draw().

SSurface* CreateSurface int  width,
int  height
 

Definition at line 55 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xScreen, SSurface::xSize, SSurface::xSpan, SSurface::yScreen, and SSurface::ySize.

Referenced by CPanel::Activate(), CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CFuiComponent::MakeSurface(), CGaugeKnob::ReadFinished(), CGauge::ReadFinished(), CNavigationGauge::ReadFinished(), and CFuiComponent::SetSize().

void DrawBitmap SSurface surface,
SBitmap bm,
int  x,
int  y,
int  frame
 

Definition at line 797 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CPanel::Activate(), CGaugeNeedle::Draw(), CGaugeClickArea::Draw(), CGaugeKnob::Draw(), CVerticalSpeedGauge::Draw(), CNavigationGauge::Draw(), CSimpleSwitch::Draw(), CSimpleInOutStateSwitch::Draw(), CBasicBatterySwitch::Draw(), CBasicMagnetoSwitch::Draw(), CFuiCheckbox::Draw(), CFuiRadioButton::Draw(), CFuiTextField::Draw(), CFuiSlider::Draw(), CFuiGroupBox::Draw(), CFuiList::Draw(), CFuiPicture::DrawNoTiling(), CBitmapGauge::DrawOverlay(), CFuiPicture::DrawTiledBitmap(), CBitmapGauge::DrawUnderlay(), InitExitScreen(), InitLoadingScreen(), and InitSplashScreen().

void DrawBitmapPartial SSurface surf,
SBitmap bm,
int  x,
int  y,
int  x1,
int  y1,
int  x2,
int  y2,
int  frame
 

Definition at line 818 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by InitLoadingScreen().

void DrawCircle SSurface surface,
int  xCenter,
int  yCenter,
int  radius,
unsigned int  rgba
 

Definition at line 298 of file Bitmaps.cpp.

void DrawDot SSurface surface,
int  x,
int  y,
unsigned int  rgba
 

Definition at line 140 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, SSurface::xSpan, and SSurface::ySize.

Referenced by CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CFuiGraphTrace::Draw(), CBitmappedFontChar::Draw(), and DrawLine().

void DrawLine SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgba
 

Definition at line 161 of file Bitmaps.cpp.

References DrawDot(), and DrawLine().

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CFuiLine::Draw(), CFuiGraphTrace::Draw(), DrawLine(), DrawRect(), and FillRect().

void DrawRect SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgba
 

Definition at line 273 of file Bitmaps.cpp.

References DrawLine().

void EraseSurface SSurface surface  ) 
 

Definition at line 77 of file Bitmaps.cpp.

References EraseSurfaceRGBA().

Referenced by CPanel::Activate(), CGauge::ClearSurface(), CGaugeKnob::Draw(), CNavigationGauge::Draw(), CFuiLabel::Draw(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), and CFuiComponent::MakeSurface().

void EraseSurfaceRGB SSurface surface,
unsigned int  rgb
 

Definition at line 82 of file Bitmaps.cpp.

References EraseSurfaceRGBA().

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), and CFuiTextField::Draw().

void EraseSurfaceRGBA SSurface surface,
unsigned int  rgba
 

Definition at line 87 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSpan, and SSurface::ySize.

Referenced by EraseSurface(), and EraseSurfaceRGB().

void FillRect SSurface surface,
int  x1,
int  y1,
int  x2,
int  y2,
unsigned int  rgba
 

Definition at line 285 of file Bitmaps.cpp.

References DrawLine(), and FillRect().

Referenced by FillRect().

void FreeBitmap SBitmap bm  ) 
 

Definition at line 878 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, TYPE_INVALID, and TYPE_SINGLE.

Referenced by CleanupExitScreen(), CleanupLoadingScreen(), CleanupSplashScreen(), CPanel::Deactivate(), CFuiThemeWidget::ParseBitmap(), CBitmapGauge::~CBitmapGauge(), CFuiPicture::~CFuiPicture(), CFuiThemeWidget::~CFuiThemeWidget(), CGaugeClickArea::~CGaugeClickArea(), CGaugeKnob::~CGaugeKnob(), CGaugeNeedle::~CGaugeNeedle(), CNavigationGauge::~CNavigationGauge(), CPanel::~CPanel(), CSimpleInOutStateSwitch::~CSimpleInOutStateSwitch(), and CVerticalSpeedGauge::~CVerticalSpeedGauge().

void FreeSurface SSurface surface  ) 
 

Definition at line 69 of file Bitmaps.cpp.

References SSurface::drawBuffer.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CleanupExitScreen(), CleanupLoadingScreen(), CleanupSplashScreen(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CPanel::Deactivate(), CFuiComponent::SetSize(), CFuiWindow::~CFuiWindow(), CGaugeKnob::~CGaugeKnob(), and CPanel::~CPanel().

void GetBitmapSize SBitmap bm,
int *  xSize,
int *  ySize
 

Definition at line 840 of file Bitmaps.cpp.

References SBitmap::bitmap, gtfo, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CGaugeNeedle::Draw(), CFuiCheckbox::Draw(), CFuiRadioButton::Draw(), CFuiSlider::Draw(), CFuiPicture::DrawTiledBitmap(), CFuiWindowTitle::Fill(), CFuiCloseButton::Fill(), CFuiMinimizeButton::Fill(), CFuiZoomButton::Fill(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CGaugeNeedle::ReadFinished(), CFuiWindow::ReadFinished(), CFuiButton::ReadFinished(), CFuiPopupMenu::ReadFinished(), CFuiTextField::ReadFinished(), and CFuiPicture::SetBitmap().

int LoadBitmap SBitmap bm  ) 
 

Definition at line 764 of file Bitmaps.cpp.

References SBitmap::bitmap, SBitmap::bitmapName, gtfo, SBitmap::type, TYPE_FRAMES, TYPE_INVALID, and TYPE_SINGLE.

Referenced by CPanel::Activate(), InitExitScreen(), InitLoadingScreen(), InitSplashScreen(), CFuiThemeWidget::ParseBitmap(), CFuiPicture::Read(), CGaugeNeedle::ReadFinished(), CGaugeClickArea::ReadFinished(), CGaugeKnob::ReadFinished(), CBitmapGauge::ReadFinished(), CVerticalSpeedGauge::ReadFinished(), CNavigationGauge::ReadFinished(), CSimpleSwitch::ReadFinished(), and CSimpleInOutStateSwitch::ReadFinished().

unsigned int MakeRGB unsigned int  r,
unsigned int  g,
unsigned int  b
 

Definition at line 302 of file Bitmaps.cpp.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CFuiBox::CFuiBox(), CFuiGroupBox::CFuiGroupBox(), CFuiLabel::CFuiLabel(), CFuiList::CFuiList(), CFuiPopupMenu::CFuiPopupMenu(), CFuiTextField::CFuiTextField(), CFuiWindowTitle::CFuiWindowTitle(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), CDetailTile::CreateStripGeometry(), CBKNavComKX155Gauge::Draw(), CBKXPDRKT76Gauge::Draw(), CBKADFKR87Gauge::Draw(), CFuiCheckbox::Draw(), CFuiRadioButton::Draw(), FrameRateNotify(), InitExitScreen(), InitSplashScreen(), and CFuiThemeWidget::ParseColour().

unsigned int MakeRGBA unsigned int  r,
unsigned int  g,
unsigned int  b,
unsigned int  a
 

Definition at line 307 of file Bitmaps.cpp.

Referenced by CBitmapPBM::Draw(), and CBitmapPBM::DrawPartial().

int NumBitmapFrames SBitmap bm  ) 
 

Definition at line 858 of file Bitmaps.cpp.

References SBitmap::bitmap, SBitmap::type, TYPE_FRAMES, and TYPE_SINGLE.

Referenced by CGaugeKnob::Draw(), CGaugeNeedle::ReadFinished(), and CNavigationGauge::ReadFinished().

GLuint TextureFromSurface SSurface s,
bool  mipmap
 

Definition at line 97 of file Bitmaps.cpp.

References SSurface::drawBuffer, SSurface::xSize, and SSurface::ySize.

Referenced by CDefaultSuperTile::CDefaultSuperTile(), CQuarterGlobeTile::Create(), CDetailTile::CreateFanGeometry(), and CDetailTile::CreateStripGeometry().

void UnmakeRGB unsigned int  rgb,
unsigned int *  r,
unsigned int *  g,
unsigned int *  b
 

Definition at line 312 of file Bitmaps.cpp.

Referenced by CFuiThemeWidget::Print().

SourceForge.net Logo Documentation generated by doxygen