build: move map & rng logic to their own libraries
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I1802469f3baff4576f61accfb5a197d86a6a6964
This commit is contained in:
parent
702b4258e0
commit
26aa295f82
17 changed files with 136 additions and 93 deletions
10
libs/map/utils.h
Normal file
10
libs/map/utils.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
// Clamp value between min and max
|
||||
int clamp(int value, int min, int max);
|
||||
|
||||
// Check if coordinates are within map bounds
|
||||
int in_bounds(int x, int y, int width, int height);
|
||||
|
||||
#endif // UTILS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue