Unified
Split
Showing
with
11 additions
and 11 deletions.
- +1 −1 engines/zvision/graphics/render_table.cpp
- +1 −1 engines/zvision/scripting/controls/safe_control.cpp
- +1 −1 engines/zvision/scripting/sidefx/music_node.cpp
- +1 −1 engines/zvision/scripting/sidefx/syncsound_node.cpp
- +1 −1 engines/zvision/sound/zork_raw.cpp
- +3 −3 engines/zvision/subtitles/subtitles.cpp
- +1 −1 engines/zvision/subtitles/subtitles.h
- +2 −2 engines/zvision/text/text.cpp
| @@ -200,7 +200,7 @@ void RenderTable::generateTiltLookupTable() { | ||
|
|
||
| float fovInRadians = (_tiltOptions.fieldOfView * M_PI / 180.0f); | ||
| float cylinderRadius = halfWidth / tan(fovInRadians); | ||
| _tiltOptions.gap = cylinderRadius * atan2(halfHeight / cylinderRadius, 1.0) * _tiltOptions.linearScale; | ||
| _tiltOptions.gap = cylinderRadius * atan2((float)(halfHeight / cylinderRadius), 1.0f) * _tiltOptions.linearScale; | ||
|
|
||
| for (uint y = 0; y < _numRows; ++y) { | ||
|
|
||
| @@ -181,7 +181,7 @@ bool SafeControl::onMouseUp(const Common::Point &screenSpacePos, const Common::P | ||
|
|
||
| Common::Point tmp = backgroundImageSpacePos - _center; | ||
|
|
||
| float dd = atan2(tmp.x, tmp.y) * 57.29578; | ||
| float dd = atan2((float)tmp.x, (float)tmp.y) * 57.29578; | ||
|
|
||
| int16 dp_state = 360 / _statesCount; | ||
|
|
||
| @@ -49,7 +49,7 @@ MusicNode::MusicNode(ZVision *engine, uint32 key, Common::String &filename, bool | ||
| _pantrackPosition = 0; | ||
| _sub = NULL; | ||
|
|
||
| Audio::RewindableAudioStream *audioStream; | ||
| Audio::RewindableAudioStream *audioStream = NULL; | ||
|
|
||
| if (filename.contains(".wav")) { | ||
| Common::File *file = new Common::File(); | ||
| @@ -41,7 +41,7 @@ SyncSoundNode::SyncSoundNode(ZVision *engine, uint32 key, Common::String &filena | ||
| _syncto = syncto; | ||
| _sub = NULL; | ||
|
|
||
| Audio::RewindableAudioStream *audioStream; | ||
| Audio::RewindableAudioStream *audioStream = NULL; | ||
|
|
||
| if (filename.contains(".wav")) { | ||
| Common::File *file = new Common::File(); | ||
| @@ -259,7 +259,7 @@ Audio::RewindableAudioStream *makeRawZorkStream(const Common::String &filePath, | ||
| Common::String fileName = getFileName(filePath); | ||
| fileName.toLowercase(); | ||
|
|
||
| SoundParams soundParams; | ||
| SoundParams soundParams = {}; | ||
|
|
||
| if (engine->getGameId() == GID_NEMESIS) { | ||
| for (int i = 0; i < 32; ++i) { | ||
| @@ -55,7 +55,7 @@ Subtitle::Subtitle(ZVision *engine, const Common::String &subname) : | ||
| sub curSubtitle; | ||
| curSubtitle.start = -1; | ||
| curSubtitle.stop = -1; | ||
| curSubtitle.sub = txtline; | ||
| curSubtitle.subStr = txtline; | ||
|
|
||
| _subs.push_back(curSubtitle); | ||
| } | ||
| @@ -98,9 +98,9 @@ void Subtitle::process(int32 time) { | ||
| } | ||
|
|
||
| if (j != -1 && j != _subId) { | ||
| if (_subs[j].sub.size()) | ||
| if (_subs[j].subStr.size()) | ||
| if (_areaId != -1) | ||
| _engine->getRenderManager()->updateSubArea(_areaId, _subs[j].sub); | ||
| _engine->getRenderManager()->updateSubArea(_areaId, _subs[j].subStr); | ||
| _subId = j; | ||
| } | ||
| } | ||
| @@ -43,7 +43,7 @@ class Subtitle { | ||
| struct sub { | ||
| int start; | ||
| int stop; | ||
| Common::String sub; | ||
| Common::String subStr; | ||
| }; | ||
|
|
||
| Common::Array<sub> _subs; | ||
| @@ -457,7 +457,7 @@ void TextRenderer::drawTxtInOneLine(const Common::String &text, Graphics::Surfac | ||
| j++; | ||
| } | ||
| dx = 0; | ||
| for (int32_t jj = 0; jj < j; jj++) { | ||
| for (int32 jj = 0; jj < j; jj++) { | ||
| if (TxtJustify[i] == TXT_JUSTIFY_LEFT) | ||
| _engine->getRenderManager()->blitSurfaceToSurface(*TxtSurfaces[i][jj], dst, dx, dy + TxtPoint[i] - TxtSurfaces[i][jj]->h, 0); | ||
|
|
||
| @@ -474,7 +474,7 @@ void TextRenderer::drawTxtInOneLine(const Common::String &text, Graphics::Surfac | ||
| } | ||
|
|
||
| for (i = 0; i < TXT_CFG_TEXTURES_LINES; i++) | ||
| for (int32_t j = 0; j < TXT_CFG_TEXTURES_PER_LINE; j++) | ||
| for (int32 j = 0; j < TXT_CFG_TEXTURES_PER_LINE; j++) | ||
| if (TxtSurfaces[i][j] != NULL) { | ||
| TxtSurfaces[i][j]->free(); | ||
| delete TxtSurfaces[i][j]; | ||