* Correction of values used only once in GenMeshCubicmap
The mapWidth and mapHeight values were only used as a limit in the for loop when they could be used throughout the function.
* mapWidth and mapHeight removed from GenMeshCubicmap
mapWidth and mapHeight have been removed from GenMeshCubicmap in favor of using cubicmap.width and cubicmap.height
Checking `<= x + w` causes off-by-one error where `CheckCollisionPointRec` will return true at the same time for two rectangles rendered right next to each, but which don't overlap (e.g. when making a 2D tile editor). This is clearly not what was intended.
* Update raudio.c
Review `raudio.c`: rewritten `ExportWaveAsCode()` to be more like rtextures.c `ExportImageAsCode()'
* no tab november
accidentally inserted a tab somewhere. corrected it.
When `i` starts with `0`, `t` is also `0`, which results in `previous == startPos == current`, this segment is not only redundant, but it also causes division-by-zero since `sqrtf(dx*dx + dy*dy)` is zero.
* Fix GetCodepointNext to return default value with size=0 on invalid input. Modify LoadCodepoints to work when GetCodepointNext returns a size of 0. All internal use of GetCodepointNext and GetCodepointPrev checked. This fix may break external code dealing with invalid input as the old code erroneously never returned a size of 0, external code that doesn't properly check for size=0 may endlessly loop or overflow a buffer on invalid input.
* Change default behaviour of GetCodepointNext to return a size of 1 instead of 0. This matches existing prod behaviour and guarantees size 1..4 is returned. Simplify internal code that uses GetCodepointNext that previously had to account for size=0.
* Simplified progressing through a UTF-8 string in ImageTextEx and MeasureTextEx. This change matches existing precedent in DrawTextEx
* GetCodepointNext: Add 10xxxxxx checks to multibyte encodings.
---------
Co-authored-by: anon <anon>
Basic packing algorithm currently follows this order: Copy pixel data -> Move offsetX for current glyph -> Check remaining space for current glyph...
Since X offset already moved according current glyph, remaining space should be checked for next glyph. Because of this, occasionally, current logic causes glyphs wrapping around texture.
Proposed fix accomplishes that by moving offsetX check to the beginning of the loop.
* Calculate exact image size in GenImageFontAtlas
Calculate exact image size with a method based on total glyph width and glyph row count
Current method seemed a little bit overkill with square root, log and power functions and only approximates image size which can be wonky with some weird fonts like cursive fonts.
Proposed method calculates image size directly with a simpler method and results exact image size needed.
* Update rtext.c
* Update rtext.c
Changed do-while to while loop, and also added an extra step to calculate maximum glyph width and excluding it from image width for extra safety.