Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <sprite.h>
Public Member Functions | |
VSSprite (const char *file, enum FILTER texturefilter=BILINEAR, GFXBOOL force=GFXFALSE) | |
VSSprite (Texture *surface, float xcenter, float ycenter, float width, float height, float s=0.f, float t=0.f, bool isAnimation=false) | |
VSSprite (const VSSprite &source) | |
~VSSprite () | |
bool | LoadSuccess () const |
void | Draw () |
void | DrawHere (Vector &ll, Vector &lr, Vector &ur, Vector &ul) |
void | Rotate (const float &rad) |
void | SetRotation (const float &rot) |
void | GetRotation (float &rot) |
void | ReadTexture (VSFileSystem::VSFile *f) |
void | GetST (float &s, float &t) |
void | SetST (const float s, const float t) |
void | SetTime (double newtime) |
void | SetPosition (const float &x1, const float &y1) |
void | GetPosition (float &x1, float &y1) |
void | SetSize (float s1, float s2) |
void | GetSize (float &x1, float &y1) |
void | SetTimeSource (SharedPtr< Audio::Source > source) |
void | ClearTimeSource () |
bool | Done () const |
void | Reset () |
SharedPtr< Audio::Source > | GetTimeSource () const |
Texture * | getTexture () |
const Texture * | getTexture () const |
VSSprite::VSSprite | ( | const char * | file, |
enum FILTER | texturefilter = BILINEAR , |
||
GFXBOOL | force = GFXFALSE |
||
) |
Definition at line 89 of file sprite.cpp.
References cacheInsert(), cacheLookup(), Texture::Clone(), VSFileSystem::VSFile::Close(), f, VSFileSystem::VSFile::Fscanf(), g_game, GFXFALSE, GFXTRUE, Texture::LoadSuccess(), VSFileSystem::Ok, VSFileSystem::VSFile::OpenReadOnly(), BaseUtil::Texture(), TEXTURE2D, TEXTURE_2D, VSFileSystem::Unspecified, game_data_t::use_sprites, VSCONSTRUCT2, and VSFileSystem::VSSpriteFile.
VSSprite::VSSprite | ( | Texture * | surface, |
float | xcenter, | ||
float | ycenter, | ||
float | width, | ||
float | height, | ||
float | s = 0.f , |
||
float | t = 0.f , |
||
bool | isAnimation = false |
||
) |
Definition at line 69 of file sprite.cpp.
VSSprite::VSSprite | ( | const VSSprite & | source) |
Definition at line 82 of file sprite.cpp.
References Texture::Clone().
VSSprite::~VSSprite | ( | ) |
Definition at line 186 of file sprite.cpp.
References VSDESTRUCT2.
void VSSprite::ClearTimeSource | ( | ) |
Definition at line 340 of file sprite.cpp.
bool VSSprite::Done | ( | ) | const |
Definition at line 346 of file sprite.cpp.
void VSSprite::Draw | ( | ) |
Definition at line 232 of file sprite.cpp.
References CULLFACE, DrawHere(), GFXBegin(), GFXDisable(), GFXEnable(), GFXEnd(), GFXGetBlendMode(), GFXMODULATETEXTURE, GFXQUAD, GFXTexCoord2f(), GFXTexCoord4f(), GFXTextureCoordGenMode(), GFXTextureEnv(), GFXToggleTexture(), GFXVertexf(), gl_options, Texture::MakeActive(), Texture::maxtcoord, Texture::mintcoord, gl_options_t::Multitexture, NO_GEN, Texture::numLayers(), Texture::numPasses(), Texture::SetupPass(), Texture::texture_target, and Vector.
Referenced by Gauge::Draw(), Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), Radar::PlaneDisplay::Draw(), VDU::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::Draw(), UnivMap::Draw(), and DrawGlutMouse().
Draw at specified coordinates given by 4 endpoints.
ll | lower-left corner |
lr | lower-right corner |
ur | upper-right corner |
ul | upper-left corner |
Definition at line 211 of file sprite.cpp.
References UniverseUtil::cos(), f, M_PI_2, UniverseUtil::sin(), and Vector.
Referenced by Draw(), Animation::DrawAsVSSprite(), and DrawHUDSprite().
Definition at line 298 of file sprite.cpp.
Referenced by Gauge::Draw(), VDU::Draw(), WindowManager::draw(), DrawGlutMouse(), DrawHUDSprite(), DrawShield(), and Radar::ViewArea::SetSprite().
void VSSprite::GetRotation | ( | float & | rot) |
Definition at line 321 of file sprite.cpp.
Definition at line 310 of file sprite.cpp.
Referenced by Gauge::Draw(), VDU::Draw(), WindowManager::draw(), BaseInterface::Room::Draw(), DrawGlutMouse(), DrawHUDSprite(), DrawShield(), Gauge::Gauge(), Gauge::GetSize(), and Radar::ViewArea::SetSprite().
Definition at line 199 of file sprite.cpp.
|
inline |
Definition at line 94 of file sprite.h.
Referenced by buildShipDescription(), and DrawHUDSprite().
|
inline |
SharedPtr< Audio::Source > VSSprite::GetTimeSource | ( | ) | const |
Definition at line 332 of file sprite.cpp.
bool VSSprite::LoadSuccess | ( | ) | const |
Definition at line 360 of file sprite.cpp.
References Texture::LoadSuccess().
Referenced by BaseInterface::Room::BaseVSMovie::BaseVSMovie(), GameCockpit::Draw(), isVSSpriteLoaded(), and BaseUtil::VideoStream().
void VSSprite::ReadTexture | ( | VSFileSystem::VSFile * | f) |
Definition at line 175 of file sprite.cpp.
References BaseUtil::Texture(), and VSFileSystem::VSFile::Valid().
void VSSprite::Reset | ( | ) |
Definition at line 354 of file sprite.cpp.
Referenced by BaseInterface::Room::BaseVSMovie::BaseVSMovie(), and BaseUtil::Video().
|
inline |
Definition at line 292 of file sprite.cpp.
Referenced by Gauge::Draw(), WindowManager::draw(), GameCockpit::Draw(), BaseInterface::Room::Draw(), DrawGlutMouse(), DrawHUDSprite(), and BaseInterface::Room::BaseVSSprite::SetPos().
void VSSprite::SetRotation | ( | const float & | rot) |
Definition at line 316 of file sprite.cpp.
Referenced by BaseInterface::Room::BaseVSMovie::SetMovie().
Definition at line 304 of file sprite.cpp.
Referenced by Gauge::Draw(), DrawHUDSprite(), Gauge::SetSize(), and BaseInterface::Room::BaseVSSprite::SetSize().
Definition at line 193 of file sprite.cpp.
Referenced by Gauge::Draw().
void VSSprite::SetTime | ( | double | newtime) |
Definition at line 205 of file sprite.cpp.
References Texture::setTime().
Referenced by Gauge::Draw(), and BaseInterface::Room::BaseVSSprite::SetTime().
void VSSprite::SetTimeSource | ( | SharedPtr< Audio::Source > | source) |
Definition at line 326 of file sprite.cpp.
Referenced by BaseInterface::Room::BaseVSMovie::BaseVSMovie(), and BaseUtil::Video().