Files
@ r12405:ba094e765533
Branch filter:
Location: cpp/openttd-patchpack/source/src/blitter/8bpp_optimized.hpp - annotation
r12405:ba094e765533
1.1 KiB
text/x-c++hdr
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
r6852:5b6b567a9e32 r6852:5b6b567a9e32 r9111:983de9c5a848 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6937:bea726150bf3 r6937:bea726150bf3 r6852:5b6b567a9e32 r6937:bea726150bf3 r6852:5b6b567a9e32 r9542:f9c16a0cde53 r9542:f9c16a0cde53 r12078:20df2dd76e0c r9542:f9c16a0cde53 r9542:f9c16a0cde53 r6878:61440e99046f r6878:61440e99046f r6989:10bbdd3aad14 r6989:10bbdd3aad14 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6867:65542564f1e4 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 r6852:5b6b567a9e32 | /* $Id$ */
/** @file 8bpp_optimized.hpp An optimized 8 bpp blitter. */
#ifndef BLITTER_8BPP_OPTIMIZED_HPP
#define BLITTER_8BPP_OPTIMIZED_HPP
#include "8bpp_base.hpp"
#include "factory.hpp"
class Blitter_8bppOptimized : public Blitter_8bppBase {
public:
struct SpriteData {
uint32 offset[ZOOM_LVL_COUNT]; ///< offsets (from .data) to streams for different zoom levels
byte data[]; ///< data, all zoomlevels
};
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "8bpp-optimized"; }
};
class FBlitter_8bppOptimized: public BlitterFactory<FBlitter_8bppOptimized> {
public:
/* virtual */ const char *GetName() { return "8bpp-optimized"; }
/* virtual */ const char *GetDescription() { return "8bpp Optimized Blitter (compression + all-ZoomLevel cache)"; }
/* virtual */ Blitter *CreateInstance() { return new Blitter_8bppOptimized(); }
};
#endif /* BLITTER_8BPP_OPTIMIZED_HPP */
|