Compiles again

This commit is contained in:
2024-10-13 00:54:26 +02:00
parent 8f2dad9cec
commit 9939c84f09
9 changed files with 172 additions and 147 deletions

View File

@@ -2,6 +2,8 @@
#load "particles.jai";
#placeholder Entity_Storage;
#placeholder serialize_entity;
#placeholder deserialize_entity;
MAX_CACHED_PILES :: 8;
@@ -12,8 +14,6 @@ Scene :: struct {
particle_systems : Bucket_Array(Particle_System, 64);
bullet_impact_particle_systems : [..] *Particle_System;
by_type : Entity_Storage;
pool : Flat_Pool;
@@ -58,7 +58,6 @@ load_scene :: (path: string) -> *Scene {
}
save_scene :: (scene: *Scene, path: string) {
scene.camera = game_state.camera;
builder : String_Builder;
builder.allocator = temp;
@@ -99,7 +98,6 @@ create_scene :: (name: string, max_entities: s64 = 256) -> *Scene {
// Assign allocator to everything that needs allocations
scene.entities.allocator = scene.allocator;
scene.particle_systems.allocator = scene.allocator;
scene.bullet_impact_particle_systems.allocator = scene.allocator;
array_reserve(*scene.entities, max_entities);
@@ -111,12 +109,6 @@ create_scene :: (name: string, max_entities: s64 = 256) -> *Scene {
dir_light_data.direction = scene.directional_light.direction;
upload_data_to_buffer(renderer, directional_light_buffer, *dir_light_data, size_of(Directional_Light_Buffer_Data));
array_resize(*scene.bullet_impact_particle_systems, 32);
for 0..31 {
scene.bullet_impact_particle_systems[it] = create_particle_system(particle_pipeline, on_update_bullet_hit_particles, null, scene);
}
return scene;
}