Fix printing of tilemaps and compare objects
This commit is contained in:
parent
5745859815
commit
59300d2339
2 changed files with 9 additions and 2 deletions
|
@ -312,7 +312,7 @@ namespace
|
|||
{"scroll", &tilemap::scroll},
|
||||
{"getsize", &tilemap::getsize},
|
||||
{"getcsize", &tilemap::getcsize},
|
||||
});
|
||||
}, &tilemap::print);
|
||||
|
||||
tilemap::tilemap(lua::state& L, size_t _width, size_t _height, size_t _cwidth, size_t _cheight)
|
||||
: width(_width), height(_height), cwidth(_cwidth), cheight(_cheight)
|
||||
|
|
|
@ -28,6 +28,13 @@ namespace
|
|||
static size_t overcommit(uint64_t addr, uint64_t size, uint64_t rows, uint64_t stride) { return 0; }
|
||||
static int create(lua::state& L, lua::parameters& P);
|
||||
int call(lua::state& L, lua::parameters& P);
|
||||
std::string print()
|
||||
{
|
||||
std::ostringstream x;
|
||||
x << "addr=0x" << std::hex << addr << " rows=" << rows << " size=0x" << std::hex << size
|
||||
<< " stride=0x" << std::hex << stride;
|
||||
return x.str();
|
||||
}
|
||||
private:
|
||||
std::vector<uint8_t> prev;
|
||||
bool try_map;
|
||||
|
@ -116,5 +123,5 @@ namespace
|
|||
{"new", compare_obj::create},
|
||||
}, {
|
||||
{"__call", &compare_obj::call},
|
||||
});
|
||||
}, &compare_obj::print);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue