Made the model rotation configurable; improved

documentation of referee.xml.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9829 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-09-14 06:32:05 +00:00
parent 359b4d6e7b
commit 82197488b0
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,12 @@
<?xml version="1.0"?>
<!-- model: the model filename to load as referee
{start,end}-rescue-frame: frame numbers for the rescue animation
{start,end}-start-frame: frame numbers for the start animation, -->
{first,last}-rescue-frame: Frame numbers for the rescue animation.
{first,last}-start-frame: Frame numbers for the start animation.
start-offset: XYZ offset relative to kart where to display the start referee
scale: Scales the mesh.
start-rotation: Rotation of the referee at start
colors: Three texture names that are used for ready, set, go. -->
<referee model="thunderbird.b3d"
first-rescue-frame="1"
last-rescue-frame="99"
@ -9,5 +14,6 @@
last-start-frame="26"
start-offset="-1.5 1 3"
scale = "0.3 0.3 0.3"
start-rotation="0 180 0"
colors="traffic_light_red.jpg traffic_light_yellow.jpg traffic_light_green.jpg"
end-start-frame="100"/>
/>

View File

@ -23,6 +23,7 @@
#include "karts/kart.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/constants.hpp"
#include "utils/string_utils.hpp"
int Referee::m_st_first_start_frame = 1;
@ -76,6 +77,7 @@ void Referee::init()
node->get("last-start-frame", &m_st_last_start_frame );
node->get("start-offset", &m_st_start_offset );
node->get("scale", &m_st_scale );
node->get("start-rotation", &m_st_start_rotation );
std::vector<std::string> colors;
node->get("colors", &colors);