From: David H. <da...@he...> - 2009-04-20 19:57:27
|
I admit I don't exactly pay much attention to SDLmm these days. If you want I can give you access to the repository however. Is that something you'd like to get? Martin Bickel <bi...@as...> writes: > Hi, > > it's nice to see some activity again in the SDLmm SVN repository. > > We are using SDLmm for Advanced Strategic Command (www.asc-hq.org) and > currently include a forked copy of SDLmm with some bugfixes and small > enhancements. > > A patch with these changes is attached. It would be nice to see it > included in the SVN repository. > > Do you plan any official release of SDLmm? If you do such a release, I > would switch to using that for ASC instead statically linking our own copy. > > Best regards, > Martin > > Index: src/sdlmm_basesurface.h > =================================================================== > --- src/sdlmm_basesurface.h (revision 215) > +++ src/sdlmm_basesurface.h (working copy) > @@ -1,6 +1,6 @@ > /* > * SDmm - a C++ wrapper for SDL and related libraries > - * Copyright © 2001 David Hedbor <da...@he...> > + * Copyright © 2001 David Hedbor <da...@he...> > * > * This program is free software; you can redistribute it and/or > * modify it under the terms of the GNU General Public License as > @@ -193,6 +193,12 @@ > */ > Color GetPixel(const SRect& point) const { return GetPixel(point.x, point.y); } > > + //! Get the color of the pixel > + /*! > + \warning You can only use this function when the surface is locked. > + */ > + Color GetPixel(const SPoint& point) const { return GetPixel(point.x, point.y); } > + > //! Sets the color key (transparent pixel) in a blittable surface > //! and enables or disables RLE blit acceleration. > /*! > Index: src/sdlmm_pixelformat.h > =================================================================== > --- src/sdlmm_pixelformat.h (revision 215) > +++ src/sdlmm_pixelformat.h (working copy) > @@ -1,6 +1,6 @@ > /* > * SDmm - a C++ wrapper for SDL and related libraries > - * Copyright © 2001 David Hedbor <da...@he...> > + * Copyright © 2001 David Hedbor <da...@he...> > * > * This program is free software; you can redistribute it and/or > * modify it under the terms of the GNU General Public License as > @@ -61,6 +61,7 @@ > Uint8 Rshift() const { return me->Rshift; } > Uint8 Gshift() const { return me->Gshift; } > Uint8 Bshift() const { return me->Bshift; } > + Uint8 Ashift() const { return me->Ashift; } > > Uint8 Rloss() const { return me->Rloss; } > Uint8 Gloss() const { return me->Gloss; } > @@ -98,6 +99,7 @@ > \sa GetRGB, GetRGBA, MapRGBA > */ > Color MapRGB(Uint8 r, Uint8 g, Uint8 b) const; > + Color MapRGB(const SDL_Color& colorrgb) const { return MapRGB(colorrgb.r, colorrgb.g, colorrgb.b); } > > Color MapRGB(const ColorRGB& colorrgb) const { return MapRGB(colorrgb.r, colorrgb.g, colorrgb.b); } > > Index: src/sdlmm_basesurface.cpp > =================================================================== > --- src/sdlmm_basesurface.cpp (revision 215) > +++ src/sdlmm_basesurface.cpp (working copy) > @@ -1,6 +1,6 @@ > /* > * SDLmm - a C++ wrapper for SDL and related libraries > - * Copyright © 2001 David Hedbor <da...@he...> > + * Copyright © 2001 David Hedbor <da...@he...> > * > * This program is free software; you can redistribute it and/or > * modify it under the terms of the GNU General Public License as > @@ -149,7 +149,7 @@ > g = *(the_pixel + pf.Gshift()/8); > b = *(the_pixel + pf.Bshift()/8); > color = r << pf.Rshift(); > - color |= g << pf.Rshift(); > + color |= g << pf.Gshift(); > color |= b << pf.Bshift(); > return color; > } > Index: src/sdlmm_surface.h > =================================================================== > --- src/sdlmm_surface.h (revision 215) > +++ src/sdlmm_surface.h (working copy) > @@ -1,6 +1,6 @@ > /* > * SDmm - a C++ wrapper for SDL and related libraries > - * Copyright © 2001 David Hedbor <da...@he...> > + * Copyright © 2001 David Hedbor <da...@he...> > * > * This program is free software; you can redistribute it and/or > * modify it under the terms of the GNU General Public License as > @@ -83,9 +83,8 @@ > > static Surface CreateSurface(const BaseSurface& other) { > return Surface( > - SDL_CreateRGBSurface(other.w(), other.h(), > + SDL_CreateRGBSurface(SDL_SWSURFACE, other.w(), other.h(), > other.GetPixelFormat().BitsPerPixel(), > - other.pitch(), > other.GetPixelFormat().Rmask(), > other.GetPixelFormat().Gmask(), > other.GetPixelFormat().Bmask(), > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com_______________________________________________ > SDLmm-general mailing list > SDL...@li... > https://lists.sourceforge.net/lists/listinfo/sdlmm-general -- [ Below is a random fortune, which is unrelated to the above message. ] A bird in the bush usually has a friend in there with him. |