Fixed input event buffer issues

Queue doesn't properly act as a ring buffer had to roll my own.
I want to make a allocated ring buffer as well...
This commit is contained in:
2024-06-23 03:04:38 -04:00
parent ce1d31f0d4
commit 55b80da8e5
17 changed files with 390 additions and 139 deletions

View File

@ -186,15 +186,15 @@ array_back :: proc( self : Array($Type) ) -> Type {
return value
}
// array_push_back :: proc( using self : Array( $ Type)) -> b32 {
// if num == capacity {
// return false
// }
array_push_back :: proc( using self : Array( $ Type)) -> b32 {
if num == capacity {
return false
}
// data[ num ] = value
// num += 1
// return true
// }
data[ num ] = value
num += 1
return true
}
array_clear :: proc "contextless" ( using self : Array( $ Type ), zero_data : b32 = false ) {
if zero_data {