Remove all warnings in gba/bios.cpp

A regression from #1008 was identified as the root cause for #1050 and
fixed in #1051. This is a follow-up that changes the constants used
for `sineTable` to be unsigned hex, which fixes warnings in MSVC
without breaking changes.

Bug: #1003
This commit is contained in:
Fabrice de Gans 2023-01-07 15:19:23 -08:00 committed by Rafael Kitover
parent 2e3ce863c7
commit addd53b69d
1 changed files with 33 additions and 33 deletions

View File

@ -8,38 +8,38 @@
#include "bios.h"
int16_t sineTable[256] = {
(int16_t)0x0000, (int16_t)0x0192, (int16_t)0x0323, (int16_t)0x04B5, (int16_t)0x0645, (int16_t)0x07D5, (int16_t)0x0964, (int16_t)0x0AF1,
(int16_t)0x0C7C, (int16_t)0x0E05, (int16_t)0x0F8C, (int16_t)0x1111, (int16_t)0x1294, (int16_t)0x1413, (int16_t)0x158F, (int16_t)0x1708,
(int16_t)0x187D, (int16_t)0x19EF, (int16_t)0x1B5D, (int16_t)0x1CC6, (int16_t)0x1E2B, (int16_t)0x1F8B, (int16_t)0x20E7, (int16_t)0x223D,
(int16_t)0x238E, (int16_t)0x24DA, (int16_t)0x261F, (int16_t)0x275F, (int16_t)0x2899, (int16_t)0x29CD, (int16_t)0x2AFA, (int16_t)0x2C21,
(int16_t)0x2D41, (int16_t)0x2E5A, (int16_t)0x2F6B, (int16_t)0x3076, (int16_t)0x3179, (int16_t)0x3274, (int16_t)0x3367, (int16_t)0x3453,
(int16_t)0x3536, (int16_t)0x3612, (int16_t)0x36E5, (int16_t)0x37AF, (int16_t)0x3871, (int16_t)0x392A, (int16_t)0x39DA, (int16_t)0x3A82,
(int16_t)0x3B20, (int16_t)0x3BB6, (int16_t)0x3C42, (int16_t)0x3CC5, (int16_t)0x3D3E, (int16_t)0x3DAE, (int16_t)0x3E14, (int16_t)0x3E71,
(int16_t)0x3EC5, (int16_t)0x3F0E, (int16_t)0x3F4E, (int16_t)0x3F84, (int16_t)0x3FB1, (int16_t)0x3FD3, (int16_t)0x3FEC, (int16_t)0x3FFB,
(int16_t)0x4000, (int16_t)0x3FFB, (int16_t)0x3FEC, (int16_t)0x3FD3, (int16_t)0x3FB1, (int16_t)0x3F84, (int16_t)0x3F4E, (int16_t)0x3F0E,
(int16_t)0x3EC5, (int16_t)0x3E71, (int16_t)0x3E14, (int16_t)0x3DAE, (int16_t)0x3D3E, (int16_t)0x3CC5, (int16_t)0x3C42, (int16_t)0x3BB6,
(int16_t)0x3B20, (int16_t)0x3A82, (int16_t)0x39DA, (int16_t)0x392A, (int16_t)0x3871, (int16_t)0x37AF, (int16_t)0x36E5, (int16_t)0x3612,
(int16_t)0x3536, (int16_t)0x3453, (int16_t)0x3367, (int16_t)0x3274, (int16_t)0x3179, (int16_t)0x3076, (int16_t)0x2F6B, (int16_t)0x2E5A,
(int16_t)0x2D41, (int16_t)0x2C21, (int16_t)0x2AFA, (int16_t)0x29CD, (int16_t)0x2899, (int16_t)0x275F, (int16_t)0x261F, (int16_t)0x24DA,
(int16_t)0x238E, (int16_t)0x223D, (int16_t)0x20E7, (int16_t)0x1F8B, (int16_t)0x1E2B, (int16_t)0x1CC6, (int16_t)0x1B5D, (int16_t)0x19EF,
(int16_t)0x187D, (int16_t)0x1708, (int16_t)0x158F, (int16_t)0x1413, (int16_t)0x1294, (int16_t)0x1111, (int16_t)0x0F8C, (int16_t)0x0E05,
(int16_t)0x0C7C, (int16_t)0x0AF1, (int16_t)0x0964, (int16_t)0x07D5, (int16_t)0x0645, (int16_t)0x04B5, (int16_t)0x0323, (int16_t)0x0192,
(int16_t)0x0000, (int16_t)0xFE6E, (int16_t)0xFCDD, (int16_t)0xFB4B, (int16_t)0xF9BB, (int16_t)0xF82B, (int16_t)0xF69C, (int16_t)0xF50F,
(int16_t)0xF384, (int16_t)0xF1FB, (int16_t)0xF074, (int16_t)0xEEEF, (int16_t)0xED6C, (int16_t)0xEBED, (int16_t)0xEA71, (int16_t)0xE8F8,
(int16_t)0xE783, (int16_t)0xE611, (int16_t)0xE4A3, (int16_t)0xE33A, (int16_t)0xE1D5, (int16_t)0xE075, (int16_t)0xDF19, (int16_t)0xDDC3,
(int16_t)0xDC72, (int16_t)0xDB26, (int16_t)0xD9E1, (int16_t)0xD8A1, (int16_t)0xD767, (int16_t)0xD633, (int16_t)0xD506, (int16_t)0xD3DF,
(int16_t)0xD2BF, (int16_t)0xD1A6, (int16_t)0xD095, (int16_t)0xCF8A, (int16_t)0xCE87, (int16_t)0xCD8C, (int16_t)0xCC99, (int16_t)0xCBAD,
(int16_t)0xCACA, (int16_t)0xC9EE, (int16_t)0xC91B, (int16_t)0xC851, (int16_t)0xC78F, (int16_t)0xC6D6, (int16_t)0xC626, (int16_t)0xC57E,
(int16_t)0xC4E0, (int16_t)0xC44A, (int16_t)0xC3BE, (int16_t)0xC33B, (int16_t)0xC2C2, (int16_t)0xC252, (int16_t)0xC1EC, (int16_t)0xC18F,
(int16_t)0xC13B, (int16_t)0xC0F2, (int16_t)0xC0B2, (int16_t)0xC07C, (int16_t)0xC04F, (int16_t)0xC02D, (int16_t)0xC014, (int16_t)0xC005,
(int16_t)0xC000, (int16_t)0xC005, (int16_t)0xC014, (int16_t)0xC02D, (int16_t)0xC04F, (int16_t)0xC07C, (int16_t)0xC0B2, (int16_t)0xC0F2,
(int16_t)0xC13B, (int16_t)0xC18F, (int16_t)0xC1EC, (int16_t)0xC252, (int16_t)0xC2C2, (int16_t)0xC33B, (int16_t)0xC3BE, (int16_t)0xC44A,
(int16_t)0xC4E0, (int16_t)0xC57E, (int16_t)0xC626, (int16_t)0xC6D6, (int16_t)0xC78F, (int16_t)0xC851, (int16_t)0xC91B, (int16_t)0xC9EE,
(int16_t)0xCACA, (int16_t)0xCBAD, (int16_t)0xCC99, (int16_t)0xCD8C, (int16_t)0xCE87, (int16_t)0xCF8A, (int16_t)0xD095, (int16_t)0xD1A6,
(int16_t)0xD2BF, (int16_t)0xD3DF, (int16_t)0xD506, (int16_t)0xD633, (int16_t)0xD767, (int16_t)0xD8A1, (int16_t)0xD9E1, (int16_t)0xDB26,
(int16_t)0xDC72, (int16_t)0xDDC3, (int16_t)0xDF19, (int16_t)0xE075, (int16_t)0xE1D5, (int16_t)0xE33A, (int16_t)0xE4A3, (int16_t)0xE611,
(int16_t)0xE783, (int16_t)0xE8F8, (int16_t)0xEA71, (int16_t)0xEBED, (int16_t)0xED6C, (int16_t)0xEEEF, (int16_t)0xF074, (int16_t)0xF1FB,
(int16_t)0xF384, (int16_t)0xF50F, (int16_t)0xF69C, (int16_t)0xF82B, (int16_t)0xF9BB, (int16_t)0xFB4B, (int16_t)0xFCDD, (int16_t)0xFE6E
(int16_t)0x0000u, (int16_t)0x0192u, (int16_t)0x0323u, (int16_t)0x04B5u, (int16_t)0x0645u, (int16_t)0x07D5u, (int16_t)0x0964u, (int16_t)0x0AF1u,
(int16_t)0x0C7Cu, (int16_t)0x0E05u, (int16_t)0x0F8Cu, (int16_t)0x1111u, (int16_t)0x1294u, (int16_t)0x1413u, (int16_t)0x158Fu, (int16_t)0x1708u,
(int16_t)0x187Du, (int16_t)0x19EFu, (int16_t)0x1B5Du, (int16_t)0x1CC6u, (int16_t)0x1E2Bu, (int16_t)0x1F8Bu, (int16_t)0x20E7u, (int16_t)0x223Du,
(int16_t)0x238Eu, (int16_t)0x24DAu, (int16_t)0x261Fu, (int16_t)0x275Fu, (int16_t)0x2899u, (int16_t)0x29CDu, (int16_t)0x2AFAu, (int16_t)0x2C21u,
(int16_t)0x2D41u, (int16_t)0x2E5Au, (int16_t)0x2F6Bu, (int16_t)0x3076u, (int16_t)0x3179u, (int16_t)0x3274u, (int16_t)0x3367u, (int16_t)0x3453u,
(int16_t)0x3536u, (int16_t)0x3612u, (int16_t)0x36E5u, (int16_t)0x37AFu, (int16_t)0x3871u, (int16_t)0x392Au, (int16_t)0x39DAu, (int16_t)0x3A82u,
(int16_t)0x3B20u, (int16_t)0x3BB6u, (int16_t)0x3C42u, (int16_t)0x3CC5u, (int16_t)0x3D3Eu, (int16_t)0x3DAEu, (int16_t)0x3E14u, (int16_t)0x3E71u,
(int16_t)0x3EC5u, (int16_t)0x3F0Eu, (int16_t)0x3F4Eu, (int16_t)0x3F84u, (int16_t)0x3FB1u, (int16_t)0x3FD3u, (int16_t)0x3FECu, (int16_t)0x3FFBu,
(int16_t)0x4000u, (int16_t)0x3FFBu, (int16_t)0x3FECu, (int16_t)0x3FD3u, (int16_t)0x3FB1u, (int16_t)0x3F84u, (int16_t)0x3F4Eu, (int16_t)0x3F0Eu,
(int16_t)0x3EC5u, (int16_t)0x3E71u, (int16_t)0x3E14u, (int16_t)0x3DAEu, (int16_t)0x3D3Eu, (int16_t)0x3CC5u, (int16_t)0x3C42u, (int16_t)0x3BB6u,
(int16_t)0x3B20u, (int16_t)0x3A82u, (int16_t)0x39DAu, (int16_t)0x392Au, (int16_t)0x3871u, (int16_t)0x37AFu, (int16_t)0x36E5u, (int16_t)0x3612u,
(int16_t)0x3536u, (int16_t)0x3453u, (int16_t)0x3367u, (int16_t)0x3274u, (int16_t)0x3179u, (int16_t)0x3076u, (int16_t)0x2F6Bu, (int16_t)0x2E5Au,
(int16_t)0x2D41u, (int16_t)0x2C21u, (int16_t)0x2AFAu, (int16_t)0x29CDu, (int16_t)0x2899u, (int16_t)0x275Fu, (int16_t)0x261Fu, (int16_t)0x24DAu,
(int16_t)0x238Eu, (int16_t)0x223Du, (int16_t)0x20E7u, (int16_t)0x1F8Bu, (int16_t)0x1E2Bu, (int16_t)0x1CC6u, (int16_t)0x1B5Du, (int16_t)0x19EFu,
(int16_t)0x187Du, (int16_t)0x1708u, (int16_t)0x158Fu, (int16_t)0x1413u, (int16_t)0x1294u, (int16_t)0x1111u, (int16_t)0x0F8Cu, (int16_t)0x0E05u,
(int16_t)0x0C7Cu, (int16_t)0x0AF1u, (int16_t)0x0964u, (int16_t)0x07D5u, (int16_t)0x0645u, (int16_t)0x04B5u, (int16_t)0x0323u, (int16_t)0x0192u,
(int16_t)0x0000u, (int16_t)0xFE6Eu, (int16_t)0xFCDDu, (int16_t)0xFB4Bu, (int16_t)0xF9BBu, (int16_t)0xF82Bu, (int16_t)0xF69Cu, (int16_t)0xF50Fu,
(int16_t)0xF384u, (int16_t)0xF1FBu, (int16_t)0xF074u, (int16_t)0xEEEFu, (int16_t)0xED6Cu, (int16_t)0xEBEDu, (int16_t)0xEA71u, (int16_t)0xE8F8u,
(int16_t)0xE783u, (int16_t)0xE611u, (int16_t)0xE4A3u, (int16_t)0xE33Au, (int16_t)0xE1D5u, (int16_t)0xE075u, (int16_t)0xDF19u, (int16_t)0xDDC3u,
(int16_t)0xDC72u, (int16_t)0xDB26u, (int16_t)0xD9E1u, (int16_t)0xD8A1u, (int16_t)0xD767u, (int16_t)0xD633u, (int16_t)0xD506u, (int16_t)0xD3DFu,
(int16_t)0xD2BFu, (int16_t)0xD1A6u, (int16_t)0xD095u, (int16_t)0xCF8Au, (int16_t)0xCE87u, (int16_t)0xCD8Cu, (int16_t)0xCC99u, (int16_t)0xCBADu,
(int16_t)0xCACAu, (int16_t)0xC9EEu, (int16_t)0xC91Bu, (int16_t)0xC851u, (int16_t)0xC78Fu, (int16_t)0xC6D6u, (int16_t)0xC626u, (int16_t)0xC57Eu,
(int16_t)0xC4E0u, (int16_t)0xC44Au, (int16_t)0xC3BEu, (int16_t)0xC33Bu, (int16_t)0xC2C2u, (int16_t)0xC252u, (int16_t)0xC1ECu, (int16_t)0xC18Fu,
(int16_t)0xC13Bu, (int16_t)0xC0F2u, (int16_t)0xC0B2u, (int16_t)0xC07Cu, (int16_t)0xC04Fu, (int16_t)0xC02Du, (int16_t)0xC014u, (int16_t)0xC005u,
(int16_t)0xC000u, (int16_t)0xC005u, (int16_t)0xC014u, (int16_t)0xC02Du, (int16_t)0xC04Fu, (int16_t)0xC07Cu, (int16_t)0xC0B2u, (int16_t)0xC0F2u,
(int16_t)0xC13Bu, (int16_t)0xC18Fu, (int16_t)0xC1ECu, (int16_t)0xC252u, (int16_t)0xC2C2u, (int16_t)0xC33Bu, (int16_t)0xC3BEu, (int16_t)0xC44Au,
(int16_t)0xC4E0u, (int16_t)0xC57Eu, (int16_t)0xC626u, (int16_t)0xC6D6u, (int16_t)0xC78Fu, (int16_t)0xC851u, (int16_t)0xC91Bu, (int16_t)0xC9EEu,
(int16_t)0xCACAu, (int16_t)0xCBADu, (int16_t)0xCC99u, (int16_t)0xCD8Cu, (int16_t)0xCE87u, (int16_t)0xCF8Au, (int16_t)0xD095u, (int16_t)0xD1A6u,
(int16_t)0xD2BFu, (int16_t)0xD3DFu, (int16_t)0xD506u, (int16_t)0xD633u, (int16_t)0xD767u, (int16_t)0xD8A1u, (int16_t)0xD9E1u, (int16_t)0xDB26u,
(int16_t)0xDC72u, (int16_t)0xDDC3u, (int16_t)0xDF19u, (int16_t)0xE075u, (int16_t)0xE1D5u, (int16_t)0xE33Au, (int16_t)0xE4A3u, (int16_t)0xE611u,
(int16_t)0xE783u, (int16_t)0xE8F8u, (int16_t)0xEA71u, (int16_t)0xEBEDu, (int16_t)0xED6Cu, (int16_t)0xEEEFu, (int16_t)0xF074u, (int16_t)0xF1FBu,
(int16_t)0xF384u, (int16_t)0xF50Fu, (int16_t)0xF69Cu, (int16_t)0xF82Bu, (int16_t)0xF9BBu, (int16_t)0xFB4Bu, (int16_t)0xFCDDu, (int16_t)0xFE6Eu
};
// 2020-08-12 - negativeExponent
@ -1225,7 +1225,7 @@ static int32_t BIOS_SndDriver_3e4(uint32_t const r0a, uint32_t const r1a) // 0x3
}
if ((r12 << 1) == 0)
return -v5;
return 0 - v5;
return v5;
}