mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
Remove: ZOOM_LVL_COUNT
This is the only enumeration with a COUNT and END. The logic of the COUNT implied that BEGIN could be non-zero, but all but two uses of zoom level assume that BEGIN is zero, making the separate count only confusing.
This commit is contained in:
@@ -277,7 +277,7 @@ template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const
|
||||
/* streams of pixels (a, r, g, b channels)
|
||||
*
|
||||
* stored in separated stream so data are always aligned on 4B boundary */
|
||||
Colour *dst_px_orig[ZOOM_LVL_COUNT];
|
||||
Colour *dst_px_orig[ZOOM_LVL_END];
|
||||
|
||||
/* interleaved stream of 'm' channel and 'n' channel
|
||||
* 'n' is number of following pixels with the same alpha channel class
|
||||
@@ -285,10 +285,10 @@ template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const
|
||||
*
|
||||
* it has to be stored in one stream so fewer registers are used -
|
||||
* x86 has problems with register allocation even with this solution */
|
||||
uint16_t *dst_n_orig[ZOOM_LVL_COUNT];
|
||||
uint16_t *dst_n_orig[ZOOM_LVL_END];
|
||||
|
||||
/* lengths of streams */
|
||||
uint32_t lengths[ZOOM_LVL_COUNT][2];
|
||||
uint32_t lengths[ZOOM_LVL_END][2];
|
||||
|
||||
ZoomLevel zoom_min;
|
||||
ZoomLevel zoom_max;
|
||||
|
@@ -17,7 +17,7 @@ class Blitter_32bppOptimized : public Blitter_32bppSimple {
|
||||
public:
|
||||
/** Data stored about a (single) sprite. */
|
||||
struct SpriteData {
|
||||
uint32_t offset[ZOOM_LVL_COUNT][2]; ///< Offsets (from .data) to streams for different zoom levels, and the normal and remap image information.
|
||||
uint32_t offset[ZOOM_LVL_END][2]; ///< Offsets (from .data) to streams for different zoom levels, and the normal and remap image information.
|
||||
byte data[]; ///< Data, all zoomlevels.
|
||||
};
|
||||
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
};
|
||||
struct SpriteData {
|
||||
SpriteFlags flags;
|
||||
SpriteInfo infos[ZOOM_LVL_COUNT];
|
||||
SpriteInfo infos[ZOOM_LVL_END];
|
||||
byte data[]; ///< Data, all zoomlevels.
|
||||
};
|
||||
|
||||
|
@@ -18,7 +18,7 @@ class Blitter_8bppOptimized FINAL : public Blitter_8bppBase {
|
||||
public:
|
||||
/** Data stored about a (single) sprite. */
|
||||
struct SpriteData {
|
||||
uint32_t offset[ZOOM_LVL_COUNT]; ///< Offsets (from .data) to streams for different zoom levels.
|
||||
uint32_t offset[ZOOM_LVL_END]; ///< Offsets (from .data) to streams for different zoom levels.
|
||||
byte data[]; ///< Data, all zoomlevels.
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user