diff options
author | Strangerke | 2013-01-02 20:12:32 +0100 |
---|---|---|
committer | Strangerke | 2013-01-02 20:12:32 +0100 |
commit | a4b7b29157125ad6240888186dde70ac64ee6088 (patch) | |
tree | c2a0aa7dc605f3181103ada92aa0a7bbc84ff48f | |
parent | 3eae64cf25546945d5000989077d5cf9a458c88d (diff) | |
download | scummvm-rg350-a4b7b29157125ad6240888186dde70ac64ee6088.tar.gz scummvm-rg350-a4b7b29157125ad6240888186dde70ac64ee6088.tar.bz2 scummvm-rg350-a4b7b29157125ad6240888186dde70ac64ee6088.zip |
HOPKINS: Silence some warnings reported by GCC. Thanks Eriktorbjorn for reporting those
-rw-r--r-- | engines/hopkins/anim.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 10 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 25 |
4 files changed, 17 insertions, 24 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 1a7f29c965..38852f38dd 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -219,7 +219,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint int v5; int v8; byte *ptr = NULL; - int oldScrollVal; + int oldScrollVal = 0; byte *v12 = NULL; byte *v13 = NULL; int v15; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 27d86d21a3..0ea89b07bc 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -705,7 +705,7 @@ void GraphicsManager::SETCOLOR4(int palIndex, int r, int g, int b) { void GraphicsManager::changePalette(const byte *palette) { const byte *srcP = &palette[0]; for (int idx = 0; idx < PALETTE_SIZE; ++idx, srcP += 3) { - *(uint16 *)&SD_PIXELS[2 * idx] = mapRGB(*srcP, *(srcP + 1), *(srcP + 2)); + WRITE_LE_UINT16(&SD_PIXELS[2 * idx], mapRGB(*srcP, *(srcP + 1), *(srcP + 2))); } } @@ -791,7 +791,7 @@ void GraphicsManager::Copy_WinScan_Vbe3(const byte *srcData, byte *destSurface) } Video_Cont3_wVbe: if (srcByte > 210) { - if (srcByte == -45) { + if (srcByte == 211) { destLen1 = srcP[1]; rleValue = srcP[2]; destSlice1P = destOffset + destSurface; @@ -1113,7 +1113,6 @@ void GraphicsManager::RESET_SEGMENT_VESA() { // Add VESA Segment void GraphicsManager::addVesaSegment(int x1, int y1, int x2, int y2) { int tempX; - int blocCount; bool addFlag; tempX = x1; @@ -1127,9 +1126,7 @@ void GraphicsManager::addVesaSegment(int x1, int y1, int x2, int y2) { if (y1 < min_y) y1 = min_y; - blocCount = _vm->_globals.NBBLOC; if (_vm->_globals.NBBLOC > 1) { - int16 blocIndex = 0; do { BlocItem &bloc = _vm->_globals.BLOC[blocIndex]; @@ -1138,7 +1135,6 @@ void GraphicsManager::addVesaSegment(int x1, int y1, int x2, int y2) { && y1 >= bloc._y1 && y2 <= bloc._y2) addFlag = false; ++blocIndex; - blocCount = blocIndex; } while (_vm->_globals.NBBLOC + 1 != blocIndex); } @@ -1910,12 +1906,10 @@ void GraphicsManager::SHOW_PALETTE() { } void GraphicsManager::Copy_WinScan_Vbe(const byte *src, byte *dest) { - int result; int destOffset; const byte *srcPtr; byte byteVal; - result = 0; destOffset = 0; srcPtr = src; for (;;) { diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index c3a3d617cb..5b4a26c71d 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -1437,8 +1437,8 @@ int16 *LinesManager::PARCOURS2(int srcX, int srcY, int destX, int destY) { int v115; int v116; int v117; - int v118; - int v119; + int v118 = 0; + int v119 = 0; int v120; int v121; int v122; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 549f131f9b..507c46d65f 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -2939,11 +2939,9 @@ int16 *ObjectsManager::PARC_VOITURE(int a1, int a2, int a3, int a4) { int16 *v33; int v34; int v35; - int i; int16 *v37; int v39; int16 *v41; - int k; int16 *v45; int v47; int v48; @@ -2957,12 +2955,11 @@ int16 *ObjectsManager::PARC_VOITURE(int a1, int a2, int a3, int a4) { int v65; int v66; int v67; - int v68; - int v69; + int v68 = 0; + int v69 = 0; int j; - int l; - int v72; - int v73; + int v72 = 0; + int v73 = 0; int v74; int v75; int v77[10]; @@ -3123,10 +3120,12 @@ int16 *ObjectsManager::PARC_VOITURE(int a1, int a2, int a3, int a4) { v33[v32 + 3] = 0; v67 += 4; if (v28 == -1) - goto LABEL_90; + break;; + } + if (v28 != -1) { + v69 = v87[1]; + v68 = v82[1]; } - v69 = v87[1]; - v68 = v82[1]; } else { v69 = 1; v68 = 1; @@ -3136,7 +3135,7 @@ LABEL_90: if (v69 < v73) { v34 = v68; v35 = v68; - for (i = _vm->_linesManager.Ligne[v69].field0; v35 < i - 2; i = _vm->_linesManager.Ligne[v69].field0) { + for (int i = _vm->_linesManager.Ligne[v69].field0; v35 < i - 2; i = _vm->_linesManager.Ligne[v69].field0) { v37 = _vm->_linesManager.Ligne[v69].lineData; v39 = v67; _vm->_globals.super_parcours[v39] = v37[2 * v35]; @@ -3176,7 +3175,7 @@ LABEL_88: v69 = v73; } if (v69 > v73) { - for (k = v68; k > 0; --k) { + for (int k = v68; k > 0; --k) { v45 = _vm->_linesManager.Ligne[v69].lineData; v47 = v67; _vm->_globals.super_parcours[v47] = v45[2 * k]; @@ -3185,7 +3184,7 @@ LABEL_88: _vm->_globals.super_parcours[v47 + 3] = 0; v67 += 4; } - for (l = v69 - 1; l > v73; --l) { + for (int l = v69 - 1; l > v73; --l) { v48 = l; if (_vm->_linesManager.PLAN_TEST( _vm->_linesManager.Ligne[l].lineData[2 * _vm->_linesManager.Ligne[v48].field0 - 2], |