Sandbox 1
Sandbox game that emulates different material physics
Loading...
Searching...
No Matches
classes.cpp File Reference

File with implementation of all World functions. More...

#include "include/classes.hpp"
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_ttf/SDL_ttf.h>
#include <utility>
Include dependency graph for classes.cpp:

Macros

#define PIXEL_SIZE   3
 Defines pixel size in pixels. Makes pixel that much bigger than a regular pixel on the screen.
#define BRUSH_SPREAD   3
 Defines how off the mouse cursor's coordinates pixels can spawn.
#define BRUSH_DENCITY   (BRUSH_SPREAD * 3)
 Defines how much pixels will me spawned each time World::addPixel() inwoked.
#define COLOR_SPREAD   100
 Defines with how off the default color pixel color can be.
#define SAND_COLOR
#define WATER_COLOR
#define TEXT_SIZE   8
 Defines size of the text that is drawn on the screen.

Detailed Description

File with implementation of all World functions.

Defined in include/classes.hpp

Date
2026/03/15

Macro Definition Documentation

◆ SAND_COLOR

#define SAND_COLOR
Value:
(SDL_Color) { (Uint8) (255) \
, (Uint8) (255 - SDL_rand(COLOR_SPREAD)) \
, (Uint8) (0 + SDL_rand(COLOR_SPREAD)), 255 }
#define COLOR_SPREAD
Defines with how off the default color pixel color can be.
Definition classes.cpp:32

◆ WATER_COLOR

#define WATER_COLOR
Value:
(SDL_Color) { (Uint8) (0) \
, (Uint8) (0) \
, (Uint8) (255 - SDL_rand(COLOR_SPREAD)), 255 }