refactor: header file for every module

This commit is contained in:
2026-09-19 13:11:53 +02:00
parent b26070a518
commit dda0d38e22
36 changed files with 968 additions and 272 deletions
+31
View File
@@ -0,0 +1,31 @@
#ifndef ISLANDS_H
#define ISLANDS_H
#include "engineSprite.h"
#include <raylib.h>
#define MAX_ISLANDS 14
// Perimeter samples used to build each island's procedural shape (see
// GenerateIsland in appGameIslands.c). Higher than you'd need for the old
// small islands since they're now rendered at much higher native resolution
// and a coarser sample count would show as flat facets on the coastline.
#define ISLAND_SHAPE_POINTS 28
typedef struct {
Vector2 position;
float radius; // collision radius (outer shore edge), in world units
Sprite sprite; // a small procedurally-painted texture, point-filtered like
// the rest of the cast, not a shader effect
} Island;
typedef struct {
int count;
Island island[MAX_ISLANDS];
} Islands;
Islands CreateIslands(Camera2D *camera);
void UpdateIslands(Islands *islands, Camera2D *camera);
void RenderIslands(Islands *islands);
void UnloadIslands(Islands *islands);
#endif // ISLANDS_H