Commit Graph

6 Commits

Author SHA1 Message Date
Mitchell Richters 1354d52c05 - Major cleanup of Q16.16 utilisation within games and engine.
* Remove fix16.h/cpp and utilise library from m_fixed.h.
* Extend m_fixed.h with two inline functions for int to/from float operations.
* Replace fix16_floor operations with those from xs_Float.h
* Replace multiple Q16.16 conversions from 0 to just be 0.
* Replaced all found in-game bit-shifts and multiplications/divisions with inline functions from m_fixed.h
* Replaced many casts of FRACUNIT as double in SW's panel.cpp as it is converted to double by way of type promotion.
* Fixed missed precision fixes in SW's panel.cpp where some types weren't declared correctly.
* Replaced 100+ `Cos()/Sin() >> 16` operations for Blood with inline functions `CosScale16()/SinScale16()`.
2020-09-01 23:00:47 +10:00
Mitchell Richters f046c5eb6b - fix compiler warnings and actual issues with in-game horizon.
* Can't have a - operator on unsigned int in the binangle class.
* Changed fixed horiz class from unsigned to signed as in-game horizon is a signed integer.
2020-07-24 01:08:50 +10:00
Christoph Oelckers 945dbc9f7e Use type safe angle and horizon classes for the render interface
These need to be robust and not allow implicit conversions.
2020-07-23 17:03:11 +02:00
Christoph Oelckers 9742bc72aa - created a horizon class as well. 2020-07-23 17:02:59 +02:00
Christoph Oelckers ab8006cc40 - make binaryangle.h compile. 2020-07-23 17:02:59 +02:00
Christoph Oelckers 7d414fcfa5 - binary angle class draft. 2020-07-22 21:16:29 +02:00