JANITORIAL: Clean up all non-engine Visual Studio warnings.
This commit is contained in:
parent
762ef9c055
commit
cc11b531e3
10 changed files with 1134 additions and 1132 deletions
|
@ -990,7 +990,7 @@ bool WMACodec::decodeSpectralCoef(Common::BitStream8MSB &bits, bool msStereo, bo
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((_version == 1) && (_channels >= 2))
|
if ((_version == 1) && (_channels >= 2))
|
||||||
bits.skip(-bits.pos() & 7);
|
bits.skip((0u - bits.pos()) & 7u);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1130,84 +1130,84 @@ void WMACodec::calculateMDCTCoefficients(int bSize, bool *hasChannel,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const float powTab[] = {
|
static const float powTab[] = {
|
||||||
1.7782794100389e-04, 2.0535250264571e-04,
|
1.7782794100389e-04f, 2.0535250264571e-04f,
|
||||||
2.3713737056617e-04, 2.7384196342644e-04,
|
2.3713737056617e-04f, 2.7384196342644e-04f,
|
||||||
3.1622776601684e-04, 3.6517412725484e-04,
|
3.1622776601684e-04f, 3.6517412725484e-04f,
|
||||||
4.2169650342858e-04, 4.8696752516586e-04,
|
4.2169650342858e-04f, 4.8696752516586e-04f,
|
||||||
5.6234132519035e-04, 6.4938163157621e-04,
|
5.6234132519035e-04f, 6.4938163157621e-04f,
|
||||||
7.4989420933246e-04, 8.6596432336006e-04,
|
7.4989420933246e-04f, 8.6596432336006e-04f,
|
||||||
1.0000000000000e-03, 1.1547819846895e-03,
|
1.0000000000000e-03f, 1.1547819846895e-03f,
|
||||||
1.3335214321633e-03, 1.5399265260595e-03,
|
1.3335214321633e-03f, 1.5399265260595e-03f,
|
||||||
1.7782794100389e-03, 2.0535250264571e-03,
|
1.7782794100389e-03f, 2.0535250264571e-03f,
|
||||||
2.3713737056617e-03, 2.7384196342644e-03,
|
2.3713737056617e-03f, 2.7384196342644e-03f,
|
||||||
3.1622776601684e-03, 3.6517412725484e-03,
|
3.1622776601684e-03f, 3.6517412725484e-03f,
|
||||||
4.2169650342858e-03, 4.8696752516586e-03,
|
4.2169650342858e-03f, 4.8696752516586e-03f,
|
||||||
5.6234132519035e-03, 6.4938163157621e-03,
|
5.6234132519035e-03f, 6.4938163157621e-03f,
|
||||||
7.4989420933246e-03, 8.6596432336006e-03,
|
7.4989420933246e-03f, 8.6596432336006e-03f,
|
||||||
1.0000000000000e-02, 1.1547819846895e-02,
|
1.0000000000000e-02f, 1.1547819846895e-02f,
|
||||||
1.3335214321633e-02, 1.5399265260595e-02,
|
1.3335214321633e-02f, 1.5399265260595e-02f,
|
||||||
1.7782794100389e-02, 2.0535250264571e-02,
|
1.7782794100389e-02f, 2.0535250264571e-02f,
|
||||||
2.3713737056617e-02, 2.7384196342644e-02,
|
2.3713737056617e-02f, 2.7384196342644e-02f,
|
||||||
3.1622776601684e-02, 3.6517412725484e-02,
|
3.1622776601684e-02f, 3.6517412725484e-02f,
|
||||||
4.2169650342858e-02, 4.8696752516586e-02,
|
4.2169650342858e-02f, 4.8696752516586e-02f,
|
||||||
5.6234132519035e-02, 6.4938163157621e-02,
|
5.6234132519035e-02f, 6.4938163157621e-02f,
|
||||||
7.4989420933246e-02, 8.6596432336007e-02,
|
7.4989420933246e-02f, 8.6596432336007e-02f,
|
||||||
1.0000000000000e-01, 1.1547819846895e-01,
|
1.0000000000000e-01f, 1.1547819846895e-01f,
|
||||||
1.3335214321633e-01, 1.5399265260595e-01,
|
1.3335214321633e-01f, 1.5399265260595e-01f,
|
||||||
1.7782794100389e-01, 2.0535250264571e-01,
|
1.7782794100389e-01f, 2.0535250264571e-01f,
|
||||||
2.3713737056617e-01, 2.7384196342644e-01,
|
2.3713737056617e-01f, 2.7384196342644e-01f,
|
||||||
3.1622776601684e-01, 3.6517412725484e-01,
|
3.1622776601684e-01f, 3.6517412725484e-01f,
|
||||||
4.2169650342858e-01, 4.8696752516586e-01,
|
4.2169650342858e-01f, 4.8696752516586e-01f,
|
||||||
5.6234132519035e-01, 6.4938163157621e-01,
|
5.6234132519035e-01f, 6.4938163157621e-01f,
|
||||||
7.4989420933246e-01, 8.6596432336007e-01,
|
7.4989420933246e-01f, 8.6596432336007e-01f,
|
||||||
1.0000000000000e+00, 1.1547819846895e+00,
|
1.0000000000000e+00f, 1.1547819846895e+00f,
|
||||||
1.3335214321633e+00, 1.5399265260595e+00,
|
1.3335214321633e+00f, 1.5399265260595e+00f,
|
||||||
1.7782794100389e+00, 2.0535250264571e+00,
|
1.7782794100389e+00f, 2.0535250264571e+00f,
|
||||||
2.3713737056617e+00, 2.7384196342644e+00,
|
2.3713737056617e+00f, 2.7384196342644e+00f,
|
||||||
3.1622776601684e+00, 3.6517412725484e+00,
|
3.1622776601684e+00f, 3.6517412725484e+00f,
|
||||||
4.2169650342858e+00, 4.8696752516586e+00,
|
4.2169650342858e+00f, 4.8696752516586e+00f,
|
||||||
5.6234132519035e+00, 6.4938163157621e+00,
|
5.6234132519035e+00f, 6.4938163157621e+00f,
|
||||||
7.4989420933246e+00, 8.6596432336007e+00,
|
7.4989420933246e+00f, 8.6596432336007e+00f,
|
||||||
1.0000000000000e+01, 1.1547819846895e+01,
|
1.0000000000000e+01f, 1.1547819846895e+01f,
|
||||||
1.3335214321633e+01, 1.5399265260595e+01,
|
1.3335214321633e+01f, 1.5399265260595e+01f,
|
||||||
1.7782794100389e+01, 2.0535250264571e+01,
|
1.7782794100389e+01f, 2.0535250264571e+01f,
|
||||||
2.3713737056617e+01, 2.7384196342644e+01,
|
2.3713737056617e+01f, 2.7384196342644e+01f,
|
||||||
3.1622776601684e+01, 3.6517412725484e+01,
|
3.1622776601684e+01f, 3.6517412725484e+01f,
|
||||||
4.2169650342858e+01, 4.8696752516586e+01,
|
4.2169650342858e+01f, 4.8696752516586e+01f,
|
||||||
5.6234132519035e+01, 6.4938163157621e+01,
|
5.6234132519035e+01f, 6.4938163157621e+01f,
|
||||||
7.4989420933246e+01, 8.6596432336007e+01,
|
7.4989420933246e+01f, 8.6596432336007e+01f,
|
||||||
1.0000000000000e+02, 1.1547819846895e+02,
|
1.0000000000000e+02f, 1.1547819846895e+02f,
|
||||||
1.3335214321633e+02, 1.5399265260595e+02,
|
1.3335214321633e+02f, 1.5399265260595e+02f,
|
||||||
1.7782794100389e+02, 2.0535250264571e+02,
|
1.7782794100389e+02f, 2.0535250264571e+02f,
|
||||||
2.3713737056617e+02, 2.7384196342644e+02,
|
2.3713737056617e+02f, 2.7384196342644e+02f,
|
||||||
3.1622776601684e+02, 3.6517412725484e+02,
|
3.1622776601684e+02f, 3.6517412725484e+02f,
|
||||||
4.2169650342858e+02, 4.8696752516586e+02,
|
4.2169650342858e+02f, 4.8696752516586e+02f,
|
||||||
5.6234132519035e+02, 6.4938163157621e+02,
|
5.6234132519035e+02f, 6.4938163157621e+02f,
|
||||||
7.4989420933246e+02, 8.6596432336007e+02,
|
7.4989420933246e+02f, 8.6596432336007e+02f,
|
||||||
1.0000000000000e+03, 1.1547819846895e+03,
|
1.0000000000000e+03f, 1.1547819846895e+03f,
|
||||||
1.3335214321633e+03, 1.5399265260595e+03,
|
1.3335214321633e+03f, 1.5399265260595e+03f,
|
||||||
1.7782794100389e+03, 2.0535250264571e+03,
|
1.7782794100389e+03f, 2.0535250264571e+03f,
|
||||||
2.3713737056617e+03, 2.7384196342644e+03,
|
2.3713737056617e+03f, 2.7384196342644e+03f,
|
||||||
3.1622776601684e+03, 3.6517412725484e+03,
|
3.1622776601684e+03f, 3.6517412725484e+03f,
|
||||||
4.2169650342858e+03, 4.8696752516586e+03,
|
4.2169650342858e+03f, 4.8696752516586e+03f,
|
||||||
5.6234132519035e+03, 6.4938163157621e+03,
|
5.6234132519035e+03f, 6.4938163157621e+03f,
|
||||||
7.4989420933246e+03, 8.6596432336007e+03,
|
7.4989420933246e+03f, 8.6596432336007e+03f,
|
||||||
1.0000000000000e+04, 1.1547819846895e+04,
|
1.0000000000000e+04f, 1.1547819846895e+04f,
|
||||||
1.3335214321633e+04, 1.5399265260595e+04,
|
1.3335214321633e+04f, 1.5399265260595e+04f,
|
||||||
1.7782794100389e+04, 2.0535250264571e+04,
|
1.7782794100389e+04f, 2.0535250264571e+04f,
|
||||||
2.3713737056617e+04, 2.7384196342644e+04,
|
2.3713737056617e+04f, 2.7384196342644e+04f,
|
||||||
3.1622776601684e+04, 3.6517412725484e+04,
|
3.1622776601684e+04f, 3.6517412725484e+04f,
|
||||||
4.2169650342858e+04, 4.8696752516586e+04,
|
4.2169650342858e+04f, 4.8696752516586e+04f,
|
||||||
5.6234132519035e+04, 6.4938163157621e+04,
|
5.6234132519035e+04f, 6.4938163157621e+04f,
|
||||||
7.4989420933246e+04, 8.6596432336007e+04,
|
7.4989420933246e+04f, 8.6596432336007e+04f,
|
||||||
1.0000000000000e+05, 1.1547819846895e+05,
|
1.0000000000000e+05f, 1.1547819846895e+05f,
|
||||||
1.3335214321633e+05, 1.5399265260595e+05,
|
1.3335214321633e+05f, 1.5399265260595e+05f,
|
||||||
1.7782794100389e+05, 2.0535250264571e+05,
|
1.7782794100389e+05f, 2.0535250264571e+05f,
|
||||||
2.3713737056617e+05, 2.7384196342644e+05,
|
2.3713737056617e+05f, 2.7384196342644e+05f,
|
||||||
3.1622776601684e+05, 3.6517412725484e+05,
|
3.1622776601684e+05f, 3.6517412725484e+05f,
|
||||||
4.2169650342858e+05, 4.8696752516586e+05,
|
4.2169650342858e+05f, 4.8696752516586e+05f,
|
||||||
5.6234132519035e+05, 6.4938163157621e+05,
|
5.6234132519035e+05f, 6.4938163157621e+05f,
|
||||||
7.4989420933246e+05, 8.6596432336007e+05,
|
7.4989420933246e+05f, 8.6596432336007e+05f,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool WMACodec::decodeExpHuffman(Common::BitStream8MSB &bits, int ch) {
|
bool WMACodec::decodeExpHuffman(Common::BitStream8MSB &bits, int ch) {
|
||||||
|
|
|
@ -1410,23 +1410,23 @@ const uint8 scaleHuffBits[121] = {
|
||||||
static const int kLSPCoefCount = 10;
|
static const int kLSPCoefCount = 10;
|
||||||
|
|
||||||
const float lspCodebook[kLSPCoefCount][16] = {
|
const float lspCodebook[kLSPCoefCount][16] = {
|
||||||
{ 1.98732877, 1.97944528, 1.97179088, 1.96260549, 1.95038374, 1.93336114, 1.90719232, 1.86191415, },
|
{ 1.98732877f, 1.97944528f, 1.97179088f, 1.96260549f, 1.95038374f, 1.93336114f, 1.90719232f, 1.86191415f, },
|
||||||
{ 1.97260000, 1.96083160, 1.94982586, 1.93806164, 1.92516608, 1.91010199, 1.89232331, 1.87149812,
|
{ 1.97260000f, 1.96083160f, 1.94982586f, 1.93806164f, 1.92516608f, 1.91010199f, 1.89232331f, 1.87149812f,
|
||||||
1.84564818, 1.81358067, 1.77620070, 1.73265264, 1.67907855, 1.60959081, 1.50829650, 1.33120330, },
|
1.84564818f, 1.81358067f, 1.77620070f, 1.73265264f, 1.67907855f, 1.60959081f, 1.50829650f, 1.33120330f, },
|
||||||
{ 1.90109110, 1.86482426, 1.83419671, 1.80168452, 1.76650116, 1.72816320, 1.68502700, 1.63738256,
|
{ 1.90109110f, 1.86482426f, 1.83419671f, 1.80168452f, 1.76650116f, 1.72816320f, 1.68502700f, 1.63738256f,
|
||||||
1.58501580, 1.51795181, 1.43679906, 1.33950585, 1.24176208, 1.12260729, 0.96749668, 0.74048265, },
|
1.58501580f, 1.51795181f, 1.43679906f, 1.33950585f, 1.24176208f, 1.12260729f, 0.96749668f, 0.74048265f, },
|
||||||
{ 1.76943864, 1.67822463, 1.59946365, 1.53560582, 1.47470796, 1.41210167, 1.34509536, 1.27339507,
|
{ 1.76943864f, 1.67822463f, 1.59946365f, 1.53560582f, 1.47470796f, 1.41210167f, 1.34509536f, 1.27339507f,
|
||||||
1.19303814, 1.09765169, 0.98818722, 0.87239446, 0.74369172, 0.59768184, 0.43168630, 0.17977021, },
|
1.19303814f, 1.09765169f, 0.98818722f, 0.87239446f, 0.74369172f, 0.59768184f, 0.43168630f, 0.17977021f, },
|
||||||
{ 1.43428349, 1.32038354, 1.21074086, 1.10577988, 1.00561746, 0.90335924, 0.80437489, 0.70709671,
|
{ 1.43428349f, 1.32038354f, 1.21074086f, 1.10577988f, 1.00561746f, 0.90335924f, 0.80437489f, 0.70709671f,
|
||||||
0.60427395, 0.49814048, 0.38509539, 0.27106800, 0.14407416, 0.00219910, -0.16725141, -0.36936085, },
|
0.60427395f, 0.49814048f, 0.38509539f, 0.27106800f, 0.14407416f, 0.00219910f, -0.16725141f, -0.36936085f, },
|
||||||
{ 0.99895687, 0.84188166, 0.70753739, 0.57906595, 0.47055563, 0.36966965, 0.26826648, 0.17163380,
|
{ 0.99895687f, 0.84188166f, 0.70753739f, 0.57906595f, 0.47055563f, 0.36966965f, 0.26826648f, 0.17163380f,
|
||||||
0.07208392, -0.03062936, -1.40037388, -0.25128968, -0.37213937, -0.51075646, -0.64887512, -0.80308031, },
|
0.07208392f, -0.03062936f, -1.40037388f, -0.25128968f, -0.37213937f, -0.51075646f, -0.64887512f, -0.80308031f, },
|
||||||
{ 0.26515280, 0.06313551, -0.08872080, -0.21103548, -0.31069678, -0.39680323, -0.47223474, -0.54167135,
|
{ 0.26515280f, 0.06313551f, -0.08872080f, -0.21103548f, -0.31069678f, -0.39680323f, -0.47223474f, -0.54167135f,
|
||||||
-0.61444740, -0.68943343, -0.76580211, -0.85170082, -0.95289061, -1.06514703, -1.20510707, -1.37617746, },
|
-0.61444740f, -0.68943343f, -0.76580211f, -0.85170082f, -0.95289061f, -1.06514703f, -1.20510707f, -1.37617746f, },
|
||||||
{ -0.53940301, -0.73770929, -0.88424876, -1.01117930, -1.13389091, -1.26830073, -1.42041987, -1.62033919,
|
{ -0.53940301f, -0.73770929f, -0.88424876f, -1.01117930f, -1.13389091f, -1.26830073f, -1.42041987f, -1.62033919f,
|
||||||
-1.10158808, -1.16512566, -1.23337128, -1.30414401, -1.37663312, -1.46853845, -1.57625798, -1.66893638, },
|
-1.10158808f, -1.16512566f, -1.23337128f, -1.30414401f, -1.37663312f, -1.46853845f, -1.57625798f, -1.66893638f, },
|
||||||
{ -0.38601997, -0.56009350, -0.66978483, -0.76028471, -0.83846064, -0.90868087, -0.97408881, -1.03694962, },
|
{ -0.38601997f, -0.56009350f, -0.66978483f, -0.76028471f, -0.83846064f, -0.90868087f, -0.97408881f, -1.03694962f, },
|
||||||
{ -1.56144989, -1.65944032, -1.72689685, -1.77857740, -1.82203011, -1.86220079, -1.90283983, -1.94820479, },
|
{ -1.56144989f, -1.65944032f, -1.72689685f, -1.77857740f, -1.82203011f, -1.86220079f, -1.90283983f, -1.94820479f, },
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Audio
|
} // End of namespace Audio
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
// Disable symbol overrides so that we can use FILE, fopen etc.
|
// Disable symbol overrides so that we can use FILE, fopen etc.
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||||
|
|
||||||
#include "backends/fs/stdiostream.h"
|
|
||||||
|
|
||||||
// for Windows unicode fopen(): _wfopen()
|
// for Windows unicode fopen(): _wfopen()
|
||||||
#if defined(WIN32) && defined(UNICODE)
|
#if defined(WIN32) && defined(UNICODE)
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -33,6 +31,9 @@
|
||||||
#include "backends/platform/sdl/win32/win32_wrapper.h"
|
#include "backends/platform/sdl/win32/win32_wrapper.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Include this after windows.h so we don't get a warning for redefining ARRAYSIZE
|
||||||
|
#include "backends/fs/stdiostream.h"
|
||||||
|
|
||||||
StdioStream::StdioStream(void *handle) : _handle(handle) {
|
StdioStream::StdioStream(void *handle) : _handle(handle) {
|
||||||
assert(handle);
|
assert(handle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1113,7 +1113,8 @@ uint32 GzioReadStream::read(void *dataPtr, uint32 dataSize) {
|
||||||
|
|
||||||
int32 actualRead = readAtOffset(_streamPos, (byte *)dataPtr, dataSize);
|
int32 actualRead = readAtOffset(_streamPos, (byte *)dataPtr, dataSize);
|
||||||
if (actualRead < 0) {
|
if (actualRead < 0) {
|
||||||
return -1;
|
_err = true;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
_streamPos += actualRead;
|
_streamPos += actualRead;
|
||||||
|
|
|
@ -128,9 +128,9 @@ ManagedSurface *renderPM5544(int xres, int yres) {
|
||||||
int squaresize = 8;
|
int squaresize = 8;
|
||||||
int gapsize = 2;
|
int gapsize = 2;
|
||||||
|
|
||||||
int width, height;
|
int width = 0, height = 0;
|
||||||
int rwidth, rheight;
|
int rwidth = 0, rheight = 0;
|
||||||
int xsquares, ysquares;
|
int xsquares = 0, ysquares = 0;
|
||||||
|
|
||||||
int xcenter = xres / 2 - xres % 2;
|
int xcenter = xres / 2 - xres % 2;
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,7 @@ void OptionsDialog::build() {
|
||||||
if (ConfMan.hasKey("antialiasing", _domain)) {
|
if (ConfMan.hasKey("antialiasing", _domain)) {
|
||||||
_antiAliasPopUp->setSelectedTag(ConfMan.getInt("antialiasing", _domain));
|
_antiAliasPopUp->setSelectedTag(ConfMan.getInt("antialiasing", _domain));
|
||||||
} else {
|
} else {
|
||||||
_antiAliasPopUp->setSelectedTag(-1);
|
_antiAliasPopUp->setSelectedTag(0xffffffffu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1599,7 +1599,7 @@ void OptionsDialog::addGraphicControls(GuiObject *boss, const Common::String &pr
|
||||||
|
|
||||||
_antiAliasPopUpDesc = new StaticTextWidget(boss, prefix + "grAntiAliasPopupDesc", _("3D Anti-aliasing:"));
|
_antiAliasPopUpDesc = new StaticTextWidget(boss, prefix + "grAntiAliasPopupDesc", _("3D Anti-aliasing:"));
|
||||||
_antiAliasPopUp = new PopUpWidget(boss, prefix + "grAntiAliasPopup");
|
_antiAliasPopUp = new PopUpWidget(boss, prefix + "grAntiAliasPopup");
|
||||||
_antiAliasPopUp->appendEntry(_("<default>"), -1);
|
_antiAliasPopUp->appendEntry(_("<default>"), 0xffffffffu);
|
||||||
_antiAliasPopUp->appendEntry("");
|
_antiAliasPopUp->appendEntry("");
|
||||||
_antiAliasPopUp->appendEntry(_("Disabled"), 0);
|
_antiAliasPopUp->appendEntry(_("Disabled"), 0);
|
||||||
const Common::Array<uint> levels = g_system->getSupportedAntiAliasingLevels();
|
const Common::Array<uint> levels = g_system->getSupportedAntiAliasingLevels();
|
||||||
|
|
|
@ -130,18 +130,18 @@ bool Cel3DODecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||||
stopLine = true;
|
stopLine = true;
|
||||||
break;
|
break;
|
||||||
case 1: // copy
|
case 1: // copy
|
||||||
for (uint i = 0; i <= (lead & 0x3f) && linerem > 0 && linecomprem > 0;
|
for (uint i = 0; i <= (lead & 0x3fu) && linerem > 0 && linecomprem > 0;
|
||||||
i++, linerem--, linecomprem -= 2)
|
i++, linerem--, linecomprem -= 2)
|
||||||
*dst++ = stream.readUint16BE();
|
*dst++ = stream.readUint16BE();
|
||||||
break;
|
break;
|
||||||
case 2: // black
|
case 2: // black
|
||||||
for (uint i = 0; i <= (lead & 0x3f) && linerem > 0; i++, linerem--)
|
for (uint i = 0; i <= (lead & 0x3fu) && linerem > 0; i++, linerem--)
|
||||||
*dst++ = 0;
|
*dst++ = 0;
|
||||||
break;
|
break;
|
||||||
case 3: { // RLE multiply
|
case 3: { // RLE multiply
|
||||||
uint16 rleval = stream.readUint16BE();
|
uint16 rleval = stream.readUint16BE();
|
||||||
linecomprem -= 2;
|
linecomprem -= 2;
|
||||||
for (uint i = 0; i <= (lead & 0x3f) && linerem > 0; i++, linerem--)
|
for (uint i = 0; i <= (lead & 0x3fu) && linerem > 0; i++, linerem--)
|
||||||
*dst++ = rleval;
|
*dst++ = rleval;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,7 +310,7 @@ int VLC::allocTable(int size, int useStatic) {
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(vlc->_table + vlc->_tableAllocated - (1 << vlc->_bits), 0, sizeof(VLC_TYPE) * 2 << vlc->_bits);
|
memset(vlc->_table + vlc->_tableAllocated - (static_cast<ptrdiff_t>(1) << vlc->_bits), 0, sizeof(VLC_TYPE) * 2 << vlc->_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
|
|
2040
math/sinewindows.cpp
2040
math/sinewindows.cpp
File diff suppressed because it is too large
Load diff
|
@ -226,7 +226,7 @@ void HNMDecoder::readNextPacket() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We use -1 here to discrimate a possibly empty sound frame
|
// We use -1 here to discrimate a possibly empty sound frame
|
||||||
uint32 audioNumSamples = -1;
|
uint32 audioNumSamples = uint32(-1);
|
||||||
|
|
||||||
byte *data_p = _dataBuffer;
|
byte *data_p = _dataBuffer;
|
||||||
while (superchunkRemaining > 0) {
|
while (superchunkRemaining > 0) {
|
||||||
|
@ -912,8 +912,8 @@ void HNMDecoder::HNM5VideoTrack::decodeFrame(byte *data, uint32 size) {
|
||||||
uint16 pitch = _surface.pitch;
|
uint16 pitch = _surface.pitch;
|
||||||
bool eop = false;
|
bool eop = false;
|
||||||
|
|
||||||
byte height = -1;
|
byte height = 0xff;
|
||||||
byte currentMode = -1;
|
byte currentMode = 0xff;
|
||||||
uint32 currentPos = 0;
|
uint32 currentPos = 0;
|
||||||
|
|
||||||
while (!eop) {
|
while (!eop) {
|
||||||
|
@ -925,7 +925,7 @@ void HNMDecoder::HNM5VideoTrack::decodeFrame(byte *data, uint32 size) {
|
||||||
size -= 1;
|
size -= 1;
|
||||||
|
|
||||||
if (opcode == 0x20) {
|
if (opcode == 0x20) {
|
||||||
assert(height != byte(-1));
|
assert(height != 0xff);
|
||||||
if (size < 1) {
|
if (size < 1) {
|
||||||
error("Not enough data for opcode 0x20");
|
error("Not enough data for opcode 0x20");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue