载入中...
搜索中...
未找到
TileBuffer.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <cstdint>
6#include <vector>
7
8namespace eve::level_editing {
9
12public:
14 TileBuffer(int width, int height);
15
17 int getWidth() const { return width_; }
19 int getHeight() const { return height_; }
20
22 void resize(int width, int height);
24 void clear();
26 void fill(int gid);
27
29 void setGid(int x, int y, int gid);
31 int getGid(int x, int y) const;
32
34 bool containsCell(int x, int y) const;
35
36private:
37 int index(int x, int y) const { return y * width_ + x; }
38
39 int width_ = 0;
40 int height_ = 0;
41 std::vector<int> gids_;
42};
43
44} // namespace eve::level_editing
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::uint32_t height
std::uint32_t width
uint32_t index
Independent GID grid for map brushes (no hard dependency on map.TileLayer).
Definition TileBuffer.h:11
int getWidth() const
Returns the width.
Definition TileBuffer.h:17
int getHeight() const
Returns the height.
Definition TileBuffer.h:19