22#ifndef ULTIMA3_DATA_DUNGEON_H
23#define ULTIMA3_DATA_DUNGEON_H
25#include "common/scummsys.h"
26#include "common/serializer.h"
32constexpr int DUNGEON_LEVELS = 8;
33constexpr int DUNGEON_SIZE = 16;
36constexpr byte DTILE_TIME_LORD = 1;
37constexpr byte DTILE_FOUNTAIN = 2;
38constexpr byte DTILE_WIND = 3;
39constexpr byte DTILE_TRAP = 4;
40constexpr byte DTILE_MARK = 5;
41constexpr byte DTILE_GREMLINS = 6;
42constexpr byte DTILE_SIGN = 8;
45constexpr byte DTILE_LADDER_UP = 0x10;
46constexpr byte DTILE_LADDER_DOWN = 0x20;
47constexpr byte DTILE_CHEST = 0x40;
48constexpr byte DTILE_WALL = 0x80;
49constexpr byte DTILE_DOOR = 0xC0;
56 static const int SIGNS_SIZE = 0x90;
58 byte _tiles[DUNGEON_LEVELS * DUNGEON_SIZE * DUNGEON_SIZE] = {};
59 byte _signs[SIGNS_SIZE] = {};
65 void load(
const char *filename);
72 byte tile(
int level,
int x,
int y)
const {
73 return _tiles[(level << 8) + ((y & (DUNGEON_SIZE - 1)) << 4) + (x & (DUNGEON_SIZE - 1))];
76 void setTile(
int level,
int x,
int y,
byte value) {
77 _tiles[(level << 8) + ((y & (DUNGEON_SIZE - 1)) << 4) + (x & (DUNGEON_SIZE - 1))] = value;
83 const char *
sign(
int level)
const;
Definition: serializer.h:80
void load(const char *filename)
const char * sign(int level) const
byte tile(int level, int x, int y) const
Definition: dungeon.h:72