Add intrinsics.

This commit is contained in:
2026-04-09 00:12:56 -07:00
parent 530c437837
commit d3cee7409c
2 changed files with 40 additions and 13 deletions
+1 -13
View File
@@ -2,7 +2,7 @@
#include "handmade.h"
#include "sdl_handmade.h"
#include <math.h>
#include "handmade_intrinsics.h"
#include <string.h> /* memset */
static void GameOutputSound(game_state *GameState,
@@ -51,18 +51,6 @@ static void ClearBackground(game_offscreen_buffer *Buffer)
}
}
static S32 RoundF32toS32(F32 Real32)
{
S32 Result = (S32)(Real32 + 0.5f);
return Result;
}
static S32 FloorF32toS32(F32 Real32)
{
S32 Result = (S32)floorf(Real32);
return Result;
}
static void DrawRectangle(game_offscreen_buffer *Buffer,
F32 RealMinX, F32 RealMinY,
F32 RealMaxX, F32 RealMaxY,