Files
smack-a-brother/src/sprites.cpp
T
shweetandClaude Opus 5.5 6f112ab231 HUD pass, weapon and trinket rework, and font arrows
HUD:
- Hotbars fit a quarter of the screen, dropping to small then tiny slots
  (thinner outlines when tiny), with cooldown bars matching their size.
- HUD elements are drawn on their own layer and composited at one
  opacity: hotbar slots are see-through until hovered, the rest fade
  while hovered.
- Rival windows fit the right column in at most two rows, shrinking
  icons then font, then dropping icons for name, health and ping bars.
- Tooltips number equipped items' slots and say Recoil for weapons that
  only push back. Previews use arrows, spread uses degrees.
- Crosshair fills in and shakes with charge, and weapons shake after
  firing until their cooldown ends. DPS and speed meters off by default.

Gameplay:
- Dual Wield stacks: each copy fires another recently held weapon from
  a fanned off-hand, at its own level's cut.
- Flamethrower: no slowing, smaller fireball with some recoil, and an
  airblast that knocks others away.
- Iron Weights slam on any landing faster than a plain fall (platforms
  too), stacking radius and damage, and speeding fast falls.
- Stuck arrows are one-way ledges until they fade, matching their
  (slightly larger) hit size. Attacks now collide with slopes.
- Halved Tesla Coil, Recoil Coil, Diazepam, Shock Absorber, Feather and
  screenshake values.

Art and tools:
- Weapon and trinket icons merged into one sheet each (normal, small,
  tiny), cells in catalog order. Grimoire wisps stand upright.
- Fonts gain the degree sign and four arrows, decoded from UTF-8.
- Menu fighter preview walks at quarter speed.
- Unequip from either catalog tab by right click or gamepad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:43:45 -05:00

19 lines
519 B
C++

#include "sprites.h"
#include "game.h"
void Sprites::init(Game& game)
{
Renderer& renderer = game.renderer;
dummy.load(renderer, "dummy");
effects.load(renderer, "effects");
icons.load(renderer, "weapon_icons");
player.load(renderer, "player");
tiles.load(renderer, "tiles");
trinkets.load(renderer, "trinkets");
modes.load(renderer, "modes");
ui.load(renderer, "ui");
weapons.load(renderer, "weapons");
for (Animator& animator : fighters)
animator.art = &player;
}