From 58e42ed6d20738a88d29f6d5fa8015ee6ab8f460 Mon Sep 17 00:00:00 2001 From: Srikanth Patchava Date: Fri, 24 Apr 2026 19:11:40 -0700 Subject: [PATCH] docs: clarify HACK comment in raudio.c AudioBuffer define Replace HACK annotation with descriptive comment explaining the reason for the macro rename (CoreAudio symbol collision). --- src/external/vox_loader.h | 14 +++++++------- src/raudio.c | 2 +- src/rmodels.c | 4 ++-- src/rtext.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/external/vox_loader.h b/src/external/vox_loader.h index 6d933907c..0a9ac0a37 100644 --- a/src/external/vox_loader.h +++ b/src/external/vox_loader.h @@ -41,7 +41,7 @@ revision history: 1.01 (2021-09-07) Support custom memory allocators Removed Raylib dependencies Changed Vox_LoadFileName to Vox_LoadFromMemory - 1.02 (2021-09-10) @raysan5: Reviewed some formating + 1.02 (2021-09-10) @raysan5: Reviewed some formatting 1.03 (2021-10-02) @catmanl: Reduce warnings on gcc 1.04 (2021-10-17) @warzes: Fixing the error of loading VOX models @@ -249,13 +249,13 @@ static void freeArrayColor(ArrayColor* a) // Vox Loader ///////////////////////////////////////////////////////////////////////////////////////////// -#define CHUNKSIZE 16 // chunk size (CHUNKSIZE*CHUNKSIZE*CHUNKSIZE) in voxels +#define CHUNKSIZE 16 // chunk size (CHUNKSIZE*CHUNKSIZE*CHUNKSIZE) in voxels #define CHUNKSIZE_OPSHIFT 4 // 1<<4=16 -> Warning depend of CHUNKSIZE #define CHUNK_FLATTENOFFSET_OPSHIFT 8 // Warning depend of CHUNKSIZE // // used right handed system and CCW face -// +// // indexes for voxelcoords, per face orientation // @@ -271,7 +271,7 @@ static void freeArrayColor(ArrayColor* a) //# |/ |/ //# 4------------5 -// +// // CCW const int fv[6][4] = { {0, 2, 6, 4 }, //-X @@ -462,12 +462,12 @@ static unsigned char Vox_CalcFacesVisible(VoxArray3D* pvoxArray, int cx, int cy, static VoxVector3 Vox_GetVertexPosition(int _wcx, int _wcy, int _wcz, int _nNumVertex) { float scale = 0.25; - + VoxVector3 vtx = SolidVertex[_nNumVertex]; vtx.x = (vtx.x + _wcx) * scale; vtx.y = (vtx.y + _wcy) * scale; vtx.z = (vtx.z + _wcz) * scale; - + return vtx; } @@ -607,7 +607,7 @@ int Vox_LoadFromMemory(unsigned char* pvoxData, unsigned int voxDataSize, VoxArr if (strcmp(szChunkName, "SIZE") == 0) { - //(4 bytes x 3 : x, y, z ) + //(4 bytes x 3 : x, y, z ) sizeX = *((unsigned int*)fileDataPtr); fileDataPtr += sizeof(unsigned int); diff --git a/src/raudio.c b/src/raudio.c index d624755ad..cd2ca2637 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -378,7 +378,7 @@ struct rAudioProcessor { rAudioProcessor *prev; // Previous audio processor on the list }; -#define AudioBuffer rAudioBuffer // HACK: To avoid CoreAudio (macOS) symbol collision +#define AudioBuffer rAudioBuffer // Renamed to avoid symbol collision with CoreAudio (macOS) AudioBuffer type // Audio data context typedef struct AudioData { diff --git a/src/rmodels.c b/src/rmodels.c index 012bf24c3..23b2e3b37 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -85,7 +85,7 @@ #define VOX_FREE RL_FREE #define VOX_LOADER_IMPLEMENTATION - #include "external/vox_loader.h" // VOX file format loading (MagikaVoxel) + #include "external/vox_loader.h" // VOX file format loading (MagicaVoxel) #endif #if SUPPORT_FILEFORMAT_M3D @@ -3935,7 +3935,7 @@ void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rota Color colDiffuse = mat.maps[MATERIAL_MAP_DIFFUSE].color; // Applying color tint directly to material diffuse map, - // because is comes as an input paramter to the function + // because it comes as an input parameter to the function Color colTinted = { 0 }; colTinted.r = (unsigned char)(((int)colDiffuse.r*(int)tint.r)/255); colTinted.g = (unsigned char)(((int)colDiffuse.g*(int)tint.g)/255); diff --git a/src/rtext.c b/src/rtext.c index 7b9d5f2c8..9bab4ba86 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -156,7 +156,7 @@ extern void LoadFontDefault(void) { #define BIT_CHECK(a,b) ((a) & (1u << (b))) - // Check to see if the font for an image has alreeady been allocated, + // Check to see if the font for an image has already been allocated, // and if no need to upload, then return if (defaultFont.glyphs != NULL) return;