Revision: 1460
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1460&view=rev
Author: rorthomas
Date: 2010-07-19 02:56:33 +0000 (Mon, 19 Jul 2010)
Log Message:
-----------
improved playercolour interface
Modified Paths:
--------------
trunk/source/main/PlayerColours.cpp
trunk/source/main/PlayerColours.h
Modified: trunk/source/main/PlayerColours.cpp
===================================================================
--- trunk/source/main/PlayerColours.cpp 2010-07-18 20:54:40 UTC (rev 1459)
+++ trunk/source/main/PlayerColours.cpp 2010-07-19 02:56:33 UTC (rev 1460)
@@ -53,6 +53,13 @@
return "tracks/PlayerColours/"+StringConverter::toString(colourNum);
}
+Ogre::ColourValue PlayerColours::getColour(int colourNum)
+{
+ int numColours = sizeof(cvals) / sizeof(ColourValue);
+ if(colourNum < 0 || colourNum >= numColours) return ColourValue::ZERO;
+ return cvals[colourNum];
+}
+
void PlayerColours::updateMaterial(int colourNum, String materialName, int
textureUnitStateNum)
{
int numColours = sizeof(cvals) / sizeof(ColourValue);
Modified: trunk/source/main/PlayerColours.h
===================================================================
--- trunk/source/main/PlayerColours.h 2010-07-18 20:54:40 UTC (rev 1459)
+++ trunk/source/main/PlayerColours.h 2010-07-19 02:56:33 UTC (rev 1460)
@@ -35,6 +35,7 @@
void updateMaterial(int colourNum, Ogre::String materialName, int
textureUnitStateNum=0);
Ogre::String getColourMaterial(int colourNum);
+ Ogre::ColourValue getColour(int colourNum);
protected:
void updatePlayerColours();
};
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel