| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | #ifndef RAYLIB_H |
| 85 | #define RAYLIB_H |
| 86 | |
| 87 | #include <stdarg.h> |
| 88 | |
| 89 | #define RAYLIB_VERSION_MAJOR 6 |
| 90 | #define RAYLIB_VERSION_MINOR 0 |
| 91 | #define RAYLIB_VERSION_PATCH 0 |
| 92 | #define RAYLIB_VERSION "6.0" |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | #if defined(_WIN32) |
| 98 | #if defined(__TINYC__) |
| 99 | #define __declspec(x) __attribute__((x)) |
| 100 | #endif |
| 101 | #if defined(BUILD_LIBTYPE_SHARED) |
| 102 | #define RLAPI __declspec(dllexport) |
| 103 | #elif defined(USE_LIBTYPE_SHARED) |
| 104 | #define RLAPI __declspec(dllimport) |
| 105 | #endif |
| 106 | #else |
| 107 | #if defined(BUILD_LIBTYPE_SHARED) |
| 108 | #define RLAPI __attribute__((visibility("default"))) |
| 109 | #endif |
| 110 | #endif |
| 111 | |
| 112 | #ifndef RLAPI |
| 113 | #define RLAPI |
| 114 | #endif |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | #ifndef PI |
| 120 | #define PI 3.14159265358979323846f |
| 121 | #endif |
| 122 | #ifndef DEG2RAD |
| 123 | #define DEG2RAD (PI/180.0f) |
| 124 | #endif |
| 125 | #ifndef RAD2DEG |
| 126 | #define RAD2DEG (180.0f/PI) |
| 127 | #endif |
| 128 | |
| 129 | |
| 130 | |
| 131 | #ifndef RL_MALLOC |
| 132 | #define RL_MALLOC(sz) malloc(sz) |
| 133 | #endif |
| 134 | #ifndef RL_CALLOC |
| 135 | #define RL_CALLOC(n,sz) calloc(n,sz) |
| 136 | #endif |
| 137 | #ifndef RL_REALLOC |
| 138 | #define RL_REALLOC(ptr,sz) realloc(ptr,sz) |
| 139 | #endif |
| 140 | #ifndef RL_FREE |
| 141 | #define RL_FREE(ptr) free(ptr) |
| 142 | #endif |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | #if defined(__cplusplus) |
| 148 | #define CLITERAL(type) type |
| 149 | #else |
| 150 | #define CLITERAL(type) (type) |
| 151 | #endif |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | #if !defined(_MSC_VER) && (defined(__cplusplus) && __cplusplus < 201103L) |
| 157 | #error "C++11 or later is required. Add -std=c++11" |
| 158 | #endif |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | #define RL_COLOR_TYPE |
| 165 | #define RL_RECTANGLE_TYPE |
| 166 | #define RL_VECTOR2_TYPE |
| 167 | #define RL_VECTOR3_TYPE |
| 168 | #define RL_VECTOR4_TYPE |
| 169 | #define RL_QUATERNION_TYPE |
| 170 | #define RL_MATRIX_TYPE |
| 171 | |
| 172 | |
| 173 | |
| 174 | #define LIGHTGRAY CLITERAL(Color){ 200, 200, 200, 255 } |
| 175 | #define GRAY CLITERAL(Color){ 130, 130, 130, 255 } |
| 176 | #define DARKGRAY CLITERAL(Color){ 80, 80, 80, 255 } |
| 177 | #define YELLOW CLITERAL(Color){ 253, 249, 0, 255 } |
| 178 | #define GOLD CLITERAL(Color){ 255, 203, 0, 255 } |
| 179 | #define ORANGE CLITERAL(Color){ 255, 161, 0, 255 } |
| 180 | #define PINK CLITERAL(Color){ 255, 109, 194, 255 } |
| 181 | #define RED CLITERAL(Color){ 230, 41, 55, 255 } |
| 182 | #define MAROON CLITERAL(Color){ 190, 33, 55, 255 } |
| 183 | #define GREEN CLITERAL(Color){ 0, 228, 48, 255 } |
| 184 | #define LIME CLITERAL(Color){ 0, 158, 47, 255 } |
| 185 | #define DARKGREEN CLITERAL(Color){ 0, 117, 44, 255 } |
| 186 | #define SKYBLUE CLITERAL(Color){ 102, 191, 255, 255 } |
| 187 | #define BLUE CLITERAL(Color){ 0, 121, 241, 255 } |
| 188 | #define DARKBLUE CLITERAL(Color){ 0, 82, 172, 255 } |
| 189 | #define PURPLE CLITERAL(Color){ 200, 122, 255, 255 } |
| 190 | #define VIOLET CLITERAL(Color){ 135, 60, 190, 255 } |
| 191 | #define DARKPURPLE CLITERAL(Color){ 112, 31, 126, 255 } |
| 192 | #define BEIGE CLITERAL(Color){ 211, 176, 131, 255 } |
| 193 | #define BROWN CLITERAL(Color){ 127, 106, 79, 255 } |
| 194 | #define DARKBROWN CLITERAL(Color){ 76, 63, 47, 255 } |
| 195 | |
| 196 | #define WHITE CLITERAL(Color){ 255, 255, 255, 255 } |
| 197 | #define BLACK CLITERAL(Color){ 0, 0, 0, 255 } |
| 198 | #define BLANK CLITERAL(Color){ 0, 0, 0, 0 } |
| 199 | #define MAGENTA CLITERAL(Color){ 255, 0, 255, 255 } |
| 200 | #define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | #if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800) |
| 207 | #include <stdbool.h> |
| 208 | #elif !defined(__cplusplus) && !defined(bool) |
| 209 | typedef enum bool { false = 0, true = !false } bool; |
| 210 | #define RL_BOOL_TYPE |
| 211 | #endif |
| 212 | |
| 213 | |
| 214 | typedef struct Vector2 { |
| 215 | float x; |
| 216 | float y; |
| 217 | } Vector2; |
| 218 | |
| 219 | |
| 220 | typedef struct Vector3 { |
| 221 | float x; |
| 222 | float y; |
| 223 | float z; |
| 224 | } Vector3; |
| 225 | |
| 226 | |
| 227 | typedef struct Vector4 { |
| 228 | float x; |
| 229 | float y; |
| 230 | float z; |
| 231 | float w; |
| 232 | } Vector4; |
| 233 | |
| 234 | |
| 235 | typedef Vector4 Quaternion; |
| 236 | |
| 237 | |
| 238 | typedef struct Matrix { |
| 239 | float m0, m4, m8, m12; |
| 240 | float m1, m5, m9, m13; |
| 241 | float m2, m6, m10, m14; |
| 242 | float m3, m7, m11, m15; |
| 243 | } Matrix; |
| 244 | |
| 245 | |
| 246 | typedef struct Color { |
| 247 | unsigned char r; |
| 248 | unsigned char g; |
| 249 | unsigned char b; |
| 250 | unsigned char a; |
| 251 | } Color; |
| 252 | |
| 253 | |
| 254 | typedef struct Rectangle { |
| 255 | float x; |
| 256 | float y; |
| 257 | float width; |
| 258 | float height; |
| 259 | } Rectangle; |
| 260 | |
| 261 | |
| 262 | typedef struct Image { |
| 263 | void *data; |
| 264 | int width; |
| 265 | int height; |
| 266 | int mipmaps; |
| 267 | int format; |
| 268 | } Image; |
| 269 | |
| 270 | |
| 271 | typedef struct Texture { |
| 272 | unsigned int id; |
| 273 | int width; |
| 274 | int height; |
| 275 | int mipmaps; |
| 276 | int format; |
| 277 | } Texture; |
| 278 | |
| 279 | |
| 280 | typedef Texture Texture2D; |
| 281 | |
| 282 | |
| 283 | typedef Texture TextureCubemap; |
| 284 | |
| 285 | |
| 286 | typedef struct RenderTexture { |
| 287 | unsigned int id; |
| 288 | Texture texture; |
| 289 | Texture depth; |
| 290 | } RenderTexture; |
| 291 | |
| 292 | |
| 293 | typedef RenderTexture RenderTexture2D; |
| 294 | |
| 295 | |
| 296 | typedef struct NPatchInfo { |
| 297 | Rectangle source; |
| 298 | int left; |
| 299 | int top; |
| 300 | int right; |
| 301 | int bottom; |
| 302 | int layout; |
| 303 | } NPatchInfo; |
| 304 | |
| 305 | |
| 306 | typedef struct GlyphInfo { |
| 307 | int value; |
| 308 | int offsetX; |
| 309 | int offsetY; |
| 310 | int advanceX; |
| 311 | Image image; |
| 312 | } GlyphInfo; |
| 313 | |
| 314 | |
| 315 | typedef struct Font { |
| 316 | int baseSize; |
| 317 | int glyphCount; |
| 318 | int glyphPadding; |
| 319 | Texture2D texture; |
| 320 | Rectangle *recs; |
| 321 | GlyphInfo *glyphs; |
| 322 | } Font; |
| 323 | |
| 324 | |
| 325 | typedef struct Camera3D { |
| 326 | Vector3 position; |
| 327 | Vector3 target; |
| 328 | Vector3 up; |
| 329 | float fovy; |
| 330 | int projection; |
| 331 | } Camera3D; |
| 332 | |
| 333 | typedef Camera3D Camera; |
| 334 | |
| 335 | |
| 336 | typedef struct Camera2D { |
| 337 | Vector2 offset; |
| 338 | Vector2 target; |
| 339 | float rotation; |
| 340 | float zoom; |
| 341 | } Camera2D; |
| 342 | |
| 343 | |
| 344 | typedef struct Mesh { |
| 345 | int vertexCount; |
| 346 | int triangleCount; |
| 347 | |
| 348 | |
| 349 | float *vertices; |
| 350 | float *texcoords; |
| 351 | float *texcoords2; |
| 352 | float *normals; |
| 353 | float *tangents; |
| 354 | unsigned char *colors; |
| 355 | unsigned short *indices; |
| 356 | |
| 357 | |
| 358 | int boneCount; |
| 359 | unsigned char *boneIndices; |
| 360 | float *boneWeights; |
| 361 | |
| 362 | |
| 363 | |
| 364 | float *animVertices; |
| 365 | float *animNormals; |
| 366 | |
| 367 | |
| 368 | unsigned int vaoId; |
| 369 | unsigned int *vboId; |
| 370 | } Mesh; |
| 371 | |
| 372 | |
| 373 | typedef struct Shader { |
| 374 | unsigned int id; |
| 375 | int *locs; |
| 376 | } Shader; |
| 377 | |
| 378 | |
| 379 | typedef struct MaterialMap { |
| 380 | Texture2D texture; |
| 381 | Color color; |
| 382 | float value; |
| 383 | } MaterialMap; |
| 384 | |
| 385 | |
| 386 | typedef struct Material { |
| 387 | Shader shader; |
| 388 | MaterialMap *maps; |
| 389 | float params[4]; |
| 390 | } Material; |
| 391 | |
| 392 | |
| 393 | typedef struct Transform { |
| 394 | Vector3 translation; |
| 395 | Quaternion rotation; |
| 396 | Vector3 scale; |
| 397 | } Transform; |
| 398 | |
| 399 | |
| 400 | typedef Transform *ModelAnimPose; |
| 401 | |
| 402 | |
| 403 | typedef struct BoneInfo { |
| 404 | char name[32]; |
| 405 | int parent; |
| 406 | } BoneInfo; |
| 407 | |
| 408 | |
| 409 | typedef struct ModelSkeleton { |
| 410 | int boneCount; |
| 411 | BoneInfo *bones; |
| 412 | ModelAnimPose bindPose; |
| 413 | } ModelSkeleton; |
| 414 | |
| 415 | |
| 416 | typedef struct Model { |
| 417 | Matrix transform; |
| 418 | |
| 419 | int meshCount; |
| 420 | int materialCount; |
| 421 | Mesh *meshes; |
| 422 | Material *materials; |
| 423 | int *meshMaterial; |
| 424 | |
| 425 | |
| 426 | ModelSkeleton skeleton; |
| 427 | |
| 428 | |
| 429 | ModelAnimPose currentPose; |
| 430 | Matrix *boneMatrices; |
| 431 | } Model; |
| 432 | |
| 433 | |
| 434 | typedef struct ModelAnimation { |
| 435 | char name[32]; |
| 436 | |
| 437 | int boneCount; |
| 438 | int keyframeCount; |
| 439 | ModelAnimPose *keyframePoses; |
| 440 | } ModelAnimation; |
| 441 | |
| 442 | |
| 443 | typedef struct Ray { |
| 444 | Vector3 position; |
| 445 | Vector3 direction; |
| 446 | } Ray; |
| 447 | |
| 448 | |
| 449 | typedef struct RayCollision { |
| 450 | bool hit; |
| 451 | float distance; |
| 452 | Vector3 point; |
| 453 | Vector3 normal; |
| 454 | } RayCollision; |
| 455 | |
| 456 | |
| 457 | typedef struct BoundingBox { |
| 458 | Vector3 min; |
| 459 | Vector3 max; |
| 460 | } BoundingBox; |
| 461 | |
| 462 | |
| 463 | typedef struct Wave { |
| 464 | unsigned int frameCount; |
| 465 | unsigned int sampleRate; |
| 466 | unsigned int sampleSize; |
| 467 | unsigned int channels; |
| 468 | void *data; |
| 469 | } Wave; |
| 470 | |
| 471 | |
| 472 | |
| 473 | typedef struct rAudioBuffer rAudioBuffer; |
| 474 | typedef struct rAudioProcessor rAudioProcessor; |
| 475 | |
| 476 | |
| 477 | typedef struct AudioStream { |
| 478 | rAudioBuffer *buffer; |
| 479 | rAudioProcessor *processor; |
| 480 | |
| 481 | unsigned int sampleRate; |
| 482 | unsigned int sampleSize; |
| 483 | unsigned int channels; |
| 484 | } AudioStream; |
| 485 | |
| 486 | |
| 487 | typedef struct Sound { |
| 488 | AudioStream stream; |
| 489 | unsigned int frameCount; |
| 490 | } Sound; |
| 491 | |
| 492 | |
| 493 | typedef struct Music { |
| 494 | AudioStream stream; |
| 495 | unsigned int frameCount; |
| 496 | bool looping; |
| 497 | |
| 498 | int ctxType; |
| 499 | void *ctxData; |
| 500 | } Music; |
| 501 | |
| 502 | |
| 503 | typedef struct VrDeviceInfo { |
| 504 | int hResolution; |
| 505 | int vResolution; |
| 506 | float hScreenSize; |
| 507 | float vScreenSize; |
| 508 | float eyeToScreenDistance; |
| 509 | float lensSeparationDistance; |
| 510 | float interpupillaryDistance; |
| 511 | float lensDistortionValues[4]; |
| 512 | float chromaAbCorrection[4]; |
| 513 | } VrDeviceInfo; |
| 514 | |
| 515 | |
| 516 | typedef struct VrStereoConfig { |
| 517 | Matrix projection[2]; |
| 518 | Matrix viewOffset[2]; |
| 519 | float leftLensCenter[2]; |
| 520 | float rightLensCenter[2]; |
| 521 | float leftScreenCenter[2]; |
| 522 | float rightScreenCenter[2]; |
| 523 | float scale[2]; |
| 524 | float scaleIn[2]; |
| 525 | } VrStereoConfig; |
| 526 | |
| 527 | |
| 528 | typedef struct FilePathList { |
| 529 | unsigned int count; |
| 530 | char **paths; |
| 531 | } FilePathList; |
| 532 | |
| 533 | |
| 534 | typedef struct AutomationEvent { |
| 535 | unsigned int frame; |
| 536 | unsigned int type; |
| 537 | int params[4]; |
| 538 | } AutomationEvent; |
| 539 | |
| 540 | |
| 541 | typedef struct AutomationEventList { |
| 542 | unsigned int capacity; |
| 543 | unsigned int count; |
| 544 | AutomationEvent *events; |
| 545 | } AutomationEventList; |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | typedef enum { |
| 554 | FLAG_VSYNC_HINT = 0x00000040, |
| 555 | FLAG_FULLSCREEN_MODE = 0x00000002, |
| 556 | FLAG_WINDOW_RESIZABLE = 0x00000004, |
| 557 | FLAG_WINDOW_UNDECORATED = 0x00000008, |
| 558 | FLAG_WINDOW_HIDDEN = 0x00000080, |
| 559 | FLAG_WINDOW_MINIMIZED = 0x00000200, |
| 560 | FLAG_WINDOW_MAXIMIZED = 0x00000400, |
| 561 | FLAG_WINDOW_UNFOCUSED = 0x00000800, |
| 562 | FLAG_WINDOW_TOPMOST = 0x00001000, |
| 563 | FLAG_WINDOW_ALWAYS_RUN = 0x00000100, |
| 564 | FLAG_WINDOW_TRANSPARENT = 0x00000010, |
| 565 | FLAG_WINDOW_HIGHDPI = 0x00002000, |
| 566 | FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000, |
| 567 | FLAG_BORDERLESS_WINDOWED_MODE = 0x00008000, |
| 568 | FLAG_MSAA_4X_HINT = 0x00000020, |
| 569 | FLAG_INTERLACED_HINT = 0x00010000 |
| 570 | } ConfigFlags; |
| 571 | |
| 572 | |
| 573 | |
| 574 | typedef enum { |
| 575 | LOG_ALL = 0, |
| 576 | LOG_TRACE, |
| 577 | LOG_DEBUG, |
| 578 | LOG_INFO, |
| 579 | LOG_WARNING, |
| 580 | LOG_ERROR, |
| 581 | LOG_FATAL, |
| 582 | LOG_NONE |
| 583 | } TraceLogLevel; |
| 584 | |
| 585 | |
| 586 | |
| 587 | typedef enum { |
| 588 | KEY_NULL = 0, |
| 589 | |
| 590 | KEY_APOSTROPHE = 39, |
| 591 | KEY_COMMA = 44, |
| 592 | KEY_MINUS = 45, |
| 593 | KEY_PERIOD = 46, |
| 594 | KEY_SLASH = 47, |
| 595 | KEY_ZERO = 48, |
| 596 | KEY_ONE = 49, |
| 597 | KEY_TWO = 50, |
| 598 | KEY_THREE = 51, |
| 599 | KEY_FOUR = 52, |
| 600 | KEY_FIVE = 53, |
| 601 | KEY_SIX = 54, |
| 602 | KEY_SEVEN = 55, |
| 603 | KEY_EIGHT = 56, |
| 604 | KEY_NINE = 57, |
| 605 | KEY_SEMICOLON = 59, |
| 606 | KEY_EQUAL = 61, |
| 607 | KEY_A = 65, |
| 608 | KEY_B = 66, |
| 609 | KEY_C = 67, |
| 610 | KEY_D = 68, |
| 611 | KEY_E = 69, |
| 612 | KEY_F = 70, |
| 613 | KEY_G = 71, |
| 614 | KEY_H = 72, |
| 615 | KEY_I = 73, |
| 616 | KEY_J = 74, |
| 617 | KEY_K = 75, |
| 618 | KEY_L = 76, |
| 619 | KEY_M = 77, |
| 620 | KEY_N = 78, |
| 621 | KEY_O = 79, |
| 622 | KEY_P = 80, |
| 623 | KEY_Q = 81, |
| 624 | KEY_R = 82, |
| 625 | KEY_S = 83, |
| 626 | KEY_T = 84, |
| 627 | KEY_U = 85, |
| 628 | KEY_V = 86, |
| 629 | KEY_W = 87, |
| 630 | KEY_X = 88, |
| 631 | KEY_Y = 89, |
| 632 | KEY_Z = 90, |
| 633 | KEY_LEFT_BRACKET = 91, |
| 634 | KEY_BACKSLASH = 92, |
| 635 | KEY_RIGHT_BRACKET = 93, |
| 636 | KEY_GRAVE = 96, |
| 637 | |
| 638 | KEY_SPACE = 32, |
| 639 | KEY_ESCAPE = 256, |
| 640 | KEY_ENTER = 257, |
| 641 | KEY_TAB = 258, |
| 642 | KEY_BACKSPACE = 259, |
| 643 | KEY_INSERT = 260, |
| 644 | KEY_DELETE = 261, |
| 645 | KEY_RIGHT = 262, |
| 646 | KEY_LEFT = 263, |
| 647 | KEY_DOWN = 264, |
| 648 | KEY_UP = 265, |
| 649 | KEY_PAGE_UP = 266, |
| 650 | KEY_PAGE_DOWN = 267, |
| 651 | KEY_HOME = 268, |
| 652 | KEY_END = 269, |
| 653 | KEY_CAPS_LOCK = 280, |
| 654 | KEY_SCROLL_LOCK = 281, |
| 655 | KEY_NUM_LOCK = 282, |
| 656 | KEY_PRINT_SCREEN = 283, |
| 657 | KEY_PAUSE = 284, |
| 658 | KEY_F1 = 290, |
| 659 | KEY_F2 = 291, |
| 660 | KEY_F3 = 292, |
| 661 | KEY_F4 = 293, |
| 662 | KEY_F5 = 294, |
| 663 | KEY_F6 = 295, |
| 664 | KEY_F7 = 296, |
| 665 | KEY_F8 = 297, |
| 666 | KEY_F9 = 298, |
| 667 | KEY_F10 = 299, |
| 668 | KEY_F11 = 300, |
| 669 | KEY_F12 = 301, |
| 670 | KEY_LEFT_SHIFT = 340, |
| 671 | KEY_LEFT_CONTROL = 341, |
| 672 | KEY_LEFT_ALT = 342, |
| 673 | KEY_LEFT_SUPER = 343, |
| 674 | KEY_RIGHT_SHIFT = 344, |
| 675 | KEY_RIGHT_CONTROL = 345, |
| 676 | KEY_RIGHT_ALT = 346, |
| 677 | KEY_RIGHT_SUPER = 347, |
| 678 | KEY_KB_MENU = 348, |
| 679 | |
| 680 | KEY_KP_0 = 320, |
| 681 | KEY_KP_1 = 321, |
| 682 | KEY_KP_2 = 322, |
| 683 | KEY_KP_3 = 323, |
| 684 | KEY_KP_4 = 324, |
| 685 | KEY_KP_5 = 325, |
| 686 | KEY_KP_6 = 326, |
| 687 | KEY_KP_7 = 327, |
| 688 | KEY_KP_8 = 328, |
| 689 | KEY_KP_9 = 329, |
| 690 | KEY_KP_DECIMAL = 330, |
| 691 | KEY_KP_DIVIDE = 331, |
| 692 | KEY_KP_MULTIPLY = 332, |
| 693 | KEY_KP_SUBTRACT = 333, |
| 694 | KEY_KP_ADD = 334, |
| 695 | KEY_KP_ENTER = 335, |
| 696 | KEY_KP_EQUAL = 336, |
| 697 | |
| 698 | KEY_BACK = 4, |
| 699 | KEY_MENU = 5, |
| 700 | KEY_VOLUME_UP = 24, |
| 701 | KEY_VOLUME_DOWN = 25 |
| 702 | } KeyboardKey; |
| 703 | |
| 704 | |
| 705 | #define MOUSE_LEFT_BUTTON MOUSE_BUTTON_LEFT |
| 706 | #define MOUSE_RIGHT_BUTTON MOUSE_BUTTON_RIGHT |
| 707 | #define MOUSE_MIDDLE_BUTTON MOUSE_BUTTON_MIDDLE |
| 708 | |
| 709 | |
| 710 | typedef enum { |
| 711 | MOUSE_BUTTON_LEFT = 0, |
| 712 | MOUSE_BUTTON_RIGHT = 1, |
| 713 | MOUSE_BUTTON_MIDDLE = 2, |
| 714 | MOUSE_BUTTON_SIDE = 3, |
| 715 | MOUSE_BUTTON_EXTRA = 4, |
| 716 | MOUSE_BUTTON_FORWARD = 5, |
| 717 | MOUSE_BUTTON_BACK = 6, |
| 718 | } MouseButton; |
| 719 | |
| 720 | |
| 721 | typedef enum { |
| 722 | MOUSE_CURSOR_DEFAULT = 0, |
| 723 | MOUSE_CURSOR_ARROW = 1, |
| 724 | MOUSE_CURSOR_IBEAM = 2, |
| 725 | MOUSE_CURSOR_CROSSHAIR = 3, |
| 726 | MOUSE_CURSOR_POINTING_HAND = 4, |
| 727 | MOUSE_CURSOR_RESIZE_EW = 5, |
| 728 | MOUSE_CURSOR_RESIZE_NS = 6, |
| 729 | MOUSE_CURSOR_RESIZE_NWSE = 7, |
| 730 | MOUSE_CURSOR_RESIZE_NESW = 8, |
| 731 | MOUSE_CURSOR_RESIZE_ALL = 9, |
| 732 | MOUSE_CURSOR_NOT_ALLOWED = 10 |
| 733 | } MouseCursor; |
| 734 | |
| 735 | |
| 736 | typedef enum { |
| 737 | GAMEPAD_BUTTON_UNKNOWN = 0, |
| 738 | GAMEPAD_BUTTON_LEFT_FACE_UP, |
| 739 | GAMEPAD_BUTTON_LEFT_FACE_RIGHT, |
| 740 | GAMEPAD_BUTTON_LEFT_FACE_DOWN, |
| 741 | GAMEPAD_BUTTON_LEFT_FACE_LEFT, |
| 742 | GAMEPAD_BUTTON_RIGHT_FACE_UP, |
| 743 | GAMEPAD_BUTTON_RIGHT_FACE_RIGHT, |
| 744 | GAMEPAD_BUTTON_RIGHT_FACE_DOWN, |
| 745 | GAMEPAD_BUTTON_RIGHT_FACE_LEFT, |
| 746 | GAMEPAD_BUTTON_LEFT_TRIGGER_1, |
| 747 | GAMEPAD_BUTTON_LEFT_TRIGGER_2, |
| 748 | GAMEPAD_BUTTON_RIGHT_TRIGGER_1, |
| 749 | GAMEPAD_BUTTON_RIGHT_TRIGGER_2, |
| 750 | GAMEPAD_BUTTON_MIDDLE_LEFT, |
| 751 | GAMEPAD_BUTTON_MIDDLE, |
| 752 | GAMEPAD_BUTTON_MIDDLE_RIGHT, |
| 753 | GAMEPAD_BUTTON_LEFT_THUMB, |
| 754 | GAMEPAD_BUTTON_RIGHT_THUMB |
| 755 | } GamepadButton; |
| 756 | |
| 757 | |
| 758 | typedef enum { |
| 759 | GAMEPAD_AXIS_LEFT_X = 0, |
| 760 | GAMEPAD_AXIS_LEFT_Y = 1, |
| 761 | GAMEPAD_AXIS_RIGHT_X = 2, |
| 762 | GAMEPAD_AXIS_RIGHT_Y = 3, |
| 763 | GAMEPAD_AXIS_LEFT_TRIGGER = 4, |
| 764 | GAMEPAD_AXIS_RIGHT_TRIGGER = 5 |
| 765 | } GamepadAxis; |
| 766 | |
| 767 | |
| 768 | typedef enum { |
| 769 | MATERIAL_MAP_ALBEDO = 0, |
| 770 | MATERIAL_MAP_METALNESS, |
| 771 | MATERIAL_MAP_NORMAL, |
| 772 | MATERIAL_MAP_ROUGHNESS, |
| 773 | MATERIAL_MAP_OCCLUSION, |
| 774 | MATERIAL_MAP_EMISSION, |
| 775 | MATERIAL_MAP_HEIGHT, |
| 776 | MATERIAL_MAP_CUBEMAP, |
| 777 | MATERIAL_MAP_IRRADIANCE, |
| 778 | MATERIAL_MAP_PREFILTER, |
| 779 | MATERIAL_MAP_BRDF |
| 780 | } MaterialMapIndex; |
| 781 | |
| 782 | #define MATERIAL_MAP_DIFFUSE MATERIAL_MAP_ALBEDO |
| 783 | #define MATERIAL_MAP_SPECULAR MATERIAL_MAP_METALNESS |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | typedef enum { |
| 789 | SHADER_LOC_VERTEX_POSITION = 0, |
| 790 | SHADER_LOC_VERTEX_TEXCOORD01, |
| 791 | SHADER_LOC_VERTEX_TEXCOORD02, |
| 792 | SHADER_LOC_VERTEX_NORMAL, |
| 793 | SHADER_LOC_VERTEX_TANGENT, |
| 794 | SHADER_LOC_VERTEX_COLOR, |
| 795 | SHADER_LOC_MATRIX_MVP, |
| 796 | SHADER_LOC_MATRIX_VIEW, |
| 797 | SHADER_LOC_MATRIX_PROJECTION, |
| 798 | SHADER_LOC_MATRIX_MODEL, |
| 799 | SHADER_LOC_MATRIX_NORMAL, |
| 800 | SHADER_LOC_VECTOR_VIEW, |
| 801 | SHADER_LOC_COLOR_DIFFUSE, |
| 802 | SHADER_LOC_COLOR_SPECULAR, |
| 803 | SHADER_LOC_COLOR_AMBIENT, |
| 804 | SHADER_LOC_MAP_ALBEDO, |
| 805 | SHADER_LOC_MAP_METALNESS, |
| 806 | SHADER_LOC_MAP_NORMAL, |
| 807 | SHADER_LOC_MAP_ROUGHNESS, |
| 808 | SHADER_LOC_MAP_OCCLUSION, |
| 809 | SHADER_LOC_MAP_EMISSION, |
| 810 | SHADER_LOC_MAP_HEIGHT, |
| 811 | SHADER_LOC_MAP_CUBEMAP, |
| 812 | SHADER_LOC_MAP_IRRADIANCE, |
| 813 | SHADER_LOC_MAP_PREFILTER, |
| 814 | SHADER_LOC_MAP_BRDF, |
| 815 | SHADER_LOC_VERTEX_BONEIDS, |
| 816 | SHADER_LOC_VERTEX_BONEWEIGHTS, |
| 817 | SHADER_LOC_MATRIX_BONETRANSFORMS, |
| 818 | SHADER_LOC_VERTEX_INSTANCETRANSFORM |
| 819 | } ShaderLocationIndex; |
| 820 | |
| 821 | #define SHADER_LOC_MAP_DIFFUSE SHADER_LOC_MAP_ALBEDO |
| 822 | #define SHADER_LOC_MAP_SPECULAR SHADER_LOC_MAP_METALNESS |
| 823 | |
| 824 | |
| 825 | typedef enum { |
| 826 | SHADER_UNIFORM_FLOAT = 0, |
| 827 | SHADER_UNIFORM_VEC2, |
| 828 | SHADER_UNIFORM_VEC3, |
| 829 | SHADER_UNIFORM_VEC4, |
| 830 | SHADER_UNIFORM_INT, |
| 831 | SHADER_UNIFORM_IVEC2, |
| 832 | SHADER_UNIFORM_IVEC3, |
| 833 | SHADER_UNIFORM_IVEC4, |
| 834 | SHADER_UNIFORM_UINT, |
| 835 | SHADER_UNIFORM_UIVEC2, |
| 836 | SHADER_UNIFORM_UIVEC3, |
| 837 | SHADER_UNIFORM_UIVEC4, |
| 838 | SHADER_UNIFORM_SAMPLER2D |
| 839 | } ShaderUniformDataType; |
| 840 | |
| 841 | |
| 842 | typedef enum { |
| 843 | SHADER_ATTRIB_FLOAT = 0, |
| 844 | SHADER_ATTRIB_VEC2, |
| 845 | SHADER_ATTRIB_VEC3, |
| 846 | SHADER_ATTRIB_VEC4 |
| 847 | } ShaderAttributeDataType; |
| 848 | |
| 849 | |
| 850 | |
| 851 | typedef enum { |
| 852 | PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, |
| 853 | PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, |
| 854 | PIXELFORMAT_UNCOMPRESSED_R5G6B5, |
| 855 | PIXELFORMAT_UNCOMPRESSED_R8G8B8, |
| 856 | PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, |
| 857 | PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, |
| 858 | PIXELFORMAT_UNCOMPRESSED_R8G8B8A8, |
| 859 | PIXELFORMAT_UNCOMPRESSED_R32, |
| 860 | PIXELFORMAT_UNCOMPRESSED_R32G32B32, |
| 861 | PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, |
| 862 | PIXELFORMAT_UNCOMPRESSED_R16, |
| 863 | PIXELFORMAT_UNCOMPRESSED_R16G16B16, |
| 864 | PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, |
| 865 | PIXELFORMAT_COMPRESSED_DXT1_RGB, |
| 866 | PIXELFORMAT_COMPRESSED_DXT1_RGBA, |
| 867 | PIXELFORMAT_COMPRESSED_DXT3_RGBA, |
| 868 | PIXELFORMAT_COMPRESSED_DXT5_RGBA, |
| 869 | PIXELFORMAT_COMPRESSED_ETC1_RGB, |
| 870 | PIXELFORMAT_COMPRESSED_ETC2_RGB, |
| 871 | PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA, |
| 872 | PIXELFORMAT_COMPRESSED_PVRT_RGB, |
| 873 | PIXELFORMAT_COMPRESSED_PVRT_RGBA, |
| 874 | PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA, |
| 875 | PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA |
| 876 | } PixelFormat; |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | typedef enum { |
| 882 | TEXTURE_FILTER_POINT = 0, |
| 883 | TEXTURE_FILTER_BILINEAR, |
| 884 | TEXTURE_FILTER_TRILINEAR, |
| 885 | TEXTURE_FILTER_ANISOTROPIC_4X, |
| 886 | TEXTURE_FILTER_ANISOTROPIC_8X, |
| 887 | TEXTURE_FILTER_ANISOTROPIC_16X, |
| 888 | } TextureFilter; |
| 889 | |
| 890 | |
| 891 | typedef enum { |
| 892 | TEXTURE_WRAP_REPEAT = 0, |
| 893 | TEXTURE_WRAP_CLAMP, |
| 894 | TEXTURE_WRAP_MIRROR_REPEAT, |
| 895 | TEXTURE_WRAP_MIRROR_CLAMP |
| 896 | } TextureWrap; |
| 897 | |
| 898 | |
| 899 | typedef enum { |
| 900 | CUBEMAP_LAYOUT_AUTO_DETECT = 0, |
| 901 | CUBEMAP_LAYOUT_LINE_VERTICAL, |
| 902 | CUBEMAP_LAYOUT_LINE_HORIZONTAL, |
| 903 | CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, |
| 904 | CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE |
| 905 | } CubemapLayout; |
| 906 | |
| 907 | |
| 908 | typedef enum { |
| 909 | FONT_DEFAULT = 0, |
| 910 | FONT_BITMAP, |
| 911 | FONT_SDF |
| 912 | } FontType; |
| 913 | |
| 914 | |
| 915 | typedef enum { |
| 916 | BLEND_ALPHA = 0, |
| 917 | BLEND_ADDITIVE, |
| 918 | BLEND_MULTIPLIED, |
| 919 | BLEND_ADD_COLORS, |
| 920 | BLEND_SUBTRACT_COLORS, |
| 921 | BLEND_ALPHA_PREMULTIPLY, |
| 922 | BLEND_CUSTOM, |
| 923 | BLEND_CUSTOM_SEPARATE |
| 924 | } BlendMode; |
| 925 | |
| 926 | |
| 927 | |
| 928 | typedef enum { |
| 929 | GESTURE_NONE = 0, |
| 930 | GESTURE_TAP = 1, |
| 931 | GESTURE_DOUBLETAP = 2, |
| 932 | GESTURE_HOLD = 4, |
| 933 | GESTURE_DRAG = 8, |
| 934 | GESTURE_SWIPE_RIGHT = 16, |
| 935 | GESTURE_SWIPE_LEFT = 32, |
| 936 | GESTURE_SWIPE_UP = 64, |
| 937 | GESTURE_SWIPE_DOWN = 128, |
| 938 | GESTURE_PINCH_IN = 256, |
| 939 | GESTURE_PINCH_OUT = 512 |
| 940 | } Gesture; |
| 941 | |
| 942 | |
| 943 | typedef enum { |
| 944 | CAMERA_CUSTOM = 0, |
| 945 | CAMERA_FREE, |
| 946 | CAMERA_ORBITAL, |
| 947 | CAMERA_FIRST_PERSON, |
| 948 | CAMERA_THIRD_PERSON |
| 949 | } CameraMode; |
| 950 | |
| 951 | |
| 952 | typedef enum { |
| 953 | CAMERA_PERSPECTIVE = 0, |
| 954 | CAMERA_ORTHOGRAPHIC |
| 955 | } CameraProjection; |
| 956 | |
| 957 | |
| 958 | typedef enum { |
| 959 | NPATCH_NINE_PATCH = 0, |
| 960 | NPATCH_THREE_PATCH_VERTICAL, |
| 961 | NPATCH_THREE_PATCH_HORIZONTAL |
| 962 | } NPatchLayout; |
| 963 | |
| 964 | |
| 965 | |
| 966 | typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); |
| 967 | typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); |
| 968 | typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); |
| 969 | typedef char *(*LoadFileTextCallback)(const char *fileName); |
| 970 | typedef bool (*SaveFileTextCallback)(const char *fileName, const char *text); |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | #if defined(__cplusplus) |
| 982 | extern "C" { |
| 983 | #endif |
| 984 | |
| 985 | |
| 986 | RLAPI void InitWindow(int width, int height, const char *title); |
| 987 | RLAPI void CloseWindow(void); |
| 988 | RLAPI bool WindowShouldClose(void); |
| 989 | RLAPI bool IsWindowReady(void); |
| 990 | RLAPI bool IsWindowFullscreen(void); |
| 991 | RLAPI bool IsWindowHidden(void); |
| 992 | RLAPI bool IsWindowMinimized(void); |
| 993 | RLAPI bool IsWindowMaximized(void); |
| 994 | RLAPI bool IsWindowFocused(void); |
| 995 | RLAPI bool IsWindowResized(void); |
| 996 | RLAPI bool IsWindowState(unsigned int flag); |
| 997 | RLAPI void SetWindowState(unsigned int flags); |
| 998 | RLAPI void ClearWindowState(unsigned int flags); |
| 999 | RLAPI void ToggleFullscreen(void); |
| 1000 | RLAPI void ToggleBorderlessWindowed(void); |
| 1001 | RLAPI void MaximizeWindow(void); |
| 1002 | RLAPI void MinimizeWindow(void); |
| 1003 | RLAPI void RestoreWindow(void); |
| 1004 | RLAPI void SetWindowIcon(Image image); |
| 1005 | RLAPI void SetWindowIcons(Image *images, int count); |
| 1006 | RLAPI void SetWindowTitle(const char *title); |
| 1007 | RLAPI void SetWindowPosition(int x, int y); |
| 1008 | RLAPI void SetWindowMonitor(int monitor); |
| 1009 | RLAPI void SetWindowMinSize(int width, int height); |
| 1010 | RLAPI void SetWindowMaxSize(int width, int height); |
| 1011 | RLAPI void SetWindowSize(int width, int height); |
| 1012 | RLAPI void SetWindowOpacity(float opacity); |
| 1013 | RLAPI void SetWindowFocused(void); |
| 1014 | RLAPI void *GetWindowHandle(void); |
| 1015 | RLAPI int GetScreenWidth(void); |
| 1016 | RLAPI int GetScreenHeight(void); |
| 1017 | RLAPI int GetRenderWidth(void); |
| 1018 | RLAPI int GetRenderHeight(void); |
| 1019 | RLAPI int GetMonitorCount(void); |
| 1020 | RLAPI int GetCurrentMonitor(void); |
| 1021 | RLAPI Vector2 GetMonitorPosition(int monitor); |
| 1022 | RLAPI int GetMonitorWidth(int monitor); |
| 1023 | RLAPI int GetMonitorHeight(int monitor); |
| 1024 | RLAPI int GetMonitorPhysicalWidth(int monitor); |
| 1025 | RLAPI int GetMonitorPhysicalHeight(int monitor); |
| 1026 | RLAPI int GetMonitorRefreshRate(int monitor); |
| 1027 | RLAPI Vector2 GetWindowPosition(void); |
| 1028 | RLAPI Vector2 GetWindowScaleDPI(void); |
| 1029 | RLAPI const char *GetMonitorName(int monitor); |
| 1030 | RLAPI void SetClipboardText(const char *text); |
| 1031 | RLAPI const char *GetClipboardText(void); |
| 1032 | RLAPI Image GetClipboardImage(void); |
| 1033 | RLAPI void EnableEventWaiting(void); |
| 1034 | RLAPI void DisableEventWaiting(void); |
| 1035 | |
| 1036 | |
| 1037 | RLAPI void ShowCursor(void); |
| 1038 | RLAPI void HideCursor(void); |
| 1039 | RLAPI bool IsCursorHidden(void); |
| 1040 | RLAPI void EnableCursor(void); |
| 1041 | RLAPI void DisableCursor(void); |
| 1042 | RLAPI bool IsCursorOnScreen(void); |
| 1043 | |
| 1044 | |
| 1045 | RLAPI void ClearBackground(Color color); |
| 1046 | RLAPI void BeginDrawing(void); |
| 1047 | RLAPI void EndDrawing(void); |
| 1048 | RLAPI void BeginMode2D(Camera2D camera); |
| 1049 | RLAPI void EndMode2D(void); |
| 1050 | RLAPI void BeginMode3D(Camera3D camera); |
| 1051 | RLAPI void EndMode3D(void); |
| 1052 | RLAPI void BeginTextureMode(RenderTexture2D target); |
| 1053 | RLAPI void EndTextureMode(void); |
| 1054 | RLAPI void BeginShaderMode(Shader shader); |
| 1055 | RLAPI void EndShaderMode(void); |
| 1056 | RLAPI void BeginBlendMode(int mode); |
| 1057 | RLAPI void EndBlendMode(void); |
| 1058 | RLAPI void BeginScissorMode(int x, int y, int width, int height); |
| 1059 | RLAPI void EndScissorMode(void); |
| 1060 | RLAPI void BeginVrStereoMode(VrStereoConfig config); |
| 1061 | RLAPI void EndVrStereoMode(void); |
| 1062 | |
| 1063 | |
| 1064 | RLAPI VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device); |
| 1065 | RLAPI void UnloadVrStereoConfig(VrStereoConfig config); |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); |
| 1070 | RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); |
| 1071 | RLAPI bool IsShaderValid(Shader shader); |
| 1072 | RLAPI int GetShaderLocation(Shader shader, const char *uniformName); |
| 1073 | RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); |
| 1074 | RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); |
| 1075 | RLAPI void SetShaderValueV(Shader shader, int locIndex, const void *value, int uniformType, int count); |
| 1076 | RLAPI void SetShaderValueMatrix(Shader shader, int locIndex, Matrix mat); |
| 1077 | RLAPI void SetShaderValueTexture(Shader shader, int locIndex, Texture2D texture); |
| 1078 | RLAPI void UnloadShader(Shader shader); |
| 1079 | |
| 1080 | |
| 1081 | #define GetMouseRay GetScreenToWorldRay |
| 1082 | RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); |
| 1083 | RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); |
| 1084 | RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); |
| 1085 | RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); |
| 1086 | RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); |
| 1087 | RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); |
| 1088 | RLAPI Matrix GetCameraMatrix(Camera camera); |
| 1089 | RLAPI Matrix GetCameraMatrix2D(Camera2D camera); |
| 1090 | |
| 1091 | |
| 1092 | RLAPI void SetTargetFPS(int fps); |
| 1093 | RLAPI float GetFrameTime(void); |
| 1094 | RLAPI double GetTime(void); |
| 1095 | RLAPI int GetFPS(void); |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | RLAPI void SwapScreenBuffer(void); |
| 1102 | RLAPI void PollInputEvents(void); |
| 1103 | RLAPI void WaitTime(double seconds); |
| 1104 | |
| 1105 | |
| 1106 | RLAPI void SetRandomSeed(unsigned int seed); |
| 1107 | RLAPI int GetRandomValue(int min, int max); |
| 1108 | RLAPI int *LoadRandomSequence(unsigned int count, int min, int max); |
| 1109 | RLAPI void UnloadRandomSequence(int *sequence); |
| 1110 | |
| 1111 | |
| 1112 | RLAPI void TakeScreenshot(const char *fileName); |
| 1113 | RLAPI void SetConfigFlags(unsigned int flags); |
| 1114 | RLAPI void OpenURL(const char *url); |
| 1115 | |
| 1116 | |
| 1117 | RLAPI void SetTraceLogLevel(int logLevel); |
| 1118 | RLAPI void TraceLog(int logLevel, const char *text, ...); |
| 1119 | RLAPI void SetTraceLogCallback(TraceLogCallback callback); |
| 1120 | |
| 1121 | |
| 1122 | RLAPI void *MemAlloc(unsigned int size); |
| 1123 | RLAPI void *MemRealloc(void *ptr, unsigned int size); |
| 1124 | RLAPI void MemFree(void *ptr); |
| 1125 | |
| 1126 | |
| 1127 | RLAPI unsigned char *LoadFileData(const char *fileName, int *dataSize); |
| 1128 | RLAPI void UnloadFileData(unsigned char *data); |
| 1129 | RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); |
| 1130 | RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); |
| 1131 | RLAPI char *LoadFileText(const char *fileName); |
| 1132 | RLAPI void UnloadFileText(char *text); |
| 1133 | RLAPI bool SaveFileText(const char *fileName, const char *text); |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | RLAPI void SetLoadFileDataCallback(LoadFileDataCallback callback); |
| 1138 | RLAPI void SetSaveFileDataCallback(SaveFileDataCallback callback); |
| 1139 | RLAPI void SetLoadFileTextCallback(LoadFileTextCallback callback); |
| 1140 | RLAPI void SetSaveFileTextCallback(SaveFileTextCallback callback); |
| 1141 | |
| 1142 | RLAPI int FileRename(const char *fileName, const char *fileRename); |
| 1143 | RLAPI int FileRemove(const char *fileName); |
| 1144 | RLAPI int FileCopy(const char *srcPath, const char *dstPath); |
| 1145 | RLAPI int FileMove(const char *srcPath, const char *dstPath); |
| 1146 | RLAPI int FileTextReplace(const char *fileName, const char *search, const char *replacement); |
| 1147 | RLAPI int FileTextFindIndex(const char *fileName, const char *search); |
| 1148 | RLAPI bool FileExists(const char *fileName); |
| 1149 | RLAPI bool DirectoryExists(const char *dirPath); |
| 1150 | RLAPI bool IsFileExtension(const char *fileName, const char *ext); |
| 1151 | RLAPI int GetFileLength(const char *fileName); |
| 1152 | RLAPI long GetFileModTime(const char *fileName); |
| 1153 | RLAPI const char *GetFileExtension(const char *fileName); |
| 1154 | RLAPI const char *GetFileName(const char *filePath); |
| 1155 | RLAPI const char *GetFileNameWithoutExt(const char *filePath); |
| 1156 | RLAPI const char *GetDirectoryPath(const char *filePath); |
| 1157 | RLAPI const char *GetPrevDirectoryPath(const char *dirPath); |
| 1158 | RLAPI const char *GetWorkingDirectory(void); |
| 1159 | RLAPI const char *GetApplicationDirectory(void); |
| 1160 | RLAPI int MakeDirectory(const char *dirPath); |
| 1161 | RLAPI bool ChangeDirectory(const char *dirPath); |
| 1162 | RLAPI bool IsPathFile(const char *path); |
| 1163 | RLAPI bool IsFileNameValid(const char *fileName); |
| 1164 | RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); |
| 1165 | RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); |
| 1166 | RLAPI void UnloadDirectoryFiles(FilePathList files); |
| 1167 | RLAPI bool IsFileDropped(void); |
| 1168 | RLAPI FilePathList LoadDroppedFiles(void); |
| 1169 | RLAPI void UnloadDroppedFiles(FilePathList files); |
| 1170 | RLAPI unsigned int GetDirectoryFileCount(const char *dirPath); |
| 1171 | RLAPI unsigned int GetDirectoryFileCountEx(const char *basePath, const char *filter, bool scanSubdirs); |
| 1172 | |
| 1173 | |
| 1174 | RLAPI unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize); |
| 1175 | RLAPI unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); |
| 1176 | RLAPI char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); |
| 1177 | RLAPI unsigned char *DecodeDataBase64(const char *text, int *outputSize); |
| 1178 | RLAPI unsigned int ComputeCRC32(unsigned char *data, int dataSize); |
| 1179 | RLAPI unsigned int *ComputeMD5(unsigned char *data, int dataSize); |
| 1180 | RLAPI unsigned int *ComputeSHA1(unsigned char *data, int dataSize); |
| 1181 | RLAPI unsigned int *ComputeSHA256(unsigned char *data, int dataSize); |
| 1182 | |
| 1183 | |
| 1184 | RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); |
| 1185 | RLAPI void UnloadAutomationEventList(AutomationEventList list); |
| 1186 | RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); |
| 1187 | RLAPI void SetAutomationEventList(AutomationEventList *list); |
| 1188 | RLAPI void SetAutomationEventBaseFrame(int frame); |
| 1189 | RLAPI void StartAutomationEventRecording(void); |
| 1190 | RLAPI void StopAutomationEventRecording(void); |
| 1191 | RLAPI void PlayAutomationEvent(AutomationEvent event); |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | RLAPI bool IsKeyPressed(int key); |
| 1199 | RLAPI bool IsKeyPressedRepeat(int key); |
| 1200 | RLAPI bool IsKeyDown(int key); |
| 1201 | RLAPI bool IsKeyReleased(int key); |
| 1202 | RLAPI bool IsKeyUp(int key); |
| 1203 | RLAPI int GetKeyPressed(void); |
| 1204 | RLAPI int GetCharPressed(void); |
| 1205 | RLAPI const char *GetKeyName(int key); |
| 1206 | RLAPI void SetExitKey(int key); |
| 1207 | |
| 1208 | |
| 1209 | RLAPI bool IsGamepadAvailable(int gamepad); |
| 1210 | RLAPI const char *GetGamepadName(int gamepad); |
| 1211 | RLAPI bool IsGamepadButtonPressed(int gamepad, int button); |
| 1212 | RLAPI bool IsGamepadButtonDown(int gamepad, int button); |
| 1213 | RLAPI bool IsGamepadButtonReleased(int gamepad, int button); |
| 1214 | RLAPI bool IsGamepadButtonUp(int gamepad, int button); |
| 1215 | RLAPI int GetGamepadButtonPressed(void); |
| 1216 | RLAPI int GetGamepadAxisCount(int gamepad); |
| 1217 | RLAPI float GetGamepadAxisMovement(int gamepad, int axis); |
| 1218 | RLAPI int SetGamepadMappings(const char *mappings); |
| 1219 | RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); |
| 1220 | |
| 1221 | |
| 1222 | RLAPI bool IsMouseButtonPressed(int button); |
| 1223 | RLAPI bool IsMouseButtonDown(int button); |
| 1224 | RLAPI bool IsMouseButtonReleased(int button); |
| 1225 | RLAPI bool IsMouseButtonUp(int button); |
| 1226 | RLAPI int GetMouseX(void); |
| 1227 | RLAPI int GetMouseY(void); |
| 1228 | RLAPI Vector2 GetMousePosition(void); |
| 1229 | RLAPI Vector2 GetMouseDelta(void); |
| 1230 | RLAPI void SetMousePosition(int x, int y); |
| 1231 | RLAPI void SetMouseOffset(int offsetX, int offsetY); |
| 1232 | RLAPI void SetMouseScale(float scaleX, float scaleY); |
| 1233 | RLAPI float GetMouseWheelMove(void); |
| 1234 | RLAPI Vector2 GetMouseWheelMoveV(void); |
| 1235 | RLAPI void SetMouseCursor(int cursor); |
| 1236 | |
| 1237 | |
| 1238 | RLAPI int GetTouchX(void); |
| 1239 | RLAPI int GetTouchY(void); |
| 1240 | RLAPI Vector2 GetTouchPosition(int index); |
| 1241 | RLAPI int GetTouchPointId(int index); |
| 1242 | RLAPI int GetTouchPointCount(void); |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | |
| 1247 | RLAPI void SetGesturesEnabled(unsigned int flags); |
| 1248 | RLAPI bool IsGestureDetected(unsigned int gesture); |
| 1249 | RLAPI int GetGestureDetected(void); |
| 1250 | RLAPI float GetGestureHoldDuration(void); |
| 1251 | RLAPI Vector2 GetGestureDragVector(void); |
| 1252 | RLAPI float GetGestureDragAngle(void); |
| 1253 | RLAPI Vector2 GetGesturePinchVector(void); |
| 1254 | RLAPI float GetGesturePinchAngle(void); |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | RLAPI void UpdateCamera(Camera *camera, int mode); |
| 1260 | RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); |
| 1269 | RLAPI Texture2D GetShapesTexture(void); |
| 1270 | RLAPI Rectangle GetShapesTextureRectangle(void); |
| 1271 | |
| 1272 | |
| 1273 | RLAPI void DrawPixel(int posX, int posY, Color color); |
| 1274 | RLAPI void DrawPixelV(Vector2 position, Color color); |
| 1275 | RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); |
| 1276 | RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); |
| 1277 | RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); |
| 1278 | RLAPI void DrawLineStrip(const Vector2 *points, int pointCount, Color color); |
| 1279 | RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); |
| 1280 | RLAPI void DrawLineDashed(Vector2 startPos, Vector2 endPos, int dashSize, int spaceSize, Color color); |
| 1281 | RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); |
| 1282 | RLAPI void DrawCircleV(Vector2 center, float radius, Color color); |
| 1283 | RLAPI void DrawCircleGradient(Vector2 center, float radius, Color inner, Color outer); |
| 1284 | RLAPI void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); |
| 1285 | RLAPI void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); |
| 1286 | RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); |
| 1287 | RLAPI void DrawCircleLinesV(Vector2 center, float radius, Color color); |
| 1288 | RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); |
| 1289 | RLAPI void DrawEllipseV(Vector2 center, float radiusH, float radiusV, Color color); |
| 1290 | RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); |
| 1291 | RLAPI void DrawEllipseLinesV(Vector2 center, float radiusH, float radiusV, Color color); |
| 1292 | RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); |
| 1293 | RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); |
| 1294 | RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); |
| 1295 | RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); |
| 1296 | RLAPI void DrawRectangleRec(Rectangle rec, Color color); |
| 1297 | RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); |
| 1298 | RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color top, Color bottom); |
| 1299 | RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color left, Color right); |
| 1300 | RLAPI void DrawRectangleGradientEx(Rectangle rec, Color topLeft, Color bottomLeft, Color bottomRight, Color topRight); |
| 1301 | RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); |
| 1302 | RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); |
| 1303 | RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); |
| 1304 | RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); |
| 1305 | RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); |
| 1306 | RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); |
| 1307 | RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); |
| 1308 | RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); |
| 1309 | RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); |
| 1310 | RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); |
| 1311 | RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); |
| 1312 | RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); |
| 1313 | |
| 1314 | |
| 1315 | RLAPI void DrawSplineLinear(const Vector2 *points, int pointCount, float thick, Color color); |
| 1316 | RLAPI void DrawSplineBasis(const Vector2 *points, int pointCount, float thick, Color color); |
| 1317 | RLAPI void DrawSplineCatmullRom(const Vector2 *points, int pointCount, float thick, Color color); |
| 1318 | RLAPI void DrawSplineBezierQuadratic(const Vector2 *points, int pointCount, float thick, Color color); |
| 1319 | RLAPI void DrawSplineBezierCubic(const Vector2 *points, int pointCount, float thick, Color color); |
| 1320 | RLAPI void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); |
| 1321 | RLAPI void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); |
| 1322 | RLAPI void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); |
| 1323 | RLAPI void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); |
| 1324 | RLAPI void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); |
| 1325 | |
| 1326 | |
| 1327 | RLAPI Vector2 GetSplinePointLinear(Vector2 startPos, Vector2 endPos, float t); |
| 1328 | RLAPI Vector2 GetSplinePointBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); |
| 1329 | RLAPI Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); |
| 1330 | RLAPI Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float t); |
| 1331 | RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); |
| 1332 | |
| 1333 | |
| 1334 | RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); |
| 1335 | RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); |
| 1336 | RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); |
| 1337 | RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); |
| 1338 | RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); |
| 1339 | RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); |
| 1340 | RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); |
| 1341 | RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); |
| 1342 | RLAPI bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount); |
| 1343 | RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); |
| 1344 | RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | RLAPI Image LoadImage(const char *fileName); |
| 1353 | RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); |
| 1354 | RLAPI Image LoadImageAnim(const char *fileName, int *frames); |
| 1355 | RLAPI Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); |
| 1356 | RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); |
| 1357 | RLAPI Image LoadImageFromTexture(Texture2D texture); |
| 1358 | RLAPI Image LoadImageFromScreen(void); |
| 1359 | RLAPI bool IsImageValid(Image image); |
| 1360 | RLAPI void UnloadImage(Image image); |
| 1361 | RLAPI bool ExportImage(Image image, const char *fileName); |
| 1362 | RLAPI unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); |
| 1363 | RLAPI bool ExportImageAsCode(Image image, const char *fileName); |
| 1364 | |
| 1365 | |
| 1366 | RLAPI Image GenImageColor(int width, int height, Color color); |
| 1367 | RLAPI Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); |
| 1368 | RLAPI Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); |
| 1369 | RLAPI Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer); |
| 1370 | RLAPI Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); |
| 1371 | RLAPI Image GenImageWhiteNoise(int width, int height, float factor); |
| 1372 | RLAPI Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); |
| 1373 | RLAPI Image GenImageCellular(int width, int height, int tileSize); |
| 1374 | RLAPI Image GenImageText(int width, int height, const char *text); |
| 1375 | |
| 1376 | |
| 1377 | RLAPI Image ImageCopy(Image image); |
| 1378 | RLAPI Image ImageFromImage(Image image, Rectangle rec); |
| 1379 | RLAPI Image ImageFromChannel(Image image, int selectedChannel); |
| 1380 | RLAPI Image ImageText(const char *text, int fontSize, Color color); |
| 1381 | RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); |
| 1382 | RLAPI void ImageFormat(Image *image, int newFormat); |
| 1383 | RLAPI void ImageToPOT(Image *image, Color fill); |
| 1384 | RLAPI void ImageCrop(Image *image, Rectangle crop); |
| 1385 | RLAPI void ImageAlphaCrop(Image *image, float threshold); |
| 1386 | RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); |
| 1387 | RLAPI void ImageAlphaMask(Image *image, Image alphaMask); |
| 1388 | RLAPI void ImageAlphaPremultiply(Image *image); |
| 1389 | RLAPI void ImageBlurGaussian(Image *image, int blurSize); |
| 1390 | RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); |
| 1391 | RLAPI void ImageResize(Image *image, int newWidth, int newHeight); |
| 1392 | RLAPI void ImageResizeNN(Image *image, int newWidth, int newHeight); |
| 1393 | RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); |
| 1394 | RLAPI void ImageMipmaps(Image *image); |
| 1395 | RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); |
| 1396 | RLAPI void ImageFlipVertical(Image *image); |
| 1397 | RLAPI void ImageFlipHorizontal(Image *image); |
| 1398 | RLAPI void ImageRotate(Image *image, int degrees); |
| 1399 | RLAPI void ImageRotateCW(Image *image); |
| 1400 | RLAPI void ImageRotateCCW(Image *image); |
| 1401 | RLAPI void ImageColorTint(Image *image, Color color); |
| 1402 | RLAPI void ImageColorInvert(Image *image); |
| 1403 | RLAPI void ImageColorGrayscale(Image *image); |
| 1404 | RLAPI void ImageColorContrast(Image *image, float contrast); |
| 1405 | RLAPI void ImageColorBrightness(Image *image, int brightness); |
| 1406 | RLAPI void ImageColorReplace(Image *image, Color color, Color replace); |
| 1407 | RLAPI Color *LoadImageColors(Image image); |
| 1408 | RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); |
| 1409 | RLAPI void UnloadImageColors(Color *colors); |
| 1410 | RLAPI void UnloadImagePalette(Color *colors); |
| 1411 | RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); |
| 1412 | RLAPI Color GetImageColor(Image image, int x, int y); |
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | RLAPI void ImageClearBackground(Image *dst, Color color); |
| 1417 | RLAPI void ImageDrawPixel(Image *dst, int posX, int posY, Color color); |
| 1418 | RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); |
| 1419 | RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); |
| 1420 | RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); |
| 1421 | RLAPI void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); |
| 1422 | RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); |
| 1423 | RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); |
| 1424 | RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); |
| 1425 | RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); |
| 1426 | RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); |
| 1427 | RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); |
| 1428 | RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); |
| 1429 | RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); |
| 1430 | RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); |
| 1431 | RLAPI void ImageDrawTriangleEx(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); |
| 1432 | RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); |
| 1433 | RLAPI void ImageDrawTriangleFan(Image *dst, const Vector2 *points, int pointCount, Color color); |
| 1434 | RLAPI void ImageDrawTriangleStrip(Image *dst, const Vector2 *points, int pointCount, Color color); |
| 1435 | RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); |
| 1436 | RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); |
| 1437 | RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | RLAPI Texture2D LoadTexture(const char *fileName); |
| 1442 | RLAPI Texture2D LoadTextureFromImage(Image image); |
| 1443 | RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); |
| 1444 | RLAPI RenderTexture2D LoadRenderTexture(int width, int height); |
| 1445 | RLAPI bool IsTextureValid(Texture2D texture); |
| 1446 | RLAPI void UnloadTexture(Texture2D texture); |
| 1447 | RLAPI bool IsRenderTextureValid(RenderTexture2D target); |
| 1448 | RLAPI void UnloadRenderTexture(RenderTexture2D target); |
| 1449 | RLAPI void UpdateTexture(Texture2D texture, const void *pixels); |
| 1450 | RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); |
| 1451 | |
| 1452 | |
| 1453 | RLAPI void GenTextureMipmaps(Texture2D *texture); |
| 1454 | RLAPI void SetTextureFilter(Texture2D texture, int filter); |
| 1455 | RLAPI void SetTextureWrap(Texture2D texture, int wrap); |
| 1456 | |
| 1457 | |
| 1458 | RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); |
| 1459 | RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); |
| 1460 | RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); |
| 1461 | RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); |
| 1462 | RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); |
| 1463 | RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); |
| 1464 | |
| 1465 | |
| 1466 | RLAPI bool ColorIsEqual(Color col1, Color col2); |
| 1467 | RLAPI Color Fade(Color color, float alpha); |
| 1468 | RLAPI int ColorToInt(Color color); |
| 1469 | RLAPI Vector4 ColorNormalize(Color color); |
| 1470 | RLAPI Color ColorFromNormalized(Vector4 normalized); |
| 1471 | RLAPI Vector3 ColorToHSV(Color color); |
| 1472 | RLAPI Color ColorFromHSV(float hue, float saturation, float value); |
| 1473 | RLAPI Color ColorTint(Color color, Color tint); |
| 1474 | RLAPI Color ColorBrightness(Color color, float factor); |
| 1475 | RLAPI Color ColorContrast(Color color, float contrast); |
| 1476 | RLAPI Color ColorAlpha(Color color, float alpha); |
| 1477 | RLAPI Color ColorAlphaBlend(Color dst, Color src, Color tint); |
| 1478 | RLAPI Color ColorLerp(Color color1, Color color2, float factor); |
| 1479 | RLAPI Color GetColor(unsigned int hexValue); |
| 1480 | RLAPI Color GetPixelColor(void *srcPtr, int format); |
| 1481 | RLAPI void SetPixelColor(void *dstPtr, Color color, int format); |
| 1482 | RLAPI int GetPixelDataSize(int width, int height, int format); |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | |
| 1489 | RLAPI Font GetFontDefault(void); |
| 1490 | RLAPI Font LoadFont(const char *fileName); |
| 1491 | RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); |
| 1492 | RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); |
| 1493 | RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); |
| 1494 | RLAPI bool IsFontValid(Font font); |
| 1495 | RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type, int *glyphCount); |
| 1496 | RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); |
| 1497 | RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); |
| 1498 | RLAPI void UnloadFont(Font font); |
| 1499 | RLAPI bool ExportFontAsCode(Font font, const char *fileName); |
| 1500 | |
| 1501 | |
| 1502 | RLAPI void DrawFPS(int posX, int posY); |
| 1503 | RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); |
| 1504 | RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); |
| 1505 | RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); |
| 1506 | RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); |
| 1507 | RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); |
| 1508 | |
| 1509 | |
| 1510 | RLAPI void SetTextLineSpacing(int spacing); |
| 1511 | RLAPI int MeasureText(const char *text, int fontSize); |
| 1512 | RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); |
| 1513 | RLAPI Vector2 MeasureTextCodepoints(Font font, const int *codepoints, int length, float fontSize, float spacing); |
| 1514 | RLAPI int GetGlyphIndex(Font font, int codepoint); |
| 1515 | RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); |
| 1516 | RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); |
| 1517 | |
| 1518 | |
| 1519 | RLAPI char *LoadUTF8(const int *codepoints, int length); |
| 1520 | RLAPI void UnloadUTF8(char *text); |
| 1521 | RLAPI int *LoadCodepoints(const char *text, int *count); |
| 1522 | RLAPI void UnloadCodepoints(int *codepoints); |
| 1523 | RLAPI int GetCodepointCount(const char *text); |
| 1524 | RLAPI int GetCodepoint(const char *text, int *codepointSize); |
| 1525 | RLAPI int GetCodepointNext(const char *text, int *codepointSize); |
| 1526 | RLAPI int GetCodepointPrevious(const char *text, int *codepointSize); |
| 1527 | RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size); |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | RLAPI char **LoadTextLines(const char *text, int *count); |
| 1533 | RLAPI void UnloadTextLines(char **text, int lineCount); |
| 1534 | RLAPI int TextCopy(char *dst, const char *src); |
| 1535 | RLAPI bool TextIsEqual(const char *text1, const char *text2); |
| 1536 | RLAPI unsigned int TextLength(const char *text); |
| 1537 | RLAPI const char *TextFormat(const char *text, ...); |
| 1538 | RLAPI const char *TextSubtext(const char *text, int position, int length); |
| 1539 | RLAPI const char *TextRemoveSpaces(const char *text); |
| 1540 | RLAPI char *GetTextBetween(const char *text, const char *begin, const char *end); |
| 1541 | RLAPI char *TextReplace(const char *text, const char *search, const char *replacement); |
| 1542 | RLAPI char *TextReplaceAlloc(const char *text, const char *search, const char *replacement); |
| 1543 | RLAPI char *TextReplaceBetween(const char *text, const char *begin, const char *end, const char *replacement); |
| 1544 | RLAPI char *TextReplaceBetweenAlloc(const char *text, const char *begin, const char *end, const char *replacement); |
| 1545 | RLAPI char *TextInsert(const char *text, const char *insert, int position); |
| 1546 | RLAPI char *TextInsertAlloc(const char *text, const char *insert, int position); |
| 1547 | RLAPI char *TextJoin(char **textList, int count, const char *delimiter); |
| 1548 | RLAPI char **TextSplit(const char *text, char delimiter, int *count); |
| 1549 | RLAPI void TextAppend(char *text, const char *append, int *position); |
| 1550 | RLAPI int TextFindIndex(const char *text, const char *search); |
| 1551 | RLAPI char *TextToUpper(const char *text); |
| 1552 | RLAPI char *TextToLower(const char *text); |
| 1553 | RLAPI char *TextToPascal(const char *text); |
| 1554 | RLAPI char *TextToSnake(const char *text); |
| 1555 | RLAPI char *TextToCamel(const char *text); |
| 1556 | RLAPI int TextToInteger(const char *text); |
| 1557 | RLAPI float TextToFloat(const char *text); |
| 1558 | |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); |
| 1565 | RLAPI void DrawPoint3D(Vector3 position, Color color); |
| 1566 | RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); |
| 1567 | RLAPI void DrawTriangle3D(Vector3 v1, Vector3 v2, Vector3 v3, Color color); |
| 1568 | RLAPI void DrawTriangleStrip3D(const Vector3 *points, int pointCount, Color color); |
| 1569 | RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); |
| 1570 | RLAPI void DrawCubeV(Vector3 position, Vector3 size, Color color); |
| 1571 | RLAPI void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); |
| 1572 | RLAPI void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); |
| 1573 | RLAPI void DrawSphere(Vector3 centerPos, float radius, Color color); |
| 1574 | RLAPI void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); |
| 1575 | RLAPI void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); |
| 1576 | RLAPI void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); |
| 1577 | RLAPI void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); |
| 1578 | RLAPI void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); |
| 1579 | RLAPI void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); |
| 1580 | RLAPI void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); |
| 1581 | RLAPI void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); |
| 1582 | RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); |
| 1583 | RLAPI void DrawRay(Ray ray, Color color); |
| 1584 | RLAPI void DrawGrid(int slices, float spacing); |
| 1585 | |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | RLAPI Model LoadModel(const char *fileName); |
| 1592 | RLAPI Model LoadModelFromMesh(Mesh mesh); |
| 1593 | RLAPI bool IsModelValid(Model model); |
| 1594 | RLAPI void UnloadModel(Model model); |
| 1595 | RLAPI BoundingBox GetModelBoundingBox(Model model); |
| 1596 | |
| 1597 | |
| 1598 | RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); |
| 1599 | RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); |
| 1600 | RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); |
| 1601 | RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); |
| 1602 | RLAPI void DrawBoundingBox(BoundingBox box, Color color); |
| 1603 | RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint); |
| 1604 | RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); |
| 1605 | RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); |
| 1606 | |
| 1607 | |
| 1608 | RLAPI void UploadMesh(Mesh *mesh, bool dynamic); |
| 1609 | RLAPI void UpdateMeshBuffer(Mesh mesh, int index, const void *data, int dataSize, int offset); |
| 1610 | RLAPI void UnloadMesh(Mesh mesh); |
| 1611 | RLAPI void DrawMesh(Mesh mesh, Material material, Matrix transform); |
| 1612 | RLAPI void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances); |
| 1613 | RLAPI BoundingBox GetMeshBoundingBox(Mesh mesh); |
| 1614 | RLAPI void GenMeshTangents(Mesh *mesh); |
| 1615 | RLAPI bool ExportMesh(Mesh mesh, const char *fileName); |
| 1616 | RLAPI bool ExportMeshAsCode(Mesh mesh, const char *fileName); |
| 1617 | |
| 1618 | |
| 1619 | RLAPI Mesh GenMeshPoly(int sides, float radius); |
| 1620 | RLAPI Mesh GenMeshPlane(float width, float length, int resX, int resZ); |
| 1621 | RLAPI Mesh GenMeshCube(float width, float height, float length); |
| 1622 | RLAPI Mesh GenMeshSphere(float radius, int rings, int slices); |
| 1623 | RLAPI Mesh GenMeshHemiSphere(float radius, int rings, int slices); |
| 1624 | RLAPI Mesh GenMeshCylinder(float radius, float height, int slices); |
| 1625 | RLAPI Mesh GenMeshCone(float radius, float height, int slices); |
| 1626 | RLAPI Mesh GenMeshTorus(float radius, float size, int radSeg, int sides); |
| 1627 | RLAPI Mesh GenMeshKnot(float radius, float size, int radSeg, int sides); |
| 1628 | RLAPI Mesh GenMeshHeightmap(Image heightmap, Vector3 size); |
| 1629 | RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize); |
| 1630 | |
| 1631 | |
| 1632 | RLAPI Material *LoadMaterials(const char *fileName, int *materialCount); |
| 1633 | RLAPI Material LoadMaterialDefault(void); |
| 1634 | RLAPI bool IsMaterialValid(Material material); |
| 1635 | RLAPI void UnloadMaterial(Material material); |
| 1636 | RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); |
| 1637 | RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); |
| 1638 | |
| 1639 | |
| 1640 | RLAPI ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); |
| 1641 | RLAPI void UpdateModelAnimation(Model model, ModelAnimation anim, float frame); |
| 1642 | RLAPI void UpdateModelAnimationEx(Model model, ModelAnimation animA, float frameA, ModelAnimation animB, float frameB, float blend); |
| 1643 | RLAPI void UnloadModelAnimations(ModelAnimation *animations, int animCount); |
| 1644 | RLAPI bool IsModelAnimationValid(Model model, ModelAnimation anim); |
| 1645 | |
| 1646 | |
| 1647 | RLAPI bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); |
| 1648 | RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); |
| 1649 | RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); |
| 1650 | RLAPI RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); |
| 1651 | RLAPI RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); |
| 1652 | RLAPI RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); |
| 1653 | RLAPI RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); |
| 1654 | RLAPI RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); |
| 1655 | |
| 1656 | |
| 1657 | |
| 1658 | |
| 1659 | typedef void (*AudioCallback)(void *bufferData, unsigned int frames); |
| 1660 | |
| 1661 | |
| 1662 | RLAPI void InitAudioDevice(void); |
| 1663 | RLAPI void CloseAudioDevice(void); |
| 1664 | RLAPI bool IsAudioDeviceReady(void); |
| 1665 | RLAPI void SetMasterVolume(float volume); |
| 1666 | RLAPI float GetMasterVolume(void); |
| 1667 | |
| 1668 | |
| 1669 | RLAPI Wave LoadWave(const char *fileName); |
| 1670 | RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); |
| 1671 | RLAPI bool IsWaveValid(Wave wave); |
| 1672 | RLAPI Sound LoadSound(const char *fileName); |
| 1673 | RLAPI Sound LoadSoundFromWave(Wave wave); |
| 1674 | RLAPI Sound LoadSoundAlias(Sound source); |
| 1675 | RLAPI bool IsSoundValid(Sound sound); |
| 1676 | RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); |
| 1677 | RLAPI void UnloadWave(Wave wave); |
| 1678 | RLAPI void UnloadSound(Sound sound); |
| 1679 | RLAPI void UnloadSoundAlias(Sound alias); |
| 1680 | RLAPI bool ExportWave(Wave wave, const char *fileName); |
| 1681 | RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); |
| 1682 | |
| 1683 | |
| 1684 | RLAPI void PlaySound(Sound sound); |
| 1685 | RLAPI void StopSound(Sound sound); |
| 1686 | RLAPI void PauseSound(Sound sound); |
| 1687 | RLAPI void ResumeSound(Sound sound); |
| 1688 | RLAPI bool IsSoundPlaying(Sound sound); |
| 1689 | RLAPI void SetSoundVolume(Sound sound, float volume); |
| 1690 | RLAPI void SetSoundPitch(Sound sound, float pitch); |
| 1691 | RLAPI void SetSoundPan(Sound sound, float pan); |
| 1692 | RLAPI Wave WaveCopy(Wave wave); |
| 1693 | RLAPI void WaveCrop(Wave *wave, int initFrame, int finalFrame); |
| 1694 | RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); |
| 1695 | RLAPI float *LoadWaveSamples(Wave wave); |
| 1696 | RLAPI void UnloadWaveSamples(float *samples); |
| 1697 | |
| 1698 | |
| 1699 | RLAPI Music LoadMusicStream(const char *fileName); |
| 1700 | RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); |
| 1701 | RLAPI bool IsMusicValid(Music music); |
| 1702 | RLAPI void UnloadMusicStream(Music music); |
| 1703 | RLAPI void PlayMusicStream(Music music); |
| 1704 | RLAPI bool IsMusicStreamPlaying(Music music); |
| 1705 | RLAPI void UpdateMusicStream(Music music); |
| 1706 | RLAPI void StopMusicStream(Music music); |
| 1707 | RLAPI void PauseMusicStream(Music music); |
| 1708 | RLAPI void ResumeMusicStream(Music music); |
| 1709 | RLAPI void SeekMusicStream(Music music, float position); |
| 1710 | RLAPI void SetMusicVolume(Music music, float volume); |
| 1711 | RLAPI void SetMusicPitch(Music music, float pitch); |
| 1712 | RLAPI void SetMusicPan(Music music, float pan); |
| 1713 | RLAPI float GetMusicTimeLength(Music music); |
| 1714 | RLAPI float GetMusicTimePlayed(Music music); |
| 1715 | |
| 1716 | |
| 1717 | RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); |
| 1718 | RLAPI bool IsAudioStreamValid(AudioStream stream); |
| 1719 | RLAPI void UnloadAudioStream(AudioStream stream); |
| 1720 | RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); |
| 1721 | RLAPI bool IsAudioStreamProcessed(AudioStream stream); |
| 1722 | RLAPI void PlayAudioStream(AudioStream stream); |
| 1723 | RLAPI void PauseAudioStream(AudioStream stream); |
| 1724 | RLAPI void ResumeAudioStream(AudioStream stream); |
| 1725 | RLAPI bool IsAudioStreamPlaying(AudioStream stream); |
| 1726 | RLAPI void StopAudioStream(AudioStream stream); |
| 1727 | RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); |
| 1728 | RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); |
| 1729 | RLAPI void SetAudioStreamPan(AudioStream stream, float pan); |
| 1730 | RLAPI void SetAudioStreamBufferSizeDefault(int size); |
| 1731 | RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); |
| 1732 | |
| 1733 | RLAPI void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); |
| 1734 | RLAPI void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); |
| 1735 | |
| 1736 | RLAPI void AttachAudioMixedProcessor(AudioCallback processor); |
| 1737 | RLAPI void DetachAudioMixedProcessor(AudioCallback processor); |
| 1738 | |
| 1739 | #if defined(__cplusplus) |
| 1740 | } |
| 1741 | #endif |
| 1742 | |
| 1743 | #endif |