Find a file
2025-10-28 11:59:37 +01:00
asset-src feat: initialized project 2025-10-26 14:27:30 +01:00
assets feat: initialized project 2025-10-26 14:27:30 +01:00
src feat: implemented dice rolling 2025-10-28 11:59:27 +01:00
vendor fix: uidata starts with 0 utilized bytes ipv 9 2025-10-28 11:59:37 +01:00
.clang-format chore: adjusted clang-format 2025-10-28 11:58:37 +01:00
.clangd feat: setup template 2025-09-25 13:12:30 +02:00
.dir-locals.el feat: disabled C mode for all files in the project 2025-10-27 14:41:08 +01:00
.gitignore feat: setup template 2025-09-25 13:12:30 +02:00
.gitmodules feat: added submodule for SDL3_image 2025-10-27 16:27:55 +01:00
CMakeLists.txt feat: setup SDL3 image for building 2025-10-27 20:27:25 +01:00
justfile feat: initialized project 2025-10-26 14:27:30 +01:00
README.md fix: specified cpp for code block in README.md 2025-10-27 14:42:55 +01:00

Dice GUI

A simple dice rolling GUI app using Clay for layout, Ceramic elements and SDL3 rendering.

Compiling

Either git clone --recursive or remember to git submodule update --init --recursive. Then cmake -S. -Bbuild and cmake --build build. Which compiles bin/dice-gui, which you can run.

Code Standards

  • Keep program structure as simple as possible. No class Application or other Java-isms. Prefer namespaces with static lifetime variables.

  • Use STL where possible. Don't reinvent the wheel.

  • K&R brackets. With notable exceptions(1)

  • camelCase for variables, PascalCase for types and functions (that's what SDL and Clay do).

  • In class member functions, always use this-> to access member variables.

  • const applies to the name to it's left, so it goes after the type, not const int x; but int const x.

  • * and & flush with the declaration name. Type const &Function(Type &inRef)

(1) Bracket exceptions:

  • using scoped_lock in arbitrary blocks, prefer tailed lisp brackets
struct Data {
    int x{ 0 }, y{ 0 };
};
void MyFunction(Data const &data) { // K&R here
    DoAsynchronousThings();
    { std::scoped_lock lock{ myMutex };
        myVariable++;
    } // not quite lisp, lisp with a tail
    DoMoreAsynchronousThings();
}