This commit is contained in:
asrael 2025-09-28 13:10:29 -05:00
parent 9f96626ea7
commit 6a02b24ae6
29 changed files with 653 additions and 583 deletions

View file

@ -3,16 +3,6 @@
#include "pxl8_types.h"
#include "pxl8_gfx.h"
typedef struct pxl8_copper_bar {
f32 base_y;
f32 amplitude;
i32 height;
f32 speed;
f32 phase;
u32 color;
u32 fade_color;
} pxl8_copper_bar;
typedef struct pxl8_particle {
f32 x, y, z;
f32 vx, vy, vz;
@ -46,15 +36,19 @@ typedef struct pxl8_particle_system {
void* userdata;
} pxl8_particle_system;
void pxl8_vfx_copper_bars(pxl8_gfx_ctx* ctx, pxl8_copper_bar* bars, u32 bar_count, f32 time);
void pxl8_vfx_plasma(pxl8_gfx_ctx* ctx, f32 time, f32 scale1, f32 scale2, u8 palette_offset);
void pxl8_vfx_rotozoom(pxl8_gfx_ctx* ctx, f32 angle, f32 zoom, i32 cx, i32 cy);
void pxl8_vfx_tunnel(pxl8_gfx_ctx* ctx, f32 time, f32 speed, f32 twist);
void pxl8_vfx_water_ripple(pxl8_gfx_ctx* ctx, f32* height_map, i32 drop_x, i32 drop_y, f32 damping);
typedef struct pxl8_raster_bar {
f32 base_y;
f32 amplitude;
i32 height;
f32 speed;
f32 phase;
u32 color;
u32 fade_color;
} pxl8_raster_bar;
void pxl8_vfx_particles_clear(pxl8_particle_system* sys);
void pxl8_vfx_particles_destroy(pxl8_particle_system* sys);
void pxl8_vfx_particles_emit(pxl8_particle_system* sys, u32 count);
void pxl8_vfx_particles_free(pxl8_particle_system* sys);
void pxl8_vfx_particles_init(pxl8_particle_system* sys, u32 max_count);
void pxl8_vfx_particles_render(pxl8_particle_system* sys, pxl8_gfx_ctx* ctx);
void pxl8_vfx_particles_update(pxl8_particle_system* sys, f32 dt);
@ -66,3 +60,9 @@ void pxl8_vfx_smoke(pxl8_particle_system* sys, i32 x, i32 y, u8 color);
void pxl8_vfx_snow(pxl8_particle_system* sys, i32 width, f32 wind);
void pxl8_vfx_sparks(pxl8_particle_system* sys, i32 x, i32 y, u32 color);
void pxl8_vfx_starfield(pxl8_particle_system* sys, f32 speed, f32 spread);
void pxl8_vfx_plasma(pxl8_gfx_ctx* ctx, f32 time, f32 scale1, f32 scale2, u8 palette_offset);
void pxl8_vfx_raster_bars(pxl8_gfx_ctx* ctx, pxl8_raster_bar* bars, u32 bar_count, f32 time);
void pxl8_vfx_rotozoom(pxl8_gfx_ctx* ctx, f32 angle, f32 zoom, i32 cx, i32 cy);
void pxl8_vfx_tunnel(pxl8_gfx_ctx* ctx, f32 time, f32 speed, f32 twist);
void pxl8_vfx_water_ripple(pxl8_gfx_ctx* ctx, f32* height_map, i32 drop_x, i32 drop_y, f32 damping);