- constexpr Color entityColor(0x00, 0xFA, 0x00);
- canvas.SetColor(entityColor);
-
- for (const Entity &e : world.Entities()) {
- const Vector<float> pos(e.bounds.Left(), e.bounds.Top());
- const Vector<float> size(e.bounds.Size());
- canvas.OutlineRect(cam.ToScreen(pos), cam.ToScale(size));
+ constexpr Color boundsColor(0xFA, 0x00, 0x00);
+ constexpr Color vboxColor(0xFA, 0xFA, 0x00);
+ constexpr Color hboxColor(0x00, 0xFA, 0x00);
+
+ for (const Entity *e : world.Entities()) {
+ canvas.SetColor(boundsColor);
+ canvas.OutlineRect(
+ cam.ToScreen(e->bounds.Position()),
+ cam.ToScale(e->bounds.Size())
+ );
+ if (const Character *c = dynamic_cast<const Character *>(e)) {
+ canvas.OutlineRectRot(
+ Rect<float>(
+ cam.ToScreen(c->bounds.Position() + c->arm.Position()),
+ cam.ToScale(c->arm.Size())
+ ),
+ cam.ToScreen(c->bounds.Position() + c->armOrigin),
+ c->armAngle
+ );
+ }
+ canvas.SetColor(vboxColor);
+ canvas.OutlineRect(
+ cam.ToScreen(e->vbox.Position()),
+ cam.ToScale(e->vbox.Size())
+ );
+ canvas.SetColor(hboxColor);
+ canvas.OutlineRect(
+ cam.ToScreen(e->hbox.Position()),
+ cam.ToScale(e->hbox.Size())
+ );