Commit Graph

256 Commits

Author SHA1 Message Date
Ray
2015828fc6 Security check in case of not valid font 2021-05-03 19:05:43 +02:00
Ray
640fc4d0a0 Minor tweaks 2021-04-16 21:19:28 +02:00
13f97471a2 Change the color of the FPS display if the FPS is low (orange for <30, red for < 15). (#1676)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-24 17:59:05 +01:00
Ray
bb73a8089a Reviewed DrawFPS() comment 2021-03-24 17:06:32 +01:00
Ray
f7e48c95cd Added some comments on libc dependencies 2021-03-14 14:14:51 +01:00
Ray
01e28263be WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistency
Some enums values have been renamed to be more consistent and also provide a more detailed description:
 - ShaderLocationIndex:    LOC_VERTEX_POSITION -> SHADER_SHADER_LOC_VERTEX_POSITION
 - ShaderUniformDataType:  UNIFORM_VEC2 -> SHADER_UNIFORM_VEC2
 - MaterialMapType: MAP_ALBEDO -> MATERIAL_MAP_ALBEDO
 - PixelFormat: UNCOMPRESSED_GRAYSCALE -> PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
2021-03-14 11:05:51 +01:00
Ray
ca22a87949 REVIEWED: TextFormat() #1626 2021-03-03 19:55:09 +01:00
Ray
dfe797060a WARNING: BREAKING: RENAMED: enums values
RENAMED: TextureFilterMode values
RENAMED: TextureWrapMode values
2021-03-03 19:47:37 +01:00
Ray
bcc4418ff0 REVIEWED: GetFileExtension() to include the dot #1523 2021-03-02 01:07:08 +01:00
Ray
c256b26629 Reorder function 2021-01-12 20:24:58 +01:00
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
Ray
015e715278 Corrected DrawTextRecEx() bug 2020-12-19 19:12:51 +01:00
Ray
e404a18226 Support font chars padding on drawing #1432
Previous implementation did not consider any padding while drawing the characters on screen (despite being available on the font atlas), so, only minimum character area was drawn.

If some text effect shader was required (shadow, glow, outline...), there was no space in the drawn quad to draw that pixels effect.

This commit corrects that issue.
2020-12-19 12:16:23 +01:00
Ray
e07bc372a1 WARNING: RENAMED several functions for consistency #1440
This is a BREAKING CHANGE!

To address the linked issue, several functions have been renamed and couterpart functions have been created to free loaded memory:
 - RENAMED: GetImageData() -> LoadImageColors()
 - RENAMED: GetImagePalette() -> LoadImagePalette()
 - RENAMED: GetWaveData() -> LoadWaveSamples()
 - ADDED: UnloadImageColors()
 - ADDED: UnloadImagePalette()
 - ADDED: UnloadWaveSamples()
2020-12-18 21:03:08 +01:00
Ray
f5b4656801 Added additional charsPadding initialization #1432 2020-12-14 23:51:55 +01:00
14c1ee2681 ADDED: UnloadFontData() 2020-11-28 19:07:41 +01:00
9b2b660f91 Commented new feature 2020-11-15 13:10:12 +01:00
55dc8171f8 [text] Consider characters padding -WIP- #1432 2020-11-15 12:39:59 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
43d82c1f21 Add security checks when loading data from memory 2020-09-16 11:33:56 +02:00
Ray
8cf0be4b6c Review memory loading functions signesness 2020-09-14 19:20:38 +02:00
Ray
db652daf42 ADDED: LoadFontFromMemory() (TTF only) #1327 2020-09-13 16:42:31 +02:00
Ray
88c5deac87 WARNING: REDESIGNED: LoadFontData() 2020-09-13 16:41:52 +02:00
945a02798b DrawTextEx(): Minor tweak 2020-08-29 13:57:59 +02:00
Ray
7b346dbbe1 Review issue with .fnt -> .png path #1351
When .fnt file is in the .exe path, image path was wrongly calculated
2020-08-15 11:32:23 +02:00
b00ab118c6 [examples] text_font_sdf - Corrected bug 2020-06-02 23:07:11 +02:00
c43e889e39 Corrected bug on TextJoin() 2020-05-27 13:45:11 +02:00
b95673f701 Use RL_FREE() instead of free() 2020-05-23 19:21:46 +02:00
c1e0978555 Replaced strncat() by memcpy() in some functions 2020-05-23 18:05:41 +02:00
c1bb051e61 Avoid some warnings 2020-05-22 02:26:47 +02:00
76f8e84901 Reviewed LoadBMFont() to load data from memory #1232 2020-05-22 02:19:45 +02:00
65b7047111 Remove some [textures] function dependencies
- LoadFontDefault() -> Some code simplifications
 - LoadFontFromImage() -> Avoid LoadImageEx()
 - LoadFontData() -> Avoid GenImageColor(), ImageFormat()
 - LoadBMFont() -> Avoid ImageCopy(), ImageFormat()
2020-05-14 13:36:22 +02:00
ca6016cc71 TextToInteger() always exposed 2020-05-14 13:32:57 +02:00
7efed56b66 Added [text] flag: SUPPORT_TEXT_MANIPULATION 2020-05-09 12:38:33 +02:00
959447d8ed Reorganized texture functions
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
6fa6757a8b Comment tweak 2020-05-07 13:39:41 +02:00
fdad1f023b Avoid all MSVC compile warnings
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons.

Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only.

Some external libraries still generate warnings.
2020-05-06 19:12:09 +02:00
51c3bef497 Review exposed #defines and allow user re-defining
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required.

Also, multiple #define have been renamed and commented.
2020-05-01 17:31:44 +02:00
2d6303e9fe Allow for empty replacement string (#1178) 2020-04-05 22:42:59 +02:00
9c280bc7af TextReplace changes (#1172)
- Added NULL return if the replacement string (`by`) is empty
- Reordered sanity checks since there's no need to initialize variables if the strings are invalid.
2020-04-04 14:25:57 +02:00
8444c3f705 Fixed offset check in GenImageFontAtlas (#1171)
* Fixed offset check in GenImageFontAtlas

* Fixed code formatting to follow raylib notation rules
2020-04-02 23:53:29 +02:00
e8a8d544c5 Review formating and signegness issues 2020-03-30 14:38:16 +02:00
d28e73849b Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
b5842434c2 Corrected missing semicolon 2020-03-27 18:31:16 +01:00
bc2c6251f8 [text] Review TRACELOG() messages, categorized 2020-03-27 17:16:07 +01:00
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
e07281f8bd Fixed DrawTextRecEx() selection when wordwrap is ON (again) (#1149) 2020-03-25 10:27:43 +01:00
4af4483f5f Added security check in case init fails #1135 2020-03-17 20:57:01 +01:00
Ray
7fa12844ed [text] TextToUpper(): Added note on diacritics 2020-03-12 13:02:09 +01:00