New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganizing fix library #195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is requiring zlib1.dll in installdir. Is this intentional? (Debug/windows) -- game runs fine otherwise. |
@@ -100,9 +97,6 @@ void InitMathTables() { | |||
|
|||
asin_table[256] = asin_table[255]; | |||
acos_table[256] = acos_table[255]; | |||
|
|||
// Initialize a random seed. | |||
ps_srand(time(NULL)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is not needed to initialize the random number generator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they relocated seed initialization to init.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random seed was injected into InitMathTables when it was part of vecmat submodule. Logically seed initialization not belongs to vecmat or fixmat components so I decided to move it out to common initialization function.
Fix most of "narrowing conversion" warnings.
Seem this was done to ease linking mission dlls. Now these missions are reusing fix as static library.
Seems this is totally unrelated to fix library API. Moved ps_srand() to appropriate places right after InitMathTables();
Fixed point math library was part of the Vector math library until it was splitted to its own. Before that there was bundled version of vecmat code in scripts. This PR makes the library an isolated submodule that can be linked to any other.
Additional enhancements includes fixing minor warnings and removing unused Mac OS and Windows asm code.