List of headers
The headers are in include/brasa/ inside the SDK. Each public function has a /// comment in Portuguese, which shows up when you hover over it in VS Code.
| Header | What it is for |
|---|---|
brasa.hpp |
Includes all the others. It’s the only one you need. |
entity.hpp |
The Entity class: events, properties and the easy API (movement, timers, instances, collision, input, rooms). |
math.hpp |
Vec2, lerp, approach, sign, wrap. |
random.hpp |
random, randomInt, chance, pick, randomSeed. |
input.hpp |
The enum Key, MouseButton and the Input:: functions. |
audio.hpp |
Audio::play, Audio::stop, Audio::stopAll and PlayOptions. |
camera.hpp |
The room’s Camera. |
scene.hpp |
The Scene (the running room): instances, size, background and camera. |
types.hpp |
Color, the ready-made colors in colors:: and Rect. |
handle.hpp |
Handle<T>, the safe reference to an instance. |
app.hpp |
goToScene, quit and the functions that open the game (used by the generated main.cpp). |
registry.hpp |
The registry of objects and scenes by name, and BRASA_ENTITY. |
sprite.hpp |
The definition of a sprite: frames, origin and collision box. |
canvas.hpp |
The drawing layer used by the engine. |
log.hpp |
logInfo and logError: messages that show up in the editor’s Saída (Output). |
timestep.hpp |
The fixed step clock (60 per second). |
Messages in the Output
Section titled “Messages in the Output”To debug, write to the editor’s Saída:
#include <format> // at the top of the file
brasa::logInfo(std::format("x = {}, y = {}", x, y));brasa::logError("isto não deveria acontecer");