From 2f5406bbd9241258d6956312f69f9847242a8793 Mon Sep 17 00:00:00 2001 From: Arthur Bichara Date: Fri, 17 Jan 2025 17:30:47 +0100 Subject: [PATCH] feat(fixLib): fix release raylib --- CHANGELOG | 102 +-- HISTORY.md | 2 +- README.md | 2 +- examples/Makefile | 8 +- examples/Makefile.Web | 16 +- examples/README.md | 8 +- examples/audio/audio_mixed_processor.c | 6 +- examples/audio/audio_module_playing.c | 12 +- examples/audio/audio_music_stream.c | 8 +- examples/audio/audio_raw_stream.c | 2 +- examples/audio/audio_sound_loading.c | 2 +- examples/audio/audio_sound_multi.c | 2 +- examples/audio/audio_stream_effects.c | 8 +- examples/core/core_2d_camera.c | 24 +- examples/core/core_2d_camera_mouse_zoom.c | 2 +- examples/core/core_2d_camera_platformer.c | 10 +- examples/core/core_2d_camera_split_screen.c | 24 +- examples/core/core_3d_camera_first_person.c | 10 +- examples/core/core_3d_camera_free.c | 6 +- examples/core/core_3d_camera_mode.c | 2 +- examples/core/core_3d_camera_split_screen.c | 12 +- examples/core/core_3d_picking.c | 2 +- examples/core/core_automation_events.c | 22 +- examples/core/core_basic_screen_manager.c | 8 +- examples/core/core_basic_window.c | 2 +- examples/core/core_basic_window_web.c | 2 +- examples/core/core_custom_frame_control.c | 4 +- examples/core/core_custom_logging.c | 2 +- examples/core/core_drop_files.c | 6 +- examples/core/core_input_gamepad.c | 44 +- examples/core/core_input_gamepad_info.c | 2 +- examples/core/core_input_gestures.c | 14 +- examples/core/core_input_gestures_web.c | 18 +- examples/core/core_input_keys.c | 2 +- examples/core/core_input_mouse.c | 2 +- examples/core/core_input_mouse_wheel.c | 4 +- examples/core/core_input_multitouch.c | 2 +- examples/core/core_loading_thread.c | 8 +- examples/core/core_random_values.c | 2 +- examples/core/core_scissor_test.c | 10 +- examples/core/core_smooth_pixelperfect.c | 22 +- examples/core/core_storage_values.c | 2 +- examples/core/core_vr_simulator.c | 8 +- examples/core/core_window_flags.c | 4 +- examples/core/core_window_letterbox.c | 8 +- examples/core/core_window_should_close.c | 4 +- examples/core/core_world_screen.c | 2 +- examples/examples_template.c | 2 +- examples/models/models_animation.c | 2 +- examples/models/models_billboard.c | 4 +- examples/models/models_box_collisions.c | 2 +- examples/models/models_cubicmap.c | 4 +- examples/models/models_draw_cube_texture.c | 12 +- examples/models/models_first_person_maze.c | 8 +- examples/models/models_geometric_shapes.c | 2 +- examples/models/models_heightmap.c | 4 +- examples/models/models_loading.c | 2 +- examples/models/models_loading_gltf.c | 2 +- examples/models/models_loading_m3d.c | 2 +- examples/models/models_loading_vox.c | 6 +- examples/models/models_mesh_generation.c | 6 +- examples/models/models_mesh_picking.c | 2 +- .../models/models_orthographic_projection.c | 2 +- examples/models/models_rlgl_solar_system.c | 2 +- examples/models/models_skybox.c | 2 +- examples/models/models_waving_cubes.c | 2 +- examples/models/models_yaw_pitch_roll.c | 6 +- examples/others/easings_testbed.c | 2 +- examples/others/embedded_files_loading.c | 2 +- examples/others/external/include/GLFW/glfw3.h | 2 +- examples/others/external/include/glad.h | 8 +- examples/others/external/include/glad_gles2.h | 34 +- examples/others/raylib_opengl_interop.c | 4 +- examples/others/raymath_vector_angle.c | 2 +- examples/others/rlgl_compute_shader.c | 4 +- examples/others/rlgl_standalone.c | 8 +- .../shaders/glsl100/cubes_panning.fs | 4 +- .../shaders/glsl330/cubes_panning.fs | 4 +- examples/shaders/shaders_basic_lighting.c | 2 +- examples/shaders/shaders_custom_uniform.c | 4 +- examples/shaders/shaders_deferred_render.c | 8 +- examples/shaders/shaders_eratosthenes.c | 10 +- examples/shaders/shaders_fog.c | 2 +- examples/shaders/shaders_hot_reloading.c | 6 +- examples/shaders/shaders_hybrid_render.c | 6 +- examples/shaders/shaders_julia_set.c | 8 +- examples/shaders/shaders_lightmap.c | 18 +- examples/shaders/shaders_mesh_instancing.c | 2 +- examples/shaders/shaders_model_shader.c | 2 +- examples/shaders/shaders_multi_sample2d.c | 2 +- examples/shaders/shaders_palette_switch.c | 6 +- examples/shaders/shaders_postprocessing.c | 6 +- examples/shaders/shaders_raymarching.c | 6 +- examples/shaders/shaders_shapes_textures.c | 8 +- examples/shaders/shaders_simple_mask.c | 4 +- examples/shaders/shaders_spotlight.c | 8 +- examples/shaders/shaders_texture_drawing.c | 2 +- examples/shaders/shaders_texture_outline.c | 2 +- examples/shaders/shaders_texture_tiling.c | 2 +- examples/shaders/shaders_texture_waves.c | 2 +- examples/shaders/shaders_write_depth.c | 4 +- examples/shapes/raygui.h | 620 +++++++++--------- examples/shapes/shapes_basic_shapes.c | 12 +- examples/shapes/shapes_bouncing_ball.c | 2 +- examples/shapes/shapes_collision_area.c | 18 +- examples/shapes/shapes_colors_palette.c | 14 +- examples/shapes/shapes_draw_circle_sector.c | 12 +- .../shapes/shapes_draw_rectangle_rounded.c | 32 +- examples/shapes/shapes_draw_ring.c | 20 +- examples/shapes/shapes_easings_ball_anim.c | 4 +- examples/shapes/shapes_easings_box_anim.c | 10 +- .../shapes/shapes_easings_rectangle_array.c | 12 +- examples/shapes/shapes_following_eyes.c | 2 +- examples/shapes/shapes_lines_bezier.c | 2 +- examples/shapes/shapes_logo_raylib.c | 6 +- examples/shapes/shapes_logo_raylib_anim.c | 26 +- examples/shapes/shapes_rectangle_scaling.c | 16 +- examples/shapes/shapes_splines_drawing.c | 12 +- examples/shapes/shapes_top_down_lights.c | 32 +- examples/text/text_codepoints_loading.c | 6 +- examples/text/text_draw_3d.c | 8 +- examples/text/text_font_filters.c | 6 +- examples/text/text_font_loading.c | 2 +- examples/text/text_font_sdf.c | 2 +- examples/text/text_font_spritefont.c | 6 +- examples/text/text_format_text.c | 2 +- examples/text/text_input_box.c | 10 +- examples/text/text_raylib_fonts.c | 2 +- examples/text/text_rectangle_bounds.c | 42 +- examples/text/text_unicode.c | 28 +- examples/text/text_writing_anim.c | 2 +- .../textures/textures_background_scrolling.c | 2 +- examples/textures/textures_blend_modes.c | 2 +- examples/textures/textures_bunnymark.c | 4 +- examples/textures/textures_draw_tiled.c | 70 +- examples/textures/textures_fog_of_war.c | 16 +- examples/textures/textures_gif_player.c | 6 +- examples/textures/textures_image_drawing.c | 12 +- examples/textures/textures_image_generation.c | 6 +- examples/textures/textures_image_loading.c | 2 +- examples/textures/textures_image_processing.c | 14 +- examples/textures/textures_image_rotate.c | 2 +- examples/textures/textures_image_text.c | 2 +- examples/textures/textures_logo_raylib.c | 2 +- examples/textures/textures_mouse_painting.c | 28 +- examples/textures/textures_npatch_drawing.c | 20 +- .../textures/textures_particles_blending.c | 6 +- examples/textures/textures_polygon.c | 2 +- examples/textures/textures_raw_data.c | 2 +- examples/textures/textures_sprite_anim.c | 12 +- examples/textures/textures_sprite_button.c | 12 +- examples/textures/textures_sprite_explosion.c | 10 +- examples/textures/textures_srcrec_dstrec.c | 18 +- examples/textures/textures_svg_loading.c | 4 +- examples/textures/textures_textured_curve.c | 2 +- examples/textures/textures_to_image.c | 2 +- parser/output/raylib_api.json | 168 ++--- parser/output/raylib_api.lua | 168 ++--- parser/output/raylib_api.txt | 202 +++--- parser/output/raylib_api.xml | 126 ++-- projects/4coder/main.c | 2 +- projects/CMake/core_basic_window.c | 2 +- projects/CodeBlocks/core_basic_window.c | 2 +- projects/Geany/core_basic_window.c | 2 +- projects/Geany/raylib.c.tags | 60 +- .../raylib_npp_parser/raylib_npp.xml | 146 ++--- .../raylib_npp_parser/raylib_to_parse.h | 72 +- .../raylib_android.NativeActivity/main.c | 2 +- .../shapes_draw_rectangle_rounded.vcxproj | 6 +- .../shapes_easings_rectangle_array.vcxproj | 6 +- .../examples/shapes_rectangle_scaling.vcxproj | 6 +- .../examples/text_rectangle_bounds.vcxproj | 6 +- projects/VS2022/raylib.sln | 8 +- projects/VSCode/main.c | 2 +- projects/scripts/core_basic_window.c | 2 +- src/config.h | 2 +- src/external/glad.h | 8 +- src/external/glad_gles2.h | 34 +- src/external/glfw/deps/glad/gl.h | 8 +- src/external/glfw/deps/glad/vulkan.h | 10 +- src/external/glfw/include/GLFW/glfw3.h | 2 +- src/external/glfw/src/cocoa_window.m | 6 +- src/external/glfw/src/x11_window.c | 4 +- src/external/jar_xm.h | 16 +- src/external/miniaudio.h | 50 +- src/external/nanosvg.h | 2 +- src/external/stb_image.h | 2 +- src/external/stb_image_write.h | 8 +- src/external/stb_rect_pack.h | 32 +- src/external/stb_truetype.h | 14 +- src/platforms/rcore_android.c | 20 +- src/platforms/rcore_desktop.c | 2 +- src/platforms/rcore_desktop_sdl.c | 8 +- src/platforms/rcore_drm.c | 6 +- src/platforms/rcore_template.c | 2 +- src/platforms/rcore_web.c | 2 +- src/raylib.h | 94 +-- src/rcore.c | 20 +- src/rmodels.c | 28 +- src/rshapes.c | 154 ++--- src/rtext.c | 68 +- src/rtextures.c | 116 ++-- 202 files changed, 1837 insertions(+), 1837 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 77df794db..66b99962a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -38,7 +38,7 @@ Detailed changes: [rcore] REVIEWED: BeginScissorMode(), identify rendering to texture (#3510) by @gulrak [rcore] REVIEWED: Window flags order (#3114) by @lesleyrs [rcore] REVIEWED: Full movement for right analog stick (#3095) by @PixelPhobicGames -[rcore] REVIEWED: Fix Android app freeze after calling CloseWindow() (#3067) by @Bigfoot71 +[rcore] REVIEWED: Fix Android app freeze after calling rayCloseWindow() (#3067) by @Bigfoot71 [rcore] REVIEWED: Lazy loading of default font used on image drawing (no InitWindow) by @raysan5 [rcore] REVIEWED: Minor tweaks to raylib events automation system @raysan5 [rcore] REVIEWED: GetCurrentMonitor() bugfix (#3058) by @hamyyy @@ -79,18 +79,18 @@ Detailed changes: [rtextures] REMOVED: GenImageGradientH() and GenImageGradientV() by @danemadsen [rtextures] REVIEWED: LoadImageSvg() by @raysan5 [rtextures] REVIEWED: Uninitialized thread-locals in stbi (#3282) (#3283) by @jbarthelmes -[rtextures] REVIEWED: ImageDrawRectangleRec(), validate drawing inside bounds by @JeffM2501 +[rtextures] REVIEWED: ImageDrawrayRectangleRec(), validate drawing inside bounds by @JeffM2501 [rtextures] REVIEWED: LoadTextureCubemap() for manual layouts (#3204) by @Not-Nik -[rtextures] REVIEWED: Optimization of ImageDrawRectangleRec() (#3185) by @smalltimewizard +[rtextures] REVIEWED: Optimization of ImageDrawrayRectangleRec() (#3185) by @smalltimewizard [rtextures] REVIEWED: ImageRotate() formatting by @raysan5 [rtextures] REVIEWED: GenImagePerlinNoise(), clamp values (#3071) by @raysan5 [rtextures] REVIEWED: Packing logic error in GenImageFontAtlas() (#2979) by @hanaxar [rtextures] REVIEWED: Calculate exact image size in GenImageFontAtlas() (#2963) by @hanaxar -[rtextures] REVIEWED: ImageDrawRectangleRec() (#3027) by @raysan5 +[rtextures] REVIEWED: ImageDrawrayRectangleRec() (#3027) by @raysan5 [rtextures] REVIEWED: ImageDraw() source clipping when drawing beyond top left (#3306) by @RobLoach [rtextures] REVIEWED: UnloadRenderTexture(), additional checks [rtextures] REVIEWED: Fixed compressed DDS texture loading issues (#3483) by @JaanDev -[rtext] ADDED: Font altas white rectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5 +[rtext] ADDED: Font altas white rayRectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5 [rtext] ADDED: SetTextLineSpacing() to define line breaks text drawing spacing by @raysan5 [rtext] RENAMED: LoadFont*() parameter names for consistency and coherence by @raysan5 [rtext] REVIEWED: GetCodepointCount(), ignore unused return value of GetCodepointNext by @ashn-dot-dev @@ -375,7 +375,7 @@ Detailed changes: [examples] REVIEWED: core_input_gamepad.c (#2903) by @planetis-m [examples] REVIEWED: core_custom_frame_control [examples] REVIEWED: core_drop_files (#2943) -[examples] REVIEWED: text_rectangle_bounds (#2746) by @SzieberthAdam +[examples] REVIEWED: text_rayRectangle_bounds (#2746) by @SzieberthAdam [examples] REVIEWED: textures_image_processing, added gaussian blurring (#2775) by @nobytesgiven [examples] REVIEWED: models_billboard, highlighting rotation and draw order (#2779) by @nobytesgiven [examples] REVIEWED: core_loading_thread, join thread on completion (#2845) by @planetis-m @@ -509,9 +509,9 @@ Detailed changes: [raymath] REVIEWED: QuaternionFromMatrix(), QuaternionEquals() (#2591) by @kirigirihitomi [raymath] REVIEWED: MatrixRotate*() (#2595, #2599) by @GoodNike [shapes] REVIEWED: CheckCollision*() consistency -[shapes] REVIEWED: DrawRectanglePro(), support TRIANGLES drawing +[shapes] REVIEWED: DrawrayRectanglePro(), support TRIANGLES drawing [textures] ADDED: Support for QOI image format -[textures] REVIEWED: ImageColorTint(), GetImageColor(), ImageDrawRectangleRec(), optimized functions (#2429) by @AnilBK +[textures] REVIEWED: ImageColorTint(), GetImageColor(), ImageDrawrayRectangleRec(), optimized functions (#2429) by @AnilBK [textures] REVIEWED: LoadTextureFromImage(), allow texture loading with no data transfer [textures] REVIEWED: ImageDraw(), comment to note that f32bit is not supported (#2222) [textures] REVIEWED: DrawTextureNPatch(), avoid batch overflow (#2401) by @JeffM2501 @@ -567,7 +567,7 @@ Detailed changes: [examples] ADDED: audio_stream_effects [examples] REMOVED: core_quat_conversion, not working properly [examples] REMOVED: raudio_standalone, moved to raudio repo -[examples] RENAMED: textures_rectangle -> textures_sprite_anim +[examples] RENAMED: textures_rayRectangle -> textures_sprite_anim [examples] REVIEWED: core_input_gamepad, improve joystick visualisation (#2390) by @kristianlm [examples] REVIEWED: textures_draw_tiled [examples] REVIEWED: shaders_mesh_instancing, free allocated matrices (#2425) by @AnilBK @@ -694,11 +694,11 @@ Detailed changes: [textures] REVIEWED: LoadImageAnim() #2005 [text] ADDED: Security check in case of not valid font [text] ADDED: `GetGlyphInfo()` to get glyph info for a specific codepoint -[text] ADDED: `GetGlyphAtlasRec()` to get glyph rectangle within the generated font atlas +[text] ADDED: `GetGlyphAtlasRec()` to get glyph rayRectangle within the generated font atlas [text] ADDED: DrawTextPro() with text rotation support, WARNING: DrawTextPro() requires including `rlgl.h`, before it was only dependant on `textures` module. [text] ADDED: UnloadCodepoints() to safely free loaded codepoints [text] REMOVED: DrawTextRec() and DrawTextRecEx(), moved to example, those functions could be very specific depending on user needs so it's better to give the user the full source in case of special requirements instead of allowing a function with +10 input parameters. -[text] RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name. +[text] RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rayRectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name. [text] RENAMED: `CodepointToUtf8()` to `CodepointToUTF8()`, capitalization of UTF-8 is the correct form, it would also require de hyphen but it can be omitted in this case. [text] RENAMED: `TextToUtf8()` to `TextCodepointsToUTF8` for consistency and more detail on the functionality. [text] RENAMED: GetCodepoints() to LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer. @@ -746,7 +746,7 @@ Detailed changes: [examples] REVIEWED: shapes_basic_shapes [examples] REVIEWED: shapes_logo_raylib_anim [examples] REVIEWED: textures_to_image -[examples] REVIEWED: text_rectangle_bounds +[examples] REVIEWED: text_rayRectangle_bounds [examples] REVIEWED: text_unicode [examples] REVIEWED: text_draw_3d [examples] REVIEWED: models_loading @@ -835,8 +835,8 @@ Detailed changes: [textures] ADDED: DrawTexturePoly() and example (#1677) by @chriscamacho [textures] ADDED: UnloadImageColors() for allocs consistency [textures] RENAMED: GetImageData() to LoadImageColors() -[textures] REVIEWED: ImageClearBackground() and ImageDrawRectangleRec() (#1487) by @JeffM2501 -[textures] REVIEWED: DrawTexturePro() and DrawRectanglePro() transformations (#1632) by @ChrisDill +[textures] REVIEWED: ImageClearBackground() and ImageDrawrayRectangleRec() (#1487) by @JeffM2501 +[textures] REVIEWED: DrawTexturePro() and DrawrayRectanglePro() transformations (#1632) by @ChrisDill [text] REDESIGNED: DrawFPS() [models] ADDED: UploadMesh() (#1529) [models] ADDED: UpdateMeshBuffer() @@ -1136,7 +1136,7 @@ Detailed changes: [shapes] ADDED: DrawPolyLines() - Draw a polygon outline of n sides [shapes] REVIEWED: DrawPoly() shape rendering, by @AlexHCC [textures] ADDED: LoadAnimatedGIF() - Load animated GIF file -[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rectangle +[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rayRectangle [textures] ADDED: ImageFromImage() - Create an image from another image piece [textures] ADDED: ImageClearBackground(), by @iamsouravgupta [textures] ADDED: ImageDrawPixel(), by @iamsouravgupta @@ -1145,17 +1145,17 @@ Detailed changes: [textures] ADDED: ImageDrawPixelV(), by @RobLoach [textures] ADDED: ImageDrawCircleV(), by @RobLoach [textures] ADDED: ImageDrawLineV(), by @RobLoach -[textures] ADDED: ImageDrawRectangleV(), by @RobLoach -[textures] ADDED: ImageDrawRectangleRec(), by @RobLoach +[textures] ADDED: ImageDrawrayRectangleV(), by @RobLoach +[textures] ADDED: ImageDrawrayRectangleRec(), by @RobLoach [textures] REVIEWED: ImageDrawPixel(), by @RobLoach [textures] REVIEWED: ImageDrawLine(), by @RobLoach [textures] REVIEWED: ImageDrawCircle(), by @RobLoach -[textures] REVIEWED: ImageDrawRectangle(), by @RobLoach +[textures] REVIEWED: ImageDrawrayRectangle(), by @RobLoach [textures] REVIEWED: ImageDraw(), now it supports color tint parameter [textures] REVIEWED: ImageResizeCanvas() [textures] REVIEWED: ImageCrop() with security checks [textures] REVIEWED: ImageAlphaMask() -[textures] REVIEWED: ImageDrawRectangleLines() +[textures] REVIEWED: ImageDrawrayRectangleLines() [textures] REVIEWED: GetImageData() [text] ADDED: TextCopy() - Copy one string to another, returns bytes copied [text] ADDED: GetCodepoints() - Get all codepoints in a string @@ -1169,7 +1169,7 @@ Detailed changes: [text] REVIEWED: TextToInteger() [text] REVIEWED: GetNextCodepoint(), renamed parameters for clarity [text] REVIEWED: GenImageFontAtlas(), improved atlas size computing -[text] REDESIGNED: struct Font, character rectangles have been moved out from CharInfo to Font +[text] REDESIGNED: struct Font, character rayRectangles have been moved out from CharInfo to Font [text] REDESIGNED: struct CharInfo, now includes directly an Image of the glyph [text] REDESIGNED: GenImageFontAtlas(), additional recs parameter added [text] REDESIGNED: ImageTextEx(), to avoid font retrieval from GPU @@ -1229,7 +1229,7 @@ KEY CHANGES: - [core] HighDPI monitors support with automatic content scaling - [rlgl] Complete module redesign to use one single internal buffer - [rlgl] VR system redesign to allow custom device parameters and distortion shader - - [shapes] New drawing shapes available: CircleSector, Ring and RectangleRounded + - [shapes] New drawing shapes available: CircleSector, Ring and rayRectangleRounded - [text] New text management API (multiple functions) - [text] Full Unicode support (utf8 text) - [textures] Cubemap textures support @@ -1271,15 +1271,15 @@ Detailed changes: [shapes] ADDED: DrawCircleSectorLines() - Draw circle sector outline [shapes] ADDED: DrawRing() - Draw ring [shapes] ADDED: DrawRingLines() - Draw ring outline -[shapes] ADDED: DrawRectangleRounded() - Draw rectangle with rounded edges -[shapes] ADDED: DrawRectangleRoundedLines() - Draw rectangle with rounded edges outline +[shapes] ADDED: DrawrayRectangleRounded() - Draw rayRectangle with rounded edges +[shapes] ADDED: DrawrayRectangleRoundedLines() - Draw rayRectangle with rounded edges outline [shapes] ADDED: SetShapesTexture() - Define default texture used to draw shapes [textures] REVIEWED: ExportImage() - Reorder function parameters -[textures] REVIEWED: ImageDrawRectangle() - Remove unneeded parameter +[textures] REVIEWED: ImageDrawrayRectangle() - Remove unneeded parameter [textures] ADDED: ExportImageAsCode() - Export image as code file defining an array of bytes [textures] ADDED: LoadTextureCubemap() - Load cubemap from image, multiple image cubemap layouts supported [textures] ADDED: ImageExtractPalette() - Extract color palette from image to maximum size (memory should be freed) -[textures] ADDED: ImageDrawRectangleLines() - Draw rectangle lines within an image +[textures] ADDED: ImageDrawrayRectangleLines() - Draw rayRectangle lines within an image [textures] ADDED: DrawTextureQuad() - Draw texture quad with tiling and offset parameters [textures] ADDED: DrawTextureNPatch() - Draws a texture (or part of it) that stretches or shrinks nicely [models] REVIEWED: LoadMesh() -> LoadMeshes() - Support multiple meshes loading @@ -1309,8 +1309,8 @@ Detailed changes: [text] RENAMED: FormatText() -> TextFormat() [text] RENAMED: SubText() -> TextSubtext() [text] ADDED: LoadFontFromImage() - Load font from Image (XNA style) -[text] ADDED: DrawTextRec() - Draw text using font inside rectangle limits -[text] ADDED: DrawTextRecEx() - Draw text using font inside rectangle limits with support for text selection +[text] ADDED: DrawTextRec() - Draw text using font inside rayRectangle limits +[text] ADDED: DrawTextRecEx() - Draw text using font inside rayRectangle limits with support for text selection [text] ADDED: TextIsEqual() - Check if two text string are equal [text] ADDED: TextLength() - Get text length, checks for '\0' ending [text] ADDED: TextReplace() - Replace text string (memory should be freed!) @@ -1336,25 +1336,25 @@ Detailed changes: [examples] REVIEWED: core_input_gamepad - Adapted to new gamepad system [examples] REVIEWED: core_vr_simulator - HMD device parameters and distortion shader should be provided [examples] ADDED: core_window_scale_letterbox - Windows resizing and letterbox content -[examples] ADDED: shapes_rectangle_scaling_mouse - Scale a rectangle with mouse +[examples] ADDED: shapes_rayRectangle_scaling_mouse - Scale a rayRectangle with mouse [examples] ADDED: shapes_draw_circle_sector - Circle sector drawing [examples] ADDED: shapes_draw_ring - Ring drawing -[examples] ADDED: shapes_draw_rectangle_rounded - Rounded rectangle drawing +[examples] ADDED: shapes_draw_rayRectangle_rounded - Rounded rayRectangle drawing [examples] ADDED: shapes_bouncing_ball - Ball bouncing in the screen [examples] ADDED: shapes_collision_area - Collision detection and drawing [examples] ADDED: shapes_following_eyes - Some maths on eyes and mouse [examples] ADDED: shapes_easings_ball_anim - Ball animation [examples] ADDED: shapes_easings_box_anim - Box animation -[examples] ADDED: shapes_easings_rectangle_array - Rectangles animation +[examples] ADDED: shapes_easings_rayRectangle_array - rayRectangles animation [examples] REVIEWED: shapes_colors_palette - Reviewed color selection and text displaying [examples] ADDED: textures_background_scrolling - Scrolling and parallaz background effect [examples] ADDED: textures_image_npatch - Drawing N-Patch based boxes [examples] ADDED: textures_sprite_button - Sprite button with sound [examples] ADDED: textures_sprite_explosion - Sprite explosion with sound [examples] ADDED: textures_bunnymark - Benchmarking test -[examples] ADDED: text_draw_inside_rectangle - Drawing text inside a delimited rectangle box +[examples] ADDED: text_draw_inside_rayRectangle - Drawing text inside a delimited rayRectangle box [examples] ADDED: text_unicode - Multiple languages text drawing -[examples] ADDED: text_rectangle_bound - Fit text inside a rectangle +[examples] ADDED: text_rayRectangle_bound - Fit text inside a rayRectangle [examples] REVIEWED: text_bmfont_ttf - Simplified example [examples] ADDED: models_animation - Animated models loading and animation playing [examples] ADDED: models_obj_viewer - Draw and drop models viewer @@ -1410,7 +1410,7 @@ Detailed changes: [core] RENAMED: struct Camera to Camera3D [core] RENAMED: struct SpriteFont to Font -> plus all required functions! [core] RENAMED: enum TextureFormat to PixelFormat -[core] REVIEWED: Rectangle params int to float +[core] REVIEWED: rayRectangle params int to float [core] REVIEWED: timing system for macOS [core] REMOVED: ColorToFloat() [core] ADDED: GetCurrentTime() on macOS @@ -1427,15 +1427,15 @@ Detailed changes: [core] REVIEWED: Fade() [core] REVIEWED: InitWindow() to avoid void pointer (safety) [core] Support camera 3d orthographic projection mode -[shapes] ADDED: DrawRectangleLinesEx() +[shapes] ADDED: DrawrayRectangleLinesEx() [textures] Improved pixel formats support (32bit channels) [textures] Improved textures support for OpenGL 2.1 -[textures] REMOVED: DrawRectangleT() --> Added support to DrawRectangle() +[textures] REMOVED: DrawrayRectangleT() --> Added support to DrawrayRectangle() [textures] ADDED: GetPixelDataSize(); pixel data size in bytes (image or texture) [textures] ADDED: ImageAlphaClear() --> Clear alpha channel to desired color [textures] ADDED: ImageAlphaCrop() --> Crop image depending on alpha value [textures] ADDED: ImageAlphaPremultiply() --> Premultiply alpha channel -[textures] ADDED: ImageDrawRectangle() +[textures] ADDED: ImageDrawrayRectangle() [textures] ADDED: ImageMipmaps() [textures] ADDED: GenImageColor() [textures] ADDED: GetPixelDataSize() @@ -1531,11 +1531,11 @@ detailed changes: [rlgl] REVIEWED: InitVrSimulator(), to accept device parameters as input [core] ADDED: SetWindowTitle(), Set title for window (only PLATFORM_DESKTOP) [core] ADDED: GetExtension(), Get file extension -[shapes] REMOVED: DrawRectangleGradient(), replaced by DrawRectangleGradientV() and DrawRectangleGradientH() -[shapes] ADDED: DrawRectangleGradientV(), Draw a vertical-gradient-filled rectangle -[shapes] ADDED: DrawRectangleGradientH(), Draw a horizontal-gradient-filled rectangle -[shapes] ADDED: DrawRectangleGradientEx(), Draw a gradient-filled rectangle with custom vertex colors -[shapes] ADDED: DrawRectangleT(), Draw rectangle using text character +[shapes] REMOVED: DrawrayRectangleGradient(), replaced by DrawrayRectangleGradientV() and DrawrayRectangleGradientH() +[shapes] ADDED: DrawrayRectangleGradientV(), Draw a vertical-gradient-filled rayRectangle +[shapes] ADDED: DrawrayRectangleGradientH(), Draw a horizontal-gradient-filled rayRectangle +[shapes] ADDED: DrawrayRectangleGradientEx(), Draw a gradient-filled rayRectangle with custom vertex colors +[shapes] ADDED: DrawrayRectangleT(), Draw rayRectangle using text character [textures] ADDED: SaveImageAs(), Save image as PNG file [textures] ADDED: GenImageGradientV(), Generate image: vertical gradient [textures] ADDED: GenImageGradientH(), Generate image: horizontal gradient @@ -1628,7 +1628,7 @@ other changes: [rlgl] Removed VR device support and replaced by VR simulator [shapes] Added function: DrawLineEx(), draw line with QUADS, supports custom line thick [shapes] Added function: DrawLineBezier(), draw a line using cubic-bezier curves in-out -[shapes] Added function: DrawRectanglePro(), draw a color-filled rectangle with pro parameters +[shapes] Added function: DrawrayRectanglePro(), draw a color-filled rayRectangle with pro parameters [textures] Removed function: LoadImageFromRES(), redesigning custom RRES fileformat [textures] Removed function: LoadTextureFromRES(), redesigning custom RRES fileformat [textures] Removed function: LoadTextureEx(), use instead Image -> LoadImagePro(), LoadImageEx() @@ -1800,7 +1800,7 @@ other changes: [models] Removed function: DrawQuad() [models] Removed function: SetModelTexture() [models] Redesigned DrawPlane() to use RL_TRIANGLES -[models] Redesigned DrawRectangleV() to use RL_TRIANGLES +[models] Redesigned DrawrayRectangleV() to use RL_TRIANGLES [models] Redesign to accomodate new materials system: LoadMaterial() [models] Added material functions: LoadDefaultMaterial(), LoadStandardMaterial() [models] Added MTL material loading support: LoadMTL() @@ -1884,7 +1884,7 @@ other changes: [rlgl] Added check for OpenGL supported extensions [rlgl] Added function SetBlenMode() to select some predefined blending modes [core] Added support for drop&drag of external files into running program -[core] Added functions ShowCursor(), HideCursor(), IsCursorHidden() +[core] Added functions rayShowCursor(), HideCursor(), IsCursorHidden() [core] Renamed function SetFlags() to SetConfigFlags() [shapes] Simplified some functions to improve performance [textures] Review of Image struct to support multiple data formats @@ -1898,7 +1898,7 @@ other changes: [textures] Added function ImageConvertFormat() [textures] Added function GenTextureMipmaps() [text] Added support for Latin-1 Extended characters for default font -[text] Redesigned SpriteFont struct, replaced Character struct by Rectangle +[text] Redesigned SpriteFont struct, replaced Character struct by rayRectangle [text] Removed function GetFontBaseSize(), use directly spriteFont.size [models] Review of struct: Model (added shaders support) [models] Added 3d collision functions (sphere vs sphere vs box vs box) @@ -1964,7 +1964,7 @@ NOTE: [rlgl] Fallback to VBOs only usage if VAOs not supported on ES2 [rlgl] rlglLoadModel() stores vbo ids on new Model struct [textures] Added support for PKM files (ETC1, ETC2 compression support) -[shapes] DrawRectangleV() - Modified, depending on OGL version uses TRIANGLES or QUADS +[shapes] DrawrayRectangleV() - Modified, depending on OGL version uses TRIANGLES or QUADS [text] LoadSpriteFont() - Modified to use LoadImage() [models] Minor changes on models loading to accomodate to new Model struct [audio] PauseMusicStream(), ResumeMusicStream() - Added @@ -1984,7 +1984,7 @@ Release: raylib 1.1.1 (22 July 2014) [rlgl] Removed double buffer system (no performance improvement) [rlgl] rlglDraw() - Reorganized buffers drawing order [rlgl] Corrected bug on screen resizing -[shapes] DrawRectangle() - Use QUADS instead of TRIANGLES +[shapes] DrawrayRectangle() - Use QUADS instead of TRIANGLES [models] DrawSphereWires() - Corrected some issues [models] LoadOBJ() - Redesigned to support multiple meshes [models] LoadCubesMap() - Loading a map as cubes (by pixel color) @@ -2082,7 +2082,7 @@ Release: raylib 1.0.3 (19 December 2013) [core] GetRandomValue() - Added, returns a random value within a range (int) [core] SetExitKey() - Added, sets a key to exit program (default is ESC) [core] Custom cursor not drawn when mouse out of screen -[shapes] CheckCollisionPointRec() - Added, check collision between point and rectangle +[shapes] CheckCollisionPointRec() - Added, check collision between point and rayRectangle [shapes] CheckCollisionPointCircle() - Added, check collision between point and circle [shapes] CheckCollisionPointTriangle() - Added, check collision between point and triangle [shapes] DrawPoly() - Added, draw regular polygons of n sides, rotation can be defined! @@ -2091,10 +2091,10 @@ Release: raylib 1.0.3 (19 December 2013) Release: raylib 1.0.2 (1 December 2013) ----------------------------------------------- [text] GetDefaultFont() - Added, get default SpriteFont to be used on DrawTextEx() -[shapes] CheckCollisionRecs() - Added, check collision between rectangles +[shapes] CheckCollisionRecs() - Added, check collision between rayRectangles [shapes] CheckCollisionCircles() - Added, check collision between circles -[shapes] CheckCollisionCircleRec() - Added, check collision circle-rectangle -[shapes] GetCollisionRec() - Added, get collision rectangle +[shapes] CheckCollisionCircleRec() - Added, check collision circle-rayRectangle +[shapes] GetCollisionRec() - Added, get collision rayRectangle [textures] CreateTexture2D() - Added, create Texture2D from Image data [audio] Fixed WAV loading function, now audio works! diff --git a/HISTORY.md b/HISTORY.md index f1a67bb41..a90165be3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -216,7 +216,7 @@ After almost one years since latest raylib installment, here it is **raylib 2.5* - Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually. - - Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality. + - Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rayRectangles (`DrawrayRectangleRounded()`, `DrawrayRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality. - Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures. diff --git a/README.md b/README.md index 9d2b78e47..a1b7e61ef 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ int main(void) EndDrawing(); } - CloseWindow(); + rayCloseWindow(); return 0; } diff --git a/examples/Makefile b/examples/Makefile index 5cd8e6bba..d583172a3 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -468,16 +468,16 @@ SHAPES = \ shapes/shapes_collision_area \ shapes/shapes_colors_palette \ shapes/shapes_draw_circle_sector \ - shapes/shapes_draw_rectangle_rounded \ + shapes/shapes_draw_rayRectangle_rounded \ shapes/shapes_draw_ring \ shapes/shapes_easings_ball_anim \ shapes/shapes_easings_box_anim \ - shapes/shapes_easings_rectangle_array \ + shapes/shapes_easings_rayRectangle_array \ shapes/shapes_following_eyes \ shapes/shapes_lines_bezier \ shapes/shapes_logo_raylib \ shapes/shapes_logo_raylib_anim \ - shapes/shapes_rectangle_scaling \ + shapes/shapes_rayRectangle_scaling \ shapes/shapes_splines_drawing \ shapes/shapes_top_down_lights @@ -518,7 +518,7 @@ TEXT = \ text/text_format_text \ text/text_input_box \ text/text_raylib_fonts \ - text/text_rectangle_bounds \ + text/text_rayRectangle_bounds \ text/text_unicode \ text/text_writing_anim diff --git a/examples/Makefile.Web b/examples/Makefile.Web index e8a726613..e7c2814b5 100644 --- a/examples/Makefile.Web +++ b/examples/Makefile.Web @@ -374,16 +374,16 @@ SHAPES = \ shapes/shapes_collision_area \ shapes/shapes_colors_palette \ shapes/shapes_draw_circle_sector \ - shapes/shapes_draw_rectangle_rounded \ + shapes/shapes_draw_rayRectangle_rounded \ shapes/shapes_draw_ring \ shapes/shapes_easings_ball_anim \ shapes/shapes_easings_box_anim \ - shapes/shapes_easings_rectangle_array \ + shapes/shapes_easings_rayRectangle_array \ shapes/shapes_following_eyes \ shapes/shapes_lines_bezier \ shapes/shapes_logo_raylib \ shapes/shapes_logo_raylib_anim \ - shapes/shapes_rectangle_scaling \ + shapes/shapes_rayRectangle_scaling \ shapes/shapes_splines_drawing \ shapes/shapes_top_down_lights @@ -424,7 +424,7 @@ TEXT = \ text/text_format_text \ text/text_input_box \ text/text_raylib_fonts \ - text/text_rectangle_bounds \ + text/text_rayRectangle_bounds \ text/text_unicode \ text/text_writing_anim @@ -630,7 +630,7 @@ shapes/shapes_colors_palette: shapes/shapes_colors_palette.c shapes/shapes_draw_circle_sector: shapes/shapes_draw_circle_sector.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -shapes/shapes_draw_rectangle_rounded: shapes/shapes_draw_rectangle_rounded.c +shapes/shapes_draw_rayRectangle_rounded: shapes/shapes_draw_rayRectangle_rounded.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) shapes/shapes_draw_ring: shapes/shapes_draw_ring.c @@ -642,7 +642,7 @@ shapes/shapes_easings_ball_anim: shapes/shapes_easings_ball_anim.c shapes/shapes_easings_box_anim: shapes/shapes_easings_box_anim.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -shapes/shapes_easings_rectangle_array: shapes/shapes_easings_rectangle_array.c +shapes/shapes_easings_rayRectangle_array: shapes/shapes_easings_rayRectangle_array.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) shapes/shapes_following_eyes: shapes/shapes_following_eyes.c @@ -657,7 +657,7 @@ shapes/shapes_logo_raylib: shapes/shapes_logo_raylib.c shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -shapes/shapes_rectangle_scaling: shapes/shapes_rectangle_scaling.c +shapes/shapes_rayRectangle_scaling: shapes/shapes_rayRectangle_scaling.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) shapes/shapes_splines_drawing: shapes/shapes_splines_drawing.c @@ -821,7 +821,7 @@ text/text_raylib_fonts: text/text_raylib_fonts.c --preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \ --preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png -text/text_rectangle_bounds: text/text_rectangle_bounds.c +text/text_rayRectangle_bounds: text/text_rayRectangle_bounds.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) text/text_unicode: text/text_unicode.c diff --git a/examples/README.md b/examples/README.md index 0fed8acd0..172fd3639 100644 --- a/examples/README.md +++ b/examples/README.md @@ -67,16 +67,16 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes]( | 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | shapes_colors_palette | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) | | 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | shapes_logo_raylib | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) | | 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | shapes_logo_raylib_anim | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) | -| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | shapes_rectangle_scaling | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | +| 36 | [shapes_rayRectangle_scaling](shapes/shapes_rayRectangle_scaling.c) | shapes_rayRectangle_scaling | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | | 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | shapes_lines_bezier | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) | | 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | shapes_collision_area | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | | 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | shapes_following_eyes | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | | 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | shapes_easings_ball_anim | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | | 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | shapes_easings_box_anim | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | -| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | shapes_easings_rectangle_array | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | +| 42 | [shapes_easings_rayRectangle_array](shapes/shapes_easings_rayRectangle_array.c) | shapes_easings_rayRectangle_array | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) | | 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | shapes_draw_ring | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | | 44 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | shapes_draw_circle_sector | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | -| 45 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | shapes_draw_rectangle_rounded | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | +| 45 | [shapes_draw_rayRectangle_rounded](shapes/shapes_draw_rayRectangle_rounded.c) | shapes_draw_rayRectangle_rounded | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) | | 46 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | shapes_top_down_lights | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) | ### category: textures @@ -122,7 +122,7 @@ Examples using raylib text functionality, including sprite fonts loading/generat | 74 | [text_format_text](text/text_format_text.c) | text_format_text | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) | | 75 | [text_input_box](text/text_input_box.c) | text_input_box | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) | | 76 | [text_writing_anim](text/text_writing_anim.c) | text_writing_anim | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) | -| 77 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | text_rectangle_bounds | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) | +| 77 | [text_rayRectangle_bounds](text/text_rayRectangle_bounds.c) | text_rayRectangle_bounds | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) | | 78 | [text_unicode](text/text_unicode.c) | text_unicode | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) | | 79 | [text_draw_3d](text/text_draw_3d.c) | text_draw_3d | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) | | 80 | [text_codepoints_loading](text/text_codepoints_loading.c) | text_codepoints_loading | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) | diff --git a/examples/audio/audio_mixed_processor.c b/examples/audio/audio_mixed_processor.c index 3a008f3e2..4889e8875 100644 --- a/examples/audio/audio_mixed_processor.c +++ b/examples/audio/audio_mixed_processor.c @@ -94,12 +94,12 @@ int main(void) DrawText(TextFormat("EXPONENT = %.2f", exponent), 215, 180, 20, LIGHTGRAY); - DrawRectangle(199, 199, 402, 34, LIGHTGRAY); + DrawrayRectangle(199, 199, 402, 34, LIGHTGRAY); for (int i = 0; i < 400; i++) { DrawLine(201 + i, 232 - averageVolume[i] * 32, 201 + i, 232, MAROON); } - DrawRectangleLines(199, 199, 402, 34, GRAY); + DrawrayRectangleLines(199, 199, 402, 34, GRAY); DrawText("PRESS SPACE TO PLAY OTHER SOUND", 200, 250, 20, LIGHTGRAY); DrawText("USE LEFT AND RIGHT ARROWS TO ALTER DISTORTION", 140, 280, 20, LIGHTGRAY); @@ -116,7 +116,7 @@ int main(void) CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_module_playing.c b/examples/audio/audio_module_playing.c index bf5530fdc..9199a8907 100644 --- a/examples/audio/audio_module_playing.c +++ b/examples/audio/audio_module_playing.c @@ -131,13 +131,13 @@ int main(void) } // Draw time bar - DrawRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY); - DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON); - DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY); + DrawrayRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY); + DrawrayRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON); + DrawrayRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY); // Draw help instructions - DrawRectangle(20, 20, 425, 145, WHITE); - DrawRectangleLines(20, 20, 425, 145, GRAY); + DrawrayRectangle(20, 20, 425, 145, WHITE); + DrawrayRectangleLines(20, 20, 425, 145, GRAY); DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK); DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK); DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK); @@ -153,7 +153,7 @@ int main(void) CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_music_stream.c b/examples/audio/audio_music_stream.c index 4cf29973d..43a43cf52 100644 --- a/examples/audio/audio_music_stream.c +++ b/examples/audio/audio_music_stream.c @@ -74,9 +74,9 @@ int main(void) DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY); - DrawRectangle(200, 200, 400, 12, LIGHTGRAY); - DrawRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON); - DrawRectangleLines(200, 200, 400, 12, GRAY); + DrawrayRectangle(200, 200, 400, 12, LIGHTGRAY); + DrawrayRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON); + DrawrayRectangleLines(200, 200, 400, 12, GRAY); DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY); DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY); @@ -91,7 +91,7 @@ int main(void) CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_raw_stream.c b/examples/audio/audio_raw_stream.c index 6befa765a..66195e844 100644 --- a/examples/audio/audio_raw_stream.c +++ b/examples/audio/audio_raw_stream.c @@ -208,7 +208,7 @@ int main(void) UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM CloseAudioDevice(); // Close audio device (music streaming is automatically stopped) - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_sound_loading.c b/examples/audio/audio_sound_loading.c index dae6516ee..e19c0b2c8 100644 --- a/examples/audio/audio_sound_loading.c +++ b/examples/audio/audio_sound_loading.c @@ -62,7 +62,7 @@ int main(void) CloseAudioDevice(); // Close audio device - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_sound_multi.c b/examples/audio/audio_sound_multi.c index d5472efab..55da34156 100644 --- a/examples/audio/audio_sound_multi.c +++ b/examples/audio/audio_sound_multi.c @@ -80,7 +80,7 @@ int main(void) CloseAudioDevice(); // Close audio device - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/audio/audio_stream_effects.c b/examples/audio/audio_stream_effects.c index 219305057..869867d1c 100644 --- a/examples/audio/audio_stream_effects.c +++ b/examples/audio/audio_stream_effects.c @@ -111,9 +111,9 @@ int main(void) DrawText("MUSIC SHOULD BE PLAYING!", 245, 150, 20, LIGHTGRAY); - DrawRectangle(200, 180, 400, 12, LIGHTGRAY); - DrawRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON); - DrawRectangleLines(200, 180, 400, 12, GRAY); + DrawrayRectangle(200, 180, 400, 12, LIGHTGRAY); + DrawrayRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON); + DrawrayRectangleLines(200, 180, 400, 12, GRAY); DrawText("PRESS SPACE TO RESTART MUSIC", 215, 230, 20, LIGHTGRAY); DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 260, 20, LIGHTGRAY); @@ -133,7 +133,7 @@ int main(void) RL_FREE(delayBuffer); // Free delay buffer - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_2d_camera.c b/examples/core/core_2d_camera.c index 759c099a1..e388119c8 100644 --- a/examples/core/core_2d_camera.c +++ b/examples/core/core_2d_camera.c @@ -27,8 +27,8 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera"); - Rectangle player = { 400, 280, 40, 40 }; - Rectangle buildings[MAX_BUILDINGS] = { 0 }; + rayRectangle player = { 400, 280, 40, 40 }; + rayRectangle buildings[MAX_BUILDINGS] = { 0 }; Color buildColors[MAX_BUILDINGS] = { 0 }; int spacing = 0; @@ -96,11 +96,11 @@ int main(void) BeginMode2D(camera); - DrawRectangle(-6000, 320, 13000, 8000, DARKGRAY); + DrawrayRectangle(-6000, 320, 13000, 8000, DARKGRAY); - for (int i = 0; i < MAX_BUILDINGS; i++) DrawRectangleRec(buildings[i], buildColors[i]); + for (int i = 0; i < MAX_BUILDINGS; i++) DrawrayRectangleRec(buildings[i], buildColors[i]); - DrawRectangleRec(player, RED); + DrawrayRectangleRec(player, RED); DrawLine((int)camera.target.x, -screenHeight*10, (int)camera.target.x, screenHeight*10, GREEN); DrawLine(-screenWidth*10, (int)camera.target.y, screenWidth*10, (int)camera.target.y, GREEN); @@ -109,13 +109,13 @@ int main(void) DrawText("SCREEN AREA", 640, 10, 20, RED); - DrawRectangle(0, 0, screenWidth, 5, RED); - DrawRectangle(0, 5, 5, screenHeight - 10, RED); - DrawRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED); - DrawRectangle(0, screenHeight - 5, screenWidth, 5, RED); + DrawrayRectangle(0, 0, screenWidth, 5, RED); + DrawrayRectangle(0, 5, 5, screenHeight - 10, RED); + DrawrayRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED); + DrawrayRectangle(0, screenHeight - 5, screenWidth, 5, RED); - DrawRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines( 10, 10, 250, 113, BLUE); + DrawrayRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines( 10, 10, 250, 113, BLUE); DrawText("Free 2d camera controls:", 20, 20, 10, BLACK); DrawText("- Right/Left to move Offset", 40, 40, 10, DARKGRAY); @@ -129,7 +129,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_2d_camera_mouse_zoom.c b/examples/core/core_2d_camera_mouse_zoom.c index 2e94d37a5..fcf268d15 100644 --- a/examples/core/core_2d_camera_mouse_zoom.c +++ b/examples/core/core_2d_camera_mouse_zoom.c @@ -99,7 +99,7 @@ int main () // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; } \ No newline at end of file diff --git a/examples/core/core_2d_camera_platformer.c b/examples/core/core_2d_camera_platformer.c index 72b1ee1e3..98d96b934 100644 --- a/examples/core/core_2d_camera_platformer.c +++ b/examples/core/core_2d_camera_platformer.c @@ -27,7 +27,7 @@ typedef struct Player { } Player; typedef struct EnvItem { - Rectangle rect; + rayRectangle rect; int blocking; Color color; } EnvItem; @@ -131,10 +131,10 @@ int main(void) BeginMode2D(camera); - for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color); + for (int i = 0; i < envItemsLength; i++) DrawrayRectangleRec(envItems[i].rect, envItems[i].color); - Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 }; - DrawRectangleRec(playerRect, RED); + rayRectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 }; + DrawrayRectangleRec(playerRect, RED); EndMode2D(); @@ -152,7 +152,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_2d_camera_split_screen.c b/examples/core/core_2d_camera_split_screen.c index 60b5a2e55..fb030d0d3 100644 --- a/examples/core/core_2d_camera_split_screen.c +++ b/examples/core/core_2d_camera_split_screen.c @@ -32,8 +32,8 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera split screen"); - Rectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE }; - Rectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE }; + rayRectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE }; + rayRectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE }; Camera2D camera1 = { 0 }; camera1.target = (Vector2){ player1.x, player1.y }; @@ -50,8 +50,8 @@ int main(void) RenderTexture screenCamera1 = LoadRenderTexture(screenWidth/2, screenHeight); RenderTexture screenCamera2 = LoadRenderTexture(screenWidth/2, screenHeight); - // Build a flipped rectangle the size of the split view to use for drawing later - Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height }; + // Build a flipped rayRectangle the size of the split view to use for drawing later + rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height }; SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- @@ -101,11 +101,11 @@ int main(void) } } - DrawRectangleRec(player1, RED); - DrawRectangleRec(player2, BLUE); + DrawrayRectangleRec(player1, RED); + DrawrayRectangleRec(player2, BLUE); EndMode2D(); - DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f)); + DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f)); DrawText("PLAYER1: W/S/A/D to move", 10, 10, 10, MAROON); EndTextureMode(); @@ -134,12 +134,12 @@ int main(void) } } - DrawRectangleRec(player1, RED); - DrawRectangleRec(player2, BLUE); + DrawrayRectangleRec(player1, RED); + DrawrayRectangleRec(player2, BLUE); EndMode2D(); - DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f)); + DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f)); DrawText("PLAYER2: UP/DOWN/LEFT/RIGHT to move", 10, 10, 10, DARKBLUE); EndTextureMode(); @@ -151,7 +151,7 @@ int main(void) DrawTextureRec(screenCamera1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE); DrawTextureRec(screenCamera2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE); - DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY); + DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY); EndDrawing(); } @@ -160,7 +160,7 @@ int main(void) UnloadRenderTexture(screenCamera1); // Unload render texture UnloadRenderTexture(screenCamera2); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_3d_camera_first_person.c b/examples/core/core_3d_camera_first_person.c index 6a2a115a7..f0b99d869 100644 --- a/examples/core/core_3d_camera_first_person.c +++ b/examples/core/core_3d_camera_first_person.c @@ -169,8 +169,8 @@ int main(void) EndMode3D(); // Draw info boxes - DrawRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(5, 5, 330, 100, BLUE); + DrawrayRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(5, 5, 330, 100, BLUE); DrawText("Camera controls:", 15, 15, 10, BLACK); DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 10, BLACK); @@ -179,8 +179,8 @@ int main(void) DrawText("- Zoom keys: num-plus, num-minus or mouse scroll", 15, 75, 10, BLACK); DrawText("- Camera projection key: P", 15, 90, 10, BLACK); - DrawRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(600, 5, 195, 100, BLUE); + DrawrayRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(600, 5, 195, 100, BLUE); DrawText("Camera status:", 610, 15, 10, BLACK); DrawText(TextFormat("- Mode: %s", (cameraMode == CAMERA_FREE) ? "FREE" : @@ -199,7 +199,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_3d_camera_free.c b/examples/core/core_3d_camera_free.c index 3c30a426e..ab3947a69 100644 --- a/examples/core/core_3d_camera_free.c +++ b/examples/core/core_3d_camera_free.c @@ -65,8 +65,8 @@ int main(void) EndMode3D(); - DrawRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines( 10, 10, 320, 93, BLUE); + DrawrayRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines( 10, 10, 320, 93, BLUE); DrawText("Free camera default controls:", 20, 20, 10, BLACK); DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY); @@ -79,7 +79,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_3d_camera_mode.c b/examples/core/core_3d_camera_mode.c index cb83a4a2b..86ae3d78d 100644 --- a/examples/core/core_3d_camera_mode.c +++ b/examples/core/core_3d_camera_mode.c @@ -71,7 +71,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_3d_camera_split_screen.c b/examples/core/core_3d_camera_split_screen.c index d625e1c0e..00c832db4 100644 --- a/examples/core/core_3d_camera_split_screen.c +++ b/examples/core/core_3d_camera_split_screen.c @@ -47,8 +47,8 @@ int main(void) RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight); - // Build a flipped rectangle the size of the split view to use for drawing later - Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height }; + // Build a flipped rayRectangle the size of the split view to use for drawing later + rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height }; // Grid data int count = 5; @@ -117,7 +117,7 @@ int main(void) EndMode3D(); - DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f)); + DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f)); DrawText("PLAYER1: W/S to move", 10, 10, 20, MAROON); EndTextureMode(); @@ -146,7 +146,7 @@ int main(void) EndMode3D(); - DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f)); + DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f)); DrawText("PLAYER2: UP/DOWN to move", 10, 10, 20, DARKBLUE); EndTextureMode(); @@ -158,7 +158,7 @@ int main(void) DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE); DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE); - DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY); + DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY); EndDrawing(); } @@ -167,7 +167,7 @@ int main(void) UnloadRenderTexture(screenPlayer1); // Unload render texture UnloadRenderTexture(screenPlayer2); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_3d_picking.c b/examples/core/core_3d_picking.c index c7bf94663..d0651573d 100644 --- a/examples/core/core_3d_picking.c +++ b/examples/core/core_3d_picking.c @@ -111,7 +111,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_automation_events.c b/examples/core/core_automation_events.c index b58d572bd..d44afac77 100644 --- a/examples/core/core_automation_events.c +++ b/examples/core/core_automation_events.c @@ -29,7 +29,7 @@ typedef struct Player { } Player; typedef struct EnvElement { - Rectangle rect; + rayRectangle rect; int blocking; Color color; } EnvElement; @@ -282,17 +282,17 @@ int main(void) // Draw environment elements for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++) { - DrawRectangleRec(envElements[i].rect, envElements[i].color); + DrawrayRectangleRec(envElements[i].rect, envElements[i].color); } - // Draw player rectangle - DrawRectangleRec((Rectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED); + // Draw player rayRectangle + DrawrayRectangleRec((rayRectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED); EndMode2D(); // Draw game controls - DrawRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f)); + DrawrayRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f)); DrawText("Controls:", 20, 20, 10, BLACK); DrawText("- RIGHT | LEFT: Player movement", 30, 40, 10, DARKGRAY); @@ -305,16 +305,16 @@ int main(void) // Draw automation events recording indicator if (eventRecording) { - DrawRectangle(10, 160, 290, 30, Fade(RED, 0.3f)); - DrawRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f)); + DrawrayRectangle(10, 160, 290, 30, Fade(RED, 0.3f)); + DrawrayRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f)); DrawCircle(30, 175, 10, MAROON); if (((frameCounter/15)%2) == 1) DrawText(TextFormat("RECORDING EVENTS... [%i]", aelist.count), 50, 170, 10, MAROON); } else if (eventPlaying) { - DrawRectangle(10, 160, 290, 30, Fade(LIME, 0.3f)); - DrawRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f)); + DrawrayRectangle(10, 160, 290, 30, Fade(LIME, 0.3f)); + DrawrayRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f)); DrawTriangle((Vector2){ 20, 155 + 10 }, (Vector2){ 20, 155 + 30 }, (Vector2){ 40, 155 + 20 }, DARKGREEN); if (((frameCounter/15)%2) == 1) DrawText(TextFormat("PLAYING RECORDED EVENTS... [%i]", currentPlayFrame), 50, 170, 10, DARKGREEN); @@ -327,7 +327,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_basic_screen_manager.c b/examples/core/core_basic_screen_manager.c index a80572988..0f4b238cb 100644 --- a/examples/core/core_basic_screen_manager.c +++ b/examples/core/core_basic_screen_manager.c @@ -112,7 +112,7 @@ int main(void) case TITLE: { // TODO: Draw TITLE screen here! - DrawRectangle(0, 0, screenWidth, screenHeight, GREEN); + DrawrayRectangle(0, 0, screenWidth, screenHeight, GREEN); DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN); DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN); @@ -120,7 +120,7 @@ int main(void) case GAMEPLAY: { // TODO: Draw GAMEPLAY screen here! - DrawRectangle(0, 0, screenWidth, screenHeight, PURPLE); + DrawrayRectangle(0, 0, screenWidth, screenHeight, PURPLE); DrawText("GAMEPLAY SCREEN", 20, 20, 40, MAROON); DrawText("PRESS ENTER or TAP to JUMP to ENDING SCREEN", 130, 220, 20, MAROON); @@ -128,7 +128,7 @@ int main(void) case ENDING: { // TODO: Draw ENDING screen here! - DrawRectangle(0, 0, screenWidth, screenHeight, BLUE); + DrawrayRectangle(0, 0, screenWidth, screenHeight, BLUE); DrawText("ENDING SCREEN", 20, 20, 40, DARKBLUE); DrawText("PRESS ENTER or TAP to RETURN to TITLE SCREEN", 120, 220, 20, DARKBLUE); @@ -145,7 +145,7 @@ int main(void) // TODO: Unload all loaded data (textures, fonts, audio) here! - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_basic_window.c b/examples/core/core_basic_window.c index 5bfd186da..110491182 100644 --- a/examples/core/core_basic_window.c +++ b/examples/core/core_basic_window.c @@ -60,7 +60,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_basic_window_web.c b/examples/core/core_basic_window_web.c index e0e1f9fb1..fe1c2de8d 100644 --- a/examples/core/core_basic_window_web.c +++ b/examples/core/core_basic_window_web.c @@ -58,7 +58,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_custom_frame_control.c b/examples/core/core_custom_frame_control.c index 9bfd25d3e..788d32a7f 100644 --- a/examples/core/core_custom_frame_control.c +++ b/examples/core/core_custom_frame_control.c @@ -82,7 +82,7 @@ int main(void) ClearBackground(RAYWHITE); - for (int i = 0; i < GetScreenWidth()/200; i++) DrawRectangle(200*i, 0, 1, GetScreenHeight(), SKYBLUE); + for (int i = 0; i < GetScreenWidth()/200; i++) DrawrayRectangle(200*i, 0, 1, GetScreenHeight(), SKYBLUE); DrawCircle((int)position, GetScreenHeight()/2 - 25, 50, RED); @@ -123,7 +123,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_custom_logging.c b/examples/core/core_custom_logging.c index b4da2d575..4b90dfe74 100644 --- a/examples/core/core_custom_logging.c +++ b/examples/core/core_custom_logging.c @@ -81,7 +81,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_drop_files.c b/examples/core/core_drop_files.c index d4ddd9edc..8106a9c86 100644 --- a/examples/core/core_drop_files.c +++ b/examples/core/core_drop_files.c @@ -79,8 +79,8 @@ int main(void) for (int i = 0; i < filePathCounter; i++) { - if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f)); - else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f)); + if (i%2 == 0) DrawrayRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f)); + else DrawrayRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f)); DrawText(filePaths[i], 120, 100 + 40*i, 10, GRAY); } @@ -99,7 +99,7 @@ int main(void) RL_FREE(filePaths[i]); // Free allocated memory for all filepaths } - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index c28ff1f9e..fc5f8d695 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -83,12 +83,12 @@ int main(void) if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD); // Draw buttons: d-pad - DrawRectangle(317, 202, 19, 71, BLACK); - DrawRectangle(293, 228, 69, 19, BLACK); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED); + DrawrayRectangle(317, 202, 19, 71, BLACK); + DrawrayRectangle(293, 228, 69, 19, BLACK); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawrayRectangle(317, 202, 19, 26, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawrayRectangle(317, 202 + 45, 19, 26, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawrayRectangle(292, 228, 25, 19, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawrayRectangle(292 + 44, 228, 26, 19, RED); // Draw buttons: left-right back if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED); @@ -112,10 +112,10 @@ int main(void) 237 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y)*20), 25, rightGamepadColor); // Draw axis: left-right triggers - DrawRectangle(170, 30, 15, 70, GRAY); - DrawRectangle(604, 30, 15, 70, GRAY); - DrawRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED); - DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED); + DrawrayRectangle(170, 30, 15, 70, GRAY); + DrawrayRectangle(604, 30, 15, 70, GRAY); + DrawrayRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED); + DrawrayRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED); //DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); //DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); @@ -128,7 +128,7 @@ int main(void) if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED); // Draw buttons: basic - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawrayRectangle(328, 170, 32, 13, RED); if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED); if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME); if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED); @@ -136,12 +136,12 @@ int main(void) if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK); // Draw buttons: d-pad - DrawRectangle(225, 132, 24, 84, BLACK); - DrawRectangle(195, 161, 84, 25, BLACK); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED); - if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED); + DrawrayRectangle(225, 132, 24, 84, BLACK); + DrawrayRectangle(195, 161, 84, 25, BLACK); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawrayRectangle(225, 132, 24, 29, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawrayRectangle(225, 132 + 54, 24, 30, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawrayRectangle(195, 161, 30, 25, RED); + if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawrayRectangle(195 + 54, 161, 30, 25, RED); // Draw buttons: left-right back buttons if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED); @@ -164,10 +164,10 @@ int main(void) 255 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, rightGamepadColor); // Draw axis: left-right triggers - DrawRectangle(169, 48, 15, 70, GRAY); - DrawRectangle(611, 48, 15, 70, GRAY); - DrawRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED); - DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED); + DrawrayRectangle(169, 48, 15, 70, GRAY); + DrawrayRectangle(611, 48, 15, 70, GRAY); + DrawrayRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED); + DrawrayRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED); } else { @@ -202,7 +202,7 @@ int main(void) UnloadTexture(texPs3Pad); UnloadTexture(texXboxPad); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_gamepad_info.c b/examples/core/core_input_gamepad_info.c index 9aebb815a..c585d85cd 100644 --- a/examples/core/core_input_gamepad_info.c +++ b/examples/core/core_input_gamepad_info.c @@ -78,6 +78,6 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- } \ No newline at end of file diff --git a/examples/core/core_input_gestures.c b/examples/core/core_input_gestures.c index 312e78ffd..f8610f195 100644 --- a/examples/core/core_input_gestures.c +++ b/examples/core/core_input_gestures.c @@ -28,7 +28,7 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures"); Vector2 touchPosition = { 0, 0 }; - Rectangle touchArea = { 220, 10, screenWidth - 230.0f, screenHeight - 20.0f }; + rayRectangle touchArea = { 220, 10, screenWidth - 230.0f, screenHeight - 20.0f }; int gesturesCount = 0; char gestureStrings[MAX_GESTURE_STRINGS][32]; @@ -89,21 +89,21 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectangleRec(touchArea, GRAY); - DrawRectangle(225, 15, screenWidth - 240, screenHeight - 30, RAYWHITE); + DrawrayRectangleRec(touchArea, GRAY); + DrawrayRectangle(225, 15, screenWidth - 240, screenHeight - 30, RAYWHITE); DrawText("GESTURES TEST AREA", screenWidth - 270, screenHeight - 40, 20, Fade(GRAY, 0.5f)); for (int i = 0; i < gesturesCount; i++) { - if (i%2 == 0) DrawRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.5f)); - else DrawRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.3f)); + if (i%2 == 0) DrawrayRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.5f)); + else DrawrayRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.3f)); if (i < gesturesCount - 1) DrawText(gestureStrings[i], 35, 36 + 20*i, 10, DARKGRAY); else DrawText(gestureStrings[i], 35, 36 + 20*i, 10, MAROON); } - DrawRectangleLines(10, 29, 200, screenHeight - 50, GRAY); + DrawrayRectangleLines(10, 29, 200, screenHeight - 50, GRAY); DrawText("DETECTED GESTURES", 50, 15, 10, GRAY); if (currentGesture != GESTURE_NONE) DrawCircleV(touchPosition, 30, MAROON); @@ -114,6 +114,6 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- } \ No newline at end of file diff --git a/examples/core/core_input_gestures_web.c b/examples/core/core_input_gestures_web.c index e1492244c..9b545fd3d 100644 --- a/examples/core/core_input_gestures_web.c +++ b/examples/core/core_input_gestures_web.c @@ -82,8 +82,8 @@ Color GetGestureColor(int i) int logMode = 1; // Log mode values: 0 shows repeated events; 1 hides repeated events; 2 shows repeated events but hide hold events; 3 hides repeated events and hide hold events Color gestureColor = { 0, 0, 0, 255 }; -Rectangle logButton1 = { 53, 7, 48, 26 }; -Rectangle logButton2 = { 108, 7, 36, 26 }; +rayRectangle logButton1 = { 53, 7, 48, 26 }; +rayRectangle logButton2 = { 108, 7, 36, 26 }; Vector2 gestureLogPosition = { 10, 10 }; // Protractor variables definitions @@ -218,10 +218,10 @@ void Update(void) //-------------------------------------------------------------------------------------- DrawText("Last gesture", lastGesturePosition.x + 33, lastGesturePosition.y - 47, 20, BLACK); DrawText("Swipe Tap Pinch Touch", lastGesturePosition.x + 17, lastGesturePosition.y - 18, 10, BLACK); - DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY); - DrawRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY); - DrawRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY); - DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY); + DrawrayRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY); + DrawrayRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY); + DrawrayRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY); + DrawrayRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY); DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 16, 10, lastGesture == GESTURE_TAP ? BLUE : LIGHTGRAY); DrawRing( (Vector2){lastGesturePosition.x + 103, lastGesturePosition.y + 16}, 6.0f, 11.0f, 0.0f, 360.0f, 0, lastGesture == GESTURE_DRAG ? LIME : LIGHTGRAY); DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY); @@ -246,10 +246,10 @@ void Update(void) case 1: logButton1Color=MAROON; logButton2Color=GRAY; break; default: logButton1Color=GRAY; logButton2Color=GRAY; break; } - DrawRectangleRec(logButton1, logButton1Color); + DrawrayRectangleRec(logButton1, logButton1Color); DrawText("Hide", logButton1.x + 7, logButton1.y + 3, 10, WHITE); DrawText("Repeat", logButton1.x + 7, logButton1.y + 13, 10, WHITE); - DrawRectangleRec(logButton2, logButton2Color); + DrawrayRectangleRec(logButton2, logButton2Color); DrawText("Hide", logButton1.x + 62, logButton1.y + 3, 10, WHITE); DrawText("Hold", logButton1.x + 62, logButton1.y + 13, 10, WHITE); @@ -323,7 +323,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_keys.c b/examples/core/core_input_keys.c index ccff24005..3e09f57ac 100644 --- a/examples/core/core_input_keys.c +++ b/examples/core/core_input_keys.c @@ -57,7 +57,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_mouse.c b/examples/core/core_input_mouse.c index 874e16c30..92444b707 100644 --- a/examples/core/core_input_mouse.c +++ b/examples/core/core_input_mouse.c @@ -63,7 +63,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_mouse_wheel.c b/examples/core/core_input_mouse_wheel.c index 826bad3a1..6b8b0dc13 100644 --- a/examples/core/core_input_mouse_wheel.c +++ b/examples/core/core_input_mouse_wheel.c @@ -45,7 +45,7 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON); + DrawrayRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON); DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY); DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY); @@ -56,7 +56,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_input_multitouch.c b/examples/core/core_input_multitouch.c index 37817e5a0..48eafd536 100644 --- a/examples/core/core_input_multitouch.c +++ b/examples/core/core_input_multitouch.c @@ -72,7 +72,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_loading_thread.c b/examples/core/core_loading_thread.c index 8451ff037..457909db8 100644 --- a/examples/core/core_loading_thread.c +++ b/examples/core/core_loading_thread.c @@ -105,20 +105,20 @@ int main(void) case STATE_WAITING: DrawText("PRESS ENTER to START LOADING DATA", 150, 170, 20, DARKGRAY); break; case STATE_LOADING: { - DrawRectangle(150, 200, atomic_load_explicit(&dataProgress, memory_order_relaxed), 60, SKYBLUE); + DrawrayRectangle(150, 200, atomic_load_explicit(&dataProgress, memory_order_relaxed), 60, SKYBLUE); if ((framesCounter/15)%2) DrawText("LOADING DATA...", 240, 210, 40, DARKBLUE); } break; case STATE_FINISHED: { - DrawRectangle(150, 200, 500, 60, LIME); + DrawrayRectangle(150, 200, 500, 60, LIME); DrawText("DATA LOADED!", 250, 210, 40, GREEN); } break; default: break; } - DrawRectangleLines(150, 200, 500, 60, DARKGRAY); + DrawrayRectangleLines(150, 200, 500, 60, DARKGRAY); EndDrawing(); //---------------------------------------------------------------------------------- @@ -126,7 +126,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_random_values.c b/examples/core/core_random_values.c index bec1de27b..2990c7b67 100644 --- a/examples/core/core_random_values.c +++ b/examples/core/core_random_values.c @@ -65,7 +65,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_scissor_test.c b/examples/core/core_scissor_test.c index c2b853c05..5eeb78162 100644 --- a/examples/core/core_scissor_test.c +++ b/examples/core/core_scissor_test.c @@ -27,7 +27,7 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [core] example - scissor test"); - Rectangle scissorArea = { 0, 0, 300, 300 }; + rayRectangle scissorArea = { 0, 0, 300, 300 }; bool scissorMode = true; SetTargetFPS(60); // Set our game to run at 60 frames-per-second @@ -53,14 +53,14 @@ int main(void) if (scissorMode) BeginScissorMode((int)scissorArea.x, (int)scissorArea.y, (int)scissorArea.width, (int)scissorArea.height); - // Draw full screen rectangle and some text + // Draw full screen rayRectangle and some text // NOTE: Only part defined by scissor area will be rendered - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RED); + DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RED); DrawText("Move the mouse around to reveal this text!", 190, 200, 20, LIGHTGRAY); if (scissorMode) EndScissorMode(); - DrawRectangleLinesEx(scissorArea, 1, BLACK); + DrawrayRectangleLinesEx(scissorArea, 1, BLACK); DrawText("Press S to toggle scissor test", 10, 10, 20, BLACK); EndDrawing(); @@ -69,7 +69,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_smooth_pixelperfect.c b/examples/core/core_smooth_pixelperfect.c index 3d5ed94f9..3633eac0a 100644 --- a/examples/core/core_smooth_pixelperfect.c +++ b/examples/core/core_smooth_pixelperfect.c @@ -43,13 +43,13 @@ int main(void) RenderTexture2D target = LoadRenderTexture(virtualScreenWidth, virtualScreenHeight); // This is where we'll draw all our objects. - Rectangle rec01 = { 70.0f, 35.0f, 20.0f, 20.0f }; - Rectangle rec02 = { 90.0f, 55.0f, 30.0f, 10.0f }; - Rectangle rec03 = { 80.0f, 65.0f, 15.0f, 25.0f }; + rayRectangle rec01 = { 70.0f, 35.0f, 20.0f, 20.0f }; + rayRectangle rec02 = { 90.0f, 55.0f, 30.0f, 10.0f }; + rayRectangle rec03 = { 80.0f, 65.0f, 15.0f, 25.0f }; - // The target's height is flipped (in the source Rectangle), due to OpenGL reasons - Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height }; - Rectangle destRec = { -virtualRatio, -virtualRatio, screenWidth + (virtualRatio*2), screenHeight + (virtualRatio*2) }; + // The target's height is flipped (in the source rayRectangle), due to OpenGL reasons + rayRectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height }; + rayRectangle destRec = { -virtualRatio, -virtualRatio, screenWidth + (virtualRatio*2), screenHeight + (virtualRatio*2) }; Vector2 origin = { 0.0f, 0.0f }; @@ -66,7 +66,7 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - rotation += 60.0f*GetFrameTime(); // Rotate the rectangles, 60 degrees per second + rotation += 60.0f*GetFrameTime(); // Rotate the rayRectangles, 60 degrees per second // Make the camera move to demonstrate the effect cameraX = (sinf(GetTime())*50.0f) - 10.0f; @@ -91,9 +91,9 @@ int main(void) ClearBackground(RAYWHITE); BeginMode2D(worldSpaceCamera); - DrawRectanglePro(rec01, origin, rotation, BLACK); - DrawRectanglePro(rec02, origin, -rotation, RED); - DrawRectanglePro(rec03, origin, rotation + 45.0f, BLUE); + DrawrayRectanglePro(rec01, origin, rotation, BLACK); + DrawrayRectanglePro(rec02, origin, -rotation, RED); + DrawrayRectanglePro(rec03, origin, rotation + 45.0f, BLUE); EndMode2D(); EndTextureMode(); @@ -115,7 +115,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_storage_values.c b/examples/core/core_storage_values.c index c7fd7d9b4..363fe1105 100644 --- a/examples/core/core_storage_values.c +++ b/examples/core/core_storage_values.c @@ -93,7 +93,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_vr_simulator.c b/examples/core/core_vr_simulator.c index fc2dee6b9..cfe54fafd 100644 --- a/examples/core/core_vr_simulator.c +++ b/examples/core/core_vr_simulator.c @@ -85,9 +85,9 @@ int main(void) // NOTE: Screen size should match HMD aspect ratio RenderTexture2D target = LoadRenderTexture(device.hResolution, device.vResolution); - // The target's height is flipped (in the source Rectangle), due to OpenGL reasons - Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height }; - Rectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() }; + // The target's height is flipped (in the source rayRectangle), due to OpenGL reasons + rayRectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height }; + rayRectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() }; // Define the camera to look into our 3d world Camera camera = { 0 }; @@ -144,7 +144,7 @@ int main(void) UnloadRenderTexture(target); // Unload stereo render fbo UnloadShader(distortion); // Unload distortion shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_window_flags.c b/examples/core/core_window_flags.c index b1cbb1b64..40b035012 100644 --- a/examples/core/core_window_flags.c +++ b/examples/core/core_window_flags.c @@ -144,7 +144,7 @@ int main(void) else ClearBackground(RAYWHITE); DrawCircleV(ballPosition, ballRadius, MAROON); - DrawRectangleLinesEx((Rectangle) { 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE); + DrawrayRectangleLinesEx((rayRectangle) { 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE); DrawCircleV(GetMousePosition(), 10, DARKBLUE); @@ -189,7 +189,7 @@ int main(void) // De-Initialization //--------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //---------------------------------------------------------- return 0; diff --git a/examples/core/core_window_letterbox.c b/examples/core/core_window_letterbox.c index 751fb14ab..2827bb535 100644 --- a/examples/core/core_window_letterbox.c +++ b/examples/core/core_window_letterbox.c @@ -78,7 +78,7 @@ int main(void) BeginTextureMode(target); ClearBackground(RAYWHITE); // Clear render texture background color - for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]); + for (int i = 0; i < 10; i++) DrawrayRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]); DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE); DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN); @@ -89,8 +89,8 @@ int main(void) ClearBackground(BLACK); // Clear screen background // Draw render texture to screen, properly scaled - DrawTexturePro(target.texture, (Rectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height }, - (Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5f, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f, + DrawTexturePro(target.texture, (rayRectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height }, + (rayRectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5f, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f, (float)gameScreenWidth*scale, (float)gameScreenHeight*scale }, (Vector2){ 0, 0 }, 0.0f, WHITE); EndDrawing(); //-------------------------------------------------------------------------------------- @@ -100,7 +100,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_window_should_close.c b/examples/core/core_window_should_close.c index f0392b013..be16fab3c 100644 --- a/examples/core/core_window_should_close.c +++ b/examples/core/core_window_should_close.c @@ -59,7 +59,7 @@ int main() if (exitWindowRequested) { - DrawRectangle(0, 100, screenWidth, 200, BLACK); + DrawrayRectangle(0, 100, screenWidth, 200, BLACK); DrawText("Are you sure you want to exit program? [Y/N]", 40, 180, 30, WHITE); } else DrawText("Try to close the window to get confirmation message!", 120, 200, 20, LIGHTGRAY); @@ -70,7 +70,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/core/core_world_screen.c b/examples/core/core_world_screen.c index 6c811a509..8aa21c603 100644 --- a/examples/core/core_world_screen.c +++ b/examples/core/core_world_screen.c @@ -78,7 +78,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/examples_template.c b/examples/examples_template.c index 5cf0b98d8..f91053b55 100644 --- a/examples/examples_template.c +++ b/examples/examples_template.c @@ -115,7 +115,7 @@ int main(void) // TODO: Unload all loaded resources at this point - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_animation.c b/examples/models/models_animation.c index 8e6f7f877..432d30d7d 100644 --- a/examples/models/models_animation.c +++ b/examples/models/models_animation.c @@ -104,7 +104,7 @@ int main(void) UnloadModelAnimations(anims, animsCount); // Unload model animations data UnloadModel(model); // Unload model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_billboard.c b/examples/models/models_billboard.c index 9b02a8af1..beb57d2e0 100644 --- a/examples/models/models_billboard.c +++ b/examples/models/models_billboard.c @@ -39,7 +39,7 @@ int main(void) Vector3 billPositionRotating = { 1.0f, 2.0f, 1.0f }; // Position of rotating billboard // Entire billboard texture, source is used to take a segment from a larger texture. - Rectangle source = { 0.0f, 0.0f, (float)bill.width, (float)bill.height }; + rayRectangle source = { 0.0f, 0.0f, (float)bill.width, (float)bill.height }; // NOTE: Billboard locked on axis-Y Vector3 billUp = { 0.0f, 1.0f, 0.0f }; @@ -104,7 +104,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(bill); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_box_collisions.c b/examples/models/models_box_collisions.c index 9cff5e058..2047d61cf 100644 --- a/examples/models/models_box_collisions.c +++ b/examples/models/models_box_collisions.c @@ -119,7 +119,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_cubicmap.c b/examples/models/models_cubicmap.c index e0a2b3089..8f1d82be1 100644 --- a/examples/models/models_cubicmap.c +++ b/examples/models/models_cubicmap.c @@ -71,7 +71,7 @@ int main(void) EndMode3D(); DrawTextureEx(cubicmap, (Vector2){ screenWidth - cubicmap.width*4.0f - 20, 20.0f }, 0.0f, 4.0f, WHITE); - DrawRectangleLines(screenWidth - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); + DrawrayRectangleLines(screenWidth - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); DrawText("cubicmap image used to", 658, 90, 10, GRAY); DrawText("generate map 3d model", 658, 104, 10, GRAY); @@ -88,7 +88,7 @@ int main(void) UnloadTexture(texture); // Unload map texture UnloadModel(model); // Unload map model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_draw_cube_texture.c b/examples/models/models_draw_cube_texture.c index e43c3c844..8778d6d02 100644 --- a/examples/models/models_draw_cube_texture.c +++ b/examples/models/models_draw_cube_texture.c @@ -19,7 +19,7 @@ // Custom Functions Declaration //------------------------------------------------------------------------------------ void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured -void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture +void DrawCubeTextureRec(Texture2D texture, rayRectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture //------------------------------------------------------------------------------------ // Program main entry point @@ -66,8 +66,8 @@ int main(void) // Draw cube with an applied texture DrawCubeTexture(texture, (Vector3){ -2.0f, 2.0f, 0.0f }, 2.0f, 4.0f, 2.0f, WHITE); - // Draw cube with an applied texture, but only a defined rectangle piece of the texture - DrawCubeTextureRec(texture, (Rectangle){ 0, texture.height/2, texture.width/2, texture.height/2 }, + // Draw cube with an applied texture, but only a defined rayRectangle piece of the texture + DrawCubeTextureRec(texture, (rayRectangle){ 0, texture.height/2, texture.width/2, texture.height/2 }, (Vector3){ 2.0f, 1.0f, 0.0f }, 2.0f, 2.0f, 2.0f, WHITE); DrawGrid(10, 1.0f); // Draw a grid @@ -84,7 +84,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; @@ -157,7 +157,7 @@ void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float hei } // Draw cube with texture piece applied to all faces -void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color) +void DrawCubeTextureRec(Texture2D texture, rayRectangle source, Vector3 position, float width, float height, float length, Color color) { float x = position.x; float y = position.y; @@ -168,7 +168,7 @@ void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, f // Set desired texture to be enabled while drawing following vertex data rlSetTexture(texture.id); - // We calculate the normalized texture coordinates for the desired texture-source-rectangle + // We calculate the normalized texture coordinates for the desired texture-source-rayRectangle // It means converting from (tex.width, tex.height) coordinates to [0.0f, 1.0f] equivalent rlBegin(RL_QUADS); rlColor4ub(color.r, color.g, color.b, color.a); diff --git a/examples/models/models_first_person_maze.c b/examples/models/models_first_person_maze.c index 6a4345a8b..d96dfa1b1 100644 --- a/examples/models/models_first_person_maze.c +++ b/examples/models/models_first_person_maze.c @@ -87,7 +87,7 @@ int main(void) { if ((mapPixels[y*cubicmap.width + x].r == 255) && // Collision: white pixel, only check R channel (CheckCollisionCircleRec(playerPos, playerRadius, - (Rectangle){ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f }))) + (rayRectangle){ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f }))) { // Collision detected, reset camera position camera.position = oldCamPos; @@ -107,10 +107,10 @@ int main(void) EndMode3D(); DrawTextureEx(cubicmap, (Vector2){ GetScreenWidth() - cubicmap.width*4.0f - 20, 20.0f }, 0.0f, 4.0f, WHITE); - DrawRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); + DrawrayRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN); // Draw player position radar - DrawRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED); + DrawrayRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED); DrawFPS(10, 10); @@ -126,7 +126,7 @@ int main(void) UnloadTexture(texture); // Unload map texture UnloadModel(model); // Unload map model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_geometric_shapes.c b/examples/models/models_geometric_shapes.c index 33c406347..8383cdd43 100644 --- a/examples/models/models_geometric_shapes.c +++ b/examples/models/models_geometric_shapes.c @@ -81,7 +81,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_heightmap.c b/examples/models/models_heightmap.c index e1c3e4fb6..001e5cf78 100644 --- a/examples/models/models_heightmap.c +++ b/examples/models/models_heightmap.c @@ -70,7 +70,7 @@ int main(void) EndMode3D(); DrawTexture(texture, screenWidth - texture.width - 20, 20, WHITE); - DrawRectangleLines(screenWidth - texture.width - 20, 20, texture.width, texture.height, GREEN); + DrawrayRectangleLines(screenWidth - texture.width - 20, 20, texture.width, texture.height, GREEN); DrawFPS(10, 10); @@ -83,7 +83,7 @@ int main(void) UnloadTexture(texture); // Unload texture UnloadModel(model); // Unload model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_loading.c b/examples/models/models_loading.c index 4bce2a79e..8229a1e5f 100644 --- a/examples/models/models_loading.c +++ b/examples/models/models_loading.c @@ -146,7 +146,7 @@ int main(void) UnloadTexture(texture); // Unload texture UnloadModel(model); // Unload model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_loading_gltf.c b/examples/models/models_loading_gltf.c index 1d5d516fa..2141d87b6 100644 --- a/examples/models/models_loading_gltf.c +++ b/examples/models/models_loading_gltf.c @@ -96,7 +96,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadModel(model); // Unload model and meshes/material - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_loading_m3d.c b/examples/models/models_loading_m3d.c index 71dbc8d75..edbed8829 100644 --- a/examples/models/models_loading_m3d.c +++ b/examples/models/models_loading_m3d.c @@ -167,7 +167,7 @@ int main(void) UnloadModel(model); // Unload model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_loading_vox.c b/examples/models/models_loading_vox.c index e148fd91a..8a4d93424 100644 --- a/examples/models/models_loading_vox.c +++ b/examples/models/models_loading_vox.c @@ -110,8 +110,8 @@ int main(void) EndMode3D(); // Display info - DrawRectangle(10, 400, 310, 30, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(10, 400, 310, 30, Fade(DARKBLUE, 0.5f)); + DrawrayRectangle(10, 400, 310, 30, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(10, 400, 310, 30, Fade(DARKBLUE, 0.5f)); DrawText("MOUSE LEFT BUTTON to CYCLE VOX MODELS", 40, 410, 10, BLUE); DrawText(TextFormat("File: %s", GetFileName(voxFileNames[currentModel])), 10, 10, 20, GRAY); @@ -124,7 +124,7 @@ int main(void) // Unload models data (GPU VRAM) for (int i = 0; i < MAX_VOX_FILES; i++) UnloadModel(models[i]); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_mesh_generation.c b/examples/models/models_mesh_generation.c index 94e0a4c48..1ed4e1d84 100644 --- a/examples/models/models_mesh_generation.c +++ b/examples/models/models_mesh_generation.c @@ -108,8 +108,8 @@ int main(void) EndMode3D(); - DrawRectangle(30, 400, 310, 30, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(30, 400, 310, 30, Fade(DARKBLUE, 0.5f)); + DrawrayRectangle(30, 400, 310, 30, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(30, 400, 310, 30, Fade(DARKBLUE, 0.5f)); DrawText("MOUSE LEFT BUTTON to CYCLE PROCEDURAL MODELS", 40, 410, 10, BLUE); switch(currentModel) @@ -137,7 +137,7 @@ int main(void) // Unload models data (GPU VRAM) for (int i = 0; i < NUM_MODELS; i++) UnloadModel(models[i]); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c index 69d98aa18..add828be4 100644 --- a/examples/models/models_mesh_picking.c +++ b/examples/models/models_mesh_picking.c @@ -239,7 +239,7 @@ int main(void) UnloadModel(tower); // Unload model UnloadTexture(texture); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_orthographic_projection.c b/examples/models/models_orthographic_projection.c index 098e4b20a..9243776a2 100644 --- a/examples/models/models_orthographic_projection.c +++ b/examples/models/models_orthographic_projection.c @@ -95,7 +95,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_rlgl_solar_system.c b/examples/models/models_rlgl_solar_system.c index e458036fe..c03ae9c9e 100644 --- a/examples/models/models_rlgl_solar_system.c +++ b/examples/models/models_rlgl_solar_system.c @@ -119,7 +119,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c index c583128b6..a79f63fd1 100644 --- a/examples/models/models_skybox.c +++ b/examples/models/models_skybox.c @@ -176,7 +176,7 @@ int main(void) UnloadModel(skybox); // Unload skybox model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_waving_cubes.c b/examples/models/models_waving_cubes.c index d382c998d..2234eede2 100644 --- a/examples/models/models_waving_cubes.c +++ b/examples/models/models_waving_cubes.c @@ -110,7 +110,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/models/models_yaw_pitch_roll.c b/examples/models/models_yaw_pitch_roll.c index 611ee3146..899f978a9 100644 --- a/examples/models/models_yaw_pitch_roll.c +++ b/examples/models/models_yaw_pitch_roll.c @@ -99,8 +99,8 @@ int main(void) EndMode3D(); // Draw controls info - DrawRectangle(30, 370, 260, 70, Fade(GREEN, 0.5f)); - DrawRectangleLines(30, 370, 260, 70, Fade(DARKGREEN, 0.5f)); + DrawrayRectangle(30, 370, 260, 70, Fade(GREEN, 0.5f)); + DrawrayRectangleLines(30, 370, 260, 70, Fade(DARKGREEN, 0.5f)); DrawText("Pitch controlled with: KEY_UP / KEY_DOWN", 40, 380, 10, DARKGRAY); DrawText("Roll controlled with: KEY_LEFT / KEY_RIGHT", 40, 400, 10, DARKGRAY); DrawText("Yaw controlled with: KEY_A / KEY_S", 40, 420, 10, DARKGRAY); @@ -115,7 +115,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadModel(model); // Unload model data - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/easings_testbed.c b/examples/others/easings_testbed.c index 45f0efd0b..4ea417f5a 100644 --- a/examples/others/easings_testbed.c +++ b/examples/others/easings_testbed.c @@ -212,7 +212,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); + rayCloseWindow(); //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/embedded_files_loading.c b/examples/others/embedded_files_loading.c index 64023539c..527b548f5 100644 --- a/examples/others/embedded_files_loading.c +++ b/examples/others/embedded_files_loading.c @@ -101,7 +101,7 @@ int main(void) CloseAudioDevice(); // Close audio device - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/external/include/GLFW/glfw3.h b/examples/others/external/include/GLFW/glfw3.h index 31b201ae5..3eafc2985 100644 --- a/examples/others/external/include/GLFW/glfw3.h +++ b/examples/others/external/include/GLFW/glfw3.h @@ -2713,7 +2713,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, G * @sa @ref window_creation * @sa @ref glfwCreateWindow * - * @since Added in version 3.0. Replaces `glfwCloseWindow`. + * @since Added in version 3.0. Replaces `glfwrayCloseWindow`. * * @ingroup window */ diff --git a/examples/others/external/include/glad.h b/examples/others/external/include/glad.h index 70dbc7394..7477e1027 100644 --- a/examples/others/external/include/glad.h +++ b/examples/others/external/include/glad.h @@ -850,10 +850,10 @@ typedef GLintptr GLvdpauSurfaceNV; #define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B #define GL_TEXTURE_BINDING_BUFFER 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_TEXTURE_rayRectangle 0x84F5 +#define GL_TEXTURE_BINDING_rayRectangle 0x84F6 +#define GL_PROXY_TEXTURE_rayRectangle 0x84F7 +#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8 #define GL_R8_SNORM 0x8F94 #define GL_RG8_SNORM 0x8F95 #define GL_RGB8_SNORM 0x8F96 diff --git a/examples/others/external/include/glad_gles2.h b/examples/others/external/include/glad_gles2.h index 6c753d0a4..dfc6151ab 100644 --- a/examples/others/external/include/glad_gles2.h +++ b/examples/others/external/include/glad_gles2.h @@ -19,7 +19,7 @@ * - ON_DEMAND = False * * Commandline: - * --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only + * --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rayRectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only * * Online: * http://glad.sh/#api=gles2%3D2.0&generator=c&options=HEADER_ONLY @@ -766,7 +766,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VIEWPORTS_OES 0x825B #define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_MAX_WINDOW_rayRectangleS_EXT 0x8F14 #define GL_MEDIUM_FLOAT 0x8DF1 #define GL_MEDIUM_INT 0x8DF4 #define GL_MIN 0x8007 @@ -801,7 +801,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_NUM_SURFACE_COMPRESSION_FIXED_RATES_EXT 0x8F6E #define GL_NUM_TILING_TYPES_EXT 0x9582 #define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 -#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +#define GL_NUM_WINDOW_rayRectangleS_EXT 0x8F15 #define GL_ONE 1 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 @@ -1233,8 +1233,8 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 #define GL_WEIGHTED_AVERAGE_ARB 0x9367 #define GL_WEIGHTED_AVERAGE_EXT 0x9367 -#define GL_WINDOW_RECTANGLE_EXT 0x8F12 -#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_WINDOW_rayRectangle_EXT 0x8F12 +#define GL_WINDOW_rayRectangle_MODE_EXT 0x8F13 #define GL_WRITE_ONLY_OES 0x88B9 #define GL_ZERO 0 #define GL_ZERO_TO_ONE 0x935F @@ -1828,8 +1828,8 @@ GLAD_API_CALL int GLAD_GL_EXT_texture_view; GLAD_API_CALL int GLAD_GL_EXT_unpack_subimage; #define GL_EXT_win32_keyed_mutex 1 GLAD_API_CALL int GLAD_GL_EXT_win32_keyed_mutex; -#define GL_EXT_window_rectangles 1 -GLAD_API_CALL int GLAD_GL_EXT_window_rectangles; +#define GL_EXT_window_rayRectangles 1 +GLAD_API_CALL int GLAD_GL_EXT_window_rayRectangles; #define GL_KHR_blend_equation_advanced 1 GLAD_API_CALL int GLAD_GL_KHR_blend_equation_advanced; #define GL_KHR_blend_equation_advanced_coherent 1 @@ -2350,7 +2350,7 @@ typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVOESPROC)(GLuint first, GLsizei co typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFOESPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVOESPROC)(GLuint index, const GLfloat * v); typedef void (GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, const GLuint * buffers, GLuint numTextureBarriers, const GLuint * textures, const GLenum * srcLayouts); -typedef void (GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, const GLint * box); +typedef void (GLAD_API_PTR *PFNGLWINDOWrayRectangleSEXTPROC)(GLenum mode, GLsizei count, const GLint * box); GLAD_API_CALL PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC glad_glAcquireKeyedMutexWin32EXT; #define glAcquireKeyedMutexWin32EXT glad_glAcquireKeyedMutexWin32EXT @@ -3132,8 +3132,8 @@ GLAD_API_CALL PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES; #define glViewportIndexedfvOES glad_glViewportIndexedfvOES GLAD_API_CALL PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT; #define glWaitSemaphoreEXT glad_glWaitSemaphoreEXT -GLAD_API_CALL PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT; -#define glWindowRectanglesEXT glad_glWindowRectanglesEXT +GLAD_API_CALL PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT; +#define glWindowrayRectanglesEXT glad_glWindowrayRectanglesEXT @@ -3281,7 +3281,7 @@ int GLAD_GL_EXT_texture_type_2_10_10_10_REV = 0; int GLAD_GL_EXT_texture_view = 0; int GLAD_GL_EXT_unpack_subimage = 0; int GLAD_GL_EXT_win32_keyed_mutex = 0; -int GLAD_GL_EXT_window_rectangles = 0; +int GLAD_GL_EXT_window_rayRectangles = 0; int GLAD_GL_KHR_blend_equation_advanced = 0; int GLAD_GL_KHR_blend_equation_advanced_coherent = 0; int GLAD_GL_KHR_context_flush_control = 0; @@ -3739,7 +3739,7 @@ PFNGLVIEWPORTARRAYVOESPROC glad_glViewportArrayvOES = NULL; PFNGLVIEWPORTINDEXEDFOESPROC glad_glViewportIndexedfOES = NULL; PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES = NULL; PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT = NULL; -PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT = NULL; +PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT = NULL; static void glad_gl_load_GL_ES_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) { @@ -4215,9 +4215,9 @@ static void glad_gl_load_GL_EXT_win32_keyed_mutex( GLADuserptrloadfunc load, voi glad_glAcquireKeyedMutexWin32EXT = (PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) load(userptr, "glAcquireKeyedMutexWin32EXT"); glad_glReleaseKeyedMutexWin32EXT = (PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) load(userptr, "glReleaseKeyedMutexWin32EXT"); } -static void glad_gl_load_GL_EXT_window_rectangles( GLADuserptrloadfunc load, void* userptr) { - if(!GLAD_GL_EXT_window_rectangles) return; - glad_glWindowRectanglesEXT = (PFNGLWINDOWRECTANGLESEXTPROC) load(userptr, "glWindowRectanglesEXT"); +static void glad_gl_load_GL_EXT_window_rayRectangles( GLADuserptrloadfunc load, void* userptr) { + if(!GLAD_GL_EXT_window_rayRectangles) return; + glad_glWindowrayRectanglesEXT = (PFNGLWINDOWrayRectangleSEXTPROC) load(userptr, "glWindowrayRectanglesEXT"); } static void glad_gl_load_GL_KHR_blend_equation_advanced( GLADuserptrloadfunc load, void* userptr) { if(!GLAD_GL_KHR_blend_equation_advanced) return; @@ -4570,7 +4570,7 @@ static int glad_gl_find_extensions_gles2( int version) { GLAD_GL_EXT_texture_view = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_texture_view"); GLAD_GL_EXT_unpack_subimage = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_unpack_subimage"); GLAD_GL_EXT_win32_keyed_mutex = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_win32_keyed_mutex"); - GLAD_GL_EXT_window_rectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rectangles"); + GLAD_GL_EXT_window_rayRectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rayRectangles"); GLAD_GL_KHR_blend_equation_advanced = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced"); GLAD_GL_KHR_blend_equation_advanced_coherent = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced_coherent"); GLAD_GL_KHR_context_flush_control = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_context_flush_control"); @@ -4728,7 +4728,7 @@ int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr) { glad_gl_load_GL_EXT_texture_storage_compression(load, userptr); glad_gl_load_GL_EXT_texture_view(load, userptr); glad_gl_load_GL_EXT_win32_keyed_mutex(load, userptr); - glad_gl_load_GL_EXT_window_rectangles(load, userptr); + glad_gl_load_GL_EXT_window_rayRectangles(load, userptr); glad_gl_load_GL_KHR_blend_equation_advanced(load, userptr); glad_gl_load_GL_KHR_debug(load, userptr); glad_gl_load_GL_KHR_parallel_shader_compile(load, userptr); diff --git a/examples/others/raylib_opengl_interop.c b/examples/others/raylib_opengl_interop.c index 09b548c60..f7048fefe 100644 --- a/examples/others/raylib_opengl_interop.c +++ b/examples/others/raylib_opengl_interop.c @@ -120,7 +120,7 @@ int main(void) BeginDrawing(); ClearBackground(WHITE); - DrawRectangle(10, 10, 210, 30, MAROON); + DrawrayRectangle(10, 10, 210, 30, MAROON); DrawText(TextFormat("%zu particles in one vertex buffer", MAX_PARTICLES), 20, 20, 10, RAYWHITE); rlDrawRenderBatchActive(); // Draw iternal buffers data (previous draw calls) @@ -159,7 +159,7 @@ int main(void) UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/raymath_vector_angle.c b/examples/others/raymath_vector_angle.c index d0f81548c..62f6c0b8a 100644 --- a/examples/others/raymath_vector_angle.c +++ b/examples/others/raymath_vector_angle.c @@ -115,7 +115,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/rlgl_compute_shader.c b/examples/others/rlgl_compute_shader.c index 544e0a534..42eccdd94 100644 --- a/examples/others/rlgl_compute_shader.c +++ b/examples/others/rlgl_compute_shader.c @@ -144,7 +144,7 @@ int main(void) DrawTexture(whiteTex, 0, 0, WHITE); EndShaderMode(); - DrawRectangleLines(GetMouseX() - brushSize/2, GetMouseY() - brushSize/2, brushSize, brushSize, RED); + DrawrayRectangleLines(GetMouseX() - brushSize/2, GetMouseY() - brushSize/2, brushSize, brushSize, RED); DrawText("Use Mouse wheel to increase/decrease brush size", 10, 10, 20, WHITE); DrawFPS(GetScreenWidth() - 100, 10); @@ -167,7 +167,7 @@ int main(void) UnloadTexture(whiteTex); // Unload white texture UnloadShader(golRenderShader); // Unload rendering fragment shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/others/rlgl_standalone.c b/examples/others/rlgl_standalone.c index ad5e5e94c..4bed45f80 100644 --- a/examples/others/rlgl_standalone.c +++ b/examples/others/rlgl_standalone.c @@ -102,7 +102,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i static void DrawGrid(int slices, float spacing); static void DrawCube(Vector3 position, float width, float height, float length, Color color); static void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); -static void DrawRectangleV(Vector2 position, Vector2 size, Color color); +static void DrawrayRectangleV(Vector2 position, Vector2 size, Color color); // NOTE: We use raymath to get this functionality but it could be implemented in this module //static Matrix MatrixIdentity(void); @@ -233,7 +233,7 @@ int main(void) rlMatrixMode(RL_MODELVIEW); // Enable internal modelview matrix rlLoadIdentity(); // Reset internal modelview matrix #endif - DrawRectangleV((Vector2){ 10.0f, 10.0f }, (Vector2){ 780.0f, 20.0f }, DARKGRAY); + DrawrayRectangleV((Vector2){ 10.0f, 10.0f }, (Vector2){ 780.0f, 20.0f }, DARKGRAY); // Draw internal render batch buffers (2D data) rlDrawRenderBatchActive(); @@ -274,8 +274,8 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i } } -// Draw rectangle using rlgl OpenGL 1.1 style coding (translated to OpenGL 3.3 internally) -static void DrawRectangleV(Vector2 position, Vector2 size, Color color) +// Draw rayRectangle using rlgl OpenGL 1.1 style coding (translated to OpenGL 3.3 internally) +static void DrawrayRectangleV(Vector2 position, Vector2 size, Color color) { rlBegin(RL_TRIANGLES); rlColor4ub(color.r, color.g, color.b, color.a); diff --git a/examples/shaders/resources/shaders/glsl100/cubes_panning.fs b/examples/shaders/resources/shaders/glsl100/cubes_panning.fs index 9e5eab0fe..8a1e2b88a 100644 --- a/examples/shaders/resources/shaders/glsl100/cubes_panning.fs +++ b/examples/shaders/resources/shaders/glsl100/cubes_panning.fs @@ -31,7 +31,7 @@ vec2 VectorRotateTime(vec2 v, float speed) return v; } -float Rectangle(in vec2 st, in float size, in float fill) +float rayRectangle(in vec2 st, in float size, in float fill) { float roundSize = 0.5 - size/2.0; float left = step(roundSize, st.x); @@ -53,7 +53,7 @@ void main() fpos = VectorRotateTime(fpos, 0.2); - float alpha = Rectangle(fpos, 0.216, 1.0); + float alpha = rayRectangle(fpos, 0.216, 1.0); vec3 color = vec3(0.3, 0.3, 0.3); gl_FragColor = vec4(color, alpha); diff --git a/examples/shaders/resources/shaders/glsl330/cubes_panning.fs b/examples/shaders/resources/shaders/glsl330/cubes_panning.fs index 1d75e4e8c..b9a32a8b5 100644 --- a/examples/shaders/resources/shaders/glsl330/cubes_panning.fs +++ b/examples/shaders/resources/shaders/glsl330/cubes_panning.fs @@ -32,7 +32,7 @@ vec2 VectorRotateTime(vec2 v, float speed) return v; } -float Rectangle(in vec2 st, in float size, in float fill) +float rayRectangle(in vec2 st, in float size, in float fill) { float roundSize = 0.5 - size/2.0; float left = step(roundSize, st.x); @@ -54,7 +54,7 @@ void main() fpos = VectorRotateTime(fpos, 0.2); - float alpha = Rectangle(fpos, 0.216, 1.0); + float alpha = rayRectangle(fpos, 0.216, 1.0); vec3 color = vec3(0.3, 0.3, 0.3); finalColor = vec4(color, alpha); diff --git a/examples/shaders/shaders_basic_lighting.c b/examples/shaders/shaders_basic_lighting.c index 3fbe60b83..efb588772 100644 --- a/examples/shaders/shaders_basic_lighting.c +++ b/examples/shaders/shaders_basic_lighting.c @@ -140,7 +140,7 @@ int main(void) UnloadModel(cube); // Unload the model UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c index b3b804006..2fdb99040 100644 --- a/examples/shaders/shaders_custom_uniform.c +++ b/examples/shaders/shaders_custom_uniform.c @@ -105,7 +105,7 @@ int main(void) // Enable shader using the custom uniform BeginShaderMode(shader); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) - DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE); + DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE); EndShaderMode(); // Draw some 2d text over drawn texture @@ -122,7 +122,7 @@ int main(void) UnloadModel(model); // Unload model UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_deferred_render.c b/examples/shaders/shaders_deferred_render.c index 21d2af346..c9c21acc5 100644 --- a/examples/shaders/shaders_deferred_render.c +++ b/examples/shaders/shaders_deferred_render.c @@ -279,7 +279,7 @@ int main(void) .id = gBuffer.positionTexture, .width = screenWidth, .height = screenHeight, - }, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); + }, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); DrawText("POSITION TEXTURE", 10, screenHeight - 30, 20, DARKGREEN); } break; @@ -289,7 +289,7 @@ int main(void) .id = gBuffer.normalTexture, .width = screenWidth, .height = screenHeight, - }, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); + }, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); DrawText("NORMAL TEXTURE", 10, screenHeight - 30, 20, DARKGREEN); } break; @@ -299,7 +299,7 @@ int main(void) .id = gBuffer.albedoSpecTexture, .width = screenWidth, .height = screenHeight, - }, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); + }, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE); DrawText("ALBEDO TEXTURE", 10, screenHeight - 30, 20, DARKGREEN); } break; } @@ -328,7 +328,7 @@ int main(void) rlUnloadTexture(gBuffer.albedoSpecTexture); rlUnloadTexture(gBuffer.depthRenderbuffer); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_eratosthenes.c b/examples/shaders/shaders_eratosthenes.c index 005a97aea..3a20e841b 100644 --- a/examples/shaders/shaders_eratosthenes.c +++ b/examples/shaders/shaders_eratosthenes.c @@ -67,11 +67,11 @@ int main(void) BeginTextureMode(target); // Enable drawing to texture ClearBackground(BLACK); // Clear the render texture - // Draw a rectangle in shader mode to be used as shader canvas - // NOTE: Rectangle uses font white character texture coordinates, + // Draw a rayRectangle in shader mode to be used as shader canvas + // NOTE: rayRectangle uses font white character texture coordinates, // so shader can not be applied here directly because input vertexTexCoord // do not represent full screen coordinates (space where want to apply shader) - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK); + DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK); EndTextureMode(); // End drawing to texture (now we have a blank texture available for the shader) BeginDrawing(); @@ -79,7 +79,7 @@ int main(void) BeginShaderMode(shader); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) - DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE); + DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE); EndShaderMode(); EndDrawing(); //---------------------------------------------------------------------------------- @@ -90,7 +90,7 @@ int main(void) UnloadShader(shader); // Unload shader UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_fog.c b/examples/shaders/shaders_fog.c index cd36936d6..c94fc8b0d 100644 --- a/examples/shaders/shaders_fog.c +++ b/examples/shaders/shaders_fog.c @@ -148,7 +148,7 @@ int main(void) UnloadTexture(texture); // Unload the texture UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_hot_reloading.c b/examples/shaders/shaders_hot_reloading.c index 2b1175e4b..c282f51eb 100644 --- a/examples/shaders/shaders_hot_reloading.c +++ b/examples/shaders/shaders_hot_reloading.c @@ -109,9 +109,9 @@ int main(void) ClearBackground(RAYWHITE); - // We only draw a white full-screen rectangle, frame is generated in shader + // We only draw a white full-screen rayRectangle, frame is generated in shader BeginShaderMode(shader); - DrawRectangle(0, 0, screenWidth, screenHeight, WHITE); + DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE); EndShaderMode(); DrawText(TextFormat("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s", @@ -128,7 +128,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_hybrid_render.c b/examples/shaders/shaders_hybrid_render.c index 6242b308d..c3382057e 100644 --- a/examples/shaders/shaders_hybrid_render.c +++ b/examples/shaders/shaders_hybrid_render.c @@ -113,7 +113,7 @@ int main(void) // Raymarch Scene rlEnableDepthTest(); //Manually enable Depth Test to handle multiple rendering methods. BeginShaderMode(shdrRaymarch); - DrawRectangleRec((Rectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE); + DrawrayRectangleRec((rayRectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE); EndShaderMode(); // Raserize Scene @@ -132,7 +132,7 @@ int main(void) BeginDrawing(); ClearBackground(RAYWHITE); - DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE); + DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE); DrawFPS(10, 10); EndDrawing(); //---------------------------------------------------------------------------------- @@ -144,7 +144,7 @@ int main(void) UnloadShader(shdrRaymarch); UnloadShader(shdrRaster); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_julia_set.c b/examples/shaders/shaders_julia_set.c index 608d3b52b..49a3cff2c 100644 --- a/examples/shaders/shaders_julia_set.c +++ b/examples/shaders/shaders_julia_set.c @@ -159,11 +159,11 @@ int main(void) BeginTextureMode(target); // Enable drawing to texture ClearBackground(BLACK); // Clear the render texture - // Draw a rectangle in shader mode to be used as shader canvas - // NOTE: Rectangle uses font white character texture coordinates, + // Draw a rayRectangle in shader mode to be used as shader canvas + // NOTE: rayRectangle uses font white character texture coordinates, // so shader can not be applied here directly because input vertexTexCoord // do not represent full screen coordinates (space where want to apply shader) - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK); + DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK); EndTextureMode(); BeginDrawing(); @@ -195,7 +195,7 @@ int main(void) UnloadShader(shader); // Unload shader UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_lightmap.c b/examples/shaders/shaders_lightmap.c index c5ed6094c..3041ad75d 100644 --- a/examples/shaders/shaders_lightmap.c +++ b/examples/shaders/shaders_lightmap.c @@ -98,24 +98,24 @@ int main(void) BeginBlendMode(BLEND_ADDITIVE); DrawTexturePro( light, - (Rectangle){ 0, 0, light.width, light.height }, - (Rectangle){ 0, 0, 20, 20 }, + (rayRectangle){ 0, 0, light.width, light.height }, + (rayRectangle){ 0, 0, 20, 20 }, (Vector2){ 10.0, 10.0 }, 0.0, RED ); DrawTexturePro( light, - (Rectangle){ 0, 0, light.width, light.height }, - (Rectangle){ 8, 4, 20, 20 }, + (rayRectangle){ 0, 0, light.width, light.height }, + (rayRectangle){ 8, 4, 20, 20 }, (Vector2){ 10.0, 10.0 }, 0.0, BLUE ); DrawTexturePro( light, - (Rectangle){ 0, 0, light.width, light.height }, - (Rectangle){ 8, 8, 10, 10 }, + (rayRectangle){ 0, 0, light.width, light.height }, + (rayRectangle){ 8, 8, 10, 10 }, (Vector2){ 5.0, 5.0 }, 0.0, GREEN @@ -147,8 +147,8 @@ int main(void) DrawTexturePro( lightmap.texture, - (Rectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE }, - (Rectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 }, + (rayRectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE }, + (rayRectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 }, (Vector2){ 0.0, 0.0 }, 0.0, WHITE); @@ -165,7 +165,7 @@ int main(void) UnloadMesh(mesh); // Unload the mesh UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_mesh_instancing.c b/examples/shaders/shaders_mesh_instancing.c index 7d603a6bf..904d1b52c 100644 --- a/examples/shaders/shaders_mesh_instancing.c +++ b/examples/shaders/shaders_mesh_instancing.c @@ -140,7 +140,7 @@ int main(void) //-------------------------------------------------------------------------------------- RL_FREE(transforms); // Free transforms - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_model_shader.c b/examples/shaders/shaders_model_shader.c index 739a33b7e..4ec95ec05 100644 --- a/examples/shaders/shaders_model_shader.c +++ b/examples/shaders/shaders_model_shader.c @@ -100,7 +100,7 @@ int main(void) UnloadTexture(texture); // Unload texture UnloadModel(model); // Unload model - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_multi_sample2d.c b/examples/shaders/shaders_multi_sample2d.c index f7c369bc4..76dd57a46 100644 --- a/examples/shaders/shaders_multi_sample2d.c +++ b/examples/shaders/shaders_multi_sample2d.c @@ -103,7 +103,7 @@ int main(void) UnloadTexture(texRed); // Unload texture UnloadTexture(texBlue); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_palette_switch.c b/examples/shaders/shaders_palette_switch.c index 6b108b092..aa47ab810 100644 --- a/examples/shaders/shaders_palette_switch.c +++ b/examples/shaders/shaders_palette_switch.c @@ -124,9 +124,9 @@ int main(void) for (int i = 0; i < COLORS_PER_PALETTE; i++) { - // Draw horizontal screen-wide rectangles with increasing "palette index" + // Draw horizontal screen-wide rayRectangles with increasing "palette index" // The used palette index is encoded in the RGB components of the pixel - DrawRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 }); + DrawrayRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 }); } EndShaderMode(); @@ -145,7 +145,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_postprocessing.c b/examples/shaders/shaders_postprocessing.c index 1a7c621e5..f6d8fd696 100644 --- a/examples/shaders/shaders_postprocessing.c +++ b/examples/shaders/shaders_postprocessing.c @@ -146,11 +146,11 @@ int main(void) // Render generated texture using selected postprocessing shader BeginShaderMode(shaders[currentShader]); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) - DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE); + DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE); EndShaderMode(); // Draw 2d shapes and text over drawn texture - DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f)); + DrawrayRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f)); DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY); DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK); @@ -170,7 +170,7 @@ int main(void) UnloadModel(model); // Unload model UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_raymarching.c b/examples/shaders/shaders_raymarching.c index ff403e619..2b18f63b0 100644 --- a/examples/shaders/shaders_raymarching.c +++ b/examples/shaders/shaders_raymarching.c @@ -94,10 +94,10 @@ int main(void) ClearBackground(RAYWHITE); - // We only draw a white full-screen rectangle, + // We only draw a white full-screen rayRectangle, // frame is generated in shader using raymarching BeginShaderMode(shader); - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE); + DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE); EndShaderMode(); DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", GetScreenWidth() - 280, GetScreenHeight() - 20, 10, BLACK); @@ -110,7 +110,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_shapes_textures.c b/examples/shaders/shaders_shapes_textures.c index cca4959ed..dc3f80b86 100644 --- a/examples/shaders/shaders_shapes_textures.c +++ b/examples/shaders/shaders_shapes_textures.c @@ -76,9 +76,9 @@ int main(void) DrawText("USING CUSTOM SHADER", 190, 40, 10, RED); - DrawRectangle(250 - 60, 90, 120, 60, RED); - DrawRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD); - DrawRectangleLines(250 - 40, 320, 80, 60, ORANGE); + DrawrayRectangle(250 - 60, 90, 120, 60, RED); + DrawrayRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD); + DrawrayRectangleLines(250 - 40, 320, 80, 60, ORANGE); // Activate our default shader for next drawings EndShaderMode(); @@ -114,7 +114,7 @@ int main(void) UnloadShader(shader); // Unload shader UnloadTexture(fudesumi); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_simple_mask.c b/examples/shaders/shaders_simple_mask.c index 7ed315b0a..83b68f160 100644 --- a/examples/shaders/shaders_simple_mask.c +++ b/examples/shaders/shaders_simple_mask.c @@ -123,7 +123,7 @@ int main(void) EndMode3D(); - DrawRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE); + DrawrayRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE); DrawText(TextFormat("Frame: %i", framesCounter), 20, 700, 20, WHITE); DrawFPS(10, 10); @@ -143,7 +143,7 @@ int main(void) UnloadShader(shader); // Unload shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_spotlight.c b/examples/shaders/shaders_spotlight.c index 067f9622d..c70c08e86 100644 --- a/examples/shaders/shaders_spotlight.c +++ b/examples/shaders/shaders_spotlight.c @@ -186,7 +186,7 @@ int main(void) for (int n = 0; n < MAX_STARS; n++) { // Single pixel is just too small these days! - DrawRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE); + DrawrayRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE); } for (int i = 0; i < 16; i++) @@ -198,11 +198,11 @@ int main(void) // Draw spot lights BeginShaderMode(shdrSpot); - // Instead of a blank rectangle you could render here + // Instead of a blank rayRectangle you could render here // a render texture of the full screen used to do screen // scaling (slight adjustment to shader would be required // to actually pay attention to the colour!) - DrawRectangle(0, 0, screenWidth, screenHeight, WHITE); + DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE); EndShaderMode(); DrawFPS(10, 10); @@ -220,7 +220,7 @@ int main(void) UnloadTexture(texRay); UnloadShader(shdrSpot); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_texture_drawing.c b/examples/shaders/shaders_texture_drawing.c index 43ffa21ef..9f92e8135 100644 --- a/examples/shaders/shaders_texture_drawing.c +++ b/examples/shaders/shaders_texture_drawing.c @@ -78,7 +78,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadShader(shader); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_texture_outline.c b/examples/shaders/shaders_texture_outline.c index 83f2820e7..01574fe3a 100644 --- a/examples/shaders/shaders_texture_outline.c +++ b/examples/shaders/shaders_texture_outline.c @@ -95,7 +95,7 @@ int main(void) UnloadTexture(texture); UnloadShader(shdrOutline); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_texture_tiling.c b/examples/shaders/shaders_texture_tiling.c index 0d07bdff9..714d8cee5 100644 --- a/examples/shaders/shaders_texture_tiling.c +++ b/examples/shaders/shaders_texture_tiling.c @@ -98,7 +98,7 @@ int main(void) UnloadShader(shader); // Unload shader UnloadTexture(texture); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_texture_waves.c b/examples/shaders/shaders_texture_waves.c index 5bdaada44..9542943a5 100644 --- a/examples/shaders/shaders_texture_waves.c +++ b/examples/shaders/shaders_texture_waves.c @@ -108,7 +108,7 @@ int main(void) UnloadShader(shader); // Unload shader UnloadTexture(texture); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shaders/shaders_write_depth.c b/examples/shaders/shaders_write_depth.c index 31697243a..9a2aff58a 100644 --- a/examples/shaders/shaders_write_depth.c +++ b/examples/shaders/shaders_write_depth.c @@ -92,7 +92,7 @@ int main(void) BeginDrawing(); ClearBackground(RAYWHITE); - DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE); + DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE); DrawFPS(10, 10); EndDrawing(); //---------------------------------------------------------------------------------- @@ -103,7 +103,7 @@ int main(void) UnloadRenderTextureDepthTex(target); UnloadShader(shader); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/raygui.h b/examples/shapes/raygui.h index 91277102f..cff9f147a 100644 --- a/examples/shapes/raygui.h +++ b/examples/shapes/raygui.h @@ -28,7 +28,7 @@ * font atlas recs and glyphs, freeing that memory is (usually) up to the user, * no unload function is explicitly provided... but note that GuiLoadStyleDefaulf() unloads * by default any previously loaded font (texture, recs, glyphs). -* - Global UI alpha (guiAlpha) is applied inside GuiDrawRectangle() and GuiDrawText() functions +* - Global UI alpha (guiAlpha) is applied inside GuiDrawrayRectangle() and GuiDrawText() functions * * CONTROLS PROVIDED: * # Container/separators Controls @@ -112,7 +112,7 @@ * * RAYGUI LAYOUT: * raygui currently does not provide an auto-layout mechanism like other libraries, -* layouts must be defined manually on controls drawing, providing the right bounds Rectangle for it. +* layouts must be defined manually on controls drawing, providing the right bounds rayRectangle for it. * * TOOL: rGuiLayout is a visual tool to create raygui layouts: github.com/raysan5/rguilayout * @@ -135,10 +135,10 @@ * this file can be generated using rGuiIcons tool * * #define RAYGUI_DEBUG_RECS_BOUNDS -* Draw control bounds rectangles for debug +* Draw control bounds rayRectangles for debug * * #define RAYGUI_DEBUG_TEXT_BOUNDS -* Draw text bounds rectangles for debug +* Draw text bounds rayRectangles for debug * * VERSIONS HISTORY: * 4.0 (12-Sep-2023) ADDED: GuiToggleSlider() @@ -150,7 +150,7 @@ * REDESIGNED: GuiTextBox(), support mouse cursor positioning * REDESIGNED: GuiDrawText(), support multiline and word-wrap modes (read only) * REDESIGNED: GuiProgressBar() to be more visual, progress affects border color -* REDESIGNED: Global alpha consideration moved to GuiDrawRectangle() and GuiDrawText() +* REDESIGNED: Global alpha consideration moved to GuiDrawrayRectangle() and GuiDrawText() * REDESIGNED: GuiScrollPanel(), get parameters by reference and return result value * REDESIGNED: GuiToggleGroup(), get parameters by reference and return result value * REDESIGNED: GuiComboBox(), get parameters by reference and return result value @@ -218,7 +218,7 @@ * Multiple minor tweaks and bugs corrected * * 2.9 (17-Mar-2021) REMOVED: Tooltip API -* 2.8 (03-May-2020) Centralized rectangles drawing to GuiDrawRectangle() +* 2.8 (03-May-2020) Centralized rayRectangles drawing to GuiDrawrayRectangle() * 2.7 (20-Feb-2020) ADDED: Possible tooltips API * 2.6 (09-Sep-2019) ADDED: GuiTextInputBox() * REDESIGNED: GuiListView*(), GuiDropdownBox(), GuiSlider*(), GuiProgressBar(), GuiMessageBox() @@ -263,13 +263,13 @@ * - bool IsKeyPressed(int key); * - int GetCharPressed(void); // -- GuiTextBox(), GuiValueBox() * -* - void DrawRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawRectangle() -* - void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker() +* - void DrawrayRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawrayRectangle() +* - void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker() * * - Font GetFontDefault(void); // -- GuiLoadStyleDefault() * - Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // -- GuiLoadStyle() * - Texture2D LoadTextureFromImage(Image image); // -- GuiLoadStyle(), required to load texture from embedded font atlas image -* - void SetShapesTexture(Texture2D tex, Rectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization) +* - void SetShapesTexture(Texture2D tex, rayRectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization) * - char *LoadFileText(const char *fileName); // -- GuiLoadStyle(), required to load charset data * - void UnloadFileText(char *text); // -- GuiLoadStyle(), required to unload charset data * - const char *GetDirectoryPath(const char *filePath); // -- GuiLoadStyle(), required to find charset/font file from text .rgs @@ -393,13 +393,13 @@ unsigned char a; } Color; - // Rectangle type - typedef struct Rectangle { + // rayRectangle type + typedef struct rayRectangle { float x; float y; float width; float height; - } Rectangle; + } rayRectangle; // TODO: Texture2D type is very coupled to raylib, required by Font type // It should be redesigned to be provided by user @@ -436,7 +436,7 @@ int glyphCount; // Number of glyph characters int glyphPadding; // Padding around the glyph characters Texture2D texture; // Texture atlas containing the glyphs - Rectangle *recs; // Rectangles in texture for the glyphs + rayRectangle *recs; // rayRectangles in texture for the glyphs GlyphInfo *glyphs; // Glyphs info data } Font; #endif @@ -702,46 +702,46 @@ RAYGUIAPI void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color // Controls //---------------------------------------------------------------------------------------------------------- // Container/separator controls, useful for controls organization -RAYGUIAPI int GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed -RAYGUIAPI int GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name -RAYGUIAPI int GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text -RAYGUIAPI int GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls -RAYGUIAPI int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1 -RAYGUIAPI int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view); // Scroll Panel control +RAYGUIAPI int GuiWindowBox(rayRectangle bounds, const char *title); // Window Box control, shows a window that can be closed +RAYGUIAPI int GuiGroupBox(rayRectangle bounds, const char *text); // Group Box control with text name +RAYGUIAPI int GuiLine(rayRectangle bounds, const char *text); // Line separator control, could contain text +RAYGUIAPI int GuiPanel(rayRectangle bounds, const char *text); // Panel control, useful to group controls +RAYGUIAPI int GuiTabBar(rayRectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1 +RAYGUIAPI int GuiScrollPanel(rayRectangle bounds, const char *text, rayRectangle content, Vector2 *scroll, rayRectangle *view); // Scroll Panel control // Basic controls set -RAYGUIAPI int GuiLabel(Rectangle bounds, const char *text); // Label control, shows text -RAYGUIAPI int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked -RAYGUIAPI int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked -RAYGUIAPI int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active -RAYGUIAPI int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index -RAYGUIAPI int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked -RAYGUIAPI int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active -RAYGUIAPI int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index +RAYGUIAPI int GuiLabel(rayRectangle bounds, const char *text); // Label control, shows text +RAYGUIAPI int GuiButton(rayRectangle bounds, const char *text); // Button control, returns true when clicked +RAYGUIAPI int GuiLabelButton(rayRectangle bounds, const char *text); // Label button control, show true when clicked +RAYGUIAPI int GuiToggle(rayRectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active +RAYGUIAPI int GuiToggleGroup(rayRectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index +RAYGUIAPI int GuiToggleSlider(rayRectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked +RAYGUIAPI int GuiCheckBox(rayRectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active +RAYGUIAPI int GuiComboBox(rayRectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index -RAYGUIAPI int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item -RAYGUIAPI int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value -RAYGUIAPI int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers -RAYGUIAPI int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text +RAYGUIAPI int GuiDropdownBox(rayRectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item +RAYGUIAPI int GuiSpinner(rayRectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value +RAYGUIAPI int GuiValueBox(rayRectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers +RAYGUIAPI int GuiTextBox(rayRectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text -RAYGUIAPI int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control, returns selected value -RAYGUIAPI int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control, returns selected value -RAYGUIAPI int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value -RAYGUIAPI int GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text -RAYGUIAPI int GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders -RAYGUIAPI int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position +RAYGUIAPI int GuiSlider(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control, returns selected value +RAYGUIAPI int GuiSliderBar(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control, returns selected value +RAYGUIAPI int GuiProgressBar(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value +RAYGUIAPI int GuiStatusBar(rayRectangle bounds, const char *text); // Status Bar control, shows info text +RAYGUIAPI int GuiDummyRec(rayRectangle bounds, const char *text); // Dummy control for placeholders +RAYGUIAPI int GuiGrid(rayRectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position // Advance controls set -RAYGUIAPI int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index -RAYGUIAPI int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters -RAYGUIAPI int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message -RAYGUIAPI int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret -RAYGUIAPI int GuiColorPicker(Rectangle bounds, const char *text, Color *color); // Color Picker control (multiple color controls) -RAYGUIAPI int GuiColorPanel(Rectangle bounds, const char *text, Color *color); // Color Panel control -RAYGUIAPI int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control -RAYGUIAPI int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control -RAYGUIAPI int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls) -RAYGUIAPI int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV() +RAYGUIAPI int GuiListView(rayRectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index +RAYGUIAPI int GuiListViewEx(rayRectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters +RAYGUIAPI int GuiMessageBox(rayRectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message +RAYGUIAPI int GuiTextInputBox(rayRectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret +RAYGUIAPI int GuiColorPicker(rayRectangle bounds, const char *text, Color *color); // Color Picker control (multiple color controls) +RAYGUIAPI int GuiColorPanel(rayRectangle bounds, const char *text, Color *color); // Color Panel control +RAYGUIAPI int GuiColorBarAlpha(rayRectangle bounds, const char *text, float *alpha); // Color Bar Alpha control +RAYGUIAPI int GuiColorBarHue(rayRectangle bounds, const char *text, float *value); // Color Bar Hue control +RAYGUIAPI int GuiColorPickerHSV(rayRectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls) +RAYGUIAPI int GuiColorPanelHSV(rayRectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV() //---------------------------------------------------------------------------------------------------------- @@ -1039,7 +1039,7 @@ typedef enum { #define RAYGUI_CLITERAL(name) (name) #endif -// Check if two rectangles are equal, used to validate a slider bounds as an id +// Check if two rayRectangles are equal, used to validate a slider bounds as an id #ifndef CHECK_BOUNDS_ID #define CHECK_BOUNDS_ID(src, dst) ((src.x == dst.x) && (src.y == dst.y) && (src.width == dst.width) && (src.height == dst.height)) #endif @@ -1364,7 +1364,7 @@ static bool guiTooltip = false; // Tooltip enabled/disabled static const char *guiTooltipPtr = NULL; // Tooltip string pointer (string provided by user) static bool guiSliderDragging = false; // Gui slider drag state (no inputs processed except dragged slider) -static Rectangle guiSliderActive = { 0 }; // Gui slider active bounds rectangle, used as an unique identifier +static rayRectangle guiSliderActive = { 0 }; // Gui slider active bounds rayRectangle, used as an unique identifier static int textBoxCursorIndex = 0; // Cursor index, shared by all GuiTextBox*() //static int blinkCursorFrameCounter = 0; // Frame counter for cursor blinking @@ -1419,8 +1419,8 @@ static int GetCharPressed(void); // -- GuiTextBox(), GuiValueBox() // Drawing required functions //------------------------------------------------------------------------------- -static void DrawRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawRectangle() -static void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker() +static void DrawrayRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawrayRectangle() +static void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker() //------------------------------------------------------------------------------- // Text required functions @@ -1429,7 +1429,7 @@ static Font GetFontDefault(void); // -- GuiLoadStyleD static Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // -- GuiLoadStyle(), load font static Texture2D LoadTextureFromImage(Image image); // -- GuiLoadStyle(), required to load texture from embedded font atlas image -static void SetShapesTexture(Texture2D tex, Rectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization) +static void SetShapesTexture(Texture2D tex, rayRectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization) static char *LoadFileText(const char *fileName); // -- GuiLoadStyle(), required to load charset data static void UnloadFileText(char *text); // -- GuiLoadStyle(), required to unload charset data @@ -1446,7 +1446,7 @@ static unsigned char *DecompressData(const unsigned char *compData, int compData //------------------------------------------------------------------------------- static Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value static int ColorToInt(Color color); // Returns hexadecimal value for a Color -static bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle +static bool CheckCollisionPointRec(Vector2 point, rayRectangle rec); // Check if point is inside rayRectangle static const char *TextFormat(const char *text, ...); // Formatting of text with variables to 'embed' static const char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings static int TextToInteger(const char *text); // Get integer value from text @@ -1454,7 +1454,7 @@ static int TextToInteger(const char *text); // Get integer value from te static int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded text static const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode codepoint into UTF-8 text (char array size returned as parameter) -static void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2); // Draw rectangle vertical gradient +static void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2); // Draw rayRectangle vertical gradient //------------------------------------------------------------------------------- #endif // RAYGUI_STANDALONE @@ -1465,18 +1465,18 @@ static void DrawRectangleGradientV(int posX, int posY, int width, int height, Co static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize); // Load style from memory (binary only) static int GetTextWidth(const char *text); // Gui get text width using gui font and style -static Rectangle GetTextBounds(int control, Rectangle bounds); // Get text bounds considering control bounds +static rayRectangle GetTextBounds(int control, rayRectangle bounds); // Get text bounds considering control bounds static const char *GetTextIcon(const char *text, int *iconId); // Get text icon if provided and move text cursor -static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, Color tint); // Gui draw text using default font -static void GuiDrawRectangle(Rectangle rec, int borderWidth, Color borderColor, Color color); // Gui draw rectangle using default raygui style +static void GuiDrawText(const char *text, rayRectangle textBounds, int alignment, Color tint); // Gui draw text using default font +static void GuiDrawrayRectangle(rayRectangle rec, int borderWidth, Color borderColor, Color color); // Gui draw rayRectangle using default raygui style static const char **GuiTextSplit(const char *text, char delimiter, int *count, int *textRow); // Split controls text into multiple strings static Vector3 ConvertHSVtoRGB(Vector3 hsv); // Convert color data from HSV to RGB static Vector3 ConvertRGBtoHSV(Vector3 rgb); // Convert color data from RGB to HSV -static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue); // Scroll bar control, used by GuiScrollPanel() -static void GuiTooltip(Rectangle controlRec); // Draw tooltip using control rec position +static int GuiScrollBar(rayRectangle bounds, int value, int minValue, int maxValue); // Scroll bar control, used by GuiScrollPanel() +static void GuiTooltip(rayRectangle controlRec); // Draw tooltip using control rec position static Color GuiFade(Color color, float alpha); // Fade color by an alpha factor @@ -1561,7 +1561,7 @@ int GuiGetStyle(int control, int property) //---------------------------------------------------------------------------------- // Window Box control -int GuiWindowBox(Rectangle bounds, const char *title) +int GuiWindowBox(rayRectangle bounds, const char *title) { // Window title bar height (including borders) // NOTE: This define is also used by GuiMessageBox() and GuiTextInputBox() @@ -1574,11 +1574,11 @@ int GuiWindowBox(Rectangle bounds, const char *title) int statusBarHeight = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT; - Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight }; + rayRectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight }; if (bounds.height < statusBarHeight*2.0f) bounds.height = statusBarHeight*2.0f; - Rectangle windowPanel = { bounds.x, bounds.y + (float)statusBarHeight - 1, bounds.width, bounds.height - (float)statusBarHeight + 1 }; - Rectangle closeButtonRec = { statusBar.x + statusBar.width - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - 20, + rayRectangle windowPanel = { bounds.x, bounds.y + (float)statusBarHeight - 1, bounds.width, bounds.height - (float)statusBarHeight + 1 }; + rayRectangle closeButtonRec = { statusBar.x + statusBar.width - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - 20, statusBar.y + statusBarHeight/2.0f - 18.0f/2.0f, 18, 18 }; // Update control @@ -1609,7 +1609,7 @@ int GuiWindowBox(Rectangle bounds, const char *title) } // Group Box control with text name -int GuiGroupBox(Rectangle bounds, const char *text) +int GuiGroupBox(rayRectangle bounds, const char *text) { #if !defined(RAYGUI_GROUPBOX_LINE_THICK) #define RAYGUI_GROUPBOX_LINE_THICK 1 @@ -1620,18 +1620,18 @@ int GuiGroupBox(Rectangle bounds, const char *text) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, RAYGUI_GROUPBOX_LINE_THICK }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, RAYGUI_GROUPBOX_LINE_THICK }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + bounds.width - 1, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR))); - GuiLine(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y - GuiGetStyle(DEFAULT, TEXT_SIZE)/2, bounds.width, (float)GuiGetStyle(DEFAULT, TEXT_SIZE) }, text); + GuiLine(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y - GuiGetStyle(DEFAULT, TEXT_SIZE)/2, bounds.width, (float)GuiGetStyle(DEFAULT, TEXT_SIZE) }, text); //-------------------------------------------------------------------- return result; } // Line control -int GuiLine(Rectangle bounds, const char *text) +int GuiLine(rayRectangle bounds, const char *text) { #if !defined(RAYGUI_LINE_ORIGIN_SIZE) #define RAYGUI_LINE_MARGIN_TEXT 12 @@ -1647,19 +1647,19 @@ int GuiLine(Rectangle bounds, const char *text) // Draw control //-------------------------------------------------------------------- - if (text == NULL) GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height/2, bounds.width, 1 }, 0, BLANK, color); + if (text == NULL) GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + bounds.height/2, bounds.width, 1 }, 0, BLANK, color); else { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(text) + 2; textBounds.height = bounds.height; textBounds.x = bounds.x + RAYGUI_LINE_MARGIN_TEXT; textBounds.y = bounds.y; // Draw line with embedded text label: "--- text --------------" - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height/2, RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + bounds.height/2, RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color); GuiDrawText(text, textBounds, TEXT_ALIGN_LEFT, color); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + 12 + textBounds.width + 4, bounds.y + bounds.height/2, bounds.width - textBounds.width - RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + 12 + textBounds.width + 4, bounds.y + bounds.height/2, bounds.width - textBounds.width - RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color); } //-------------------------------------------------------------------- @@ -1667,7 +1667,7 @@ int GuiLine(Rectangle bounds, const char *text) } // Panel control -int GuiPanel(Rectangle bounds, const char *text) +int GuiPanel(rayRectangle bounds, const char *text) { #if !defined(RAYGUI_PANEL_BORDER_WIDTH) #define RAYGUI_PANEL_BORDER_WIDTH 1 @@ -1677,7 +1677,7 @@ int GuiPanel(Rectangle bounds, const char *text) GuiState state = guiState; // Text will be drawn as a header bar (if provided) - Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT }; + rayRectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT }; if ((text != NULL) && (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f)) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f; if (text != NULL) @@ -1691,7 +1691,7 @@ int GuiPanel(Rectangle bounds, const char *text) //-------------------------------------------------------------------- if (text != NULL) GuiStatusBar(statusBar, text); // Draw panel header as status bar - GuiDrawRectangle(bounds, RAYGUI_PANEL_BORDER_WIDTH, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED: LINE_COLOR)), + GuiDrawrayRectangle(bounds, RAYGUI_PANEL_BORDER_WIDTH, GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED: LINE_COLOR)), GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BASE_COLOR_DISABLED : BACKGROUND_COLOR))); //-------------------------------------------------------------------- @@ -1700,14 +1700,14 @@ int GuiPanel(Rectangle bounds, const char *text) // Tab Bar control // NOTE: Using GuiToggle() for the TABS -int GuiTabBar(Rectangle bounds, const char **text, int count, int *active) +int GuiTabBar(rayRectangle bounds, const char **text, int count, int *active) { #define RAYGUI_TABBAR_ITEM_WIDTH 160 int result = -1; //GuiState state = guiState; - Rectangle tabBounds = { bounds.x, bounds.y, RAYGUI_TABBAR_ITEM_WIDTH, bounds.height }; + rayRectangle tabBounds = { bounds.x, bounds.y, RAYGUI_TABBAR_ITEM_WIDTH, bounds.height }; if (*active < 0) *active = 0; else if (*active > count - 1) *active = count - 1; @@ -1754,9 +1754,9 @@ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active) GuiSetStyle(BUTTON, BORDER_WIDTH, 1); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); #if defined(RAYGUI_NO_ICONS) - if (GuiButton(RAYGUI_CLITERAL(Rectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, "x")) result = i; + if (GuiButton(RAYGUI_CLITERAL(rayRectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, "x")) result = i; #else - if (GuiButton(RAYGUI_CLITERAL(Rectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, GuiIconText(ICON_CROSS_SMALL, NULL))) result = i; + if (GuiButton(RAYGUI_CLITERAL(rayRectangle){ tabBounds.x + tabBounds.width - 14 - 5, tabBounds.y + 5, 14, 14 }, GuiIconText(ICON_CROSS_SMALL, NULL))) result = i; #endif GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth); GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlignment); @@ -1764,14 +1764,14 @@ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active) } // Draw tab-bar bottom line - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, 1 }, 0, BLANK, GetColor(GuiGetStyle(TOGGLE, BORDER_COLOR_NORMAL))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, 1 }, 0, BLANK, GetColor(GuiGetStyle(TOGGLE, BORDER_COLOR_NORMAL))); //-------------------------------------------------------------------- return result; // Return as result the current TAB closing requested } // Scroll Panel control -int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view) +int GuiScrollPanel(rayRectangle bounds, const char *text, rayRectangle content, Vector2 *scroll, rayRectangle *view) { #define RAYGUI_MIN_SCROLLBAR_WIDTH 40 #define RAYGUI_MIN_SCROLLBAR_HEIGHT 40 @@ -1780,14 +1780,14 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector GuiState state = guiState; float mouseWheelSpeed = 20.0f; // Default movement speed with mouse wheel - Rectangle temp = { 0 }; + rayRectangle temp = { 0 }; if (view == NULL) view = &temp; Vector2 scrollPos = { 0.0f, 0.0f }; if (scroll != NULL) scrollPos = *scroll; // Text will be drawn as a header bar (if provided) - Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT }; + rayRectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT }; if (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f; if (text != NULL) @@ -1806,13 +1806,13 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector int horizontalScrollBarWidth = hasHorizontalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0; int verticalScrollBarWidth = hasVerticalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0; - Rectangle horizontalScrollBar = { + rayRectangle horizontalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + verticalScrollBarWidth : (float)bounds.x) + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.y + bounds.height - horizontalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.width - verticalScrollBarWidth - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)horizontalScrollBarWidth }; - Rectangle verticalScrollBar = { + rayRectangle verticalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)bounds.x + bounds.width - verticalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH)), (float)bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)verticalScrollBarWidth, @@ -1834,8 +1834,8 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector // Calculate view area (area without the scrollbars) *view = (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? - RAYGUI_CLITERAL(Rectangle){ bounds.x + verticalScrollBarWidth + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth, bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth } : - RAYGUI_CLITERAL(Rectangle){ bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth, bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth }; + RAYGUI_CLITERAL(rayRectangle){ bounds.x + verticalScrollBarWidth + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth, bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth } : + RAYGUI_CLITERAL(rayRectangle){ bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth, bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth }; // Clip view area to the actual content size if (view->width > content.width) view->width = content.width; @@ -1890,7 +1890,7 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector //-------------------------------------------------------------------- if (text != NULL) GuiStatusBar(statusBar, text); // Draw panel header as status bar - GuiDrawRectangle(bounds, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background + GuiDrawrayRectangle(bounds, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background // Save size of the scrollbar slider const int slider = GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE); @@ -1913,15 +1913,15 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector } else scrollPos.y = 0.0f; - // Draw detail corner rectangle if both scroll bars are visible + // Draw detail corner rayRectangle if both scroll bars are visible if (hasHorizontalScrollBar && hasVerticalScrollBar) { - Rectangle corner = { (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) + 2) : (horizontalScrollBar.x + horizontalScrollBar.width + 2), verticalScrollBar.y + verticalScrollBar.height + 2, (float)horizontalScrollBarWidth - 4, (float)verticalScrollBarWidth - 4 }; - GuiDrawRectangle(corner, 0, BLANK, GetColor(GuiGetStyle(LISTVIEW, TEXT + (state*3)))); + rayRectangle corner = { (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) + 2) : (horizontalScrollBar.x + horizontalScrollBar.width + 2), verticalScrollBar.y + verticalScrollBar.height + 2, (float)horizontalScrollBarWidth - 4, (float)verticalScrollBarWidth - 4 }; + GuiDrawrayRectangle(corner, 0, BLANK, GetColor(GuiGetStyle(LISTVIEW, TEXT + (state*3)))); } // Draw scrollbar lines depending on current state - GuiDrawRectangle(bounds, GuiGetStyle(DEFAULT, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + (state*3))), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(DEFAULT, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + (state*3))), BLANK); // Set scrollbar slider size back to the way it was before GuiSetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE, slider); @@ -1933,7 +1933,7 @@ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector } // Label control -int GuiLabel(Rectangle bounds, const char *text) +int GuiLabel(rayRectangle bounds, const char *text) { int result = 0; GuiState state = guiState; @@ -1952,7 +1952,7 @@ int GuiLabel(Rectangle bounds, const char *text) } // Button control, returns true when clicked -int GuiButton(Rectangle bounds, const char *text) +int GuiButton(rayRectangle bounds, const char *text) { int result = 0; GuiState state = guiState; @@ -1976,7 +1976,7 @@ int GuiButton(Rectangle bounds, const char *text) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(BUTTON, BORDER_WIDTH), GetColor(GuiGetStyle(BUTTON, BORDER + (state*3))), GetColor(GuiGetStyle(BUTTON, BASE + (state*3)))); + GuiDrawrayRectangle(bounds, GuiGetStyle(BUTTON, BORDER_WIDTH), GetColor(GuiGetStyle(BUTTON, BORDER + (state*3))), GetColor(GuiGetStyle(BUTTON, BASE + (state*3)))); GuiDrawText(text, GetTextBounds(BUTTON, bounds), GuiGetStyle(BUTTON, TEXT_ALIGNMENT), GetColor(GuiGetStyle(BUTTON, TEXT + (state*3)))); if (state == STATE_FOCUSED) GuiTooltip(bounds); @@ -1986,7 +1986,7 @@ int GuiButton(Rectangle bounds, const char *text) } // Label button control -int GuiLabelButton(Rectangle bounds, const char *text) +int GuiLabelButton(rayRectangle bounds, const char *text) { GuiState state = guiState; bool pressed = false; @@ -2021,7 +2021,7 @@ int GuiLabelButton(Rectangle bounds, const char *text) } // Toggle Button control, returns true when active -int GuiToggle(Rectangle bounds, const char *text, bool *active) +int GuiToggle(rayRectangle bounds, const char *text, bool *active) { int result = 0; GuiState state = guiState; @@ -2053,12 +2053,12 @@ int GuiToggle(Rectangle bounds, const char *text, bool *active) //-------------------------------------------------------------------- if (state == STATE_NORMAL) { - GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3)))), GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3))))); + GuiDrawrayRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, ((*active)? BORDER_COLOR_PRESSED : (BORDER + state*3)))), GetColor(GuiGetStyle(TOGGLE, ((*active)? BASE_COLOR_PRESSED : (BASE + state*3))))); GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, ((*active)? TEXT_COLOR_PRESSED : (TEXT + state*3))))); } else { - GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3))); + GuiDrawrayRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + state*3)), GetColor(GuiGetStyle(TOGGLE, BASE + state*3))); GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), GetColor(GuiGetStyle(TOGGLE, TEXT + state*3))); } @@ -2069,7 +2069,7 @@ int GuiToggle(Rectangle bounds, const char *text, bool *active) } // Toggle Group control, returns toggled button codepointIndex -int GuiToggleGroup(Rectangle bounds, const char *text, int *active) +int GuiToggleGroup(rayRectangle bounds, const char *text, int *active) { #if !defined(RAYGUI_TOGGLEGROUP_MAX_ITEMS) #define RAYGUI_TOGGLEGROUP_MAX_ITEMS 32 @@ -2118,7 +2118,7 @@ int GuiToggleGroup(Rectangle bounds, const char *text, int *active) } // Toggle Slider control extended, returns true when clicked -int GuiToggleSlider(Rectangle bounds, const char *text, int *active) +int GuiToggleSlider(rayRectangle bounds, const char *text, int *active) { int result = 0; GuiState state = guiState; @@ -2132,7 +2132,7 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active) int itemCount = 0; const char **items = GuiTextSplit(text, ';', &itemCount, NULL); - Rectangle slider = { + rayRectangle slider = { 0, // Calculated later depending on the active toggle bounds.y + GuiGetStyle(SLIDER, BORDER_WIDTH) + GuiGetStyle(SLIDER, SLIDER_PADDING), (bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH) - (itemCount + 1)*GuiGetStyle(SLIDER, SLIDER_PADDING))/itemCount, @@ -2165,18 +2165,18 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + (state*3))), + GuiDrawrayRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), GetColor(GuiGetStyle(TOGGLE, BORDER + (state*3))), GetColor(GuiGetStyle(TOGGLE, BASE_COLOR_NORMAL))); // Draw internal slider - if (state == STATE_NORMAL) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); - else if (state == STATE_FOCUSED) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_FOCUSED))); - else if (state == STATE_PRESSED) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); + if (state == STATE_NORMAL) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); + else if (state == STATE_FOCUSED) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_FOCUSED))); + else if (state == STATE_PRESSED) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); // Draw text in slider if (text != NULL) { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(text); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.x = slider.x + slider.width/2 - textBounds.width/2; @@ -2190,7 +2190,7 @@ int GuiToggleSlider(Rectangle bounds, const char *text, int *active) } // Check Box control, returns 1 when state changed -int GuiCheckBox(Rectangle bounds, const char *text, bool *checked) +int GuiCheckBox(rayRectangle bounds, const char *text, bool *checked) { int result = 0; GuiState state = guiState; @@ -2198,7 +2198,7 @@ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked) bool temp = false; if (checked == NULL) checked = &temp; - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; if (text != NULL) { @@ -2215,7 +2215,7 @@ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked) { Vector2 mousePoint = GetMousePosition(); - Rectangle totalBounds = { + rayRectangle totalBounds = { (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_LEFT)? textBounds.x : bounds.x, bounds.y, bounds.width + textBounds.width + GuiGetStyle(CHECKBOX, TEXT_PADDING), @@ -2239,15 +2239,15 @@ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(CHECKBOX, BORDER_WIDTH), GetColor(GuiGetStyle(CHECKBOX, BORDER + (state*3))), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(CHECKBOX, BORDER_WIDTH), GetColor(GuiGetStyle(CHECKBOX, BORDER + (state*3))), BLANK); if (*checked) { - Rectangle check = { bounds.x + GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING), + rayRectangle check = { bounds.x + GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING), bounds.y + GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING), bounds.width - 2*(GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING)), bounds.height - 2*(GuiGetStyle(CHECKBOX, BORDER_WIDTH) + GuiGetStyle(CHECKBOX, CHECK_PADDING)) }; - GuiDrawRectangle(check, 0, BLANK, GetColor(GuiGetStyle(CHECKBOX, TEXT + state*3))); + GuiDrawrayRectangle(check, 0, BLANK, GetColor(GuiGetStyle(CHECKBOX, TEXT + state*3))); } GuiDrawText(text, textBounds, (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_RIGHT)? TEXT_ALIGN_LEFT : TEXT_ALIGN_RIGHT, GetColor(GuiGetStyle(LABEL, TEXT + (state*3)))); @@ -2257,7 +2257,7 @@ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked) } // Combo Box control, returns selected item codepointIndex -int GuiComboBox(Rectangle bounds, const char *text, int *active) +int GuiComboBox(rayRectangle bounds, const char *text, int *active) { int result = 0; GuiState state = guiState; @@ -2267,7 +2267,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int *active) bounds.width -= (GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH) + GuiGetStyle(COMBOBOX, COMBO_BUTTON_SPACING)); - Rectangle selector = { (float)bounds.x + bounds.width + GuiGetStyle(COMBOBOX, COMBO_BUTTON_SPACING), + rayRectangle selector = { (float)bounds.x + bounds.width + GuiGetStyle(COMBOBOX, COMBO_BUTTON_SPACING), (float)bounds.y, (float)GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH), (float)bounds.height }; // Get substrings items from text (items pointers, lengths and count) @@ -2301,7 +2301,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int *active) // Draw control //-------------------------------------------------------------------- // Draw combo box main - GuiDrawRectangle(bounds, GuiGetStyle(COMBOBOX, BORDER_WIDTH), GetColor(GuiGetStyle(COMBOBOX, BORDER + (state*3))), GetColor(GuiGetStyle(COMBOBOX, BASE + (state*3)))); + GuiDrawrayRectangle(bounds, GuiGetStyle(COMBOBOX, BORDER_WIDTH), GetColor(GuiGetStyle(COMBOBOX, BORDER + (state*3))), GetColor(GuiGetStyle(COMBOBOX, BASE + (state*3)))); GuiDrawText(items[*active], GetTextBounds(COMBOBOX, bounds), GuiGetStyle(COMBOBOX, TEXT_ALIGNMENT), GetColor(GuiGetStyle(COMBOBOX, TEXT + (state*3)))); // Draw selector using a custom button @@ -2322,7 +2322,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int *active) // Dropdown Box control // NOTE: Returns mouse click -int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode) +int GuiDropdownBox(rayRectangle bounds, const char *text, int *active, bool editMode) { int result = 0; GuiState state = guiState; @@ -2334,10 +2334,10 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod int itemCount = 0; const char **items = GuiTextSplit(text, ';', &itemCount, NULL); - Rectangle boundsOpen = bounds; + rayRectangle boundsOpen = bounds; boundsOpen.height = (itemCount + 1)*(bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING)); - Rectangle itemBounds = bounds; + rayRectangle itemBounds = bounds; // Update control //-------------------------------------------------------------------- @@ -2361,7 +2361,7 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod // Check focused and selected item for (int i = 0; i < itemCount; i++) { - // Update item rectangle y position for next item + // Update item rayRectangle y position for next item itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING)); if (CheckCollisionPointRec(mousePoint, itemBounds)) @@ -2397,7 +2397,7 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod //-------------------------------------------------------------------- if (editMode) GuiPanel(boundsOpen, NULL); - GuiDrawRectangle(bounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER + state*3)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE + state*3))); + GuiDrawrayRectangle(bounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER + state*3)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE + state*3))); GuiDrawText(items[itemSelected], GetTextBounds(DROPDOWNBOX, bounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + state*3))); if (editMode) @@ -2405,17 +2405,17 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod // Draw visible items for (int i = 0; i < itemCount; i++) { - // Update item rectangle y position for next item + // Update item rayRectangle y position for next item itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING)); if (i == itemSelected) { - GuiDrawRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_PRESSED)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_PRESSED))); + GuiDrawrayRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_PRESSED)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_PRESSED))); GuiDrawText(items[i], GetTextBounds(DROPDOWNBOX, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_PRESSED))); } else if (i == itemFocused) { - GuiDrawRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_FOCUSED)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_FOCUSED))); + GuiDrawrayRectangle(itemBounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), GetColor(GuiGetStyle(DROPDOWNBOX, BORDER_COLOR_FOCUSED)), GetColor(GuiGetStyle(DROPDOWNBOX, BASE_COLOR_FOCUSED))); GuiDrawText(items[i], GetTextBounds(DROPDOWNBOX, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_FOCUSED))); } else GuiDrawText(items[i], GetTextBounds(DROPDOWNBOX, itemBounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), GetColor(GuiGetStyle(DROPDOWNBOX, TEXT_COLOR_NORMAL))); @@ -2424,10 +2424,10 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod // Draw arrows (using icon if available) #if defined(RAYGUI_NO_ICONS) - GuiDrawText("v", RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 2, 10, 10 }, + GuiDrawText("v", RAYGUI_CLITERAL(rayRectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 2, 10, 10 }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3)))); #else - GuiDrawText("#120#", RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 6, 10, 10 }, + GuiDrawText("#120#", RAYGUI_CLITERAL(rayRectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 6, 10, 10 }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3)))); // ICON_ARROW_DOWN_FILL #endif //-------------------------------------------------------------------- @@ -2440,7 +2440,7 @@ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMod // Text Box control // NOTE: Returns true on ENTER pressed (useful for data validation) -int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) +int GuiTextBox(rayRectangle bounds, char *text, int bufferSize, bool editMode) { #if !defined(RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN) #define RAYGUI_TEXTBOX_AUTO_CURSOR_COOLDOWN 40 // Frames to wait for autocursor movement @@ -2455,13 +2455,13 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) bool multiline = false; // TODO: Consider multiline text input int wrapMode = GuiGetStyle(DEFAULT, TEXT_WRAP_MODE); - Rectangle textBounds = GetTextBounds(TEXTBOX, bounds); + rayRectangle textBounds = GetTextBounds(TEXTBOX, bounds); int textWidth = GetTextWidth(text) - GetTextWidth(text + textBoxCursorIndex); int textIndexOffset = 0; // Text index offset to start drawing in the box - // Cursor rectangle + // Cursor rayRectangle // NOTE: Position X value should be updated - Rectangle cursor = { + rayRectangle cursor = { textBounds.x + textWidth + GuiGetStyle(DEFAULT, TEXT_SPACING), textBounds.y + textBounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE), 2, @@ -2471,9 +2471,9 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) if (cursor.height >= bounds.height) cursor.height = bounds.height - GuiGetStyle(TEXTBOX, BORDER_WIDTH)*2; if (cursor.y < (bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH))) cursor.y = bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH); - // Mouse cursor rectangle + // Mouse cursor rayRectangle // NOTE: Initialized outside of screen - Rectangle mouseCursor = cursor; + rayRectangle mouseCursor = cursor; mouseCursor.x = -1; mouseCursor.width = 1; @@ -2697,13 +2697,13 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) //-------------------------------------------------------------------- if (state == STATE_PRESSED) { - GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_PRESSED))); + GuiDrawrayRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_PRESSED))); } else if (state == STATE_DISABLED) { - GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED))); + GuiDrawrayRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED))); } - else GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), BLANK); + else GuiDrawrayRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), BLANK); // Draw text considering index offset if required // NOTE: Text index offset depends on cursor position @@ -2713,10 +2713,10 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) if (editMode && !GuiGetStyle(TEXTBOX, TEXT_READONLY)) { //if (autoCursorMode || ((blinkCursorFrameCounter/40)%2 == 0)) - GuiDrawRectangle(cursor, 0, BLANK, GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED))); + GuiDrawrayRectangle(cursor, 0, BLANK, GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED))); // Draw mouse position cursor (if required) - if (mouseCursor.x >= 0) GuiDrawRectangle(mouseCursor, 0, BLANK, GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED))); + if (mouseCursor.x >= 0) GuiDrawrayRectangle(mouseCursor, 0, BLANK, GetColor(GuiGetStyle(TEXTBOX, BORDER_COLOR_PRESSED))); } else if (state == STATE_FOCUSED) GuiTooltip(bounds); //-------------------------------------------------------------------- @@ -2727,7 +2727,7 @@ int GuiTextBox(Rectangle bounds, char *text, int bufferSize, bool editMode) /* // Text Box control with multiple lines and word-wrap // NOTE: This text-box is readonly, no editing supported by default -bool GuiTextBoxMulti(Rectangle bounds, char *text, int bufferSize, bool editMode) +bool GuiTextBoxMulti(rayRectangle bounds, char *text, int bufferSize, bool editMode) { bool pressed = false; @@ -2747,19 +2747,19 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int bufferSize, bool editMode */ // Spinner control, returns selected value -int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode) +int GuiSpinner(rayRectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode) { int result = 1; GuiState state = guiState; int tempValue = *value; - Rectangle spinner = { bounds.x + GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_SPACING), bounds.y, + rayRectangle spinner = { bounds.x + GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_SPACING), bounds.y, bounds.width - 2*(GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_SPACING)), bounds.height }; - Rectangle leftButtonBound = { (float)bounds.x, (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height }; - Rectangle rightButtonBound = { (float)bounds.x + bounds.width - GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height }; + rayRectangle leftButtonBound = { (float)bounds.x, (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height }; + rayRectangle rightButtonBound = { (float)bounds.x + bounds.width - GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height }; - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; if (text != NULL) { textBounds.width = (float)GetTextWidth(text) + 2; @@ -2822,7 +2822,7 @@ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int // Value Box control, updates input text with numbers // NOTE: Requires static variables: frameCounter -int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode) +int GuiValueBox(rayRectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode) { #if !defined(RAYGUI_VALUEBOX_MAX_CHARS) #define RAYGUI_VALUEBOX_MAX_CHARS 32 @@ -2834,7 +2834,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in char textValue[RAYGUI_VALUEBOX_MAX_CHARS + 1] = "\0"; sprintf(textValue, "%i", *value); - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; if (text != NULL) { textBounds.width = (float)GetTextWidth(text) + 2; @@ -2912,15 +2912,15 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in if (state == STATE_PRESSED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_PRESSED)); else if (state == STATE_DISABLED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_DISABLED)); - GuiDrawRectangle(bounds, GuiGetStyle(VALUEBOX, BORDER_WIDTH), GetColor(GuiGetStyle(VALUEBOX, BORDER + (state*3))), baseColor); + GuiDrawrayRectangle(bounds, GuiGetStyle(VALUEBOX, BORDER_WIDTH), GetColor(GuiGetStyle(VALUEBOX, BORDER + (state*3))), baseColor); GuiDrawText(textValue, GetTextBounds(VALUEBOX, bounds), TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(VALUEBOX, TEXT + (state*3)))); // Draw cursor if (editMode) { // NOTE: ValueBox internal text is always centered - Rectangle cursor = { bounds.x + GetTextWidth(textValue)/2 + bounds.width/2 + 1, bounds.y + 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH), 4, bounds.height - 4*GuiGetStyle(VALUEBOX, BORDER_WIDTH) }; - GuiDrawRectangle(cursor, 0, BLANK, GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED))); + rayRectangle cursor = { bounds.x + GetTextWidth(textValue)/2 + bounds.width/2 + 1, bounds.y + 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH), 4, bounds.height - 4*GuiGetStyle(VALUEBOX, BORDER_WIDTH) }; + GuiDrawrayRectangle(cursor, 0, BLANK, GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED))); } // Draw text label if provided @@ -2932,7 +2932,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in // Slider control with pro parameters // NOTE: Other GuiSlider*() controls use this one -int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue, int sliderWidth) +int GuiSliderPro(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue, int sliderWidth) { int result = 0; float oldValue = *value; @@ -2943,7 +2943,7 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, int sliderValue = (int)(((*value - minValue)/(maxValue - minValue))*(bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH))); - Rectangle slider = { bounds.x, bounds.y + GuiGetStyle(SLIDER, BORDER_WIDTH) + GuiGetStyle(SLIDER, SLIDER_PADDING), + rayRectangle slider = { bounds.x, bounds.y + GuiGetStyle(SLIDER, BORDER_WIDTH) + GuiGetStyle(SLIDER, SLIDER_PADDING), 0, bounds.height - 2*GuiGetStyle(SLIDER, BORDER_WIDTH) - 2*GuiGetStyle(SLIDER, SLIDER_PADDING) }; if (sliderWidth > 0) // Slider @@ -2978,7 +2978,7 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, else { guiSliderDragging = false; - guiSliderActive = RAYGUI_CLITERAL(Rectangle){ 0, 0, 0, 0 }; + guiSliderActive = RAYGUI_CLITERAL(rayRectangle){ 0, 0, 0, 0 }; } } else if (CheckCollisionPointRec(mousePoint, bounds)) @@ -3023,17 +3023,17 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), GetColor(GuiGetStyle(SLIDER, BORDER + (state*3))), GetColor(GuiGetStyle(SLIDER, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED))); + GuiDrawrayRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), GetColor(GuiGetStyle(SLIDER, BORDER + (state*3))), GetColor(GuiGetStyle(SLIDER, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED))); // Draw slider internal bar (depends on state) - if (state == STATE_NORMAL) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); - else if (state == STATE_FOCUSED) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_FOCUSED))); - else if (state == STATE_PRESSED) GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_PRESSED))); + if (state == STATE_NORMAL) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED))); + else if (state == STATE_FOCUSED) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_FOCUSED))); + else if (state == STATE_PRESSED) GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_PRESSED))); // Draw left/right text if provided if (textLeft != NULL) { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(textLeft); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SLIDER, TEXT_PADDING); @@ -3044,7 +3044,7 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, if (textRight != NULL) { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(textRight); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.x = bounds.x + bounds.width + GuiGetStyle(SLIDER, TEXT_PADDING); @@ -3058,19 +3058,19 @@ int GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, } // Slider control extended, returns selected value and has text -int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) +int GuiSlider(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) { return GuiSliderPro(bounds, textLeft, textRight, value, minValue, maxValue, GuiGetStyle(SLIDER, SLIDER_WIDTH)); } // Slider Bar control extended, returns selected value -int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) +int GuiSliderBar(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) { return GuiSliderPro(bounds, textLeft, textRight, value, minValue, maxValue, 0); } // Progress Bar control extended, shows current progress value -int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) +int GuiProgressBar(rayRectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue) { int result = 0; GuiState state = guiState; @@ -3079,7 +3079,7 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight if (value == NULL) value = &temp; // Progress bar - Rectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), + rayRectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.y + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), 0, bounds.height - 2*GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) - 2*GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING) }; @@ -3095,36 +3095,36 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight //-------------------------------------------------------------------- if (state == STATE_DISABLED) { - GuiDrawRectangle(bounds, GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), GetColor(GuiGetStyle(PROGRESSBAR, BORDER + (state*3))), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), GetColor(GuiGetStyle(PROGRESSBAR, BORDER + (state*3))), BLANK); } else { if (*value > minValue) { // Draw progress bar with colored border, more visual - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, (int)progress.width + (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height - 2 }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, (int)progress.width + (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y, (int)progress.width + (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height - 2 }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y + bounds.height - 1, (int)progress.width + (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); } - else GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); + else GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x, bounds.y, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); - if (*value >= maxValue) GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + progress.width + 1, bounds.y, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); + if (*value >= maxValue) GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + progress.width + 1, bounds.y, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_FOCUSED))); else { // Draw borders not yet reached by value - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + (int)progress.width + 1, bounds.y, bounds.width - (int)progress.width - 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + (int)progress.width + 1, bounds.y + bounds.height - 1, bounds.width - (int)progress.width - 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y + 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height - 2 }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + (int)progress.width + 1, bounds.y, bounds.width - (int)progress.width - 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + (int)progress.width + 1, bounds.y + bounds.height - 1, bounds.width - (int)progress.width - 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ bounds.x + bounds.width - 1, bounds.y + 1, (float)GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), bounds.height - 2 }, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BORDER_COLOR_NORMAL))); } // Draw slider internal progress bar (depends on state) - GuiDrawRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); + GuiDrawrayRectangle(progress, 0, BLANK, GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED))); } // Draw left/right text if provided if (textLeft != NULL) { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(textLeft); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.x = bounds.x - textBounds.width - GuiGetStyle(PROGRESSBAR, TEXT_PADDING); @@ -3135,7 +3135,7 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight if (textRight != NULL) { - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.width = (float)GetTextWidth(textRight); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.x = bounds.x + bounds.width + GuiGetStyle(PROGRESSBAR, TEXT_PADDING); @@ -3149,22 +3149,22 @@ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight } // Status Bar control -int GuiStatusBar(Rectangle bounds, const char *text) +int GuiStatusBar(rayRectangle bounds, const char *text) { int result = 0; GuiState state = guiState; // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(STATUSBAR, BORDER_WIDTH), GetColor(GuiGetStyle(STATUSBAR, BORDER + (state*3))), GetColor(GuiGetStyle(STATUSBAR, BASE + (state*3)))); + GuiDrawrayRectangle(bounds, GuiGetStyle(STATUSBAR, BORDER_WIDTH), GetColor(GuiGetStyle(STATUSBAR, BORDER + (state*3))), GetColor(GuiGetStyle(STATUSBAR, BASE + (state*3)))); GuiDrawText(text, GetTextBounds(STATUSBAR, bounds), GuiGetStyle(STATUSBAR, TEXT_ALIGNMENT), GetColor(GuiGetStyle(STATUSBAR, TEXT + (state*3)))); //-------------------------------------------------------------------- return result; } -// Dummy rectangle control, intended for placeholding -int GuiDummyRec(Rectangle bounds, const char *text) +// Dummy rayRectangle control, intended for placeholding +int GuiDummyRec(rayRectangle bounds, const char *text) { int result = 0; GuiState state = guiState; @@ -3186,7 +3186,7 @@ int GuiDummyRec(Rectangle bounds, const char *text) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED))); + GuiDrawrayRectangle(bounds, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED))); GuiDrawText(text, GetTextBounds(DEFAULT, bounds), TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(BUTTON, (state != STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED))); //------------------------------------------------------------------ @@ -3194,7 +3194,7 @@ int GuiDummyRec(Rectangle bounds, const char *text) } // List View control -int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active) +int GuiListView(rayRectangle bounds, const char *text, int *scrollIndex, int *active) { int result = 0; int itemCount = 0; @@ -3208,7 +3208,7 @@ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *activ } // List View control with extended parameters -int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus) +int GuiListViewEx(rayRectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus) { int result = 0; GuiState state = guiState; @@ -3220,8 +3220,8 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd bool useScrollBar = false; if ((GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING))*count > bounds.height) useScrollBar = true; - // Define base item rectangle [0] - Rectangle itemBounds = { 0 }; + // Define base item rayRectangle [0] + rayRectangle itemBounds = { 0 }; itemBounds.x = bounds.x + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING); itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) + GuiGetStyle(DEFAULT, BORDER_WIDTH); itemBounds.width = bounds.width - 2*GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) - GuiGetStyle(DEFAULT, BORDER_WIDTH); @@ -3261,7 +3261,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd break; } - // Update item rectangle y position for next item + // Update item rayRectangle y position for next item itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING)); } @@ -3279,21 +3279,21 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd } else itemFocused = -1; - // Reset item rectangle y to [0] + // Reset item rayRectangle y to [0] itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) + GuiGetStyle(DEFAULT, BORDER_WIDTH); } //-------------------------------------------------------------------- // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(DEFAULT, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background + GuiDrawrayRectangle(bounds, GuiGetStyle(DEFAULT, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background // Draw visible items for (int i = 0; ((i < visibleItems) && (text != NULL)); i++) { if (state == STATE_DISABLED) { - if ((startIndex + i) == itemSelected) GuiDrawRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_DISABLED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_DISABLED))); + if ((startIndex + i) == itemSelected) GuiDrawrayRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_DISABLED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_DISABLED))); GuiDrawText(text[startIndex + i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(LISTVIEW, TEXT_ALIGNMENT), GetColor(GuiGetStyle(LISTVIEW, TEXT_COLOR_DISABLED))); } @@ -3302,13 +3302,13 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd if (((startIndex + i) == itemSelected) && (active != NULL)) { // Draw item selected - GuiDrawRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_PRESSED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_PRESSED))); + GuiDrawrayRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_PRESSED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_PRESSED))); GuiDrawText(text[startIndex + i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(LISTVIEW, TEXT_ALIGNMENT), GetColor(GuiGetStyle(LISTVIEW, TEXT_COLOR_PRESSED))); } else if (((startIndex + i) == itemFocused)) // && (focus != NULL)) // NOTE: We want items focused, despite not returned! { // Draw item focused - GuiDrawRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_FOCUSED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_FOCUSED))); + GuiDrawrayRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_FOCUSED)), GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_FOCUSED))); GuiDrawText(text[startIndex + i], GetTextBounds(DEFAULT, itemBounds), GuiGetStyle(LISTVIEW, TEXT_ALIGNMENT), GetColor(GuiGetStyle(LISTVIEW, TEXT_COLOR_FOCUSED))); } else @@ -3318,13 +3318,13 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd } } - // Update item rectangle y position for next item + // Update item rayRectangle y position for next item itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING)); } if (useScrollBar) { - Rectangle scrollBarBounds = { + rayRectangle scrollBarBounds = { bounds.x + bounds.width - GuiGetStyle(LISTVIEW, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), bounds.y + GuiGetStyle(LISTVIEW, BORDER_WIDTH), (float)GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) @@ -3354,7 +3354,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollInd } // Color Panel control -int GuiColorPanel(Rectangle bounds, const char *text, Color *color) +int GuiColorPanel(rayRectangle bounds, const char *text, Color *color) { int result = 0; GuiState state = guiState; @@ -3415,19 +3415,19 @@ int GuiColorPanel(Rectangle bounds, const char *text, Color *color) //-------------------------------------------------------------------- if (state != STATE_DISABLED) { - DrawRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha)); - DrawRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0)); + DrawrayRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha)); + DrawrayRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0)); // Draw color picker: selector - Rectangle selector = { pickerSelector.x - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, pickerSelector.y - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE), (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE) }; - GuiDrawRectangle(selector, 0, BLANK, colWhite); + rayRectangle selector = { pickerSelector.x - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, pickerSelector.y - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE), (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE) }; + GuiDrawrayRectangle(selector, 0, BLANK, colWhite); } else { - DrawRectangleGradientEx(bounds, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.6f), guiAlpha)); + DrawrayRectangleGradientEx(bounds, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.6f), guiAlpha)); } - GuiDrawRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); //-------------------------------------------------------------------- return result; @@ -3435,7 +3435,7 @@ int GuiColorPanel(Rectangle bounds, const char *text, Color *color) // Color Bar Alpha control // NOTE: Returns alpha value normalized [0..1] -int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) +int GuiColorBarAlpha(rayRectangle bounds, const char *text, float *alpha) { #if !defined(RAYGUI_COLORBARALPHA_CHECKED_SIZE) #define RAYGUI_COLORBARALPHA_CHECKED_SIZE 10 @@ -3443,7 +3443,7 @@ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) int result = 0; GuiState state = guiState; - Rectangle selector = { (float)bounds.x + (*alpha)*bounds.width - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.y - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT), (float)bounds.height + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2 }; + rayRectangle selector = { (float)bounds.x + (*alpha)*bounds.width - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.y - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT), (float)bounds.height + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2 }; // Update control //-------------------------------------------------------------------- @@ -3467,7 +3467,7 @@ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) else { guiSliderDragging = false; - guiSliderActive = RAYGUI_CLITERAL(Rectangle){ 0, 0, 0, 0 }; + guiSliderActive = RAYGUI_CLITERAL(rayRectangle){ 0, 0, 0, 0 }; } } else if (CheckCollisionPointRec(mousePoint, bounds) || CheckCollisionPointRec(mousePoint, selector)) @@ -3501,19 +3501,19 @@ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) { for (int y = 0; y < checksY; y++) { - Rectangle check = { bounds.x + x*RAYGUI_COLORBARALPHA_CHECKED_SIZE, bounds.y + y*RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE }; - GuiDrawRectangle(check, 0, BLANK, ((x + y)%2)? Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.4f) : Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.4f)); + rayRectangle check = { bounds.x + x*RAYGUI_COLORBARALPHA_CHECKED_SIZE, bounds.y + y*RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE }; + GuiDrawrayRectangle(check, 0, BLANK, ((x + y)%2)? Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.4f) : Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.4f)); } } - DrawRectangleGradientEx(bounds, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha)); + DrawrayRectangleGradientEx(bounds, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, RAYGUI_CLITERAL(Color){ 255, 255, 255, 0 }, Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 0, 255 }, guiAlpha)); } - else DrawRectangleGradientEx(bounds, Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha)); + else DrawrayRectangleGradientEx(bounds, Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha)); - GuiDrawRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); // Draw alpha bar: selector - GuiDrawRectangle(selector, 0, BLANK, GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3))); + GuiDrawrayRectangle(selector, 0, BLANK, GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3))); //-------------------------------------------------------------------- return result; @@ -3525,11 +3525,11 @@ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) // Color GuiColorBarSat() [WHITE->color] // Color GuiColorBarValue() [BLACK->color], HSV/HSL // float GuiColorBarLuminance() [BLACK->WHITE] -int GuiColorBarHue(Rectangle bounds, const char *text, float *hue) +int GuiColorBarHue(rayRectangle bounds, const char *text, float *hue) { int result = 0; GuiState state = guiState; - Rectangle selector = { (float)bounds.x - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)bounds.y + (*hue)/360.0f*bounds.height - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2, (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT) }; + rayRectangle selector = { (float)bounds.x - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)bounds.y + (*hue)/360.0f*bounds.height - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2, (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT) }; // Update control //-------------------------------------------------------------------- @@ -3553,7 +3553,7 @@ int GuiColorBarHue(Rectangle bounds, const char *text, float *hue) else { guiSliderDragging = false; - guiSliderActive = RAYGUI_CLITERAL(Rectangle){ 0, 0, 0, 0 }; + guiSliderActive = RAYGUI_CLITERAL(rayRectangle){ 0, 0, 0, 0 }; } } else if (CheckCollisionPointRec(mousePoint, bounds) || CheckCollisionPointRec(mousePoint, selector)) @@ -3590,20 +3590,20 @@ int GuiColorBarHue(Rectangle bounds, const char *text, float *hue) if (state != STATE_DISABLED) { // Draw hue bar:color bars - // TODO: Use directly DrawRectangleGradientEx(bounds, color1, color2, color2, color1); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 255, 0, 255 }, guiAlpha)); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + bounds.height/6), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 0, 255 }, guiAlpha)); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 2*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 255, 255 }, guiAlpha)); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 3*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 255, 255 }, guiAlpha)); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 4*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 255, 255 }, guiAlpha)); - DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 5*(bounds.height/6)), (int)bounds.width, (int)(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 0, 255 }, guiAlpha)); + // TODO: Use directly DrawrayRectangleGradientEx(bounds, color1, color2, color2, color1); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 255, 0, 255 }, guiAlpha)); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y + bounds.height/6), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 0, 255 }, guiAlpha)); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y + 2*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 255, 255 }, guiAlpha)); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y + 3*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 255, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 255, 255 }, guiAlpha)); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y + 4*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 0, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 255, 255 }, guiAlpha)); + DrawrayRectangleGradientV((int)bounds.x, (int)(bounds.y + 5*(bounds.height/6)), (int)bounds.width, (int)(bounds.height/6), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color){ 255, 0, 0, 255 }, guiAlpha)); } - else DrawRectangleGradientV((int)bounds.x, (int)bounds.y, (int)bounds.width, (int)bounds.height, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha)); + else DrawrayRectangleGradientV((int)bounds.x, (int)bounds.y, (int)bounds.width, (int)bounds.height, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha)); - GuiDrawRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); // Draw hue bar: selector - GuiDrawRectangle(selector, 0, BLANK, GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3))); + GuiDrawrayRectangle(selector, 0, BLANK, GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3))); //-------------------------------------------------------------------- return result; @@ -3611,11 +3611,11 @@ int GuiColorBarHue(Rectangle bounds, const char *text, float *hue) // Color Picker control // NOTE: It's divided in multiple controls: -// Color GuiColorPanel(Rectangle bounds, Color color) -// float GuiColorBarAlpha(Rectangle bounds, float alpha) -// float GuiColorBarHue(Rectangle bounds, float value) +// Color GuiColorPanel(rayRectangle bounds, Color color) +// float GuiColorBarAlpha(rayRectangle bounds, float alpha) +// float GuiColorBarHue(rayRectangle bounds, float value) // NOTE: bounds define GuiColorPanel() size -int GuiColorPicker(Rectangle bounds, const char *text, Color *color) +int GuiColorPicker(rayRectangle bounds, const char *text, Color *color) { int result = 0; @@ -3624,8 +3624,8 @@ int GuiColorPicker(Rectangle bounds, const char *text, Color *color) GuiColorPanel(bounds, NULL, color); - Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height }; - //Rectangle boundsAlpha = { bounds.x, bounds.y + bounds.height + GuiGetStyle(COLORPICKER, BARS_PADDING), bounds.width, GuiGetStyle(COLORPICKER, BARS_THICK) }; + rayRectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height }; + //rayRectangle boundsAlpha = { bounds.x, bounds.y + bounds.height + GuiGetStyle(COLORPICKER, BARS_PADDING), bounds.width, GuiGetStyle(COLORPICKER, BARS_THICK) }; Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ (*color).r/255.0f, (*color).g/255.0f, (*color).b/255.0f }); @@ -3642,11 +3642,11 @@ int GuiColorPicker(Rectangle bounds, const char *text, Color *color) // Color Picker control that avoids conversion to RGB and back to HSV on each call, thus avoiding jittering. // The user can call ConvertHSVtoRGB() to convert *colorHsv value to RGB. // NOTE: It's divided in multiple controls: -// int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) -// int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha) -// float GuiColorBarHue(Rectangle bounds, float value) +// int GuiColorPanelHSV(rayRectangle bounds, const char *text, Vector3 *colorHsv) +// int GuiColorBarAlpha(rayRectangle bounds, const char *text, float *alpha) +// float GuiColorBarHue(rayRectangle bounds, float value) // NOTE: bounds define GuiColorPanelHSV() size -int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) +int GuiColorPickerHSV(rayRectangle bounds, const char *text, Vector3 *colorHsv) { int result = 0; @@ -3661,7 +3661,7 @@ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) GuiColorPanelHSV(bounds, NULL, colorHsv); - const Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height }; + const rayRectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height }; GuiColorBarHue(boundsHue, NULL, &colorHsv->x); @@ -3670,7 +3670,7 @@ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) // Color Panel control, returns HSV color value in *colorHsv. // Used by GuiColorPickerHSV() -int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) +int GuiColorPanelHSV(rayRectangle bounds, const char *text, Vector3 *colorHsv) { int result = 0; GuiState state = guiState; @@ -3719,26 +3719,26 @@ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv) //-------------------------------------------------------------------- if (state != STATE_DISABLED) { - DrawRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha)); - DrawRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0)); + DrawrayRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha)); + DrawrayRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0)); // Draw color picker: selector - Rectangle selector = { pickerSelector.x - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, pickerSelector.y - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE), (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE) }; - GuiDrawRectangle(selector, 0, BLANK, colWhite); + rayRectangle selector = { pickerSelector.x - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, pickerSelector.y - GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE)/2, (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE), (float)GuiGetStyle(COLORPICKER, COLOR_SELECTOR_SIZE) }; + GuiDrawrayRectangle(selector, 0, BLANK, colWhite); } else { - DrawRectangleGradientEx(bounds, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.6f), guiAlpha)); + DrawrayRectangleGradientEx(bounds, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(colBlack, 0.6f), guiAlpha), Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.6f), guiAlpha)); } - GuiDrawRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); + GuiDrawrayRectangle(bounds, GuiGetStyle(COLORPICKER, BORDER_WIDTH), GetColor(GuiGetStyle(COLORPICKER, BORDER + state*3)), BLANK); //-------------------------------------------------------------------- return result; } // Message Box control -int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons) +int GuiMessageBox(rayRectangle bounds, const char *title, const char *message, const char *buttons) { #if !defined(RAYGUI_MESSAGEBOX_BUTTON_HEIGHT) #define RAYGUI_MESSAGEBOX_BUTTON_HEIGHT 24 @@ -3751,7 +3751,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons int buttonCount = 0; const char **buttonsText = GuiTextSplit(buttons, ';', &buttonCount, NULL); - Rectangle buttonBounds = { 0 }; + rayRectangle buttonBounds = { 0 }; buttonBounds.x = bounds.x + RAYGUI_MESSAGEBOX_BUTTON_PADDING; buttonBounds.y = bounds.y + bounds.height - RAYGUI_MESSAGEBOX_BUTTON_HEIGHT - RAYGUI_MESSAGEBOX_BUTTON_PADDING; buttonBounds.width = (bounds.width - RAYGUI_MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount; @@ -3759,7 +3759,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons int textWidth = GetTextWidth(message) + 2; - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; textBounds.x = bounds.x + bounds.width/2 - textWidth/2; textBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + RAYGUI_MESSAGEBOX_BUTTON_PADDING; textBounds.width = (float)textWidth; @@ -3790,7 +3790,7 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons } // Text Input Box control, ask for text -int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive) +int GuiTextInputBox(rayRectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive) { #if !defined(RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT) #define RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT 24 @@ -3810,7 +3810,7 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co int buttonCount = 0; const char **buttonsText = GuiTextSplit(buttons, ';', &buttonCount, NULL); - Rectangle buttonBounds = { 0 }; + rayRectangle buttonBounds = { 0 }; buttonBounds.x = bounds.x + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING; buttonBounds.y = bounds.y + bounds.height - RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT - RAYGUI_TEXTINPUTBOX_BUTTON_PADDING; buttonBounds.width = (bounds.width - RAYGUI_TEXTINPUTBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount; @@ -3818,7 +3818,7 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co int messageInputHeight = (int)bounds.height - RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT - 2*RAYGUI_TEXTINPUTBOX_BUTTON_PADDING; - Rectangle textBounds = { 0 }; + rayRectangle textBounds = { 0 }; if (message != NULL) { int textSize = GetTextWidth(message) + 2; @@ -3829,7 +3829,7 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); } - Rectangle textBoxBounds = { 0 }; + rayRectangle textBoxBounds = { 0 }; textBoxBounds.x = bounds.x + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING; textBoxBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - RAYGUI_TEXTINPUTBOX_HEIGHT/2; if (message == NULL) textBoxBounds.y = bounds.y + 24 + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING; @@ -3853,10 +3853,10 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co if (secretViewActive != NULL) { static char stars[] = "****************"; - if (GuiTextBox(RAYGUI_CLITERAL(Rectangle){ textBoxBounds.x, textBoxBounds.y, textBoxBounds.width - 4 - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.height }, + if (GuiTextBox(RAYGUI_CLITERAL(rayRectangle){ textBoxBounds.x, textBoxBounds.y, textBoxBounds.width - 4 - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.height }, ((*secretViewActive == 1) || textEditMode)? text : stars, textMaxSize, textEditMode)) textEditMode = !textEditMode; - GuiToggle(RAYGUI_CLITERAL(Rectangle){ textBoxBounds.x + textBoxBounds.width - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.y, RAYGUI_TEXTINPUTBOX_HEIGHT, RAYGUI_TEXTINPUTBOX_HEIGHT }, (*secretViewActive == 1)? "#44#" : "#45#", secretViewActive); + GuiToggle(RAYGUI_CLITERAL(rayRectangle){ textBoxBounds.x + textBoxBounds.width - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.y, RAYGUI_TEXTINPUTBOX_HEIGHT, RAYGUI_TEXTINPUTBOX_HEIGHT }, (*secretViewActive == 1)? "#44#" : "#45#", secretViewActive); } else { @@ -3884,7 +3884,7 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co // NOTE: Returns grid mouse-hover selected cell // About drawing lines at subpixel spacing, simple put, not easy solution: // https://stackoverflow.com/questions/4435450/2d-opengl-drawing-lines-that-dont-exactly-fit-pixel-raster -int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell) +int GuiGrid(rayRectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell) { // Grid lines alpha amount #if !defined(RAYGUI_GRID_ALPHA) @@ -3925,15 +3925,15 @@ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vect // Draw vertical grid lines for (int i = 0; i < linesV; i++) { - Rectangle lineV = { bounds.x + spacing*i/subdivs, bounds.y, 1, bounds.height }; - GuiDrawRectangle(lineV, 0, BLANK, ((i%subdivs) == 0)? GuiFade(GetColor(color), RAYGUI_GRID_ALPHA*4) : GuiFade(GetColor(color), RAYGUI_GRID_ALPHA)); + rayRectangle lineV = { bounds.x + spacing*i/subdivs, bounds.y, 1, bounds.height }; + GuiDrawrayRectangle(lineV, 0, BLANK, ((i%subdivs) == 0)? GuiFade(GetColor(color), RAYGUI_GRID_ALPHA*4) : GuiFade(GetColor(color), RAYGUI_GRID_ALPHA)); } // Draw horizontal grid lines for (int i = 0; i < linesH; i++) { - Rectangle lineH = { bounds.x, bounds.y + spacing*i/subdivs, bounds.width, 1 }; - GuiDrawRectangle(lineH, 0, BLANK, ((i%subdivs) == 0)? GuiFade(GetColor(color), RAYGUI_GRID_ALPHA*4) : GuiFade(GetColor(color), RAYGUI_GRID_ALPHA)); + rayRectangle lineH = { bounds.x, bounds.y + spacing*i/subdivs, bounds.width, 1 }; + GuiDrawrayRectangle(lineH, 0, BLANK, ((i%subdivs) == 0)? GuiFade(GetColor(color), RAYGUI_GRID_ALPHA*4) : GuiFade(GetColor(color), RAYGUI_GRID_ALPHA)); } } @@ -4171,10 +4171,10 @@ void GuiLoadStyleDefault(void) guiFont = GetFontDefault(); // NOTE: Default raylib font character 95 is a white square - Rectangle whiteChar = guiFont.recs[95]; + rayRectangle whiteChar = guiFont.recs[95]; - // NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding on MSAA filtering - SetShapesTexture(guiFont.texture, RAYGUI_CLITERAL(Rectangle){ whiteChar.x + 1, whiteChar.y + 1, whiteChar.width - 2, whiteChar.height - 2 }); + // NOTE: We set up a 1px padding on char rayRectangle to avoid pixel bleeding on MSAA filtering + SetShapesTexture(guiFont.texture, RAYGUI_CLITERAL(rayRectangle){ whiteChar.x + 1, whiteChar.y + 1, whiteChar.width - 2, whiteChar.height - 2 }); } } @@ -4289,7 +4289,7 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName) return guiIconsName; } -// Draw selected icon using rectangles pixel-by-pixel +// Draw selected icon using rayRectangles pixel-by-pixel void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color) { #define BIT_CHECK(a,b) ((a) & (1u<<(b))) @@ -4301,7 +4301,7 @@ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color) if (BIT_CHECK(guiIconsPtr[iconId*RAYGUI_ICON_DATA_ELEMENTS + i], k)) { #if !defined(RAYGUI_STANDALONE) - GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ (float)posX + (k%RAYGUI_ICON_SIZE)*pixelSize, (float)posY + y*pixelSize, (float)pixelSize, (float)pixelSize }, 0, BLANK, color); + GuiDrawrayRectangle(RAYGUI_CLITERAL(rayRectangle){ (float)posX + (k%RAYGUI_ICON_SIZE)*pixelSize, (float)posY + y*pixelSize, (float)pixelSize, (float)pixelSize }, 0, BLANK, color); #endif } @@ -4384,9 +4384,9 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) memcpy(&fontType, fileDataPtr + 4 + 4, sizeof(int)); fileDataPtr += 12; - // Load font white rectangle - Rectangle fontWhiteRec = { 0 }; - memcpy(&fontWhiteRec, fileDataPtr, sizeof(Rectangle)); + // Load font white rayRectangle + rayRectangle fontWhiteRec = { 0 }; + memcpy(&fontWhiteRec, fileDataPtr, sizeof(rayRectangle)); fileDataPtr += 16; // Load font image parameters @@ -4435,7 +4435,7 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) if (font.texture.id != 0) { // Load font recs data - int recsDataSize = font.glyphCount*sizeof(Rectangle); + int recsDataSize = font.glyphCount*sizeof(rayRectangle); int recsDataCompressedSize = 0; // WARNING: Version 400 adds the compression size parameter @@ -4455,7 +4455,7 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) fileDataPtr += recsDataCompressedSize; int recsDataUncompSize = 0; - font.recs = (Rectangle *)DecompressData(recsDataCompressed, recsDataCompressedSize, &recsDataUncompSize); + font.recs = (rayRectangle *)DecompressData(recsDataCompressed, recsDataCompressedSize, &recsDataUncompSize); // Security check, data uncompressed size must match the expected original data size if (recsDataUncompSize != recsDataSize) RAYGUI_LOG("WARNING: Uncompressed font recs data could be corrupted"); @@ -4465,11 +4465,11 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) else { // Recs data is uncompressed - font.recs = (Rectangle *)RAYGUI_CALLOC(font.glyphCount, sizeof(Rectangle)); + font.recs = (rayRectangle *)RAYGUI_CALLOC(font.glyphCount, sizeof(rayRectangle)); for (int i = 0; i < font.glyphCount; i++) { - memcpy(&font.recs[i], fileDataPtr, sizeof(Rectangle)); - fileDataPtr += sizeof(Rectangle); + memcpy(&font.recs[i], fileDataPtr, sizeof(rayRectangle)); + fileDataPtr += sizeof(rayRectangle); } } @@ -4533,7 +4533,7 @@ static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize) GuiSetFont(font); - // Set font texture source rectangle to be used as white texture to draw shapes + // Set font texture source rayRectangle to be used as white texture to draw shapes // NOTE: It makes possible to draw shapes and text (full UI) in a single draw call if ((fontWhiteRec.x > 0) && (fontWhiteRec.y > 0) && @@ -4607,9 +4607,9 @@ static int GetTextWidth(const char *text) } // Get text bounds considering control bounds -static Rectangle GetTextBounds(int control, Rectangle bounds) +static rayRectangle GetTextBounds(int control, rayRectangle bounds) { - Rectangle textBounds = bounds; + rayRectangle textBounds = bounds; textBounds.x = bounds.x + GuiGetStyle(control, BORDER_WIDTH); textBounds.y = bounds.y + GuiGetStyle(control, BORDER_WIDTH) + GuiGetStyle(control, TEXT_PADDING); @@ -4734,7 +4734,7 @@ static float GetNextSpaceWidth(const char *text, int *nextSpaceIndex) } // Gui draw text using default font -static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, Color tint) +static void GuiDrawText(const char *text, rayRectangle textBounds, int alignment, Color tint) { #define TEXT_VALIGN_PIXEL_OFFSET(h) ((int)h%2) // Vertical alignment for pixel perfect @@ -4907,35 +4907,35 @@ static void GuiDrawText(const char *text, Rectangle textBounds, int alignment, C } #if defined(RAYGUI_DEBUG_TEXT_BOUNDS) - GuiDrawRectangle(textBounds, 0, WHITE, Fade(BLUE, 0.4f)); + GuiDrawrayRectangle(textBounds, 0, WHITE, Fade(BLUE, 0.4f)); #endif } -// Gui draw rectangle using default raygui plain style with borders -static void GuiDrawRectangle(Rectangle rec, int borderWidth, Color borderColor, Color color) +// Gui draw rayRectangle using default raygui plain style with borders +static void GuiDrawrayRectangle(rayRectangle rec, int borderWidth, Color borderColor, Color color) { if (color.a > 0) { - // Draw rectangle filled with color - DrawRectangle((int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, GuiFade(color, guiAlpha)); + // Draw rayRectangle filled with color + DrawrayRectangle((int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, GuiFade(color, guiAlpha)); } if (borderWidth > 0) { - // Draw rectangle border lines with color - DrawRectangle((int)rec.x, (int)rec.y, (int)rec.width, borderWidth, GuiFade(borderColor, guiAlpha)); - DrawRectangle((int)rec.x, (int)rec.y + borderWidth, borderWidth, (int)rec.height - 2*borderWidth, GuiFade(borderColor, guiAlpha)); - DrawRectangle((int)rec.x + (int)rec.width - borderWidth, (int)rec.y + borderWidth, borderWidth, (int)rec.height - 2*borderWidth, GuiFade(borderColor, guiAlpha)); - DrawRectangle((int)rec.x, (int)rec.y + (int)rec.height - borderWidth, (int)rec.width, borderWidth, GuiFade(borderColor, guiAlpha)); + // Draw rayRectangle border lines with color + DrawrayRectangle((int)rec.x, (int)rec.y, (int)rec.width, borderWidth, GuiFade(borderColor, guiAlpha)); + DrawrayRectangle((int)rec.x, (int)rec.y + borderWidth, borderWidth, (int)rec.height - 2*borderWidth, GuiFade(borderColor, guiAlpha)); + DrawrayRectangle((int)rec.x + (int)rec.width - borderWidth, (int)rec.y + borderWidth, borderWidth, (int)rec.height - 2*borderWidth, GuiFade(borderColor, guiAlpha)); + DrawrayRectangle((int)rec.x, (int)rec.y + (int)rec.height - borderWidth, (int)rec.width, borderWidth, GuiFade(borderColor, guiAlpha)); } #if defined(RAYGUI_DEBUG_RECS_BOUNDS) - DrawRectangle((int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, Fade(RED, 0.4f)); + DrawrayRectangle((int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, Fade(RED, 0.4f)); #endif } // Draw tooltip using control bounds -static void GuiTooltip(Rectangle controlRec) +static void GuiTooltip(rayRectangle controlRec) { if (!guiLocked && guiTooltip && (guiTooltipPtr != NULL) && !guiSliderDragging) { @@ -4943,13 +4943,13 @@ static void GuiTooltip(Rectangle controlRec) if ((controlRec.x + textSize.x + 16) > GetScreenWidth()) controlRec.x -= (textSize.x + 16 - controlRec.width); - GuiPanel(RAYGUI_CLITERAL(Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, NULL); + GuiPanel(RAYGUI_CLITERAL(rayRectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, NULL); int textPadding = GuiGetStyle(LABEL, TEXT_PADDING); int textAlignment = GuiGetStyle(LABEL, TEXT_ALIGNMENT); GuiSetStyle(LABEL, TEXT_PADDING, 0); GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); - GuiLabel(RAYGUI_CLITERAL(Rectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, guiTooltipPtr); + GuiLabel(RAYGUI_CLITERAL(rayRectangle){ controlRec.x, controlRec.y + controlRec.height + 4, textSize.x + 16, GuiGetStyle(DEFAULT, TEXT_SIZE) + 8.f }, guiTooltipPtr); GuiSetStyle(LABEL, TEXT_ALIGNMENT, textAlignment); GuiSetStyle(LABEL, TEXT_PADDING, textPadding); } @@ -5137,7 +5137,7 @@ static Vector3 ConvertHSVtoRGB(Vector3 hsv) } // Scroll bar control (used by GuiScrollPanel()) -static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) +static int GuiScrollBar(rayRectangle bounds, int value, int minValue, int maxValue) { GuiState state = guiState; @@ -5150,14 +5150,14 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) (int)bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH)) : 0; // Arrow buttons [<] [>] [∧] [∨] - Rectangle arrowUpLeft = { 0 }; - Rectangle arrowDownRight = { 0 }; + rayRectangle arrowUpLeft = { 0 }; + rayRectangle arrowDownRight = { 0 }; // Actual area of the scrollbar excluding the arrow buttons - Rectangle scrollbar = { 0 }; + rayRectangle scrollbar = { 0 }; // Slider bar that moves --[///]----- - Rectangle slider = { 0 }; + rayRectangle slider = { 0 }; // Normalize value if (value > maxValue) value = maxValue; @@ -5166,20 +5166,20 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) const int valueRange = maxValue - minValue; int sliderSize = GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE); - // Calculate rectangles for all of the components - arrowUpLeft = RAYGUI_CLITERAL(Rectangle){ + // Calculate rayRectangles for all of the components + arrowUpLeft = RAYGUI_CLITERAL(rayRectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize }; if (isVertical) { - arrowDownRight = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + bounds.height - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize }; - scrollbar = RAYGUI_CLITERAL(Rectangle){ bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), arrowUpLeft.y + arrowUpLeft.height, bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)), bounds.height - arrowUpLeft.height - arrowDownRight.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) }; + arrowDownRight = RAYGUI_CLITERAL(rayRectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + bounds.height - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize }; + scrollbar = RAYGUI_CLITERAL(rayRectangle){ bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), arrowUpLeft.y + arrowUpLeft.height, bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)), bounds.height - arrowUpLeft.height - arrowDownRight.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) }; // Make sure the slider won't get outside of the scrollbar sliderSize = (sliderSize >= scrollbar.height)? ((int)scrollbar.height - 2) : sliderSize; - slider = RAYGUI_CLITERAL(Rectangle){ + slider = RAYGUI_CLITERAL(rayRectangle){ bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), scrollbar.y + (int)(((float)(value - minValue)/valueRange)*(scrollbar.height - sliderSize)), bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING)), @@ -5187,12 +5187,12 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) } else // horizontal { - arrowDownRight = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + bounds.width - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize }; - scrollbar = RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x + arrowUpLeft.width, bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), bounds.width - arrowUpLeft.width - arrowDownRight.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)) }; + arrowDownRight = RAYGUI_CLITERAL(rayRectangle){ (float)bounds.x + bounds.width - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize }; + scrollbar = RAYGUI_CLITERAL(rayRectangle){ arrowUpLeft.x + arrowUpLeft.width, bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), bounds.width - arrowUpLeft.width - arrowDownRight.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)) }; // Make sure the slider won't get outside of the scrollbar sliderSize = (sliderSize >= scrollbar.width)? ((int)scrollbar.width - 2) : sliderSize; - slider = RAYGUI_CLITERAL(Rectangle){ + slider = RAYGUI_CLITERAL(rayRectangle){ scrollbar.x + (int)(((float)(value - minValue)/valueRange)*(scrollbar.width - sliderSize)), bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), (float)sliderSize, @@ -5222,7 +5222,7 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) else { guiSliderDragging = false; - guiSliderActive = RAYGUI_CLITERAL(Rectangle){ 0, 0, 0, 0 }; + guiSliderActive = RAYGUI_CLITERAL(rayRectangle){ 0, 0, 0, 0 }; } } else if (CheckCollisionPointRec(mousePoint, bounds)) @@ -5275,27 +5275,27 @@ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) // Draw control //-------------------------------------------------------------------- - GuiDrawRectangle(bounds, GuiGetStyle(SCROLLBAR, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BORDER_COLOR_DISABLED))); // Draw the background + GuiDrawrayRectangle(bounds, GuiGetStyle(SCROLLBAR, BORDER_WIDTH), GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), GetColor(GuiGetStyle(DEFAULT, BORDER_COLOR_DISABLED))); // Draw the background - GuiDrawRectangle(scrollbar, 0, BLANK, GetColor(GuiGetStyle(BUTTON, BASE_COLOR_NORMAL))); // Draw the scrollbar active area background - GuiDrawRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BORDER + state*3))); // Draw the slider bar + GuiDrawrayRectangle(scrollbar, 0, BLANK, GetColor(GuiGetStyle(BUTTON, BASE_COLOR_NORMAL))); // Draw the scrollbar active area background + GuiDrawrayRectangle(slider, 0, BLANK, GetColor(GuiGetStyle(SLIDER, BORDER + state*3))); // Draw the slider bar // Draw arrows (using icon if available) if (GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE)) { #if defined(RAYGUI_NO_ICONS) GuiDrawText(isVertical? "^" : "<", - RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, + RAYGUI_CLITERAL(rayRectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3)))); GuiDrawText(isVertical? "v" : ">", - RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, + RAYGUI_CLITERAL(rayRectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3)))); #else GuiDrawText(isVertical? "#121#" : "#118#", - RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, + RAYGUI_CLITERAL(rayRectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3))); // ICON_ARROW_UP_FILL / ICON_ARROW_LEFT_FILL GuiDrawText(isVertical? "#120#" : "#119#", - RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, + RAYGUI_CLITERAL(rayRectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height }, TEXT_ALIGN_CENTER, GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3))); // ICON_ARROW_DOWN_FILL / ICON_ARROW_RIGHT_FILL #endif } @@ -5336,8 +5336,8 @@ static int ColorToInt(Color color) return (((int)color.r << 24) | ((int)color.g << 16) | ((int)color.b << 8) | (int)color.a); } -// Check if point is inside rectangle -static bool CheckCollisionPointRec(Vector2 point, Rectangle rec) +// Check if point is inside rayRectangle +static bool CheckCollisionPointRec(Vector2 point, rayRectangle rec) { bool collision = false; @@ -5364,12 +5364,12 @@ static const char *TextFormat(const char *text, ...) return buffer; } -// Draw rectangle with vertical gradient fill color +// Draw rayRectangle with vertical gradient fill color // NOTE: This function is only used by GuiColorPicker() -static void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2) +static void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2) { - Rectangle bounds = { (float)posX, (float)posY, (float)width, (float)height }; - DrawRectangleGradientEx(bounds, color1, color2, color2, color1); + rayRectangle bounds = { (float)posX, (float)posY, (float)width, (float)height }; + DrawrayRectangleGradientEx(bounds, color1, color2, color2, color1); } // Split string into multiple strings diff --git a/examples/shapes/shapes_basic_shapes.c b/examples/shapes/shapes_basic_shapes.c index 40056b4e7..c7798bacf 100644 --- a/examples/shapes/shapes_basic_shapes.c +++ b/examples/shapes/shapes_basic_shapes.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [shapes] example - Draw basic shapes 2d (rectangle, circle, line...) +* raylib [shapes] example - Draw basic shapes 2d (rayRectangle, circle, line...) * * Example originally created with raylib 1.0, last time updated with raylib 4.2 * @@ -51,10 +51,10 @@ int main(void) DrawCircleGradient(screenWidth/5, 220, 60, GREEN, SKYBLUE); DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE); - // Rectangle shapes and lines - DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED); - DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD); - DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines + // rayRectangle shapes and lines + DrawrayRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED); + DrawrayRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD); + DrawrayRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines // Triangle shapes and lines DrawTriangle((Vector2){ screenWidth/4.0f *3.0f, 80.0f }, @@ -79,7 +79,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_bouncing_ball.c b/examples/shapes/shapes_bouncing_ball.c index 38fade60a..9c280c38e 100644 --- a/examples/shapes/shapes_bouncing_ball.c +++ b/examples/shapes/shapes_bouncing_ball.c @@ -75,7 +75,7 @@ int main(void) // De-Initialization //--------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //---------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_collision_area.c b/examples/shapes/shapes_collision_area.c index 752d4e79a..02008cfa7 100644 --- a/examples/shapes/shapes_collision_area.c +++ b/examples/shapes/shapes_collision_area.c @@ -28,13 +28,13 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [shapes] example - collision area"); // Box A: Moving box - Rectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 }; + rayRectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 }; int boxASpeedX = 4; // Box B: Mouse moved box - Rectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 }; + rayRectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 }; - Rectangle boxCollision = { 0 }; // Collision rectangle + rayRectangle boxCollision = { 0 }; // Collision rayRectangle int screenUpperLimit = 40; // Top menu limits @@ -69,7 +69,7 @@ int main(void) // Check boxes collision collision = CheckCollisionRecs(boxA, boxB); - // Get collision rectangle (only on collision) + // Get collision rayRectangle (only on collision) if (collision) boxCollision = GetCollisionRec(boxA, boxB); // Pause Box A movement @@ -82,15 +82,15 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK); + DrawrayRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK); - DrawRectangleRec(boxA, GOLD); - DrawRectangleRec(boxB, BLUE); + DrawrayRectangleRec(boxA, GOLD); + DrawrayRectangleRec(boxB, BLUE); if (collision) { // Draw collision area - DrawRectangleRec(boxCollision, LIME); + DrawrayRectangleRec(boxCollision, LIME); // Draw collision message DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK); @@ -110,7 +110,7 @@ int main(void) // De-Initialization //--------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //---------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_colors_palette.c b/examples/shapes/shapes_colors_palette.c index d55782550..7d37c932f 100644 --- a/examples/shapes/shapes_colors_palette.c +++ b/examples/shapes/shapes_colors_palette.c @@ -37,9 +37,9 @@ int main(void) "DARKBROWN", "GRAY", "RED", "GOLD", "LIME", "BLUE", "VIOLET", "BROWN", "LIGHTGRAY", "PINK", "YELLOW", "GREEN", "SKYBLUE", "PURPLE", "BEIGE" }; - Rectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; // Rectangles array + rayRectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; // rayRectangles array - // Fills colorsRecs data (for every rectangle) + // Fills colorsRecs data (for every rayRectangle) for (int i = 0; i < MAX_COLORS_COUNT; i++) { colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7); @@ -78,14 +78,14 @@ int main(void) DrawText("raylib colors palette", 28, 42, 20, BLACK); DrawText("press SPACE to see all colors", GetScreenWidth() - 180, GetScreenHeight() - 40, 10, GRAY); - for (int i = 0; i < MAX_COLORS_COUNT; i++) // Draw all rectangles + for (int i = 0; i < MAX_COLORS_COUNT; i++) // Draw all rayRectangles { - DrawRectangleRec(colorsRecs[i], Fade(colors[i], colorState[i]? 0.6f : 1.0f)); + DrawrayRectangleRec(colorsRecs[i], Fade(colors[i], colorState[i]? 0.6f : 1.0f)); if (IsKeyDown(KEY_SPACE) || colorState[i]) { - DrawRectangle((int)colorsRecs[i].x, (int)(colorsRecs[i].y + colorsRecs[i].height - 26), (int)colorsRecs[i].width, 20, BLACK); - DrawRectangleLinesEx(colorsRecs[i], 6, Fade(BLACK, 0.3f)); + DrawrayRectangle((int)colorsRecs[i].x, (int)(colorsRecs[i].y + colorsRecs[i].height - 26), (int)colorsRecs[i].width, 20, BLACK); + DrawrayRectangleLinesEx(colorsRecs[i], 6, Fade(BLACK, 0.3f)); DrawText(colorNames[i], (int)(colorsRecs[i].x + colorsRecs[i].width - MeasureText(colorNames[i], 10) - 12), (int)(colorsRecs[i].y + colorsRecs[i].height - 20), 10, colors[i]); } @@ -97,7 +97,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_draw_circle_sector.c b/examples/shapes/shapes_draw_circle_sector.c index 90e8e6a58..485920bc7 100644 --- a/examples/shapes/shapes_draw_circle_sector.c +++ b/examples/shapes/shapes_draw_circle_sector.c @@ -56,18 +56,18 @@ int main(void) ClearBackground(RAYWHITE); DrawLine(500, 0, 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f)); - DrawRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); + DrawrayRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); DrawCircleSector(center, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.3f)); DrawCircleSectorLines(center, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.6f)); // Draw GUI controls //------------------------------------------------------------------------------ - GuiSliderBar((Rectangle){ 600, 40, 120, 20}, "StartAngle", NULL, &startAngle, 0, 720); - GuiSliderBar((Rectangle){ 600, 70, 120, 20}, "EndAngle", NULL, &endAngle, 0, 720); + GuiSliderBar((rayRectangle){ 600, 40, 120, 20}, "StartAngle", NULL, &startAngle, 0, 720); + GuiSliderBar((rayRectangle){ 600, 70, 120, 20}, "EndAngle", NULL, &endAngle, 0, 720); - GuiSliderBar((Rectangle){ 600, 140, 120, 20}, "Radius", NULL, &outerRadius, 0, 200); - GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", NULL, &segments, 0, 100); + GuiSliderBar((rayRectangle){ 600, 140, 120, 20}, "Radius", NULL, &outerRadius, 0, 200); + GuiSliderBar((rayRectangle){ 600, 170, 120, 20}, "Segments", NULL, &segments, 0, 100); //------------------------------------------------------------------------------ minSegments = truncf(ceilf((endAngle - startAngle) / 90)); @@ -81,7 +81,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_draw_rectangle_rounded.c b/examples/shapes/shapes_draw_rectangle_rounded.c index a10e3c848..f0289babf 100644 --- a/examples/shapes/shapes_draw_rectangle_rounded.c +++ b/examples/shapes/shapes_draw_rectangle_rounded.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [shapes] example - draw rectangle rounded (with gui options) +* raylib [shapes] example - draw rayRectangle rounded (with gui options) * * Example originally created with raylib 2.5, last time updated with raylib 2.5 * @@ -28,7 +28,7 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw rectangle rounded"); + InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw rayRectangle rounded"); float roundness = 0.2f; float width = 200.0f; @@ -48,7 +48,7 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - Rectangle rec = { ((float)GetScreenWidth() - width - 250)/2, (GetScreenHeight() - height)/2.0f, (float)width, (float)height }; + rayRectangle rec = { ((float)GetScreenWidth() - width - 250)/2, (GetScreenHeight() - height)/2.0f, (float)width, (float)height }; //---------------------------------------------------------------------------------- // Draw @@ -58,23 +58,23 @@ int main(void) ClearBackground(RAYWHITE); DrawLine(560, 0, 560, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f)); - DrawRectangle(560, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); + DrawrayRectangle(560, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); - if (drawRect) DrawRectangleRec(rec, Fade(GOLD, 0.6f)); - if (drawRoundedRect) DrawRectangleRounded(rec, roundness, (int)segments, Fade(MAROON, 0.2f)); - if (drawRoundedLines) DrawRectangleRoundedLines(rec, roundness, (int)segments, lineThick, Fade(MAROON, 0.4f)); + if (drawRect) DrawrayRectangleRec(rec, Fade(GOLD, 0.6f)); + if (drawRoundedRect) DrawrayRectangleRounded(rec, roundness, (int)segments, Fade(MAROON, 0.2f)); + if (drawRoundedLines) DrawrayRectangleRoundedLines(rec, roundness, (int)segments, lineThick, Fade(MAROON, 0.4f)); // Draw GUI controls //------------------------------------------------------------------------------ - GuiSliderBar((Rectangle){ 640, 40, 105, 20 }, "Width", NULL, &width, 0, (float)GetScreenWidth() - 300); - GuiSliderBar((Rectangle){ 640, 70, 105, 20 }, "Height", NULL, &height, 0, (float)GetScreenHeight() - 50); - GuiSliderBar((Rectangle){ 640, 140, 105, 20 }, "Roundness", NULL, &roundness, 0.0f, 1.0f); - GuiSliderBar((Rectangle){ 640, 170, 105, 20 }, "Thickness", NULL, &lineThick, 0, 20); - GuiSliderBar((Rectangle){ 640, 240, 105, 20}, "Segments", NULL, &segments, 0, 60); + GuiSliderBar((rayRectangle){ 640, 40, 105, 20 }, "Width", NULL, &width, 0, (float)GetScreenWidth() - 300); + GuiSliderBar((rayRectangle){ 640, 70, 105, 20 }, "Height", NULL, &height, 0, (float)GetScreenHeight() - 50); + GuiSliderBar((rayRectangle){ 640, 140, 105, 20 }, "Roundness", NULL, &roundness, 0.0f, 1.0f); + GuiSliderBar((rayRectangle){ 640, 170, 105, 20 }, "Thickness", NULL, &lineThick, 0, 20); + GuiSliderBar((rayRectangle){ 640, 240, 105, 20}, "Segments", NULL, &segments, 0, 60); - GuiCheckBox((Rectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", &drawRoundedRect); - GuiCheckBox((Rectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", &drawRoundedLines); - GuiCheckBox((Rectangle){ 640, 380, 20, 20}, "DrawRect", &drawRect); + GuiCheckBox((rayRectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", &drawRoundedRect); + GuiCheckBox((rayRectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", &drawRoundedLines); + GuiCheckBox((rayRectangle){ 640, 380, 20, 20}, "DrawRect", &drawRect); //------------------------------------------------------------------------------ DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 640, 280, 10, (segments >= 4)? MAROON : DARKGRAY); @@ -87,7 +87,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_draw_ring.c b/examples/shapes/shapes_draw_ring.c index 47327b7ad..d372ea8b7 100644 --- a/examples/shapes/shapes_draw_ring.c +++ b/examples/shapes/shapes_draw_ring.c @@ -61,7 +61,7 @@ int main(void) ClearBackground(RAYWHITE); DrawLine(500, 0, 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f)); - DrawRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); + DrawrayRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f)); if (drawRing) DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.3f)); if (drawRingLines) DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, (int)segments, Fade(BLACK, 0.4f)); @@ -69,17 +69,17 @@ int main(void) // Draw GUI controls //------------------------------------------------------------------------------ - GuiSliderBar((Rectangle){ 600, 40, 120, 20 }, "StartAngle", NULL, &startAngle, -450, 450); - GuiSliderBar((Rectangle){ 600, 70, 120, 20 }, "EndAngle", NULL, &endAngle, -450, 450); + GuiSliderBar((rayRectangle){ 600, 40, 120, 20 }, "StartAngle", NULL, &startAngle, -450, 450); + GuiSliderBar((rayRectangle){ 600, 70, 120, 20 }, "EndAngle", NULL, &endAngle, -450, 450); - GuiSliderBar((Rectangle){ 600, 140, 120, 20 }, "InnerRadius", NULL, &innerRadius, 0, 100); - GuiSliderBar((Rectangle){ 600, 170, 120, 20 }, "OuterRadius", NULL, &outerRadius, 0, 200); + GuiSliderBar((rayRectangle){ 600, 140, 120, 20 }, "InnerRadius", NULL, &innerRadius, 0, 100); + GuiSliderBar((rayRectangle){ 600, 170, 120, 20 }, "OuterRadius", NULL, &outerRadius, 0, 200); - GuiSliderBar((Rectangle){ 600, 240, 120, 20 }, "Segments", NULL, &segments, 0, 100); + GuiSliderBar((rayRectangle){ 600, 240, 120, 20 }, "Segments", NULL, &segments, 0, 100); - GuiCheckBox((Rectangle){ 600, 320, 20, 20 }, "Draw Ring", &drawRing); - GuiCheckBox((Rectangle){ 600, 350, 20, 20 }, "Draw RingLines", &drawRingLines); - GuiCheckBox((Rectangle){ 600, 380, 20, 20 }, "Draw CircleLines", &drawCircleLines); + GuiCheckBox((rayRectangle){ 600, 320, 20, 20 }, "Draw Ring", &drawRing); + GuiCheckBox((rayRectangle){ 600, 350, 20, 20 }, "Draw RingLines", &drawRingLines); + GuiCheckBox((rayRectangle){ 600, 380, 20, 20 }, "Draw CircleLines", &drawCircleLines); //------------------------------------------------------------------------------ int minSegments = (int)ceilf((endAngle - startAngle)/90); @@ -93,7 +93,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_easings_ball_anim.c b/examples/shapes/shapes_easings_ball_anim.c index 866ec0971..03687a008 100644 --- a/examples/shapes/shapes_easings_ball_anim.c +++ b/examples/shapes/shapes_easings_ball_anim.c @@ -97,7 +97,7 @@ int main(void) ClearBackground(RAYWHITE); - if (state >= 2) DrawRectangle(0, 0, screenWidth, screenHeight, GREEN); + if (state >= 2) DrawrayRectangle(0, 0, screenWidth, screenHeight, GREEN); DrawCircle(ballPositionX, 200, (float)ballRadius, Fade(RED, 1.0f - ballAlpha)); if (state == 3) DrawText("PRESS [ENTER] TO PLAY AGAIN!", 240, 200, 20, BLACK); @@ -108,7 +108,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_easings_box_anim.c b/examples/shapes/shapes_easings_box_anim.c index a854bf6c3..5ea7c29cb 100644 --- a/examples/shapes/shapes_easings_box_anim.c +++ b/examples/shapes/shapes_easings_box_anim.c @@ -28,7 +28,7 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings box anim"); // Box variables to be animated with easings - Rectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 }; + rayRectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 }; float rotation = 0.0f; float alpha = 1.0f; @@ -71,7 +71,7 @@ int main(void) state = 2; } } break; - case 2: // Rotate horizontal bar rectangle + case 2: // Rotate horizontal bar rayRectangle { framesCounter++; rotation = EaseQuadOut((float)framesCounter, 0.0f, 270.0f, 240); @@ -110,7 +110,7 @@ int main(void) // Reset animation at any moment if (IsKeyPressed(KEY_SPACE)) { - rec = (Rectangle){ GetScreenWidth()/2.0f, -100, 100, 100 }; + rec = (rayRectangle){ GetScreenWidth()/2.0f, -100, 100, 100 }; rotation = 0.0f; alpha = 1.0f; state = 0; @@ -124,7 +124,7 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectanglePro(rec, (Vector2){ rec.width/2, rec.height/2 }, rotation, Fade(BLACK, alpha)); + DrawrayRectanglePro(rec, (Vector2){ rec.width/2, rec.height/2 }, rotation, Fade(BLACK, alpha)); DrawText("PRESS [SPACE] TO RESET BOX ANIMATION!", 10, GetScreenHeight() - 25, 20, LIGHTGRAY); @@ -134,7 +134,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_easings_rectangle_array.c b/examples/shapes/shapes_easings_rectangle_array.c index 03916f5b4..38dc4d8aa 100644 --- a/examples/shapes/shapes_easings_rectangle_array.c +++ b/examples/shapes/shapes_easings_rectangle_array.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [shapes] example - easings rectangle array +* raylib [shapes] example - easings rayRectangle array * * NOTE: This example requires 'easings.h' library, provided on raylib/src. Just copy * the library to same directory as example or make sure it's available on include path. @@ -36,9 +36,9 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings rectangle array"); + InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings rayRectangle array"); - Rectangle recs[MAX_RECS_X*MAX_RECS_Y] = { 0 }; + rayRectangle recs[MAX_RECS_X*MAX_RECS_Y] = { 0 }; for (int y = 0; y < MAX_RECS_Y; y++) { @@ -53,7 +53,7 @@ int main(void) float rotation = 0.0f; int framesCounter = 0; - int state = 0; // Rectangles animation state: 0-Playing, 1-Finished + int state = 0; // rayRectangles animation state: 0-Playing, 1-Finished SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- @@ -105,7 +105,7 @@ int main(void) { for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++) { - DrawRectanglePro(recs[i], (Vector2){ recs[i].width/2, recs[i].height/2 }, rotation, RED); + DrawrayRectanglePro(recs[i], (Vector2){ recs[i].width/2, recs[i].height/2 }, rotation, RED); } } else if (state == 1) DrawText("PRESS [SPACE] TO PLAY AGAIN!", 240, 200, 20, GRAY); @@ -116,7 +116,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_following_eyes.c b/examples/shapes/shapes_following_eyes.c index 2137d797a..12b308589 100644 --- a/examples/shapes/shapes_following_eyes.c +++ b/examples/shapes/shapes_following_eyes.c @@ -102,7 +102,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_lines_bezier.c b/examples/shapes/shapes_lines_bezier.c index aaad68047..9efb73333 100644 --- a/examples/shapes/shapes_lines_bezier.c +++ b/examples/shapes/shapes_lines_bezier.c @@ -78,7 +78,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_logo_raylib.c b/examples/shapes/shapes_logo_raylib.c index 4f625c2c8..8319d2299 100644 --- a/examples/shapes/shapes_logo_raylib.c +++ b/examples/shapes/shapes_logo_raylib.c @@ -42,8 +42,8 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK); - DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE); + DrawrayRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK); + DrawrayRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE); DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, BLACK); DrawText("this is NOT a texture!", 350, 370, 10, GRAY); @@ -54,7 +54,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_logo_raylib_anim.c b/examples/shapes/shapes_logo_raylib_anim.c index 5d6dd3538..682e71ddb 100644 --- a/examples/shapes/shapes_logo_raylib_anim.c +++ b/examples/shapes/shapes_logo_raylib_anim.c @@ -120,30 +120,30 @@ int main(void) if (state == 0) { - if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, BLACK); + if ((framesCounter/15)%2) DrawrayRectangle(logoPositionX, logoPositionY, 16, 16, BLACK); } else if (state == 1) { - DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK); - DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK); + DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK); + DrawrayRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK); } else if (state == 2) { - DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK); - DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK); + DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK); + DrawrayRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK); - DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK); - DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK); + DrawrayRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK); + DrawrayRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK); } else if (state == 3) { - DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha)); - DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha)); + DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha)); + DrawrayRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha)); - DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha)); - DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha)); + DrawrayRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha)); + DrawrayRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha)); - DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha)); + DrawrayRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha)); DrawText(TextSubtext("raylib", 0, lettersCount), GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(BLACK, alpha)); } @@ -158,7 +158,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_rectangle_scaling.c b/examples/shapes/shapes_rectangle_scaling.c index 18104b120..b65039d11 100644 --- a/examples/shapes/shapes_rectangle_scaling.c +++ b/examples/shapes/shapes_rectangle_scaling.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [shapes] example - rectangle scaling by mouse +* raylib [shapes] example - rayRectangle scaling by mouse * * Example originally created with raylib 2.5, last time updated with raylib 2.5 * @@ -27,9 +27,9 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rectangle scaling mouse"); + InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rayRectangle scaling mouse"); - Rectangle rec = { 100, 100, 200, 80 }; + rayRectangle rec = { 100, 100, 200, 80 }; Vector2 mousePosition = { 0 }; @@ -46,7 +46,7 @@ int main(void) //---------------------------------------------------------------------------------- mousePosition = GetMousePosition(); - if (CheckCollisionPointRec(mousePosition, (Rectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE })) + if (CheckCollisionPointRec(mousePosition, (rayRectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE })) { mouseScaleReady = true; if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) mouseScaleMode = true; @@ -78,13 +78,13 @@ int main(void) ClearBackground(RAYWHITE); - DrawText("Scale rectangle dragging from bottom-right corner!", 10, 10, 20, GRAY); + DrawText("Scale rayRectangle dragging from bottom-right corner!", 10, 10, 20, GRAY); - DrawRectangleRec(rec, Fade(GREEN, 0.5f)); + DrawrayRectangleRec(rec, Fade(GREEN, 0.5f)); if (mouseScaleReady) { - DrawRectangleLinesEx(rec, 1, RED); + DrawrayRectangleLinesEx(rec, 1, RED); DrawTriangle((Vector2){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height }, (Vector2){ rec.x + rec.width, rec.y + rec.height }, (Vector2){ rec.x + rec.width, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE }, RED); @@ -96,7 +96,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_splines_drawing.c b/examples/shapes/shapes_splines_drawing.c index 8df5f09f4..592d4a23e 100644 --- a/examples/shapes/shapes_splines_drawing.c +++ b/examples/shapes/shapes_splines_drawing.c @@ -224,15 +224,15 @@ int main(void) if (splineTypeEditMode) GuiLock(); // Draw spline config - GuiLabel((Rectangle){ 12, 62, 140, 24 }, TextFormat("Spline thickness: %i", (int)splineThickness)); - GuiSliderBar((Rectangle){ 12, 60 + 24, 140, 16 }, NULL, NULL, &splineThickness, 1.0f, 40.0f); + GuiLabel((rayRectangle){ 12, 62, 140, 24 }, TextFormat("Spline thickness: %i", (int)splineThickness)); + GuiSliderBar((rayRectangle){ 12, 60 + 24, 140, 16 }, NULL, NULL, &splineThickness, 1.0f, 40.0f); - GuiCheckBox((Rectangle){ 12, 110, 20, 20 }, "Show point helpers", &splineHelpersActive); + GuiCheckBox((rayRectangle){ 12, 110, 20, 20 }, "Show point helpers", &splineHelpersActive); GuiUnlock(); - GuiLabel((Rectangle){ 12, 10, 140, 24 }, "Spline type:"); - if (GuiDropdownBox((Rectangle){ 12, 8 + 24, 140, 28 }, "LINEAR;BSPLINE;CATMULLROM;BEZIER", &splineTypeActive, splineTypeEditMode)) splineTypeEditMode = !splineTypeEditMode; + GuiLabel((rayRectangle){ 12, 10, 140, 24 }, "Spline type:"); + if (GuiDropdownBox((rayRectangle){ 12, 8 + 24, 140, 28 }, "LINEAR;BSPLINE;CATMULLROM;BEZIER", &splineTypeActive, splineTypeEditMode)) splineTypeEditMode = !splineTypeEditMode; EndDrawing(); //---------------------------------------------------------------------------------- @@ -240,7 +240,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/shapes/shapes_top_down_lights.c b/examples/shapes/shapes_top_down_lights.c index f22cf3c17..1b37cec81 100644 --- a/examples/shapes/shapes_top_down_lights.c +++ b/examples/shapes/shapes_top_down_lights.c @@ -40,7 +40,7 @@ typedef struct LightInfo { Vector2 position; // Light position RenderTexture mask; // Alpha mask for the light float outerRadius; // The distance the light touches - Rectangle bounds; // A cached rectangle of the light bounds to help with culling + rayRectangle bounds; // A cached rayRectangle of the light bounds to help with culling ShadowGeometry shadows[MAX_SHADOWS]; int shadowCount; @@ -137,7 +137,7 @@ void SetupLight(int slot, float x, float y, float radius) } // See if a light needs to update it's mask -bool UpdateLight(int slot, Rectangle* boxes, int count) +bool UpdateLight(int slot, rayRectangle* boxes, int count) { if (!lights[slot].active || !lights[slot].dirty) return false; @@ -192,17 +192,17 @@ bool UpdateLight(int slot, Rectangle* boxes, int count) } // Set up some boxes -void SetupBoxes(Rectangle *boxes, int *count) +void SetupBoxes(rayRectangle *boxes, int *count) { - boxes[0] = (Rectangle){ 150,80, 40, 40 }; - boxes[1] = (Rectangle){ 1200, 700, 40, 40 }; - boxes[2] = (Rectangle){ 200, 600, 40, 40 }; - boxes[3] = (Rectangle){ 1000, 50, 40, 40 }; - boxes[4] = (Rectangle){ 500, 350, 40, 40 }; + boxes[0] = (rayRectangle){ 150,80, 40, 40 }; + boxes[1] = (rayRectangle){ 1200, 700, 40, 40 }; + boxes[2] = (rayRectangle){ 200, 600, 40, 40 }; + boxes[3] = (rayRectangle){ 1000, 50, 40, 40 }; + boxes[4] = (rayRectangle){ 500, 350, 40, 40 }; for (int i = 5; i < MAX_BOXES; i++) { - boxes[i] = (Rectangle){(float)GetRandomValue(0,GetScreenWidth()), (float)GetRandomValue(0,GetScreenHeight()), (float)GetRandomValue(10,100), (float)GetRandomValue(10,100) }; + boxes[i] = (rayRectangle){(float)GetRandomValue(0,GetScreenWidth()), (float)GetRandomValue(0,GetScreenHeight()), (float)GetRandomValue(10,100), (float)GetRandomValue(10,100) }; } *count = MAX_BOXES; @@ -222,7 +222,7 @@ int main(void) // Initialize our 'world' of boxes int boxCount = 0; - Rectangle boxes[MAX_BOXES] = { 0 }; + rayRectangle boxes[MAX_BOXES] = { 0 }; SetupBoxes(boxes, &boxCount); // Create a checkerboard ground texture @@ -282,7 +282,7 @@ int main(void) // Merge in all the light masks for (int i = 0; i < MAX_LIGHTS; i++) { - if (lights[i].active) DrawTextureRec(lights[i].mask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE); + if (lights[i].active) DrawTextureRec(lights[i].mask.texture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE); } rlDrawRenderBatchActive(); @@ -300,10 +300,10 @@ int main(void) ClearBackground(BLACK); // Draw the tile background - DrawTextureRec(backgroundTexture, (Rectangle){ 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, Vector2Zero(), WHITE); + DrawTextureRec(backgroundTexture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, Vector2Zero(), WHITE); // Overlay the shadows from all the lights - DrawTextureRec(lightMask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines? 0.75f : 1.0f)); + DrawTextureRec(lightMask.texture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines? 0.75f : 1.0f)); // Draw the lights for (int i = 0; i < MAX_LIGHTS; i++) @@ -320,9 +320,9 @@ int main(void) for (int b = 0; b < boxCount; b++) { - if (CheckCollisionRecs(boxes[b],lights[0].bounds)) DrawRectangleRec(boxes[b], PURPLE); + if (CheckCollisionRecs(boxes[b],lights[0].bounds)) DrawrayRectangleRec(boxes[b], PURPLE); - DrawRectangleLines((int)boxes[b].x, (int)boxes[b].y, (int)boxes[b].width, (int)boxes[b].height, DARKBLUE); + DrawrayRectangleLines((int)boxes[b].x, (int)boxes[b].y, (int)boxes[b].width, (int)boxes[b].height, DARKBLUE); } DrawText("(F1) Hide Shadow Volumes", 10, 50, 10, GREEN); @@ -349,7 +349,7 @@ int main(void) if (lights[i].active) UnloadRenderTexture(lights[i].mask); } - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_codepoints_loading.c b/examples/text/text_codepoints_loading.c index 376b4972a..650d560a8 100644 --- a/examples/text/text_codepoints_loading.c +++ b/examples/text/text_codepoints_loading.c @@ -94,7 +94,7 @@ int main(void) ClearBackground(RAYWHITE); - DrawRectangle(0, 0, GetScreenWidth(), 70, BLACK); + DrawrayRectangle(0, 0, GetScreenWidth(), 70, BLACK); DrawText(TextFormat("Total codepoints contained in provided text: %i", codepointCount), 10, 10, 20, GREEN); DrawText(TextFormat("Total codepoints required for font atlas (duplicates excluded): %i", codepointsNoDupsCount), 10, 40, 20, GREEN); @@ -102,7 +102,7 @@ int main(void) { // Draw generated font texture atlas containing provided codepoints DrawTexture(font.texture, 150, 100, BLACK); - DrawRectangleLines(150, 100, font.texture.width, font.texture.height, BLACK); + DrawrayRectangleLines(150, 100, font.texture.width, font.texture.height, BLACK); } else { @@ -120,7 +120,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadFont(font); // Unload font - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_draw_3d.c b/examples/text/text_draw_3d.c index 097e4fc67..a767e5852 100644 --- a/examples/text/text_draw_3d.c +++ b/examples/text/text_draw_3d.c @@ -441,7 +441,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- UnloadFont(font); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; @@ -458,14 +458,14 @@ static void DrawTextCodepoint3D(Font font, int codepoint, Vector3 position, floa int index = GetGlyphIndex(font, codepoint); float scale = fontSize/(float)font.baseSize; - // Character destination rectangle on screen + // Character destination rayRectangle on screen // NOTE: We consider charsPadding on drawing position.x += (float)(font.glyphs[index].offsetX - font.glyphPadding)/(float)font.baseSize*scale; position.z += (float)(font.glyphs[index].offsetY - font.glyphPadding)/(float)font.baseSize*scale; - // Character source rectangle from font texture atlas + // Character source rayRectangle from font texture atlas // NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects - Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding, + rayRectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding, font.recs[index].width + 2.0f*font.glyphPadding, font.recs[index].height + 2.0f*font.glyphPadding }; float width = (float)(font.recs[index].width + 2.0f*font.glyphPadding)/(float)font.baseSize*scale; diff --git a/examples/text/text_font_filters.c b/examples/text/text_font_filters.c index e6756713c..c9ecd857b 100644 --- a/examples/text/text_font_filters.c +++ b/examples/text/text_font_filters.c @@ -111,9 +111,9 @@ int main(void) DrawTextEx(font, msg, fontPosition, fontSize, 0, BLACK); // TODO: It seems texSize measurement is not accurate due to chars offsets... - //DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED); + //DrawrayRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED); - DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY); + DrawrayRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY); 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); @@ -130,7 +130,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadFont(font); // Font unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_font_loading.c b/examples/text/text_font_loading.c index a3ff988e9..922a7e2d7 100644 --- a/examples/text/text_font_loading.c +++ b/examples/text/text_font_loading.c @@ -91,7 +91,7 @@ int main(void) UnloadFont(fontBm); // AngelCode Font unloading UnloadFont(fontTtf); // TTF Font unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c index 40a3fa4d7..2c6b31c1b 100644 --- a/examples/text/text_font_sdf.c +++ b/examples/text/text_font_sdf.c @@ -139,7 +139,7 @@ int main(void) UnloadShader(shader); // Unload SDF shader - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_font_spritefont.c b/examples/text/text_font_spritefont.c index b5df2d0dc..12c11545e 100644 --- a/examples/text/text_font_spritefont.c +++ b/examples/text/text_font_spritefont.c @@ -5,9 +5,9 @@ * NOTE: Sprite fonts should be generated following this conventions: * * - Characters must be ordered starting with character 32 (Space) -* - Every character must be contained within the same Rectangle height +* - Every character must be contained within the same rayRectangle height * - Every character and every line must be separated by the same distance (margin/padding) -* - Rectangles must be defined by a MAGENTA color background +* - rayRectangles must be defined by a MAGENTA color background * * Following those constraints, a font can be provided just by an image, * this is quite handy to avoid additional font descriptor files (like BMFonts use). @@ -84,7 +84,7 @@ int main(void) UnloadFont(font2); // Font unloading UnloadFont(font3); // Font unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_format_text.c b/examples/text/text_format_text.c index 6b1b0456f..2bf8597d4 100644 --- a/examples/text/text_format_text.c +++ b/examples/text/text_format_text.c @@ -60,7 +60,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_input_box.c b/examples/text/text_input_box.c index f3923c1e9..fb678a0e4 100644 --- a/examples/text/text_input_box.c +++ b/examples/text/text_input_box.c @@ -30,7 +30,7 @@ int main(void) char name[MAX_INPUT_CHARS + 1] = "\0"; // NOTE: One extra space required for null terminator char '\0' int letterCount = 0; - Rectangle textBox = { screenWidth/2.0f - 100, 180, 225, 50 }; + rayRectangle textBox = { screenWidth/2.0f - 100, 180, 225, 50 }; bool mouseOnText = false; int framesCounter = 0; @@ -89,9 +89,9 @@ int main(void) DrawText("PLACE MOUSE OVER INPUT BOX!", 240, 140, 20, GRAY); - DrawRectangleRec(textBox, LIGHTGRAY); - if (mouseOnText) DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, RED); - else DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, DARKGRAY); + DrawrayRectangleRec(textBox, LIGHTGRAY); + if (mouseOnText) DrawrayRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, RED); + else DrawrayRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, DARKGRAY); DrawText(name, (int)textBox.x + 5, (int)textBox.y + 8, 40, MAROON); @@ -113,7 +113,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_raylib_fonts.c b/examples/text/text_raylib_fonts.c index 8ef67c71d..b7aaa8b92 100644 --- a/examples/text/text_raylib_fonts.c +++ b/examples/text/text_raylib_fonts.c @@ -103,7 +103,7 @@ int main(void) // Fonts unloading for (int i = 0; i < MAX_FONTS; i++) UnloadFont(fonts[i]); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/text/text_rectangle_bounds.c b/examples/text/text_rectangle_bounds.c index 886c348d5..0f3f7cede 100644 --- a/examples/text/text_rectangle_bounds.c +++ b/examples/text/text_rectangle_bounds.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [text] example - Rectangle bounds +* raylib [text] example - rayRectangle bounds * * Example originally created with raylib 2.5, last time updated with raylib 4.0 * @@ -15,8 +15,8 @@ #include "raylib.h" -static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits -static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection +static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rayRectangle limits +static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rayRectangle limits with support for text selection //------------------------------------------------------------------------------------ // Program main entry point @@ -28,7 +28,7 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [text] example - draw text inside a rectangle"); + InitWindow(screenWidth, screenHeight, "raylib [text] example - draw text inside a rayRectangle"); const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's \ a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \ @@ -37,10 +37,10 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris bool resizing = false; bool wordWrap = true; - Rectangle container = { 25.0f, 25.0f, screenWidth - 50.0f, screenHeight - 250.0f }; - Rectangle resizer = { container.x + container.width - 17, container.y + container.height - 17, 14, 14 }; + rayRectangle container = { 25.0f, 25.0f, screenWidth - 50.0f, screenHeight - 250.0f }; + rayRectangle resizer = { container.x + container.width - 17, container.y + container.height - 17, 14, 14 }; - // Minimum width and heigh for the container rectangle + // Minimum width and heigh for the container rayRectangle const float minWidth = 60; const float minHeight = 60; const float maxWidth = screenWidth - 50.0f; @@ -83,7 +83,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) && CheckCollisionPointRec(mouse, resizer)) resizing = true; } - // Move resizer rectangle properly + // Move resizer rayRectangle properly resizer.x = container.x + container.width - 17; resizer.y = container.y + container.height - 17; @@ -96,16 +96,16 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris ClearBackground(RAYWHITE); - DrawRectangleLinesEx(container, 3, borderColor); // Draw container border + DrawrayRectangleLinesEx(container, 3, borderColor); // Draw container border // Draw text in container (add some padding) - DrawTextBoxed(font, text, (Rectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, 20.0f, 2.0f, wordWrap, GRAY); + DrawTextBoxed(font, text, (rayRectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, 20.0f, 2.0f, wordWrap, GRAY); - DrawRectangleRec(resizer, borderColor); // Draw the resize box + DrawrayRectangleRec(resizer, borderColor); // Draw the resize box // Draw bottom info - DrawRectangle(0, screenHeight - 54, screenWidth, 54, GRAY); - DrawRectangleRec((Rectangle){ 382.0f, screenHeight - 34.0f, 12.0f, 12.0f }, MAROON); + DrawrayRectangle(0, screenHeight - 54, screenWidth, 54, GRAY); + DrawrayRectangleRec((rayRectangle){ 382.0f, screenHeight - 34.0f, 12.0f, 12.0f }, MAROON); DrawText("Word Wrap: ", 313, screenHeight-115, 20, BLACK); if (wordWrap) DrawText("ON", 447, screenHeight - 115, 20, RED); @@ -121,7 +121,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; @@ -131,21 +131,21 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris // Module functions definition //-------------------------------------------------------------------------------------- -// Draw text using font inside rectangle limits -static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) +// Draw text using font inside rayRectangle limits +static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) { DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE); } -// Draw text using font inside rectangle limits with support for text selection -static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) +// Draw text using font inside rayRectangle limits with support for text selection +static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) { int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop float textOffsetY = 0; // Offset between lines (on line break '\n') float textOffsetX = 0.0f; // Offset X to next character to draw - float scaleFactor = fontSize/(float)font.baseSize; // Character rectangle scaling factor + float scaleFactor = fontSize/(float)font.baseSize; // Character rayRectangle scaling factor // Word/character wrapping mechanism variables enum { MEASURE_STATE = 0, DRAW_STATE = 1 }; @@ -231,14 +231,14 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, textOffsetX = 0; } - // When text overflows rectangle height limit, just stop drawing + // When text overflows rayRectangle height limit, just stop drawing if ((textOffsetY + font.baseSize*scaleFactor) > rec.height) break; // Draw selection background bool isGlyphSelected = false; if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength))) { - DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint); + DrawrayRectangleRec((rayRectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint); isGlyphSelected = true; } diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index 42227f89c..7daf204eb 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -135,8 +135,8 @@ struct { //-------------------------------------------------------------------------------------- static void RandomizeEmoji(void); // Fills the emoji array with random emojis -static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits -static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection +static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rayRectangle limits +static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rayRectangle limits with support for text selection //-------------------------------------------------------------------------------------- // Global variables @@ -210,7 +210,7 @@ int main(void) for (int i = 0; i < SIZEOF(emoji); ++i) { const char *txt = &emojiCodepoints[emoji[i].index]; - Rectangle emojiRect = { position.x, position.y, (float)fontEmoji.baseSize, (float)fontEmoji.baseSize }; + rayRectangle emojiRect = { position.x, position.y, (float)fontEmoji.baseSize, (float)fontEmoji.baseSize }; if (!CheckCollisionPointRec(mouse, emojiRect)) { @@ -246,7 +246,7 @@ int main(void) if (sz.x > 300) { sz.y *= sz.x/300; sz.x = 300; } else if (sz.x < 160) sz.x = 160; - Rectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y }; + rayRectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y }; msgRect.y -= msgRect.height; // Coordinates for the chat bubble triangle @@ -270,11 +270,11 @@ int main(void) if (msgRect.x + msgRect.width > screenWidth) msgRect.x -= (msgRect.x + msgRect.width) - screenWidth + 10; // Draw chat bubble - DrawRectangleRec(msgRect, emoji[selected].color); + DrawrayRectangleRec(msgRect, emoji[selected].color); DrawTriangle(a, b, c, emoji[selected].color); // Draw the main text message - Rectangle textRect = { msgRect.x + horizontalPadding/2, msgRect.y + verticalPadding/2, msgRect.width - horizontalPadding, msgRect.height }; + rayRectangle textRect = { msgRect.x + horizontalPadding/2, msgRect.y + verticalPadding/2, msgRect.width - horizontalPadding, msgRect.height }; DrawTextBoxed(*font, messages[message].text, textRect, (float)font->baseSize, 1.0f, true, WHITE); // Draw the info text below the main message @@ -301,7 +301,7 @@ int main(void) UnloadFont(fontAsian); // Unload font resource UnloadFont(fontEmoji); // Unload font resource - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; @@ -330,21 +330,21 @@ static void RandomizeEmoji(void) // Module functions definition //-------------------------------------------------------------------------------------- -// Draw text using font inside rectangle limits -static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) +// Draw text using font inside rayRectangle limits +static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint) { DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE); } -// Draw text using font inside rectangle limits with support for text selection -static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) +// Draw text using font inside rayRectangle limits with support for text selection +static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint) { int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop float textOffsetY = 0.0f; // Offset between lines (on line break '\n') float textOffsetX = 0.0f; // Offset X to next character to draw - float scaleFactor = fontSize/(float)font.baseSize; // Character rectangle scaling factor + float scaleFactor = fontSize/(float)font.baseSize; // Character rayRectangle scaling factor // Word/character wrapping mechanism variables enum { MEASURE_STATE = 0, DRAW_STATE = 1 }; @@ -430,14 +430,14 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, textOffsetX = 0; } - // When text overflows rectangle height limit, just stop drawing + // When text overflows rayRectangle height limit, just stop drawing if ((textOffsetY + font.baseSize*scaleFactor) > rec.height) break; // Draw selection background bool isGlyphSelected = false; if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength))) { - DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint); + DrawrayRectangleRec((rayRectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint); isGlyphSelected = true; } diff --git a/examples/text/text_writing_anim.c b/examples/text/text_writing_anim.c index 4ee67700e..46023d68c 100644 --- a/examples/text/text_writing_anim.c +++ b/examples/text/text_writing_anim.c @@ -60,7 +60,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_background_scrolling.c b/examples/textures/textures_background_scrolling.c index 55fa2115e..c9087ca4d 100644 --- a/examples/textures/textures_background_scrolling.c +++ b/examples/textures/textures_background_scrolling.c @@ -85,7 +85,7 @@ int main(void) UnloadTexture(midground); // Unload midground texture UnloadTexture(foreground); // Unload foreground texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_blend_modes.c b/examples/textures/textures_blend_modes.c index 246a98e47..a037c4194 100644 --- a/examples/textures/textures_blend_modes.c +++ b/examples/textures/textures_blend_modes.c @@ -91,7 +91,7 @@ int main(void) UnloadTexture(fgTexture); // Unload foreground texture UnloadTexture(bgTexture); // Unload background texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_bunnymark.c b/examples/textures/textures_bunnymark.c index ede3036fa..3afd5e7c6 100644 --- a/examples/textures/textures_bunnymark.c +++ b/examples/textures/textures_bunnymark.c @@ -102,7 +102,7 @@ int main(void) DrawTexture(texBunny, (int)bunnies[i].position.x, (int)bunnies[i].position.y, bunnies[i].color); } - DrawRectangle(0, 0, screenWidth, 40, BLACK); + DrawrayRectangle(0, 0, screenWidth, 40, BLACK); DrawText(TextFormat("bunnies: %i", bunniesCount), 120, 10, 20, GREEN); DrawText(TextFormat("batched draw calls: %i", 1 + bunniesCount/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON); @@ -118,7 +118,7 @@ int main(void) UnloadTexture(texBunny); // Unload bunny texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_draw_tiled.c b/examples/textures/textures_draw_tiled.c index 34fe82ce4..c29a168d3 100644 --- a/examples/textures/textures_draw_tiled.c +++ b/examples/textures/textures_draw_tiled.c @@ -20,8 +20,8 @@ #define MARGIN_SIZE 8 // Size for the margins #define COLOR_SIZE 16 // Size of the color select buttons -// Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest. -void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); +// Draw part of a texture (defined by a rayRectangle) with rotation and scale tiled into dest. +void DrawTextureTiled(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, float scale, Color tint); //------------------------------------------------------------------------------------ // Program main entry point @@ -41,21 +41,21 @@ int main(void) SetTextureFilter(texPattern, TEXTURE_FILTER_TRILINEAR); // Makes the texture smoother when upscaled // Coordinates for all patterns inside the texture - const Rectangle recPattern[] = { - (Rectangle){ 3, 3, 66, 66 }, - (Rectangle){ 75, 3, 100, 100 }, - (Rectangle){ 3, 75, 66, 66 }, - (Rectangle){ 7, 156, 50, 50 }, - (Rectangle){ 85, 106, 90, 45 }, - (Rectangle){ 75, 154, 100, 60} + const rayRectangle recPattern[] = { + (rayRectangle){ 3, 3, 66, 66 }, + (rayRectangle){ 75, 3, 100, 100 }, + (rayRectangle){ 3, 75, 66, 66 }, + (rayRectangle){ 7, 156, 50, 50 }, + (rayRectangle){ 85, 106, 90, 45 }, + (rayRectangle){ 75, 154, 100, 60} }; // Setup colors const Color colors[] = { BLACK, MAROON, ORANGE, BLUE, PURPLE, BEIGE, LIME, RED, DARKGRAY, SKYBLUE }; enum { MAX_COLORS = SIZEOF(colors) }; - Rectangle colorRec[MAX_COLORS] = { 0 }; + rayRectangle colorRec[MAX_COLORS] = { 0 }; - // Calculate rectangle for each color + // Calculate rayRectangle for each color for (int i = 0, x = 0, y = 0; i < MAX_COLORS; i++) { colorRec[i].x = 2.0f + MARGIN_SIZE + x; @@ -90,7 +90,7 @@ int main(void) // Check which pattern was clicked and set it as the active pattern for (int i = 0; i < SIZEOF(recPattern); i++) { - if (CheckCollisionPointRec(mouse, (Rectangle){ 2 + MARGIN_SIZE + recPattern[i].x, 40 + MARGIN_SIZE + recPattern[i].y, recPattern[i].width, recPattern[i].height })) + if (CheckCollisionPointRec(mouse, (rayRectangle){ 2 + MARGIN_SIZE + recPattern[i].x, 40 + MARGIN_SIZE + recPattern[i].y, recPattern[i].width, recPattern[i].height })) { activePattern = i; break; @@ -130,21 +130,21 @@ int main(void) ClearBackground(RAYWHITE); // Draw the tiled area - DrawTextureTiled(texPattern, recPattern[activePattern], (Rectangle){(float)OPT_WIDTH+MARGIN_SIZE, (float)MARGIN_SIZE, GetScreenWidth() - OPT_WIDTH - 2.0f*MARGIN_SIZE, GetScreenHeight() - 2.0f*MARGIN_SIZE}, + DrawTextureTiled(texPattern, recPattern[activePattern], (rayRectangle){(float)OPT_WIDTH+MARGIN_SIZE, (float)MARGIN_SIZE, GetScreenWidth() - OPT_WIDTH - 2.0f*MARGIN_SIZE, GetScreenHeight() - 2.0f*MARGIN_SIZE}, (Vector2){0.0f, 0.0f}, rotation, scale, colors[activeCol]); // Draw options - DrawRectangle(MARGIN_SIZE, MARGIN_SIZE, OPT_WIDTH - MARGIN_SIZE, GetScreenHeight() - 2*MARGIN_SIZE, ColorAlpha(LIGHTGRAY, 0.5f)); + DrawrayRectangle(MARGIN_SIZE, MARGIN_SIZE, OPT_WIDTH - MARGIN_SIZE, GetScreenHeight() - 2*MARGIN_SIZE, ColorAlpha(LIGHTGRAY, 0.5f)); DrawText("Select Pattern", 2 + MARGIN_SIZE, 30 + MARGIN_SIZE, 10, BLACK); DrawTexture(texPattern, 2 + MARGIN_SIZE, 40 + MARGIN_SIZE, BLACK); - DrawRectangle(2 + MARGIN_SIZE + (int)recPattern[activePattern].x, 40 + MARGIN_SIZE + (int)recPattern[activePattern].y, (int)recPattern[activePattern].width, (int)recPattern[activePattern].height, ColorAlpha(DARKBLUE, 0.3f)); + DrawrayRectangle(2 + MARGIN_SIZE + (int)recPattern[activePattern].x, 40 + MARGIN_SIZE + (int)recPattern[activePattern].y, (int)recPattern[activePattern].width, (int)recPattern[activePattern].height, ColorAlpha(DARKBLUE, 0.3f)); DrawText("Select Color", 2+MARGIN_SIZE, 10+256+MARGIN_SIZE, 10, BLACK); for (int i = 0; i < MAX_COLORS; i++) { - DrawRectangleRec(colorRec[i], colors[i]); - if (activeCol == i) DrawRectangleLinesEx(colorRec[i], 3, ColorAlpha(WHITE, 0.5f)); + DrawrayRectangleRec(colorRec[i], colors[i]); + if (activeCol == i) DrawrayRectangleLinesEx(colorRec[i], 3, ColorAlpha(WHITE, 0.5f)); } DrawText("Scale (UP/DOWN to change)", 2 + MARGIN_SIZE, 80 + 256 + MARGIN_SIZE, 10, BLACK); @@ -165,14 +165,14 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texPattern); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; } -// Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest. -void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint) +// Draw part of a texture (defined by a rayRectangle) with rotation and scale tiled into dest. +void DrawTextureTiled(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, float scale, Color tint) { if ((texture.id <= 0) || (scale <= 0.0f)) return; // Wanna see a infinite loop?!...just delete this line! if ((source.width == 0) || (source.height == 0)) return; @@ -181,8 +181,8 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto if ((dest.width < tileWidth) && (dest.height < tileHeight)) { // Can fit only one tile - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height}, - (Rectangle){dest.x, dest.y, dest.width, dest.height}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height}, + (rayRectangle){dest.x, dest.y, dest.width, dest.height}, origin, rotation, tint); } else if (dest.width <= tileWidth) { @@ -190,14 +190,14 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto int dy = 0; for (;dy+tileHeight < dest.height; dy += tileHeight) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, source.height}, (Rectangle){dest.x, dest.y + dy, dest.width, (float)tileHeight}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, source.height}, (rayRectangle){dest.x, dest.y + dy, dest.width, (float)tileHeight}, origin, rotation, tint); } // Fit last tile if (dy < dest.height) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, - (Rectangle){dest.x, dest.y + dy, dest.width, dest.height - dy}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, + (rayRectangle){dest.x, dest.y + dy, dest.width, dest.height - dy}, origin, rotation, tint); } } else if (dest.height <= tileHeight) @@ -206,14 +206,14 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto int dx = 0; for (;dx+tileWidth < dest.width; dx += tileWidth) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, source.width, ((float)dest.height/tileHeight)*source.height}, (Rectangle){dest.x + dx, dest.y, (float)tileWidth, dest.height}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, source.width, ((float)dest.height/tileHeight)*source.height}, (rayRectangle){dest.x + dx, dest.y, (float)tileWidth, dest.height}, origin, rotation, tint); } // Fit last tile if (dx < dest.width) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height}, - (Rectangle){dest.x + dx, dest.y, dest.width - dx, dest.height}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height}, + (rayRectangle){dest.x + dx, dest.y, dest.width - dx, dest.height}, origin, rotation, tint); } } else @@ -225,13 +225,13 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto int dy = 0; for (;dy+tileHeight < dest.height; dy += tileHeight) { - DrawTexturePro(texture, source, (Rectangle){dest.x + dx, dest.y + dy, (float)tileWidth, (float)tileHeight}, origin, rotation, tint); + DrawTexturePro(texture, source, (rayRectangle){dest.x + dx, dest.y + dy, (float)tileWidth, (float)tileHeight}, origin, rotation, tint); } if (dy < dest.height) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, - (Rectangle){dest.x + dx, dest.y + dy, (float)tileWidth, dest.height - dy}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, + (rayRectangle){dest.x + dx, dest.y + dy, (float)tileWidth, dest.height - dy}, origin, rotation, tint); } } @@ -241,15 +241,15 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto int dy = 0; for (;dy+tileHeight < dest.height; dy += tileHeight) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, source.height}, - (Rectangle){dest.x + dx, dest.y + dy, dest.width - dx, (float)tileHeight}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, source.height}, + (rayRectangle){dest.x + dx, dest.y + dy, dest.width - dx, (float)tileHeight}, origin, rotation, tint); } // Draw final tile in the bottom right corner if (dy < dest.height) { - DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, - (Rectangle){dest.x + dx, dest.y + dy, dest.width - dx, dest.height - dy}, origin, rotation, tint); + DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height}, + (rayRectangle){dest.x + dx, dest.y + dy, dest.width - dx, dest.height - dy}, origin, rotation, tint); } } } diff --git a/examples/textures/textures_fog_of_war.c b/examples/textures/textures_fog_of_war.c index 516055aeb..4c67745a8 100644 --- a/examples/textures/textures_fog_of_war.c +++ b/examples/textures/textures_fog_of_war.c @@ -105,8 +105,8 @@ int main(void) ClearBackground(BLANK); for (unsigned int y = 0; y < map.tilesY; y++) for (unsigned int x = 0; x < map.tilesX; x++) - if (map.tileFog[y*map.tilesX + x] == 0) DrawRectangle(x, y, 1, 1, BLACK); - else if (map.tileFog[y*map.tilesX + x] == 2) DrawRectangle(x, y, 1, 1, Fade(BLACK, 0.8f)); + if (map.tileFog[y*map.tilesX + x] == 0) DrawrayRectangle(x, y, 1, 1, BLACK); + else if (map.tileFog[y*map.tilesX + x] == 2) DrawrayRectangle(x, y, 1, 1, Fade(BLACK, 0.8f)); EndTextureMode(); BeginDrawing(); @@ -118,19 +118,19 @@ int main(void) for (unsigned int x = 0; x < map.tilesX; x++) { // Draw tiles from id (and tile borders) - DrawRectangle(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, + DrawrayRectangle(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, (map.tileIds[y*map.tilesX + x] == 0)? BLUE : Fade(BLUE, 0.9f)); - DrawRectangleLines(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, Fade(DARKBLUE, 0.5f)); + DrawrayRectangleLines(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, Fade(DARKBLUE, 0.5f)); } } // Draw player - DrawRectangleV(playerPosition, (Vector2){ PLAYER_SIZE, PLAYER_SIZE }, RED); + DrawrayRectangleV(playerPosition, (Vector2){ PLAYER_SIZE, PLAYER_SIZE }, RED); // Draw fog of war (scaled to full map, bilinear filtering) - DrawTexturePro(fogOfWar.texture, (Rectangle){ 0, 0, (float)fogOfWar.texture.width, (float)-fogOfWar.texture.height }, - (Rectangle){ 0, 0, (float)map.tilesX*MAP_TILE_SIZE, (float)map.tilesY*MAP_TILE_SIZE }, + DrawTexturePro(fogOfWar.texture, (rayRectangle){ 0, 0, (float)fogOfWar.texture.width, (float)-fogOfWar.texture.height }, + (rayRectangle){ 0, 0, (float)map.tilesX*MAP_TILE_SIZE, (float)map.tilesY*MAP_TILE_SIZE }, (Vector2){ 0, 0 }, 0.0f, WHITE); // Draw player current tile @@ -148,7 +148,7 @@ int main(void) UnloadRenderTexture(fogOfWar); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_gif_player.c b/examples/textures/textures_gif_player.c index 108522835..766eba35e 100644 --- a/examples/textures/textures_gif_player.c +++ b/examples/textures/textures_gif_player.c @@ -97,8 +97,8 @@ int main(void) for (int i = 0; i < MAX_FRAME_DELAY; i++) { - if (i < frameDelay) DrawRectangle(190 + 21*i, 300, 20, 20, RED); - DrawRectangleLines(190 + 21*i, 300, 20, 20, MAROON); + if (i < frameDelay) DrawrayRectangle(190 + 21*i, 300, 20, 20, RED); + DrawrayRectangleLines(190 + 21*i, 300, 20, 20, MAROON); } DrawTexture(texScarfyAnim, GetScreenWidth()/2 - texScarfyAnim.width/2, 140, WHITE); @@ -114,7 +114,7 @@ int main(void) UnloadTexture(texScarfyAnim); // Unload texture UnloadImage(imScarfyAnim); // Unload image (contains all frames) - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_drawing.c b/examples/textures/textures_image_drawing.c index 967cb52a4..594f11331 100644 --- a/examples/textures/textures_image_drawing.c +++ b/examples/textures/textures_image_drawing.c @@ -30,20 +30,20 @@ int main(void) // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) Image cat = LoadImage("resources/cat.png"); // Load image in CPU memory (RAM) - ImageCrop(&cat, (Rectangle){ 100, 10, 280, 380 }); // Crop an image piece + ImageCrop(&cat, (rayRectangle){ 100, 10, 280, 380 }); // Crop an image piece ImageFlipHorizontal(&cat); // Flip cropped image horizontally ImageResize(&cat, 150, 200); // Resize flipped-cropped image Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM) // Draw one image over the other with a scaling of 1.5f - ImageDraw(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE); - ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image + ImageDraw(&parrots, cat, (rayRectangle){ 0, 0, (float)cat.width, (float)cat.height }, (rayRectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE); + ImageCrop(&parrots, (rayRectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image // Draw on the image with a few image draw methods ImageDrawPixel(&parrots, 10, 10, RAYWHITE); ImageDrawCircleLines(&parrots, 10, 10, 5, RAYWHITE); - ImageDrawRectangle(&parrots, 5, 20, 10, 10, RAYWHITE); + ImageDrawrayRectangle(&parrots, 5, 20, 10, 10, RAYWHITE); UnloadImage(cat); // Unload image from RAM @@ -76,7 +76,7 @@ int main(void) ClearBackground(RAYWHITE); DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, WHITE); - DrawRectangleLines(screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, texture.width, texture.height, DARKGRAY); + DrawrayRectangleLines(screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, texture.width, texture.height, DARKGRAY); DrawText("We are drawing only one texture from various images composed!", 240, 350, 10, DARKGRAY); DrawText("Source images have been cropped, scaled, flipped and copied one over the other.", 190, 370, 10, DARKGRAY); @@ -89,7 +89,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_generation.c b/examples/textures/textures_image_generation.c index 359dc236a..b912f5380 100644 --- a/examples/textures/textures_image_generation.c +++ b/examples/textures/textures_image_generation.c @@ -84,8 +84,8 @@ int main(void) DrawTexture(textures[currentTexture], 0, 0, WHITE); - DrawRectangle(30, 400, 325, 30, Fade(SKYBLUE, 0.5f)); - DrawRectangleLines(30, 400, 325, 30, Fade(WHITE, 0.5f)); + DrawrayRectangle(30, 400, 325, 30, Fade(SKYBLUE, 0.5f)); + DrawrayRectangleLines(30, 400, 325, 30, Fade(WHITE, 0.5f)); DrawText("MOUSE LEFT BUTTON to CYCLE PROCEDURAL TEXTURES", 40, 410, 10, WHITE); switch(currentTexture) @@ -112,7 +112,7 @@ int main(void) // Unload textures data (GPU VRAM) for (int i = 0; i < NUM_TEXTURES; i++) UnloadTexture(textures[i]); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_loading.c b/examples/textures/textures_image_loading.c index b1bfe09f7..7b56008b6 100644 --- a/examples/textures/textures_image_loading.c +++ b/examples/textures/textures_image_loading.c @@ -62,7 +62,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_processing.c b/examples/textures/textures_image_processing.c index 6e6c85482..e586ef80f 100644 --- a/examples/textures/textures_image_processing.c +++ b/examples/textures/textures_image_processing.c @@ -66,10 +66,10 @@ int main(void) int currentProcess = NONE; bool textureReload = false; - Rectangle toggleRecs[NUM_PROCESSES] = { 0 }; + rayRectangle toggleRecs[NUM_PROCESSES] = { 0 }; int mouseHoverRec = -1; - for (int i = 0; i < NUM_PROCESSES; i++) toggleRecs[i] = (Rectangle){ 40.0f, (float)(50 + 32*i), 150.0f, 30.0f }; + for (int i = 0; i < NUM_PROCESSES; i++) toggleRecs[i] = (rayRectangle){ 40.0f, (float)(50 + 32*i), 150.0f, 30.0f }; SetTargetFPS(60); //--------------------------------------------------------------------------------------- @@ -149,16 +149,16 @@ int main(void) DrawText("IMAGE PROCESSING:", 40, 30, 10, DARKGRAY); - // Draw rectangles + // Draw rayRectangles for (int i = 0; i < NUM_PROCESSES; i++) { - DrawRectangleRec(toggleRecs[i], ((i == currentProcess) || (i == mouseHoverRec)) ? SKYBLUE : LIGHTGRAY); - DrawRectangleLines((int)toggleRecs[i].x, (int) toggleRecs[i].y, (int) toggleRecs[i].width, (int) toggleRecs[i].height, ((i == currentProcess) || (i == mouseHoverRec)) ? BLUE : GRAY); + DrawrayRectangleRec(toggleRecs[i], ((i == currentProcess) || (i == mouseHoverRec)) ? SKYBLUE : LIGHTGRAY); + DrawrayRectangleLines((int)toggleRecs[i].x, (int) toggleRecs[i].y, (int) toggleRecs[i].width, (int) toggleRecs[i].height, ((i == currentProcess) || (i == mouseHoverRec)) ? BLUE : GRAY); DrawText( processText[i], (int)( toggleRecs[i].x + toggleRecs[i].width/2 - MeasureText(processText[i], 10)/2), (int) toggleRecs[i].y + 11, 10, ((i == currentProcess) || (i == mouseHoverRec)) ? DARKBLUE : DARKGRAY); } DrawTexture(texture, screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, WHITE); - DrawRectangleLines(screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, texture.width, texture.height, BLACK); + DrawrayRectangleLines(screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, texture.width, texture.height, BLACK); EndDrawing(); //---------------------------------------------------------------------------------- @@ -170,7 +170,7 @@ int main(void) UnloadImage(imOrigin); // Unload image-origin from RAM UnloadImage(imCopy); // Unload image-copy from RAM - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_rotate.c b/examples/textures/textures_image_rotate.c index e5c735732..abeba91a2 100644 --- a/examples/textures/textures_image_rotate.c +++ b/examples/textures/textures_image_rotate.c @@ -74,7 +74,7 @@ int main(void) //-------------------------------------------------------------------------------------- for (int i = 0; i < NUM_TEXTURES; i++) UnloadTexture(textures[i]); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_image_text.c b/examples/textures/textures_image_text.c index 50db688de..5845369e5 100644 --- a/examples/textures/textures_image_text.c +++ b/examples/textures/textures_image_text.c @@ -81,7 +81,7 @@ int main(void) UnloadFont(font); // Unload custom font - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_logo_raylib.c b/examples/textures/textures_logo_raylib.c index 8bd865811..94e99d40e 100644 --- a/examples/textures/textures_logo_raylib.c +++ b/examples/textures/textures_logo_raylib.c @@ -55,7 +55,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_mouse_painting.c b/examples/textures/textures_mouse_painting.c index e985cee0c..a9b223144 100644 --- a/examples/textures/textures_mouse_painting.c +++ b/examples/textures/textures_mouse_painting.c @@ -35,8 +35,8 @@ int main(void) SKYBLUE, BLUE, DARKBLUE, PURPLE, VIOLET, DARKPURPLE, BEIGE, BROWN, DARKBROWN, LIGHTGRAY, GRAY, DARKGRAY, BLACK }; - // Define colorsRecs data (for every rectangle) - Rectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; + // Define colorsRecs data (for every rayRectangle) + rayRectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; for (int i = 0; i < MAX_COLORS_COUNT; i++) { @@ -52,7 +52,7 @@ int main(void) float brushSize = 20.0f; bool mouseWasPressed = false; - Rectangle btnSaveRec = { 750, 10, 40, 30 }; + rayRectangle btnSaveRec = { 750, 10, 40, 30 }; bool btnSaveMouseHover = false; bool showSaveMessage = false; int saveMessageCounter = 0; @@ -177,7 +177,7 @@ int main(void) ClearBackground(RAYWHITE); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) - DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2) { 0, 0 }, WHITE); + DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2) { 0, 0 }, WHITE); // Draw drawing circle for reference if (mousePos.y > 50) @@ -187,27 +187,27 @@ int main(void) } // Draw top panel - DrawRectangle(0, 0, GetScreenWidth(), 50, RAYWHITE); + DrawrayRectangle(0, 0, GetScreenWidth(), 50, RAYWHITE); DrawLine(0, 50, GetScreenWidth(), 50, LIGHTGRAY); - // Draw color selection rectangles - for (int i = 0; i < MAX_COLORS_COUNT; i++) DrawRectangleRec(colorsRecs[i], colors[i]); - DrawRectangleLines(10, 10, 30, 30, LIGHTGRAY); + // Draw color selection rayRectangles + for (int i = 0; i < MAX_COLORS_COUNT; i++) DrawrayRectangleRec(colorsRecs[i], colors[i]); + DrawrayRectangleLines(10, 10, 30, 30, LIGHTGRAY); - if (colorMouseHover >= 0) DrawRectangleRec(colorsRecs[colorMouseHover], Fade(WHITE, 0.6f)); + if (colorMouseHover >= 0) DrawrayRectangleRec(colorsRecs[colorMouseHover], Fade(WHITE, 0.6f)); - DrawRectangleLinesEx((Rectangle){ colorsRecs[colorSelected].x - 2, colorsRecs[colorSelected].y - 2, + DrawrayRectangleLinesEx((rayRectangle){ colorsRecs[colorSelected].x - 2, colorsRecs[colorSelected].y - 2, colorsRecs[colorSelected].width + 4, colorsRecs[colorSelected].height + 4 }, 2, BLACK); // Draw save image button - DrawRectangleLinesEx(btnSaveRec, 2, btnSaveMouseHover ? RED : BLACK); + DrawrayRectangleLinesEx(btnSaveRec, 2, btnSaveMouseHover ? RED : BLACK); DrawText("SAVE!", 755, 20, 10, btnSaveMouseHover ? RED : BLACK); // Draw save image message if (showSaveMessage) { - DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f)); - DrawRectangle(0, 150, GetScreenWidth(), 80, BLACK); + DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f)); + DrawrayRectangle(0, 150, GetScreenWidth(), 80, BLACK); DrawText("IMAGE SAVED: my_amazing_texture_painting.png", 150, 180, 20, RAYWHITE); } @@ -219,7 +219,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadRenderTexture(target); // Unload render texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_npatch_drawing.c b/examples/textures/textures_npatch_drawing.c index f85aaa129..cec37af3f 100644 --- a/examples/textures/textures_npatch_drawing.c +++ b/examples/textures/textures_npatch_drawing.c @@ -36,20 +36,20 @@ int main(void) Vector2 origin = { 0.0f, 0.0f }; // Position and size of the n-patches - Rectangle dstRec1 = { 480.0f, 160.0f, 32.0f, 32.0f }; - Rectangle dstRec2 = { 160.0f, 160.0f, 32.0f, 32.0f }; - Rectangle dstRecH = { 160.0f, 93.0f, 32.0f, 32.0f }; - Rectangle dstRecV = { 92.0f, 160.0f, 32.0f, 32.0f }; + rayRectangle dstRec1 = { 480.0f, 160.0f, 32.0f, 32.0f }; + rayRectangle dstRec2 = { 160.0f, 160.0f, 32.0f, 32.0f }; + rayRectangle dstRecH = { 160.0f, 93.0f, 32.0f, 32.0f }; + rayRectangle dstRecV = { 92.0f, 160.0f, 32.0f, 32.0f }; // A 9-patch (NPATCH_NINE_PATCH) changes its sizes in both axis - NPatchInfo ninePatchInfo1 = { (Rectangle){ 0.0f, 0.0f, 64.0f, 64.0f }, 12, 40, 12, 12, NPATCH_NINE_PATCH }; - NPatchInfo ninePatchInfo2 = { (Rectangle){ 0.0f, 128.0f, 64.0f, 64.0f }, 16, 16, 16, 16, NPATCH_NINE_PATCH }; + NPatchInfo ninePatchInfo1 = { (rayRectangle){ 0.0f, 0.0f, 64.0f, 64.0f }, 12, 40, 12, 12, NPATCH_NINE_PATCH }; + NPatchInfo ninePatchInfo2 = { (rayRectangle){ 0.0f, 128.0f, 64.0f, 64.0f }, 16, 16, 16, 16, NPATCH_NINE_PATCH }; // A horizontal 3-patch (NPATCH_THREE_PATCH_HORIZONTAL) changes its sizes along the x axis only - NPatchInfo h3PatchInfo = { (Rectangle){ 0.0f, 64.0f, 64.0f, 64.0f }, 8, 8, 8, 8, NPATCH_THREE_PATCH_HORIZONTAL }; + NPatchInfo h3PatchInfo = { (rayRectangle){ 0.0f, 64.0f, 64.0f, 64.0f }, 8, 8, 8, 8, NPATCH_THREE_PATCH_HORIZONTAL }; // A vertical 3-patch (NPATCH_THREE_PATCH_VERTICAL) changes its sizes along the y axis only - NPatchInfo v3PatchInfo = { (Rectangle){ 0.0f, 192.0f, 64.0f, 64.0f }, 6, 6, 6, 6, NPATCH_THREE_PATCH_VERTICAL }; + NPatchInfo v3PatchInfo = { (rayRectangle){ 0.0f, 192.0f, 64.0f, 64.0f }, 6, 6, 6, 6, NPATCH_THREE_PATCH_VERTICAL }; SetTargetFPS(60); //--------------------------------------------------------------------------------------- @@ -93,7 +93,7 @@ int main(void) DrawTextureNPatch(nPatchTexture, v3PatchInfo, dstRecV, origin, 0.0f, WHITE); // Draw the source texture - DrawRectangleLines(5, 88, 74, 266, BLUE); + DrawrayRectangleLines(5, 88, 74, 266, BLUE); DrawTexture(nPatchTexture, 10, 93, WHITE); DrawText("TEXTURE", 15, 360, 10, DARKGRAY); @@ -107,7 +107,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(nPatchTexture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_particles_blending.c b/examples/textures/textures_particles_blending.c index ec144ff4b..e96d3a4ba 100644 --- a/examples/textures/textures_particles_blending.c +++ b/examples/textures/textures_particles_blending.c @@ -112,8 +112,8 @@ int main(void) // Draw active particles for (int i = 0; i < MAX_PARTICLES; i++) { - if (mouseTail[i].active) DrawTexturePro(smoke, (Rectangle){ 0.0f, 0.0f, (float)smoke.width, (float)smoke.height }, - (Rectangle){ mouseTail[i].position.x, mouseTail[i].position.y, smoke.width*mouseTail[i].size, smoke.height*mouseTail[i].size }, + if (mouseTail[i].active) DrawTexturePro(smoke, (rayRectangle){ 0.0f, 0.0f, (float)smoke.width, (float)smoke.height }, + (rayRectangle){ mouseTail[i].position.x, mouseTail[i].position.y, smoke.width*mouseTail[i].size, smoke.height*mouseTail[i].size }, (Vector2){ (float)(smoke.width*mouseTail[i].size/2.0f), (float)(smoke.height*mouseTail[i].size/2.0f) }, mouseTail[i].rotation, Fade(mouseTail[i].color, mouseTail[i].alpha)); } @@ -133,7 +133,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(smoke); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_polygon.c b/examples/textures/textures_polygon.c index cf59af979..4c3ed822f 100644 --- a/examples/textures/textures_polygon.c +++ b/examples/textures/textures_polygon.c @@ -102,7 +102,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Unload texture - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_raw_data.c b/examples/textures/textures_raw_data.c index 22d7cc06f..dfd4b2ea5 100644 --- a/examples/textures/textures_raw_data.c +++ b/examples/textures/textures_raw_data.c @@ -97,7 +97,7 @@ int main(void) UnloadTexture(fudesumi); // Texture unloading UnloadTexture(checked); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_sprite_anim.c b/examples/textures/textures_sprite_anim.c index 99efe2eab..91767dd75 100644 --- a/examples/textures/textures_sprite_anim.c +++ b/examples/textures/textures_sprite_anim.c @@ -32,7 +32,7 @@ int main(void) Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading Vector2 position = { 350.0f, 280.0f }; - Rectangle frameRec = { 0.0f, 0.0f, (float)scarfy.width/6, (float)scarfy.height }; + rayRectangle frameRec = { 0.0f, 0.0f, (float)scarfy.width/6, (float)scarfy.height }; int currentFrame = 0; int framesCounter = 0; @@ -73,8 +73,8 @@ int main(void) ClearBackground(RAYWHITE); DrawTexture(scarfy, 15, 40, WHITE); - DrawRectangleLines(15, 40, scarfy.width, scarfy.height, LIME); - DrawRectangleLines(15 + (int)frameRec.x, 40 + (int)frameRec.y, (int)frameRec.width, (int)frameRec.height, RED); + DrawrayRectangleLines(15, 40, scarfy.width, scarfy.height, LIME); + DrawrayRectangleLines(15 + (int)frameRec.x, 40 + (int)frameRec.y, (int)frameRec.width, (int)frameRec.height, RED); DrawText("FRAME SPEED: ", 165, 210, 10, DARKGRAY); DrawText(TextFormat("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY); @@ -82,8 +82,8 @@ int main(void) for (int i = 0; i < MAX_FRAME_SPEED; i++) { - if (i < framesSpeed) DrawRectangle(250 + 21*i, 205, 20, 20, RED); - DrawRectangleLines(250 + 21*i, 205, 20, 20, MAROON); + if (i < framesSpeed) DrawrayRectangle(250 + 21*i, 205, 20, 20, RED); + DrawrayRectangleLines(250 + 21*i, 205, 20, 20, MAROON); } DrawTextureRec(scarfy, frameRec, position, WHITE); // Draw part of the texture @@ -98,7 +98,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(scarfy); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_sprite_button.c b/examples/textures/textures_sprite_button.c index bd9891826..b367ff8ff 100644 --- a/examples/textures/textures_sprite_button.c +++ b/examples/textures/textures_sprite_button.c @@ -13,7 +13,7 @@ #include "raylib.h" -#define NUM_FRAMES 3 // Number of frames (rectangles) for the button sprite texture +#define NUM_FRAMES 3 // Number of frames (rayRectangles) for the button sprite texture //------------------------------------------------------------------------------------ // Program main entry point @@ -32,12 +32,12 @@ int main(void) Sound fxButton = LoadSound("resources/buttonfx.wav"); // Load button sound Texture2D button = LoadTexture("resources/button.png"); // Load button texture - // Define frame rectangle for drawing + // Define frame rayRectangle for drawing float frameHeight = (float)button.height/NUM_FRAMES; - Rectangle sourceRec = { 0, 0, (float)button.width, frameHeight }; + rayRectangle sourceRec = { 0, 0, (float)button.width, frameHeight }; // Define button bounds on screen - Rectangle btnBounds = { screenWidth/2.0f - button.width/2.0f, screenHeight/2.0f - button.height/NUM_FRAMES/2.0f, (float)button.width, frameHeight }; + rayRectangle btnBounds = { screenWidth/2.0f - button.width/2.0f, screenHeight/2.0f - button.height/NUM_FRAMES/2.0f, (float)button.width, frameHeight }; int btnState = 0; // Button state: 0-NORMAL, 1-MOUSE_HOVER, 2-PRESSED bool btnAction = false; // Button action should be activated @@ -72,7 +72,7 @@ int main(void) // TODO: Any desired action } - // Calculate button frame rectangle to draw depending on button state + // Calculate button frame rayRectangle to draw depending on button state sourceRec.y = btnState*frameHeight; //---------------------------------------------------------------------------------- @@ -95,7 +95,7 @@ int main(void) CloseAudioDevice(); // Close audio device - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_sprite_explosion.c b/examples/textures/textures_sprite_explosion.c index a6cbd3e5b..b1c25827a 100644 --- a/examples/textures/textures_sprite_explosion.c +++ b/examples/textures/textures_sprite_explosion.c @@ -37,12 +37,12 @@ int main(void) Texture2D explosion = LoadTexture("resources/explosion.png"); // Init variables for animation - float frameWidth = (float)(explosion.width/NUM_FRAMES_PER_LINE); // Sprite one frame rectangle width - float frameHeight = (float)(explosion.height/NUM_LINES); // Sprite one frame rectangle height + float frameWidth = (float)(explosion.width/NUM_FRAMES_PER_LINE); // Sprite one frame rayRectangle width + float frameHeight = (float)(explosion.height/NUM_LINES); // Sprite one frame rayRectangle height int currentFrame = 0; int currentLine = 0; - Rectangle frameRec = { 0, 0, frameWidth, frameHeight }; + rayRectangle frameRec = { 0, 0, frameWidth, frameHeight }; Vector2 position = { 0.0f, 0.0f }; bool active = false; @@ -104,7 +104,7 @@ int main(void) ClearBackground(RAYWHITE); - // Draw explosion required frame rectangle + // Draw explosion required frame rayRectangle if (active) DrawTextureRec(explosion, frameRec, position, WHITE); EndDrawing(); @@ -118,7 +118,7 @@ int main(void) CloseAudioDevice(); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_srcrec_dstrec.c b/examples/textures/textures_srcrec_dstrec.c index caf8f64b3..0b7681d70 100644 --- a/examples/textures/textures_srcrec_dstrec.c +++ b/examples/textures/textures_srcrec_dstrec.c @@ -1,6 +1,6 @@ /******************************************************************************************* * -* raylib [textures] example - Texture source and destination rectangles +* raylib [textures] example - Texture source and destination rayRectangles * * Example originally created with raylib 1.3, last time updated with raylib 1.3 * @@ -23,7 +23,7 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles"); + InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rayRectangles"); // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) @@ -32,13 +32,13 @@ int main(void) int frameWidth = scarfy.width/6; int frameHeight = scarfy.height; - // Source rectangle (part of the texture to use for drawing) - Rectangle sourceRec = { 0.0f, 0.0f, (float)frameWidth, (float)frameHeight }; + // Source rayRectangle (part of the texture to use for drawing) + rayRectangle sourceRec = { 0.0f, 0.0f, (float)frameWidth, (float)frameHeight }; - // Destination rectangle (screen rectangle where drawing part of texture) - Rectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f }; + // Destination rayRectangle (screen rayRectangle where drawing part of texture) + rayRectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f }; - // Origin of the texture (rotation/scale point), it's relative to destination rectangle size + // Origin of the texture (rotation/scale point), it's relative to destination rayRectangle size Vector2 origin = { (float)frameWidth, (float)frameHeight }; int rotation = 0; @@ -62,7 +62,7 @@ int main(void) // NOTE: Using DrawTexturePro() we can easily rotate and scale the part of the texture we draw // sourceRec defines the part of the texture we use for drawing - // destRec defines the rectangle where our texture part will fit (scaling it to fit) + // destRec defines the rayRectangle where our texture part will fit (scaling it to fit) // origin defines the point of the texture used as reference for rotation and scaling // rotation defines the texture rotation (using origin as rotation point) DrawTexturePro(scarfy, sourceRec, destRec, origin, (float)rotation, WHITE); @@ -80,7 +80,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(scarfy); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_svg_loading.c b/examples/textures/textures_svg_loading.c index 434ec7602..55d33fc71 100644 --- a/examples/textures/textures_svg_loading.c +++ b/examples/textures/textures_svg_loading.c @@ -53,7 +53,7 @@ int main(void) DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, WHITE); //Red border to illustrate how the SVG is centered within the specified dimensions - DrawRectangleLines((screenWidth / 2 - texture.width / 2) - 1, (screenHeight / 2 - texture.height / 2) - 1, texture.width + 2, texture.height + 2, RED); + DrawrayRectangleLines((screenWidth / 2 - texture.width / 2) - 1, (screenHeight / 2 - texture.height / 2) - 1, texture.width + 2, texture.height + 2, RED); DrawText("this IS a texture loaded from an SVG file!", 300, 410, 10, GRAY); @@ -65,7 +65,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_textured_curve.c b/examples/textures/textures_textured_curve.c index cf426becc..686468412 100644 --- a/examples/textures/textures_textured_curve.c +++ b/examples/textures/textures_textured_curve.c @@ -144,7 +144,7 @@ int main() //-------------------------------------------------------------------------------------- UnloadTexture(texRoad); - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/examples/textures/textures_to_image.c b/examples/textures/textures_to_image.c index fd3c848e8..e79eedf28 100644 --- a/examples/textures/textures_to_image.c +++ b/examples/textures/textures_to_image.c @@ -66,7 +66,7 @@ int main(void) //-------------------------------------------------------------------------------------- UnloadTexture(texture); // Texture unloading - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/parser/output/raylib_api.json b/parser/output/raylib_api.json index ef94c3d86..5e75a54fd 100644 --- a/parser/output/raylib_api.json +++ b/parser/output/raylib_api.json @@ -97,7 +97,7 @@ "description": "" }, { - "name": "RL_RECTANGLE_TYPE", + "name": "RL_rayRectangle_TYPE", "type": "GUARD", "value": "", "description": "" @@ -514,28 +514,28 @@ ] }, { - "name": "Rectangle", - "description": "Rectangle, 4 components", + "name": "rayRectangle", + "description": "rayRectangle, 4 components", "fields": [ { "type": "float", "name": "x", - "description": "Rectangle top-left corner position x" + "description": "rayRectangle top-left corner position x" }, { "type": "float", "name": "y", - "description": "Rectangle top-left corner position y" + "description": "rayRectangle top-left corner position y" }, { "type": "float", "name": "width", - "description": "Rectangle width" + "description": "rayRectangle width" }, { "type": "float", "name": "height", - "description": "Rectangle height" + "description": "rayRectangle height" } ] }, @@ -627,9 +627,9 @@ "description": "NPatchInfo, n-patch layout info", "fields": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "source", - "description": "Texture source rectangle" + "description": "Texture source rayRectangle" }, { "type": "int", @@ -714,9 +714,9 @@ "description": "Texture atlas containing the glyphs" }, { - "type": "Rectangle *", + "type": "rayRectangle *", "name": "recs", - "description": "Rectangles in texture for the glyphs" + "description": "rayRectangles in texture for the glyphs" }, { "type": "GlyphInfo *", @@ -3098,7 +3098,7 @@ "returnType": "bool" }, { - "name": "CloseWindow", + "name": "rayCloseWindow", "description": "Close window and unload OpenGL context", "returnType": "void" }, @@ -3489,7 +3489,7 @@ ] }, { - "name": "ShowCursor", + "name": "rayShowCursor", "description": "Shows cursor", "returnType": "void" }, @@ -5007,7 +5007,7 @@ }, { "name": "SetShapesTexture", - "description": "Set texture and rectangle to be used on shapes drawing", + "description": "Set texture and rayRectangle to be used on shapes drawing", "returnType": "void", "params": [ { @@ -5015,7 +5015,7 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "source" } ] @@ -5548,8 +5548,8 @@ ] }, { - "name": "DrawRectangle", - "description": "Draw a color-filled rectangle", + "name": "DrawrayRectangle", + "description": "Draw a color-filled rayRectangle", "returnType": "void", "params": [ { @@ -5575,8 +5575,8 @@ ] }, { - "name": "DrawRectangleV", - "description": "Draw a color-filled rectangle (Vector version)", + "name": "DrawrayRectangleV", + "description": "Draw a color-filled rayRectangle (Vector version)", "returnType": "void", "params": [ { @@ -5594,12 +5594,12 @@ ] }, { - "name": "DrawRectangleRec", - "description": "Draw a color-filled rectangle", + "name": "DrawrayRectangleRec", + "description": "Draw a color-filled rayRectangle", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5609,12 +5609,12 @@ ] }, { - "name": "DrawRectanglePro", - "description": "Draw a color-filled rectangle with pro parameters", + "name": "DrawrayRectanglePro", + "description": "Draw a color-filled rayRectangle with pro parameters", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5632,8 +5632,8 @@ ] }, { - "name": "DrawRectangleGradientV", - "description": "Draw a vertical-gradient-filled rectangle", + "name": "DrawrayRectangleGradientV", + "description": "Draw a vertical-gradient-filled rayRectangle", "returnType": "void", "params": [ { @@ -5663,8 +5663,8 @@ ] }, { - "name": "DrawRectangleGradientH", - "description": "Draw a horizontal-gradient-filled rectangle", + "name": "DrawrayRectangleGradientH", + "description": "Draw a horizontal-gradient-filled rayRectangle", "returnType": "void", "params": [ { @@ -5694,12 +5694,12 @@ ] }, { - "name": "DrawRectangleGradientEx", - "description": "Draw a gradient-filled rectangle with custom vertex colors", + "name": "DrawrayRectangleGradientEx", + "description": "Draw a gradient-filled rayRectangle with custom vertex colors", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5721,8 +5721,8 @@ ] }, { - "name": "DrawRectangleLines", - "description": "Draw rectangle outline", + "name": "DrawrayRectangleLines", + "description": "Draw rayRectangle outline", "returnType": "void", "params": [ { @@ -5748,12 +5748,12 @@ ] }, { - "name": "DrawRectangleLinesEx", - "description": "Draw rectangle outline with extended parameters", + "name": "DrawrayRectangleLinesEx", + "description": "Draw rayRectangle outline with extended parameters", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5767,12 +5767,12 @@ ] }, { - "name": "DrawRectangleRounded", - "description": "Draw rectangle with rounded edges", + "name": "DrawrayRectangleRounded", + "description": "Draw rayRectangle with rounded edges", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5790,12 +5790,12 @@ ] }, { - "name": "DrawRectangleRoundedLines", - "description": "Draw rectangle with rounded edges outline", + "name": "DrawrayRectangleRoundedLines", + "description": "Draw rayRectangle with rounded edges outline", "returnType": "void", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -5987,15 +5987,15 @@ }, { "name": "CheckCollisionRecs", - "description": "Check collision between two rectangles", + "description": "Check collision between two rayRectangles", "returnType": "bool", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec1" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec2" } ] @@ -6025,7 +6025,7 @@ }, { "name": "CheckCollisionCircleRec", - "description": "Check collision between circle and rectangle", + "description": "Check collision between circle and rayRectangle", "returnType": "bool", "params": [ { @@ -6037,14 +6037,14 @@ "name": "radius" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" } ] }, { "name": "CheckCollisionPointRec", - "description": "Check if point is inside rectangle", + "description": "Check if point is inside rayRectangle", "returnType": "bool", "params": [ { @@ -6052,7 +6052,7 @@ "name": "point" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" } ] @@ -6170,15 +6170,15 @@ }, { "name": "GetCollisionRec", - "description": "Get collision rectangle for two rectangles collision", - "returnType": "Rectangle", + "description": "Get collision rayRectangle for two rayRectangles collision", + "returnType": "rayRectangle", "params": [ { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec1" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec2" } ] @@ -6597,7 +6597,7 @@ "name": "image" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" } ] @@ -6680,7 +6680,7 @@ }, { "name": "ImageCrop", - "description": "Crop an image to a defined rectangle", + "description": "Crop an image to a defined rayRectangle", "returnType": "void", "params": [ { @@ -6688,7 +6688,7 @@ "name": "image" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "crop" } ] @@ -7074,8 +7074,8 @@ }, { "name": "GetImageAlphaBorder", - "description": "Get image alpha border rectangle", - "returnType": "Rectangle", + "description": "Get image alpha border rayRectangle", + "returnType": "rayRectangle", "params": [ { "type": "Image", @@ -7318,8 +7318,8 @@ ] }, { - "name": "ImageDrawRectangle", - "description": "Draw rectangle within an image", + "name": "ImageDrawrayRectangle", + "description": "Draw rayRectangle within an image", "returnType": "void", "params": [ { @@ -7349,8 +7349,8 @@ ] }, { - "name": "ImageDrawRectangleV", - "description": "Draw rectangle within an image (Vector version)", + "name": "ImageDrawrayRectangleV", + "description": "Draw rayRectangle within an image (Vector version)", "returnType": "void", "params": [ { @@ -7372,8 +7372,8 @@ ] }, { - "name": "ImageDrawRectangleRec", - "description": "Draw rectangle within an image", + "name": "ImageDrawrayRectangleRec", + "description": "Draw rayRectangle within an image", "returnType": "void", "params": [ { @@ -7381,7 +7381,7 @@ "name": "dst" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -7391,8 +7391,8 @@ ] }, { - "name": "ImageDrawRectangleLines", - "description": "Draw rectangle lines within an image", + "name": "ImageDrawrayRectangleLines", + "description": "Draw rayRectangle lines within an image", "returnType": "void", "params": [ { @@ -7400,7 +7400,7 @@ "name": "dst" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -7427,11 +7427,11 @@ "name": "src" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "srcRec" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "dstRec" }, { @@ -7619,7 +7619,7 @@ }, { "name": "UpdateTextureRec", - "description": "Update GPU texture rectangle with new data", + "description": "Update GPU texture rayRectangle with new data", "returnType": "void", "params": [ { @@ -7627,7 +7627,7 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "rec" }, { @@ -7748,7 +7748,7 @@ }, { "name": "DrawTextureRec", - "description": "Draw a part of a texture defined by a rectangle", + "description": "Draw a part of a texture defined by a rayRectangle", "returnType": "void", "params": [ { @@ -7756,7 +7756,7 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "source" }, { @@ -7771,7 +7771,7 @@ }, { "name": "DrawTexturePro", - "description": "Draw a part of a texture defined by a rectangle with 'pro' parameters", + "description": "Draw a part of a texture defined by a rayRectangle with 'pro' parameters", "returnType": "void", "params": [ { @@ -7779,11 +7779,11 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "source" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "dest" }, { @@ -7814,7 +7814,7 @@ "name": "nPatchInfo" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "dest" }, { @@ -8193,7 +8193,7 @@ "name": "glyphs" }, { - "type": "Rectangle **", + "type": "rayRectangle **", "name": "glyphRecs" }, { @@ -8510,8 +8510,8 @@ }, { "name": "GetGlyphAtlasRec", - "description": "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found", - "returnType": "Rectangle", + "description": "Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found", + "returnType": "rayRectangle", "params": [ { "type": "Font", @@ -9597,7 +9597,7 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "source" }, { @@ -9628,7 +9628,7 @@ "name": "texture" }, { - "type": "Rectangle", + "type": "rayRectangle", "name": "source" }, { diff --git a/parser/output/raylib_api.lua b/parser/output/raylib_api.lua index 26b2564a5..7e9079fb0 100644 --- a/parser/output/raylib_api.lua +++ b/parser/output/raylib_api.lua @@ -97,7 +97,7 @@ return { description = "" }, { - name = "RL_RECTANGLE_TYPE", + name = "RL_rayRectangle_TYPE", type = "GUARD", value = "", description = "" @@ -514,28 +514,28 @@ return { } }, { - name = "Rectangle", - description = "Rectangle, 4 components", + name = "rayRectangle", + description = "rayRectangle, 4 components", fields = { { type = "float", name = "x", - description = "Rectangle top-left corner position x" + description = "rayRectangle top-left corner position x" }, { type = "float", name = "y", - description = "Rectangle top-left corner position y" + description = "rayRectangle top-left corner position y" }, { type = "float", name = "width", - description = "Rectangle width" + description = "rayRectangle width" }, { type = "float", name = "height", - description = "Rectangle height" + description = "rayRectangle height" } } }, @@ -627,9 +627,9 @@ return { description = "NPatchInfo, n-patch layout info", fields = { { - type = "Rectangle", + type = "rayRectangle", name = "source", - description = "Texture source rectangle" + description = "Texture source rayRectangle" }, { type = "int", @@ -714,9 +714,9 @@ return { description = "Texture atlas containing the glyphs" }, { - type = "Rectangle *", + type = "rayRectangle *", name = "recs", - description = "Rectangles in texture for the glyphs" + description = "rayRectangles in texture for the glyphs" }, { type = "GlyphInfo *", @@ -3050,7 +3050,7 @@ return { returnType = "bool" }, { - name = "CloseWindow", + name = "rayCloseWindow", description = "Close window and unload OpenGL context", returnType = "void" }, @@ -3363,7 +3363,7 @@ return { } }, { - name = "ShowCursor", + name = "rayShowCursor", description = "Shows cursor", returnType = "void" }, @@ -4413,11 +4413,11 @@ return { }, { name = "SetShapesTexture", - description = "Set texture and rectangle to be used on shapes drawing", + description = "Set texture and rayRectangle to be used on shapes drawing", returnType = "void", params = { {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "source"} + {type = "rayRectangle", name = "source"} } }, { @@ -4663,8 +4663,8 @@ return { } }, { - name = "DrawRectangle", - description = "Draw a color-filled rectangle", + name = "DrawrayRectangle", + description = "Draw a color-filled rayRectangle", returnType = "void", params = { {type = "int", name = "posX"}, @@ -4675,8 +4675,8 @@ return { } }, { - name = "DrawRectangleV", - description = "Draw a color-filled rectangle (Vector version)", + name = "DrawrayRectangleV", + description = "Draw a color-filled rayRectangle (Vector version)", returnType = "void", params = { {type = "Vector2", name = "position"}, @@ -4685,28 +4685,28 @@ return { } }, { - name = "DrawRectangleRec", - description = "Draw a color-filled rectangle", + name = "DrawrayRectangleRec", + description = "Draw a color-filled rayRectangle", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "Color", name = "color"} } }, { - name = "DrawRectanglePro", - description = "Draw a color-filled rectangle with pro parameters", + name = "DrawrayRectanglePro", + description = "Draw a color-filled rayRectangle with pro parameters", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "Vector2", name = "origin"}, {type = "float", name = "rotation"}, {type = "Color", name = "color"} } }, { - name = "DrawRectangleGradientV", - description = "Draw a vertical-gradient-filled rectangle", + name = "DrawrayRectangleGradientV", + description = "Draw a vertical-gradient-filled rayRectangle", returnType = "void", params = { {type = "int", name = "posX"}, @@ -4718,8 +4718,8 @@ return { } }, { - name = "DrawRectangleGradientH", - description = "Draw a horizontal-gradient-filled rectangle", + name = "DrawrayRectangleGradientH", + description = "Draw a horizontal-gradient-filled rayRectangle", returnType = "void", params = { {type = "int", name = "posX"}, @@ -4731,11 +4731,11 @@ return { } }, { - name = "DrawRectangleGradientEx", - description = "Draw a gradient-filled rectangle with custom vertex colors", + name = "DrawrayRectangleGradientEx", + description = "Draw a gradient-filled rayRectangle with custom vertex colors", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "Color", name = "col1"}, {type = "Color", name = "col2"}, {type = "Color", name = "col3"}, @@ -4743,8 +4743,8 @@ return { } }, { - name = "DrawRectangleLines", - description = "Draw rectangle outline", + name = "DrawrayRectangleLines", + description = "Draw rayRectangle outline", returnType = "void", params = { {type = "int", name = "posX"}, @@ -4755,32 +4755,32 @@ return { } }, { - name = "DrawRectangleLinesEx", - description = "Draw rectangle outline with extended parameters", + name = "DrawrayRectangleLinesEx", + description = "Draw rayRectangle outline with extended parameters", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "float", name = "lineThick"}, {type = "Color", name = "color"} } }, { - name = "DrawRectangleRounded", - description = "Draw rectangle with rounded edges", + name = "DrawrayRectangleRounded", + description = "Draw rayRectangle with rounded edges", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "float", name = "roundness"}, {type = "int", name = "segments"}, {type = "Color", name = "color"} } }, { - name = "DrawRectangleRoundedLines", - description = "Draw rectangle with rounded edges outline", + name = "DrawrayRectangleRoundedLines", + description = "Draw rayRectangle with rounded edges outline", returnType = "void", params = { - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "float", name = "roundness"}, {type = "int", name = "segments"}, {type = "float", name = "lineThick"}, @@ -4868,11 +4868,11 @@ return { }, { name = "CheckCollisionRecs", - description = "Check collision between two rectangles", + description = "Check collision between two rayRectangles", returnType = "bool", params = { - {type = "Rectangle", name = "rec1"}, - {type = "Rectangle", name = "rec2"} + {type = "rayRectangle", name = "rec1"}, + {type = "rayRectangle", name = "rec2"} } }, { @@ -4888,21 +4888,21 @@ return { }, { name = "CheckCollisionCircleRec", - description = "Check collision between circle and rectangle", + description = "Check collision between circle and rayRectangle", returnType = "bool", params = { {type = "Vector2", name = "center"}, {type = "float", name = "radius"}, - {type = "Rectangle", name = "rec"} + {type = "rayRectangle", name = "rec"} } }, { name = "CheckCollisionPointRec", - description = "Check if point is inside rectangle", + description = "Check if point is inside rayRectangle", returnType = "bool", params = { {type = "Vector2", name = "point"}, - {type = "Rectangle", name = "rec"} + {type = "rayRectangle", name = "rec"} } }, { @@ -4961,11 +4961,11 @@ return { }, { name = "GetCollisionRec", - description = "Get collision rectangle for two rectangles collision", - returnType = "Rectangle", + description = "Get collision rayRectangle for two rayRectangles collision", + returnType = "rayRectangle", params = { - {type = "Rectangle", name = "rec1"}, - {type = "Rectangle", name = "rec2"} + {type = "rayRectangle", name = "rec1"}, + {type = "rayRectangle", name = "rec2"} } }, { @@ -5189,7 +5189,7 @@ return { returnType = "Image", params = { {type = "Image", name = "image"}, - {type = "Rectangle", name = "rec"} + {type = "rayRectangle", name = "rec"} } }, { @@ -5234,11 +5234,11 @@ return { }, { name = "ImageCrop", - description = "Crop an image to a defined rectangle", + description = "Crop an image to a defined rayRectangle", returnType = "void", params = { {type = "Image *", name = "image"}, - {type = "Rectangle", name = "crop"} + {type = "rayRectangle", name = "crop"} } }, { @@ -5469,8 +5469,8 @@ return { }, { name = "GetImageAlphaBorder", - description = "Get image alpha border rectangle", - returnType = "Rectangle", + description = "Get image alpha border rayRectangle", + returnType = "rayRectangle", params = { {type = "Image", name = "image"}, {type = "float", name = "threshold"} @@ -5587,8 +5587,8 @@ return { } }, { - name = "ImageDrawRectangle", - description = "Draw rectangle within an image", + name = "ImageDrawrayRectangle", + description = "Draw rayRectangle within an image", returnType = "void", params = { {type = "Image *", name = "dst"}, @@ -5600,8 +5600,8 @@ return { } }, { - name = "ImageDrawRectangleV", - description = "Draw rectangle within an image (Vector version)", + name = "ImageDrawrayRectangleV", + description = "Draw rayRectangle within an image (Vector version)", returnType = "void", params = { {type = "Image *", name = "dst"}, @@ -5611,22 +5611,22 @@ return { } }, { - name = "ImageDrawRectangleRec", - description = "Draw rectangle within an image", + name = "ImageDrawrayRectangleRec", + description = "Draw rayRectangle within an image", returnType = "void", params = { {type = "Image *", name = "dst"}, - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "Color", name = "color"} } }, { - name = "ImageDrawRectangleLines", - description = "Draw rectangle lines within an image", + name = "ImageDrawrayRectangleLines", + description = "Draw rayRectangle lines within an image", returnType = "void", params = { {type = "Image *", name = "dst"}, - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "int", name = "thick"}, {type = "Color", name = "color"} } @@ -5638,8 +5638,8 @@ return { params = { {type = "Image *", name = "dst"}, {type = "Image", name = "src"}, - {type = "Rectangle", name = "srcRec"}, - {type = "Rectangle", name = "dstRec"}, + {type = "rayRectangle", name = "srcRec"}, + {type = "rayRectangle", name = "dstRec"}, {type = "Color", name = "tint"} } }, @@ -5747,11 +5747,11 @@ return { }, { name = "UpdateTextureRec", - description = "Update GPU texture rectangle with new data", + description = "Update GPU texture rayRectangle with new data", returnType = "void", params = { {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "rec"}, + {type = "rayRectangle", name = "rec"}, {type = "const void *", name = "pixels"} } }, @@ -5816,23 +5816,23 @@ return { }, { name = "DrawTextureRec", - description = "Draw a part of a texture defined by a rectangle", + description = "Draw a part of a texture defined by a rayRectangle", returnType = "void", params = { {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "source"}, + {type = "rayRectangle", name = "source"}, {type = "Vector2", name = "position"}, {type = "Color", name = "tint"} } }, { name = "DrawTexturePro", - description = "Draw a part of a texture defined by a rectangle with 'pro' parameters", + description = "Draw a part of a texture defined by a rayRectangle with 'pro' parameters", returnType = "void", params = { {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "source"}, - {type = "Rectangle", name = "dest"}, + {type = "rayRectangle", name = "source"}, + {type = "rayRectangle", name = "dest"}, {type = "Vector2", name = "origin"}, {type = "float", name = "rotation"}, {type = "Color", name = "tint"} @@ -5845,7 +5845,7 @@ return { params = { {type = "Texture2D", name = "texture"}, {type = "NPatchInfo", name = "nPatchInfo"}, - {type = "Rectangle", name = "dest"}, + {type = "rayRectangle", name = "dest"}, {type = "Vector2", name = "origin"}, {type = "float", name = "rotation"}, {type = "Color", name = "tint"} @@ -6059,7 +6059,7 @@ return { returnType = "Image", params = { {type = "const GlyphInfo *", name = "glyphs"}, - {type = "Rectangle **", name = "glyphRecs"}, + {type = "rayRectangle **", name = "glyphRecs"}, {type = "int", name = "glyphCount"}, {type = "int", name = "fontSize"}, {type = "int", name = "padding"}, @@ -6215,8 +6215,8 @@ return { }, { name = "GetGlyphAtlasRec", - description = "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found", - returnType = "Rectangle", + description = "Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found", + returnType = "rayRectangle", params = { {type = "Font", name = "font"}, {type = "int", name = "codepoint"} @@ -6788,7 +6788,7 @@ return { params = { {type = "Camera", name = "camera"}, {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "source"}, + {type = "rayRectangle", name = "source"}, {type = "Vector3", name = "position"}, {type = "Vector2", name = "size"}, {type = "Color", name = "tint"} @@ -6801,7 +6801,7 @@ return { params = { {type = "Camera", name = "camera"}, {type = "Texture2D", name = "texture"}, - {type = "Rectangle", name = "source"}, + {type = "rayRectangle", name = "source"}, {type = "Vector3", name = "position"}, {type = "Vector3", name = "up"}, {type = "Vector2", name = "size"}, diff --git a/parser/output/raylib_api.txt b/parser/output/raylib_api.txt index 725d6ae91..eff753319 100644 --- a/parser/output/raylib_api.txt +++ b/parser/output/raylib_api.txt @@ -81,8 +81,8 @@ Define 016: RL_COLOR_TYPE Type: GUARD Value: Description: -Define 017: RL_RECTANGLE_TYPE - Name: RL_RECTANGLE_TYPE +Define 017: RL_rayRectangle_TYPE + Name: RL_rayRectangle_TYPE Type: GUARD Value: Description: @@ -328,13 +328,13 @@ Struct 05: Color (4 fields) Field[2]: unsigned char g // Color green value Field[3]: unsigned char b // Color blue value Field[4]: unsigned char a // Color alpha value -Struct 06: Rectangle (4 fields) - Name: Rectangle - Description: Rectangle, 4 components - Field[1]: float x // Rectangle top-left corner position x - Field[2]: float y // Rectangle top-left corner position y - Field[3]: float width // Rectangle width - Field[4]: float height // Rectangle height +Struct 06: rayRectangle (4 fields) + Name: rayRectangle + Description: rayRectangle, 4 components + Field[1]: float x // rayRectangle top-left corner position x + Field[2]: float y // rayRectangle top-left corner position y + Field[3]: float width // rayRectangle width + Field[4]: float height // rayRectangle height Struct 07: Image (5 fields) Name: Image Description: Image, pixel data stored in CPU memory (RAM) @@ -360,7 +360,7 @@ Struct 09: RenderTexture (3 fields) Struct 10: NPatchInfo (6 fields) Name: NPatchInfo Description: NPatchInfo, n-patch layout info - Field[1]: Rectangle source // Texture source rectangle + Field[1]: rayRectangle source // Texture source rayRectangle Field[2]: int left // Left border offset Field[3]: int top // Top border offset Field[4]: int right // Right border offset @@ -381,7 +381,7 @@ Struct 12: Font (6 fields) Field[2]: int glyphCount // Number of glyph characters Field[3]: int glyphPadding // Padding around the glyph characters Field[4]: Texture2D texture // Texture atlas containing the glyphs - Field[5]: Rectangle * recs // Rectangles in texture for the glyphs + Field[5]: rayRectangle * recs // rayRectangles in texture for the glyphs Field[6]: GlyphInfo * glyphs // Glyphs info data Struct 13: Camera3D (5 fields) Name: Camera3D @@ -982,8 +982,8 @@ Function 002: WindowShouldClose() (0 input parameters) Return type: bool Description: Check if KEY_ESCAPE pressed or Close icon pressed No input parameters -Function 003: CloseWindow() (0 input parameters) - Name: CloseWindow +Function 003: rayCloseWindow() (0 input parameters) + Name: rayCloseWindow Return type: void Description: Close window and unload OpenGL context No input parameters @@ -1232,8 +1232,8 @@ Function 051: WaitTime() (1 input parameters) Return type: void Description: Wait for some time (halt program execution) Param[1]: seconds (type: double) -Function 052: ShowCursor() (0 input parameters) - Name: ShowCursor +Function 052: rayShowCursor() (0 input parameters) + Name: rayShowCursor Return type: void Description: Shows cursor No input parameters @@ -1987,9 +1987,9 @@ Function 190: UpdateCameraPro() (4 input parameters) Function 191: SetShapesTexture() (2 input parameters) Name: SetShapesTexture Return type: void - Description: Set texture and rectangle to be used on shapes drawing + Description: Set texture and rayRectangle to be used on shapes drawing Param[1]: texture (type: Texture2D) - Param[2]: source (type: Rectangle) + Param[2]: source (type: rayRectangle) Function 192: DrawPixel() (3 input parameters) Name: DrawPixel Return type: void @@ -2169,94 +2169,94 @@ Function 212: DrawRingLines() (7 input parameters) Param[5]: endAngle (type: float) Param[6]: segments (type: int) Param[7]: color (type: Color) -Function 213: DrawRectangle() (5 input parameters) - Name: DrawRectangle +Function 213: DrawrayRectangle() (5 input parameters) + Name: DrawrayRectangle Return type: void - Description: Draw a color-filled rectangle + Description: Draw a color-filled rayRectangle Param[1]: posX (type: int) Param[2]: posY (type: int) Param[3]: width (type: int) Param[4]: height (type: int) Param[5]: color (type: Color) -Function 214: DrawRectangleV() (3 input parameters) - Name: DrawRectangleV +Function 214: DrawrayRectangleV() (3 input parameters) + Name: DrawrayRectangleV Return type: void - Description: Draw a color-filled rectangle (Vector version) + Description: Draw a color-filled rayRectangle (Vector version) Param[1]: position (type: Vector2) Param[2]: size (type: Vector2) Param[3]: color (type: Color) -Function 215: DrawRectangleRec() (2 input parameters) - Name: DrawRectangleRec +Function 215: DrawrayRectangleRec() (2 input parameters) + Name: DrawrayRectangleRec Return type: void - Description: Draw a color-filled rectangle - Param[1]: rec (type: Rectangle) + Description: Draw a color-filled rayRectangle + Param[1]: rec (type: rayRectangle) Param[2]: color (type: Color) -Function 216: DrawRectanglePro() (4 input parameters) - Name: DrawRectanglePro +Function 216: DrawrayRectanglePro() (4 input parameters) + Name: DrawrayRectanglePro Return type: void - Description: Draw a color-filled rectangle with pro parameters - Param[1]: rec (type: Rectangle) + Description: Draw a color-filled rayRectangle with pro parameters + Param[1]: rec (type: rayRectangle) Param[2]: origin (type: Vector2) Param[3]: rotation (type: float) Param[4]: color (type: Color) -Function 217: DrawRectangleGradientV() (6 input parameters) - Name: DrawRectangleGradientV +Function 217: DrawrayRectangleGradientV() (6 input parameters) + Name: DrawrayRectangleGradientV Return type: void - Description: Draw a vertical-gradient-filled rectangle + Description: Draw a vertical-gradient-filled rayRectangle Param[1]: posX (type: int) Param[2]: posY (type: int) Param[3]: width (type: int) Param[4]: height (type: int) Param[5]: color1 (type: Color) Param[6]: color2 (type: Color) -Function 218: DrawRectangleGradientH() (6 input parameters) - Name: DrawRectangleGradientH +Function 218: DrawrayRectangleGradientH() (6 input parameters) + Name: DrawrayRectangleGradientH Return type: void - Description: Draw a horizontal-gradient-filled rectangle + Description: Draw a horizontal-gradient-filled rayRectangle Param[1]: posX (type: int) Param[2]: posY (type: int) Param[3]: width (type: int) Param[4]: height (type: int) Param[5]: color1 (type: Color) Param[6]: color2 (type: Color) -Function 219: DrawRectangleGradientEx() (5 input parameters) - Name: DrawRectangleGradientEx +Function 219: DrawrayRectangleGradientEx() (5 input parameters) + Name: DrawrayRectangleGradientEx Return type: void - Description: Draw a gradient-filled rectangle with custom vertex colors - Param[1]: rec (type: Rectangle) + Description: Draw a gradient-filled rayRectangle with custom vertex colors + Param[1]: rec (type: rayRectangle) Param[2]: col1 (type: Color) Param[3]: col2 (type: Color) Param[4]: col3 (type: Color) Param[5]: col4 (type: Color) -Function 220: DrawRectangleLines() (5 input parameters) - Name: DrawRectangleLines +Function 220: DrawrayRectangleLines() (5 input parameters) + Name: DrawrayRectangleLines Return type: void - Description: Draw rectangle outline + Description: Draw rayRectangle outline Param[1]: posX (type: int) Param[2]: posY (type: int) Param[3]: width (type: int) Param[4]: height (type: int) Param[5]: color (type: Color) -Function 221: DrawRectangleLinesEx() (3 input parameters) - Name: DrawRectangleLinesEx +Function 221: DrawrayRectangleLinesEx() (3 input parameters) + Name: DrawrayRectangleLinesEx Return type: void - Description: Draw rectangle outline with extended parameters - Param[1]: rec (type: Rectangle) + Description: Draw rayRectangle outline with extended parameters + Param[1]: rec (type: rayRectangle) Param[2]: lineThick (type: float) Param[3]: color (type: Color) -Function 222: DrawRectangleRounded() (4 input parameters) - Name: DrawRectangleRounded +Function 222: DrawrayRectangleRounded() (4 input parameters) + Name: DrawrayRectangleRounded Return type: void - Description: Draw rectangle with rounded edges - Param[1]: rec (type: Rectangle) + Description: Draw rayRectangle with rounded edges + Param[1]: rec (type: rayRectangle) Param[2]: roundness (type: float) Param[3]: segments (type: int) Param[4]: color (type: Color) -Function 223: DrawRectangleRoundedLines() (5 input parameters) - Name: DrawRectangleRoundedLines +Function 223: DrawrayRectangleRoundedLines() (5 input parameters) + Name: DrawrayRectangleRoundedLines Return type: void - Description: Draw rectangle with rounded edges outline - Param[1]: rec (type: Rectangle) + Description: Draw rayRectangle with rounded edges outline + Param[1]: rec (type: rayRectangle) Param[2]: roundness (type: float) Param[3]: segments (type: int) Param[4]: lineThick (type: float) @@ -2322,9 +2322,9 @@ Function 230: DrawPolyLinesEx() (6 input parameters) Function 231: CheckCollisionRecs() (2 input parameters) Name: CheckCollisionRecs Return type: bool - Description: Check collision between two rectangles - Param[1]: rec1 (type: Rectangle) - Param[2]: rec2 (type: Rectangle) + Description: Check collision between two rayRectangles + Param[1]: rec1 (type: rayRectangle) + Param[2]: rec2 (type: rayRectangle) Function 232: CheckCollisionCircles() (4 input parameters) Name: CheckCollisionCircles Return type: bool @@ -2336,16 +2336,16 @@ Function 232: CheckCollisionCircles() (4 input parameters) Function 233: CheckCollisionCircleRec() (3 input parameters) Name: CheckCollisionCircleRec Return type: bool - Description: Check collision between circle and rectangle + Description: Check collision between circle and rayRectangle Param[1]: center (type: Vector2) Param[2]: radius (type: float) - Param[3]: rec (type: Rectangle) + Param[3]: rec (type: rayRectangle) Function 234: CheckCollisionPointRec() (2 input parameters) Name: CheckCollisionPointRec Return type: bool - Description: Check if point is inside rectangle + Description: Check if point is inside rayRectangle Param[1]: point (type: Vector2) - Param[2]: rec (type: Rectangle) + Param[2]: rec (type: rayRectangle) Function 235: CheckCollisionPointCircle() (3 input parameters) Name: CheckCollisionPointCircle Return type: bool @@ -2387,10 +2387,10 @@ Function 239: CheckCollisionPointLine() (4 input parameters) Param[4]: threshold (type: int) Function 240: GetCollisionRec() (2 input parameters) Name: GetCollisionRec - Return type: Rectangle - Description: Get collision rectangle for two rectangles collision - Param[1]: rec1 (type: Rectangle) - Param[2]: rec2 (type: Rectangle) + Return type: rayRectangle + Description: Get collision rayRectangle for two rayRectangles collision + Param[1]: rec1 (type: rayRectangle) + Param[2]: rec2 (type: rayRectangle) Function 241: LoadImage() (1 input parameters) Name: LoadImage Return type: Image @@ -2548,7 +2548,7 @@ Function 263: ImageFromImage() (2 input parameters) Return type: Image Description: Create an image from another image piece Param[1]: image (type: Image) - Param[2]: rec (type: Rectangle) + Param[2]: rec (type: rayRectangle) Function 264: ImageText() (3 input parameters) Name: ImageText Return type: Image @@ -2580,9 +2580,9 @@ Function 267: ImageToPOT() (2 input parameters) Function 268: ImageCrop() (2 input parameters) Name: ImageCrop Return type: void - Description: Crop an image to a defined rectangle + Description: Crop an image to a defined rayRectangle Param[1]: image (type: Image *) - Param[2]: crop (type: Rectangle) + Param[2]: crop (type: rayRectangle) Function 269: ImageAlphaCrop() (2 input parameters) Name: ImageAlphaCrop Return type: void @@ -2736,8 +2736,8 @@ Function 293: UnloadImagePalette() (1 input parameters) Param[1]: colors (type: Color *) Function 294: GetImageAlphaBorder() (2 input parameters) Name: GetImageAlphaBorder - Return type: Rectangle - Description: Get image alpha border rectangle + Return type: rayRectangle + Description: Get image alpha border rayRectangle Param[1]: image (type: Image) Param[2]: threshold (type: float) Function 295: GetImageColor() (3 input parameters) @@ -2820,37 +2820,37 @@ Function 304: ImageDrawCircleLinesV() (4 input parameters) Param[2]: center (type: Vector2) Param[3]: radius (type: int) Param[4]: color (type: Color) -Function 305: ImageDrawRectangle() (6 input parameters) - Name: ImageDrawRectangle +Function 305: ImageDrawrayRectangle() (6 input parameters) + Name: ImageDrawrayRectangle Return type: void - Description: Draw rectangle within an image + Description: Draw rayRectangle within an image Param[1]: dst (type: Image *) Param[2]: posX (type: int) Param[3]: posY (type: int) Param[4]: width (type: int) Param[5]: height (type: int) Param[6]: color (type: Color) -Function 306: ImageDrawRectangleV() (4 input parameters) - Name: ImageDrawRectangleV +Function 306: ImageDrawrayRectangleV() (4 input parameters) + Name: ImageDrawrayRectangleV Return type: void - Description: Draw rectangle within an image (Vector version) + Description: Draw rayRectangle within an image (Vector version) Param[1]: dst (type: Image *) Param[2]: position (type: Vector2) Param[3]: size (type: Vector2) Param[4]: color (type: Color) -Function 307: ImageDrawRectangleRec() (3 input parameters) - Name: ImageDrawRectangleRec +Function 307: ImageDrawrayRectangleRec() (3 input parameters) + Name: ImageDrawrayRectangleRec Return type: void - Description: Draw rectangle within an image + Description: Draw rayRectangle within an image Param[1]: dst (type: Image *) - Param[2]: rec (type: Rectangle) + Param[2]: rec (type: rayRectangle) Param[3]: color (type: Color) -Function 308: ImageDrawRectangleLines() (4 input parameters) - Name: ImageDrawRectangleLines +Function 308: ImageDrawrayRectangleLines() (4 input parameters) + Name: ImageDrawrayRectangleLines Return type: void - Description: Draw rectangle lines within an image + Description: Draw rayRectangle lines within an image Param[1]: dst (type: Image *) - Param[2]: rec (type: Rectangle) + Param[2]: rec (type: rayRectangle) Param[3]: thick (type: int) Param[4]: color (type: Color) Function 309: ImageDraw() (5 input parameters) @@ -2859,8 +2859,8 @@ Function 309: ImageDraw() (5 input parameters) Description: Draw a source image within a destination image (tint applied to source) Param[1]: dst (type: Image *) Param[2]: src (type: Image) - Param[3]: srcRec (type: Rectangle) - Param[4]: dstRec (type: Rectangle) + Param[3]: srcRec (type: rayRectangle) + Param[4]: dstRec (type: rayRectangle) Param[5]: tint (type: Color) Function 310: ImageDrawText() (6 input parameters) Name: ImageDrawText @@ -2934,9 +2934,9 @@ Function 320: UpdateTexture() (2 input parameters) Function 321: UpdateTextureRec() (3 input parameters) Name: UpdateTextureRec Return type: void - Description: Update GPU texture rectangle with new data + Description: Update GPU texture rayRectangle with new data Param[1]: texture (type: Texture2D) - Param[2]: rec (type: Rectangle) + Param[2]: rec (type: rayRectangle) Param[3]: pixels (type: const void *) Function 322: GenTextureMipmaps() (1 input parameters) Name: GenTextureMipmaps @@ -2982,18 +2982,18 @@ Function 327: DrawTextureEx() (5 input parameters) Function 328: DrawTextureRec() (4 input parameters) Name: DrawTextureRec Return type: void - Description: Draw a part of a texture defined by a rectangle + Description: Draw a part of a texture defined by a rayRectangle Param[1]: texture (type: Texture2D) - Param[2]: source (type: Rectangle) + Param[2]: source (type: rayRectangle) Param[3]: position (type: Vector2) Param[4]: tint (type: Color) Function 329: DrawTexturePro() (6 input parameters) Name: DrawTexturePro Return type: void - Description: Draw a part of a texture defined by a rectangle with 'pro' parameters + Description: Draw a part of a texture defined by a rayRectangle with 'pro' parameters Param[1]: texture (type: Texture2D) - Param[2]: source (type: Rectangle) - Param[3]: dest (type: Rectangle) + Param[2]: source (type: rayRectangle) + Param[3]: dest (type: rayRectangle) Param[4]: origin (type: Vector2) Param[5]: rotation (type: float) Param[6]: tint (type: Color) @@ -3003,7 +3003,7 @@ Function 330: DrawTextureNPatch() (6 input parameters) Description: Draws a texture (or part of it) that stretches or shrinks nicely Param[1]: texture (type: Texture2D) Param[2]: nPatchInfo (type: NPatchInfo) - Param[3]: dest (type: Rectangle) + Param[3]: dest (type: rayRectangle) Param[4]: origin (type: Vector2) Param[5]: rotation (type: float) Param[6]: tint (type: Color) @@ -3151,7 +3151,7 @@ Function 353: GenImageFontAtlas() (6 input parameters) Return type: Image Description: Generate image font atlas using chars info Param[1]: glyphs (type: const GlyphInfo *) - Param[2]: glyphRecs (type: Rectangle **) + Param[2]: glyphRecs (type: rayRectangle **) Param[3]: glyphCount (type: int) Param[4]: fontSize (type: int) Param[5]: padding (type: int) @@ -3263,8 +3263,8 @@ Function 367: GetGlyphInfo() (2 input parameters) Param[2]: codepoint (type: int) Function 368: GetGlyphAtlasRec() (2 input parameters) Name: GetGlyphAtlasRec - Return type: Rectangle - Description: Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found + Return type: rayRectangle + Description: Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found Param[1]: font (type: Font) Param[2]: codepoint (type: int) Function 369: LoadUTF8() (2 input parameters) @@ -3664,7 +3664,7 @@ Function 425: DrawBillboardRec() (6 input parameters) Description: Draw a billboard texture defined by source Param[1]: camera (type: Camera) Param[2]: texture (type: Texture2D) - Param[3]: source (type: Rectangle) + Param[3]: source (type: rayRectangle) Param[4]: position (type: Vector3) Param[5]: size (type: Vector2) Param[6]: tint (type: Color) @@ -3674,7 +3674,7 @@ Function 426: DrawBillboardPro() (9 input parameters) Description: Draw a billboard texture defined by source and rotation Param[1]: camera (type: Camera) Param[2]: texture (type: Texture2D) - Param[3]: source (type: Rectangle) + Param[3]: source (type: rayRectangle) Param[4]: position (type: Vector3) Param[5]: up (type: Vector3) Param[6]: size (type: Vector2) diff --git a/parser/output/raylib_api.xml b/parser/output/raylib_api.xml index aa7605b8b..d00651e6c 100644 --- a/parser/output/raylib_api.xml +++ b/parser/output/raylib_api.xml @@ -17,7 +17,7 @@ - + @@ -98,11 +98,11 @@ - - - - - + + + + + @@ -124,7 +124,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -668,7 +668,7 @@ - + @@ -792,7 +792,7 @@ - + @@ -1226,9 +1226,9 @@ - + - + @@ -1367,29 +1367,29 @@ - + - + - - + + - - + + - + @@ -1397,7 +1397,7 @@ - + @@ -1405,33 +1405,33 @@ - - + + - + - - + + - - + + - - + + @@ -1481,9 +1481,9 @@ - - - + + + @@ -1491,14 +1491,14 @@ - + - + - + - + @@ -1529,9 +1529,9 @@ - - - + + + @@ -1642,7 +1642,7 @@ - + @@ -1664,9 +1664,9 @@ - + - + @@ -1769,7 +1769,7 @@ - + @@ -1833,7 +1833,7 @@ - + @@ -1841,28 +1841,28 @@ - + - + - + - + - + - - + + @@ -1912,9 +1912,9 @@ - + - + @@ -1946,16 +1946,16 @@ - + - + - + - - + + @@ -1963,7 +1963,7 @@ - + @@ -2064,7 +2064,7 @@ - + @@ -2147,7 +2147,7 @@ - + @@ -2433,7 +2433,7 @@ - + @@ -2441,7 +2441,7 @@ - + diff --git a/projects/4coder/main.c b/projects/4coder/main.c index 4abae398f..36bba11fc 100644 --- a/projects/4coder/main.c +++ b/projects/4coder/main.c @@ -33,6 +33,6 @@ int main() { EndDrawing(); } - CloseWindow(); + rayCloseWindow(); return 0; } \ No newline at end of file diff --git a/projects/CMake/core_basic_window.c b/projects/CMake/core_basic_window.c index 86709f7a9..0c7c4cf8f 100644 --- a/projects/CMake/core_basic_window.c +++ b/projects/CMake/core_basic_window.c @@ -54,7 +54,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/projects/CodeBlocks/core_basic_window.c b/projects/CodeBlocks/core_basic_window.c index da5b2e010..2b53065ac 100644 --- a/projects/CodeBlocks/core_basic_window.c +++ b/projects/CodeBlocks/core_basic_window.c @@ -51,7 +51,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/projects/Geany/core_basic_window.c b/projects/Geany/core_basic_window.c index c4dd584a5..4faefa749 100644 --- a/projects/Geany/core_basic_window.c +++ b/projects/Geany/core_basic_window.c @@ -45,7 +45,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/projects/Geany/raylib.c.tags b/projects/Geany/raylib.c.tags index 79a192a14..626490c4a 100644 --- a/projects/Geany/raylib.c.tags +++ b/projects/Geany/raylib.c.tags @@ -1,7 +1,7 @@ # format=pipe InitWindow|void|(int width, int height, const char *title);| WindowShouldClose|bool|(void);| -CloseWindow|void|(void);| +rayCloseWindow|void|(void);| IsWindowReady|bool|(void);| IsWindowMinimized|bool|(void);| IsWindowResized|bool|(void);| @@ -26,7 +26,7 @@ GetMonitorPhysicalHeight|int|(int monitor);| GetMonitorName|const char *|(int monitor);| GetClipboardText|const char *|(void);| SetClipboardText|void|(const char *text);| -ShowCursor|void|(void);| +rayShowCursor|void|(void);| HideCursor|void|(void);| IsCursorHidden|bool|(void);| EnableCursor|void|(void);| @@ -136,28 +136,28 @@ DrawCircleV|void|(Vector2 center, float radius, Color color);| DrawCircleLines|void|(int centerX, int centerY, float radius, Color color);| DrawRing|void|(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color);| DrawRingLines|void|(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color);| -DrawRectangle|void|(int posX, int posY, int width, int height, Color color);| -DrawRectangleV|void|(Vector2 position, Vector2 size, Color color);| -DrawRectangleRec|void|(Rectangle rec, Color color);| -DrawRectanglePro|void|(Rectangle rec, Vector2 origin, float rotation, Color color);| -DrawRectangleGradientV|void|(int posX, int posY, int width, int height, Color color1, Color color2);| -DrawRectangleGradientH|void|(int posX, int posY, int width, int height, Color color1, Color color2);| -DrawRectangleGradientEx|void|(Rectangle rec, Color col1, Color col2, Color col3, Color col4);| -DrawRectangleLines|void|(int posX, int posY, int width, int height, Color color);| -DrawRectangleLinesEx|void|(Rectangle rec, int lineThick, Color color);| -DrawRectangleRounded|void|(Rectangle rec, float roundness, int segments, Color color);| -DrawRectangleRoundedLines|void|(Rectangle rec, float roundness, int segments, int lineThick, Color color);| +DrawrayRectangle|void|(int posX, int posY, int width, int height, Color color);| +DrawrayRectangleV|void|(Vector2 position, Vector2 size, Color color);| +DrawrayRectangleRec|void|(rayRectangle rec, Color color);| +DrawrayRectanglePro|void|(rayRectangle rec, Vector2 origin, float rotation, Color color);| +DrawrayRectangleGradientV|void|(int posX, int posY, int width, int height, Color color1, Color color2);| +DrawrayRectangleGradientH|void|(int posX, int posY, int width, int height, Color color1, Color color2);| +DrawrayRectangleGradientEx|void|(rayRectangle rec, Color col1, Color col2, Color col3, Color col4);| +DrawrayRectangleLines|void|(int posX, int posY, int width, int height, Color color);| +DrawrayRectangleLinesEx|void|(rayRectangle rec, int lineThick, Color color);| +DrawrayRectangleRounded|void|(rayRectangle rec, float roundness, int segments, Color color);| +DrawrayRectangleRoundedLines|void|(rayRectangle rec, float roundness, int segments, int lineThick, Color color);| DrawTriangle|void|(Vector2 v1, Vector2 v2, Vector2 v3, Color color);| DrawTriangleLines|void|(Vector2 v1, Vector2 v2, Vector2 v3, Color color);| DrawPoly|void|(Vector2 center, int sides, float radius, float rotation, Color color);| DrawPolyEx|void|(Vector2 *points, int numPoints, Color color);| DrawPolyExLines|void|(Vector2 *points, int numPoints, Color color);| -SetShapesTexture|void|(Texture2D texture, Rectangle source);| -CheckCollisionRecs|bool|(Rectangle rec1, Rectangle rec2);| +SetShapesTexture|void|(Texture2D texture, rayRectangle source);| +CheckCollisionRecs|bool|(rayRectangle rec1, rayRectangle rec2);| CheckCollisionCircles|bool|(Vector2 center1, float radius1, Vector2 center2, float radius2);| -CheckCollisionCircleRec|bool|(Vector2 center, float radius, Rectangle rec);| -GetCollisionRec|Rectangle|(Rectangle rec1, Rectangle rec2);| -CheckCollisionPointRec|bool|(Vector2 point, Rectangle rec);| +CheckCollisionCircleRec|bool|(Vector2 center, float radius, rayRectangle rec);| +GetCollisionRec|rayRectangle|(rayRectangle rec1, rayRectangle rec2);| +CheckCollisionPointRec|bool|(Vector2 point, rayRectangle rec);| CheckCollisionPointCircle|bool|(Vector2 point, Vector2 center, float radius);| CheckCollisionPointTriangle|bool|(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3);| LoadImage|Image|(const char *fileName);| @@ -186,7 +186,7 @@ ImageAlphaMask|void|(Image *image, Image alphaMask);| ImageAlphaClear|void|(Image *image, Color color, float threshold); ImageAlphaCrop|void|(Image *image, float threshold);| ImageAlphaPremultiply|void|(Image *image);| -ImageCrop|void|(Image *image, Rectangle crop);| +ImageCrop|void|(Image *image, rayRectangle crop);| ImageResize|void|(Image *image, int newWidth, int newHeight);| ImageResizeNN|void|(Image *image, int newWidth,int newHeight);|void| ImageResizeCanvas|void|(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color);| @@ -195,9 +195,9 @@ ImageDither|void|(Image *image, int rBpp, int gBpp, int bBpp, int aBpp);| ImageExtractPalette|Color *|(Image image, int maxPaletteSize, int *extractCount);| ImageText|Image|(const char *text, int fontSize, Color color);| ImageTextEx|Image|(Font font, const char *text, float fontSize, float spacing, Color tint);| -ImageDraw|void|(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec);| -ImageDrawRectangle|void|(Image *dst, Rectangle rec, Color color);| -ImageDrawRectangleLines|void|(Image *dst, Rectangle rec, int thick, Color color);| +ImageDraw|void|(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec);| +ImageDrawrayRectangle|void|(Image *dst, rayRectangle rec, Color color);| +ImageDrawrayRectangleLines|void|(Image *dst, rayRectangle rec, int thick, Color color);| ImageDrawText|void|(Image *dst, Vector2 position, const char *text, int fontSize, Color color);| ImageDrawTextEx|void|(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color);| ImageFlipVertical|void|(Image *image);| @@ -225,10 +225,10 @@ SetTextureWrap|void|(Texture2D texture, int wrapMode);| DrawTexture|void|(Texture2D texture, int posX, int posY, Color tint);| DrawTextureV|void|(Texture2D texture, Vector2 position, Color tint);| DrawTextureEx|void|(Texture2D texture, Vector2 position, float rotation, float scale, Color tint);| -DrawTextureRec|void|(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint);| -DrawTextureQuad|void|(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint);| -DrawTexturePro|void|(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint);| -DrawTextureNPatch|void|(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint);| +DrawTextureRec|void|(Texture2D texture, rayRectangle sourceRec, Vector2 position, Color tint);| +DrawTextureQuad|void|(Texture2D texture, Vector2 tiling, Vector2 offset, rayRectangle quad, Color tint);| +DrawTexturePro|void|(Texture2D texture, rayRectangle sourceRec, rayRectangle destRec, Vector2 origin, float rotation, Color tint);| +DrawTextureNPatch|void|(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle destRec, Vector2 origin, float rotation, Color tint);| GetFontDefault|Font|(void);| LoadFont|Font|(const char *fileName);| LoadFontEx|Font|(const char *fileName, int fontSize, int *fontChars, int charsCount);| @@ -239,8 +239,8 @@ UnloadFont|void|(Font font);| DrawFPS|void|(int posX, int posY);| DrawText|void|(const char *text, int posX, int posY, int fontSize, Color color);| DrawTextEx|void|(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint);| -DrawTextRec|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);| -DrawTextRecEx|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);| +DrawTextRec|void|(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);| +DrawTextRecEx|void|(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);| MeasureText|int|(const char *text, int fontSize);| MeasureTextEx|Vector2|(Font font, const char *text, float fontSize, float spacing);| GetGlyphIndex|int|(Font font, int character);| @@ -308,7 +308,7 @@ DrawModelWires|void|(Model model, Vector3 position, float scale, Color tint);| DrawModelWiresEx|void|(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint);| DrawBoundingBox|void|(BoundingBox box, Color color);| DrawBillboard|void|(Camera camera, Texture2D texture, Vector3 center, float size, Color tint);| -DrawBillboardRec|void|(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint);| +DrawBillboardRec|void|(Camera camera, Texture2D texture, rayRectangle sourceRec, Vector3 center, float size, Color tint);| CheckCollisionSpheres|bool|(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB);| CheckCollisionBoxes|bool|(BoundingBox box1, BoundingBox box2);| CheckCollisionBoxSphere|bool|(BoundingBox box, Vector3 centerSphere, float radiusSphere);| @@ -400,7 +400,7 @@ Vector4|struct|| Quaternion|struct|| Matrix|struct|| Color|struct|| -Rectangle|struct|| +rayRectangle|struct|| Image|struct|| Texture|struct|| RenderTexture|struct|| diff --git a/projects/Notepad++/raylib_npp_parser/raylib_npp.xml b/projects/Notepad++/raylib_npp_parser/raylib_npp.xml index 6c0552974..4293276f2 100644 --- a/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +++ b/projects/Notepad++/raylib_npp_parser/raylib_npp.xml @@ -10,7 +10,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -975,13 +975,13 @@ - + - + - + - + @@ -1137,8 +1137,8 @@ - - + + @@ -1146,29 +1146,29 @@ - - + + - - - + + + - - - + + + - - + + @@ -1177,8 +1177,8 @@ - - + + @@ -1187,17 +1187,17 @@ - - - + + + - - + + @@ -1205,24 +1205,24 @@ - - - + + + - - - + + + - - - + + + @@ -1423,9 +1423,9 @@ - - - + + + @@ -1437,16 +1437,16 @@ - + - + - + - + @@ -1489,9 +1489,9 @@ - - - + + + @@ -1658,7 +1658,7 @@ - + @@ -1690,9 +1690,9 @@ - + - + @@ -1847,7 +1847,7 @@ - + @@ -1935,8 +1935,8 @@ - - + + @@ -1945,25 +1945,25 @@ - - + + - - + + - + - - + + - + @@ -1972,8 +1972,8 @@ - - + + @@ -2050,9 +2050,9 @@ - + - + @@ -2102,18 +2102,18 @@ - + - + - + - - + + @@ -2123,7 +2123,7 @@ - + @@ -2270,7 +2270,7 @@ - + @@ -2387,7 +2387,7 @@ - + @@ -2806,7 +2806,7 @@ - + @@ -2816,13 +2816,13 @@ - + - + diff --git a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h index 2c033c912..881882873 100644 --- a/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +++ b/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h @@ -4,7 +4,7 @@ // Window-related functions RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context -RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI void rayCloseWindow(void); // Close window and unload OpenGL context RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked) RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen @@ -53,7 +53,7 @@ RLAPI void EnableEventWaiting(void); // Enable wait RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling // Cursor-related functions -RLAPI void ShowCursor(void); // Shows cursor +RLAPI void rayShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor RLAPI bool IsCursorHidden(void); // Check if cursor is not visible RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) @@ -258,10 +258,10 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f //------------------------------------------------------------------------------------ // Basic Shapes Drawing Functions (Module: shapes) //------------------------------------------------------------------------------------ -// Set texture and rectangle to be used on shapes drawing +// Set texture and rayRectangle to be used on shapes drawing // NOTE: It can be useful when using basic shapes and one single font, -// defining a font char white rectangle would allow drawing everything in a single draw call -RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing +// defining a font char white rayRectangle would allow drawing everything in a single draw call +RLAPI void SetShapesTexture(Texture2D texture, rayRectangle source); // Set texture and rayRectangle to be used on shapes drawing // Basic shapes drawing functions RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel @@ -282,17 +282,17 @@ RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, C RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline -RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle -RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) -RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle -RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters -RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle -RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle -RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors -RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline -RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters -RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges -RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline +RLAPI void DrawrayRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rayRectangle +RLAPI void DrawrayRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rayRectangle (Vector version) +RLAPI void DrawrayRectangleRec(rayRectangle rec, Color color); // Draw a color-filled rayRectangle +RLAPI void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rayRectangle with pro parameters +RLAPI void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rayRectangle +RLAPI void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rayRectangle +RLAPI void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rayRectangle with custom vertex colors +RLAPI void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rayRectangle outline +RLAPI void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color); // Draw rayRectangle outline with extended parameters +RLAPI void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color); // Draw rayRectangle with rounded edges +RLAPI void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rayRectangle with rounded edges outline RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!) RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!) RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center) @@ -321,16 +321,16 @@ RLAPI Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier // Basic shapes collision detection functions -RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles +RLAPI bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2); // Check collision between two rayRectangles RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles -RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle -RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle +RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec); // Check collision between circle and rayRectangle +RLAPI bool CheckCollisionPointRec(Vector2 point, rayRectangle rec); // Check if point is inside rayRectangle RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] -RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision +RLAPI rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2); // Get collision rayRectangle for two rayRectangles collision //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) @@ -364,12 +364,12 @@ RLAPI Image GenImageText(int width, int height, const char *text); // Image manipulation functions RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) -RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece +RLAPI Image ImageFromImage(Image image, rayRectangle rec); // Create an image from another image piece RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font) RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two) -RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle +RLAPI void ImageCrop(Image *image, rayRectangle crop); // Crop an image to a defined rayRectangle RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -395,7 +395,7 @@ RLAPI Color *LoadImageColors(Image image); RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); // Load colors palette from image as a Color array (RGBA - 32bit) RLAPI void UnloadImageColors(Color *colors); // Unload color data loaded with LoadImageColors() RLAPI void UnloadImagePalette(Color *colors); // Unload colors palette loaded with LoadImagePalette() -RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle +RLAPI rayRectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rayRectangle RLAPI Color GetImageColor(Image image, int x, int y); // Get image pixel color at (x, y) position // Image drawing functions @@ -409,11 +409,11 @@ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Col RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version) RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version) -RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image -RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version) -RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image -RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image -RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) +RLAPI void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rayRectangle within an image +RLAPI void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rayRectangle within an image (Vector version) +RLAPI void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color); // Draw rayRectangle within an image +RLAPI void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color); // Draw rayRectangle lines within an image +RLAPI void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) @@ -428,7 +428,7 @@ RLAPI void UnloadTexture(Texture2D texture); RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data -RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data +RLAPI void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels); // Update GPU texture rayRectangle with new data // Texture configuration functions RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture @@ -439,9 +439,9 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap); RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2 RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters -RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle -RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters -RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely +RLAPI void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rayRectangle +RLAPI void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rayRectangle with 'pro' parameters +RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely // Color/pixel related functions RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f @@ -472,7 +472,7 @@ RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' RLAPI bool IsFontReady(Font font); // Check if a font is ready RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use -RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info +RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM) RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM) RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success @@ -491,7 +491,7 @@ RLAPI int MeasureText(const char *text, int fontSize); RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found -RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found +RLAPI rayRectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found // Text codepoints management functions (unicode characters) RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array @@ -567,8 +567,8 @@ RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source -RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source +RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation // Mesh management functions RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids diff --git a/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c b/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c index dce3f503c..e8c3fc31a 100644 --- a/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c +++ b/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c @@ -57,7 +57,7 @@ int main(void) // TODO: Unload all loaded resources at this point - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj b/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj index 207d38f54..9efcaaddb 100644 --- a/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj +++ b/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj @@ -37,9 +37,9 @@ {48871156-181A-475A-BD8D-200086A09675} Win32Proj - shapes_draw_rectangle_rounded + shapes_draw_rayRectangle_rounded 10.0 - shapes_draw_rectangle_rounded + shapes_draw_rayRectangle_rounded @@ -374,7 +374,7 @@ - + diff --git a/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj b/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj index 0361bbf0a..fce4a3d2e 100644 --- a/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj +++ b/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj @@ -37,9 +37,9 @@ {1EDD4BCF-345C-4065-8CBD-7285224293C3} Win32Proj - shapes_easings_rectangle_array + shapes_easings_rayRectangle_array 10.0 - shapes_easings_rectangle_array + shapes_easings_rayRectangle_array @@ -374,7 +374,7 @@ - + diff --git a/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj b/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj index 46df80553..ddac463a3 100644 --- a/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj +++ b/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj @@ -37,9 +37,9 @@ {F90FCDC5-EE14-4B89-96DB-4392E28F34AF} Win32Proj - shapes_rectangle_scaling + shapes_rayRectangle_scaling 10.0 - shapes_rectangle_scaling + shapes_rayRectangle_scaling @@ -374,7 +374,7 @@ - + diff --git a/projects/VS2022/examples/text_rectangle_bounds.vcxproj b/projects/VS2022/examples/text_rectangle_bounds.vcxproj index 84fd35b97..401cfd6bc 100644 --- a/projects/VS2022/examples/text_rectangle_bounds.vcxproj +++ b/projects/VS2022/examples/text_rectangle_bounds.vcxproj @@ -37,9 +37,9 @@ {25BCB876-B60A-499B-9046-E9801CFD7780} Win32Proj - text_rectangle_bounds + text_rayRectangle_bounds 10.0 - text_rectangle_bounds + text_rayRectangle_bounds @@ -374,7 +374,7 @@ - + diff --git a/projects/VS2022/raylib.sln b/projects/VS2022/raylib.sln index 3ce44a9ad..9f174c50b 100644 --- a/projects/VS2022/raylib.sln +++ b/projects/VS2022/raylib.sln @@ -149,7 +149,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_writing_anim", "exampl EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_unicode", "examples\text_unicode.vcxproj", "{1FE8758D-7E8A-41F3-9B6D-FD50E9A2A03D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_rectangle_bounds", "examples\text_rectangle_bounds.vcxproj", "{25BCB876-B60A-499B-9046-E9801CFD7780}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_rayRectangle_bounds", "examples\text_rayRectangle_bounds.vcxproj", "{25BCB876-B60A-499B-9046-E9801CFD7780}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_raylib_fonts", "examples\text_raylib_fonts.vcxproj", "{56FB0A45-145F-4EAE-B2C8-E5833E682D8F}" EndProject @@ -165,7 +165,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_font_loading", "exampl EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_font_filters", "examples\text_font_filters.vcxproj", "{8CF3F7BA-4C99-43EB-B4F1-7CA346817D0A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_rectangle_scaling", "examples\shapes_rectangle_scaling.vcxproj", "{F90FCDC5-EE14-4B89-96DB-4392E28F34AF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_rayRectangle_scaling", "examples\shapes_rayRectangle_scaling.vcxproj", "{F90FCDC5-EE14-4B89-96DB-4392E28F34AF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_logo_raylib_anim", "examples\shapes_logo_raylib_anim.vcxproj", "{93A864C9-93B7-4E5C-ACE7-E8FC5F9EFF79}" EndProject @@ -185,7 +185,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_colors_palette", "ex EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_circle_sector", "examples\shapes_draw_circle_sector.vcxproj", "{33459B4E-1839-4856-BF6B-22480D11FE31}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_rectangle_rounded", "examples\shapes_draw_rectangle_rounded.vcxproj", "{48871156-181A-475A-BD8D-200086A09675}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_rayRectangle_rounded", "examples\shapes_draw_rayRectangle_rounded.vcxproj", "{48871156-181A-475A-BD8D-200086A09675}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_ring", "examples\shapes_draw_ring.vcxproj", "{C4416DA1-9E62-46BA-9CD3-F8963C79E1A1}" EndProject @@ -193,7 +193,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_ball_anim", EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_box_anim", "examples\shapes_easings_box_anim.vcxproj", "{F91142E2-A999-47F0-9E74-38C1E2930EBE}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_rectangle_array", "examples\shapes_easings_rectangle_array.vcxproj", "{1EDD4BCF-345C-4065-8CBD-7285224293C3}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_rayRectangle_array", "examples\shapes_easings_rayRectangle_array.vcxproj", "{1EDD4BCF-345C-4065-8CBD-7285224293C3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_basic_lighting", "examples\shaders_basic_lighting.vcxproj", "{A6B2A11B-0669-4AF5-A025-8DD02DBBE5EA}" EndProject diff --git a/projects/VSCode/main.c b/projects/VSCode/main.c index f37b3b28d..b682f3aec 100644 --- a/projects/VSCode/main.c +++ b/projects/VSCode/main.c @@ -71,7 +71,7 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/projects/scripts/core_basic_window.c b/projects/scripts/core_basic_window.c index a11948295..80f0b00d3 100644 --- a/projects/scripts/core_basic_window.c +++ b/projects/scripts/core_basic_window.c @@ -54,7 +54,7 @@ int main(void) // De-Initialization //-------------------------------------------------------------------------------------- - CloseWindow(); // Close window and OpenGL context + rayCloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- return 0; diff --git a/src/config.h b/src/config.h index 3fd1c81fd..01b91619c 100644 --- a/src/config.h +++ b/src/config.h @@ -186,7 +186,7 @@ // If not defined, still some functions are supported: TextLength(), TextFormat() #define SUPPORT_TEXT_MANIPULATION 1 -// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle +// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rayRectangle // at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow // drawing text and shapes with a single draw call [SetShapesTexture()]. #define SUPPORT_FONT_ATLAS_WHITE_REC 1 diff --git a/src/external/glad.h b/src/external/glad.h index 5bb79d40d..791426fcc 100644 --- a/src/external/glad.h +++ b/src/external/glad.h @@ -1056,7 +1056,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 #define GL_MAX_SAMPLES 0x8D57 @@ -1307,7 +1307,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B #define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_PROXY_TEXTURE_rayRectangle 0x84F7 #define GL_QUADS 0x0007 #define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C #define GL_QUERY 0x82E3 @@ -1718,7 +1718,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A #define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_TEXTURE_BINDING_rayRectangle 0x84F6 #define GL_TEXTURE_BLUE_SIZE 0x805E #define GL_TEXTURE_BLUE_TYPE 0x8C12 #define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 @@ -1785,7 +1785,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_TEXTURE_MAX_LOD 0x813B #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_rayRectangle 0x84F5 #define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 #define GL_TEXTURE_RED_SIZE 0x805C #define GL_TEXTURE_RED_TYPE 0x8C10 diff --git a/src/external/glad_gles2.h b/src/external/glad_gles2.h index 6c753d0a4..dfc6151ab 100644 --- a/src/external/glad_gles2.h +++ b/src/external/glad_gles2.h @@ -19,7 +19,7 @@ * - ON_DEMAND = False * * Commandline: - * --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only + * --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rayRectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only * * Online: * http://glad.sh/#api=gles2%3D2.0&generator=c&options=HEADER_ONLY @@ -766,7 +766,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VIEWPORTS_OES 0x825B #define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 +#define GL_MAX_WINDOW_rayRectangleS_EXT 0x8F14 #define GL_MEDIUM_FLOAT 0x8DF1 #define GL_MEDIUM_INT 0x8DF4 #define GL_MIN 0x8007 @@ -801,7 +801,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_NUM_SURFACE_COMPRESSION_FIXED_RATES_EXT 0x8F6E #define GL_NUM_TILING_TYPES_EXT 0x9582 #define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 -#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 +#define GL_NUM_WINDOW_rayRectangleS_EXT 0x8F15 #define GL_ONE 1 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 @@ -1233,8 +1233,8 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 #define GL_WEIGHTED_AVERAGE_ARB 0x9367 #define GL_WEIGHTED_AVERAGE_EXT 0x9367 -#define GL_WINDOW_RECTANGLE_EXT 0x8F12 -#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 +#define GL_WINDOW_rayRectangle_EXT 0x8F12 +#define GL_WINDOW_rayRectangle_MODE_EXT 0x8F13 #define GL_WRITE_ONLY_OES 0x88B9 #define GL_ZERO 0 #define GL_ZERO_TO_ONE 0x935F @@ -1828,8 +1828,8 @@ GLAD_API_CALL int GLAD_GL_EXT_texture_view; GLAD_API_CALL int GLAD_GL_EXT_unpack_subimage; #define GL_EXT_win32_keyed_mutex 1 GLAD_API_CALL int GLAD_GL_EXT_win32_keyed_mutex; -#define GL_EXT_window_rectangles 1 -GLAD_API_CALL int GLAD_GL_EXT_window_rectangles; +#define GL_EXT_window_rayRectangles 1 +GLAD_API_CALL int GLAD_GL_EXT_window_rayRectangles; #define GL_KHR_blend_equation_advanced 1 GLAD_API_CALL int GLAD_GL_KHR_blend_equation_advanced; #define GL_KHR_blend_equation_advanced_coherent 1 @@ -2350,7 +2350,7 @@ typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVOESPROC)(GLuint first, GLsizei co typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFOESPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVOESPROC)(GLuint index, const GLfloat * v); typedef void (GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, const GLuint * buffers, GLuint numTextureBarriers, const GLuint * textures, const GLenum * srcLayouts); -typedef void (GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, const GLint * box); +typedef void (GLAD_API_PTR *PFNGLWINDOWrayRectangleSEXTPROC)(GLenum mode, GLsizei count, const GLint * box); GLAD_API_CALL PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC glad_glAcquireKeyedMutexWin32EXT; #define glAcquireKeyedMutexWin32EXT glad_glAcquireKeyedMutexWin32EXT @@ -3132,8 +3132,8 @@ GLAD_API_CALL PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES; #define glViewportIndexedfvOES glad_glViewportIndexedfvOES GLAD_API_CALL PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT; #define glWaitSemaphoreEXT glad_glWaitSemaphoreEXT -GLAD_API_CALL PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT; -#define glWindowRectanglesEXT glad_glWindowRectanglesEXT +GLAD_API_CALL PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT; +#define glWindowrayRectanglesEXT glad_glWindowrayRectanglesEXT @@ -3281,7 +3281,7 @@ int GLAD_GL_EXT_texture_type_2_10_10_10_REV = 0; int GLAD_GL_EXT_texture_view = 0; int GLAD_GL_EXT_unpack_subimage = 0; int GLAD_GL_EXT_win32_keyed_mutex = 0; -int GLAD_GL_EXT_window_rectangles = 0; +int GLAD_GL_EXT_window_rayRectangles = 0; int GLAD_GL_KHR_blend_equation_advanced = 0; int GLAD_GL_KHR_blend_equation_advanced_coherent = 0; int GLAD_GL_KHR_context_flush_control = 0; @@ -3739,7 +3739,7 @@ PFNGLVIEWPORTARRAYVOESPROC glad_glViewportArrayvOES = NULL; PFNGLVIEWPORTINDEXEDFOESPROC glad_glViewportIndexedfOES = NULL; PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES = NULL; PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT = NULL; -PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT = NULL; +PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT = NULL; static void glad_gl_load_GL_ES_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) { @@ -4215,9 +4215,9 @@ static void glad_gl_load_GL_EXT_win32_keyed_mutex( GLADuserptrloadfunc load, voi glad_glAcquireKeyedMutexWin32EXT = (PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) load(userptr, "glAcquireKeyedMutexWin32EXT"); glad_glReleaseKeyedMutexWin32EXT = (PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) load(userptr, "glReleaseKeyedMutexWin32EXT"); } -static void glad_gl_load_GL_EXT_window_rectangles( GLADuserptrloadfunc load, void* userptr) { - if(!GLAD_GL_EXT_window_rectangles) return; - glad_glWindowRectanglesEXT = (PFNGLWINDOWRECTANGLESEXTPROC) load(userptr, "glWindowRectanglesEXT"); +static void glad_gl_load_GL_EXT_window_rayRectangles( GLADuserptrloadfunc load, void* userptr) { + if(!GLAD_GL_EXT_window_rayRectangles) return; + glad_glWindowrayRectanglesEXT = (PFNGLWINDOWrayRectangleSEXTPROC) load(userptr, "glWindowrayRectanglesEXT"); } static void glad_gl_load_GL_KHR_blend_equation_advanced( GLADuserptrloadfunc load, void* userptr) { if(!GLAD_GL_KHR_blend_equation_advanced) return; @@ -4570,7 +4570,7 @@ static int glad_gl_find_extensions_gles2( int version) { GLAD_GL_EXT_texture_view = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_texture_view"); GLAD_GL_EXT_unpack_subimage = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_unpack_subimage"); GLAD_GL_EXT_win32_keyed_mutex = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_win32_keyed_mutex"); - GLAD_GL_EXT_window_rectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rectangles"); + GLAD_GL_EXT_window_rayRectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rayRectangles"); GLAD_GL_KHR_blend_equation_advanced = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced"); GLAD_GL_KHR_blend_equation_advanced_coherent = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced_coherent"); GLAD_GL_KHR_context_flush_control = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_context_flush_control"); @@ -4728,7 +4728,7 @@ int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr) { glad_gl_load_GL_EXT_texture_storage_compression(load, userptr); glad_gl_load_GL_EXT_texture_view(load, userptr); glad_gl_load_GL_EXT_win32_keyed_mutex(load, userptr); - glad_gl_load_GL_EXT_window_rectangles(load, userptr); + glad_gl_load_GL_EXT_window_rayRectangles(load, userptr); glad_gl_load_GL_KHR_blend_equation_advanced(load, userptr); glad_gl_load_GL_KHR_debug(load, userptr); glad_gl_load_GL_KHR_parallel_shader_compile(load, userptr); diff --git a/src/external/glfw/deps/glad/gl.h b/src/external/glfw/deps/glad/gl.h index b421fe080..bdbc1ba7d 100644 --- a/src/external/glfw/deps/glad/gl.h +++ b/src/external/glfw/deps/glad/gl.h @@ -800,7 +800,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_MAX_PIXEL_MAP_TABLE 0x0D34 #define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 +#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 #define GL_MAX_SAMPLES 0x8D57 #define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 @@ -968,7 +968,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 #define GL_PROXY_TEXTURE_3D 0x8070 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 +#define GL_PROXY_TEXTURE_rayRectangle 0x84F7 #define GL_Q 0x2003 #define GL_QUADRATIC_ATTENUATION 0x1209 #define GL_QUADS 0x0007 @@ -1283,7 +1283,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_TEXTURE_BINDING_3D 0x806A #define GL_TEXTURE_BINDING_BUFFER 0x8C2C #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 +#define GL_TEXTURE_BINDING_rayRectangle 0x84F6 #define GL_TEXTURE_BIT 0x00040000 #define GL_TEXTURE_BLUE_SIZE 0x805E #define GL_TEXTURE_BLUE_TYPE 0x8C12 @@ -1340,7 +1340,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_TEXTURE_MIN_LOD 0x813A #define GL_TEXTURE_PRIORITY 0x8066 -#define GL_TEXTURE_RECTANGLE 0x84F5 +#define GL_TEXTURE_rayRectangle 0x84F5 #define GL_TEXTURE_RED_SIZE 0x805C #define GL_TEXTURE_RED_TYPE 0x8C10 #define GL_TEXTURE_RESIDENT 0x8067 diff --git a/src/external/glfw/deps/glad/vulkan.h b/src/external/glfw/deps/glad/vulkan.h index 469ffe5e0..7a0f284ca 100644 --- a/src/external/glfw/deps/glad/vulkan.h +++ b/src/external/glfw/deps/glad/vulkan.h @@ -5070,7 +5070,7 @@ typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(Vk typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VkImageFormatProperties2 * pImageFormatProperties); typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pMemoryProperties); typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 * pMemoryProperties); -typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects); +typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentrayRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects); typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties * pProperties); typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties); typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties * pQueueFamilyProperties); @@ -5494,8 +5494,8 @@ GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMe #define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2; #define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 -GLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR; -#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR +GLAD_API_CALL PFN_vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR; +#define vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties; #define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2; @@ -5816,7 +5816,7 @@ PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormat PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL; PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL; PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL; -PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL; +PFN_vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR = NULL; PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL; PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL; PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL; @@ -6108,7 +6108,7 @@ static void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userp glad_vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load(userptr, "vkDestroySwapchainKHR"); glad_vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load(userptr, "vkGetDeviceGroupPresentCapabilitiesKHR"); glad_vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load(userptr, "vkGetDeviceGroupSurfacePresentModesKHR"); - glad_vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load(userptr, "vkGetPhysicalDevicePresentRectanglesKHR"); + glad_vkGetPhysicalDevicePresentrayRectanglesKHR = (PFN_vkGetPhysicalDevicePresentrayRectanglesKHR) load(userptr, "vkGetPhysicalDevicePresentrayRectanglesKHR"); glad_vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load(userptr, "vkGetSwapchainImagesKHR"); glad_vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load(userptr, "vkQueuePresentKHR"); } diff --git a/src/external/glfw/include/GLFW/glfw3.h b/src/external/glfw/include/GLFW/glfw3.h index 268754657..1b2a39d5d 100644 --- a/src/external/glfw/include/GLFW/glfw3.h +++ b/src/external/glfw/include/GLFW/glfw3.h @@ -3183,7 +3183,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, G * @sa @ref window_creation * @sa @ref glfwCreateWindow * - * @since Added in version 3.0. Replaces `glfwCloseWindow`. + * @since Added in version 3.0. Replaces `glfwrayCloseWindow`. * * @ingroup window */ diff --git a/src/external/glfw/src/cocoa_window.m b/src/external/glfw/src/cocoa_window.m index daac39b3b..985cdf6ab 100644 --- a/src/external/glfw/src/cocoa_window.m +++ b/src/external/glfw/src/cocoa_window.m @@ -56,7 +56,7 @@ static void hideCursor(_GLFWwindow* window) // Shows the cursor if not already shown // -static void showCursor(_GLFWwindow* window) +static void rayShowCursor(_GLFWwindow* window) { if (_glfw.ns.cursorHidden) { @@ -71,7 +71,7 @@ static void updateCursorImage(_GLFWwindow* window) { if (window->cursorMode == GLFW_CURSOR_NORMAL) { - showCursor(window); + rayShowCursor(window); if (window->cursor) [(NSCursor*) window->cursor->ns.object set]; @@ -486,7 +486,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; - (void)mouseExited:(NSEvent *)event { if (window->cursorMode == GLFW_CURSOR_HIDDEN) - showCursor(window); + rayShowCursor(window); _glfwInputCursorEnter(window, GLFW_FALSE); } diff --git a/src/external/glfw/src/x11_window.c b/src/external/glfw/src/x11_window.c index 8a689ed10..2d57bb48f 100644 --- a/src/external/glfw/src/x11_window.c +++ b/src/external/glfw/src/x11_window.c @@ -1669,13 +1669,13 @@ static void processEvent(XEvent *event) reply.xclient.message_type = _glfw.x11.XdndStatus; reply.xclient.format = 32; reply.xclient.data.l[0] = window->x11.handle; - reply.xclient.data.l[2] = 0; // Specify an empty rectangle + reply.xclient.data.l[2] = 0; // Specify an empty rayRectangle reply.xclient.data.l[3] = 0; if (_glfw.x11.xdnd.format) { // Reply that we are ready to copy the dragged data - reply.xclient.data.l[1] = 1; // Accept with no rectangle + reply.xclient.data.l[1] = 1; // Accept with no rayRectangle if (_glfw.x11.xdnd.version >= 2) reply.xclient.data.l[4] = _glfw.x11.XdndActionCopy; } diff --git a/src/external/jar_xm.h b/src/external/jar_xm.h index 4a1bfbf67..0850df167 100644 --- a/src/external/jar_xm.h +++ b/src/external/jar_xm.h @@ -2398,17 +2398,17 @@ void jar_xm_debug(jar_xm_context_t *ctx) { for (int i=0; i < ctx->module.length; i++) { if (i == ctx->jump_dest) { if (ctx->position_jump) { - DrawRectangle(i * size * 2, y - size, size * 2, size, GOLD); + DrawrayRectangle(i * size * 2, y - size, size * 2, size, GOLD); } else { - DrawRectangle(i * size * 2, y - size, size * 2, size, BROWN); + DrawrayRectangle(i * size * 2, y - size, size * 2, size, BROWN); }; }; if (i == ctx->current_table_index) { // DrawText(TextFormat("%02X", ctx->current_tick), i * size * 2, y - size, size, WHITE); - DrawRectangle(i * size * 2, y, size * 2, size, RED); + DrawrayRectangle(i * size * 2, y, size * 2, size, RED); DrawText(TextFormat("%02X", ctx->current_row), i * size * 2, y - size, size, YELLOW); } else { - DrawRectangle(i * size * 2, y, size * 2, size, ORANGE); + DrawrayRectangle(i * size * 2, y, size * 2, size, ORANGE); }; DrawText(TextFormat("%02X", ctx->module.pattern_table[i]), i * size * 2, y, size, WHITE); }; @@ -2420,7 +2420,7 @@ void jar_xm_debug(jar_xm_context_t *ctx) { x += 2 * size; for(uint8_t i = 0; i < ctx->module.num_channels; i++) { - DrawRectangle(x, y, 8 * size, size, PURPLE); + DrawrayRectangle(x, y, 8 * size, size, PURPLE); DrawText("N", x, y, size, YELLOW); DrawText("I", x + size * 2, y, size, YELLOW); DrawText("V", x + size * 4, y, size, YELLOW); @@ -2432,14 +2432,14 @@ void jar_xm_debug(jar_xm_context_t *ctx) { y += size; x = 0; if (j >=0 && j < (cur->num_rows)) { - DrawRectangle(x, y, size * 2, size, BROWN); + DrawrayRectangle(x, y, size * 2, size, BROWN); DrawText(TextFormat("%02X",j), x, y, size, WHITE); x += 2 * size; for(uint8_t i = 0; i < ctx->module.num_channels; i++) { if (j==(ctx->current_row)) { - DrawRectangle(x, y, 8 * size, size, DARKGREEN); + DrawrayRectangle(x, y, 8 * size, size, DARKGREEN); } else { - DrawRectangle(x, y, 8 * size, size, DARKGRAY); + DrawrayRectangle(x, y, 8 * size, size, DARKGRAY); }; jar_xm_pattern_slot_t *s = cur->slots + j * ctx->module.num_channels + i; // jar_xm_channel_context_t *ch = ctx->channels + i; diff --git a/src/external/miniaudio.h b/src/external/miniaudio.h index 47332e11a..fb20e7281 100644 --- a/src/external/miniaudio.h +++ b/src/external/miniaudio.h @@ -2715,7 +2715,7 @@ The different dithering modes include the following, in order of efficiency: | Type | Enum Token | +-----------+--------------------------+ | None | ma_dither_mode_none | - | Rectangle | ma_dither_mode_rectangle | + | rayRectangle | ma_dither_mode_rayRectangle | | Triangle | ma_dither_mode_triangle | +-----------+--------------------------+ @@ -2794,7 +2794,7 @@ channels and silence extra channels. For example, converting from 4 to 2 channel channels will be dropped, whereas converting from 2 to 4 channels will put silence into the 3rd and 4th channels. -The `ma_channel_mix_mode_rectangle` mode uses spacial locality based on a rectangle to compute a +The `ma_channel_mix_mode_rayRectangle` mode uses spacial locality based on a rayRectangle to compute a simple distribution between input and output. Imagine sitting in the middle of a room, with speakers on the walls representing channel positions. The `MA_CHANNEL_FRONT_LEFT` position can be thought of as being in the corner of the front and left walls. @@ -4239,7 +4239,7 @@ typedef enum typedef enum { ma_dither_mode_none = 0, - ma_dither_mode_rectangle, + ma_dither_mode_rayRectangle, ma_dither_mode_triangle } ma_dither_mode; @@ -13979,7 +13979,7 @@ static MA_INLINE ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi) } -static MA_INLINE float ma_dither_f32_rectangle(float ditherMin, float ditherMax) +static MA_INLINE float ma_dither_f32_rayRectangle(float ditherMin, float ditherMax) { return ma_rand_range_f32(ditherMin, ditherMax); } @@ -13993,8 +13993,8 @@ static MA_INLINE float ma_dither_f32_triangle(float ditherMin, float ditherMax) static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, float ditherMax) { - if (ditherMode == ma_dither_mode_rectangle) { - return ma_dither_f32_rectangle(ditherMin, ditherMax); + if (ditherMode == ma_dither_mode_rayRectangle) { + return ma_dither_f32_rayRectangle(ditherMin, ditherMax); } if (ditherMode == ma_dither_mode_triangle) { return ma_dither_f32_triangle(ditherMin, ditherMax); @@ -14005,7 +14005,7 @@ static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, static MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 ditherMin, ma_int32 ditherMax) { - if (ditherMode == ma_dither_mode_rectangle) { + if (ditherMode == ma_dither_mode_rayRectangle) { ma_int32 a = ma_rand_range_s32(ditherMin, ditherMax); return a; } @@ -44588,18 +44588,18 @@ static MA_INLINE void ma_pcm_f32_to_s16__sse2(void* dst, const void* src, ma_uin if (ditherMode == ma_dither_mode_none) { d0 = _mm_set1_ps(0); d1 = _mm_set1_ps(0); - } else if (ditherMode == ma_dither_mode_rectangle) { + } else if (ditherMode == ma_dither_mode_rayRectangle) { d0 = _mm_set_ps( - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax) + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax) ); d1 = _mm_set_ps( - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax), - ma_dither_f32_rectangle(ditherMin, ditherMax) + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax), + ma_dither_f32_rayRectangle(ditherMin, ditherMax) ); } else { d0 = _mm_set_ps( @@ -44690,20 +44690,20 @@ static MA_INLINE void ma_pcm_f32_to_s16__neon(void* dst, const void* src, ma_uin if (ditherMode == ma_dither_mode_none) { d0 = vmovq_n_f32(0); d1 = vmovq_n_f32(0); - } else if (ditherMode == ma_dither_mode_rectangle) { + } else if (ditherMode == ma_dither_mode_rayRectangle) { float d0v[4]; float d1v[4]; - d0v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d0v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d0v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d0v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); + d0v[0] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d0v[1] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d0v[2] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d0v[3] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); d0 = vld1q_f32(d0v); - d1v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d1v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d1v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax); - d1v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax); + d1v[0] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d1v[1] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d1v[2] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); + d1v[3] = ma_dither_f32_rayRectangle(ditherMin, ditherMax); d1 = vld1q_f32(d1v); } else { float d0v[4]; diff --git a/src/external/nanosvg.h b/src/external/nanosvg.h index b80f540ba..a70c2993b 100644 --- a/src/external/nanosvg.h +++ b/src/external/nanosvg.h @@ -2425,7 +2425,7 @@ static void nsvg__parseRect(NSVGparser* p, const char** attr) nsvg__lineTo(p, x+w, y+h); nsvg__lineTo(p, x, y+h); } else { - // Rounded rectangle + // Rounded rayRectangle nsvg__moveTo(p, x+rx, y); nsvg__lineTo(p, x+w-rx, y); nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry); diff --git a/src/external/stb_image.h b/src/external/stb_image.h index 5e807a0a6..35d7fa97d 100644 --- a/src/external/stb_image.h +++ b/src/external/stb_image.h @@ -6861,7 +6861,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i g->cur_x = g->start_x; g->cur_y = g->start_y; - // if the width of the specified rectangle is 0, that means + // if the width of the specified rayRectangle is 0, that means // we may not see *any* pixels or the image is malformed; // to make sure this is caught, move the current y down to // max_y (which is what out_gif_code checks). diff --git a/src/external/stb_image_write.h b/src/external/stb_image_write.h index e4b32ed1b..58048bdac 100644 --- a/src/external/stb_image_write.h +++ b/src/external/stb_image_write.h @@ -77,10 +77,10 @@ USAGE: Each function returns 0 on failure and non-0 on success. The functions create an image file defined by the parameters. The image - is a rectangle of pixels stored from left-to-right, top-to-bottom. + is a rayRectangle of pixels stored from left-to-right, top-to-bottom. Each pixel contains 'comp' channels of data stored interleaved with 8-bits per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is - monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall. + monochrome color.) The rayRectangle is 'w' pixels wide and 'h' pixels tall. The *data pointer points to the first byte of the top-left-most pixel. For PNG, "stride_in_bytes" is the distance in bytes from the first byte of a row of pixels to the first byte of the next row of pixels. @@ -89,8 +89,8 @@ USAGE: The BMP format expands Y to RGB in the file format and does not output alpha. - PNG supports writing rectangles of data even when the bytes storing rows of - data are not consecutive in memory (e.g. sub-rectangles of a larger image), + PNG supports writing rayRectangles of data even when the bytes storing rows of + data are not consecutive in memory (e.g. sub-rayRectangles of a larger image), by supplying the stride between the beginning of adjacent rows. The other formats do not. (Thus you cannot write a native-format BMP through the BMP writer, both because it is in BGR order and because it may have padding diff --git a/src/external/stb_rect_pack.h b/src/external/stb_rect_pack.h index 6a633ce66..f21b35189 100644 --- a/src/external/stb_rect_pack.h +++ b/src/external/stb_rect_pack.h @@ -1,4 +1,4 @@ -// stb_rect_pack.h - v1.01 - public domain - rectangle packing +// stb_rect_pack.h - v1.01 - public domain - rayRectangle packing // Sean Barrett 2014 // // Useful for e.g. packing rectangular textures into an atlas. @@ -23,7 +23,7 @@ // // This library currently uses the Skyline Bottom-Left algorithm. // -// Please note: better rectangle packers are welcome! Please +// Please note: better rayRectangle packers are welcome! Please // implement them to the same API, but with a different init // function. // @@ -42,7 +42,7 @@ // Version history: // // 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section -// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles +// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rayRectangles // 0.99 (2019-02-07) warning fixes // 0.11 (2017-03-03) return packing success/fail result // 0.10 (2016-10-25) remove cast-away-const to avoid warnings @@ -88,28 +88,28 @@ typedef int stbrp_coord; // Mostly for internal use, but this is the maximum supported coordinate value. STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects); -// Assign packed locations to rectangles. The rectangles are of type +// Assign packed locations to rayRectangles. The rayRectangles are of type // 'stbrp_rect' defined below, stored in the array 'rects', and there // are 'num_rects' many of them. // -// Rectangles which are successfully packed have the 'was_packed' flag +// rayRectangles which are successfully packed have the 'was_packed' flag // set to a non-zero value and 'x' and 'y' store the minimum location // on each axis (i.e. bottom-left in cartesian coordinates, top-left -// if you imagine y increasing downwards). Rectangles which do not fit +// if you imagine y increasing downwards). rayRectangles which do not fit // have the 'was_packed' flag set to 0. // // You should not try to access the 'rects' array from another thread // while this function is running, as the function temporarily reorders // the array while it executes. // -// To pack into another rectangle, you need to call stbrp_init_target -// again. To continue packing into the same rectangle, you can call +// To pack into another rayRectangle, you need to call stbrp_init_target +// again. To continue packing into the same rayRectangle, you can call // this function again. Calling this multiple times with multiple rect // arrays will probably produce worse packing results than calling it -// a single time with the full rectangle array, but the option is +// a single time with the full rayRectangle array, but the option is // available. // -// The function returns 1 if all of the rectangles were successfully +// The function returns 1 if all of the rayRectangles were successfully // packed and 0 otherwise. struct stbrp_rect @@ -128,8 +128,8 @@ struct stbrp_rect STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes); -// Initialize a rectangle packer to: -// pack a rectangle that is 'width' by 'height' in dimensions +// Initialize a rayRectangle packer to: +// pack a rayRectangle that is 'width' by 'height' in dimensions // using temporary storage provided by the array 'nodes', which is 'num_nodes' long // // You must call this function every time you start packing into a new target. @@ -146,7 +146,7 @@ STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, // of small integers to guarantee the algorithm doesn't run out of temporary storage. // // If you do #2, then the non-quantized algorithm will be used, but the algorithm -// may run out of temporary storage and be unable to pack some rectangles. +// may run out of temporary storage and be unable to pack some rayRectangles. STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem); // Optionally call this function after init but before doing any packing to @@ -243,7 +243,7 @@ STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_ou if (allow_out_of_mem) // if it's ok to run out of memory, then don't bother aligning them; // this gives better packing, but may fail due to OOM (even though - // the rectangles easily fit). @TODO a smarter approach would be to only + // the rayRectangles easily fit). @TODO a smarter approach would be to only // quantize once we've hit OOM, then we could get rid of this parameter. context->align = 1; else { @@ -442,7 +442,7 @@ static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int widt return fr; } -static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height) +static stbrp__findresult stbrp__skyline_pack_rayRectangle(stbrp_context *context, int width, int height) { // find best position according to heuristic stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height); @@ -555,7 +555,7 @@ STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int nu if (rects[i].w == 0 || rects[i].h == 0) { rects[i].x = rects[i].y = 0; // empty rect needs no space } else { - stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h); + stbrp__findresult fr = stbrp__skyline_pack_rayRectangle(context, rects[i].w, rects[i].h); if (fr.prev_link) { rects[i].x = (stbrp_coord) fr.x; rects[i].y = (stbrp_coord) fr.y; diff --git a/src/external/stb_truetype.h b/src/external/stb_truetype.h index bbf2284b1..453f64102 100644 --- a/src/external/stb_truetype.h +++ b/src/external/stb_truetype.h @@ -217,7 +217,7 @@ // Displaying a character: // Compute the bounding box of the character. It will contain signed values // relative to . I.e. if it returns x0,y0,x1,y1, -// then the character should be displayed in the rectangle from +// then the character should be displayed in the rayRectangle from // to direction; - // area of the rectangle covered from sy0..y_crossing + // area of the rayRectangle covered from sy0..y_crossing area = sign * (y_crossing-sy0); // area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing) @@ -3200,14 +3200,14 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, } // in second pixel, area covered by line segment found in first pixel - // is always a rectangle 1 wide * the height of that line segment; this + // is always a rayRectangle 1 wide * the height of that line segment; this // is exactly what the variable 'area' stores. it also gets a contribution // from the line segment within it. the THIRD pixel will get the first - // pixel's rectangle contribution, the second pixel's rectangle contribution, + // pixel's rayRectangle contribution, the second pixel's rayRectangle contribution, // and its own contribution. the 'own contribution' is the same in every pixel except // the leftmost and rightmost, a trapezoid that slides down in each pixel. // the second pixel's contribution to the third pixel will be the - // rectangle 1 wide times the height change in the second pixel, which is dy. + // rayRectangle 1 wide times the height change in the second pixel, which is dy. step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x, // which multiplied by 1-pixel-width is how much pixel area changes for each step in x @@ -3220,7 +3220,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down STBTT_assert(sy1 > y_final-0.01f); - // area covered in the last pixel is the rectangle from all the pixels to the left, + // area covered in the last pixel is the rayRectangle from all the pixels to the left, // plus the trapezoid filled by the line segment in this pixel all the way to the right edge scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f); @@ -3879,7 +3879,7 @@ STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int p ////////////////////////////////////////////////////////////////////////////// // -// rectangle packing replacement routines if you don't have stb_rect_pack.h +// rayRectangle packing replacement routines if you don't have stb_rect_pack.h // #ifndef STB_RECT_PACK_VERSION diff --git a/src/platforms/rcore_android.c b/src/platforms/rcore_android.c index 5d6f7d5ba..69ecaf6a3 100644 --- a/src/platforms/rcore_android.c +++ b/src/platforms/rcore_android.c @@ -346,7 +346,7 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { CORE.Input.Mouse.cursorHidden = false; } @@ -802,26 +802,26 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd) // WARNING: External function: Module required: rtext LoadFontDefault(); #if defined(SUPPORT_MODULE_RSHAPES) - // Set font white rectangle for shapes drawing, so shapes and text can be batched together - // WARNING: rshapes module is required, if not available, default internal white rectangle is used - Rectangle rec = GetFontDefault().recs[95]; + // Set font white rayRectangle for shapes drawing, so shapes and text can be batched together + // WARNING: rshapes module is required, if not available, default internal white rayRectangle is used + rayRectangle rec = GetFontDefault().recs[95]; if (CORE.Window.flags & FLAG_MSAA_4X_HINT) { // NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering - SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 }); + SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 2, rec.y + 2, 1, 1 }); } else { - // NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding - SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 }); + // NOTE: We set up a 1px padding on char rayRectangle to avoid pixel bleeding + SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 }); } #endif #else #if defined(SUPPORT_MODULE_RSHAPES) - // Set default texture and rectangle to be used for shapes drawing + // Set default texture and rayRectangle to be used for shapes drawing // NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8 Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 }; - SetShapesTexture(texture, (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes + SetShapesTexture(texture, (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes #endif #endif @@ -877,7 +877,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd) platform.contextRebindRequired = true; } // If 'platform.device' is already set to 'EGL_NO_DISPLAY' - // this means that the user has already called 'CloseWindow()' + // this means that the user has already called 'rayCloseWindow()' } break; case APP_CMD_SAVE_STATE: break; diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c index 05c390f97..f91e5c75a 100644 --- a/src/platforms/rcore_desktop.c +++ b/src/platforms/rcore_desktop.c @@ -983,7 +983,7 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL); CORE.Input.Mouse.cursorHidden = false; diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 96e557024..febc1828d 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -858,9 +858,9 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { - SDL_ShowCursor(SDL_ENABLE); + SDL_rayShowCursor(SDL_ENABLE); CORE.Input.Mouse.cursorHidden = false; } @@ -868,7 +868,7 @@ void ShowCursor(void) // Hides mouse cursor void HideCursor(void) { - SDL_ShowCursor(SDL_DISABLE); + SDL_rayShowCursor(SDL_DISABLE); CORE.Input.Mouse.cursorHidden = true; } @@ -877,7 +877,7 @@ void HideCursor(void) void EnableCursor(void) { SDL_SetRelativeMouseMode(SDL_FALSE); - SDL_ShowCursor(SDL_ENABLE); + SDL_rayShowCursor(SDL_ENABLE); platform.cursorRelative = false; CORE.Input.Mouse.cursorHidden = false; diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index bdfc9e0f5..5cbc76f2f 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -83,7 +83,7 @@ typedef struct { int fd; // File descriptor to the device it is assigned to int eventNum; // Number of 'event' device - Rectangle absRange; // Range of values for absolute pointing devices (touchscreens) + rayRectangle absRange; // Range of values for absolute pointing devices (touchscreens) int touchSlot; // Hold the touch slot number of the currently being sent multitouch block bool isMouse; // True if device supports relative X Y movements bool isTouch; // True if device supports absolute X Y movements and has BTN_TOUCH @@ -124,7 +124,7 @@ typedef struct { char currentButtonStateEvdev[MAX_MOUSE_BUTTONS]; // Holds the new mouse state for the next polling event to grab bool cursorRelative; // Relative cursor mode int mouseFd; // File descriptor for the evdev mouse/touch/gestures - Rectangle absRange; // Range of values for absolute pointing devices (touchscreens) + rayRectangle absRange; // Range of values for absolute pointing devices (touchscreens) int touchSlot; // Hold the touch slot number of the currently being sent multitouch block // Gamepad data @@ -421,7 +421,7 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { CORE.Input.Mouse.cursorHidden = false; } diff --git a/src/platforms/rcore_template.c b/src/platforms/rcore_template.c index 5d4721c84..a6471f32a 100644 --- a/src/platforms/rcore_template.c +++ b/src/platforms/rcore_template.c @@ -293,7 +293,7 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { CORE.Input.Mouse.cursorHidden = false; } diff --git a/src/platforms/rcore_web.c b/src/platforms/rcore_web.c index d8fa54305..0dc122832 100644 --- a/src/platforms/rcore_web.c +++ b/src/platforms/rcore_web.c @@ -428,7 +428,7 @@ const char *GetClipboardText(void) } // Show mouse cursor -void ShowCursor(void) +void rayShowCursor(void) { CORE.Input.Mouse.cursorHidden = false; } diff --git a/src/raylib.h b/src/raylib.h index 1c4c4a09f..8f9bd50c5 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -39,7 +39,7 @@ * [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG) * [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms * [rtext] stb_truetype (Sean Barret) for ttf fonts loading -* [rtext] stb_rect_pack (Sean Barret) for rectangles packing +* [rtext] stb_rect_pack (Sean Barret) for rayRectangles packing * [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation * [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL) * [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF) @@ -152,7 +152,7 @@ // to be able to use those other modules as standalone (not depending on raylib) // this defines are very useful for internal check and avoid type (re)definitions #define RL_COLOR_TYPE -#define RL_RECTANGLE_TYPE +#define RL_rayRectangle_TYPE #define RL_VECTOR2_TYPE #define RL_VECTOR3_TYPE #define RL_VECTOR4_TYPE @@ -240,13 +240,13 @@ typedef struct Color { unsigned char a; // Color alpha value } Color; -// Rectangle, 4 components -typedef struct Rectangle { - float x; // Rectangle top-left corner position x - float y; // Rectangle top-left corner position y - float width; // Rectangle width - float height; // Rectangle height -} Rectangle; +// rayRectangle, 4 components +typedef struct rayRectangle { + float x; // rayRectangle top-left corner position x + float y; // rayRectangle top-left corner position y + float width; // rayRectangle width + float height; // rayRectangle height +} rayRectangle; // Image, pixel data stored in CPU memory (RAM) typedef struct Image { @@ -284,7 +284,7 @@ typedef RenderTexture RenderTexture2D; // NPatchInfo, n-patch layout info typedef struct NPatchInfo { - Rectangle source; // Texture source rectangle + rayRectangle source; // Texture source rayRectangle int left; // Left border offset int top; // Top border offset int right; // Right border offset @@ -307,7 +307,7 @@ typedef struct Font { int glyphCount; // Number of glyph characters int glyphPadding; // Padding around the glyph characters Texture2D texture; // Texture atlas containing the glyphs - Rectangle *recs; // Rectangles in texture for the glyphs + rayRectangle *recs; // rayRectangles in texture for the glyphs GlyphInfo *glyphs; // Glyphs info data } Font; @@ -952,7 +952,7 @@ extern "C" { // Prevents name mangling of functions // Window-related functions RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context -RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI void rayCloseWindow(void); // Close window and unload OpenGL context RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked) RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen @@ -1001,7 +1001,7 @@ RLAPI void EnableEventWaiting(void); // Enable wait RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling // Cursor-related functions -RLAPI void ShowCursor(void); // Shows cursor +RLAPI void rayShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor RLAPI bool IsCursorHidden(void); // Check if cursor is not visible RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) @@ -1212,10 +1212,10 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f //------------------------------------------------------------------------------------ // Basic Shapes Drawing Functions (Module: shapes) //------------------------------------------------------------------------------------ -// Set texture and rectangle to be used on shapes drawing +// Set texture and rayRectangle to be used on shapes drawing // NOTE: It can be useful when using basic shapes and one single font, -// defining a font char white rectangle would allow drawing everything in a single draw call -RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing +// defining a font char white rayRectangle would allow drawing everything in a single draw call +RLAPI void SetShapesTexture(Texture2D texture, rayRectangle source); // Set texture and rayRectangle to be used on shapes drawing // Basic shapes drawing functions RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel @@ -1236,17 +1236,17 @@ RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, C RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline -RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle -RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) -RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle -RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters -RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle -RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle -RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors -RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline -RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters -RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges -RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline +RLAPI void DrawrayRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rayRectangle +RLAPI void DrawrayRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rayRectangle (Vector version) +RLAPI void DrawrayRectangleRec(rayRectangle rec, Color color); // Draw a color-filled rayRectangle +RLAPI void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rayRectangle with pro parameters +RLAPI void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rayRectangle +RLAPI void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rayRectangle +RLAPI void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rayRectangle with custom vertex colors +RLAPI void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rayRectangle outline +RLAPI void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color); // Draw rayRectangle outline with extended parameters +RLAPI void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color); // Draw rayRectangle with rounded edges +RLAPI void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rayRectangle with rounded edges outline RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!) RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!) RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center) @@ -1275,16 +1275,16 @@ RLAPI Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier // Basic shapes collision detection functions -RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles +RLAPI bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2); // Check collision between two rayRectangles RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles -RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle -RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle +RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec); // Check collision between circle and rayRectangle +RLAPI bool CheckCollisionPointRec(Vector2 point, rayRectangle rec); // Check if point is inside rayRectangle RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] -RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision +RLAPI rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2); // Get collision rayRectangle for two rayRectangles collision //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) @@ -1318,12 +1318,12 @@ RLAPI Image GenImageText(int width, int height, const char *text); // Image manipulation functions RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) -RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece +RLAPI Image ImageFromImage(Image image, rayRectangle rec); // Create an image from another image piece RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font) RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two) -RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle +RLAPI void ImageCrop(Image *image, rayRectangle crop); // Crop an image to a defined rayRectangle RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -1349,7 +1349,7 @@ RLAPI Color *LoadImageColors(Image image); RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); // Load colors palette from image as a Color array (RGBA - 32bit) RLAPI void UnloadImageColors(Color *colors); // Unload color data loaded with LoadImageColors() RLAPI void UnloadImagePalette(Color *colors); // Unload colors palette loaded with LoadImagePalette() -RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle +RLAPI rayRectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rayRectangle RLAPI Color GetImageColor(Image image, int x, int y); // Get image pixel color at (x, y) position // Image drawing functions @@ -1363,11 +1363,11 @@ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Col RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version) RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version) -RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image -RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version) -RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image -RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image -RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) +RLAPI void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rayRectangle within an image +RLAPI void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rayRectangle within an image (Vector version) +RLAPI void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color); // Draw rayRectangle within an image +RLAPI void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color); // Draw rayRectangle lines within an image +RLAPI void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source) RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination) RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination) @@ -1382,7 +1382,7 @@ RLAPI void UnloadTexture(Texture2D texture); RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data -RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data +RLAPI void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels); // Update GPU texture rayRectangle with new data // Texture configuration functions RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture @@ -1393,9 +1393,9 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap); RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2 RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters -RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle -RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters -RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely +RLAPI void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rayRectangle +RLAPI void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rayRectangle with 'pro' parameters +RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely // Color/pixel related functions RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f @@ -1426,7 +1426,7 @@ RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf' RLAPI bool IsFontReady(Font font); // Check if a font is ready RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use -RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info +RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM) RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM) RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success @@ -1445,7 +1445,7 @@ RLAPI int MeasureText(const char *text, int fontSize); RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found -RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found +RLAPI rayRectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found // Text codepoints management functions (unicode characters) RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array @@ -1521,8 +1521,8 @@ RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source -RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source +RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation // Mesh management functions RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids diff --git a/src/rcore.c b/src/rcore.c index 45398891b..10e5c7cae 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -538,7 +538,7 @@ const char *TextFormat(const char *text, ...); // Formatting of tex //void SetClipboardText(const char *text) //const char *GetClipboardText(void) -//void ShowCursor(void) +//void rayShowCursor(void) //void HideCursor(void) //void EnableCursor(void) //void DisableCursor(void) @@ -625,26 +625,26 @@ void InitWindow(int width, int height, const char *title) // WARNING: External function: Module required: rtext LoadFontDefault(); #if defined(SUPPORT_MODULE_RSHAPES) - // Set font white rectangle for shapes drawing, so shapes and text can be batched together - // WARNING: rshapes module is required, if not available, default internal white rectangle is used - Rectangle rec = GetFontDefault().recs[95]; + // Set font white rayRectangle for shapes drawing, so shapes and text can be batched together + // WARNING: rshapes module is required, if not available, default internal white rayRectangle is used + rayRectangle rec = GetFontDefault().recs[95]; if (CORE.Window.flags & FLAG_MSAA_4X_HINT) { // NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering - SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 }); + SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 2, rec.y + 2, 1, 1 }); } else { - // NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding - SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 }); + // NOTE: We set up a 1px padding on char rayRectangle to avoid pixel bleeding + SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 }); } #endif #else #if defined(SUPPORT_MODULE_RSHAPES) - // Set default texture and rectangle to be used for shapes drawing + // Set default texture and rayRectangle to be used for shapes drawing // NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8 Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 }; - SetShapesTexture(texture, (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes + SetShapesTexture(texture, (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes #endif #endif #if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT) @@ -665,7 +665,7 @@ void InitWindow(int width, int height, const char *title) } // Close window and unload OpenGL context -void CloseWindow(void) +void rayCloseWindow(void) { #if defined(SUPPORT_GIF_RECORDING) if (gifRecording) diff --git a/src/rmodels.c b/src/rmodels.c index 229d373fc..11da35977 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -2956,20 +2956,20 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize) Vector3 n5 = { 0.0f, 0.0f, -1.0f }; Vector3 n6 = { 0.0f, 0.0f, 1.0f }; - // NOTE: We use texture rectangles to define different textures for top-bottom-front-back-right-left (6) - typedef struct RectangleF { + // NOTE: We use texture rayRectangles to define different textures for top-bottom-front-back-right-left (6) + typedef struct rayRectangleF { float x; float y; float width; float height; - } RectangleF; + } rayRectangleF; - RectangleF rightTexUV = { 0.0f, 0.0f, 0.5f, 0.5f }; - RectangleF leftTexUV = { 0.5f, 0.0f, 0.5f, 0.5f }; - RectangleF frontTexUV = { 0.0f, 0.0f, 0.5f, 0.5f }; - RectangleF backTexUV = { 0.5f, 0.0f, 0.5f, 0.5f }; - RectangleF topTexUV = { 0.0f, 0.5f, 0.5f, 0.5f }; - RectangleF bottomTexUV = { 0.5f, 0.5f, 0.5f, 0.5f }; + rayRectangleF rightTexUV = { 0.0f, 0.0f, 0.5f, 0.5f }; + rayRectangleF leftTexUV = { 0.5f, 0.0f, 0.5f, 0.5f }; + rayRectangleF frontTexUV = { 0.0f, 0.0f, 0.5f, 0.5f }; + rayRectangleF backTexUV = { 0.5f, 0.0f, 0.5f, 0.5f }; + rayRectangleF topTexUV = { 0.0f, 0.5f, 0.5f, 0.5f }; + rayRectangleF bottomTexUV = { 0.5f, 0.5f, 0.5f, 0.5f }; for (int z = 0; z < cubicmap.height; ++z) { @@ -3470,13 +3470,13 @@ void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float // Draw a billboard void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint) { - Rectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; + rayRectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; DrawBillboardRec(camera, texture, source, position, (Vector2){ size, size }, tint); } -// Draw a billboard (part of a texture defined by a rectangle) -void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint) +// Draw a billboard (part of a texture defined by a rayRectangle) +void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint) { // NOTE: Billboard locked on axis-Y Vector3 up = { 0.0f, 1.0f, 0.0f }; @@ -3484,9 +3484,9 @@ void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector DrawBillboardPro(camera, texture, source, position, up, size, Vector2Zero(), 0.0f, tint); } -void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint) +void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint) { - // NOTE: Billboard size will maintain source rectangle aspect ratio, size will represent billboard width + // NOTE: Billboard size will maintain source rayRectangle aspect ratio, size will represent billboard width Vector2 sizeRatio = { size.x*fabsf((float)source.width/source.height), size.y }; Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up); diff --git a/src/rshapes.c b/src/rshapes.c index bababf8cf..cdd8860db 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -11,7 +11,7 @@ * user-provided texture with SetShapesTexture(), the pourpouse of this implementation * is allowing to reduce draw calls when combined with a texture-atlas. * -* By default, raylib sets the default texture and rectangle at InitWindow()[rcore] to one +* By default, raylib sets the default texture and rayRectangle at InitWindow()[rcore] to one * white character of default font [rtext], this way, raylib text and shapes can be draw with * a single draw call and it also allows users to configure it the same way with their own fonts. * @@ -81,7 +81,7 @@ // Global Variables Definition //---------------------------------------------------------------------------------- Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used on shapes drawing (white pixel loaded by rlgl) -Rectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rectangle used on shapes drawing +rayRectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rayRectangle used on shapes drawing //---------------------------------------------------------------------------------- // Module specific Functions Declaration @@ -92,10 +92,10 @@ static float EaseCubicInOut(float t, float b, float c, float d); // Cubic eas // Module Functions Definition //---------------------------------------------------------------------------------- -// Set texture and rectangle to be used on shapes drawing +// Set texture and rayRectangle to be used on shapes drawing // NOTE: It can be useful when using basic shapes and one single font, -// defining a font char white rectangle would allow drawing everything in a single draw call -void SetShapesTexture(Texture2D texture, Rectangle source) +// defining a font char white rayRectangle would allow drawing everything in a single draw call +void SetShapesTexture(Texture2D texture, rayRectangle source) { // Reset texture to default pixel if required // WARNING: Shapes texture should be probably better validated, @@ -103,7 +103,7 @@ void SetShapesTexture(Texture2D texture, Rectangle source) if ((texture.id == 0) || (source.width == 0) || (source.height == 0)) { texShapes = (Texture2D){ 1, 1, 1, 1, 7 }; - texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; + texShapesRec = (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; } else { @@ -647,27 +647,27 @@ void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float s rlEnd(); } -// Draw a color-filled rectangle -void DrawRectangle(int posX, int posY, int width, int height, Color color) +// Draw a color-filled rayRectangle +void DrawrayRectangle(int posX, int posY, int width, int height, Color color) { - DrawRectangleV((Vector2){ (float)posX, (float)posY }, (Vector2){ (float)width, (float)height }, color); + DrawrayRectangleV((Vector2){ (float)posX, (float)posY }, (Vector2){ (float)width, (float)height }, color); } -// Draw a color-filled rectangle (Vector version) +// Draw a color-filled rayRectangle (Vector version) // NOTE: On OpenGL 3.3 and ES2 we use QUADS to avoid drawing order issues -void DrawRectangleV(Vector2 position, Vector2 size, Color color) +void DrawrayRectangleV(Vector2 position, Vector2 size, Color color) { - DrawRectanglePro((Rectangle){ position.x, position.y, size.x, size.y }, (Vector2){ 0.0f, 0.0f }, 0.0f, color); + DrawrayRectanglePro((rayRectangle){ position.x, position.y, size.x, size.y }, (Vector2){ 0.0f, 0.0f }, 0.0f, color); } -// Draw a color-filled rectangle -void DrawRectangleRec(Rectangle rec, Color color) +// Draw a color-filled rayRectangle +void DrawrayRectangleRec(rayRectangle rec, Color color) { - DrawRectanglePro(rec, (Vector2){ 0.0f, 0.0f }, 0.0f, color); + DrawrayRectanglePro(rec, (Vector2){ 0.0f, 0.0f }, 0.0f, color); } -// Draw a color-filled rectangle with pro parameters -void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color) +// Draw a color-filled rayRectangle with pro parameters +void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color) { Vector2 topLeft = { 0 }; Vector2 topRight = { 0 }; @@ -746,23 +746,23 @@ void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color #endif } -// Draw a vertical-gradient-filled rectangle +// Draw a vertical-gradient-filled rayRectangle // NOTE: Gradient goes from bottom (color1) to top (color2) -void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2) +void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2) { - DrawRectangleGradientEx((Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color2, color2, color1); + DrawrayRectangleGradientEx((rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color2, color2, color1); } -// Draw a horizontal-gradient-filled rectangle +// Draw a horizontal-gradient-filled rayRectangle // NOTE: Gradient goes from bottom (color1) to top (color2) -void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2) +void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2) { - DrawRectangleGradientEx((Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color1, color2, color2); + DrawrayRectangleGradientEx((rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color1, color2, color2); } -// Draw a gradient-filled rectangle +// Draw a gradient-filled rayRectangle // NOTE: Colors refer to corners, starting at top-lef corner and counter-clockwise -void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4) +void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4) { rlSetTexture(texShapes.id); @@ -790,15 +790,15 @@ void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, rlSetTexture(0); } -// Draw rectangle outline +// Draw rayRectangle outline // NOTE: On OpenGL 3.3 and ES2 we use QUADS to avoid drawing order issues -void DrawRectangleLines(int posX, int posY, int width, int height, Color color) +void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color) { #if defined(SUPPORT_QUADS_DRAW_MODE) - DrawRectangle(posX, posY, width, 1, color); - DrawRectangle(posX + width - 1, posY + 1, 1, height - 2, color); - DrawRectangle(posX, posY + height - 1, width, 1, color); - DrawRectangle(posX, posY + 1, 1, height - 2, color); + DrawrayRectangle(posX, posY, width, 1, color); + DrawrayRectangle(posX + width - 1, posY + 1, 1, height - 2, color); + DrawrayRectangle(posX, posY + height - 1, width, 1, color); + DrawrayRectangle(posX, posY + 1, 1, height - 2, color); #else rlBegin(RL_LINES); rlColor4ub(color.r, color.g, color.b, color.a); @@ -817,8 +817,8 @@ void DrawRectangleLines(int posX, int posY, int width, int height, Color color) #endif } -// Draw rectangle outline with extended parameters -void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) +// Draw rayRectangle outline with extended parameters +void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color) { if ((lineThick > rec.width) || (lineThick > rec.height)) { @@ -827,7 +827,7 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) } // When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following - // four rectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight): + // four rayRectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight): // // TTTTTTTT // TTTTTTTT @@ -837,24 +837,24 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) // BBBBBBBB // - Rectangle top = { rec.x, rec.y, rec.width, lineThick }; - Rectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick }; - Rectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; - Rectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; + rayRectangle top = { rec.x, rec.y, rec.width, lineThick }; + rayRectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick }; + rayRectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; + rayRectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f }; - DrawRectangleRec(top, color); - DrawRectangleRec(bottom, color); - DrawRectangleRec(left, color); - DrawRectangleRec(right, color); + DrawrayRectangleRec(top, color); + DrawrayRectangleRec(bottom, color); + DrawrayRectangleRec(left, color); + DrawrayRectangleRec(right, color); } -// Draw rectangle with rounded edges -void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color) +// Draw rayRectangle with rounded edges +void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color) { - // Not a rounded rectangle + // Not a rounded rayRectangle if ((roundness <= 0.0f) || (rec.width < 1) || (rec.height < 1 )) { - DrawRectangleRec(rec, color); + DrawrayRectangleRec(rec, color); return; } @@ -950,7 +950,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co } } - // [2] Upper Rectangle + // [2] Upper rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[0].x, point[0].y); @@ -961,7 +961,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[1].x, point[1].y); - // [4] Right Rectangle + // [4] Right rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[2].x, point[2].y); @@ -972,7 +972,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[3].x, point[3].y); - // [6] Bottom Rectangle + // [6] Bottom rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[11].x, point[11].y); @@ -983,7 +983,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[10].x, point[10].y); - // [8] Left Rectangle + // [8] Left rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[7].x, point[7].y); @@ -994,7 +994,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[8].x, point[8].y); - // [9] Middle Rectangle + // [9] Middle rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[8].x, point[8].y); @@ -1025,7 +1025,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co } } - // [2] Upper Rectangle + // [2] Upper rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[0].x, point[0].y); rlVertex2f(point[8].x, point[8].y); @@ -1034,7 +1034,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlVertex2f(point[0].x, point[0].y); rlVertex2f(point[9].x, point[9].y); - // [4] Right Rectangle + // [4] Right rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[9].x, point[9].y); rlVertex2f(point[10].x, point[10].y); @@ -1043,7 +1043,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlVertex2f(point[9].x, point[9].y); rlVertex2f(point[3].x, point[3].y); - // [6] Bottom Rectangle + // [6] Bottom rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[11].x, point[11].y); rlVertex2f(point[5].x, point[5].y); @@ -1052,7 +1052,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlVertex2f(point[11].x, point[11].y); rlVertex2f(point[4].x, point[4].y); - // [8] Left Rectangle + // [8] Left rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[7].x, point[7].y); rlVertex2f(point[6].x, point[6].y); @@ -1061,7 +1061,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co rlVertex2f(point[7].x, point[7].y); rlVertex2f(point[11].x, point[11].y); - // [9] Middle Rectangle + // [9] Middle rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[8].x, point[8].y); rlVertex2f(point[11].x, point[11].y); @@ -1073,15 +1073,15 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co #endif } -// Draw rectangle with rounded edges outline -void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color) +// Draw rayRectangle with rounded edges outline +void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color) { if (lineThick < 0) lineThick = 0; - // Not a rounded rectangle + // Not a rounded rayRectangle if (roundness <= 0.0f) { - DrawRectangleLinesEx((Rectangle){rec.x-lineThick, rec.y-lineThick, rec.width+2*lineThick, rec.height+2*lineThick}, lineThick, color); + DrawrayRectangleLinesEx((rayRectangle){rec.x-lineThick, rec.y-lineThick, rec.width+2*lineThick, rec.height+2*lineThick}, lineThick, color); return; } @@ -1168,7 +1168,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo } } - // Upper rectangle + // Upper rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[0].x, point[0].y); @@ -1179,7 +1179,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[1].x, point[1].y); - // Right rectangle + // Right rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[2].x, point[2].y); @@ -1190,7 +1190,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[3].x, point[3].y); - // Lower rectangle + // Lower rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[13].x, point[13].y); @@ -1201,7 +1201,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[12].x, point[12].y); - // Left rectangle + // Left rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height); rlVertex2f(point[15].x, point[15].y); @@ -1239,7 +1239,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo } } - // Upper rectangle + // Upper rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[0].x, point[0].y); rlVertex2f(point[8].x, point[8].y); @@ -1248,7 +1248,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlVertex2f(point[0].x, point[0].y); rlVertex2f(point[9].x, point[9].y); - // Right rectangle + // Right rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[10].x, point[10].y); rlVertex2f(point[11].x, point[11].y); @@ -1257,7 +1257,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlVertex2f(point[10].x, point[10].y); rlVertex2f(point[3].x, point[3].y); - // Lower rectangle + // Lower rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[13].x, point[13].y); rlVertex2f(point[5].x, point[5].y); @@ -1266,7 +1266,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo rlVertex2f(point[13].x, point[13].y); rlVertex2f(point[4].x, point[4].y); - // Left rectangle + // Left rayRectangle rlColor4ub(color.r, color.g, color.b, color.a); rlVertex2f(point[7].x, point[7].y); rlVertex2f(point[6].x, point[6].y); @@ -2041,8 +2041,8 @@ Vector2 GetSplinePointBezierCubic(Vector2 startPos, Vector2 startControlPos, Vec // Module Functions Definition - Collision Detection functions //---------------------------------------------------------------------------------- -// Check if point is inside rectangle -bool CheckCollisionPointRec(Vector2 point, Rectangle rec) +// Check if point is inside rayRectangle +bool CheckCollisionPointRec(Vector2 point, rayRectangle rec) { bool collision = false; @@ -2100,8 +2100,8 @@ bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount) return collision; } -// Check collision between two rectangles -bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2) +// Check collision between two rayRectangles +bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2) { bool collision = false; @@ -2126,9 +2126,9 @@ bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, floa return collision; } -// Check collision between circle and rectangle +// Check collision between circle and rayRectangle // NOTE: Reviewed version to take into account corner limit case -bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec) +bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec) { bool collision = false; @@ -2201,10 +2201,10 @@ bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshol return collision; } -// Get collision rectangle for two rectangles collision -Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2) +// Get collision rayRectangle for two rayRectangles collision +rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2) { - Rectangle overlap = { 0 }; + rayRectangle overlap = { 0 }; float left = (rec1.x > rec2.x)? rec1.x : rec2.x; float right1 = rec1.x + rec1.width; diff --git a/src/rtext.c b/src/rtext.c index dd7c83f39..3e57d6f19 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -16,7 +16,7 @@ * supported by default, to remove support, just comment unrequired #define in this module * * #define SUPPORT_FONT_ATLAS_WHITE_REC -* On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle +* On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rayRectangle * at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow * drawing text and shapes with a single draw call [SetShapesTexture()]. * @@ -28,7 +28,7 @@ * * DEPENDENCIES: * stb_truetype - Load TTF file and rasterize characters data -* stb_rect_pack - Rectangles packing algorithms, required for font atlas generation +* stb_rect_pack - rayRectangles packing algorithms, required for font atlas generation * * * LICENSE: zlib/libpng @@ -77,7 +77,7 @@ #endif #define STB_RECT_PACK_IMPLEMENTATION - #include "external/stb_rect_pack.h" // Required for: ttf font rectangles packaging + #include "external/stb_rect_pack.h" // Required for: ttf font rayRectangles packaging #define STBTT_STATIC #define STB_TRUETYPE_IMPLEMENTATION @@ -112,7 +112,7 @@ //---------------------------------------------------------------------------------- #if defined(SUPPORT_DEFAULT_FONT) // Default font provided by raylib -// NOTE: Default font is loaded on InitWindow() and disposed on CloseWindow() [module: core] +// NOTE: Default font is loaded on InitWindow() and disposed on rayCloseWindow() [module: core] static Font defaultFont = { 0 }; #endif @@ -241,9 +241,9 @@ extern void LoadFontDefault(void) //------------------------------------------------------------------------------ // Allocate space for our characters info data - // NOTE: This memory must be freed at end! --> Done by CloseWindow() + // NOTE: This memory must be freed at end! --> Done by rayCloseWindow() defaultFont.glyphs = (GlyphInfo *)RL_MALLOC(defaultFont.glyphCount*sizeof(GlyphInfo)); - defaultFont.recs = (Rectangle *)RL_MALLOC(defaultFont.glyphCount*sizeof(Rectangle)); + defaultFont.recs = (rayRectangle *)RL_MALLOC(defaultFont.glyphCount*sizeof(rayRectangle)); int currentLine = 0; int currentPosX = charsDivisor; @@ -398,7 +398,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) // We allocate a temporal arrays for chars data measures, // once we get the actual number of chars, we copy data to a sized arrays int tempCharValues[MAX_GLYPHS_FROM_IMAGE] = { 0 }; - Rectangle tempCharRecs[MAX_GLYPHS_FROM_IMAGE] = { 0 }; + rayRectangle tempCharRecs[MAX_GLYPHS_FROM_IMAGE] = { 0 }; Color *pixels = LoadImageColors(image); @@ -430,7 +430,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) int lineToRead = 0; int xPosToRead = charSpacing; - // Parse image data to get rectangle sizes + // Parse image data to get rayRectangle sizes while ((lineSpacing + lineToRead*(charHeight + lineSpacing)) < image.height) { while ((xPosToRead < image.width) && @@ -478,13 +478,13 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) // We got tempCharValues and tempCharsRecs populated with chars data // Now we move temp data to sized charValues and charRecs arrays font.glyphs = (GlyphInfo *)RL_MALLOC(font.glyphCount*sizeof(GlyphInfo)); - font.recs = (Rectangle *)RL_MALLOC(font.glyphCount*sizeof(Rectangle)); + font.recs = (rayRectangle *)RL_MALLOC(font.glyphCount*sizeof(rayRectangle)); for (int i = 0; i < font.glyphCount; i++) { font.glyphs[i].value = tempCharValues[i]; - // Get character rectangle in the font atlas texture + // Get character rayRectangle in the font atlas texture font.recs[i] = tempCharRecs[i]; // NOTE: On image based fonts (XNA style), character offsets and xAdvance are not required (set to 0) @@ -688,7 +688,7 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz // Generate image font atlas using chars info // NOTE: Packing method: 0-Default, 1-Skyline #if defined(SUPPORT_FILEFORMAT_TTF) -Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod) +Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod) { Image atlas = { 0 }; @@ -703,8 +703,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp // In case no chars count provided we suppose default of 95 glyphCount = (glyphCount > 0)? glyphCount : 95; - // NOTE: Rectangles memory is loaded here! - Rectangle *recs = (Rectangle *)RL_MALLOC(glyphCount*sizeof(Rectangle)); + // NOTE: rayRectangles memory is loaded here! + rayRectangle *recs = (rayRectangle *)RL_MALLOC(glyphCount*sizeof(rayRectangle)); // Calculate image size based on total glyph width and glyph row count int totalWidth = 0; @@ -769,7 +769,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp offsetX = padding; // NOTE: Be careful on offsetY for SDF fonts, by default SDF - // use an internal padding of 4 pixels, it means char rectangle + // use an internal padding of 4 pixels, it means char rayRectangle // height is bigger than fontSize, it could be up to (fontSize + 8) offsetY += (fontSize + 2*padding); @@ -797,7 +797,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp } } - // Fill chars rectangles in atlas info + // Fill chars rayRectangles in atlas info recs[i].x = (float)offsetX; recs[i].y = (float)offsetY; recs[i].width = (float)glyphs[i].image.width; @@ -815,7 +815,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp stbrp_init_target(context, atlas.width, atlas.height, nodes, glyphCount); stbrp_rect *rects = (stbrp_rect *)RL_MALLOC(glyphCount*sizeof(stbrp_rect)); - // Fill rectangles for packaging + // Fill rayRectangles for packaging for (int i = 0; i < glyphCount; i++) { rects[i].id = i; @@ -823,12 +823,12 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp rects[i].h = glyphs[i].image.height + 2*padding; } - // Package rectangles into atlas + // Package rayRectangles into atlas stbrp_pack_rects(context, rects, glyphCount); for (int i = 0; i < glyphCount; i++) { - // It returns char rectangles in atlas + // It returns char rayRectangles in atlas recs[i].x = rects[i].x + (float)padding; recs[i].y = rects[i].y + (float)padding; recs[i].width = (float)glyphs[i].image.width; @@ -854,8 +854,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp } #if defined(SUPPORT_FONT_ATLAS_WHITE_REC) - // Add a 3x3 white rectangle at the bottom-right corner of the generated atlas, - // useful to use as the white texture to draw shapes with raylib, using this rectangle + // Add a 3x3 white rayRectangle at the bottom-right corner of the generated atlas, + // useful to use as the white texture to draw shapes with raylib, using this rayRectangle // shapes and text can be backed into a single draw call: SetShapesTexture() for (int i = 0, k = atlas.width*atlas.height - 1; i < 3; i++) { @@ -986,8 +986,8 @@ bool ExportFontAsCode(Font font, const char *fileName) #endif // Save font recs data - byteCount += sprintf(txtData + byteCount, "// Font characters rectangles data\n"); - byteCount += sprintf(txtData + byteCount, "static const Rectangle fontRecs_%s[%i] = {\n", fileNamePascal, font.glyphCount); + byteCount += sprintf(txtData + byteCount, "// Font characters rayRectangles data\n"); + byteCount += sprintf(txtData + byteCount, "static const rayRectangle fontRecs_%s[%i] = {\n", fileNamePascal, font.glyphCount); for (int i = 0; i < font.glyphCount; i++) { byteCount += sprintf(txtData + byteCount, " { %1.0f, %1.0f, %1.0f , %1.0f },\n", font.recs[i].x, font.recs[i].y, font.recs[i].width, font.recs[i].height); @@ -1035,8 +1035,8 @@ bool ExportFontAsCode(Font font, const char *fileName) #if defined(SUPPORT_FONT_DATA_COPY) byteCount += sprintf(txtData + byteCount, " // Copy glyph recs data from global fontRecs\n"); byteCount += sprintf(txtData + byteCount, " // NOTE: Required to avoid issues if trying to free font\n"); - byteCount += sprintf(txtData + byteCount, " font.recs = (Rectangle *)malloc(font.glyphCount*sizeof(Rectangle));\n"); - byteCount += sprintf(txtData + byteCount, " memcpy(font.recs, fontRecs_%s, font.glyphCount*sizeof(Rectangle));\n\n", fileNamePascal); + byteCount += sprintf(txtData + byteCount, " font.recs = (rayRectangle *)malloc(font.glyphCount*sizeof(rayRectangle));\n"); + byteCount += sprintf(txtData + byteCount, " memcpy(font.recs, fontRecs_%s, font.glyphCount*sizeof(rayRectangle));\n\n", fileNamePascal); byteCount += sprintf(txtData + byteCount, " // Copy font glyph info data from global fontChars\n"); byteCount += sprintf(txtData + byteCount, " // NOTE: Required to avoid issues if trying to free font\n"); @@ -1159,16 +1159,16 @@ void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSiz int index = GetGlyphIndex(font, codepoint); float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor - // Character destination rectangle on screen + // Character destination rayRectangle on screen // NOTE: We consider glyphPadding on drawing - Rectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor, + rayRectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor, position.y + font.glyphs[index].offsetY*scaleFactor - (float)font.glyphPadding*scaleFactor, (font.recs[index].width + 2.0f*font.glyphPadding)*scaleFactor, (font.recs[index].height + 2.0f*font.glyphPadding)*scaleFactor }; - // Character source rectangle from font texture atlas + // Character source rayRectangle from font texture atlas // NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects - Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding, + rayRectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding, font.recs[index].width + 2.0f*font.glyphPadding, font.recs[index].height + 2.0f*font.glyphPadding }; // Draw the character texture on the screen @@ -1327,11 +1327,11 @@ GlyphInfo GetGlyphInfo(Font font, int codepoint) return info; } -// Get glyph rectangle in font atlas for a codepoint (unicode character) +// Get glyph rayRectangle in font atlas for a codepoint (unicode character) // NOTE: If codepoint is not found in the font it fallbacks to '?' -Rectangle GetGlyphAtlasRec(Font font, int codepoint) +rayRectangle GetGlyphAtlasRec(Font font, int codepoint) { - Rectangle rec = { 0 }; + rayRectangle rec = { 0 }; rec = font.recs[GetGlyphIndex(font, codepoint)]; @@ -2117,7 +2117,7 @@ static Font LoadBMFont(const char *fileName) font.glyphCount = glyphCount; font.glyphPadding = 0; font.glyphs = (GlyphInfo *)RL_MALLOC(glyphCount*sizeof(GlyphInfo)); - font.recs = (Rectangle *)RL_MALLOC(glyphCount*sizeof(Rectangle)); + font.recs = (rayRectangle *)RL_MALLOC(glyphCount*sizeof(rayRectangle)); int charId, charX, charY, charWidth, charHeight, charOffsetX, charOffsetY, charAdvanceX; @@ -2130,8 +2130,8 @@ static Font LoadBMFont(const char *fileName) if (readVars == 8) // Make sure all char data has been properly read { - // Get character rectangle in the font atlas texture - font.recs[i] = (Rectangle){ (float)charX, (float)charY, (float)charWidth, (float)charHeight }; + // Get character rayRectangle in the font atlas texture + font.recs[i] = (rayRectangle){ (float)charX, (float)charY, (float)charWidth, (float)charHeight }; // Save data properly in sprite font font.glyphs[i].value = charId; diff --git a/src/rtextures.c b/src/rtextures.c index 98586db73..85713eb0c 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -949,7 +949,7 @@ Image GenImageGradientSquare(int width, int height, float density, Color inner, float distX = fabsf(x - centerX); float distY = fabsf(y - centerY); - // Normalize the distances by the dimensions of the gradient rectangle + // Normalize the distances by the dimensions of the gradient rayRectangle float normalizedDistX = distX / centerX; float normalizedDistY = distY / centerY; @@ -1200,7 +1200,7 @@ Image ImageCopy(Image image) } // Create an image from another image piece -Image ImageFromImage(Image image, Rectangle rec) +Image ImageFromImage(Image image, rayRectangle rec) { Image result = { 0 }; @@ -1220,21 +1220,21 @@ Image ImageFromImage(Image image, Rectangle rec) return result; } -// Crop an image to area defined by a rectangle -// NOTE: Security checks are performed in case rectangle goes out of bounds -void ImageCrop(Image *image, Rectangle crop) +// Crop an image to area defined by a rayRectangle +// NOTE: Security checks are performed in case rayRectangle goes out of bounds +void ImageCrop(Image *image, rayRectangle crop) { // Security check to avoid program crash if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return; - // Security checks to validate crop rectangle + // Security checks to validate crop rayRectangle if (crop.x < 0) { crop.width += crop.x; crop.x = 0; } if (crop.y < 0) { crop.height += crop.y; crop.y = 0; } if ((crop.x + crop.width) > image->width) crop.width = image->width - crop.x; if ((crop.y + crop.height) > image->height) crop.height = image->height - crop.y; if ((crop.x > image->width) || (crop.y > image->height)) { - TRACELOG(LOG_WARNING, "IMAGE: Failed to crop, rectangle out of bounds"); + TRACELOG(LOG_WARNING, "IMAGE: Failed to crop, rayRectangle out of bounds"); return; } @@ -1490,7 +1490,7 @@ Image ImageText(const char *text, int fontSize, Color color) int spacing = fontSize/defaultFontSize; imText = ImageTextEx(GetFontDefault(), text, (float)fontSize, (float)spacing, color); // WARNING: Module required: rtext #else - imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle + imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rayRectangle TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext"); #endif return imText; @@ -1532,8 +1532,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co { if ((codepoint != ' ') && (codepoint != '\t')) { - Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; - ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint); + rayRectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; + ImageDraw(&imText, font.glyphs[index].image, (rayRectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint); } if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing); @@ -1555,7 +1555,7 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); } #else - imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle + imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rayRectangle TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext"); #endif return imText; @@ -1668,7 +1668,7 @@ void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, i if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats"); else if ((newWidth != image->width) || (newHeight != image->height)) { - Rectangle srcRec = { 0, 0, (float)image->width, (float)image->height }; + rayRectangle srcRec = { 0, 0, (float)image->width, (float)image->height }; Vector2 dstPos = { (float)offsetX, (float)offsetY }; if (offsetX < 0) @@ -1734,9 +1734,9 @@ void ImageAlphaCrop(Image *image, float threshold) // Security check to avoid program crash if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return; - Rectangle crop = GetImageAlphaBorder(*image, threshold); + rayRectangle crop = GetImageAlphaBorder(*image, threshold); - // Crop if rectangle is valid + // Crop if rayRectangle is valid if (((int)crop.width != 0) && ((int)crop.height != 0)) ImageCrop(image, crop); } @@ -2881,11 +2881,11 @@ void UnloadImagePalette(Color *colors) RL_FREE(colors); } -// Get image alpha border rectangle +// Get image alpha border rayRectangle // NOTE: Threshold is defined as a percentage: 0.0f -> 1.0f -Rectangle GetImageAlphaBorder(Image image, float threshold) +rayRectangle GetImageAlphaBorder(Image image, float threshold) { - Rectangle crop = { 0 }; + rayRectangle crop = { 0 }; Color *pixels = LoadImageColors(image); @@ -2913,7 +2913,7 @@ Rectangle GetImageAlphaBorder(Image image, float threshold) // Check for empty blank image if ((xMin != 65536) && (xMax != 65536)) { - crop = (Rectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) }; + crop = (rayRectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) }; } UnloadImageColors(pixels); @@ -3324,10 +3324,10 @@ void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color col while (y >= x) { - ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color); - ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color); - ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color); - ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color); + ImageDrawrayRectangle(dst, centerX - x, centerY + y, x*2, 1, color); + ImageDrawrayRectangle(dst, centerX - x, centerY - y, x*2, 1, color); + ImageDrawrayRectangle(dst, centerX - y, centerY + x, y*2, 1, color); + ImageDrawrayRectangle(dst, centerX - y, centerY - x, y*2, 1, color); x++; if (decesionParameter > 0) @@ -3379,20 +3379,20 @@ void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color) ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color); } -// Draw rectangle within an image -void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color) +// Draw rayRectangle within an image +void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color) { - ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color); + ImageDrawrayRectangleRec(dst, (rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color); } -// Draw rectangle within an image (Vector version) -void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color) +// Draw rayRectangle within an image (Vector version) +void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color) { - ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color); + ImageDrawrayRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color); } -// Draw rectangle within an image -void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color) +// Draw rayRectangle within an image +void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color) { // Security check to avoid program crash if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return; @@ -3436,18 +3436,18 @@ void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color) } } -// Draw rectangle lines within an image -void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color) +// Draw rayRectangle lines within an image +void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color) { - ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color); - ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color); - ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color); - ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color); + ImageDrawrayRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color); + ImageDrawrayRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color); + ImageDrawrayRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color); + ImageDrawrayRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color); } // Draw an image (source) within an image (destination) // NOTE: Color tint is applied to source image -void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint) +void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint) { // Security check to avoid program crash if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) || @@ -3461,25 +3461,25 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color Image *srcPtr = &src; // Pointer to source image bool useSrcMod = false; // Track source copy required - // Source rectangle out-of-bounds security checks + // Source rayRectangle out-of-bounds security checks if (srcRec.x < 0) { srcRec.width += srcRec.x; srcRec.x = 0; } if (srcRec.y < 0) { srcRec.height += srcRec.y; srcRec.y = 0; } if ((srcRec.x + srcRec.width) > src.width) srcRec.width = src.width - srcRec.x; if ((srcRec.y + srcRec.height) > src.height) srcRec.height = src.height - srcRec.y; - // Check if source rectangle needs to be resized to destination rectangle + // Check if source rayRectangle needs to be resized to destination rayRectangle // In that case, we make a copy of source, and we apply all required transform if (((int)srcRec.width != (int)dstRec.width) || ((int)srcRec.height != (int)dstRec.height)) { srcMod = ImageFromImage(src, srcRec); // Create image from another image - ImageResize(&srcMod, (int)dstRec.width, (int)dstRec.height); // Resize to destination rectangle - srcRec = (Rectangle){ 0, 0, (float)srcMod.width, (float)srcMod.height }; + ImageResize(&srcMod, (int)dstRec.width, (int)dstRec.height); // Resize to destination rayRectangle + srcRec = (rayRectangle){ 0, 0, (float)srcMod.width, (float)srcMod.height }; srcPtr = &srcMod; useSrcMod = true; } - // Destination rectangle out-of-bounds security checks + // Destination rayRectangle out-of-bounds security checks if (dstRec.x < 0) { srcRec.x -= dstRec.x; @@ -3580,8 +3580,8 @@ void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, { Image imText = ImageTextEx(font, text, fontSize, spacing, tint); - Rectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height }; - Rectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height }; + rayRectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height }; + rayRectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height }; ImageDraw(dst, imText, srcRec, dstRec, WHITE); @@ -3662,8 +3662,8 @@ TextureCubemap LoadTextureCubemap(Image image, int layout) int size = cubemap.width; Image faces = { 0 }; // Vertical column image - Rectangle faceRecs[6] = { 0 }; // Face source rectangles - for (int i = 0; i < 6; i++) faceRecs[i] = (Rectangle){ 0, 0, (float)size, (float)size }; + rayRectangle faceRecs[6] = { 0 }; // Face source rayRectangles + for (int i = 0; i < 6; i++) faceRecs[i] = (rayRectangle){ 0, 0, (float)size, (float)size }; if (layout == CUBEMAP_LAYOUT_LINE_VERTICAL) { @@ -3702,7 +3702,7 @@ TextureCubemap LoadTextureCubemap(Image image, int layout) // NOTE: Image formatting does not work with compressed textures - for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE); + for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (rayRectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE); } // NOTE: Cubemap data is expected to be provided as 6 images in a single data array, @@ -3812,9 +3812,9 @@ void UpdateTexture(Texture2D texture, const void *pixels) rlUpdateTexture(texture.id, 0, 0, texture.width, texture.height, texture.format, pixels); } -// Update GPU texture rectangle with new data +// Update GPU texture rayRectangle with new data // NOTE: pixels data must match texture.format -void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels) +void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels) { rlUpdateTexture(texture.id, (int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, texture.format, pixels); } @@ -3944,25 +3944,25 @@ void DrawTextureV(Texture2D texture, Vector2 position, Color tint) // Draw a texture with extended parameters void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint) { - Rectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; - Rectangle dest = { position.x, position.y, (float)texture.width*scale, (float)texture.height*scale }; + rayRectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height }; + rayRectangle dest = { position.x, position.y, (float)texture.width*scale, (float)texture.height*scale }; Vector2 origin = { 0.0f, 0.0f }; DrawTexturePro(texture, source, dest, origin, rotation, tint); } -// Draw a part of a texture (defined by a rectangle) -void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint) +// Draw a part of a texture (defined by a rayRectangle) +void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint) { - Rectangle dest = { position.x, position.y, fabsf(source.width), fabsf(source.height) }; + rayRectangle dest = { position.x, position.y, fabsf(source.width), fabsf(source.height) }; Vector2 origin = { 0.0f, 0.0f }; DrawTexturePro(texture, source, dest, origin, 0.0f, tint); } -// Draw a part of a texture (defined by a rectangle) with 'pro' parameters -// NOTE: origin is relative to destination rectangle size -void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint) +// Draw a part of a texture (defined by a rayRectangle) with 'pro' parameters +// NOTE: origin is relative to destination rayRectangle size +void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint) { // Check if texture is valid if (texture.id > 0) @@ -4084,7 +4084,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 } // Draws a texture (or part of it) that stretches or shrinks nicely using n-patch info -void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint) +void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint) { if (texture.id > 0) {