// Setup animation frames (assuming horizontal strip) int frame_width = tex_width / FRAME_COUNT; int frame_height = tex_height;
// Update position based on velocity void update_position(AnimatedSprite* sprite) sprite->x += sprite->velocity_x; sprite->y += sprite->velocity_y; sdl3 tutorial
// Get texture dimensions int tex_width, tex_height; SDL_GetTextureSize(sprite->texture, &tex_width, &tex_height); // Setup animation frames (assuming horizontal strip) int