MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Encode

Method Encode

src/blitter/null.cpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16static FBlitter_Null iFBlitter_Null;
17
18Sprite *Blitter_Null::Encode(SpriteType, const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
19{
20 Sprite *dest_sprite;
21 dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite));
22
23 const auto &root_sprite = sprite.Root();
24 dest_sprite->height = root_sprite.height;
25 dest_sprite->width = root_sprite.width;
26 dest_sprite->x_offs = root_sprite.x_offs;
27 dest_sprite->y_offs = root_sprite.y_offs;
28
29 return dest_sprite;
30}

Callers 4

ReadSpriteFunction · 0.45
InternalGetGlyphMethod · 0.45
InternalGetGlyphMethod · 0.45
InternalGetGlyphMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected