elasota
e280186a8c
ALL: VS warning cleanup
2022-12-25 16:31:57 +01:00
Cameron Cawley
e04000d4b0
COMMON: Move FFT, DCT, MDCT, RDFT, SineTable, CosineTable and getSineWindow into Math
2022-11-20 14:32:05 +01:00
Donovan Watteau
4ac33a72c2
MATH: Just look for a GCC compatible compiler for __builtin_clz()
...
There's no need to check for GCC 3.4+ anymore, since we always require
a C++11 compiler. Just look for __GNUC__, since this is an old
builtin and Clang always has it too.
Also #undef the LT() temporary macro while there, so that it can't
pollute something else by accident, since it's a short macro name in
a header file.
2022-05-25 19:07:30 +03:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs
2021-04-15 21:20:36 +02:00
Eugene Sandulenko
b1c5e63de0
JANITORIAL: Whitespace fixes
2020-06-06 15:08:33 +02:00
Eugene Sandulenko
83c8035fbc
MATH: Added hypotenuse() call
2020-06-06 15:08:17 +02:00
Cameron Cawley
3cb6a84f03
BLADERUNNER: Remove use of C99 math functions
2019-10-03 23:52:46 +01:00
David Fioramonti
8d10fbe1ba
COMMON: coding convention improvements for degree conversion funcs
...
Removed whitespace before template keyword.
Made template types camel case starting with lowercase.
2018-05-28 23:00:53 +01:00
David Fioramonti
abb8ae0936
COMMON: Template deg2rad and rad2deg in Common/math
...
The input and output type can be different.
Currently, rad2deg is only being used by sci (float to int)
and deg2rad in wintermute.
2018-05-20 11:21:06 +01:00
Colin Snover
a5bc89102e
ALL: Remove obsolete register keyword
...
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809 >,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340 >, so
cannot exist in a well-formed C++17 program.
It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html >
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859 >.
The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.
Closes gh-1079.
2017-12-03 20:27:42 -06:00
Johannes Schickel
ec6f00ed1d
COMMON: Make Rad<->Deg conversion use float constants.
...
Since we take a float parameter and return a float value we will also just
work on float values all the way. This silences some float conversion
warnings.
2014-06-02 01:00:15 +02:00
Johannes Schickel
854e22b38b
COMMON: Make GPL headers consistent in themselves.
2014-02-18 02:39:33 +01:00
D G Turner
26a9b528da
COMMON: Move definition of math constants to scummsys header.
...
This should have no effect on common/math.h as scummsys is included at
the top anyway, but this will fix compilation on some toolchains when
strict ANSI language compliance is enabled i.e. -std=c++11, rather than
-std=gnu11.
This causes an issue as a side effect is to set a guard which disables
various non-standard defines in the system headers i.e. the M_PI and
M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on
buildbot.
By moving this into scummsys.h after the point of system math.h
inclusion, we can ensure that M_PI etc. are always present.
2013-07-31 06:18:58 +01:00
Christoph Mallon
a64b5e2a77
ALL: Use GCC_ATLEAST().
2012-03-17 20:09:49 +01:00
Bertrand Augereau
ff98725172
COMMON: intLog2 uses _BitScanReverse on MSVC
2011-08-19 01:05:37 +02:00
Johannes Schickel
950faa4143
COMMON: Limited gcc specific intLog2 to gcc 3.4 or newer.
...
Older gcc versions did not include __builtin_clz, which made the PS2 port
fail to compile, since it uses 3.2.2.
2011-07-24 20:18:21 +02:00
Johannes Schickel
a1bfbe65ba
COMMON: Add an optimized intLog2 implementation for gcc using __builtin_clz.
...
This is done as discussed here:
54f25aa843
2011-07-24 19:54:49 +02:00
Johannes Schickel
b609100a56
COMMON: Let intLog2 return an int instead of uint32, since it should return -1 for 0.
2011-07-24 19:53:48 +02:00
Matthew Hoops
6334ec413f
COMMON: Move cosine/sine tables out of header files
...
Access is now restricted to using the getSineTable()/getCosineTable() helper functions.
2011-07-19 00:45:16 -04:00
D G Turner
54f25aa843
COMMON: Renamed Integer Log2 function from log2 to intLog2.
...
This avoids naming collisions with system libraries on some platforms
i.e. DS, DC where the log2 is realised by macro.
2011-07-19 02:29:13 +01:00
Matthew Hoops
26d15ce675
COMMON: Fix comment
2011-07-18 11:53:47 -04:00
Matthew Hoops
87b4ef5547
COMMON: Update code from eos
2011-07-18 10:28:10 -04:00
Matthew Hoops
c4d3a86010
COMMON: Remove USE_BINK checks from header files
2011-07-18 10:13:50 -04:00
Matthew Hoops
a50abde1b1
BUILD: Allow for disabling Bink support
2011-07-13 12:08:26 -04:00
Matthew Hoops
7dc7271316
COMMON: Remove unused vector2orientation function
2011-07-03 13:32:05 -04:00
Matthew Hoops
1d4ec6f1d1
COMMON: Add some simple math utilities
...
Based on eos' code
2011-07-02 15:15:04 -04:00