-
Notifications
You must be signed in to change notification settings - Fork 0
/
WaterSim.h
35 lines (23 loc) · 978 Bytes
/
WaterSim.h
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
29
30
31
32
33
34
35
#ifndef _WATER_SIM_H
#define _WATER_SIM_H
#include "defines.h"
#include "types.h"
#define MAX_WATER_LEVEL 7
#define Direction_None 0
#define Direction_Bottom 1
#define Direction_Left 2
#define Direction_Right 4
#define Direction_Up 8 //Inutile pour l'eau ?
#define Direction_Bottom_Left (Direction_Bottom | Direction_Left)
#define Direction_Bottom_Right (Direction_Bottom | Direction_Right)
#define Direction_RightLeft (Direction_Left | Direction_Right)
#define Direction_Flow (Direction_Left | Direction_Right | Direction_Bottom)
#define Direction_All (Direction_Flow | Direction_Up)
void WATER_UpdateNextCell();
void WATER_Update();
void WATER_UpdateFluidCell2(int x, int y);
inline void FlowRight(TworldTile *cell, TworldTile *rightCell);
inline void FlowLeft(TworldTile *cell, TworldTile *leftCell);
inline void FlowLeftRight(TworldTile *cell, TworldTile *leftCell, TworldTile *rightCell);
inline int FlowBottom(TworldTile *cell, TworldTile *bottomCell);
#endif