mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r18873) -Codechange: use PaletteID also in the blitter
This commit is contained in:
parent
f94c83a387
commit
db33e32b4d
|
@ -209,7 +209,7 @@ void Blitter_32bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL
|
|||
}
|
||||
}
|
||||
|
||||
void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height, int pal)
|
||||
void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
|
||||
{
|
||||
if (_screen_disable_anim) {
|
||||
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
{}
|
||||
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void SetPixelIfEmpty(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
||||
|
|
|
@ -20,7 +20,7 @@ class Blitter_32bppBase : public Blitter {
|
|||
public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 32; }
|
||||
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
// /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
|
||||
// /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
|
|
|
@ -63,7 +63,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo
|
|||
}
|
||||
}
|
||||
|
||||
void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height, int pal)
|
||||
void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
|
||||
{
|
||||
uint32 *udst = (uint32 *)dst;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
class Blitter_32bppSimple : public Blitter_32bppBase {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
|
||||
/* virtual */ const char *GetName() { return "32bpp-simple"; }
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "../gfx_func.h"
|
||||
#include "8bpp_base.hpp"
|
||||
|
||||
void Blitter_8bppBase::DrawColourMappingRect(void *dst, int width, int height, int pal)
|
||||
void Blitter_8bppBase::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
|
||||
{
|
||||
const uint8 *ctab = GetNonSprite(pal, ST_RECOLOUR) + 1;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class Blitter_8bppBase : public Blitter {
|
|||
public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 8; }
|
||||
// /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
* @param height the height of the buffer.
|
||||
* @param pal the palette to use.
|
||||
*/
|
||||
virtual void DrawColourMappingRect(void *dst, int width, int height, int pal) = 0;
|
||||
virtual void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) = 0;
|
||||
|
||||
/**
|
||||
* Convert a sprite from the loader to our own format.
|
||||
|
|
|
@ -19,7 +19,7 @@ class Blitter_Null : public Blitter {
|
|||
public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 0; }
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {};
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, int pal) {};
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) {};
|
||||
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
|
||||
/* virtual */ void *MoveTo(const void *video, int x, int y) { return NULL; };
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour) {};
|
||||
|
|
Loading…
Reference in New Issue