Core: match sizeof etc. syntax with C, Core RTS: Beautifying + animations
This commit is contained in:
@@ -42,9 +42,9 @@ Release :: (a: *Arena)
|
||||
OS.Release(&a.memory)
|
||||
|
||||
PushArray :: (a: *Arena, count: int, $T: Type): *T
|
||||
result := PushSize(a, SizeOf(T) * count->U64)
|
||||
result := PushSize(a, sizeof(T) * count->U64)
|
||||
return result->*T
|
||||
|
||||
PushStruct :: (a: *Arena, $T: Type): *T
|
||||
result := PushSize(a, SizeOf(T))
|
||||
result := PushSize(a, sizeof(T))
|
||||
return result->*T
|
||||
@@ -7,7 +7,7 @@ ClampTopSizeU :: (val: SizeU, max: SizeU): SizeU
|
||||
return max
|
||||
return val
|
||||
|
||||
GetAlignOffset :: (size: SizeU, align: SizeU): SizeU
|
||||
Getalignoffset :: (size: SizeU, align: SizeU): SizeU
|
||||
mask := align - 1
|
||||
val := size & mask
|
||||
if val != 0
|
||||
@@ -15,7 +15,7 @@ GetAlignOffset :: (size: SizeU, align: SizeU): SizeU
|
||||
return val
|
||||
|
||||
AlignUp :: (size: SizeU, align: SizeU): SizeU
|
||||
result := size + GetAlignOffset(size, align)
|
||||
result := size + Getalignoffset(size, align)
|
||||
return result
|
||||
|
||||
ZeroMemory :: (p: *void, size: SizeU)
|
||||
|
||||
@@ -26,7 +26,7 @@ CreateBitmap :: (for_dc: HDC, size: Vec2I, bottom_up: bool = true): WIN32_Bitmap
|
||||
if bottom_up == false
|
||||
result.size.y = -result.size.y
|
||||
|
||||
header_size: U32 = SizeOf(BITMAPINFOHEADER)
|
||||
header_size: U32 = sizeof(BITMAPINFOHEADER)
|
||||
Assert(header_size == 40)
|
||||
bminfo := BITMAPINFO{
|
||||
BITMAPINFOHEADER{
|
||||
@@ -50,7 +50,7 @@ DestroyBitmap :: (b: *WIN32_Bitmap)
|
||||
if IsValidBitmap(b)
|
||||
DeleteDC(b.hdc)
|
||||
DeleteObject(b.dib)
|
||||
ZeroMemory(b, SizeOf(WIN32_Bitmap))
|
||||
ZeroMemory(b, sizeof(WIN32_Bitmap))
|
||||
|
||||
DrawBitmapInCompatibleDC :: (b: *WIN32_Bitmap)
|
||||
if IsValidBitmap(b)
|
||||
|
||||
Reference in New Issue
Block a user