summaryrefslogtreecommitdiff
path: root/height-map-display/src/map/square.h
blob: 2654eb53780dfa1b4af2545a056ba1d281293a2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef SQUARE_H
#define SQUARE_H

#include "node.h" // Include node.h to use Node type.

// Define the Terrain_Type enum
typedef enum {
    TERRAIN_FAIRWAY,
    TERRAIN_ROUGH,
    TERRAIN_GREEN,
} Terrain_Type;

// Define the Square struct
typedef struct Square {
    Terrain_Type terrain;
    Node *node_tl;
    Node *node_tr;
    Node *node_bl;
    Node *node_br;
} Square;

// Function prototypes
Square* init_square(Node *tl, Node *tr, Node *bl, Node *br, Terrain_Type terrain);
void change_square_height(Square* square, float diff);
void change_square_terrain(Square* square, Terrain_Type terrain);

#endif