diff options
| author | raysan5 <[email protected]> | 2020-08-16 11:28:15 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-08-16 11:28:15 +0200 |
| commit | c32ae480afd196d88acdfdb52d5261a61e0deb08 (patch) | |
| tree | f34f662f64424cbade1678c07934b9c12455d68d /examples | |
| parent | 26f6a64a39671487f5d1eeeffe7fce6538669051 (diff) | |
| download | raylib-c32ae480afd196d88acdfdb52d5261a61e0deb08.tar.gz raylib-c32ae480afd196d88acdfdb52d5261a61e0deb08.zip | |
RENAMED: FormatText() -> TextFormat()
This function was renamed for consistency in raylib 3.0, just unified all examples to use TextFormat() instead of FormatText()
Diffstat (limited to 'examples')
35 files changed, 71 insertions, 71 deletions
diff --git a/examples/audio/audio_multichannel_sound.c b/examples/audio/audio_multichannel_sound.c index 17975c49..fe811d33 100644 --- a/examples/audio/audio_multichannel_sound.c +++ b/examples/audio/audio_multichannel_sound.c @@ -51,7 +51,7 @@ int main(void) DrawText("Press SPACE to play new ogg instance!", 200, 120, 20, LIGHTGRAY); DrawText("Press ENTER to play new wav instance!", 200, 180, 20, LIGHTGRAY); - DrawText(FormatText("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED); + DrawText(TextFormat("CONCURRENT SOUNDS PLAYING: %02i", GetSoundsPlaying()), 220, 280, 20, RED); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/audio/audio_raw_stream.c b/examples/audio/audio_raw_stream.c index 85a77bc0..1130eae0 100644 --- a/examples/audio/audio_raw_stream.c +++ b/examples/audio/audio_raw_stream.c @@ -134,7 +134,7 @@ int main(void) ClearBackground(RAYWHITE); - DrawText(FormatText("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED); + DrawText(TextFormat("sine frequency: %i",(int)frequency), GetScreenWidth() - 220, 10, 20, RED); DrawText("click mouse button to change frequency", 10, 10, 20, DARKGRAY); // Draw the current buffer state proportionate to the screen diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index ab4b731a..bf9d219c 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -59,7 +59,7 @@ int main(void) if (IsGamepadAvailable(GAMEPAD_PLAYER1)) { - DrawText(FormatText("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); + DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID)) { @@ -106,8 +106,8 @@ int main(void) DrawRectangle(170, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED); DrawRectangle(604, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED); - //DrawText(FormatText("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); - //DrawText(FormatText("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); + //DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); + //DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); } else if (IsGamepadName(GAMEPAD_PLAYER1, PS3_NAME_ID)) { @@ -161,14 +161,14 @@ int main(void) // TODO: Draw generic gamepad } - DrawText(FormatText("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON); + DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON); for (int i = 0; i < GetGamepadAxisCount(GAMEPAD_PLAYER1); i++) { - DrawText(FormatText("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY); + DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY); } - if (GetGamepadButtonPressed() != -1) DrawText(FormatText("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED); + if (GetGamepadButtonPressed() != -1) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED); else DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY); } else diff --git a/examples/core/core_input_mouse_wheel.c b/examples/core/core_input_mouse_wheel.c index 7c3e2a16..232d62c1 100644 --- a/examples/core/core_input_mouse_wheel.c +++ b/examples/core/core_input_mouse_wheel.c @@ -43,7 +43,7 @@ int main(void) DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON); DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY); - DrawText(FormatText("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY); + DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_input_multitouch.c b/examples/core/core_input_multitouch.c index 1870b908..a19a3fea 100644 --- a/examples/core/core_input_multitouch.c +++ b/examples/core/core_input_multitouch.c @@ -68,7 +68,7 @@ int main(void) { // Draw circle and touch index number DrawCircleV(touchPosition, 34, ORANGE); - DrawText(FormatText("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK); + DrawText(TextFormat("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK); } } diff --git a/examples/core/core_random_values.c b/examples/core/core_random_values.c index 52dabe0a..260e708c 100644 --- a/examples/core/core_random_values.c +++ b/examples/core/core_random_values.c @@ -50,7 +50,7 @@ int main(void) DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON); - DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY); + DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_storage_values.c b/examples/core/core_storage_values.c index 1592c059..2ae1cc39 100644 --- a/examples/core/core_storage_values.c +++ b/examples/core/core_storage_values.c @@ -65,10 +65,10 @@ int main(void) ClearBackground(RAYWHITE); - DrawText(FormatText("SCORE: %i", score), 280, 130, 40, MAROON); - DrawText(FormatText("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK); + DrawText(TextFormat("SCORE: %i", score), 280, 130, 40, MAROON); + DrawText(TextFormat("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK); - DrawText(FormatText("frames: %i", framesCounter), 10, 10, 20, LIME); + DrawText(TextFormat("frames: %i", framesCounter), 10, 10, 20, LIME); DrawText("Press R to generate random numbers", 220, 40, 20, LIGHTGRAY); DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY); diff --git a/examples/core/core_vr_simulator.c b/examples/core/core_vr_simulator.c index 76e22b1a..8d24983c 100644 --- a/examples/core/core_vr_simulator.c +++ b/examples/core/core_vr_simulator.c @@ -56,7 +56,7 @@ int main(void) hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3 // Distortion shader (uses device lens distortion and chroma) - Shader distortion = LoadShader(0, FormatText("resources/distortion%i.fs", GLSL_VERSION)); + Shader distortion = LoadShader(0, TextFormat("resources/distortion%i.fs", GLSL_VERSION)); SetVrConfiguration(hmd, distortion); // Set Vr device parameters for stereo rendering diff --git a/examples/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c index f600aae8..81becbf8 100644 --- a/examples/models/models_mesh_picking.c +++ b/examples/models/models_mesh_picking.c @@ -160,25 +160,25 @@ int main(void) EndMode3D(); // Draw some debug GUI text - DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK); + DrawText(TextFormat("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK); if (nearestHit.hit) { int ypos = 70; - DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK); + DrawText(TextFormat("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK); - DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f", + DrawText(TextFormat("Hit Pos: %3.2f %3.2f %3.2f", nearestHit.position.x, nearestHit.position.y, nearestHit.position.z), 10, ypos + 15, 10, BLACK); - DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f", + DrawText(TextFormat("Hit Norm: %3.2f %3.2f %3.2f", nearestHit.normal.x, nearestHit.normal.y, nearestHit.normal.z), 10, ypos + 30, 10, BLACK); - if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK); + if (hitTriangle) DrawText(TextFormat("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK); } DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY); diff --git a/examples/models/models_yaw_pitch_roll.c b/examples/models/models_yaw_pitch_roll.c index 65273811..77f80063 100644 --- a/examples/models/models_yaw_pitch_roll.c +++ b/examples/models/models_yaw_pitch_roll.c @@ -195,6 +195,6 @@ void DrawAngleGauge(Texture2D angleGauge, int x, int y, float angle, char title[ DrawTexturePro(angleGauge, srcRec, dstRec, origin, angle, color); - DrawText(FormatText("%5.1f", angle), x - MeasureText(FormatText("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY); + DrawText(TextFormat("%5.1f", angle), x - MeasureText(TextFormat("%5.1f", angle), textSize) / 2, y + 10, textSize, DARKGRAY); DrawText(title, x - MeasureText(title, textSize) / 2, y + 60, textSize, DARKGRAY); } diff --git a/examples/shaders/shaders_basic_lighting.c b/examples/shaders/shaders_basic_lighting.c index 21883efa..95df69c2 100644 --- a/examples/shaders/shaders_basic_lighting.c +++ b/examples/shaders/shaders_basic_lighting.c @@ -69,8 +69,8 @@ int main(void) modelB.materials[0].maps[MAP_DIFFUSE].texture = texture; modelC.materials[0].maps[MAP_DIFFUSE].texture = texture; - Shader shader = LoadShader(FormatText("resources/shaders/glsl%i/base_lighting.vs", GLSL_VERSION), - FormatText("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION)); + Shader shader = LoadShader(TextFormat("resources/shaders/glsl%i/base_lighting.vs", GLSL_VERSION), + TextFormat("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION)); // Get some shader loactions shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel"); diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c index 1c82bba2..2e46bc13 100644 --- a/examples/shaders/shaders_custom_uniform.c +++ b/examples/shaders/shaders_custom_uniform.c @@ -51,7 +51,7 @@ int main(void) // Load postprocessing shader // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/swirl.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/swirl.fs", GLSL_VERSION)); // Get variable (uniform) location on the shader to connect with the program // NOTE: If uniform variable could not be found in the shader, function returns -1 diff --git a/examples/shaders/shaders_eratosthenes.c b/examples/shaders/shaders_eratosthenes.c index 068fc26c..3bd83d0f 100644 --- a/examples/shaders/shaders_eratosthenes.c +++ b/examples/shaders/shaders_eratosthenes.c @@ -44,7 +44,7 @@ int main(void) // Load Eratosthenes shader // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/eratosthenes.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/eratosthenes.fs", GLSL_VERSION)); SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- diff --git a/examples/shaders/shaders_fog.c b/examples/shaders/shaders_fog.c index 53fd9407..35f0a9e7 100644 --- a/examples/shaders/shaders_fog.c +++ b/examples/shaders/shaders_fog.c @@ -67,8 +67,8 @@ int main(void) modelC.materials[0].maps[MAP_DIFFUSE].texture = texture; // Load shader and set up some uniforms - Shader shader = LoadShader(FormatText("resources/shaders/glsl%i/base_lighting.vs", GLSL_VERSION), - FormatText("resources/shaders/glsl%i/fog.fs", GLSL_VERSION)); + Shader shader = LoadShader(TextFormat("resources/shaders/glsl%i/base_lighting.vs", GLSL_VERSION), + TextFormat("resources/shaders/glsl%i/fog.fs", GLSL_VERSION)); shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(shader, "matModel"); shader.locs[LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos"); diff --git a/examples/shaders/shaders_hot_reloading.c b/examples/shaders/shaders_hot_reloading.c index dcd3f801..fb645c86 100644 --- a/examples/shaders/shaders_hot_reloading.c +++ b/examples/shaders/shaders_hot_reloading.c @@ -32,11 +32,11 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [shaders] example - hot reloading"); const char *fragShaderFileName = "resources/shaders/glsl%i/reload.fs"; - long fragShaderFileModTime = GetFileModTime(FormatText(fragShaderFileName, GLSL_VERSION)); + long fragShaderFileModTime = GetFileModTime(TextFormat(fragShaderFileName, GLSL_VERSION)); // Load raymarching shader // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText(fragShaderFileName, GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat(fragShaderFileName, GLSL_VERSION)); // Get shader locations for required uniforms int resolutionLoc = GetShaderLocation(shader, "resolution"); @@ -68,13 +68,13 @@ int main(void) // Hot shader reloading if (shaderAutoReloading || (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))) { - long currentFragShaderModTime = GetFileModTime(FormatText(fragShaderFileName, GLSL_VERSION)); + long currentFragShaderModTime = GetFileModTime(TextFormat(fragShaderFileName, GLSL_VERSION)); // Check if shader file has been modified if (currentFragShaderModTime != fragShaderFileModTime) { // Try reloading updated shader - Shader updatedShader = LoadShader(0, FormatText(fragShaderFileName, GLSL_VERSION)); + Shader updatedShader = LoadShader(0, TextFormat(fragShaderFileName, GLSL_VERSION)); if (updatedShader.id != GetShaderDefault().id) // It was correctly loaded { @@ -108,7 +108,7 @@ int main(void) DrawRectangle(0, 0, screenWidth, screenHeight, WHITE); EndShaderMode(); - DrawText(FormatText("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s", + DrawText(TextFormat("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s", shaderAutoReloading? "AUTO" : "MANUAL"), 10, 10, 10, shaderAutoReloading? RED : BLACK); if (!shaderAutoReloading) DrawText("MOUSE CLICK to SHADER RE-LOADING", 10, 30, 10, BLACK); diff --git a/examples/shaders/shaders_julia_set.c b/examples/shaders/shaders_julia_set.c index e64b622b..91067a10 100644 --- a/examples/shaders/shaders_julia_set.c +++ b/examples/shaders/shaders_julia_set.c @@ -46,7 +46,7 @@ int main(void) // Load julia set shader // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/julia_set.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/julia_set.fs", GLSL_VERSION)); // c constant to use in z^2 + c float c[2] = { POINTS_OF_INTEREST[0][0], POINTS_OF_INTEREST[0][1] }; diff --git a/examples/shaders/shaders_model_shader.c b/examples/shaders/shaders_model_shader.c index 8224a337..4a2d6912 100644 --- a/examples/shaders/shaders_model_shader.c +++ b/examples/shaders/shaders_model_shader.c @@ -48,7 +48,7 @@ int main(void) // Load shader for model // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); model.materials[0].shader = shader; // Set shader effect to 3d model model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Bind texture to model diff --git a/examples/shaders/shaders_palette_switch.c b/examples/shaders/shaders_palette_switch.c index 6bc27827..0f6055bc 100644 --- a/examples/shaders/shaders_palette_switch.c +++ b/examples/shaders/shaders_palette_switch.c @@ -81,7 +81,7 @@ int main(void) // Load shader to be used on some parts drawing
// NOTE 1: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
// NOTE 2: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
- Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/palette_switch.fs", GLSL_VERSION));
+ Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/palette_switch.fs", GLSL_VERSION));
// Get variable (uniform) location on the shader to connect with the program
// NOTE: If uniform variable could not be found in the shader, function returns -1
diff --git a/examples/shaders/shaders_postprocessing.c b/examples/shaders/shaders_postprocessing.c index ed9da8bb..931c3a87 100644 --- a/examples/shaders/shaders_postprocessing.c +++ b/examples/shaders/shaders_postprocessing.c @@ -84,18 +84,18 @@ int main(void) Shader shaders[MAX_POSTPRO_SHADERS] = { 0 }; // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - shaders[FX_GRAYSCALE] = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); - shaders[FX_POSTERIZATION] = LoadShader(0, FormatText("resources/shaders/glsl%i/posterization.fs", GLSL_VERSION)); - shaders[FX_DREAM_VISION] = LoadShader(0, FormatText("resources/shaders/glsl%i/dream_vision.fs", GLSL_VERSION)); - shaders[FX_PIXELIZER] = LoadShader(0, FormatText("resources/shaders/glsl%i/pixelizer.fs", GLSL_VERSION)); - shaders[FX_CROSS_HATCHING] = LoadShader(0, FormatText("resources/shaders/glsl%i/cross_hatching.fs", GLSL_VERSION)); - shaders[FX_CROSS_STITCHING] = LoadShader(0, FormatText("resources/shaders/glsl%i/cross_stitching.fs", GLSL_VERSION)); - shaders[FX_PREDATOR_VIEW] = LoadShader(0, FormatText("resources/shaders/glsl%i/predator.fs", GLSL_VERSION)); - shaders[FX_SCANLINES] = LoadShader(0, FormatText("resources/shaders/glsl%i/scanlines.fs", GLSL_VERSION)); - shaders[FX_FISHEYE] = LoadShader(0, FormatText("resources/shaders/glsl%i/fisheye.fs", GLSL_VERSION)); - shaders[FX_SOBEL] = LoadShader(0, FormatText("resources/shaders/glsl%i/sobel.fs", GLSL_VERSION)); - shaders[FX_BLOOM] = LoadShader(0, FormatText("resources/shaders/glsl%i/bloom.fs", GLSL_VERSION)); - shaders[FX_BLUR] = LoadShader(0, FormatText("resources/shaders/glsl%i/blur.fs", GLSL_VERSION)); + shaders[FX_GRAYSCALE] = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); + shaders[FX_POSTERIZATION] = LoadShader(0, TextFormat("resources/shaders/glsl%i/posterization.fs", GLSL_VERSION)); + shaders[FX_DREAM_VISION] = LoadShader(0, TextFormat("resources/shaders/glsl%i/dream_vision.fs", GLSL_VERSION)); + shaders[FX_PIXELIZER] = LoadShader(0, TextFormat("resources/shaders/glsl%i/pixelizer.fs", GLSL_VERSION)); + shaders[FX_CROSS_HATCHING] = LoadShader(0, TextFormat("resources/shaders/glsl%i/cross_hatching.fs", GLSL_VERSION)); + shaders[FX_CROSS_STITCHING] = LoadShader(0, TextFormat("resources/shaders/glsl%i/cross_stitching.fs", GLSL_VERSION)); + shaders[FX_PREDATOR_VIEW] = LoadShader(0, TextFormat("resources/shaders/glsl%i/predator.fs", GLSL_VERSION)); + shaders[FX_SCANLINES] = LoadShader(0, TextFormat("resources/shaders/glsl%i/scanlines.fs", GLSL_VERSION)); + shaders[FX_FISHEYE] = LoadShader(0, TextFormat("resources/shaders/glsl%i/fisheye.fs", GLSL_VERSION)); + shaders[FX_SOBEL] = LoadShader(0, TextFormat("resources/shaders/glsl%i/sobel.fs", GLSL_VERSION)); + shaders[FX_BLOOM] = LoadShader(0, TextFormat("resources/shaders/glsl%i/bloom.fs", GLSL_VERSION)); + shaders[FX_BLUR] = LoadShader(0, TextFormat("resources/shaders/glsl%i/blur.fs", GLSL_VERSION)); int currentShader = FX_GRAYSCALE; diff --git a/examples/shaders/shaders_raymarching.c b/examples/shaders/shaders_raymarching.c index 5d297e36..e9ab3f14 100644 --- a/examples/shaders/shaders_raymarching.c +++ b/examples/shaders/shaders_raymarching.c @@ -40,7 +40,7 @@ int main(void) // Load raymarching shader // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/raymarching.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/raymarching.fs", GLSL_VERSION)); // Get shader locations for required uniforms int viewEyeLoc = GetShaderLocation(shader, "viewEye"); diff --git a/examples/shaders/shaders_shapes_textures.c b/examples/shaders/shaders_shapes_textures.c index cf53bf99..4d4c964c 100644 --- a/examples/shaders/shaders_shapes_textures.c +++ b/examples/shaders/shaders_shapes_textures.c @@ -38,7 +38,7 @@ int main(void) // Load shader to be used on some parts drawing // NOTE 1: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version // NOTE 2: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- diff --git a/examples/shaders/shaders_simple_mask.c b/examples/shaders/shaders_simple_mask.c index 88163b34..b24d7216 100644 --- a/examples/shaders/shaders_simple_mask.c +++ b/examples/shaders/shaders_simple_mask.c @@ -56,7 +56,7 @@ int main(void) Model model3 = LoadModelFromMesh(sphere); // Load the shader - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/mask.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/mask.fs", GLSL_VERSION)); // Load and apply the diffuse texture (colour map) Texture texDiffuse = LoadTexture("resources/plasma.png"); @@ -118,8 +118,8 @@ int main(void) EndMode3D(); - DrawRectangle(16, 698, MeasureText(FormatText("Frame: %i", framesCounter), 20) + 8, 42, BLUE); - DrawText(FormatText("Frame: %i", framesCounter), 20, 700, 20, WHITE); + DrawRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE); + DrawText(TextFormat("Frame: %i", framesCounter), 20, 700, 20, WHITE); DrawFPS(10, 10); diff --git a/examples/shaders/shaders_spotlight.c b/examples/shaders/shaders_spotlight.c index 6d1d5bae..d2394b4f 100644 --- a/examples/shaders/shaders_spotlight.c +++ b/examples/shaders/shaders_spotlight.c @@ -93,7 +93,7 @@ int main(void) // Use default vert shader - Shader spotShader = LoadShader(0, FormatText("resources/shaders/glsl%i/spotlight.fs", GLSL_VERSION)); + Shader spotShader = LoadShader(0, TextFormat("resources/shaders/glsl%i/spotlight.fs", GLSL_VERSION)); // Get the locations of spots in the shader Spot spots[MAXSPOT]; diff --git a/examples/shaders/shaders_texture_drawing.c b/examples/shaders/shaders_texture_drawing.c index 697000bc..c5a33263 100644 --- a/examples/shaders/shaders_texture_drawing.c +++ b/examples/shaders/shaders_texture_drawing.c @@ -35,7 +35,7 @@ int main(void) UnloadImage(imBlank); // NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/cubes_panning.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/cubes_panning.fs", GLSL_VERSION)); float time = 0.0f; int timeLoc = GetShaderLocation(shader, "uTime"); diff --git a/examples/shaders/shaders_texture_waves.c b/examples/shaders/shaders_texture_waves.c index c0450361..ca41620e 100644 --- a/examples/shaders/shaders_texture_waves.c +++ b/examples/shaders/shaders_texture_waves.c @@ -39,7 +39,7 @@ int main(void) Texture2D texture = LoadTexture("resources/space.png"); // Load shader and setup location points and values - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/wave.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/wave.fs", GLSL_VERSION)); int secondsLoc = GetShaderLocation(shader, "secondes"); int freqXLoc = GetShaderLocation(shader, "freqX"); diff --git a/examples/shapes/shapes_collision_area.c b/examples/shapes/shapes_collision_area.c index 0deba0dd..c7fb590a 100644 --- a/examples/shapes/shapes_collision_area.c +++ b/examples/shapes/shapes_collision_area.c @@ -90,7 +90,7 @@ int main(void) DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK); // Draw collision area - DrawText(FormatText("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK); + DrawText(TextFormat("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK); } DrawFPS(10, 10); diff --git a/examples/shapes/shapes_draw_circle_sector.c b/examples/shapes/shapes_draw_circle_sector.c index ae6de5ff..60298cfe 100644 --- a/examples/shapes/shapes_draw_circle_sector.c +++ b/examples/shapes/shapes_draw_circle_sector.c @@ -64,7 +64,7 @@ int main(void) segments = GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", segments, 0, 100, true); //------------------------------------------------------------------------------ - DrawText(FormatText("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 600, 200, 10, (segments >= 4)? MAROON : DARKGRAY); + DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 600, 200, 10, (segments >= 4)? MAROON : DARKGRAY); DrawFPS(10, 10); diff --git a/examples/shapes/shapes_draw_rectangle_rounded.c b/examples/shapes/shapes_draw_rectangle_rounded.c index c183e88b..da6ec70a 100644 --- a/examples/shapes/shapes_draw_rectangle_rounded.c +++ b/examples/shapes/shapes_draw_rectangle_rounded.c @@ -72,7 +72,7 @@ int main(void) drawRect = GuiCheckBox((Rectangle){ 640, 380, 20, 20}, "DrawRect", drawRect); //------------------------------------------------------------------------------ - DrawText(FormatText("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 640, 280, 10, (segments >= 4)? MAROON : DARKGRAY); + DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 640, 280, 10, (segments >= 4)? MAROON : DARKGRAY); DrawFPS(10, 10); diff --git a/examples/shapes/shapes_draw_ring.c b/examples/shapes/shapes_draw_ring.c index a90feab7..b363dc07 100644 --- a/examples/shapes/shapes_draw_ring.c +++ b/examples/shapes/shapes_draw_ring.c @@ -77,7 +77,7 @@ int main(void) drawCircleLines = GuiCheckBox((Rectangle){ 600, 380, 20, 20 }, "Draw CircleLines", drawCircleLines); //------------------------------------------------------------------------------ - DrawText(FormatText("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 600, 270, 10, (segments >= 4)? MAROON : DARKGRAY); + DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 600, 270, 10, (segments >= 4)? MAROON : DARKGRAY); DrawFPS(10, 10); diff --git a/examples/text/text_font_filters.c b/examples/text/text_font_filters.c index 60b16a04..d90c4277 100644 --- a/examples/text/text_font_filters.c +++ b/examples/text/text_font_filters.c @@ -109,8 +109,8 @@ int main(void) //DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED); DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY); - DrawText(FormatText("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY); - DrawText(FormatText("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY); + DrawText(TextFormat("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY); + DrawText(TextFormat("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY); DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY); if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK); diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c index 2cbe5150..2be4a068 100644 --- a/examples/text/text_font_sdf.c +++ b/examples/text/text_font_sdf.c @@ -55,7 +55,7 @@ int main(void) UnloadImage(atlas); // Load SDF required shader (we use default vertex shader) - Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/sdf.fs", GLSL_VERSION)); + Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/sdf.fs", GLSL_VERSION)); SetTextureFilter(fontSDF.texture, FILTER_BILINEAR); // Required for SDF font Vector2 fontPosition = { 40, screenHeight/2 - 50 }; @@ -110,7 +110,7 @@ int main(void) else DrawText("default font", 315, 40, 30, GRAY); DrawText("FONT SIZE: 16.0", GetScreenWidth() - 240, 20, 20, DARKGRAY); - DrawText(FormatText("RENDER SIZE: %02.02f", fontSize), GetScreenWidth() - 240, 50, 20, DARKGRAY); + DrawText(TextFormat("RENDER SIZE: %02.02f", fontSize), GetScreenWidth() - 240, 50, 20, DARKGRAY); DrawText("Use MOUSE WHEEL to SCALE TEXT!", GetScreenWidth() - 240, 90, 10, DARKGRAY); DrawText("HOLD SPACE to USE SDF FONT VERSION!", 340, GetScreenHeight() - 30, 20, MAROON); diff --git a/examples/text/text_format_text.c b/examples/text/text_format_text.c index a9f04176..63408eb9 100644 --- a/examples/text/text_format_text.c +++ b/examples/text/text_format_text.c @@ -41,13 +41,13 @@ int main(void) ClearBackground(RAYWHITE); - DrawText(FormatText("Score: %08i", score), 200, 80, 20, RED); + DrawText(TextFormat("Score: %08i", score), 200, 80, 20, RED); - DrawText(FormatText("HiScore: %08i", hiscore), 200, 120, 20, GREEN); + DrawText(TextFormat("HiScore: %08i", hiscore), 200, 120, 20, GREEN); - DrawText(FormatText("Lives: %02i", lives), 200, 160, 40, BLUE); + DrawText(TextFormat("Lives: %02i", lives), 200, 160, 40, BLUE); - DrawText(FormatText("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK); + DrawText(TextFormat("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/text/text_input_box.c b/examples/text/text_input_box.c index 981ae80d..650ca207 100644 --- a/examples/text/text_input_box.c +++ b/examples/text/text_input_box.c @@ -86,7 +86,7 @@ int main(void) DrawText(name, textBox.x + 5, textBox.y + 8, 40, MAROON); - DrawText(FormatText("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY); + DrawText(TextFormat("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY); if (mouseOnText) { diff --git a/examples/textures/textures_bunnymark.c b/examples/textures/textures_bunnymark.c index 86605b90..8182102c 100644 --- a/examples/textures/textures_bunnymark.c +++ b/examples/textures/textures_bunnymark.c @@ -98,8 +98,8 @@ int main(void) } DrawRectangle(0, 0, screenWidth, 40, BLACK); - DrawText(FormatText("bunnies: %i", bunniesCount), 120, 10, 20, GREEN); - DrawText(FormatText("batched draw calls: %i", 1 + bunniesCount/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON); + DrawText(TextFormat("bunnies: %i", bunniesCount), 120, 10, 20, GREEN); + DrawText(TextFormat("batched draw calls: %i", 1 + bunniesCount/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON); DrawFPS(10, 10); diff --git a/examples/textures/textures_rectangle.c b/examples/textures/textures_rectangle.c index 8be647a2..1665917e 100644 --- a/examples/textures/textures_rectangle.c +++ b/examples/textures/textures_rectangle.c @@ -71,7 +71,7 @@ int main(void) DrawRectangleLines(15 + frameRec.x, 40 + frameRec.y, frameRec.width, frameRec.height, RED); DrawText("FRAME SPEED: ", 165, 210, 10, DARKGRAY); - DrawText(FormatText("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY); + DrawText(TextFormat("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY); DrawText("PRESS RIGHT/LEFT KEYS to CHANGE SPEED!", 290, 240, 10, DARKGRAY); for (int i = 0; i < MAX_FRAME_SPEED; i++) |
