| 39 | } |
| 40 | |
| 41 | void sugoi_storage_t::allocate(sugoi_group_t* group, EIndex count, sugoi_view_callback_t callback, void* u) |
| 42 | { |
| 43 | using namespace sugoi; |
| 44 | if (scheduler) |
| 45 | { |
| 46 | SKR_ASSERT(scheduler->is_main_thread(this)); |
| 47 | scheduler->sync_archetype(group->archetype); |
| 48 | } |
| 49 | while (count != 0) |
| 50 | { |
| 51 | sugoi_chunk_view_t v = allocate_view(group, count); |
| 52 | entities.fill_entities(v); |
| 53 | construct_view(v); |
| 54 | count -= v.count; |
| 55 | if (callback) |
| 56 | callback(u, &v); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | sugoi_chunk_view_t sugoi_storage_t::allocate_view(sugoi_group_t* group, EIndex count) |
| 61 | { |
no test coverage detected