#include <CSurface8.h>
Public Member Functions | |
CSurface8 () | |
~CSurface8 () | |
CSurface8 (int iWdt, int iHgt) | |
bool | HasOwnPal () |
void | HLine (int iX, int iX2, int iY, int iCol) |
void | Box (int iX, int iY, int iX2, int iY2, int iCol) |
void | Circle (int x, int y, int r, BYTE col) |
void | ClearBox8Only (int iX, int iY, int iWdt, int iHgt) |
void | SetPix (int iX, int iY, BYTE byCol) |
void | _SetPix (int iX, int iY, BYTE byCol) |
BYTE | GetPix (int iX, int iY) const |
BYTE | _GetPix (int x, int y) const |
bool | Create (int iWdt, int iHgt) |
void | MoveFrom (C4Surface *psfcFrom) |
void | Clear () |
void | Clip (int iX, int iY, int iX2, int iY2) |
void | NoClip () |
bool | Read (class CStdStream &hGroup) |
bool | Save (const char *szFilename, CStdPalette *=nullptr) |
void | GetSurfaceSize (int &irX, int &irY) const |
void | AllowColor (BYTE iRngLo, BYTE iRngHi, bool fAllowZero=false) |
void | SetBuffer (BYTE *pbyToBuf, int Wdt, int Hgt, int Pitch) |
void | ReleaseBuffer () |
Public Attributes | |
int | Wdt |
int | Hgt |
int | Pitch |
int | ClipX |
int | ClipY |
int | ClipX2 |
int | ClipY2 |
BYTE * | Bits |
CStdPalette * | pPal |
Protected Member Functions | |
void | MapBytes (BYTE *bpMap) |
bool | ReadBytes (BYTE **lpbpData, void *bpTarget, int iSize) |
Definition at line 21 of file CSurface8.h.
CSurface8::CSurface8 | ( | ) |
CSurface8::~CSurface8 | ( | ) |
Definition at line 43 of file CSurface8.cpp.
References Clear().
CSurface8::CSurface8 | ( | int | iWdt, |
int | iHgt | ||
) |
|
inline |
Definition at line 54 of file CSurface8.h.
Referenced by C4Landscape::P::ChunkOZoom(), C4Landscape::P::CreateDefaultBkgSurface(), C4TextureShape::Draw(), and C4SolidMask::DensityProvider::GetDensity().
|
inline |
Definition at line 44 of file CSurface8.h.
Referenced by C4Landscape::P::CreateDefaultBkgSurface(), and C4TextureShape::Load().
void CSurface8::Box | ( | int | iX, |
int | iY, | ||
int | iX2, | ||
int | iY2, | ||
int | iCol | ||
) |
Definition at line 57 of file CSurface8.cpp.
References HLine().
void CSurface8::Circle | ( | int | x, |
int | y, | ||
int | r, | ||
BYTE | col | ||
) |
Definition at line 212 of file CSurface8.cpp.
References SetPix().
void CSurface8::Clear | ( | ) |
Definition at line 48 of file CSurface8.cpp.
Referenced by C4TextureShape::Clear(), Create(), Read(), ReleaseBuffer(), SetBuffer(), and ~CSurface8().
void CSurface8::ClearBox8Only | ( | int | iX, |
int | iY, | ||
int | iWdt, | ||
int | iHgt | ||
) |
Definition at line 202 of file CSurface8.cpp.
Referenced by C4MapCreator::Create().
void CSurface8::Clip | ( | int | iX, |
int | iY, | ||
int | iX2, | ||
int | iY2 | ||
) |
bool CSurface8::Create | ( | int | iWdt, |
int | iHgt | ||
) |
Definition at line 78 of file CSurface8.cpp.
References Bits, Clear(), CStdPalette::Colors, Hgt, NoClip(), Pitch, pPal, and Wdt.
Referenced by CSurface8(), C4TextureShape::Load(), and Read().
|
inline |
Definition at line 49 of file CSurface8.h.
References Bits, Hgt, Pitch, and Wdt.
Referenced by AllowColor(), C4Draw::Blit8Fast(), C4Landscape::P::ChunkOZoom(), C4TextureShape::Draw(), C4MapCreator::GetPix(), and MapBytes().
void CSurface8::GetSurfaceSize | ( | int & | irX, |
int & | irY | ||
) | const |
Definition at line 195 of file CSurface8.cpp.
Referenced by C4Landscape::P::ChunkOZoom(), and C4Landscape::P::MapToLandscape().
bool CSurface8::HasOwnPal | ( | ) |
void CSurface8::HLine | ( | int | iX, |
int | iX2, | ||
int | iY, | ||
int | iCol | ||
) |
Definition at line 73 of file CSurface8.cpp.
References SetPix().
Referenced by Box().
|
protected |
void CSurface8::MoveFrom | ( | C4Surface * | psfcFrom | ) |
void CSurface8::NoClip | ( | ) |
bool CSurface8::Read | ( | class CStdStream & | hGroup | ) |
Definition at line 99 of file CSurface8.cpp.
References CStdStream::Advance(), tagBITMAPINFOHEADER::biBitCount, tagBITMAPINFOHEADER::biHeight, tagBITMAPINFOHEADER::biWidth, C4RGB, Clear(), C4BMP256Info::Colors, CStdPalette::Colors, Create(), DWordAligned(), Hgt, C4BMPInfo::Info, pPal, CStdStream::Read(), tagRGBQUAD::rgbBlue, tagRGBQUAD::rgbGreen, tagRGBQUAD::rgbRed, and SetPix().
|
protected |
void CSurface8::ReleaseBuffer | ( | ) |
bool CSurface8::Save | ( | const char * | szFilename, |
CStdPalette * | bpPalette = nullptr |
||
) |
Definition at line 158 of file CSurface8.cpp.
References Bits, CStdFile::Close(), CStdFile::Create(), DWordAligned(), Hgt, Pitch, pPal, C4BMP256Info::Set(), Wdt, CStdFile::Write(), and ZeroMem().
Referenced by C4FoWAmbient::UpdateFromLandscape().
void CSurface8::SetBuffer | ( | BYTE * | pbyToBuf, |
int | Wdt, | ||
int | Hgt, | ||
int | Pitch | ||
) |
|
inline |
Definition at line 37 of file CSurface8.h.
References Bits, ClipX, ClipX2, ClipY, ClipY2, and Pitch.
Referenced by AllowColor(), Circle(), HLine(), C4SolidMask::LoadMaskFromFile(), MapBytes(), Read(), C4MapCreator::SetPix(), and C4FoWAmbient::UpdateFromLandscape().
BYTE* CSurface8::Bits |
Definition at line 30 of file CSurface8.h.
Referenced by _GetPix(), _SetPix(), Clear(), ClearBox8Only(), Create(), CSurface8(), GetPix(), C4SolidMask::Put(), ReleaseBuffer(), C4MapCreatorS2::Render(), Save(), SetBuffer(), and SetPix().
int CSurface8::ClipX |
Definition at line 29 of file CSurface8.h.
Referenced by Clip(), CSurface8(), NoClip(), and SetPix().
int CSurface8::ClipX2 |
Definition at line 29 of file CSurface8.h.
Referenced by Clip(), CSurface8(), NoClip(), and SetPix().
int CSurface8::ClipY |
Definition at line 29 of file CSurface8.h.
Referenced by Clip(), CSurface8(), NoClip(), and SetPix().
int CSurface8::ClipY2 |
Definition at line 29 of file CSurface8.h.
Referenced by Clip(), CSurface8(), NoClip(), and SetPix().
int CSurface8::Hgt |
Definition at line 28 of file CSurface8.h.
Referenced by AllowColor(), C4Object::CheckSolidMaskRect(), Clip(), C4MapCreator::Create(), Create(), C4Landscape::P::CreateDefaultBkgSurface(), CSurface8(), C4TextureShape::Draw(), C4TextureShape::GetHeight(), GetPix(), GetSurfaceSize(), C4TextureShape::Load(), MapBytes(), NoClip(), Read(), Save(), and SetBuffer().
int CSurface8::Pitch |
Definition at line 28 of file CSurface8.h.
Referenced by _GetPix(), _SetPix(), ClearBox8Only(), Create(), CSurface8(), GetPix(), C4SolidMask::Put(), C4MapCreatorS2::Render(), Save(), SetBuffer(), and SetPix().
CStdPalette* CSurface8::pPal |
Definition at line 31 of file CSurface8.h.
Referenced by C4Draw::Blit8Fast(), Clear(), Create(), CSurface8(), Read(), and Save().
int CSurface8::Wdt |
Definition at line 28 of file CSurface8.h.
Referenced by AllowColor(), C4Object::CheckSolidMaskRect(), Clip(), C4MapCreator::Create(), Create(), C4Landscape::P::CreateDefaultBkgSurface(), CSurface8(), C4TextureShape::Draw(), GetPix(), GetSurfaceSize(), C4TextureShape::GetWidth(), C4TextureShape::Load(), MapBytes(), NoClip(), Save(), and SetBuffer().