mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-05 03:14:12 +00:00
Reviewed comments, remove article usage
This commit is contained in:
@@ -91,7 +91,7 @@ bool InitGraphicsDevice(void); // Initialize graphics device
|
||||
// Module Internal Functions Declaration
|
||||
//----------------------------------------------------------------------------------
|
||||
#if !defined(_WIN32)
|
||||
static int kbhit(void); // Check if a key has been pressed
|
||||
static int kbhit(void); // Check if key has been pressed
|
||||
static char getch(void) { return getchar(); } // Get pressed character
|
||||
#endif
|
||||
|
||||
@@ -562,7 +562,7 @@ void ClosePlatform(void)
|
||||
// Module Internal Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
#if !defined(_WIN32)
|
||||
// Check if a key has been pressed
|
||||
// Check if key has been pressed
|
||||
static int kbhit(void)
|
||||
{
|
||||
struct termios oldt = { 0 };
|
||||
|
||||
@@ -1013,7 +1013,7 @@ Sound LoadSoundAlias(Sound source)
|
||||
return sound;
|
||||
}
|
||||
|
||||
// Check if a sound is valid (data loaded and buffers initialized)
|
||||
// Check if sound is valid (data loaded and buffers initialized)
|
||||
bool IsSoundValid(Sound sound)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -1215,7 +1215,7 @@ void StopSound(Sound sound)
|
||||
StopAudioBuffer(sound.stream.buffer);
|
||||
}
|
||||
|
||||
// Check if a sound is playing
|
||||
// Check if sound is playing
|
||||
bool IsSoundPlaying(Sound sound)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -1751,7 +1751,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
|
||||
return music;
|
||||
}
|
||||
|
||||
// Check if a music stream is valid (context and buffers initialized)
|
||||
// Check if music stream is valid (context and buffers initialized)
|
||||
bool IsMusicValid(Music music)
|
||||
{
|
||||
return ((music.ctxData != NULL) && // Validate context loaded
|
||||
|
||||
54
src/raylib.h
54
src/raylib.h
@@ -1070,7 +1070,7 @@ RLAPI void UnloadVrStereoConfig(VrStereoConfig config); // Unload VR s
|
||||
// NOTE: Shader functionality is not available on OpenGL 1.1
|
||||
RLAPI Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
||||
RLAPI Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
||||
RLAPI bool IsShaderValid(Shader shader); // Check if a shader is valid (loaded on GPU)
|
||||
RLAPI bool IsShaderValid(Shader shader); // Check if shader is valid (loaded on GPU)
|
||||
RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
RLAPI int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||
RLAPI void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
||||
@@ -1148,7 +1148,7 @@ RLAPI int FileMove(const char *srcPath, const char *dstPath); // Move file
|
||||
RLAPI int FileTextReplace(const char *fileName, const char *search, const char *replacement); // Replace text in an existing file
|
||||
RLAPI int FileTextFindIndex(const char *fileName, const char *search); // Find text in existing file
|
||||
RLAPI bool FileExists(const char *fileName); // Check if file exists
|
||||
RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists
|
||||
RLAPI bool DirectoryExists(const char *dirPath); // Check if directory path exists
|
||||
RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (recommended include point: .png, .wav)
|
||||
RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h)
|
||||
RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
|
||||
@@ -1161,12 +1161,12 @@ RLAPI const char *GetWorkingDirectory(void); // Get curre
|
||||
RLAPI const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
|
||||
RLAPI int MakeDirectory(const char *dirPath); // Create directories (including full path requested), returns 0 on success
|
||||
RLAPI bool ChangeDirectory(const char *dirPath); // Change working directory, return true on success
|
||||
RLAPI bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
||||
RLAPI bool IsPathFile(const char *path); // Check if given path is a file or a directory
|
||||
RLAPI bool IsFileNameValid(const char *fileName); // Check if fileName is valid for the platform/OS
|
||||
RLAPI FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths, files and directories, no subdirs scan
|
||||
RLAPI FilePathList LoadDirectoryFilesEx(const char *basePath, const char *filter, bool scanSubdirs); // Load directory filepaths with extension filtering and subdir scan; some filters available: '*.*','FILES*','DIRS*'
|
||||
RLAPI void UnloadDirectoryFiles(FilePathList files); // Unload filepaths
|
||||
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||
RLAPI bool IsFileDropped(void); // Check if file has been dropped into window
|
||||
RLAPI FilePathList LoadDroppedFiles(void); // Load dropped filepaths
|
||||
RLAPI void UnloadDroppedFiles(FilePathList files); // Unload dropped filepaths
|
||||
RLAPI unsigned int GetDirectoryFileCount(const char *dirPath); // Get the file count in a directory
|
||||
@@ -1197,23 +1197,23 @@ RLAPI void PlayAutomationEvent(AutomationEvent event); // Play a reco
|
||||
//------------------------------------------------------------------------------------
|
||||
|
||||
// Input-related functions: keyboard
|
||||
RLAPI bool IsKeyPressed(int key); // Check if a key has been pressed once
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again
|
||||
RLAPI bool IsKeyDown(int key); // Check if a key is being pressed
|
||||
RLAPI bool IsKeyReleased(int key); // Check if a key has been released once
|
||||
RLAPI bool IsKeyUp(int key); // Check if a key is NOT being pressed
|
||||
RLAPI bool IsKeyPressed(int key); // Check if key has been pressed once
|
||||
RLAPI bool IsKeyPressedRepeat(int key); // Check if key has been pressed again
|
||||
RLAPI bool IsKeyDown(int key); // Check if key is being pressed
|
||||
RLAPI bool IsKeyReleased(int key); // Check if key has been released once
|
||||
RLAPI bool IsKeyUp(int key); // Check if key is NOT being pressed
|
||||
RLAPI int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
|
||||
RLAPI int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
|
||||
RLAPI const char *GetKeyName(int key); // Get name of a QWERTY key on the current keyboard layout (eg returns string 'q' for KEY_A on an AZERTY keyboard)
|
||||
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||
|
||||
// Input-related functions: gamepads
|
||||
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
|
||||
RLAPI bool IsGamepadAvailable(int gamepad); // Check if gamepad is available
|
||||
RLAPI const char *GetGamepadName(int gamepad); // Get gamepad internal name id
|
||||
RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if a gamepad button has been pressed once
|
||||
RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if a gamepad button is being pressed
|
||||
RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if a gamepad button has been released once
|
||||
RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if a gamepad button is NOT being pressed
|
||||
RLAPI bool IsGamepadButtonPressed(int gamepad, int button); // Check if gamepad button has been pressed once
|
||||
RLAPI bool IsGamepadButtonDown(int gamepad, int button); // Check if gamepad button is being pressed
|
||||
RLAPI bool IsGamepadButtonReleased(int gamepad, int button); // Check if gamepad button has been released once
|
||||
RLAPI bool IsGamepadButtonUp(int gamepad, int button); // Check if gamepad button is NOT being pressed
|
||||
RLAPI int GetGamepadButtonPressed(void); // Get the last gamepad button pressed
|
||||
RLAPI int GetGamepadAxisCount(int gamepad); // Get axis count for a gamepad
|
||||
RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Get movement value for a gamepad axis
|
||||
@@ -1221,10 +1221,10 @@ RLAPI int SetGamepadMappings(const char *mappings); // Set internal ga
|
||||
RLAPI void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration); // Set gamepad vibration for both motors (duration in seconds)
|
||||
|
||||
// Input-related functions: mouse
|
||||
RLAPI bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once
|
||||
RLAPI bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed
|
||||
RLAPI bool IsMouseButtonReleased(int button); // Check if a mouse button has been released once
|
||||
RLAPI bool IsMouseButtonUp(int button); // Check if a mouse button is NOT being pressed
|
||||
RLAPI bool IsMouseButtonPressed(int button); // Check if mouse button has been pressed once
|
||||
RLAPI bool IsMouseButtonDown(int button); // Check if mouse button is being pressed
|
||||
RLAPI bool IsMouseButtonReleased(int button); // Check if mouse button has been released once
|
||||
RLAPI bool IsMouseButtonUp(int button); // Check if mouse button is NOT being pressed
|
||||
RLAPI int GetMouseX(void); // Get mouse position X
|
||||
RLAPI int GetMouseY(void); // Get mouse position Y
|
||||
RLAPI Vector2 GetMousePosition(void); // Get mouse position XY
|
||||
@@ -1247,7 +1247,7 @@ RLAPI int GetTouchPointCount(void); // Get number of t
|
||||
// Gestures and Touch Handling Functions (Module: rgestures)
|
||||
//------------------------------------------------------------------------------------
|
||||
RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
|
||||
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture has been detected
|
||||
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if gesture has been detected
|
||||
RLAPI int GetGestureDetected(void); // Get latest detected gesture
|
||||
RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds
|
||||
RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
|
||||
@@ -1446,9 +1446,9 @@ RLAPI Texture2D LoadTexture(const char *fileName);
|
||||
RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||
RLAPI TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||
RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
RLAPI bool IsTextureValid(Texture2D texture); // Check if a texture is valid (loaded in GPU)
|
||||
RLAPI bool IsTextureValid(Texture2D texture); // Check if texture is valid (loaded in GPU)
|
||||
RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if a render texture is valid (loaded in GPU)
|
||||
RLAPI bool IsRenderTextureValid(RenderTexture2D target); // Check if render texture is valid (loaded in GPU)
|
||||
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 (pixels should be able to fill texture)
|
||||
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data (pixels and rec should fit in texture)
|
||||
@@ -1495,7 +1495,7 @@ RLAPI Font LoadFont(const char *fileName);
|
||||
RLAPI Font LoadFontEx(const char *fileName, int fontSize, const int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set, font size is provided in pixels height
|
||||
RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
RLAPI bool IsFontValid(Font font); // Check if a font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||
RLAPI bool IsFontValid(Font font); // Check if font is valid (font data loaded, WARNING: GPU texture not checked)
|
||||
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, const int *codepoints, int codepointCount, int type, int *glyphCount); // 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 void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
@@ -1594,7 +1594,7 @@ RLAPI void DrawGrid(int slices, float spacing);
|
||||
// Model management functions
|
||||
RLAPI Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
||||
RLAPI Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||
RLAPI bool IsModelValid(Model model); // Check if a model is valid (loaded in GPU, VAO/VBOs)
|
||||
RLAPI bool IsModelValid(Model model); // Check if model is valid (loaded in GPU, VAO/VBOs)
|
||||
RLAPI void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
RLAPI BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||
|
||||
@@ -1635,7 +1635,7 @@ RLAPI Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize);
|
||||
// Material loading/unloading functions
|
||||
RLAPI Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
||||
RLAPI Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||
RLAPI bool IsMaterialValid(Material material); // Check if a material is valid (shader assigned, map textures loaded in GPU)
|
||||
RLAPI bool IsMaterialValid(Material material); // Check if material is valid (shader assigned, map textures loaded in GPU)
|
||||
RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
||||
RLAPI void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
RLAPI void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
@@ -1676,7 +1676,7 @@ RLAPI bool IsWaveValid(Wave wave); // Check i
|
||||
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
|
||||
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
RLAPI Sound LoadSoundAlias(Sound source); // Load sound alias, new sound that shares the same sample data as the source sound, does not own the sound data
|
||||
RLAPI bool IsSoundValid(Sound sound); // Check if a sound is valid (data loaded and buffers initialized)
|
||||
RLAPI bool IsSoundValid(Sound sound); // Check if sound is valid (data loaded and buffers initialized)
|
||||
RLAPI void UpdateSound(Sound sound, const void *data, int frameCount); // Update sound buffer with new data (default data format: 32 bit float, stereo)
|
||||
RLAPI void UnloadWave(Wave wave); // Unload wave data
|
||||
RLAPI void UnloadSound(Sound sound); // Unload sound
|
||||
@@ -1689,7 +1689,7 @@ RLAPI void PlaySound(Sound sound); // Play a
|
||||
RLAPI void StopSound(Sound sound); // Stop playing a sound
|
||||
RLAPI void PauseSound(Sound sound); // Pause a sound
|
||||
RLAPI void ResumeSound(Sound sound); // Resume a paused sound
|
||||
RLAPI bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||
RLAPI bool IsSoundPlaying(Sound sound); // Check if sound is currently playing
|
||||
RLAPI void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||
RLAPI void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
RLAPI void SetSoundPan(Sound sound, float pan); // Set pan for a sound (-1.0 left, 0.0 center, 1.0 right)
|
||||
@@ -1702,7 +1702,7 @@ RLAPI void UnloadWaveSamples(float *samples); // Unload
|
||||
// Music management functions
|
||||
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||
RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
||||
RLAPI bool IsMusicValid(Music music); // Check if a music stream is valid (context and buffers initialized)
|
||||
RLAPI bool IsMusicValid(Music music); // Check if music stream is valid (context and buffers initialized)
|
||||
RLAPI void UnloadMusicStream(Music music); // Unload music stream
|
||||
RLAPI void PlayMusicStream(Music music); // Start music playing
|
||||
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||
|
||||
36
src/rcore.c
36
src/rcore.c
@@ -1293,7 +1293,7 @@ Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode)
|
||||
return shader;
|
||||
}
|
||||
|
||||
// Check if a shader is valid (loaded on GPU)
|
||||
// Check if shader is valid (loaded on GPU)
|
||||
bool IsShaderValid(Shader shader)
|
||||
{
|
||||
return ((shader.id > 0) && // Validate shader id (GPU loaded successfully)
|
||||
@@ -2396,7 +2396,7 @@ bool IsFileExtension(const char *fileName, const char *ext)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Check if a directory path exists
|
||||
// Check if directory path exists
|
||||
bool DirectoryExists(const char *dirPath)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -2811,7 +2811,7 @@ bool ChangeDirectory(const char *dirPath)
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
// Check if a given path point to a file
|
||||
// Check if given path point to a file
|
||||
bool IsPathFile(const char *path)
|
||||
{
|
||||
struct stat result = { 0 };
|
||||
@@ -2876,7 +2876,7 @@ bool IsFileNameValid(const char *fileName)
|
||||
return valid;
|
||||
}
|
||||
|
||||
// Check if a file has been dropped into window
|
||||
// Check if file has been dropped into window
|
||||
bool IsFileDropped(void)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -3787,7 +3787,7 @@ void PlayAutomationEvent(AutomationEvent event)
|
||||
// Module Functions Definition: Input Handling: Keyboard
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Check if a key has been pressed once
|
||||
// Check if key has been pressed once
|
||||
bool IsKeyPressed(int key)
|
||||
{
|
||||
bool pressed = false;
|
||||
@@ -3800,7 +3800,7 @@ bool IsKeyPressed(int key)
|
||||
return pressed;
|
||||
}
|
||||
|
||||
// Check if a key has been pressed again
|
||||
// Check if key has been pressed again
|
||||
bool IsKeyPressedRepeat(int key)
|
||||
{
|
||||
bool repeat = false;
|
||||
@@ -3813,7 +3813,7 @@ bool IsKeyPressedRepeat(int key)
|
||||
return repeat;
|
||||
}
|
||||
|
||||
// Check if a key is being pressed (key held down)
|
||||
// Check if key is being pressed (key held down)
|
||||
bool IsKeyDown(int key)
|
||||
{
|
||||
bool down = false;
|
||||
@@ -3826,7 +3826,7 @@ bool IsKeyDown(int key)
|
||||
return down;
|
||||
}
|
||||
|
||||
// Check if a key has been released once
|
||||
// Check if key has been released once
|
||||
bool IsKeyReleased(int key)
|
||||
{
|
||||
bool released = false;
|
||||
@@ -3839,7 +3839,7 @@ bool IsKeyReleased(int key)
|
||||
return released;
|
||||
}
|
||||
|
||||
// Check if a key is NOT being pressed (key not held down)
|
||||
// Check if key is NOT being pressed (key not held down)
|
||||
bool IsKeyUp(int key)
|
||||
{
|
||||
bool up = false;
|
||||
@@ -3910,7 +3910,7 @@ void SetExitKey(int key)
|
||||
// NOTE: Functions with a platform-specific implementation on rcore_<platform>.c
|
||||
//int SetGamepadMappings(const char *mappings)
|
||||
|
||||
// Check if a gamepad is available
|
||||
// Check if gamepad is available
|
||||
bool IsGamepadAvailable(int gamepad)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -3926,7 +3926,7 @@ const char *GetGamepadName(int gamepad)
|
||||
return CORE.Input.Gamepad.name[gamepad];
|
||||
}
|
||||
|
||||
// Check if a gamepad button has been pressed once
|
||||
// Check if gamepad button has been pressed once
|
||||
bool IsGamepadButtonPressed(int gamepad, int button)
|
||||
{
|
||||
bool pressed = false;
|
||||
@@ -3939,7 +3939,7 @@ bool IsGamepadButtonPressed(int gamepad, int button)
|
||||
return pressed;
|
||||
}
|
||||
|
||||
// Check if a gamepad button is being pressed
|
||||
// Check if gamepad button is being pressed
|
||||
bool IsGamepadButtonDown(int gamepad, int button)
|
||||
{
|
||||
bool down = false;
|
||||
@@ -3952,7 +3952,7 @@ bool IsGamepadButtonDown(int gamepad, int button)
|
||||
return down;
|
||||
}
|
||||
|
||||
// Check if a gamepad button has NOT been pressed once
|
||||
// Check if gamepad button has NOT been pressed once
|
||||
bool IsGamepadButtonReleased(int gamepad, int button)
|
||||
{
|
||||
bool released = false;
|
||||
@@ -3965,7 +3965,7 @@ bool IsGamepadButtonReleased(int gamepad, int button)
|
||||
return released;
|
||||
}
|
||||
|
||||
// Check if a gamepad button is NOT being pressed
|
||||
// Check if gamepad button is NOT being pressed
|
||||
bool IsGamepadButtonUp(int gamepad, int button)
|
||||
{
|
||||
bool up = false;
|
||||
@@ -4014,7 +4014,7 @@ float GetGamepadAxisMovement(int gamepad, int axis)
|
||||
//void SetMousePosition(int x, int y)
|
||||
//void SetMouseCursor(int cursor)
|
||||
|
||||
// Check if a mouse button has been pressed once
|
||||
// Check if mouse button has been pressed once
|
||||
bool IsMouseButtonPressed(int button)
|
||||
{
|
||||
bool pressed = false;
|
||||
@@ -4030,7 +4030,7 @@ bool IsMouseButtonPressed(int button)
|
||||
return pressed;
|
||||
}
|
||||
|
||||
// Check if a mouse button is being pressed
|
||||
// Check if mouse button is being pressed
|
||||
bool IsMouseButtonDown(int button)
|
||||
{
|
||||
bool down = false;
|
||||
@@ -4046,7 +4046,7 @@ bool IsMouseButtonDown(int button)
|
||||
return down;
|
||||
}
|
||||
|
||||
// Check if a mouse button has been released once
|
||||
// Check if mouse button has been released once
|
||||
bool IsMouseButtonReleased(int button)
|
||||
{
|
||||
bool released = false;
|
||||
@@ -4062,7 +4062,7 @@ bool IsMouseButtonReleased(int button)
|
||||
return released;
|
||||
}
|
||||
|
||||
// Check if a mouse button is NOT being pressed
|
||||
// Check if mouse button is NOT being pressed
|
||||
bool IsMouseButtonUp(int button)
|
||||
{
|
||||
bool up = false;
|
||||
|
||||
@@ -127,7 +127,7 @@ void UpdateGestures(void); // Update gestures detec
|
||||
|
||||
#if defined(RGESTURES_STANDALONE)
|
||||
void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
|
||||
bool IsGestureDetected(int gesture); // Check if a gesture has been detected
|
||||
bool IsGestureDetected(int gesture); // Check if gesture has been detected
|
||||
int GetGestureDetected(void); // Get latest detected gesture
|
||||
|
||||
float GetGestureHoldDuration(void); // Get gesture hold time in seconds
|
||||
@@ -257,7 +257,7 @@ void SetGesturesEnabled(unsigned int flags)
|
||||
GESTURES.enabledFlags = flags;
|
||||
}
|
||||
|
||||
// Check if a gesture have been detected
|
||||
// Check if gesture have been detected
|
||||
bool IsGestureDetected(unsigned int gesture)
|
||||
{
|
||||
if ((GESTURES.enabledFlags & GESTURES.current) == gesture) return true;
|
||||
|
||||
@@ -1167,7 +1167,7 @@ Model LoadModelFromMesh(Mesh mesh)
|
||||
return model;
|
||||
}
|
||||
|
||||
// Check if a model is valid (loaded in GPU, VAO/VBOs)
|
||||
// Check if model is valid (loaded in GPU, VAO/VBOs)
|
||||
bool IsModelValid(Model model)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -2228,7 +2228,7 @@ Material LoadMaterialDefault(void)
|
||||
return material;
|
||||
}
|
||||
|
||||
// Check if a material is valid (map textures loaded in GPU)
|
||||
// Check if material is valid (map textures loaded in GPU)
|
||||
bool IsMaterialValid(Material material)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
@@ -593,7 +593,7 @@ Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int
|
||||
return font;
|
||||
}
|
||||
|
||||
// Check if a font is valid (font data loaded)
|
||||
// Check if font is valid (font data loaded)
|
||||
// WARNING: GPU texture not checked
|
||||
bool IsFontValid(Font font)
|
||||
{
|
||||
@@ -683,7 +683,7 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
|
||||
// stbtt_GetCodepointBitmapBox() -- how big the bitmap must be
|
||||
// stbtt_MakeCodepointBitmap() -- renders into a provided bitmap
|
||||
|
||||
// Check if a glyph is available in the font
|
||||
// Check if glyph is available in the font
|
||||
// WARNING: if (index == 0), glyph not found, it could fallback to default .notdef glyph (if defined in font)
|
||||
int index = stbtt_FindGlyphIndex(&fontInfo, cp);
|
||||
|
||||
|
||||
@@ -1744,7 +1744,7 @@ void ImageResize(Image *image, int newWidth, int newHeight)
|
||||
// Security check to avoid program crash
|
||||
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
|
||||
|
||||
// Check if a fast path can be used on image scaling
|
||||
// Check if fast path can be used on image scaling
|
||||
// It can be for 8 bit per channel images with 1 to 4 channels per pixel
|
||||
if ((image->format == PIXELFORMAT_UNCOMPRESSED_GRAYSCALE) ||
|
||||
(image->format == PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA) ||
|
||||
@@ -4295,7 +4295,7 @@ RenderTexture2D LoadRenderTexture(int width, int height)
|
||||
return target;
|
||||
}
|
||||
|
||||
// Check if a texture is valid (loaded in GPU)
|
||||
// Check if texture is valid (loaded in GPU)
|
||||
bool IsTextureValid(Texture2D texture)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -4320,7 +4320,7 @@ void UnloadTexture(Texture2D texture)
|
||||
}
|
||||
}
|
||||
|
||||
// Check if a render texture is valid (loaded in GPU)
|
||||
// Check if render texture is valid (loaded in GPU)
|
||||
bool IsRenderTextureValid(RenderTexture2D target)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
Reference in New Issue
Block a user