diff options
author | Einar Johan Trøan Sømåen | 2012-07-26 22:20:55 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-26 22:20:55 +0200 |
commit | 3a49f2bad407787ef65d04c5f9ae423485629b41 (patch) | |
tree | f7ceed0ac885724b5569302bc23ba3f027705fb1 /engines/wintermute/video | |
parent | 496a3938c451683845e73fa9b2cba20dadddfe21 (diff) | |
download | scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.tar.gz scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.tar.bz2 scummvm-rg350-3a49f2bad407787ef65d04c5f9ae423485629b41.zip |
WINTERMUTE: More variable/function renaming VarName->varName
Diffstat (limited to 'engines/wintermute/video')
-rw-r--r-- | engines/wintermute/video/video_player.cpp | 58 | ||||
-rw-r--r-- | engines/wintermute/video/video_player.h | 8 | ||||
-rw-r--r-- | engines/wintermute/video/video_theora_player.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/video/video_theora_player.h | 8 |
4 files changed, 46 insertions, 46 deletions
diff --git a/engines/wintermute/video/video_player.cpp b/engines/wintermute/video/video_player.cpp index 66ec926582..a4c81d12b5 100644 --- a/engines/wintermute/video/video_player.cpp +++ b/engines/wintermute/video/video_player.cpp @@ -39,12 +39,12 @@ namespace WinterMute { ////////////////////////////////////////////////////////////////////////// VideoPlayer::VideoPlayer(BaseGame *inGame): BaseClass(inGame) { - SetDefaults(); + setDefaults(); } ////////////////////////////////////////////////////////////////////////// -bool VideoPlayer::SetDefaults() { +bool VideoPlayer::setDefaults() { _playing = false; /* _aviFile = NULL; @@ -145,7 +145,7 @@ bool VideoPlayer::initialize(const char *inFilename, const char *SubtitleFile) { #if 0 cleanup(); - char Filename[MAX_PATH_LENGTH]; + char filename[MAX_PATH_LENGTH]; _gameRef->_fileManager->GetFullPath(inFilename, filename); // open file @@ -270,9 +270,9 @@ bool VideoPlayer::update() { // process subtitles _showSubtitle = false; while (_currentSubtitle < _subtitles.getSize()) { - int End = _subtitles[_currentSubtitle]->m_EndFrame; + int end = _subtitles[_currentSubtitle]->m_EndFrame; - bool NextFrameOK = (_currentSubtitle < _subtitles.getSize() - 1 && _subtitles[_currentSubtitle + 1]->_startFrame <= sample); + bool nextFrameOK = (_currentSubtitle < _subtitles.getSize() - 1 && _subtitles[_currentSubtitle + 1]->_startFrame <= sample); if (sample > End) { if (NextFrameOK) { @@ -324,7 +324,7 @@ bool VideoPlayer::display() { // display subtitle if (m_ShowSubtitle) { BaseFont *font = _gameRef->_videoFont ? _gameRef->_videoFont : _gameRef->_systemFont; - int Height = font->GetTextHeight((BYTE *)m_Subtitles[_currentSubtitle]->_text, _gameRef->_renderer->_width); + int height = font->GetTextHeight((BYTE *)m_Subtitles[_currentSubtitle]->_text, _gameRef->_renderer->_width); font->drawText((byte *)_subtitles[m_CurrentSubtitle]->_text, 0, _gameRef->_renderer->_height - Height - 5, _gameRef->_renderer->_width, TAL_CENTER); } @@ -337,7 +337,7 @@ bool VideoPlayer::display() { ////////////////////////////////////////////////////////////////////////// -bool VideoPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) { +bool VideoPlayer::play(TVideoPlayback type, int x, int y, bool FreezeMusic) { #if 0 if (!_videoStream || !_vidRenderer) { return STATUS_FAILED; @@ -351,8 +351,8 @@ bool VideoPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) { break; case VID_PLAY_STRETCH: { - float ZoomX = (float)((float)_gameRef->_renderer->m_Width / (float)_videoFormat->bmiHeader.biWidth * 100); - float ZoomY = (float)((float)_gameRef->_renderer->m_Height / (float)_videoFormat->bmiHeader.biHeight * 100); + float zoomX = (float)((float)_gameRef->_renderer->m_Width / (float)_videoFormat->bmiHeader.biWidth * 100); + float zoomY = (float)((float)_gameRef->_renderer->m_Height / (float)_videoFormat->bmiHeader.biHeight * 100); _playZoom = min(ZoomX, ZoomY); _playPosX = (_gameRef->_renderer->_width - _videoFormat->bmiHeader.biWidth * (_playZoom / 100)) / 2; _playPosY = (_gameRef->_renderer->_height - _videoFormat->bmiHeader.biHeight * (_playZoom / 100)) / 2; @@ -431,7 +431,7 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) return STATUS_OK; } - char NewFile[MAX_PATH_LENGTH]; + char newFile[MAX_PATH_LENGTH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; @@ -443,35 +443,35 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) _makepath(NewFile, drive, dir, fname, ".SUB"); } - DWORD Size; - BYTE *Buffer = _gameRef->m_FileManager->readWholeFile(NewFile, &Size, false); + DWORD size; + BYTE *buffer = _gameRef->m_FileManager->readWholeFile(NewFile, &Size, false); if (Buffer == NULL) { return STATUS_OK; // no subtitles } LONG Start, End; - bool InToken; - char *TokenStart; - int TokenLength; - int TokenPos; - int TextLength; - - int Pos = 0; - int LineLength = 0; + bool inToken; + char *tokenStart; + int tokenLength; + int tokenPos; + int textLength; + + int pos = 0; + int lineLength = 0; while (Pos < Size) { - Start = End = -1; - InToken = false; - TokenPos = -1; - TextLength = 0; + start = End = -1; + inToken = false; + tokenPos = -1; + textLength = 0; - LineLength = 0; + lineLength = 0; while (Pos + LineLength < Size && Buffer[Pos + LineLength] != '\n' && Buffer[Pos + LineLength] != '\0') { - LineLength++; + lineLength++; } - int RealLength = LineLength - (Pos + LineLength >= Size ? 0 : 1); - char *Text = new char[RealLength + 1]; + int realLength = LineLength - (Pos + LineLength >= Size ? 0 : 1); + char *text = new char[RealLength + 1]; char *line = (char *)&Buffer[Pos]; for (int i = 0; i < RealLength; i++) { @@ -487,7 +487,7 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) } else if (line[i] == '}') { if (InToken) { InToken = false; - char *Token = new char[TokenLength + 1]; + char *token = new char[TokenLength + 1]; strncpy(Token, TokenStart, TokenLength); Token[TokenLength] = '\0'; if (TokenPos == 0) { diff --git a/engines/wintermute/video/video_player.h b/engines/wintermute/video/video_player.h index 8e82a44076..4c02506094 100644 --- a/engines/wintermute/video/video_player.h +++ b/engines/wintermute/video/video_player.h @@ -42,22 +42,22 @@ class VideoPlayer : public BaseClass { public: bool _showSubtitle; int _currentSubtitle; - bool loadSubtitles(const char *filename, const char *SubtitleFile); + bool loadSubtitles(const char *filename, const char *subtitleFile); bool _slowRendering; bool isPlaying(); char *_filename; bool stop(); - bool play(TVideoPlayback Type = VID_PLAY_CENTER, int X = 0, int Y = 0, bool FreezeMusic = true); + bool play(TVideoPlayback Type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeMusic = true); uint32 _totalVideoTime; uint32 _startTime; //CVidRenderer *_vidRenderer; //BaseSoundAVI *_sound; bool _soundAvailable; - bool SetDefaults(); + bool setDefaults(); bool _playing; bool display(); bool update(); - bool initialize(const char *inFilename, const char *SubtitleFile = NULL); + bool initialize(const char *inFilename, const char *subtitleFile = NULL); bool cleanup(); VideoPlayer(BaseGame *inGame); virtual ~VideoPlayer(); diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp index 59c83c3a52..6468f02524 100644 --- a/engines/wintermute/video/video_theora_player.cpp +++ b/engines/wintermute/video/video_theora_player.cpp @@ -212,9 +212,9 @@ bool VideoTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame, break; case VID_PLAY_STRETCH: { - float ZoomX = (float)((float)_gameRef->_renderer->_width / width * 100); - float ZoomY = (float)((float)_gameRef->_renderer->_height / height * 100); - _playZoom = MIN(ZoomX, ZoomY); + float zoomX = (float)((float)_gameRef->_renderer->_width / width * 100); + float zoomY = (float)((float)_gameRef->_renderer->_height / height * 100); + _playZoom = MIN(zoomX, zoomY); _posX = (int)((_gameRef->_renderer->_width - width * (_playZoom / 100)) / 2); _posY = (int)((_gameRef->_renderer->_height - height * (_playZoom / 100)) / 2); } @@ -278,7 +278,7 @@ bool VideoTheoraPlayer::update() { if (_theoraDecoder->getTimeToNextFrame() == 0) { _surface.copyFrom(*_theoraDecoder->decodeNextFrame()); if (_texture) { - WriteVideo(); + writeVideo(); } } return STATUS_OK; @@ -308,7 +308,7 @@ bool VideoTheoraPlayer::update() { if (m_PlaybackStarted && !m_FreezeGame && _gameRef->m_State == GAME_FROZEN) return STATUS_OK; - int Counter = 0; + int counter = 0; while (true) { if (m_Sound) DecodeVorbis(); else m_AudioFrameReady = true; @@ -354,7 +354,7 @@ bool VideoTheoraPlayer::update() { // if our buffers either don't exist or are ready to go, // we can begin playback - bool StartNow = false; + bool startNow = false; if ((!m_TheoraStreams || m_VideoFrameReady) && (!m_VorbisStreams || m_AudioFrameReady)) StartNow = true; // same if we've run out of input @@ -389,7 +389,7 @@ uint32 VideoTheoraPlayer::getMovieTime() { } ////////////////////////////////////////////////////////////////////////// -bool VideoTheoraPlayer::WriteVideo() { +bool VideoTheoraPlayer::writeVideo() { if (!_texture) { return STATUS_FAILED; } @@ -492,13 +492,13 @@ inline int intlog(int num) { } ////////////////////////////////////////////////////////////////////////// -bool VideoTheoraPlayer::SeekToTime(uint32 time) { +bool VideoTheoraPlayer::seekToTime(uint32 time) { warning("VideoTheoraPlayer::SeekToTime(%d) - not supported", time); #if 0 if (!m_TheoraStreams) return STATUS_FAILED; - float TargetTime = Time / 1000.0f; + float targetTime = Time / 1000.0f; ogg_page page; diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h index 58fe700d75..fe71ae0f35 100644 --- a/engines/wintermute/video/video_theora_player.h +++ b/engines/wintermute/video/video_theora_player.h @@ -65,10 +65,10 @@ public: bool initialize(const Common::String &filename, const Common::String &subtitleFile = NULL); bool initializeSimple(); bool update(); - bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool Looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1); + bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1); bool stop(); bool display(uint32 alpha = 0xFFFFFFFF); - //bool RenderFrame(BaseSurface *Texture, yuv_buffer *yuv); + //bool renderFrame(BaseSurface *texture, yuv_buffer *yuv); bool pause(); bool resume(); @@ -101,7 +101,7 @@ public: __inline byte getAlphaAt(int x, int y); void writeAlpha(); - bool SeekToTime(uint32 Time); + bool seekToTime(uint32 Time); void cleanup(); @@ -135,7 +135,7 @@ private: bool _videoFrameReady; float _videobufTime; - bool WriteVideo(); + bool writeVideo(); bool _playbackStarted; |