[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src sdl_utils.cpp sdl_utils.hpp
From: |
Jon Daniel |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src sdl_utils.cpp sdl_utils.hpp |
Date: |
Tue, 01 Mar 2005 15:42:52 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <address@hidden> 05/03/01 20:42:52
Modified files:
src : sdl_utils.cpp sdl_utils.hpp
Log message:
added inverse function to calculate the inverse colour of an SDL_Color
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.cpp.diff?tr1=1.73&tr2=1.74&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/sdl_utils.hpp.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
Patches:
Index: wesnoth/src/sdl_utils.cpp
diff -u wesnoth/src/sdl_utils.cpp:1.73 wesnoth/src/sdl_utils.cpp:1.74
--- wesnoth/src/sdl_utils.cpp:1.73 Tue Mar 1 19:32:15 2005
+++ wesnoth/src/sdl_utils.cpp Tue Mar 1 20:42:51 2005
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.cpp,v 1.73 2005/03/01 19:32:15 j_daniel Exp $ */
+/* $Id: sdl_utils.cpp,v 1.74 2005/03/01 20:42:51 j_daniel Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -850,6 +850,14 @@
return !operator==(a,b);
}
+SDL_Color inverse(const SDL_Color& colour) {
+ SDL_Color inverse;
+ inverse.r = 255 - colour.r;
+ inverse.g = 255 - colour.g;
+ inverse.b = 255 - colour.b;
+ return inverse;
+}
+
void pixel_data::read(const config& cfg) {
const std::string& red = cfg["red"];
const std::string& green = cfg["green"];
Index: wesnoth/src/sdl_utils.hpp
diff -u wesnoth/src/sdl_utils.hpp:1.53 wesnoth/src/sdl_utils.hpp:1.54
--- wesnoth/src/sdl_utils.hpp:1.53 Tue Mar 1 19:32:15 2005
+++ wesnoth/src/sdl_utils.hpp Tue Mar 1 20:42:52 2005
@@ -1,4 +1,4 @@
-/* $Id: sdl_utils.hpp,v 1.53 2005/03/01 19:32:15 j_daniel Exp $ */
+/* $Id: sdl_utils.hpp,v 1.54 2005/03/01 20:42:52 j_daniel Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -124,6 +124,7 @@
bool operator!=(const SDL_Rect& a, const SDL_Rect& b);
bool operator==(const SDL_Color& a, const SDL_Color& b);
bool operator!=(const SDL_Color& a, const SDL_Color& b);
+SDL_Color inverse(const SDL_Color& colour);
class config; // no need to include config.hpp