Add page support to object pool
This commit is contained in:
@@ -79,7 +79,7 @@ bool init(void *userData) {
|
||||
// init pools
|
||||
game->pools.pathData = bzObjectPoolCreate(&(BzObjectPoolDesc) {
|
||||
.objectSize=sizeof(PathData),
|
||||
.numObjects=512
|
||||
.objectsPerPage=512
|
||||
});
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ void imguiRender(float dt, void *userData) {
|
||||
createWorker((Position) {1100, 400}, (Size) {10, 10}, game->entityGrid,
|
||||
&game->map.tilesets[2], 1322);
|
||||
}
|
||||
igText("Num paths from pool available: %llu", bzObjectPoolCalcNumFree(game->pools.pathData));
|
||||
igText("Num paths from pool available: %llu", bzObjectPoolGetNumFree(game->pools.pathData));
|
||||
const char *inputState = "NONE";
|
||||
switch (input->state) {
|
||||
case INPUT_NONE:
|
||||
|
||||
Reference in New Issue
Block a user