1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Codechange: Add a container to index data by zoom level.

This commit is contained in:
frosch
2025-05-03 18:35:50 +02:00
committed by frosch
parent 7055ea0aee
commit c0d4ab69d0
14 changed files with 58 additions and 37 deletions

View File

@@ -221,7 +221,7 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteType sprite_type, const SpriteLoader
/* Allocate the exact amount of memory we need */
Sprite *dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite) + size);
const auto &root_sprite = sprite[ZOOM_LVL_MIN];
const auto &root_sprite = sprite.Root();
dest_sprite->height = root_sprite.height;
dest_sprite->width = root_sprite.width;
dest_sprite->x_offs = root_sprite.x_offs;