mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 10:22:39 +01:00
Codechange: use std::vector/std::span for DrawTileSprites over malloc-ed table
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
||||
{
|
||||
const auto *spec = this->GetSpec(cls_id, id);
|
||||
if (!spec->grf_prop.HasGrfFile()) {
|
||||
extern const DrawTileSprites _objects[];
|
||||
extern const DrawTileSpriteSpan _objects[];
|
||||
const DrawTileSprites *dts = &_objects[spec->grf_prop.local_id];
|
||||
DrawOrigTileSeqInGUI(x, y, dts, PAL_NONE);
|
||||
} else {
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
int y = (ir.Height() + ScaleSpriteTrad(PREVIEW_HEIGHT)) / 2 - ScaleSpriteTrad(PREVIEW_BOTTOM);
|
||||
|
||||
if (!spec->grf_prop.HasGrfFile()) {
|
||||
extern const DrawTileSprites _objects[];
|
||||
extern const DrawTileSpriteSpan _objects[];
|
||||
const DrawTileSprites *dts = &_objects[spec->grf_prop.local_id];
|
||||
DrawOrigTileSeqInGUI(x, y, dts, PAL_NONE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user