Commit Graph

4 Commits

Author SHA1 Message Date
Jonas Kulla b0a41a23e0 Rename typedef and fix wrong documenting comment 2014-01-16 19:16:09 +01:00
Jonas Kulla 231e38ae8e Replace QVector, QList with std::vector, std::list
An exception is made of TexPool, which will need a
bit more testing before transitioning to std containers.

Also replace 'int' with 'size_t' where it is used only
as an array index.
2013-12-26 20:18:33 +01:00
Jonas Kulla f8e8ece946 Forgot to add license header 2013-10-09 13:44:15 +02:00
Jonas Kulla 10ec55e39b Implement a new tileset atlas layout to allow for bigger tilesets
The atlas packing algorithm has been reworked to pack autotiles
and tileset very efficiently into a texture, splitting the tileset
in multiple ways and eliminating the previous duplication of image
data in the atlas across "frames". Animation, which these frames
were designed for, is now done via duplicated buffer frames,
ie. each animation frame has its own VBO and IBO data. This was
not done to save on VRAM (hardly less memory is used), but to
make place for the new atlas layout.
Thanks to this new layout, even with a max texture size of 2048,
one can use tilesets with up to 15000 height. Of course, such
a tileset couldn't be stored in a regular Bitmap to begin with,
which is why I also introduced a hack called "mega surfaces":
software surfaces stored in RAM and wrapped inside a Bitmap,
whose sole purpose is to be passed to a Tilemap as tilesets.

Various other minor changes and fixes are included.
2013-09-24 19:35:38 +02:00