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).
This commit is contained in:
Srikanth Patchava 2026-04-24 19:11:40 -07:00
parent 6ef36c0a17
commit 58e42ed6d2
No known key found for this signature in database
GPG Key ID: B904FC2A60B7438D
4 changed files with 11 additions and 11 deletions

View File

@ -41,7 +41,7 @@ revision history:
1.01 (2021-09-07) Support custom memory allocators 1.01 (2021-09-07) Support custom memory allocators
Removed Raylib dependencies Removed Raylib dependencies
Changed Vox_LoadFileName to Vox_LoadFromMemory 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.03 (2021-10-02) @catmanl: Reduce warnings on gcc
1.04 (2021-10-17) @warzes: Fixing the error of loading VOX models 1.04 (2021-10-17) @warzes: Fixing the error of loading VOX models
@ -249,13 +249,13 @@ static void freeArrayColor(ArrayColor* a)
// Vox Loader // 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 CHUNKSIZE_OPSHIFT 4 // 1<<4=16 -> Warning depend of CHUNKSIZE
#define CHUNK_FLATTENOFFSET_OPSHIFT 8 // Warning depend of CHUNKSIZE #define CHUNK_FLATTENOFFSET_OPSHIFT 8 // Warning depend of CHUNKSIZE
// //
// used right handed system and CCW face // used right handed system and CCW face
// //
// indexes for voxelcoords, per face orientation // indexes for voxelcoords, per face orientation
// //
@ -271,7 +271,7 @@ static void freeArrayColor(ArrayColor* a)
//# |/ |/ //# |/ |/
//# 4------------5 //# 4------------5
// //
// CCW // CCW
const int fv[6][4] = { const int fv[6][4] = {
{0, 2, 6, 4 }, //-X {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) static VoxVector3 Vox_GetVertexPosition(int _wcx, int _wcy, int _wcz, int _nNumVertex)
{ {
float scale = 0.25; float scale = 0.25;
VoxVector3 vtx = SolidVertex[_nNumVertex]; VoxVector3 vtx = SolidVertex[_nNumVertex];
vtx.x = (vtx.x + _wcx) * scale; vtx.x = (vtx.x + _wcx) * scale;
vtx.y = (vtx.y + _wcy) * scale; vtx.y = (vtx.y + _wcy) * scale;
vtx.z = (vtx.z + _wcz) * scale; vtx.z = (vtx.z + _wcz) * scale;
return vtx; return vtx;
} }
@ -607,7 +607,7 @@ int Vox_LoadFromMemory(unsigned char* pvoxData, unsigned int voxDataSize, VoxArr
if (strcmp(szChunkName, "SIZE") == 0) if (strcmp(szChunkName, "SIZE") == 0)
{ {
//(4 bytes x 3 : x, y, z ) //(4 bytes x 3 : x, y, z )
sizeX = *((unsigned int*)fileDataPtr); sizeX = *((unsigned int*)fileDataPtr);
fileDataPtr += sizeof(unsigned int); fileDataPtr += sizeof(unsigned int);

View File

@ -378,7 +378,7 @@ struct rAudioProcessor {
rAudioProcessor *prev; // Previous audio processor on the list 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 // Audio data context
typedef struct AudioData { typedef struct AudioData {

View File

@ -85,7 +85,7 @@
#define VOX_FREE RL_FREE #define VOX_FREE RL_FREE
#define VOX_LOADER_IMPLEMENTATION #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 #endif
#if SUPPORT_FILEFORMAT_M3D #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; Color colDiffuse = mat.maps[MATERIAL_MAP_DIFFUSE].color;
// Applying color tint directly to material diffuse map, // 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 }; Color colTinted = { 0 };
colTinted.r = (unsigned char)(((int)colDiffuse.r*(int)tint.r)/255); colTinted.r = (unsigned char)(((int)colDiffuse.r*(int)tint.r)/255);
colTinted.g = (unsigned char)(((int)colDiffuse.g*(int)tint.g)/255); colTinted.g = (unsigned char)(((int)colDiffuse.g*(int)tint.g)/255);

View File

@ -156,7 +156,7 @@ extern void LoadFontDefault(void)
{ {
#define BIT_CHECK(a,b) ((a) & (1u << (b))) #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 // and if no need to upload, then return
if (defaultFont.glyphs != NULL) return; if (defaultFont.glyphs != NULL) return;