-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLava.cpp
76 lines (65 loc) · 1.82 KB
/
Lava.cpp
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "Lava.h"
void SetLavaPossibleRegion(const MAP_RECT& mapRect)
{
for (int x = mapRect.x1; x <= mapRect.x2; ++x)
{
for (int y = mapRect.y1; y <= mapRect.y2; ++y)
{
GameMap::SetLavaPossible(LOCATION(x, y), true);
}
}
}
void SetLavaPossibleAllSlowCells(const MAP_RECT& mapRect)
{
for (int y = mapRect.y1; y <= mapRect.y2; ++y)
{
for (int x = mapRect.x1; x <= mapRect.x2; ++x)
{
const LOCATION location = LOCATION(x, y);
const int cellType = GameMap::GetCellType(location);
if (cellType == CellTypes::cellSlowPassible1 ||
cellType == CellTypes::cellSlowPassible2)
{
GameMap::SetLavaPossible(location, true);
}
}
}
}
void AnimateFlowSW(const LOCATION& loc)
{
GameMap::SetTile(loc + LOCATION(1, 0), 0x453);
GameMap::SetTile(loc, 0x447);
GameMap::SetTile(loc + LOCATION(0, 1), 0x45E);
GameMap::SetTile(loc + LOCATION(1, 1), 0x469);
}
void AnimateFlowS(const LOCATION& loc)
{
GameMap::SetTile(loc, 0x474);
GameMap::SetTile(loc + LOCATION(0, 1), 0x47E);
}
void AnimateFlowSE(const LOCATION& loc)
{
GameMap::SetTile(loc, 0x489);
GameMap::SetTile(loc + LOCATION(0, 1), 0x4A0);
GameMap::SetTile(loc + LOCATION(1, 1), 0x4AB);
GameMap::SetTile(loc + LOCATION(1, 0), 0x494);
}
void FreezeFlowSW(const LOCATION& loc)
{
GameMap::SetTile(loc + LOCATION(1, 0), 0x45A);
GameMap::SetTile(loc, 0x44F);
GameMap::SetTile(loc + LOCATION(0, 1), 0x465);
GameMap::SetTile(loc + LOCATION(1, 1), 0x470);
}
void FreezeFlowS(const LOCATION& loc)
{
GameMap::SetTile(loc, 0x47B);
GameMap::SetTile(loc + LOCATION(0, 1), 0x486);
}
void FreezeFlowSE(const LOCATION& loc)
{
GameMap::SetTile(loc, 0x490);
GameMap::SetTile(loc + LOCATION(0, 1), 0x4A8);
GameMap::SetTile(loc + LOCATION(1, 1), 0x4B2);
GameMap::SetTile(loc + LOCATION(1, 0), 0x49C);
}