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

@@ -36,7 +36,7 @@ Particle_System :: struct {
}
create_particle_system :: (pipeline: Pipeline_State_Handle, update_func: (*Particle_System, float), owning_entity: *Entity = null, scene: *Scene = null) -> *Particle_System {
lvl := ifx scene == null then game_state.current_scene else scene;
lvl := ifx scene == null then current_scene else scene;
particle_system, locator := find_and_occupy_empty_slot(*scene.particle_systems);
particle_system._locator = locator;
particle_system.vertex_buffer = create_vertex_buffer(renderer, null, size_of(Particle_Vertex) * MAX_PARTICLES, stride=size_of(Particle_Vertex), mappable=true);
@@ -60,7 +60,7 @@ spawn_particle :: (system: *Particle_System, position: Vector3, velocity: Vector
}
update_particle_systems :: (dt: float) {
for *system: game_state.current_scene.particle_systems {
for *system: current_scene.particle_systems {
if system.on_particle_update != null {
system.on_particle_update(system, dt);
}
@@ -71,9 +71,9 @@ update_particle_system :: (system: *Particle_System, dt: float) {
}
prepare_particle_system_for_rendering :: (system: Particle_System) {
up := game_state.camera.up;
right := game_state.camera.right;
forward := game_state.camera.forward;
up := current_scene.camera.up;
right := current_scene.camera.right;
forward := current_scene.camera.forward;
rendering_data : [..] Particle_Vertex;
rendering_data.allocator = temp;
@@ -140,7 +140,7 @@ prepare_particle_system_for_rendering :: (system: Particle_System) {
}
render_particle_systems :: () {
for system: game_state.current_scene.particle_systems {
for system: current_scene.particle_systems {
prepare_particle_system_for_rendering(system);
if system.particles.count > 0 {