Mercurial > hg > openttd
changeset 17045:0f0760845f54 draft
(svn r21782) -Codechange: Move declaration of AllocatorProc from Blitter:: to spritecache.h
author | frosch <frosch@openttd.org> |
---|---|
date | Fri, 14 Jan 2011 15:34:33 +0000 |
parents | f20abc851ba1 |
children | c55c4f449d7c |
files | src/blitter/32bpp_base.hpp src/blitter/32bpp_optimized.cpp src/blitter/32bpp_optimized.hpp src/blitter/32bpp_simple.cpp src/blitter/32bpp_simple.hpp src/blitter/8bpp_base.hpp src/blitter/8bpp_debug.cpp src/blitter/8bpp_debug.hpp src/blitter/8bpp_optimized.cpp src/blitter/8bpp_optimized.hpp src/blitter/8bpp_simple.cpp src/blitter/8bpp_simple.hpp src/blitter/base.hpp src/blitter/null.cpp src/blitter/null.hpp src/spritecache.h |
diffstat | 16 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -21,7 +21,7 @@ /* virtual */ uint8 GetScreenDepth() { return 32; } // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); // /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); -// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); +// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
--- a/src/blitter/32bpp_optimized.cpp +++ b/src/blitter/32bpp_optimized.cpp @@ -255,7 +255,7 @@ return sprite; } -Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { /* streams of pixels (a, r, g, b channels) *
--- a/src/blitter/32bpp_optimized.hpp +++ b/src/blitter/32bpp_optimized.hpp @@ -23,7 +23,7 @@ }; /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ const char *GetName() { return "32bpp-optimized"; }
--- a/src/blitter/32bpp_simple.cpp +++ b/src/blitter/32bpp_simple.cpp @@ -91,7 +91,7 @@ DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal); } -Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { Sprite *dest_sprite; SpriteLoader::CommonPixel *dst;
--- a/src/blitter/32bpp_simple.hpp +++ b/src/blitter/32bpp_simple.hpp @@ -19,7 +19,7 @@ public: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ const char *GetName() { return "32bpp-simple"; } };
--- a/src/blitter/8bpp_base.hpp +++ b/src/blitter/8bpp_base.hpp @@ -19,7 +19,7 @@ /* virtual */ uint8 GetScreenDepth() { return 8; } // /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal); -// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); +// /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ void *MoveTo(const void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
--- a/src/blitter/8bpp_debug.cpp +++ b/src/blitter/8bpp_debug.cpp @@ -41,7 +41,7 @@ } } -Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { Sprite *dest_sprite; dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + sprite->height * sprite->width);
--- a/src/blitter/8bpp_debug.hpp +++ b/src/blitter/8bpp_debug.hpp @@ -18,7 +18,7 @@ class Blitter_8bppDebug : public Blitter_8bppBase { public: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ const char *GetName() { return "8bpp-debug"; } };
--- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -110,7 +110,7 @@ } } -Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { /* Make memory for all zoom-levels */ uint memory = sizeof(SpriteData);
--- a/src/blitter/8bpp_optimized.hpp +++ b/src/blitter/8bpp_optimized.hpp @@ -23,7 +23,7 @@ }; /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ const char *GetName() { return "8bpp-optimized"; } };
--- a/src/blitter/8bpp_simple.cpp +++ b/src/blitter/8bpp_simple.cpp @@ -54,7 +54,7 @@ } } -Sprite *Blitter_8bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_8bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { Sprite *dest_sprite; dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + sprite->height * sprite->width);
--- a/src/blitter/8bpp_simple.hpp +++ b/src/blitter/8bpp_simple.hpp @@ -18,7 +18,7 @@ class Blitter_8bppSimple : public Blitter_8bppBase { public: /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom); - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator); /* virtual */ const char *GetName() { return "8bpp-simple"; } };
--- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -46,8 +46,6 @@ PALETTE_ANIMATION_BLITTER, ///< The blitter takes care of the palette animation }; - typedef void *AllocatorProc(size_t size); - /** * Get the screen depth this blitter works for. * This is either: 8, 16, 24 or 32. @@ -73,7 +71,7 @@ /** * Convert a sprite from the loader to our own format. */ - virtual Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) = 0; + virtual Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) = 0; /** * Move the destination pointer the requested amount x and y, keeping in mind
--- a/src/blitter/null.cpp +++ b/src/blitter/null.cpp @@ -14,7 +14,7 @@ static FBlitter_Null iFBlitter_Null; -Sprite *Blitter_Null::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) +Sprite *Blitter_Null::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator) { Sprite *dest_sprite; dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite));
--- a/src/blitter/null.hpp +++ b/src/blitter/null.hpp @@ -20,7 +20,7 @@ /* virtual */ uint8 GetScreenDepth() { return 0; } /* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) {}; /* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) {}; - /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator); + /* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, 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) {}; /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour) {};