ScummVM API documentation
map_katton.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef SCUMM_HE_MOONBASE_MAP_KATTON_H
23#define SCUMM_HE_MOONBASE_MAP_KATTON_H
24
25#ifdef ENABLE_HE
26
27#include "engines/scumm/he/moonbase/map_mif.h"
28
29#define TEMP_REPLACEMENT_NUMA 5
30#define NEVER_USED_NUM 99
31
32namespace Scumm {
33
34class KattonGenerator {
35public:
36 KattonGenerator(int seed);
37 ~KattonGenerator() = default;
38
39 MapFile *generateMap(int water, int tileSet, int mapSize, int energy, int terrain);
40
41private:
42 int _seed = 0;
43
44 int _size = 0; // 32, 40, 48, or 56
45 int _tileset = 0;
46 int _startloc[20][2] = { {}, {} };
47 int _board[MAX_TILE_COUNT][MAX_TILE_COUNT] = { {}, {} };
48 int _special[MAX_TILE_COUNT][MAX_TILE_COUNT] = { {}, {} };
49
50 int getRandomNumber();
51
52 int min(int a, int b, int c);
53 int distance(int x1, int y1, int x2, int y2);
54 int plusminus(int max);
55 int fillboards(int num);
56 int randomplace(int numberofplaces, int placer);
57 int randomflip(int numberofplaces, int inWater);
58 // stringiness: 0 = no change/random, 1 = no back, 2 = back goes forwards
59 int randomsplotch(int length, int stringiness, int placer, int x, int y);
60 int goodforwater(int x, int y);
61 int randomwater(int length, int stringiness, int x, int y);
62 int goodforenergy(int x, int y, int poolsize);
63 int findcoord(int value, int move);
64 int replacenum(int replacee, int replacer);
65 int fattenone(int x, int y, int howfat, int middle, int ignorer, int replacer);
66 // howfat: positive 1-5 for distance, -100 to 0 for random 3 spread from 2 to 5.
67 int fattenall(int howfat, int middle, int ignorer, int replacer);
68 int findstartloc();
69 int whatheightstartloc(int x, int y);
70 int tileaverage(int x, int y, int threshold);
71};
72
73} // End of namespace Scumm
74
75#endif // ENABLE_HE
76
77#endif // SCUMM_HE_MOONBASE_MAP_KATTON_H
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: actor.h:30