9 Commits

Author SHA1 Message Date
Mark de Wever
d7fb34f89c Optimize the down scaling of an Sint32.
While reviewing the compiler output for the last commit, noticed the
code still used a division instead of a shift.
2012-03-11 13:14:32 +00:00
Mark de Wever
6f21500ce0 Improve the multiply instruction.
It now keeps more resolution and is less prone to overflows (unless of
course the result overflows). The code is aimed at an ARM v7 so might be
slow on platforms that do not support an instruction for:
32-bit signed * 32-bit signed = 64-bit signed

The alternative was to write code like for the division, but that would
be more code and slower on platforms with fast 64-bit multiplication
result.

The output of the titlescreen image now looks less dark as before this
modification.
2012-03-11 13:14:29 +00:00
Mark de Wever
79f4a85e33 Move the ttracer class to its own file.
The class also makes sense to use outside the floating point emulation code.
2012-03-06 20:14:44 +00:00
Mark de Wever
2f52d77416 Improve the quality of the division operator.
It now tries to keep as much resolution as possible. The code still
needs to be optimised for speed.
2012-03-04 21:28:22 +00:00
Mark de Wever
f97c386c68 Add tracer code for the floating point emulation.
The code isn't used yet, but it will be used to determine the proper
branch decisions in not yet committed code.
2012-03-04 21:28:20 +00:00
Mark de Wever
7b27e2633f Add more comment to the floating point emulation. 2012-03-04 21:28:17 +00:00
Mark de Wever
b6c2a60904 Allow to select the floating point emulation type.
Adds several helper macros and documentation.
2012-02-21 21:10:06 +00:00
Anonymissimus
f8563468ac mute some MSVC warnings 2012-02-20 19:30:21 +00:00
Mark de Wever
b2c0dfa7df Adds new floating point emulation code.
This code can use several fixed point formats or a double to emulate
floating point code. The code is still work in progress. The intention
is to replace the current fixed point code and use it in more
areas. Hopefully this makes Wesnoth run snappier on devices with slow
floating point hardware, read the Pandora.

By default it uses doubles, so when used in existing code there should
be no differences, between the existing code and the new code.
2012-02-19 10:07:58 +00:00