Fixes issue introduced by bb142d5769 because someone didn't check the C standard to verify it was ok to use (it was me).
`strcasestr` is not apart of the C standard and is a GNU extension. Windows does not play well with this. The solution was to define a quite simple custom function partially based on the glibc implementation. Function should be reviewed.
The existing draw distance options don't actually increase the draw distance. It only impacts whether or not distant objects are rendered.
This PR:
- Adds another option to the draw distance setting in the display menu, called "Infinite". It is not truly infinite, but it is significantly larger than what current options allow. Due to it not being truly infinite, we could use the name "Max" instead to be more accurate.
- Exposes a new function to the Lua API `draw_distance_scalar_is_infinite` which returns whether or not the infinite setting is enabled.
- `draw_distance_scalar_is_infinite` is now used in several places in this repo to bypass distance checks for objects if infinite mode is enabled.
- Fixes a bug where you couldn't bypass the distance check in `obj_is_in_view`, meaning you could never disable all object distance culling.
- The infinite setting now forces the far plane to be at least a minimum of `1,000,000`.
* C++ lighting engine
Runs better using my new system for storing and iterating through lights.
I removed the lighting ctx profiler because after I've realized its very inaccurate and was probably programmed incorrectly from the start. Although I remember it working fine before and not constantly showing 20 ms or higher when I'm in an extremely simple level with extremely simple lights and the FPS is way too high for it to be taking 20 ms.
* Whoops
* Make some optimizations
* Fix small bug with LE inside graphics vertex function
I also brought back the lighting profiler because it's better than nothing.
* Some optimizations
* Cache active lights and 4 lights per vertex limit
Less branching and less iterating with the limit
* Screen shader effects for Lua [OpenGL]
Hue, saturation, brightness, contrast, exposure, dithering, posterization
Global = usually an object in the world
Non global = usually a screen element
Also:
* Changed skyboxes to use environment color instead of vertex color, visually identical
* Changed hud head texture to be non global
* changed power meter to be non global
* changed sparkles to be global
* changed some BBH vertex types to global
OpenGL renderer supported only for now.
* Add default values and better function names
Also fixed sizes in reset function
* Add scanlines effect
* Add global enabled function
* Fix some default values
* Hopefully fix white sparkles
* Whoops
* Address review
* Update function names
* Fix shader crash
* Address reviews
* Add builtin updater to macos
* Compile using trimmed build
* Implement windows
* Add coopdx updater binary
* idk what this is
* Dont need that
* Undo temp code, close stdin, stdout, and stderror so we dont print to error
* Add intel
* Linux
* Finalize
Co-authored-by: AgentXLP <44549182+AgentXLP@users.noreply.github.com>
* Update updater executables (cross compiled, need to test)
* Update windows exec
* Update mac libs
* Update windows lib
* Address review
---------
Co-authored-by: AgentXLP <44549182+AgentXLP@users.noreply.github.com>
* Unify renderers into one build, no more segregation
* Fix Linux compilation error
* How does one miss this
* Rename this
* Fix silly naming error that I missed
* Update Russian translation